diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 864bba1d8c0a..3b67bfbd7230 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -243,7 +243,7 @@ void DreamGenContext::aboutturn(Sprite *sprite) { data.byte(kFacing) = (data.byte(kFacing) + 1) & 7; sprite->b29 = 0; } else { - data.byte(kTurndirection) = -1; + data.byte(kTurndirection) = (uint8)-1; data.byte(kFacing) = (data.byte(kFacing) - 1) & 7; sprite->b29 = 0; } @@ -295,17 +295,17 @@ void DreamGenContext::random(Sprite *sprite, SetObject *objData) { } void DreamGenContext::doorway(Sprite *sprite, SetObject *objData) { - data.byte(kDoorcheck1) = -24; + data.byte(kDoorcheck1) = (uint8)-24; data.byte(kDoorcheck2) = 10; - data.byte(kDoorcheck3) = -30; + data.byte(kDoorcheck3) = (uint8)-30; data.byte(kDoorcheck4) = 10; dodoor(sprite, objData); } void DreamGenContext::widedoor(Sprite *sprite, SetObject *objData) { - data.byte(kDoorcheck1) = -24; + data.byte(kDoorcheck1) = (uint8)-24; data.byte(kDoorcheck2) = 24; - data.byte(kDoorcheck3) = -30; + data.byte(kDoorcheck3) = (uint8)-30; data.byte(kDoorcheck4) = 24; dodoor(sprite, objData); } @@ -782,7 +782,7 @@ void DreamGenContext::madman() { ax = pop(); bx = pop(); es = pop(); - data.byte(kCombatcount) = -1; + data.byte(kCombatcount) = (uint8)-1; data.byte(kSpeechcount) = 0; } ++ax; @@ -811,7 +811,7 @@ void DreamGenContext::madman() { else { if (data.byte(kLastweapon) == 8) { data.byte(kCombatcount) = isCD() ? 72 : 70; - data.byte(kLastweapon) = -1; + data.byte(kLastweapon) = (uint8)-1; data.byte(kMadmanflag) = 1; ax = 67; } diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index e3295b3cfe93..bfa22f431c9d 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -127,7 +127,7 @@ void DreamGenContext::dreamweb() { data.byte(kLastflag) = 32; startup1(); data.byte(kVolumeto) = 0; - data.byte(kVolumedirection) = -1; + data.byte(kVolumedirection) = (uint8)-1; data.byte(kCommandtype) = 255; } @@ -769,7 +769,7 @@ void DreamGenContext::startloading(const Room *room) { data.byte(kCounttoopen) = room->countToOpen; data.byte(kLiftpath) = room->liftPath; data.byte(kDoorpath) = room->doorPath; - data.byte(kLastweapon) = -1; + data.byte(kLastweapon) = (uint8)-1; al = room->b27; push(ax); al = room->b31; @@ -867,7 +867,7 @@ void DreamGenContext::startloading(const Room *room) { autoappear(); al = data.byte(kNewlocation); getroomdata(); - data.byte(kLastweapon) = -1; + data.byte(kLastweapon) = (uint8)-1; data.byte(kMandead) = 0; data.word(kLookcounter) = 160; data.byte(kNewlocation) = 255; @@ -973,7 +973,7 @@ void DreamGenContext::commandonly(uint8 command) { } void DreamGenContext::checkifperson() { - flags._z = not checkifperson(al, ah); + flags._z = !checkifperson(al, ah); } bool DreamGenContext::checkifperson(uint8 x, uint8 y) { @@ -1007,7 +1007,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) { } void DreamGenContext::checkiffree() { - flags._z = not checkiffree(al, ah); + flags._z = !checkiffree(al, ah); } bool DreamGenContext::checkiffree(uint8 x, uint8 y) { @@ -1031,7 +1031,7 @@ bool DreamGenContext::checkiffree(uint8 x, uint8 y) { } void DreamGenContext::checkifex() { - flags._z = not checkifex(al, ah); + flags._z = !checkifex(al, ah); } bool DreamGenContext::checkifex(uint8 x, uint8 y) { @@ -1807,7 +1807,8 @@ void DreamGenContext::hangonp(uint16 count) { showpointer(); vsync(); dumppointer(); - for (size_t i = 0; i < count * 3; ++i) { + uint32 counter = count; // silence a signed/unsigned MSVC warning below + for (uint32 i = 0; i < counter * 3; ++i) { delpointer(); readmouse(); animpointer();