#pragma once

#include "pxl8_gfx.h"
#include "pxl8_rng.h"
#include "pxl8_script.h"
#include "pxl8_sfx.h"
#include "pxl8_types.h"

typedef struct pxl8_replay pxl8_replay;

typedef struct pxl8_game {
    pxl8_gfx* gfx;
    pxl8_script* script;
    pxl8_sfx_mixer* mixer;

    pxl8_rng rng;
    i32 frame_count;
    u64 last_time;
    f32 time;

    f32 fps_accumulator;
    i32 fps_frame_count;
    f32 fps;

    pxl8_input_state input;
    pxl8_input_state prev_input;

#ifndef NDEBUG
    pxl8_replay* debug_replay;
#endif

    bool repl_mode;
    bool repl_started;
    bool running;
    bool script_loaded;
    char script_path[256];
} pxl8_game;
