aboutsummaryrefslogtreecommitdiff
path: root/src/howToPlayScreen.c
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-12-22 02:06:49 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-12-22 02:06:49 -0700
commit18c26edd6bae8ce5bd26e0ab632086725f492871 (patch)
tree9835eaaf1c06be3f313ca92aa3f1dcb8577b56ad /src/howToPlayScreen.c
parent35ccb272571efd684f050e579092ccb290a39c89 (diff)
Moved the screens to a better place
Diffstat (limited to 'src/howToPlayScreen.c')
-rw-r--r--src/howToPlayScreen.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/howToPlayScreen.c b/src/howToPlayScreen.c
deleted file mode 100644
index 8c31c20..0000000
--- a/src/howToPlayScreen.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "howToPlayScreen.h"
-#include "game.h"
-
-void initHowToPlayScreen(Game * game) {
- HowToPlayScreen * howToPlayScreen = &game->howToPlayScreen;
-
- howToPlayScreen->goBackButton = (Rectangle){0.0, 25.0, 100.0, 50.0};
- howToPlayScreen->infoText = (Rectangle){0.0, 0.0, 0.0, 0.0};
-
- resizeHowToPlayScreen(game, howToPlayScreen);
-}
-
-void updateHowToPlayScreen(Game * game) {
- HowToPlayScreen * howToPlayScreen = &game->howToPlayScreen;
-
- ClearBackground(RAYWHITE);
-
- // Back to main menu button.
- bool backPressed = GuiButton(howToPlayScreen->goBackButton, "back");
-
- if (backPressed)
- game->screenId = SCREEN_MAIN_MENU;
-
- // Info text.
- const char info[] =
- "Game play:\n"
- " Kill fascist space ships and move on (:\n"
- "Controls:\n"
- " Sorry no wasd ):\n"
- " Mouse to look around normally\n"
- " Middle click with mouse movement to rotate\n"
- " Scroll wheel to change the ship speed\n"
- " Shift to slow down the mouse and scroll wheel\n"
- " Ctrl to speed up the moues and scroll wheel\n"
- " Number key to change the camera view\n"
- " Left click to shoot\n"
- " Right click to auto target\n"
- "Using auto target:\n"
- " Hitting things is hard so use the auto target pleaz (:\n"
- " It will auto target on anything that is in range\n"
- " Auto target will stop if you are out of range\n"
- " The color will change from blue to red when you can kill\n"
- " For some types of color blindness use the \"On Target\" instead\n"
- " Try to manually aim to help the auto target";
-
- DrawText(info, howToPlayScreen->infoText.x + 3, howToPlayScreen->infoText.y + 3, 20, BLACK);
- DrawRectangleLinesEx(howToPlayScreen->infoText, 2, BLUE);
-}
-
-void resizeHowToPlayScreen(Game * game, HowToPlayScreen * howToPlayScreen) {
- int width = GetScreenWidth();
- int height = GetScreenHeight();
-
- howToPlayScreen->infoText.width = width / 1.5;
- howToPlayScreen->infoText.height = height / 1.5;
- howToPlayScreen->infoText.x = (width / 2.0) - (howToPlayScreen->infoText.width / 2.0);
- howToPlayScreen->infoText.y = (height / 2.0) - (howToPlayScreen->infoText.height / 2.0);
-}