-
Notifications
You must be signed in to change notification settings - Fork 0
Code_common
#define WINDOW_WIDTH 800Definition for the window width.
#define WINDOW_HEIGHT 600Definition for the window height.
#define FONT "terminal-f4.ttf"Definition for the font that is used.
#define MOVEMENT_SPEED 200.0fDefinition for the speed at which all moving objects are orienting themselves around.
extern float delta_time;Definition for the delta time that is used by all moving objects to be consistent at each framerate.
extern SDL_Renderer* renderer;Definition for the renderer that is used to draw objects on.
extern SDL_Window* window;Definition for the window that is being created for the game.
SDL_Point get_player_pos();This makes the player position available globally.
@return An SDL_Point with X and Y coordinate of the player centroid
SDL_Point get_mouse_pos();This makes the mouse position available globally.
@return An SDL_Point with X and Y coordinate of the mouse tip
float get_player_rot();This makes the player rotation available globally.
@return the current rotation of the player, relative to the normal facing direction (right) as radians
typedef enum gamestate {
RUNNING,
PAUSED,
GAME_OVER,
QUIT,
} Game_state;This enum lists all available modes the game can be in.

