use actual actor position for overlay positioning to avoid z-order glitches.

svn-id: r45969
This commit is contained in:
Vladimir Menshakov 2009-11-18 08:15:16 +00:00
parent 2294c6f466
commit 6e8595b814
5 changed files with 8 additions and 5 deletions

View File

@ -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);

View File

@ -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 :(
}
}

View File

@ -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;
}

View File

@ -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 {

View File

@ -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;