shithub: choc

Download patch

ref: a15ba75736d15409876c1f0a44fffc99adf1c192
parent: a7a435cb7d5756ebff87d5f965b27fcc28fd96f6
author: James Haley <haleyjd@hotmail.com>
date: Sat Feb 12 00:36:12 EST 2011

Bug fix for save/load/name your character menus, and some tweaks to the
project files.

Subversion-branch: /branches/strife-branch
Subversion-revision: 2256

--- a/msvc/libopl.vcproj
+++ b/msvc/libopl.vcproj
@@ -127,6 +127,7 @@
 			/>
 			<Tool
 				Name="VCLibrarianTool"
+				IgnoreDefaultLibraryNames="msvcrtd"
 			/>
 			<Tool
 				Name="VCALinkTool"
--- a/msvc/libpcsound.vcproj
+++ b/msvc/libpcsound.vcproj
@@ -109,7 +109,7 @@
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
-				DebugInformationFormat="3"
+				DebugInformationFormat="0"
 				CompileAs="1"
 			/>
 			<Tool
@@ -123,6 +123,7 @@
 			/>
 			<Tool
 				Name="VCLibrarianTool"
+				IgnoreDefaultLibraryNames="msvcrtd"
 			/>
 			<Tool
 				Name="VCALinkTool"
--- a/msvc/libtextscreen.vcproj
+++ b/msvc/libtextscreen.vcproj
@@ -127,6 +127,7 @@
 			/>
 			<Tool
 				Name="VCLibrarianTool"
+				IgnoreDefaultLibraryNames="msvcrtd"
 			/>
 			<Tool
 				Name="VCALinkTool"
--- a/msvc/strife.vcproj
+++ b/msvc/strife.vcproj
@@ -69,6 +69,7 @@
 				AdditionalDependencies="SDL.lib SDL_mixer.lib SDL_net.lib SDLmain.lib ..\lib\libpcsound.lib ..\lib\libtextscreen.lib ..\lib\libopl.lib"
 				OutputFile="$(OutDir)\chocolate-strife-dbg.exe"
 				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="false"
 				IgnoreDefaultLibraryNames="msvcrtd.lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
@@ -124,13 +125,13 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				EnableIntrinsicFunctions="true"
-				AdditionalIncludeDirectories=".;..\src;..\src\strife;..\src\doom;..\textscreen;..\pcsound"
+				AdditionalIncludeDirectories=".;..\src;..\src\strife;..\src\doom;..\textscreen;..\pcsound;..\opl"
 				PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;PROGRAM_PREFIX=&quot;\&quot;chocolate-\&quot;&quot;"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="3"
+				DebugInformationFormat="0"
 				CompileAs="1"
 			/>
 			<Tool
@@ -144,9 +145,10 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="SDL.lib SDL_mixer.lib SDL_net.lib SDLmain.lib ..\lib\libpcsound.lib ..\lib\libtextscreen.lib"
+				AdditionalDependencies="SDL.lib SDL_mixer.lib SDL_net.lib SDLmain.lib ..\lib\libpcsound.lib ..\lib\libtextscreen.lib ..\lib\libopl.lib"
 				OutputFile="$(OutDir)\chocolate-strife.exe"
 				LinkIncremental="0"
+				IgnoreDefaultLibraryNames="msvcrtd"
 				GenerateDebugInformation="false"
 				SubSystem="1"
 				OptimizeReferences="2"
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -591,8 +591,8 @@
 
     if (saveStringEnter)
     {
-        i = M_StringWidth(savegamestrings[saveSlot]); // STRIFE-TODO: verify variable
-        M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*saveSlot,"_");
+        i = M_StringWidth(savegamestrings[quickSaveSlot]);
+        M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*quickSaveSlot,"_");
     }
 }
 
@@ -728,8 +728,8 @@
 
     if (saveStringEnter)
     {
-        i = M_StringWidth(savegamestrings[saveSlot]);
-        M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*saveSlot,"_");
+        i = M_StringWidth(savegamestrings[quickSaveSlot]);
+        M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*quickSaveSlot,"_");
     }
 }
 
@@ -1793,13 +1793,13 @@
             if (saveCharIndex > 0)
             {
                 saveCharIndex--;
-                savegamestrings[saveSlot][saveCharIndex] = 0;
+                savegamestrings[quickSaveSlot][saveCharIndex] = 0;
             }
             break;
 
         case KEY_ESCAPE:
             saveStringEnter = 0;
-            strcpy(&savegamestrings[saveSlot][0],saveOldString);
+            strcpy(&savegamestrings[quickSaveSlot][0],saveOldString);
             break;
 
         case KEY_ENTER:
@@ -1822,11 +1822,11 @@
 
             if (ch >= 32 && ch <= 127 &&
                 saveCharIndex < SAVESTRINGSIZE-1 &&
-                M_StringWidth(savegamestrings[saveSlot]) <
+                M_StringWidth(savegamestrings[quickSaveSlot]) <
                 (SAVESTRINGSIZE-2)*8)
             {
-                savegamestrings[saveSlot][saveCharIndex++] = ch;
-                savegamestrings[saveSlot][saveCharIndex] = 0;
+                savegamestrings[quickSaveSlot][saveCharIndex++] = ch;
+                savegamestrings[quickSaveSlot][saveCharIndex] = 0;
             }
             break;
         }