From 4bbd306407ff9e46c7b4e33fa81a4c2a3d6760ae Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Thu, 18 Jan 2018 15:22:53 +0100 Subject: [PATCH] main.c fixed --- main.c | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/main.c b/main.c index e854037..796ee7c 100644 --- a/main.c +++ b/main.c @@ -13,50 +13,11 @@ #include "gamestate.h" #include "highscores.h" -<<<<<<< HEAD #include "main.h" -======= -#ifndef __nullptr__ -#define Nullptr(type) (type *)0 -#endif // __nullptr__ - -#define ae "\204" -#define oe "\224" -#define ue "\201" -#define ss "\341" - -// Prototypes -void GAME_ChangeState(GameState state); -void HandleSDLEvents(); -void mousePress(SDL_MouseButtonEvent b); -void keyPress(SDL_KeyboardEvent b); -void toggleFullscreen(); -void windowChanged(SDL_WindowEvent b); -void DrawBackground(SDL_Renderer * renderer); -void INITIALIZE(); -void QUIT(); -int readIntFromIO(char * m1, char * m2, char * m3, int min, int max); -// End Prototypes - -// Default Render Size (Upscaled for bigger monitors) -const int width = 1920; -const int height = 1080; -float XScale = 1.0f, YScale = 1.0f; -// End render properties - -int numKeys; -const Uint8 * keystate; // TODO: export all this into scenery and enemy waves -SDL_Window * window; -SDL_Renderer * renderer; -SDL_Event event; -bool running = true, fullscreen = false; -GameState gameState = MainMenu; -Scenery scenery; ->>>>>>> 04d0cfb994382d9a6e6ebd1bb4ff3aa41b5af2bb int main(int argc, char * args[]){ - //printf("Spielbereiche\n\t- 1: Hauptmen"ue "\n\t- 2: Spiel\n\t- 3: Level Select\n\t- 4: Settings\n\t- 5: Highscores\n"); - //GAME_ChangeState(readIntFromIO("W"ae "hle einen Spielbereich aus, den du testen m"oe "chtest:", "Fehlerhafte Eingabe!\n", "%d ist kein g"ue "ltiger Spielbereich!\n", 1, 5)); + // printf("Spielbereiche\n\t- 1: Hauptmen"ue "\n\t- 2: Spiel\n\t- 3: Level Select\n\t- 4: Settings\n\t- 5: Highscores\n"); + // GAME_ChangeState(readIntFromIO("W"ae "hle einen Spielbereich aus, den du testen m"oe "chtest:", "Fehlerhafte Eingabe!\n", "%d ist kein g"ue "ltiger Spielbereich!\n", 1, 5)); INITIALIZE(); while (running) { // Gameloop HandleSDLEvents(); @@ -68,7 +29,7 @@ int main(int argc, char * args[]){ break; case MainMenu: // Startmenu_Update(keystate); - + Startmenu_Draw(renderer); break; case Highscores: