Merge pull request #126 from devZoGok/bf-123-windows-argv

Bf 123 windows argv
This commit is contained in:
devZoGok
2024-06-15 09:32:17 +00:00
committed by GitHub
+7 -3
View File
@@ -14,13 +14,17 @@ using namespace vb01;
using namespace std;
int main(int argc, char **argv) {
GameManager *gm = GameManager::getSingleton();
string gamePath = string(argv[0]);
for(int i = 0; i < gamePath.length(); i++)
if(gamePath[i] == '\\')
gamePath[i] = '/';
gamePath = gamePath.substr(0, gamePath.find_last_of("/") + 1) + "../";
GameManager *gm = GameManager::getSingleton();
gm->start(gamePath);
gm->getStateManager()->attachAppState(new GuiAppState());
AssetManager::getSingleton()->load(gm->getPath() + "Fonts/batang.ttf");
ConcreteGuiManager::getSingleton()->readLuaScreenScript("mainMenu.lua");