[Scummvm-cvs-logs] SF.net SVN: scummvm:[45728] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sat Nov 7 13:33:59 CET 2009
Revision: 45728
http://scummvm.svn.sourceforge.net/scummvm/?rev=45728&view=rev
Author: megath
Date: 2009-11-07 12:33:59 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
do not bail out from the waitAnimation event if restart frame requested.
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/callbacks.cpp
scummvm/trunk/engines/teenagent/scene.cpp
Modified: scummvm/trunk/engines/teenagent/callbacks.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/callbacks.cpp 2009-11-07 12:20:27 UTC (rev 45727)
+++ scummvm/trunk/engines/teenagent/callbacks.cpp 2009-11-07 12:33:59 UTC (rev 45728)
@@ -804,8 +804,8 @@
case 0x55a8: {
uint16 d = Dialog::pop(scene, 0xdb08);
if (d == 0x2c5d) {
+ waitLanAnimationFrame(1, 0x23);
setOns(0, 0);
- waitLanAnimationFrame(1, 0x23);
playSound(52, 9);
playSound(52, 11);
playSound(52, 13);
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2009-11-07 12:20:27 UTC (rev 45727)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2009-11-07 12:33:59 UTC (rev 45728)
@@ -391,25 +391,24 @@
Animation *a = custom_animation + i;
Surface *s = a->currentFrame();
if (s != NULL) {
- animation_position[i] = s->render(surface);
busy = true;
if (!a->paused && !a->loop)
got_any_animation = true;
- continue;
+ } else {
+ a = animation + i;
+ s = a->currentFrame();
}
-
- a = animation + i;
- s = a->currentFrame();
+
if (current_event.type == SceneEvent::kWaitLanAnimationFrame && current_event.color == i) {
if (s == NULL) {
- nextEvent();
+ restart |= nextEvent();
continue;
}
int index = a->currentIndex();
//debug(0, "index = %d", index);
if (index == current_event.animation) {
debug(0, "kWaitLanAnimationFrame(%d, %d) complete", current_event.color, current_event.animation);
- nextEvent();
+ restart |= nextEvent();
}
}
@@ -487,7 +486,7 @@
system->unlockScreen();
- if (current_event.type == SceneEvent::kWaitForAnimation && !got_any_animation) {
+ if (!restart && current_event.type == SceneEvent::kWaitForAnimation && !got_any_animation) {
debug(0, "no animations, nextevent");
nextEvent();
restart = true;
@@ -695,12 +694,19 @@
Common::Point Scene::messagePosition(const Common::String &str, Common::Point position) {
Resources *res = Resources::instance();
uint w = res->font7.render(NULL, 0, 0, str);
+ uint h = res->font7.height + 3;
+
position.x -= w / 2;
- position.y -= res->font7.height + 3;
+ position.y -= h;
+
if (position.x + w > 320)
position.x = 320 - w;
if (position.x < 0)
position.x = 0;
+ if (position.y + h > 320)
+ position.y = 200 - h;
+ if (position.y < 0)
+ position.y = 0;
return position;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list