diff options
author | Gregory Montoir | 2003-12-03 20:53:59 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-12-03 20:53:59 +0000 |
commit | b6c01b8c739575f80a45b843bf9292326c52e502 (patch) | |
tree | d3823bb622234c687421c9ae0431c10dd22dd111 | |
parent | 77770ea7fe2f94527060d264d4950e5d05e1247f (diff) | |
download | scummvm-rg350-b6c01b8c739575f80a45b843bf9292326c52e502.tar.gz scummvm-rg350-b6c01b8c739575f80a45b843bf9292326c52e502.tar.bz2 scummvm-rg350-b6c01b8c739575f80a45b843bf9292326c52e502.zip |
- hard coded cutaway stuff for boat room
- hard coded cutaway and talk oracle stuff
- scale Joe during cutaway when changing rooms
- special moves 20 & 24 (temple room 100)
- special move 15 (valley room 67)
- special move 26 (c69g.CUT)
- (game is now completable up to final fight scene)
svn-id: r11491
-rw-r--r-- | queen/cutaway.cpp | 92 | ||||
-rw-r--r-- | queen/logic.cpp | 4 | ||||
-rw-r--r-- | queen/logic.h | 1 | ||||
-rw-r--r-- | queen/talk.cpp | 19 |
4 files changed, 92 insertions, 24 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index df2a6c1b98..f58f291b16 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -399,16 +399,39 @@ void Cutaway::actionSpecialMove(int index) { } break; - // cdint.cut - put camera on Joe + // Dinocam + case 15: + _graphics->cameraBob(-1); + while (_logic->display()->horizontalScroll() < 320) { + _logic->display()->horizontalScroll(_logic->display()->horizontalScroll() + 16); + if (_logic->display()->horizontalScroll() > 320) { + _logic->display()->horizontalScroll(320); + } + _logic->update(); + } + _graphics->cameraBob(1); + break; + + // cdint.cut / room 67 - put camera on Joe case 16: _graphics->cameraBob(0); break; - case 19: _logic->gameState(VAR_AZURA_IN_LOVE, 1); break; + // Pan right from Joe + case 20: + _graphics->cameraBob(-1); + while (_logic->display()->horizontalScroll() < 320) { + _logic->display()->horizontalScroll(_logic->display()->horizontalScroll() + 16); + if (_logic->display()->horizontalScroll() > 320) { + _logic->display()->horizontalScroll(320); + } + _logic->update(); + } + break; case 21: _logic->display()->palCustomLightsOff(_logic->currentRoom()); @@ -423,6 +446,48 @@ void Cutaway::actionSpecialMove(int index) { _logic->area(ROOM_FLODA_FRONTDESK, 7)->mapNeighbours = ABS(_logic->area(ROOM_FLODA_FRONTDESK, 7)->mapNeighbours); break; + case 24: { + int i = _graphics->bob(0)->x - 160; + if (i < 0) { + i = 0; + } + else if (i > 320) { + i = 320; + } + _graphics->cameraBob(-1); + if (i < _logic->display()->horizontalScroll()) { + while (_logic->display()->horizontalScroll() > i) { + _logic->display()->horizontalScroll(_logic->display()->horizontalScroll() - 16); + if (_logic->display()->horizontalScroll() < i) { + _logic->display()->horizontalScroll(i); + } + _logic->update(); + } + } + else { + while (_logic->display()->horizontalScroll() < i) { + _logic->display()->horizontalScroll(_logic->display()->horizontalScroll() + 16); + if (_logic->display()->horizontalScroll() > i ) { + _logic->display()->horizontalScroll(i); + } + } + _logic->update(); + } + _graphics->cameraBob(0); + } + break; + + // c69g.CUT - Pan left 320 to 144 + case 26: + _graphics->cameraBob(-1); + while (_logic->display()->horizontalScroll() > 144) { + _logic->display()->horizontalScroll(_logic->display()->horizontalScroll() - 8); + if (_logic->display()->horizontalScroll() < 144) { + _logic->display()->horizontalScroll(144); + } + _logic->update(); + } + break; // c75b.cut - Lightning hits plane case 28: @@ -843,7 +908,7 @@ void Cutaway::changeRooms(CutawayObject &object) { mode = RDM_FADE_JOE_XY; } - _logic->roomDisplay(_logic->currentRoom(), mode, 0, _comPanel, true); + _logic->roomDisplay(_logic->currentRoom(), mode, object.scale, _comPanel, true); _currentImage = _logic->numFrames(); @@ -1060,9 +1125,10 @@ byte *Cutaway::handleAnimation(byte *ptr, CutawayObject &object) { debug(0, "----- Complex cutaway animation (animType = %i) -----", object.animType); - if (/*(P_BNUM==1) &&*/ (_logic->currentRoom() == 47 || _logic->currentRoom() == 63)) { - // The oracle - warning("The oracle is not yet handled"); + if ((_logic->currentRoom() == 47 || _logic->currentRoom() == 63) && + objAnim[0].object == 1) { + //CR 2 - 3/3/95, Special harcoded section to make Oracle work... + makeComplexAnimation(_logic->personFrames(1) - 1, objAnim, frameCount); } else { _currentImage = makeComplexAnimation(_currentImage, objAnim, frameCount); @@ -1082,16 +1148,16 @@ byte *Cutaway::handleAnimation(byte *ptr, CutawayObject &object) { BobSlot *bob = _graphics->bob(objAnim[i].object); bob->frameNum = objAnim[i].originalFrame; bob->move(objAnim[i].mx, objAnim[i].my, (object.specialMove > 0) ? object.specialMove : 4); + // Boat room hard coded + if (_logic->currentRoom() == ROOM_TEMPLE_OUTSIDE) { + BobSlot *bobJoe = _graphics->bob(0); + if (bobJoe->x < 320) { + bobJoe->move(bobJoe->x + 346, bobJoe->y, 4); + } + } } } - // Boat room hard coded - if (_logic->currentRoom() == ROOM_TEMPLE_OUTSIDE) { - BobSlot *bob = _graphics->bob(0); - if (bob->x < 320) - bob->move(bob->x + 346, bob->y, 4); - } - // Normal cutaway if (object.animType != 1) { diff --git a/queen/logic.cpp b/queen/logic.cpp index 541e6b75ac..ffca3566a1 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1225,7 +1225,7 @@ void Logic::roomSetup(const char *room, int comPanel, bool inCutaway) { void Logic::roomDisplay(uint16 room, RoomDisplayMode mode, uint16 scale, int comPanel, bool inCutaway) { - debug(9, "Logic::roomDisplay(%d, %d, %d, %d, %d)", room, mode, scale, comPanel, inCutaway); + debug(0, "Logic::roomDisplay(%d, %d, %d, %d, %d)", room, mode, scale, comPanel, inCutaway); roomErase(); @@ -1646,7 +1646,7 @@ ObjectData *Logic::joeSetupInRoom(bool autoPosition, uint16 scale) { } } - debug(0, "Logic::joeSetupInRoom() - oldx=%d, oldy=%d", oldx, oldy); + debug(0, "Logic::joeSetupInRoom() - oldx=%d, oldy=%d scale=%d", oldx, oldy, scale); if (scale > 0 && scale < 100) { _joe.scale = scale; diff --git a/queen/logic.h b/queen/logic.h index af9519e24c..eb74a80f4b 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -232,6 +232,7 @@ public: void animErase(uint16 bobNum); void animReset(uint16 bobNum); void animSetup(const GraphicData *gd, uint16 firstImage, uint16 bobNum, bool visible); // FIND_GRAPHIC_ANIMS + uint16 personFrames(uint16 bobNum) const { return _personFrames[bobNum]; } void joeSetupFromBanks(const char *animBank, const char *standBank); diff --git a/queen/talk.cpp b/queen/talk.cpp index a641f193ba..53f9430c54 100644 --- a/queen/talk.cpp +++ b/queen/talk.cpp @@ -961,14 +961,12 @@ void Talk::speakSegment( // It's the oracle! // Dont turn AMAL animation off, and dont manually anim person command = SPEAK_ORACLE; - - warning("Oracle not yet handled!"); oracle = true; - // XXX k=PERSON_FRAMES[BNUM]; - // XXX for(i=5;i<=8;i++) { - // XXX unpack(i,k,BANK); - // XXX k=k+1; - // XXX } + uint16 frameNum = _logic->personFrames(bobNum); + for (i = 5; i <= 8; ++i) { + _graphics->bankUnpack(i, frameNum, bankNum); + ++frameNum; + } } else { bob->animating = false; @@ -1092,8 +1090,11 @@ void Talk::speakSegment( _graphics->textClear(0,198); if (oracle) { - // lines 1831-1339 in talk.c - warning("Oracle not yet handled!"); + uint16 frameNum = _logic->personFrames(bobNum); + for (i = 1; i <= 4; ++i) { + _graphics->bankUnpack(i, frameNum, bankNum); + ++frameNum; + } } // Ensure that the correct buffer frame is selected |