added message duration override, increased 'the end' timeout

svn-id: r46301
This commit is contained in:
Vladimir Menshakov 2009-12-08 22:13:06 +00:00
parent 5b136d2f1a
commit 4218d3f037
4 changed files with 5 additions and 4 deletions

View File

@ -3792,7 +3792,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(954, 0); playAnimation(954, 0);
Dialog::showMono(scene, 0x8b7a, 955, 0xe3, 1); //that's all folks Dialog::showMono(scene, 0x8b7a, 955, 0xe3, 1); //that's all folks
playMusic(2); playMusic(2);
displayCredits(0xe47c); displayCredits(0xe47c, 4500); //3 minutes (infinite until key pressed in original)
scene->push(SceneEvent(SceneEvent::kQuit)); scene->push(SceneEvent(SceneEvent::kQuit));
return true; return true;

View File

@ -812,7 +812,7 @@ bool Scene::processEventQueue() {
message_animation = &actor_animation; message_animation = &actor_animation;
debug(0, "async message %d-%d (slot %u)", message_first_frame, message_last_frame, current_event.slot); debug(0, "async message %d-%d (slot %u)", message_first_frame, message_last_frame, current_event.slot);
} else { } else {
message_timer = messageDuration(message); message_timer = current_event.timer? current_event.timer: messageDuration(message);
message_first_frame = message_last_frame = 0; message_first_frame = message_last_frame = 0;
} }
Common::Point p; Common::Point p;

View File

@ -466,7 +466,7 @@ void TeenAgentEngine::displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 f
} }
void TeenAgentEngine::displayCredits(uint16 addr) { void TeenAgentEngine::displayCredits(uint16 addr, uint16 timer) {
SceneEvent event(SceneEvent::kCreditsMessage); SceneEvent event(SceneEvent::kCreditsMessage);
const byte *src = Resources::instance()->dseg.ptr(addr); const byte *src = Resources::instance()->dseg.ptr(addr);
@ -486,6 +486,7 @@ void TeenAgentEngine::displayCredits(uint16 addr) {
} }
int w = Resources::instance()->font8.render(NULL, 0, 0, event.message, 0xd1); int w = Resources::instance()->font8.render(NULL, 0, 0, event.message, 0xd1);
event.dst.x = (320 - w) / 2; event.dst.x = (320 - w) / 2;
event.timer = timer;
scene->push(event); scene->push(event);
} }

View File

@ -79,7 +79,7 @@ public:
void displayMessage(const Common::String &str, byte color = 0xd1, uint16 position = 0); void displayMessage(const Common::String &str, byte color = 0xd1, uint16 position = 0);
void displayAsyncMessage(uint16 addr, uint16 position, uint16 first_frame, uint16 last_frame, byte color = 0xd1); void displayAsyncMessage(uint16 addr, uint16 position, uint16 first_frame, uint16 last_frame, byte color = 0xd1);
void displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 first_frame, uint16 last_frame, byte color = 0xd1); void displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 first_frame, uint16 last_frame, byte color = 0xd1);
void displayCredits(uint16 addr); void displayCredits(uint16 addr, uint16 timer = 0);
void displayCutsceneMessage(uint16 addr, uint16 position); void displayCutsceneMessage(uint16 addr, uint16 position);
void moveTo(const Common::Point &dst, byte o, bool warp = false); void moveTo(const Common::Point &dst, byte o, bool warp = false);
void moveTo(uint16 x, uint16 y, byte o, bool warp = false); void moveTo(uint16 x, uint16 y, byte o, bool warp = false);