]> git.jsancho.org Git - lugaru.git/commitdiff
Read stereo settings to config file, and read them back.
authorVadim Trochinsky <vadim.trochinsky@gmail.com>
Sun, 16 May 2010 20:08:49 +0000 (00:08 +0400)
committerVadim Trochinsky <vadim.trochinsky@gmail.com>
Sun, 16 May 2010 20:08:49 +0000 (00:08 +0400)
Stereo mode now configured as "none" by default

Source/GameTick.cpp
Source/Globals.cpp
Source/OpenGL_Windows.cpp

index 4a055ad600ecbf6bcb5e7958bcffadc474a4808f..a8d0c28dbf130b2aa06e70696d5b696fdef32806 100644 (file)
@@ -2861,6 +2861,12 @@ void     Game::Tick()
                                opstream << KeyToChar(attackkey);
                                opstream << "\nChat key:\n";
                                opstream << KeyToChar(chatkey);
+                               opstream << "\nStereoMode:\n";
+                               opstream << stereomode;
+                               opstream << "\nStereoSeparation:\n";
+                               opstream << stereoseparation;
+                               opstream << "\nStereoReverse:\n";
+                               opstream << stereoreverse;
                                opstream.close();
                        }
                        if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==13||mainmenu==10||mainmenu==11||mainmenu==100){
@@ -3256,6 +3262,12 @@ void     Game::Tick()
                                opstream << KeyToChar(attackkey);
                                opstream << "\nChat key:\n";
                                opstream << KeyToChar(chatkey);
+                               opstream << "\nStereoMode:\n";
+                               opstream << stereomode;
+                               opstream << "\nStereoSeparation:\n";
+                               opstream << stereoseparation;
+                               opstream << "\nStereoReverse:\n";
+                               opstream << stereoreverse;
                                opstream.close();
 
                                if(mainmenu==3&&gameon)mainmenu=2;
@@ -3884,6 +3896,12 @@ void     Game::Tick()
                                opstream << KeyToChar(attackkey);
                                opstream << "\nChat key:\n";
                                opstream << KeyToChar(chatkey);
+                               opstream << "\nStereoMode:\n";
+                               opstream << stereomode;
+                               opstream << "\nStereoSeparation:\n";
+                               opstream << stereoseparation;
+                               opstream << "\nStereoReverse:\n";
+                               opstream << stereoreverse;
                                opstream.close();
                        }
                }
@@ -4319,6 +4337,12 @@ void     Game::Tick()
                                opstream << KeyToChar(attackkey);
                                opstream << "\nChat key:\n";
                                opstream << KeyToChar(chatkey);
+                               opstream << "\nStereoMode:\n";
+                               opstream << stereomode;
+                               opstream << "\nStereoSeparation:\n";
+                               opstream << stereoseparation;
+                               opstream << "\nStereoReverse:\n";
+                               opstream << stereoreverse;
                                opstream.close();
                        }
                }
index e0b189d811cf209b2da7594927f1eaef20d0920d..b360ce055c9ed75e55ec4f947b22bbbd40fbd09f 100644 (file)
@@ -268,6 +268,6 @@ bool gamestarted = 0;
 
 //TextureList textures;
 
-StereoMode stereomode =  stereoHorizontalInterlaced;
+StereoMode stereomode =  stereoNone;
 float stereoseparation = 0.05;
 bool  stereoreverse = false;
\ No newline at end of file
index ce0005041dee9242cc592e2e7562a0e94ea76d7e..a2a58c21f3bb0d24be4299f47e73fbee388b81fc 100644 (file)
@@ -703,6 +703,12 @@ Boolean SetUp (Game & game)
                opstream << KeyToChar(game.attackkey);
                opstream << "\nChat key:\n";
                opstream << KeyToChar(game.chatkey);
+               opstream << "\nStereoMode:\n";
+               opstream << stereomode;
+               opstream << "\nStereoSeparation:\n";
+               opstream << stereoseparation;
+               opstream << "\nStereoReverse:\n";
+               opstream << stereoreverse;
                opstream.close();
        }
        if(ipstream){
@@ -849,6 +855,17 @@ Boolean SetUp (Game & game)
                ipstream.ignore(256,'\n');
                ipstream >> string;
                game.chatkey=CharToKey(string);
+               ipstream.ignore(256,'\n');
+               ipstream.ignore(256,'\n');
+               ipstream >> i;
+               stereomode = (StereoMode)i;
+               ipstream.ignore(256,'\n');
+               ipstream.ignore(256,'\n');
+               ipstream >> stereoseparation;
+               ipstream.ignore(256,'\n');
+               ipstream.ignore(256,'\n');
+               ipstream >> stereoreverse;
+
                ipstream.close();
 
                if(detail>2)detail=2;