Changeset 45575
- Timestamp:
- 10/31/09 18:49:47 (2 months ago)
- Location:
- scummvm/trunk/engines/teenagent
- Files:
-
- 6 modified
-
callbacks.cpp (modified) (4 diffs)
-
font.cpp (modified) (2 diffs)
-
scene.cpp (modified) (4 diffs)
-
scene.h (modified) (1 diff)
-
teenagent.cpp (modified) (2 diffs)
-
teenagent.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
scummvm/trunk/engines/teenagent/callbacks.cpp
r45216 r45575 2097 2097 setOns(1, 0x66); 2098 2098 moveTo(224, 194, 0, true); 2099 d ebug(0, "FIXME: add cut message: 57DF at 30423");2099 displayCutsceneMessage(0x57df, 30423); 2100 2100 inventory->remove(0x59); 2101 2101 } else { … … 3624 3624 playSound(26, 30 + i * 11); 3625 3625 playActorAnimation(661); 3626 //cutscene 3c80 at 304843626 displayCutsceneMessage(0x3c80, 30484); 3627 3627 playSound(56, 10); 3628 3628 playSound(56, 21); … … 3638 3638 setOns(1, 49); 3639 3639 3640 //cutscene 0x3c9a at 304533640 displayCutsceneMessage(0x3c9a, 30453); 3641 3641 moveTo(162, 184, 0, true); 3642 3642 playSound(26, 6); … … 3709 3709 3710 3710 playMusic(11); 3711 d ebug(0, "FIXME: cutscene: meanwhile in a mansion #%u, %04x", tries, ptr);3711 displayCutsceneMessage(0x580a, 30484); 3712 3712 processCallback(ptr); 3713 3713 playMusic(6); -
scummvm/trunk/engines/teenagent/font.cpp
r44109 r45575 64 64 byte v = *glyph++; 65 65 switch (v) { 66 case 0: 67 break; 66 68 case 1: 67 69 dst[j] = shadow_color; … … 70 72 dst[j] = color; 71 73 break; 74 default: 75 dst[j] = v; 72 76 } 73 77 } -
scummvm/trunk/engines/teenagent/scene.cpp
r45219 r45575 317 317 current_event.clear(); 318 318 message_color = 0xd1; 319 Resources::instance()->font7.color = 0xd1; 319 320 for (int i = 0; i < 4; ++i) 320 321 custom_animation[i].free(); … … 322 323 init(10, Common::Point(136, 153)); 323 324 } 324 return false;325 return true; 325 326 326 327 default: … … 332 333 //render background 333 334 Resources *res = Resources::instance(); 334 if (current_event.type == SceneEvent::kCreditsMessage) {335 system->fillScreen(0);336 Graphics::Surface *surface = system->lockScreen();337 res->font8.color = current_event.color;338 res->font8.shadow_color = current_event.orientation;339 res->font8.render(surface, current_event.dst.x, current_event.dst.y, message);340 system->unlockScreen();341 return true;342 }343 344 335 bool busy; 345 336 bool restart; … … 348 339 restart = false; 349 340 busy = processEventQueue(); 341 342 if (current_event.type == SceneEvent::kCreditsMessage) { 343 system->fillScreen(0); 344 Graphics::Surface *surface = system->lockScreen(); 345 if (current_event.lan == 8) { 346 res->font8.color = current_event.color; 347 res->font8.shadow_color = current_event.orientation; 348 res->font8.render(surface, current_event.dst.x, current_event.dst.y, message); 349 } else { 350 res->font7.color = 0xd1; 351 res->font7.render(surface, current_event.dst.x, current_event.dst.y, message); 352 } 353 system->unlockScreen(); 354 return true; 355 } 356 350 357 system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h); 351 358 -
scummvm/trunk/engines/teenagent/scene.h
r45212 r45575 39 39 struct SceneEvent { 40 40 enum Type { 41 kNone, 41 kNone, //0 42 42 kMessage, 43 43 kWalk, 44 44 kPlayAnimation, 45 kPlayActorAnimation, 45 kPlayActorAnimation, //4 46 46 kPauseAnimation, 47 47 kClearAnimations, 48 48 kLoadScene, 49 kSetOn, 49 kSetOn, //8 50 50 kSetLan, 51 51 kPlayMusic, 52 52 kPlaySound, 53 kEnableObject, 53 kEnableObject, //12 54 54 kHideActor, 55 55 kWaitForAnimation, 56 56 kCreditsMessage, 57 kQuit 57 kQuit //16 58 58 } type; 59 59 -
scummvm/trunk/engines/teenagent/teenagent.cpp
r45219 r45575 378 378 event.orientation = *src++; 379 379 event.color = *src++; 380 event.lan = 8; 380 381 381 382 event.dst.y = *src; … … 394 395 } 395 396 397 void TeenAgentEngine::displayCutsceneMessage(uint16 addr, uint16 position) { 398 SceneEvent event(SceneEvent::kCreditsMessage); 399 400 event.message = parseMessage(addr); 401 event.dst.x = position % 320; 402 event.dst.y = position / 320; 403 event.lan = 7; 404 405 scene->push(event); 406 } 407 408 396 409 void TeenAgentEngine::moveTo(const Common::Point &dst, byte o, bool warp) { 397 410 moveTo(dst.x, dst.y, o, warp); -
scummvm/trunk/engines/teenagent/teenagent.h
r44377 r45575 69 69 void displayMessage(const Common::String &str, byte color = 0xd1); 70 70 void displayCredits(uint16 addr); 71 void displayCutsceneMessage(uint16 addr, uint16 position); 71 72 void moveTo(const Common::Point &dst, byte o, bool warp = false); 72 73 void moveTo(uint16 x, uint16 y, byte o, bool warp = false);
