Implement FullScreen and FPS opts

This commit is contained in:
2024-01-29 16:41:13 +01:00
parent ed1815eddc
commit a633c9cbdf
7 changed files with 76 additions and 47 deletions

View File

@@ -26,23 +26,30 @@ typedef struct DrawData {
typedef struct Options {
// Video
bool fullscreen;
bool vsync;
bool limitFps;
// Audio
f32 master;
f32 music;
f32 sound;
} Options;
static Options getDefaultOptions() {
return (Options) {
.fullscreen = false,
.vsync = false,
.master = 5.0f,
.music = 5.0f,
.sound = 5.0f,
typedef struct GameData {
Options options;
} GameData;
static GameData getDefaultGameData() {
return (GameData) {
.options = {
.fullscreen = false,
.limitFps = true,
.master = 0.5f,
.music = 0.5f,
.sound = 0.5f
}
};
}
typedef struct PlayerResources {
i64 wood;
i64 food;
@@ -63,7 +70,7 @@ typedef struct Game {
Font font;
Options options;
GameData gameData;
PlayerResources playerResources[PLAYER_COUNT];
Player player;