Add options
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user