aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/magnetic/glk.cpp10
-rw-r--r--engines/glk/magnetic/magnetic.cpp4
-rw-r--r--engines/glk/magnetic/magnetic.h2
-rw-r--r--engines/glk/magnetic/magnetic_defs.h6
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/glk/magnetic/glk.cpp b/engines/glk/magnetic/glk.cpp
index 1ef0d83052..7b70fa3976 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 588b66ee6f..581d246acf 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 bb6e935c73..a3ea9ceee4 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 6760569c01..a3675f6159 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