2025-10-17 17:54:33 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "pxl8_gfx.h"
|
2026-01-08 01:19:25 -06:00
|
|
|
#include "pxl8_rng.h"
|
2025-10-17 17:54:33 -05:00
|
|
|
#include "pxl8_script.h"
|
2026-01-07 17:45:46 -06:00
|
|
|
#include "pxl8_sfx.h"
|
2025-10-17 17:54:33 -05:00
|
|
|
#include "pxl8_types.h"
|
|
|
|
|
|
2026-01-08 01:19:25 -06:00
|
|
|
typedef struct pxl8_replay pxl8_replay;
|
|
|
|
|
|
2025-10-17 17:54:33 -05:00
|
|
|
typedef struct pxl8_game {
|
|
|
|
|
pxl8_gfx* gfx;
|
|
|
|
|
pxl8_script* script;
|
2026-01-07 17:45:46 -06:00
|
|
|
pxl8_sfx_mixer* mixer;
|
2025-10-17 17:54:33 -05:00
|
|
|
|
2026-01-08 01:19:25 -06:00
|
|
|
pxl8_rng rng;
|
2025-10-17 17:54:33 -05:00
|
|
|
i32 frame_count;
|
|
|
|
|
u64 last_time;
|
|
|
|
|
f32 time;
|
|
|
|
|
|
2025-11-09 06:30:17 -06:00
|
|
|
f32 fps_accumulator;
|
|
|
|
|
i32 fps_frame_count;
|
|
|
|
|
f32 fps;
|
|
|
|
|
|
2025-11-18 23:50:02 -06:00
|
|
|
pxl8_input_state input;
|
2026-01-08 01:19:25 -06:00
|
|
|
pxl8_input_state prev_input;
|
|
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
|
pxl8_replay* debug_replay;
|
|
|
|
|
#endif
|
2025-11-18 23:50:02 -06:00
|
|
|
|
2025-10-17 17:54:33 -05:00
|
|
|
bool repl_mode;
|
2025-11-01 12:39:59 -05:00
|
|
|
bool repl_started;
|
2025-10-17 17:54:33 -05:00
|
|
|
bool running;
|
|
|
|
|
bool script_loaded;
|
|
|
|
|
char script_path[256];
|
|
|
|
|
} pxl8_game;
|