aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2009-11-18 08:15:16 +0000
committerVladimir Menshakov2009-11-18 08:15:16 +0000
commit6e8595b814123cff18485998b50fe86430672348 (patch)
treef6d932b7a651ee53df5ff176d59c6c6730e6ea7c /engines
parent2294c6f4667cbb3e7c32487b96c0e83d3f726420 (diff)
downloadscummvm-rg350-6e8595b814123cff18485998b50fe86430672348.tar.gz
scummvm-rg350-6e8595b814123cff18485998b50fe86430672348.tar.bz2
scummvm-rg350-6e8595b814123cff18485998b50fe86430672348.zip
use actual actor position for overlay positioning to avoid z-order glitches.
svn-id: r45969
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/callbacks.cpp3
-rw-r--r--engines/teenagent/scene.cpp4
-rw-r--r--engines/teenagent/surface.cpp2
-rw-r--r--engines/teenagent/surface_list.cpp2
-rw-r--r--engines/teenagent/surface_list.h2
5 files changed, 8 insertions, 5 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index 55048e09e9..a3066df71a 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -356,6 +356,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(820, 1);
setOns(3, 0x59);
//some moving animation is missing here
+ moveTo(scene->getPosition().x, scene->getPosition().y + 1, 3);
+ //wait
+ moveTo(scene->getPosition().x, scene->getPosition().y - 1, 2);
displayMessage(0x551f);
enableObject(4);
SET_FLAG(0xdbdc, 1);
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 4e2a9463e6..31f529e75a 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -651,7 +651,7 @@ bool Scene::render(OSystem *system) {
if (debug_features.feature[DebugFeatures::kShowOn]) {
if (_id != 16 || getOns(16)[0] != 0) {
- on.render(surface, actor_animation_position.bottom, false); //do not render boat on isle. I double checked all callbacks, there's no code switching off the boat :(
+ on.render(surface, position.y, false); //do not render boat on isle. I double checked all callbacks, there's no code switching off the boat :(
}
}
@@ -720,7 +720,7 @@ bool Scene::render(OSystem *system) {
//render on
if (debug_features.feature[DebugFeatures::kShowOn]) {
if (_id != 16 || getOns(16)[0] != 0) {
- on.render(surface, actor_animation_position.bottom, true); //do not render boat on isle. I double checked all callbacks, there's no code switching off the boat :(
+ on.render(surface, position.y, true); //do not render boat on isle. I double checked all callbacks, there's no code switching off the boat :(
}
}
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index a811f2731a..1bc9cad332 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -51,7 +51,7 @@ void Surface::load(Common::SeekableReadStream *stream, Type type) {
if (stream->eos() || w_ == 0)
return;
- if (w_ * h_ > stream->size()) {//rough but working
+ if (w_ * h_ > stream->size()) {
debug(0, "invalid surface %ux%u -> %u,%u", w_, h_, x, y);
return;
}
diff --git a/engines/teenagent/surface_list.cpp b/engines/teenagent/surface_list.cpp
index 2c34b3b3fc..57cc5677d6 100644
--- a/engines/teenagent/surface_list.cpp
+++ b/engines/teenagent/surface_list.cpp
@@ -67,7 +67,7 @@ Common::Rect SurfaceList::render(Graphics::Surface *surface, int horizon, bool s
for(uint i = 0; i < surfaces_n; ++i) {
const Surface &s = surfaces[i];
if (second_pass) {
- debug(0, "%d %d", s.y + s.h, horizon);
+ //debug(0, "%d %d", s.y + s.h, horizon);
if (s.y + s.h > horizon)
dirty.extend(s.render(surface));
} else {
diff --git a/engines/teenagent/surface_list.h b/engines/teenagent/surface_list.h
index 089c3d3cab..08d8d074a6 100644
--- a/engines/teenagent/surface_list.h
+++ b/engines/teenagent/surface_list.h
@@ -37,7 +37,7 @@ public:
SurfaceList();
void load(Common::SeekableReadStream *stream, Type type, int sub_hack = 0);
void free();
- Common::Rect render(Graphics::Surface *surface, int horizont, bool second_pass) const;
+ Common::Rect render(Graphics::Surface *surface, int horizon, bool second_pass) const;
protected:
Surface * surfaces;