X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=de6c79ecf1ed1fd9d0bb80db9ad413ab61351ecd;hb=85c20cd8cfd58b533e653a7d9d32ad8823db3736;hp=853c5ca73494709a566634564dcdf90ed4c1c1e5;hpb=43f08119f2408a487dbefcf670bb6c8f47d4c49b;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 853c5ca..de6c79e 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1849,8 +1849,7 @@ void Game::Tick() if(newscreenheight>3000)newscreenheight=screenheight; if(newscreenheight<0)newscreenheight=screenheight; - //ofstream opstream(":Data:config.txt"); - ofstream opstream("./Data/config.txt"); + ofstream opstream(ConvertFileName(":Data:config.txt", "w")); opstream << "Screenwidth:\n"; opstream << newscreenwidth; opstream << "\nScreenheight:\n"; @@ -2246,8 +2245,7 @@ void Game::Tick() if(newscreenheight<0)newscreenheight=screenheight; - //ofstream opstream(":Data:config.txt"); - ofstream opstream("./Data/config.txt"); + ofstream opstream(ConvertFileName(":Data:config.txt", "w")); opstream << "Screenwidth:\n"; opstream << newscreenwidth; opstream << "\nScreenheight:\n"; @@ -2992,8 +2990,7 @@ void Game::Tick() if(newscreenheight>3000)newscreenheight=screenheight; if(newscreenheight<0)newscreenheight=screenheight; - //ofstream opstream(":Data:config.txt"); - ofstream opstream("./Data/config.txt"); + ofstream opstream(ConvertFileName(":Data:config.txt", "w")); opstream << "Screenwidth:\n"; opstream << newscreenwidth; opstream << "\nScreenheight:\n"; @@ -4518,7 +4515,7 @@ void Game::Tick() } } - ifstream ipstream(mapname); + ifstream ipstream(ConvertFileName(mapname)); ipstream.ignore(256,':'); ipstream >> numdialogueboxes[numdialogues]; for(i=0;i> numdialogueboxes[whichdi]; for(i=0;i3000)newscreenheight=screenheight; if(newscreenheight<0)newscreenheight=screenheight; - //ofstream opstream(":Data:config.txt"); - ofstream opstream("./Data/config.txt"); + ofstream opstream(ConvertFileName(":Data:config.txt", "w")); opstream << "Screenwidth:\n"; opstream << newscreenwidth; opstream << "\nScreenheight:\n"; @@ -11346,8 +11342,7 @@ void Game::TickOnceAfter(){ startbonustotal=0; - // ifstream ipstream(":Data:Campaigns:main.txt"); - ifstream ipstream("./Data/Campaigns/main.txt"); + ifstream ipstream(ConvertFileName(":Data:Campaigns:main.txt")); //campaignnumlevels=0; //accountcampaignchoicesmade[accountactive]=0; ipstream.ignore(256,':');