diff options
-rw-r--r-- | engines/teenagent/scene.cpp | 14 | ||||
-rw-r--r-- | engines/teenagent/surface.cpp | 4 | ||||
-rw-r--r-- | engines/teenagent/surface.h | 2 | ||||
-rw-r--r-- | engines/teenagent/teenagent.cpp | 2 |
4 files changed, 18 insertions, 4 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 31f5b57605..3a76ea9da8 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -430,7 +430,19 @@ void Scene::init(int id, const Common::Point &pos) { setPalette(_system, palette, 4); Common::SeekableReadStream *stream = res->on.getStream(id); - on.load(stream, Surface::kTypeOn); + int sub_hack = 0; + if (id == 7) { //something patched in the captains room + switch(res->dseg.get_byte(0xdbe6)) { + case 2: + break; + case 1: + sub_hack = 1; + break; + default: + sub_hack = 2; + } + } + on.load(stream, Surface::kTypeOn, sub_hack); delete stream; loadOns(); diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp index 7896d040f3..37bf8fb344 100644 --- a/engines/teenagent/surface.cpp +++ b/engines/teenagent/surface.cpp @@ -33,7 +33,7 @@ Surface::Surface() : x(0), y(0) { memset(flags, 0, sizeof(flags)); } -void Surface::load(Common::SeekableReadStream *stream, Type type) { +void Surface::load(Common::SeekableReadStream *stream, Type type, int sub_hack) { //debug(0, "load()"); free(); @@ -47,6 +47,8 @@ void Surface::load(Common::SeekableReadStream *stream, Type type) { for (byte i = 0; i < fn; ++i) { flags[i] = stream->readUint16LE(); + if (i == 0) + flags[i] -= sub_hack; debug(0, "flags[%u] = %u (0x%04x)", i, flags[i], flags[i]); } } diff --git a/engines/teenagent/surface.h b/engines/teenagent/surface.h index e18c101fc8..732e39073d 100644 --- a/engines/teenagent/surface.h +++ b/engines/teenagent/surface.h @@ -39,7 +39,7 @@ public: uint16 x, y; Surface(); - void load(Common::SeekableReadStream *stream, Type type); + void load(Common::SeekableReadStream *stream, Type type, int sub_hack = 0); Common::Rect render(Graphics::Surface *surface, int dx = 0, int dy = 0, bool mirror = false, Common::Rect src_rect = Common::Rect()); bool empty() const { return pixels == NULL; } diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index 69e84335fe..4ff910f7c2 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -323,7 +323,7 @@ Common::Error TeenAgentEngine::run() { } _system->showMouse(scene->getMessage().empty()); - uint32 f0 = frame * 10 / 25, f1 = (frame + 1) * 10 / 25; + uint32 f0 = frame * 12 / 25, f1 = (frame + 1) * 12 / 25; if (f0 != f1) { bool b = scene->render(_system); scene_busy = b; |