#ifndef _fencer_program_h
#define _fencer_program_h

#include <SDL2/SDL.h>
#include <SDL2/SDL_render.h>
#include "vmath.h"
#include "render.h"

typedef void(*TickCallback)();
typedef void(*PlayCallback)();
typedef void(*DrawCallback)();

struct ProgramSettings {
    const char* title;
    IVector view_resolution;
    int target_fps;

    TickCallback on_tick;
    PlayCallback on_play;
    DrawCallback on_draw;
};

extern SDL_Window* g_window;

extern void program_run(const struct ProgramSettings* settings);
extern void program_quit();
extern void program_handle_events();
extern void program_handle_windowevent(SDL_WindowEvent* event);

extern float delta_time();
extern float game_time();

#endif // !_fencer_program_h
