Browse Source

Moved the options to disable specific compiler warnings from the generic 'AdditionalOptions' to the appropriate 'DisableSpecificWarnings' section.
Corrected an ancient mistake in the grfio/zlib code (calling inflateEnd in case of an error during the Deflate process).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12726 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 17 years ago
parent
commit
2ecdab9606

+ 1 - 1
src/common/grfio.c

@@ -270,7 +270,7 @@ int encode_zip(unsigned char* dest, unsigned long* destLen, const unsigned char*
 
 
 	err = deflate(&stream, Z_FINISH);
 	err = deflate(&stream, Z_FINISH);
 	if (err != Z_STREAM_END) {
 	if (err != Z_STREAM_END) {
-		inflateEnd(&stream);
+		deflateEnd(&stream);
 		return err == Z_OK ? Z_BUF_ERROR : err;
 		return err == Z_OK ? Z_BUF_ERROR : err;
 	}
 	}
 	*destLen = stream.total_out;
 	*destLen = stream.total_out;

+ 7 - 0
src/map/clif.c

@@ -2273,6 +2273,13 @@ int clif_updatestatus(struct map_session_data *sd,int type)
 	}
 	}
 	WFIFOSET(fd,len);
 	WFIFOSET(fd,len);
 
 
+	if( type == SP_SPEED )
+	{
+		char buf[256];
+		sprintf(buf, "Your walk speed is now %d", sd->battle_status.speed);
+		clif_displaymessage(fd, buf);
+	}
+
 	return 0;
 	return 0;
 }
 }
 
 

+ 1 - 1
src/map/map.h

@@ -151,7 +151,7 @@ enum {
 #define CHATROOM_TITLE_SIZE (36 + 1)
 #define CHATROOM_TITLE_SIZE (36 + 1)
 #define CHATROOM_PASS_SIZE (8 + 1)
 #define CHATROOM_PASS_SIZE (8 + 1)
 //Max allowed chat text length
 //Max allowed chat text length
-#define CHAT_SIZE_MAX 256
+#define CHAT_SIZE_MAX (255 + 1)
 
 
 #define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
 #define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
 
 

+ 2 - 2
vcproj-9/char-server_sql.vcproj

@@ -41,7 +41,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -56,6 +55,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -129,7 +129,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -146,6 +145,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"

+ 2 - 2
vcproj-9/char-server_txt.vcproj

@@ -41,7 +41,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -56,6 +55,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -128,7 +128,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -145,6 +144,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"

+ 2 - 2
vcproj-9/login-server_sql.vcproj

@@ -41,7 +41,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -56,6 +55,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -129,7 +129,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -148,6 +147,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"

+ 2 - 2
vcproj-9/login-server_txt.vcproj

@@ -40,7 +40,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4100&#x0D;&#x0A;/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -55,6 +54,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -127,7 +127,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -144,6 +143,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"

+ 2 - 2
vcproj-9/map-server_sql.vcproj

@@ -40,7 +40,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4018&#x0D;&#x0A;/wd4100&#x0D;&#x0A;/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -55,6 +54,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4018;4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -128,7 +128,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4018&#x0D;&#x0A;/wd4100&#x0D;&#x0A;/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -145,6 +144,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4018;4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"

+ 10 - 10
vcproj-9/map-server_txt.vcproj

@@ -40,7 +40,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4018&#x0D;&#x0A;/wd4100&#x0D;&#x0A;/wd4800"
 				Optimization="0"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				AdditionalIncludeDirectories="..\src\common;..\src\zlib"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
 				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
@@ -55,6 +54,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4018;4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -127,7 +127,6 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
-				AdditionalOptions="/wd4018&#x0D;&#x0A;/wd4100&#x0D;&#x0A;/wd4800"
 				Optimization="2"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
@@ -145,6 +144,7 @@
 				WarningLevel="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
 				CompileAs="1"
+				DisableSpecificWarnings="4018;4100;4800"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCManagedResourceCompilerTool"
 				Name="VCManagedResourceCompilerTool"
@@ -377,6 +377,14 @@
 				RelativePath="..\src\map\pet.h"
 				RelativePath="..\src\map\pet.h"
 				>
 				>
 			</File>
 			</File>
+			<File
+				RelativePath="..\src\map\quest.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\map\quest.h"
+				>
+			</File>
 			<File
 			<File
 				RelativePath="..\src\map\script.c"
 				RelativePath="..\src\map\script.c"
 				>
 				>
@@ -433,14 +441,6 @@
 				RelativePath="..\src\map\vending.h"
 				RelativePath="..\src\map\vending.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\src\map\quest.c"
-				>
-			</File>
-			<File
-				RelativePath="..\src\map\quest.h"
-				>
-			</File>
 		</Filter>
 		</Filter>
 		<Filter
 		<Filter
 			Name="zlib"
 			Name="zlib"