diff options
author | Travis Howell | 2006-01-16 09:20:27 +0000 |
---|---|---|
committer | Travis Howell | 2006-01-16 09:20:27 +0000 |
commit | 631797d7e004bf1bdddd6c129694307b6a19e4f5 (patch) | |
tree | 989b35bdb6daae2e0993d57ff751a2c4d850f8ae | |
parent | fab5160c5fb68636fde396614a8c8d902d372789 (diff) | |
download | scummvm-rg350-631797d7e004bf1bdddd6c129694307b6a19e4f5.tar.gz scummvm-rg350-631797d7e004bf1bdddd6c129694307b6a19e4f5.tar.bz2 scummvm-rg350-631797d7e004bf1bdddd6c129694307b6a19e4f5.zip |
Match sizes of original versions, to avoid possible overflows.
svn-id: r20052
-rw-r--r-- | scumm/script_v100he.cpp | 4 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 4 | ||||
-rw-r--r-- | scumm/scumm-md5.h | 2 | ||||
-rw-r--r-- | scumm/sprite_he.cpp | 6 | ||||
-rw-r--r-- | scumm/wiz_he.cpp | 10 | ||||
-rw-r--r-- | scumm/wiz_he.h | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 5c521da9f5..01d844546c 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1681,7 +1681,7 @@ void ScummEngine_v100he::o100_startSound() { debug(0,"o100_startSound: case 83 (snd %d, var %d, value %d)", _heSndSoundId, var, value); break; case 92: - debug(0, "o100_startSound (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); + debug(0, "o100_startSound: case 92 (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); _sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); break; case 128: @@ -2441,7 +2441,7 @@ void ScummEngine_v100he::o100_getWizData() { byte filename[4096]; int resId, state, type; int32 w, h; - int16 x, y; + int32 x, y; byte subOp = fetchScriptByte(); subOp -= 20; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index f79b768154..c68258aa99 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2260,7 +2260,7 @@ void ScummEngine_v6::o6_soundKludge() { void ScummEngine_v6::o6_isAnyOf() { int list[100]; int num; - int16 val; + int32 val; num = getStackList(list, ARRAYSIZE(list)); val = pop(); diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 691e2dd01c..c213e937bb 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -1682,7 +1682,7 @@ void ScummEngine_v90he::o90_getWizData() { byte filename[4096]; int state, resId; int32 w, h; - int16 x, y; + int32 x, y; byte subOp = fetchScriptByte(); subOp -= 30; @@ -2621,7 +2621,7 @@ void ScummEngine_v90he::o90_kernelSetFunctions() { _wiz->_rectOverrideEnabled = false; break; case 714: - debug(0, "o90_kernelSetFunctions: case 714: type %d resId %d unk1 %d", args[1], args[2], args[3]); + debug(5, "o90_kernelSetFunctions: case 714: type %d resId %d unk1 %d", args[1], args[2], args[3]); break; case 1492: // Remote start script function diff --git a/scumm/scumm-md5.h b/scumm/scumm-md5.h index e3493af6b2..cd8ae1db51 100644 --- a/scumm/scumm-md5.h +++ b/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun Jan 15 23:01:43 2006 + This file was generated by the md5table tool on Mon Jan 16 00:58:35 2006 DO NOT EDIT MANUALLY! */ diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index f14083185e..c06dc16faf 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -43,7 +43,7 @@ void ScummEngine_v90he::allocateArrays() { void Sprite::getSpriteBounds(int spriteId, bool checkGroup, Common::Rect &bound) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); - int16 spr_wiz_x, spr_wiz_y; + int32 spr_wiz_x, spr_wiz_y; int angle, scale, x1, y1; int32 w, h; @@ -157,7 +157,7 @@ int Sprite::findSpriteWithClassOf(int x_pos, int y_pos, int spriteGroupId, int t image = spi->curImage; if (spi->maskImage) { - int16 x1, x2, y1, y2; + int32 x1, x2, y1, y2; imageState = spi->curImageState % _vm->_wiz->getWizImageStates(spi->maskImage); @@ -1233,7 +1233,7 @@ void Sprite::sortActiveSprites() { void Sprite::processImages(bool arg) { int spr_flags; - int16 spr_wiz_x, spr_wiz_y; + int32 spr_wiz_x, spr_wiz_y; int image, imageState; Common::Rect *bboxPtr; int angle, scale; diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index 408e9544c4..f2b4916338 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -1355,13 +1355,13 @@ void Wiz::flushWizBuffer() { _imagesNum = 0; } -void Wiz::loadImgSpot(int resId, int state, int16 &x, int16 &y) { +void Wiz::loadImgSpot(int resId, int state, int32 &x, int32 &y) { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resId); assert(dataPtr); uint8 *spotPtr = _vm->findWrappedBlock(MKID('SPOT'), dataPtr, state, 0); if (spotPtr) { - x = (int16)READ_LE_UINT32(spotPtr + 0); - y = (int16)READ_LE_UINT32(spotPtr + 4); + x = READ_LE_UINT32(spotPtr + 0); + y = READ_LE_UINT32(spotPtr + 4); } else { x = 0; y = 0; @@ -1369,7 +1369,7 @@ void Wiz::loadImgSpot(int resId, int state, int16 &x, int16 &y) { } void Wiz::loadWizCursor(int resId) { - int16 x, y; + int32 x, y; loadImgSpot(resId, 0, x, y); if (x < 0) { x = 0; @@ -1733,7 +1733,7 @@ void Wiz::processWizImage(const WizParameters *params) { char buf[512]; unsigned int i; - debug(0, "processWizImage: processMode %d", params->processMode); + debug(5, "processWizImage: processMode %d", params->processMode); switch (params->processMode) { case 0: // Used in racedemo diff --git a/scumm/wiz_he.h b/scumm/wiz_he.h index 59b216e666..465ef33fb8 100644 --- a/scumm/wiz_he.h +++ b/scumm/wiz_he.h @@ -175,7 +175,7 @@ public: void flushWizBuffer(); - void loadImgSpot(int resId, int state, int16 &x, int16 &y); + void loadImgSpot(int resId, int state, int32 &x, int32 &y); void loadWizCursor(int resId); void displayWizComplexImage(const WizParameters *params); |