Shipwright/OTRGui/src/main.cpp
M4xw f52a2a6406 git subrepo clone (merge) https://github.com/HarbourMasters/otrgui.git OTRGui
subrepo:
  subdir:   "OTRGui"
  merged:   "a6066a251"
upstream:
  origin:   "https://github.com/HarbourMasters/otrgui.git"
  branch:   "master"
  commit:   "a6066a251"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-22 02:53:51 +01:00

40 lines
922 B
C++

#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() {
constexpr Vector2 windowSize = Vector2(400, 200);
SetTargetFPS(144);
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();
while(!WindowShouldClose()) {
UpdateDrawFrame();
}
CloseWindow();
return 0;
}