X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=a12819b2b3559ef196705bc2237f5715c711cbe7;hb=115331fb033ad2a8f4bcd2e1329003d5abd13366;hp=853c5ca73494709a566634564dcdf90ed4c1c1e5;hpb=43f08119f2408a487dbefcf670bb6c8f47d4c49b;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 853c5ca..a12819b 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"; @@ -2117,8 +2116,9 @@ void Game::Tick() if(newscreenwidth==840&&newscreenheight==524)whichres=5; if(newscreenwidth==1024&&newscreenheight==640)whichres=6; if(newscreenwidth==1344&&newscreenheight==840)whichres=7; + if(newscreenwidth==1920&&newscreenheight==1200)whichres=8; - if(whichres==-1||whichres==7){ + if(whichres==-1||whichres==8){ newscreenwidth=640; newscreenheight=480; } @@ -2150,6 +2150,10 @@ void Game::Tick() newscreenwidth=1344; newscreenheight=840; } + if(whichres==7){ + newscreenwidth=1920; + newscreenheight=1200; + } } if(Button()&&!oldbutton&&selected==1){ newdetail++; @@ -2246,8 +2250,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 +2995,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 +4520,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 +11347,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,':');