aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2009-11-08 20:53:55 +0000
committerVladimir Menshakov2009-11-08 20:53:55 +0000
commit276ee4a4f89a34a6366fa7009bc40492c3daa67b (patch)
tree57176836fc409bbda89cdf2d70179f1a7d475459 /engines
parentfac5aeafbd6b811125ea4dc4e05f8c5163bc1f16 (diff)
downloadscummvm-rg350-276ee4a4f89a34a6366fa7009bc40492c3daa67b.tar.gz
scummvm-rg350-276ee4a4f89a34a6366fa7009bc40492c3daa67b.tar.bz2
scummvm-rg350-276ee4a4f89a34a6366fa7009bc40492c3daa67b.zip
fixed more village glitches
svn-id: r45760
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/callbacks.cpp71
-rw-r--r--engines/teenagent/scene.cpp1
2 files changed, 54 insertions, 18 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index f1ca7856c6..40e8ceded9 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -1577,8 +1577,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
return true;
case 0x607f:
- processCallback(0x60b5);
- return true;
+ return processCallback(0x60b5);
case 0x6083:
if (CHECK_FLAG(0xDBA4, 1)) {
@@ -2101,6 +2100,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x783d:
Dialog::pop(scene, 0xdb36, 797);
return true;
+
+ case 0x7966:
+ if (CHECK_FLAG(0xDBA4, 1))
+ return false;
+ return processCallback(0x60b5);
case 0x7ad0:
case 0x7ad7:
@@ -2414,8 +2418,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(1, 25);
playSound(1, 29);
playSound(1, 34);
- playAnimation(506, 1);
- playActorAnimation(504);
+ playAnimation(506, 0, true);
+ playActorAnimation(504, true);
+ waitAnimation();
+
setOns(0, 0);
playSound(24, 2);
playSound(22, 24);
@@ -2438,7 +2444,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
obj->rect.save();
}
playSound(10);
- playAnimation(503, 1);
+ playAnimation(503, 0);
setLan(1, 0, 22);
disableObject(1, 22);
disableObject(13, 20);
@@ -2456,21 +2462,30 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(2, 0);
setOns(3, 0);
setOns(4, 0);
- scene->getWalkbox(0)->rect.clear();
- scene->getWalkbox(0)->save();
- playSound(62);
- //patch lan, 1
+
+ {
+ Walkbox * w = scene->getWalkbox(0);
+ w->rect.clear();
+ w->save();
+ }
+
+ playSound(62, 1);
+ playSound(9, 8);
+ setLan(1, 0);
+ playAnimation(512, 0);
+
+ warning("FIXME: fadeout not implemented");
displayMessage(0x3d3a);
{
Object *obj = scene->getObject(7);
- obj->actor_rect.left = 228;
- obj->actor_rect.top = 171;
+ obj->actor_rect.left = obj->actor_rect.right = 228;
+ obj->actor_rect.top = obj->actor_rect.bottom = 171;
obj->actor_rect.save();
}
{
Object *obj = scene->getObject(8);
- obj->actor_rect.left = 290;
- obj->actor_rect.top = 171;
+ obj->actor_rect.left = obj->actor_rect.right = 290;
+ obj->actor_rect.top = obj->actor_rect.bottom = 171;
obj->actor_rect.save();
}
}
@@ -2608,16 +2623,36 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
case 0x8bfc://Give bone to dog
displayMessage(0x3c31);
playSound(5, 3);
+ playSound(26, 13);
playActorAnimation(657, true);
- playAnimation(658, 1, true);
+ playAnimation(658, 0, true);
waitAnimation();
- playAnimation(659, 1);
+ playAnimation(659, 0);
- displayMessage(0x3c3d);
inventory->remove(36);
SET_FLAG(0xDBAD, 1);
- //TODO:Adjust Walkboxes
+ {
+ Object * o = scene->getObject(7);
+ o->actor_rect.left = o->actor_rect.right = 297;
+ o->actor_rect.top = o->actor_rect.bottom = 181;
+ o->actor_orientation = 1;
+ o->save();
+ }
+ {
+ Object * o = scene->getObject(9);
+ o->actor_rect.left = o->actor_rect.right = 297;
+ o->actor_rect.top = o->actor_rect.bottom = 181;
+ o->actor_orientation = 1;
+ o->save();
+ }
+ {
+ Walkbox * w = scene->getWalkbox(0);
+ w->rect.right = 266;
+ w->rect.bottom = 193;
+ w->save();
+ }
+ displayMessage(0x3c3d);
return true;
case 0x8c6e://Use car jack on rock
@@ -2652,6 +2687,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
SET_FLAG(0xdaca, 1);
inventory->remove(0x2e);
disableObject(2);
+ scene->getObject(3)->actor_rect.right = 156;
+ scene->getObject(3)->save();
return true;
case 0x8d57:
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 5d6b8cb26b..23644f16f6 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -406,7 +406,6 @@ bool Scene::render(OSystem *system) {
continue;
}
int index = a->currentIndex();
- debug(0, "current index = %d", index);
if (index == current_event.animation) {
debug(0, "kWaitLanAnimationFrame(%d, %d) complete", current_event.slot, current_event.animation);
restart |= nextEvent();