diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:47:15 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:47:15 +0100 |
commit | 1befc82eafb13146427ec941e4240c846a7e6ac2 (patch) | |
tree | 5e368b404bf64cd04ada76b86c7b605adc9c75d9 /src/main.cpp | |
parent | what the fuck is going on (diff) | |
download | threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.gz threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.bz2 threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.xz threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.zst threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.zip |
shit background image featureing hit-- bowser. I meant bowser...
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 488de95..5d7c3be 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,8 @@ int main(void) { Game* game = nullptr; + + Texture2D background = LoadTexture("../meta/media/sprites/background.png"); std::string path = "../meta/maps"; int i = 0; for (const auto& entry : @@ -103,10 +105,11 @@ int main(void) { } BeginDrawing(); - ClearBackground(COOLPURPLE); + // ClearBackground(COOLPURPLE); switch (gs) { case (TITLE): { + ClearBackground(COOLPURPLE); DrawRectangle(200, 100, 1200, 700, RAYWHITE); DrawRectangle(250, 150, 1100, 600, COOLPURPLE); DrawText("THRESHOLD", 260, 160, 30, RAYWHITE); @@ -116,6 +119,7 @@ int main(void) { break; } case (PICK): { + ClearBackground(COOLPURPLE); DrawRectangle(200, 100, 1200, 700, RAYWHITE); DrawRectangle(250, 150, 1100, 600, COOLPURPLE); DrawRectangle(300, 200, 1000, 500, RAYWHITE); @@ -139,6 +143,7 @@ int main(void) { break; } case (GAMEPLAY): { + DrawTexture(background, 0, 0, WHITE); if (auto code = game->getKeys()) { if (code == 1) // death { |