mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
added final credits
svn-id: r46297
This commit is contained in:
parent
c2f9c512a1
commit
5de8c46963
@ -3784,7 +3784,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
|
||||
waitAnimation();
|
||||
|
||||
playMusic(11);
|
||||
//BIG FIXME: show scrolling credits
|
||||
displayCredits();
|
||||
loadScene(39, 192, 177, 0);
|
||||
hideActor();
|
||||
Dialog::showMono(scene, 0x8b4d, 953, 0xe3, 1); //well...
|
||||
|
@ -491,6 +491,20 @@ bool Scene::render(OSystem *system) {
|
||||
do {
|
||||
restart = false;
|
||||
busy = processEventQueue();
|
||||
|
||||
if (current_event.type == SceneEvent::kCredits) {
|
||||
system->fillScreen(0);
|
||||
///\todo: optimize me
|
||||
Graphics::Surface *surface = system->lockScreen();
|
||||
res->font7.render(surface, current_event.dst.x, current_event.dst.y--, current_event.message, current_event.color);
|
||||
system->unlockScreen();
|
||||
|
||||
if (current_event.dst.y < -(int)current_event.timer)
|
||||
current_event.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!message.empty() && message_timer != 0) {
|
||||
if (--message_timer == 0) {
|
||||
clearMessage();
|
||||
@ -925,6 +939,10 @@ bool Scene::processEventQueue() {
|
||||
debug(0, "*stub* shaking the screen");
|
||||
current_event.clear();
|
||||
break;
|
||||
|
||||
case SceneEvent::kCredits:
|
||||
debug(0, "showing credits");
|
||||
break;
|
||||
|
||||
case SceneEvent::kQuit:
|
||||
debug(0, "quit!");
|
||||
|
@ -57,6 +57,7 @@ struct SceneEvent {
|
||||
kWaitForAnimation,
|
||||
kWaitLanAnimationFrame,
|
||||
kCreditsMessage, //16
|
||||
kCredits,
|
||||
kTimer,
|
||||
kEffect,
|
||||
kQuit
|
||||
|
@ -489,6 +489,21 @@ void TeenAgentEngine::displayCredits(uint16 addr) {
|
||||
scene->push(event);
|
||||
}
|
||||
|
||||
void TeenAgentEngine::displayCredits() {
|
||||
SceneEvent event(SceneEvent::kCredits);
|
||||
event.message = parseMessage(0xe488);
|
||||
event.dst.y = 200;
|
||||
|
||||
int lines = 1;
|
||||
for(uint i = 0; i < event.message.size(); ++i)
|
||||
if (event.message[i] == '\n')
|
||||
++lines;
|
||||
event.dst.x = (320 - Resources::instance()->font7.render(NULL, 0, 0, event.message, 0xd1)) / 2;
|
||||
event.timer = 11 * lines - event.dst.y + 22;
|
||||
//debug(0, "credits = %s", event.message.c_str());
|
||||
scene->push(event);
|
||||
}
|
||||
|
||||
void TeenAgentEngine::displayCutsceneMessage(uint16 addr, uint16 position) {
|
||||
SceneEvent event(SceneEvent::kCreditsMessage);
|
||||
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
void waitLanAnimationFrame(byte slot, uint16 frame);
|
||||
void setTimerCallback(uint16 addr, uint16 frames);
|
||||
void shakeScreen();
|
||||
void displayCredits();
|
||||
|
||||
Common::RandomSource random;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user