diff options
author | Travis Howell | 2004-10-04 06:20:10 +0000 |
---|---|---|
committer | Travis Howell | 2004-10-04 06:20:10 +0000 |
commit | 49a36911322a6feb147912f7c7cb60e9186ab757 (patch) | |
tree | 50514339997ae4a86660f12d0e8c6a011951bc2a | |
parent | db6348300199c605a0a183157e4174da8e8e3edb (diff) | |
download | scummvm-rg350-49a36911322a6feb147912f7c7cb60e9186ab757.tar.gz scummvm-rg350-49a36911322a6feb147912f7c7cb60e9186ab757.tar.bz2 scummvm-rg350-49a36911322a6feb147912f7c7cb60e9186ab757.zip |
Add actor transparency var for HE99 games.
svn-id: r15405
-rw-r--r-- | scumm/actor.cpp | 2 | ||||
-rw-r--r-- | scumm/actor.h | 1 | ||||
-rw-r--r-- | scumm/akos.cpp | 7 | ||||
-rw-r--r-- | scumm/base-costume.h | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 5 |
5 files changed, 15 insertions, 2 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 3d9b19ce92..75d830c5c8 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -139,6 +139,7 @@ void Actor::initActor(int mode) { _clipOverride = _vm->_actorClipOverride; auxBlock.visible = false; + transparency = 0; _vm->_classData[number] = (_vm->_version >= 7) ? _vm->_classData[0] : 0; } @@ -1075,6 +1076,7 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_draw_bottom = 0; bcr->_skipLimb = (skipLimb != 0); + bcr->_transparency = transparency; if (_vm->_heversion >= 80 && talkUnk == 0) { condMask &= 0xFFFFFC00; diff --git a/scumm/actor.h b/scumm/actor.h index acb8110e68..f79aaaca9f 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -134,6 +134,7 @@ public: CostumeData cost; uint32 condMask; bool talkUnk; + byte transparency; AuxBlock auxBlock; struct { diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 3253e426c3..f6ff91584f 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -300,10 +300,15 @@ void AkosRenderer::setPalette(byte *new_palette) { palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i]; } + if (_transparency) + palette[0] = _transparency; + if (_vm->_heversion == 70 && size) { for (i = 0; i < size; i++) palette[i] = _vm->_HEV7ActorPalette[palette[i]]; - } else if (size == 256) { + } + + if (size == 256) { byte color = new_palette[0]; if (color == 255) { palette[0] = color; diff --git a/scumm/base-costume.h b/scumm/base-costume.h index fd477f42a8..c32dab3c3f 100644 --- a/scumm/base-costume.h +++ b/scumm/base-costume.h @@ -62,6 +62,7 @@ public: byte _scaleX, _scaleY; int _draw_top, _draw_bottom; + byte _transparency; bool _skipLimb; bool _actorDrawVirScr; @@ -117,6 +118,7 @@ public: _mirror = false; _width = _height = 0; _skipLimb = 0; + _transparency = 0; _clipOverride.right = 0; _clipOverride.left = 0; diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 2c75c41465..c8d66d2758 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1184,9 +1184,12 @@ void ScummEngine_v72he::o72_actorOps() { a->talkPosY = pop(); a->talkPosX = pop(); break; - case 156: // HE 7.2 + case 156: // HE 72+ a->charset = pop(); break; + case 175: // HE 99+ + a->transparency = pop(); + break; case 198: // SO_ACTOR_VARIABLE i = pop(); a->setAnimVar(pop(), i); |