diff options
-rw-r--r-- | engines/dreamweb/dreambase.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/object.cpp | 3 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 11 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 31 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 17 |
5 files changed, 5 insertions, 58 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 750cffdeac..0123943c35 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -537,6 +537,7 @@ public: void dropError(); void cantDrop(); void entryAnims(); + bool finishedWalking(); // from use.cpp void placeFreeObject(uint8 index); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1245187a92..ac5f3132b6 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -231,8 +231,7 @@ void DreamGenContext::inventory() { if (data.byte(kCommandtype) != 239) { data.byte(kCommandtype) = 239; - al = 32; - commandOnly(); + commandOnly(32); } if (data.word(kMousebutton) == data.word(kOldbutton)) diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index e2e27bc417..c9ea699988 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -536,17 +536,6 @@ void DreamBase::moveMap(uint8 param) { data.byte(kNowinnewroom) = 1; } -void DreamGenContext::checkOne() { - uint8 flag, flagEx, type, flagX, flagY; - checkOne(cl, ch, &flag, &flagEx, &type, &flagX, &flagY); - - cl = flag; - ch = flagEx; - dl = flagX; - dh = flagY; - al = type; -} - void DreamBase::checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) { *flagX = x / 16; *flagY = y / 16; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 0f5b6541d7..2120668ef6 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1138,10 +1138,6 @@ void DreamBase::delTextLine() { multiPut(_textUnder, data.byte(kTextaddressx), data.word(kTextaddressy), kUnderTextSizeX, kUnderTextSizeY); } -void DreamGenContext::commandOnly() { - commandOnly(al); -} - void DreamBase::commandOnly(uint8 command) { delTextLine(); uint16 index = command * 2; @@ -1152,10 +1148,6 @@ void DreamBase::commandOnly(uint8 command) { data.byte(kNewtextline) = 1; } -void DreamGenContext::checkIfPerson() { - flags._z = !checkIfPerson(al, ah); -} - bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) { Common::List<People>::iterator i; for (i = _peopleList.begin(); i != _peopleList.end(); ++i) { @@ -1183,10 +1175,6 @@ bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) { return false; } -void DreamGenContext::checkIfFree() { - flags._z = !checkIfFree(al, ah); -} - bool DreamGenContext::checkIfFree(uint8 x, uint8 y) { Common::List<ObjPos>::const_iterator i; for (i = _freeList.reverse_begin(); i != _freeList.end(); --i) { @@ -1200,10 +1188,6 @@ bool DreamGenContext::checkIfFree(uint8 x, uint8 y) { return false; } -void DreamGenContext::checkIfEx() { - flags._z = !checkIfEx(al, ah); -} - bool DreamGenContext::checkIfEx(uint8 x, uint8 y) { Common::List<ObjPos>::const_iterator i; for (i = _exList.reverse_begin(); i != _exList.end(); --i) { @@ -1411,11 +1395,7 @@ void DreamBase::removeSetObject(uint8 index) { getSetAd(index)->mapad[0] = 0xff; } -void DreamGenContext::finishedWalking() { - flags._z = finishedWalkingCPP(); -} - -bool DreamGenContext::finishedWalkingCPP() { +bool DreamBase::finishedWalking() { return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface)); } @@ -1426,7 +1406,7 @@ void DreamBase::getFlagUnderP(uint8 *flag, uint8 *flagEx) { } void DreamGenContext::walkAndExamine() { - if (!finishedWalkingCPP()) + if (!finishedWalking()) return; data.byte(kCommandtype) = data.byte(kWalkexamtype); data.byte(kCommand) = data.byte(kWalkexamnum); @@ -1449,7 +1429,7 @@ void DreamGenContext::obName(uint8 command, uint8 commandType) { setWalk(); data.byte(kReasseschanges) = 1; return; - } else if (! finishedWalkingCPP()) + } else if (!finishedWalking()) return; else if (data.byte(kCommandtype) == 5) { if (data.word(kWatchingtime) == 0) @@ -1690,11 +1670,6 @@ bool DreamBase::objectMatches(void *object, const char *id) { return true; } -void DreamGenContext::compare() { - char id[4] = { cl, ch, dl, dh }; - flags._z = compare(al, ah, id); -} - bool DreamBase::compare(uint8 index, uint8 flag, const char id[4]) { return objectMatches(getAnyAdDir(index, flag), id); } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index b24185b82d..c0c8aede5b 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -58,15 +58,8 @@ DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag); } void width160(); - void commandOnly(); - void commandOnly(uint8 command) { - DreamBase::commandOnly(command); - } - void checkIfPerson(); bool checkIfPerson(uint8 x, uint8 y); - void checkIfFree(); bool checkIfFree(uint8 x, uint8 y); - void checkIfEx(); bool checkIfEx(uint8 x, uint8 y); void commandWithOb(); void commandWithOb(uint8 command, uint8 type, uint8 index) { @@ -84,20 +77,10 @@ SetObject *getSetAd(uint8 index) { return DreamBase::getSetAd(index); } - bool finishedWalkingCPP(); - void finishedWalking(); - void checkOne(); - void checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) { - DreamBase::checkOne(x, y, flag, flagEx, type, flagX, flagY); - } void walkAndExamine(); void obName(uint8 command, uint8 commandType); void getExPos(); - void compare(); - bool compare(uint8 index, uint8 flag, const char id[4]) { - return DreamBase::compare(index, flag, id); - } bool checkIfSet(uint8 x, uint8 y); void isItWorn(); bool isItWorn(const DynObject *object) { |