]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Experiment to wedge OpenAL in here...
[lugaru.git] / Source / GameTick.cpp
index 853c5ca73494709a566634564dcdf90ed4c1c1e5..de6c79ecf1ed1fd9d0bb80db9ad413ab61351ecd 100644 (file)
@@ -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[numdialogues];i++){
@@ -4611,7 +4608,7 @@ void      Game::Tick()
                                                                        }
                                                                }
 
-                                                               ifstream ipstream(mapname);
+                                                               ifstream ipstream(ConvertFileName(mapname));
                                                                ipstream.ignore(256,':');
                                                                ipstream >> numdialogueboxes[whichdi];
                                                                for(i=0;i<numdialogueboxes[whichdi];i++){
@@ -5631,8 +5628,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";
@@ -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,':');