stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/clone ccl.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/clone ccl.c
Date: Mon, 01 Dec 2003 13:12:26 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/12/01 13:12:26

Modified files:
        src/clone      : ccl.c 

Log message:
        Finished SavePreferences for lua

Patches:
Index: stratagus/src/clone/ccl.c
diff -u stratagus/src/clone/ccl.c:1.141 stratagus/src/clone/ccl.c:1.142
--- stratagus/src/clone/ccl.c:1.141     Thu Nov 20 15:00:24 2003
+++ stratagus/src/clone/ccl.c   Mon Dec  1 13:12:25 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl.c,v 1.141 2003/11/20 20:00:24 jsalmon3 Exp $
+//     $Id: ccl.c,v 1.142 2003/12/01 18:12:25 jsalmon3 Exp $
 
 //@{
 
@@ -2020,7 +2020,7 @@
     }
 
     fprintf(fd, ";;; -----------------------------------------\n");
-    fprintf(fd, ";;; $Id: ccl.c,v 1.141 2003/11/20 20:00:24 jsalmon3 Exp $\n");
+    fprintf(fd, ";;; $Id: ccl.c,v 1.142 2003/12/01 18:12:25 jsalmon3 Exp $\n");
 
     fprintf(fd, "(set-video-resolution! %d %d)\n", VideoWidth, VideoHeight);
     fprintf(fd, "(set-group-keys \"");
@@ -2051,11 +2051,22 @@
        return;
     }
 
-    fprintf(fd, "--[[\n");
-    fprintf(fd, "      $Id: ccl.c,v 1.141 2003/11/20 20:00:24 jsalmon3 Exp 
$\n");
-    fprintf(fd, "]]\n");
+    fprintf(fd, "--- -----------------------------------------\n");
+    fprintf(fd, "--- $Id: ccl.c,v 1.142 2003/12/01 18:12:25 jsalmon3 Exp $\n");
 
     fprintf(fd, "SetVideoResolution(%d, %d)\n", VideoWidth, VideoHeight);
+    fprintf(fd, "SetGroupKeys(\"");
+
+    i = 0;
+    while (UiGroupKeys[i]) {
+       if (UiGroupKeys[i] != '"') {
+           fprintf(fd, "%c", UiGroupKeys[i]);
+       } else {
+           fprintf(fd, "\\\"");
+       }
+       ++i;
+    }
+    fprintf(fd, "\")\n");
 
     fclose(fd);
 #endif
@@ -2079,7 +2090,7 @@
     }
 
     fprintf(fd, ";;; -----------------------------------------\n");
-    fprintf(fd, ";;; $Id: ccl.c,v 1.141 2003/11/20 20:00:24 jsalmon3 Exp $\n");
+    fprintf(fd, ";;; $Id: ccl.c,v 1.142 2003/12/01 18:12:25 jsalmon3 Exp $\n");
 
     // Global options
     if (OriginalFogOfWar) {
@@ -2159,11 +2170,74 @@
        return;
     }
 
-    fprintf(fd, "--[[\n");
-    fprintf(fd, "      $Id: ccl.c,v 1.141 2003/11/20 20:00:24 jsalmon3 Exp 
$\n");
-    fprintf(fd, "]]\n");
+    fprintf(fd, "--- -----------------------------------------\n");
+    fprintf(fd, "--- $Id: ccl.c,v 1.142 2003/12/01 18:12:25 jsalmon3 Exp $\n");
+
+    // Global options
+    if (OriginalFogOfWar) {
+       fprintf(fd, "OriginalFogOfWar()\n");
+    } else {
+       fprintf(fd, "AlphaFogOfWar()\n");
+    }
+    fprintf(fd, "SetVideoFullScreen(%s)\n", VideoFullScreen ? "true" : 
"false");
+#if 0
+    // FIXME: Uncomment when this is configurable in the menus
+    fprintf(fd, "SetContrast(%d)\n", TheUI.Contrast);
+    fprintf(fd, "SetBrightness(%d)\n", TheUI.Brightness);
+    fprintf(fd, "SetSaturation(%d)\n", TheUI.Saturation);
+#endif
+    fprintf(fd, "SetLocalPlayerName(\"%s\")\n", LocalPlayerName);
+
+    // Game options
+    fprintf(fd, "SetShowTips(%s)\n", ShowTips ? "true" : "false");
+    fprintf(fd, "SetCurrentTip(%d)\n", CurrentTip);
+
+    fprintf(fd, "SetFogOfWar(%s)\n", !TheMap.NoFogOfWar ? "true" : "false");
+    fprintf(fd, "SetShowCommandKey(%s)\n", ShowCommandKey ? "true" : "false");
+
+    // Speeds
+    fprintf(fd, "SetVideoSyncSpeed(%d)\n", VideoSyncSpeed);
+    fprintf(fd, "SetMouseScrollSpeed(%d)\n", SpeedMouseScroll);
+    fprintf(fd, "SetKeyScrollSpeed(%d)\n", SpeedKeyScroll);
 
-    fprintf(fd, "SetVideoFullscreen(%s)\n", VideoFullScreen ? "true" : 
"false");
+    // Sound options
+    if (!SoundOff) {
+       fprintf(fd, "SoundOn()\n");
+    } else {
+       fprintf(fd, "SoundOff()\n");
+    }
+#ifdef WITH_SOUND
+    fprintf(fd, "SetSoundVolume(%d)\n", GlobalVolume);
+    if (!MusicOff) {
+       fprintf(fd, "MusicOn()\n");
+    } else {
+       fprintf(fd, "MusicOff()\n");
+    }
+    fprintf(fd, "SetMusicVolume(%d)\n", MusicVolume);
+#ifdef USE_CDAUDIO
+    buf[0] = '\0';
+    switch (CDMode) {
+       case CDModeAll:
+           strcpy(buf, "all");
+           break;
+       case CDModeRandom:
+           strcpy(buf, "random");
+           break;
+       case CDModeDefined:
+           strcpy(buf, "defined");
+           break;
+       case CDModeStopped:
+       case CDModeOff:
+           strcpy(buf, "off");
+           break;
+       default:
+           break;
+    }
+    if (buf[0]) {
+       fprintf(fd, "SetCdMode(\"%s\")\n", buf);
+    }
+#endif
+#endif
 #endif
 
     fclose(fd);
@@ -2220,7 +2294,7 @@
     extern SCM oblistvar;
 
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.141 2003/11/20 20:00:24 
jsalmon3 Exp $\n\n");
+    CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.142 2003/12/01 18:12:25 
jsalmon3 Exp $\n\n");
 
     for (list = oblistvar; gh_list_p(list); list = gh_cdr(list)) {
        SCM sym;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]