Add options

This commit is contained in:
2024-01-10 19:38:56 +01:00
parent e261cda6be
commit 692f5744ad
2 changed files with 70 additions and 13 deletions

View File

@@ -19,8 +19,29 @@ typedef struct DrawData {
f32 rotation;
} DrawData;
typedef struct Options {
// Video
bool fullscreen;
bool vsync;
// 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 Game {
GameScreen screen;
GameScreen screenPrevFrame;
Camera2D camera;
BzTileset tileset;
BzTileMap map;
@@ -29,6 +50,8 @@ typedef struct Game {
Font font;
Options options;
struct {
i64 wood;
i64 iron;