2021-07-29 18:33:22 +02:00
|
|
|
#pragma once
|
2021-08-25 15:46:05 +02:00
|
|
|
#include "camera.h"
|
|
|
|
|
|
|
|
struct Game {
|
|
|
|
/*the current map to display*/
|
|
|
|
struct Map *map;
|
|
|
|
/*the player*/
|
|
|
|
struct Player *player;
|
|
|
|
/*the camera*/
|
|
|
|
struct Camera camera;
|
|
|
|
/*the background color*/
|
|
|
|
int background;
|
|
|
|
};
|
2021-07-29 18:33:22 +02:00
|
|
|
|
2021-12-23 18:37:48 +01:00
|
|
|
enum action {
|
2022-04-18 02:14:07 +02:00
|
|
|
DIR_DOWN,
|
|
|
|
DIR_LEFT,
|
|
|
|
DIR_UP,
|
|
|
|
DIR_RIGHT,
|
|
|
|
ACTION_SHIFT,
|
2022-05-11 00:37:56 +02:00
|
|
|
ACTION_MENU,
|
2022-04-18 02:14:07 +02:00
|
|
|
ACTION_ALPHA,
|
|
|
|
ACTION_OPTN,
|
|
|
|
ACTION_F1,
|
|
|
|
ACTION_F2,
|
2021-08-25 01:01:43 +02:00
|
|
|
};
|
2021-08-27 02:11:05 +02:00
|
|
|
|
|
|
|
/*get the input with a timeout*/
|
|
|
|
int get_inputs(void);
|
|
|
|
struct Game init_game(struct Player *player);
|