#include "app_framework/app.h"

extern void RegisterCVars(void);
extern void Init(void);
extern void Shutdown(void);
extern void Update(unsigned int);
extern void Render(unsigned int);

static rt_app_callbacks _callbacks = {
    .RegisterCVars = RegisterCVars,
    .Init          = Init,
    .Shutdown      = Shutdown,
    .Update        = Update,
    .Render        = Render,
};

#ifdef _WIN32

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
    return rtWin32Entry(hInstance, hPrevInstance, pCmdLine, nCmdShow, _callbacks);
}

#elif defined(__linux__)

int main(int argc, char **argv) {
    return rtXlibEntry(argc, argv, _callbacks);
}

#endif
