refactor: header file for every module
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef APP_CORE_H
|
||||
#define APP_CORE_H
|
||||
|
||||
#include <raylib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct App App;
|
||||
|
||||
#define TEXT_COLOR_DARK (Color){182, 137, 98, 255}
|
||||
#define TEXT_COLOR_LIGHT (Color){243, 229, 194, 255}
|
||||
#define STORAGE_DATA_FILE "save1.data"
|
||||
|
||||
typedef enum View { LOGO = 0, MENU = 1, GAMEPLAY = 2, GAMEOVER = 3 } View;
|
||||
|
||||
typedef enum {
|
||||
ACTION_FORWARD,
|
||||
ACTION_BACKWARD,
|
||||
ACTION_TURN_LEFT,
|
||||
ACTION_TURN_RIGHT,
|
||||
ACTION_FIRE_PORT,
|
||||
ACTION_FIRE_STARBOARD,
|
||||
ACTION_BACK,
|
||||
ACTION_COUNT
|
||||
} GameAction;
|
||||
|
||||
typedef struct {
|
||||
View currentView;
|
||||
bool running;
|
||||
bool gameStarted;
|
||||
bool restartRequested;
|
||||
} State;
|
||||
|
||||
typedef struct {
|
||||
bool showFPS;
|
||||
bool limitFPS;
|
||||
bool soundtrackOn;
|
||||
} Flags;
|
||||
|
||||
bool IsGameActionPressed(GameAction action);
|
||||
bool IsGameActionDown(GameAction action);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user