aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2009-11-17 20:47:03 +0000
committerVladimir Menshakov2009-11-17 20:47:03 +0000
commita9dc8215bb90f7e6944b729fcf4751fa72bf0120 (patch)
tree46c4c0398c82c502c3101cabd596db85c2607317 /engines
parent99111a75c1b8a7df05a05cad53867c43918a1217 (diff)
downloadscummvm-rg350-a9dc8215bb90f7e6944b729fcf4751fa72bf0120.tar.gz
scummvm-rg350-a9dc8215bb90f7e6944b729fcf4751fa72bf0120.tar.bz2
scummvm-rg350-a9dc8215bb90f7e6944b729fcf4751fa72bf0120.zip
found strange hack about room 7 and overlay.
svn-id: r45957
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/scene.cpp14
-rw-r--r--engines/teenagent/surface.cpp4
-rw-r--r--engines/teenagent/surface.h2
-rw-r--r--engines/teenagent/teenagent.cpp2
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;