From e35ff8879409dae845371be867ca76a1cf78cf7f Mon Sep 17 00:00:00 2001 From: realtradam Date: Fri, 4 Nov 2022 20:50:42 -0400 Subject: started physics --- src/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 0cda8fb..7af702a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,14 +9,15 @@ int main(void) // Initialization //-------------------------------------------------------------------------------------- const int screenWidth = 800; - const int screenHeight = 450; + const int screenHeight = 800; InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window"); SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- - auto ship = Renderer::Sprite("ship", (Rectangle){1365,1696,198,188}); + auto ship = Renderer::Sprite("kenneySpaceShooter", (Rectangle){1365,1696,198,188}, (Vector2){19.80/2,18.80/2}); + auto rock = Renderer::Sprite("kenneySpaceShooter", (Rectangle){0,800,440,442}, (Vector2){44.00/2, 44.20/2}); // Main game loop while (!WindowShouldClose()) // Detect window close button or ESC key @@ -30,11 +31,12 @@ int main(void) //---------------------------------------------------------------------------------- BeginDrawing(); - ClearBackground(RAYWHITE); + ClearBackground(BLACK); - DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); + DrawText("Space!", 190, 200, 20, LIGHTGRAY); //DrawTexture(Resources::useTexture("ship"), 0, 0, WHITE); - ship.draw(100,100); + ship.draw(100,100, 0.1); + rock.draw(750,750, 0.1); EndDrawing(); //---------------------------------------------------------------------------------- -- cgit v1.2.3