]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Settings.cpp
merge
[lugaru.git] / Source / Settings.cpp
index 8261ed2b0d0247b35cf925c9c31408d6777f689a..754c2ac4e316ec2c0a995dcebfd741227ba3009d 100644 (file)
@@ -45,15 +45,15 @@ void DefaultSettings(Game &game) {
 void SaveSettings(Game &game) {
        ofstream opstream(ConvertFileName(":Data:config.txt", "w"));
        opstream << "Screenwidth:\n";
-       opstream << kContextWidth;
+       opstream << game.newscreenwidth;
        opstream << "\nScreenheight:\n";
-       opstream << kContextHeight;
+       opstream << game.newscreenheight;
        opstream << "\nMouse sensitivity:\n";
        opstream << usermousesensitivity;
        opstream << "\nBlur(0,1):\n";
        opstream << ismotionblur;
        opstream << "\nOverall Detail(0,1,2) higher=better:\n";
-       opstream << detail;
+       opstream << game.newdetail;
        opstream << "\nFloating jump:\n";
        opstream << floatjump;
        opstream << "\nMouse jump:\n";
@@ -117,6 +117,13 @@ void SaveSettings(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();
 }
 
@@ -233,6 +240,14 @@ bool LoadSettings(Game &game) {
                } else if ( !strncmp(setting, "Chat key", 8) ) {
                        ipstream >> string;
                        game.chatkey = CharToKey(string);
+               } else if ( !strncmp(setting, "StereoMode", 10) ) {
+                       int i;
+                       ipstream >> i;
+                       stereomode = (StereoMode)i;
+               } else if ( !strncmp(setting, "StereoSeparation", 16) ) {
+                       ipstream >> stereoseparation;
+               } else if ( !strncmp(setting, "StereoReverse", 13) ) {
+                       ipstream >> stereoreverse;
                } else {
                        ipstream >> string;
                        fprintf(stderr, "Unknown config option '%s' with value '%s'. Ignoring.\n", setting, string);