[Scummvm-git-logs] scummvm master -> 09b33cdc86f9231eb4cb7c828986e45dbf675ced

dreammaster paulfgilbert at gmail.com
Sat Nov 23 05:15:28 UTC 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
09b33cdc86 GLK: MAGNETIC: Compilation fix


Commit: 09b33cdc86f9231eb4cb7c828986e45dbf675ced
    https://github.com/scummvm/scummvm/commit/09b33cdc86f9231eb4cb7c828986e45dbf675ced
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-11-22T21:15:20-08:00

Commit Message:
GLK: MAGNETIC: Compilation fix

Changed paths:
    engines/glk/magnetic/glk.cpp
    engines/glk/magnetic/magnetic.cpp
    engines/glk/magnetic/magnetic.h
    engines/glk/magnetic/magnetic_defs.h


diff --git a/engines/glk/magnetic/glk.cpp b/engines/glk/magnetic/glk.cpp
index 1ef0d83..7b70fa3 100644
--- a/engines/glk/magnetic/glk.cpp
+++ b/engines/glk/magnetic/glk.cpp
@@ -182,7 +182,7 @@ GMS_HINT_DEFAULT_HEIGHT = 25;
  * quit from hints subsystem.
  */
 static const type16 GMS_HINT_ROOT_NODE = 0,
-GMS_HINTS_DONE = UINT16_MAX;
+GMS_HINTS_DONE = UINT16_MAX_VAL;
 
 /* Generic hint topic for the root hints node. */
 static const char *const GMS_GENERIC_TOPIC = "Hints Menu";
@@ -289,7 +289,7 @@ glui32 Magnetic::gms_get_buffer_crc(const void *void_buffer, size_t length) {
 	 */
 	crc = 0xffffffff;
 	for (index = 0; index < length; index++)
-		crc = crc_table[(crc ^ buf[index]) & BYTE_MAX] ^ (crc >> BITS_PER_BYTE);
+		crc = crc_table[(crc ^ buf[index]) & BYTE_MAX_VAL] ^ (crc >> BITS_PER_BYTE);
 	return crc ^ 0xffffffff;
 }
 
@@ -554,7 +554,7 @@ gms_gammaref_t Magnetic::gms_graphics_equal_contrast_gamma(type16 palette[], lon
 	assert(palette && color_usage);
 
 	result = NULL;
-	lowest_variance = INT32_MAX;
+	lowest_variance = INT32_MAX_VAL;
 
 	/* Search the gamma table for the entry with the lowest contrast variance. */
 	for (gamma = GMS_GAMMA_TABLE; gamma->level; gamma++) {
@@ -2345,7 +2345,7 @@ type16 Magnetic::gms_hint_handle_folder(const ms_hint hints_[],
 		response = 'Q';
 		break;
 	default:
-		response = keycode <= BYTE_MAX ? glk_char_to_upper(keycode) : 0;
+		response = keycode <= BYTE_MAX_VAL ? glk_char_to_upper(keycode) : 0;
 		break;
 	}
 
@@ -2406,7 +2406,7 @@ type16 Magnetic::gms_hint_handle_text(const ms_hint hints_[],
 		response = 'Q';
 		break;
 	default:
-		response = keycode <= BYTE_MAX ? glk_char_to_upper(keycode) : 0;
+		response = keycode <= BYTE_MAX_VAL ? glk_char_to_upper(keycode) : 0;
 		break;
 	}
 
diff --git a/engines/glk/magnetic/magnetic.cpp b/engines/glk/magnetic/magnetic.cpp
index 588b66e..581d246 100644
--- a/engines/glk/magnetic/magnetic.cpp
+++ b/engines/glk/magnetic/magnetic.cpp
@@ -79,7 +79,7 @@ Magnetic::Magnetic(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(s
 	undo_stat[0] = undo_stat[1] = 0;
 	Common::fill(&buffer[0], &buffer[80], 0);
 	Common::fill(&filename[0], &filename[256], 0);
-	Common::fill(&crc_table[0], &crc_table[BYTE_MAX + 1], 0);
+	Common::fill(&crc_table[0], &crc_table[BYTE_MAX_VAL + 1], 0);
 
 #ifndef NO_ANIMATION
 	Common::fill(&pos_table_count[0], &pos_table_count[MAX_POSITIONS], 0);
@@ -131,7 +131,7 @@ void Magnetic::initializeCRC() {
 	const glui32 GMS_CRC_POLYNOMIAL = 0xedb88320;
 	uint32 crc;
 
-	for (uint index = 0; index < BYTE_MAX + 1; ++index) {
+	for (uint index = 0; index < BYTE_MAX_VAL + 1; ++index) {
 		int bit;
 
 		crc = index;
diff --git a/engines/glk/magnetic/magnetic.h b/engines/glk/magnetic/magnetic.h
index bb6e935..a3ea9ce 100644
--- a/engines/glk/magnetic/magnetic.h
+++ b/engines/glk/magnetic/magnetic.h
@@ -262,7 +262,7 @@ private:
 	Common::DumpFile *log1, *log2;
 private:
 	/* Method local statics in original code */
-	glui32 crc_table[BYTE_MAX + 1];
+	glui32 crc_table[BYTE_MAX_VAL + 1];
 	int luminance_weighting;
 	gms_gammaref_t linear_gamma;
 	uint32 pic_current_crc;			/* CRC of the current picture */
diff --git a/engines/glk/magnetic/magnetic_defs.h b/engines/glk/magnetic/magnetic_defs.h
index 6760569..a3675f6 100644
--- a/engines/glk/magnetic/magnetic_defs.h
+++ b/engines/glk/magnetic/magnetic_defs.h
@@ -42,10 +42,10 @@ typedef int16 type16s;
 typedef uint32 type32;
 typedef int32 type32s;
 
-enum { BYTE_MAX = 255 };
+enum { BYTE_MAX_VAL = 255 };
 enum { BITS_PER_BYTE = 8 };
-enum { UINT16_MAX = 0xffff };
-enum { INT32_MAX = 0x7fffffff };
+enum { UINT16_MAX_VAL = 0xffff };
+enum { INT32_MAX_VAL = 0x7fffffff };
 
 #define MAX_HINTS 260
 #define MAX_HCONTENTS 30000




More information about the Scummvm-git-logs mailing list