From 18c26edd6bae8ce5bd26e0ab632086725f492871 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Fri, 22 Dec 2023 02:06:49 -0700 Subject: Moved the screens to a better place --- src/howToPlayScreen.c | 58 --------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/howToPlayScreen.c (limited to 'src/howToPlayScreen.c') 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); -} -- cgit v1.2.3