refactor: header file for every module

This commit is contained in:
2026-09-19 13:11:53 +02:00
parent b26070a518
commit dda0d38e22
36 changed files with 968 additions and 272 deletions
+42
View File
@@ -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