2021-07-29 18:33:22 +02:00
|
|
|
#pragma once
|
|
|
|
|
2021-08-05 03:12:40 +02:00
|
|
|
#define ENGINE_TICK 35
|
2021-07-31 03:40:14 +02:00
|
|
|
|
2021-07-29 18:33:22 +02:00
|
|
|
struct game {
|
2021-08-08 01:43:26 +02:00
|
|
|
/*the current map to display*/
|
2021-07-29 18:33:22 +02:00
|
|
|
struct map *map;
|
2021-08-08 01:43:26 +02:00
|
|
|
/*the player*/
|
2021-07-29 18:33:22 +02:00
|
|
|
struct player *player;
|
2021-08-08 01:43:26 +02:00
|
|
|
/*list of all the characters on the map*/
|
2021-08-07 01:49:03 +02:00
|
|
|
struct character **characters;
|
2021-08-08 01:43:26 +02:00
|
|
|
/*the background color*/
|
2021-08-05 03:12:40 +02:00
|
|
|
int background;
|
2021-07-29 18:33:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void engine_draw(struct game const *game);
|
2021-08-04 20:12:53 +02:00
|
|
|
void engine_draw_map_around_player(struct game const *game);
|
2021-07-29 18:33:22 +02:00
|
|
|
void engine_draw_player(struct player const *player);
|
2021-08-05 03:12:40 +02:00
|
|
|
int engine_move(struct game *game, int direction);
|
|
|
|
void engine_tick(struct game *game, int dt);
|
2021-08-07 01:49:03 +02:00
|
|
|
void engine_set_background(struct game *game, int color);
|
2021-08-15 02:42:26 +02:00
|
|
|
void engine_action(struct game const *game, int action);
|
|
|
|
void engine_check_position(struct game *game);
|