diff options
Diffstat (limited to 'queen')
-rw-r--r-- | queen/graphics.cpp | 4 | ||||
-rw-r--r-- | queen/graphics.h | 4 | ||||
-rw-r--r-- | queen/journal.cpp | 1 | ||||
-rw-r--r-- | queen/logic.cpp | 12 | ||||
-rw-r--r-- | queen/logic.h | 2 |
5 files changed, 14 insertions, 9 deletions
diff --git a/queen/graphics.cpp b/queen/graphics.cpp index b831e7c7c4..834e8d9952 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -200,7 +200,7 @@ void Graphics::setupMouseCursor() { _vm->display()->setMouseCursor(bf->data, bf->width, bf->height); } -void Graphics::drawBob(const BobSlot *bs, BobFrame *bf, int16 x, int16 y) { +void Graphics::drawBob(const BobSlot *bs, const BobFrame *bf, int16 x, int16 y) { debug(9, "Graphics::drawBob(%d, %d, %d)", bs->frameNum, x, y); uint16 w, h; @@ -410,7 +410,7 @@ BobSlot *Graphics::bob(int index) { } void Graphics::setBobText( - BobSlot *pbs, + const BobSlot *pbs, const char *text, int textX, int textY, int color, int flags) { diff --git a/queen/graphics.h b/queen/graphics.h index 88fc2a65c0..967657461b 100644 --- a/queen/graphics.h +++ b/queen/graphics.h @@ -95,7 +95,7 @@ public: void unpackControlBank(); void setupMouseCursor(); - void drawBob(const BobSlot *bs, BobFrame *bf, int16 x, int16 y); + void drawBob(const BobSlot *bs, const BobFrame *bf, int16 x, int16 y); void drawInventoryItem(uint32 frameNum, uint16 x, uint16 y); void pasteBob(uint16 objNum, uint16 image); void shrinkFrame(const BobFrame *bf, uint16 percentage); @@ -105,7 +105,7 @@ public: void clearBobs(); void stopBobs(); BobSlot *bob(int index); - void setBobText(BobSlot *bob, const char *text, int textX, int textY, int color, int flags); + void setBobText(const BobSlot *bob, const char *text, int textX, int textY, int color, int flags); void handleParallax(uint16 roomNum); diff --git a/queen/journal.cpp b/queen/journal.cpp index e2e59e6117..c4400e08b3 100644 --- a/queen/journal.cpp +++ b/queen/journal.cpp @@ -282,6 +282,7 @@ void Journal::handleYesNoMode(int16 zoneNum) { switch (_prevZoneNum) { case ZN_REVIEW_ENTRY: if (_saveDescriptions[currentSlot][0]) { + _vm->graphics()->clearBobs(); _vm->display()->palFadeOut(0, 223, JOURNAL_ROOM); _vm->loadGameState(currentSlot); _vm->display()->clearTexts(0, GAME_SCREEN_HEIGHT - 1); diff --git a/queen/logic.cpp b/queen/logic.cpp index 7c7197ce3e..febabf59e5 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -529,7 +529,7 @@ void Logic::displayRoom(uint16 room, RoomDisplayMode mode, uint16 scale, int com } } -ActorData *Logic::findActor(uint16 noun, const char *name) { +ActorData *Logic::findActor(uint16 noun, const char *name) const { uint16 obj = currentRoomData() + noun; int16 img = objectData(obj)->image; if (img != -3 && img != -4) { @@ -1362,9 +1362,8 @@ void Logic::loadState(uint32 ver, byte *&ptr) { } void Logic::setupRestoredGame() { - if (_vm->bam()->_flag != BamScene::F_STOP) { - _vm->bam()->prepareAnimation(); - } + uint16 flag = _vm->bam()->_flag; + _vm->bam()->_flag = BamScene::F_STOP; _vm->sound()->playSong(_vm->sound()->lastOverride()); @@ -1391,6 +1390,11 @@ void Logic::setupRestoredGame() { _entryObj = 0; inventoryRefresh(); + + if (flag != BamScene::F_STOP) { + _vm->bam()->_flag = flag; + _vm->bam()->prepareAnimation(); + } } void Logic::sceneStart() { diff --git a/queen/logic.h b/queen/logic.h index e857b2647d..4a83d07a2f 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -128,7 +128,7 @@ public: int16 entryObj() const { return _entryObj; } void entryObj(int16 obj) { _entryObj = obj; } - ActorData *findActor(uint16 noun, const char *name = NULL); + ActorData *findActor(uint16 noun, const char *name = NULL) const; bool initPerson(uint16 noun, const char *actorName, bool loadBank, Person *pp); uint16 findPersonNumber(uint16 obj) const; |