summaryrefslogtreecommitdiffhomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-11-04 20:50:42 -0400
committerrealtradam <[email protected]>2022-11-04 20:50:42 -0400
commite35ff8879409dae845371be867ca76a1cf78cf7f (patch)
tree32f6a08550e38f5482ba9b98f43b96afb45b5aa0 /src/main.cpp
parentf32e06ab49889b50bba195729af19d3bc878f976 (diff)
downloadorbital_game-e35ff8879409dae845371be867ca76a1cf78cf7f.tar.gz
orbital_game-e35ff8879409dae845371be867ca76a1cf78cf7f.zip
started physics
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 7 insertions, 5 deletions
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();
//----------------------------------------------------------------------------------