diff options
author | Strangerke | 2016-12-01 22:59:55 -0800 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:10 +0100 |
commit | 6523e3bf9b3d2458f553c22082cd25b658216338 (patch) | |
tree | 0165c413e3b0069c30351b5a55c886bb84797b70 /engines/cryo | |
parent | be3e74882986c8fb2cb164cf5e3dfbb777396e4a (diff) | |
download | scummvm-rg350-6523e3bf9b3d2458f553c22082cd25b658216338.tar.gz scummvm-rg350-6523e3bf9b3d2458f553c22082cd25b658216338.tar.bz2 scummvm-rg350-6523e3bf9b3d2458f553c22082cd25b658216338.zip |
CRYO: Silent some warnings
Diffstat (limited to 'engines/cryo')
-rw-r--r-- | engines/cryo/defs.h | 16 | ||||
-rw-r--r-- | engines/cryo/eden.cpp | 20 | ||||
-rw-r--r-- | engines/cryo/eden.h | 2 | ||||
-rw-r--r-- | engines/cryo/staticdata.cpp | 46 |
4 files changed, 42 insertions, 42 deletions
diff --git a/engines/cryo/defs.h b/engines/cryo/defs.h index 1660305c83..19e38fc0a5 100644 --- a/engines/cryo/defs.h +++ b/engines/cryo/defs.h @@ -354,8 +354,8 @@ struct object_t { byte _id; byte _flags; int _locations; // index in kObjectLocations - int16 _itemMask; - int16 _powerMask; // object of power bitmask + uint16 _itemMask; + uint16 _powerMask; // object of power bitmask int16 _count; }; typedef struct object_t object_t; @@ -812,13 +812,13 @@ extern char kPersoRoomBankTable[]; // area transition descriptors extern goto_t gotos[]; -extern int16 kFramesVid170[]; -extern int16 kFramesVid83[]; -extern int16 kFramesVid88[]; -extern int16 kFramesVid89[]; -extern int16 kFramesVid94[]; +extern uint16 kFramesVid170[]; +extern uint16 kFramesVid83[]; +extern uint16 kFramesVid88[]; +extern uint16 kFramesVid89[]; +extern uint16 kFramesVid94[]; extern object_t objects[]; -extern int16 kObjectLocations[100]; +extern uint16 kObjectLocations[100]; extern perso_t kPersons[]; extern cita_t cita_list[]; extern int16 tab_2CB16[]; diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 027600f362..9a3fa46361 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -6329,7 +6329,7 @@ void EdenGame::playHNM(int16 num) { // Original name bullehnm void EdenGame::displayHNMSubtitles() { - int16 *frames; + uint16 *frames; perso_t *perso; switch (_vm->_video->_curVideoNum) { case 170: @@ -6355,13 +6355,13 @@ void EdenGame::displayHNMSubtitles() { default: return; } - int16 *frames_start = frames; - int16 frame; - while ((frame = *frames++) != -1) { + uint16 *frames_start = frames; + uint16 frame; + while ((frame = *frames++) != 0xFFFF) { if ((frame & ~0x8000) == hnm_position) break; } - if (frame == -1) { + if (frame == 0xFFFF) { if (showVideoSubtitle) af_subtitlehnm(); return; @@ -6653,7 +6653,7 @@ void EdenGame::lostobject() { bool EdenGame::objecthere(int16 id) { object_t *object = getobjaddr(id); - for (pCurrentObjectLocation = &kObjectLocations[object->_locations]; *pCurrentObjectLocation != -1; pCurrentObjectLocation++) { + for (pCurrentObjectLocation = &kObjectLocations[object->_locations]; *pCurrentObjectLocation != 0xFFFF; pCurrentObjectLocation++) { if (*pCurrentObjectLocation == p_global->roomNum) return true; } @@ -6704,8 +6704,8 @@ void EdenGame::putobject() { void EdenGame::newobject(int16 id, int16 arg2) { object_t *object = getobjaddr(id); - int16 e, *t = &kObjectLocations[object->_locations]; - while ((e = *t) != -1) { + uint16 e, *t = &kObjectLocations[object->_locations]; + while ((e = *t) != 0xFFFF) { e &= ~0x8000; if ((e >> 8) == arg2) *t = e; @@ -6766,7 +6766,7 @@ void EdenGame::newnidv() { if (objects[Objects::obNest - 1]._count) return; object_t *obj = getobjaddr(Objects::obNest); - for (int16 *ptr = kObjectLocations + obj->_locations; *ptr != -1; ptr++) { + for (uint16 *ptr = kObjectLocations + obj->_locations; *ptr != 0xFFFF; ptr++) { if ((*ptr & ~0x8000) >> 8 != p_global->cita_area_num) continue; *ptr &= ~0x8000; @@ -6789,7 +6789,7 @@ void EdenGame::newnido() { if (objects[Objects::obNest - 1]._count) return; object_t *obj = getobjaddr(Objects::obFullNest); - for (int16 *ptr = kObjectLocations + obj->_locations; *ptr != -1; ptr++) { + for (uint16 *ptr = kObjectLocations + obj->_locations; *ptr != 0xFFFF; ptr++) { if ((*ptr & ~0x8000) >> 8 != p_global->cita_area_num) continue; *ptr &= ~0x8000; diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h index 76065fd5ce..2bca2109f1 100644 --- a/engines/cryo/eden.h +++ b/engines/cryo/eden.h @@ -697,7 +697,7 @@ private: byte *mus_patterns_ptr; //TODO: sndblock_t ? byte *mus_sequence_ptr; bool mus_enabled; - int16 *pCurrentObjectLocation; + uint16 *pCurrentObjectLocation; byte own_objects[128]; bool byte_31D64; diff --git a/engines/cryo/staticdata.cpp b/engines/cryo/staticdata.cpp index cb05556aa2..98550f7e27 100644 --- a/engines/cryo/staticdata.cpp +++ b/engines/cryo/staticdata.cpp @@ -239,7 +239,7 @@ goto_t gotos[] = { #define SUB_LINE(start, end) \ (start), (end) | 0x8000 -int16 kFramesVid170[] = { +uint16 kFramesVid170[] = { SUB_LINE( 68, 120), SUB_LINE( 123, 196), SUB_LINE( 199, 274), @@ -256,41 +256,41 @@ int16 kFramesVid170[] = { SUB_LINE(2254, 2320), SUB_LINE(3038, 3094), SUB_LINE(3096, 3160), - -1 + 0xFFFF }; -int16 kFramesVid83[] = { +uint16 kFramesVid83[] = { SUB_LINE(99, 155), SUB_LINE(157, 256), - -1 + 0xFFFF }; -int16 kFramesVid88[] = { +uint16 kFramesVid88[] = { SUB_LINE(106, 173), SUB_LINE(175, 244), SUB_LINE(246, 350), SUB_LINE(352, 467), - -1 + 0xFFFF }; -int16 kFramesVid89[] = { +uint16 kFramesVid89[] = { SUB_LINE(126, 176), SUB_LINE(178, 267), SUB_LINE(269, 342), SUB_LINE(344, 398), SUB_LINE(400, 458), SUB_LINE(460, 558), - -1 + 0xFFFF }; -int16 kFramesVid94[] = { +uint16 kFramesVid94[] = { SUB_LINE(101, 213), SUB_LINE(215, 353), SUB_LINE(355, 455), SUB_LINE(457, 518), SUB_LINE(520, 660), SUB_LINE(662, 768), - -1 + 0xFFFF }; #undef SUB_LINE @@ -344,19 +344,19 @@ object_t objects[] = { { 42, 0, 3, 0x8000, 0, 0} // Tablet #6 (Castra) }; -int16 kObjectLocations[100] = { - 0x112, -1, - 0x202, -1, - 0x120, -1, - 0x340, 0x44B, 0x548, 0x640, 0x717, 0x830, -1, - 0x340, 0x44B, 0x548, 0x640, 0x717, 0x830, -1, - 0, -1, - 0x344, 0x53A, 0x831, -1, - 0x331, 0x420, 0x54B, 0x637, 0x716, 0x840, -1, - 0x834A, 0x8430, 0x8531, 0x644, 0x745, 0x838, -1, - 0x510, -1, - 0xC04, -1, - -1 +uint16 kObjectLocations[100] = { + 0x112, 0xFFFF, + 0x202, 0xFFFF, + 0x120, 0xFFFF, + 0x340, 0x44B, 0x548, 0x640, 0x717, 0x830, 0xFFFF, + 0x340, 0x44B, 0x548, 0x640, 0x717, 0x830, 0xFFFF, + 0, 0xFFFF, + 0x344, 0x53A, 0x831, 0xFFFF, + 0x331, 0x420, 0x54B, 0x637, 0x716, 0x840, 0xFFFF, + 0x834A, 0x8430, 0x8531, 0x644, 0x745, 0x838, 0xFFFF, + 0x510, 0xFFFF, + 0xC04, 0xFFFF, + 0xFFFF }; perso_t kPersons[] = { |