diff options
author | Gregory Montoir | 2004-01-08 10:25:18 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-01-08 10:25:18 +0000 |
commit | 74829245d9f05fe51414e26c13c8b18db89b9e2a (patch) | |
tree | 5bd3475dfd3f07bddfa7f58923159bbb8786924c /queen/cutaway.cpp | |
parent | 8c2da44b971a6adda806fac050cf5c8cd48f4690 (diff) | |
download | scummvm-rg350-74829245d9f05fe51414e26c13c8b18db89b9e2a.tar.gz scummvm-rg350-74829245d9f05fe51414e26c13c8b18db89b9e2a.tar.bz2 scummvm-rg350-74829245d9f05fe51414e26c13c8b18db89b9e2a.zip |
mostly cleanup :
- moved main update() method to QueenEngine
- merged update() & checkPlayer()
- added a method in Logic class to handle the CUTAWAY_SPECIAL stuff
- Journal remembers last seen page
- no need to call loadPanel() to restore panel palette, use palSetPanel() instead
svn-id: r12240
Diffstat (limited to 'queen/cutaway.cpp')
-rw-r--r-- | queen/cutaway.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 1138a7bed6..939baa2130 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -696,7 +696,7 @@ byte *Cutaway::handleAnimation(byte *ptr, CutawayObject &object) { if (object.animType == 2 || object.animType == 0) { // Unpack animation, but do not unpack moving people - if (!((objAnim[i].mx > 0 || objAnim[i].my > 0) && InRange(objAnim[i].object, 1, 3))) { + if (!((objAnim[i].mx > 0 || objAnim[i].my > 0) && inRange(objAnim[i].object, 1, 3))) { /*debug(6, "Animation - bankUnpack(%i, %i, %i);", objAnim[i].unpackFrame, objAnim[i].originalFrame, @@ -730,7 +730,7 @@ byte *Cutaway::handleAnimation(byte *ptr, CutawayObject &object) { int j; for (j = 0; j < objAnim[i].speed; j++) - _vm->logic()->update(); + _vm->update(); } if (_vm->input()->cutawayQuit()) @@ -753,7 +753,7 @@ byte *Cutaway::handleAnimation(byte *ptr, CutawayObject &object) { while (moving) { moving = false; - _vm->logic()->update(); + _vm->update(); for (i = 0; i < frameCount; i++) { BobSlot *bob = _vm->graphics()->bob(objAnim[i].object); @@ -951,7 +951,7 @@ void Cutaway::run(char *nextFilename) { break; if (_roomFade) { - _vm->logic()->update(); + _vm->update(); int end = 223; if (IS_CD_INTRO_ROOM(_vm->logic()->currentRoom())) { end = 255; @@ -1028,18 +1028,7 @@ void Cutaway::run(char *nextFilename) { } } - // function CUTAWAY_SPECIAL(), lines 885-896 in cutaway.c - if (_vm->logic()->currentRoom() == 1 && _vm->logic()->gameState(3) == 0) { - // XXX hard-coded room and inventory items - _vm->logic()->inventoryDeleteItem(ITEM_CROWBAR, false); - _vm->logic()->inventoryDeleteItem(ITEM_DRESS, false); - _vm->logic()->inventoryDeleteItem(ITEM_CLOTHES, false); - _vm->logic()->inventoryDeleteItem(ITEM_HAY, false); - _vm->logic()->inventoryDeleteItem(ITEM_OIL, false); - _vm->logic()->inventoryDeleteItem(ITEM_CHICKEN, false); - _vm->logic()->gameState(3, 1); - _vm->logic()->inventoryRefresh(); - } + _vm->logic()->removeHotelItemsFromInventory(); } joeBob->animating = 0; @@ -1147,7 +1136,7 @@ void Cutaway::stop() { if (x || y) { pbs->x = x; pbs->y = y; - if (InRange(object->image, -4, -3)) + if (inRange(object->image, -4, -3)) pbs->scale = _vm->logic()->findScale(x, y); } @@ -1373,7 +1362,7 @@ void Cutaway::handleText( int i; for (i = 0; i < spaces; i++) { - _vm->logic()->update(); + _vm->update(); if (OBJECT_TYPE_TEXT_SPEAK == type || OBJECT_TYPE_TEXT_DISPLAY_AND_SPEAK == type) { // XXX: see if speaking is finished @@ -1389,7 +1378,7 @@ void Cutaway::handleText( } _vm->graphics()->textClear(0,198); - _vm->logic()->update(); + _vm->update(); } int Cutaway::countSpaces(ObjectType type, const char *segment) { @@ -1404,7 +1393,7 @@ int Cutaway::countSpaces(ObjectType type, const char *segment) { if (OBJECT_TYPE_TEXT_DISPLAY == type) tmp *= 3; - return (tmp * 2) / (_vm->logic()->talkSpeed() / 3); + return (tmp * 2) / (_vm->talkSpeed() / 3); } |