diff options
Diffstat (limited to 'engines/teenagent/teenagent.cpp')
-rw-r--r-- | engines/teenagent/teenagent.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index f33bf9b97e..9bc6bc5c54 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -218,6 +218,7 @@ Common::Error TeenAgentEngine::loadGameState(int slot) { uint16 x = res->dseg.get_word(0x64AF), y = res->dseg.get_word(0x64B1); scene->loadObjectData(); scene->init(id, Common::Point(x, y)); + scene->setPalette(4); return Common::kNoError; } @@ -518,7 +519,6 @@ void TeenAgentEngine::displayCutsceneMessage(uint16 addr, uint16 position) { scene->push(event); } - void TeenAgentEngine::moveTo(const Common::Point &dst, byte o, bool warp) { moveTo(dst.x, dst.y, o, warp); } @@ -573,12 +573,16 @@ void TeenAgentEngine::loadScene(byte id, const Common::Point &pos, byte o) { } void TeenAgentEngine::loadScene(byte id, uint16 x, uint16 y, byte o) { + if (scene->last_event_type() != SceneEvent::kCreditsMessage) + fadeOut(); + SceneEvent event(SceneEvent::kLoadScene); event.scene = id; event.dst.x = x; event.dst.y = y; event.orientation = o; scene->push(event); + fadeIn(); } void TeenAgentEngine::setOns(byte id, byte value, byte scene_id) { @@ -676,6 +680,18 @@ void TeenAgentEngine::shakeScreen() { scene->push(event); } +void TeenAgentEngine::fadeIn() { + SceneEvent event(SceneEvent::kFade); + event.orientation = 0; + scene->push(event); +} + +void TeenAgentEngine::fadeOut() { + SceneEvent event(SceneEvent::kFade); + event.orientation = 1; + scene->push(event); +} + void TeenAgentEngine::playSoundNow(byte id) { Resources *res = Resources::instance(); Common::SeekableReadStream *in = res->sam_sam.getStream(id); |