52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
#ifndef __main_h__
|
|
#define __main_h__
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include <math.h>
|
|
#include <time.h>
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_image.h>
|
|
#include <SDL2/SDL_ttf.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 GAME_Escape();
|
|
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 = Game;
|
|
Scenery scenery;
|
|
|
|
#endif // __main_h__
|