2023-03-17 10:51:17 +01:00
|
|
|
#pragma once
|
|
|
|
#include "entity.h"
|
2023-03-23 22:42:37 +01:00
|
|
|
#include "rotrect.h"
|
2023-03-17 10:51:17 +01:00
|
|
|
|
2023-03-18 23:40:10 +01:00
|
|
|
enum { MAX_ENTITIES = 128 };
|
2023-03-17 10:51:17 +01:00
|
|
|
|
|
|
|
typedef struct Game {
|
|
|
|
unsigned int uuid;
|
2023-03-17 21:07:07 +01:00
|
|
|
bool queue_next_scene;
|
2023-03-18 23:40:10 +01:00
|
|
|
int queue_restart_scene;
|
2023-03-21 21:29:20 +01:00
|
|
|
int player_dir;
|
2023-03-21 22:19:31 +01:00
|
|
|
int show_ui;
|
2023-03-23 22:42:37 +01:00
|
|
|
Rect spike_rect;
|
|
|
|
Rect spike_irect;
|
2023-03-17 10:51:17 +01:00
|
|
|
Entity entities[MAX_ENTITIES];
|
|
|
|
} Game;
|
|
|
|
|
|
|
|
void game_init(Game *this);
|
|
|
|
void game_deinit(Game *this);
|
|
|
|
void game_update(Game *this);
|
|
|
|
void game_draw(Game *this);
|
2023-03-17 20:44:59 +01:00
|
|
|
void game_restart_scene(Game *this);
|
2023-03-17 10:51:17 +01:00
|
|
|
Entity *game_create_entity(Game *this);
|
2023-03-19 05:49:14 +01:00
|
|
|
int game_entity_count(Game *this, unsigned int type);
|
2023-03-21 21:29:20 +01:00
|
|
|
Entity *game_get_entity(Game *this, unsigned int type);
|