diff options
author | Travis Howell | 2004-07-28 11:56:14 +0000 |
---|---|---|
committer | Travis Howell | 2004-07-28 11:56:14 +0000 |
commit | a50b6cf776304f2c405679ac1fec8f9cd18fb7b9 (patch) | |
tree | 22e4169673b92d73a11c71cc1c59309d0b89c9d7 | |
parent | d1616e1cb5957179c50103f31bb4c0eaa3a48fa9 (diff) | |
download | scummvm-rg350-a50b6cf776304f2c405679ac1fec8f9cd18fb7b9.tar.gz scummvm-rg350-a50b6cf776304f2c405679ac1fec8f9cd18fb7b9.tar.bz2 scummvm-rg350-a50b6cf776304f2c405679ac1fec8f9cd18fb7b9.zip |
Add patch from madm00se for:
#869003 MIVGA: Guybrush shrinks & grows near end of game
svn-id: r14355
-rw-r--r-- | scumm/actor.cpp | 13 | ||||
-rw-r--r-- | scumm/actor.h | 1 | ||||
-rw-r--r-- | scumm/saveload.cpp | 4 | ||||
-rw-r--r-- | scumm/saveload.h | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index e9f2f529ff..ca70e25444 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -89,7 +89,7 @@ void Actor::initActor(int mode) { talkColor = 15; talkPosX = 0; talkPosY = -80; - scaley = scalex = 0xFF; + boxscale = scaley = scalex = 0xFF; charset = 0; memset(sound, 0, sizeof(sound)); targetFacing = facing; @@ -422,6 +422,8 @@ void Actor::setupActorScale() { if (_vm->_version >= 6 && (_vm->getBoxFlags(walkbox) & kBoxIgnoreScale)) return; + boxscale = _vm->getBoxScale(walkbox); + uint16 scale = _vm->getScale(walkbox, _pos.x, _pos.y); assert(scale <= 0xFF); @@ -1005,8 +1007,12 @@ void Actor::drawActorCostume() { bcr->_actorX += 8; } - bcr->_scaleX = scalex; - bcr->_scaleY = scaley; + if (_vm->_version == 4 && boxscale & 0x8000) { + bcr->_scaleX = bcr->_scaleY = _vm->getScale(walkbox, _pos.x, _pos.y); + } else { + bcr->_scaleX = scalex; + bcr->_scaleY = scaley; + } bcr->_shadow_mode = shadow_mode; if (_vm->_features & GF_SMALL_HEADER) @@ -1798,6 +1804,7 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKLINE(Actor, talkFrequency, sleInt16, VER(16)), MKLINE(Actor, talkPan, sleInt16, VER(24)), MKLINE(Actor, talkVolume, sleInt16, VER(29)), + MKLINE(Actor, boxscale, sleUint16, VER(34)), MKLINE(Actor, scalex, sleByte, VER(8)), MKLINE(Actor, scaley, sleByte, VER(8)), MKLINE(Actor, charset, sleByte, VER(8)), diff --git a/scumm/actor.h b/scumm/actor.h index 6e822e82cb..a4fc5b799c 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -93,6 +93,7 @@ public: int talkFrequency; byte talkPan; byte talkVolume; + uint16 boxscale; byte scalex, scaley; byte charset; byte moving; diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index bb1a992a97..0dc5f72853 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -530,8 +530,8 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { MKLINE(ScummEngine, gdi._transparentColor, sleByte, VER(8)), MKARRAY(ScummEngine, _currentPalette[0], sleByte, 768, VER(8)), - // Should be made obsolete in next save game version. - MKARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8)), + // Sam & Max specific palette replaced by _shadowPalette now. + MK_OBSOLETE_ARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8), VER(34)), MKARRAY(ScummEngine, _charsetBuffer[0], sleByte, 256, VER(8)), diff --git a/scumm/saveload.h b/scumm/saveload.h index f5298251ae..f316666c61 100644 --- a/scumm/saveload.h +++ b/scumm/saveload.h @@ -32,7 +32,7 @@ namespace Scumm { // Can be useful for other ports too :) #define VER(x) x -#define CURRENT_VER 33 +#define CURRENT_VER 34 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types, // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC |