diff options
author | Max Horn | 2002-07-26 16:13:04 +0000 |
---|---|---|
committer | Max Horn | 2002-07-26 16:13:04 +0000 |
commit | b167b06ebae80319cdab0da13780a6c5238949e6 (patch) | |
tree | 2024b8c72d25b20204f191cabbf113ddfb40bb0b | |
parent | 034b2cfb10d4bd12a50dea2be11585f965362a60 (diff) | |
download | scummvm-rg350-b167b06ebae80319cdab0da13780a6c5238949e6.tar.gz scummvm-rg350-b167b06ebae80319cdab0da13780a6c5238949e6.tar.bz2 scummvm-rg350-b167b06ebae80319cdab0da13780a6c5238949e6.zip |
fixed an ignoreboxes bug in MI1VGA
svn-id: r4638
-rw-r--r-- | actor.cpp | 19 | ||||
-rw-r--r-- | actor.h | 2 | ||||
-rw-r--r-- | object.cpp | 4 |
3 files changed, 25 insertions, 0 deletions
@@ -1392,6 +1392,25 @@ void Scumm::resetActorBgs() } } +void Actor::classChanged(int cls, bool value) +{ + switch(cls) { + case 20: // Never clip + break; + case 21: // Always clip + break; + case 22: // Ignore boxes + ignoreBoxes = value; + break; + case 29: // Y flip + break; + case 30: // X flip + break; + case 31: // ?? + break; + } +} + bool Actor::isInClass(int cls) { return _vm->getClass(number, cls); @@ -169,6 +169,8 @@ public: void setAnimVar(byte var, int value) { animVariable[var] = value; } + + void classChanged(int cls, bool value); protected: bool isInClass(int cls); diff --git a/object.cpp b/object.cpp index f27cf9be78..b0aa12687c 100644 --- a/object.cpp +++ b/object.cpp @@ -61,6 +61,10 @@ void Scumm::putClass(int obj, int cls, bool set) _classData[obj] |= (1 << (cls - 1)); else _classData[obj] &= ~(1 << (cls - 1)); + + if (1 <= obj && obj < NUM_ACTORS) { + _actors[obj].classChanged(cls, set); + } } int Scumm::getOwner(int obj) |