2022-03-21 21:53:51 -04:00
|
|
|
#include <iostream>
|
|
|
|
#include "raylib.h"
|
|
|
|
#include "game/game.h"
|
|
|
|
#include "impl/fs-bridge/fs-bridge.h"
|
|
|
|
#include "impl/fs-bridge/windows/fs-windows.h"
|
|
|
|
#include "impl/fs-bridge/linux/fs-linux.h"
|
|
|
|
#include "impl.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
FSBridge* NativeFS = nullptr;
|
|
|
|
OTRGame* Game = nullptr;
|
|
|
|
|
|
|
|
void UpdateDrawFrame(void) {
|
|
|
|
Game->update();
|
|
|
|
Game->draw();
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
2022-03-24 14:48:22 -04:00
|
|
|
constexpr Vector2 windowSize = Vector2(400, 200);
|
2022-03-24 02:07:49 -04:00
|
|
|
SetConfigFlags(FLAG_VSYNC_HINT);
|
2022-03-21 21:53:51 -04:00
|
|
|
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
|
|
|
|
SetConfigFlags(FLAG_WINDOW_UNDECORATED);
|
|
|
|
SetConfigFlags(FLAG_MSAA_4X_HINT);
|
|
|
|
SetConfigFlags(FLAG_WINDOW_TRANSPARENT);
|
|
|
|
InitWindow(windowSize.x, windowSize.y, "");
|
|
|
|
#ifdef _WIN32
|
|
|
|
NativeFS = new WindowsBridge;
|
|
|
|
#else
|
|
|
|
NativeFS = new LinuxBridge;
|
|
|
|
#endif
|
|
|
|
Game = new OTRGame();
|
|
|
|
Game->preload();
|
|
|
|
Game->init();
|
2022-03-24 14:48:22 -04:00
|
|
|
while(!WindowShouldClose() && !Game->CloseRequested()) {
|
2022-03-21 21:53:51 -04:00
|
|
|
UpdateDrawFrame();
|
|
|
|
}
|
|
|
|
CloseWindow();
|
|
|
|
return 0;
|
|
|
|
}
|