Welcome, Guest! Log In | Create Account

Changeset 45575

Show
Ignore:
Timestamp:
10/31/09 18:49:47 (2 months ago)
Author:
megath
Message:

added cutscenes where needed, fixed invalid skipping of fullscreen messages.

Location:
scummvm/trunk/engines/teenagent
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • scummvm/trunk/engines/teenagent/callbacks.cpp

    r45216 r45575  
    20972097                        setOns(1, 0x66); 
    20982098                        moveTo(224, 194, 0, true); 
    2099                         debug(0, "FIXME: add cut message: 57DF at 30423"); 
     2099                        displayCutsceneMessage(0x57df, 30423); 
    21002100                        inventory->remove(0x59); 
    21012101                } else { 
     
    36243624                                playSound(26, 30 + i * 11); 
    36253625                        playActorAnimation(661); 
    3626                         //cutscene 3c80 at 30484 
     3626                        displayCutsceneMessage(0x3c80, 30484); 
    36273627                        playSound(56, 10); 
    36283628                        playSound(56, 21); 
     
    36383638                        setOns(1, 49); 
    36393639 
    3640                         //cutscene 0x3c9a at 30453 
     3640                        displayCutsceneMessage(0x3c9a, 30453); 
    36413641                        moveTo(162, 184, 0, true); 
    36423642                        playSound(26, 6); 
     
    37093709 
    37103710                playMusic(11); 
    3711                 debug(0, "FIXME: cutscene: meanwhile in a mansion #%u, %04x", tries, ptr); 
     3711                displayCutsceneMessage(0x580a, 30484); 
    37123712                processCallback(ptr); 
    37133713                playMusic(6); 
  • scummvm/trunk/engines/teenagent/font.cpp

    r44109 r45575  
    6464                        byte v = *glyph++; 
    6565                        switch (v) { 
     66                        case 0: 
     67                                break; 
    6668                        case 1: 
    6769                                dst[j] = shadow_color; 
     
    7072                                dst[j] = color; 
    7173                                break; 
     74                        default: 
     75                                dst[j] = v; 
    7276                        } 
    7377                } 
  • scummvm/trunk/engines/teenagent/scene.cpp

    r45219 r45575  
    317317                        current_event.clear(); 
    318318                        message_color = 0xd1; 
     319                        Resources::instance()->font7.color = 0xd1; 
    319320                        for (int i = 0; i < 4; ++i) 
    320321                                custom_animation[i].free(); 
     
    322323                        init(10, Common::Point(136, 153)); 
    323324                } 
    324                 return false; 
     325                return true; 
    325326 
    326327        default: 
     
    332333        //render background 
    333334        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  
    344335        bool busy; 
    345336        bool restart; 
     
    348339                restart = false; 
    349340                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 
    350357                system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h); 
    351358 
  • scummvm/trunk/engines/teenagent/scene.h

    r45212 r45575  
    3939struct SceneEvent { 
    4040        enum Type { 
    41                 kNone, 
     41                kNone,                                  //0 
    4242                kMessage, 
    4343                kWalk, 
    4444                kPlayAnimation, 
    45                 kPlayActorAnimation, 
     45                kPlayActorAnimation,    //4 
    4646                kPauseAnimation, 
    4747                kClearAnimations, 
    4848                kLoadScene, 
    49                 kSetOn, 
     49                kSetOn,                                 //8 
    5050                kSetLan, 
    5151                kPlayMusic, 
    5252                kPlaySound, 
    53                 kEnableObject, 
     53                kEnableObject,                  //12 
    5454                kHideActor, 
    5555                kWaitForAnimation, 
    5656                kCreditsMessage, 
    57                 kQuit 
     57                kQuit                                   //16 
    5858        } type; 
    5959 
  • scummvm/trunk/engines/teenagent/teenagent.cpp

    r45219 r45575  
    378378        event.orientation = *src++; 
    379379        event.color = *src++; 
     380        event.lan = 8; 
    380381 
    381382        event.dst.y = *src; 
     
    394395} 
    395396 
     397void 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 
    396409void TeenAgentEngine::moveTo(const Common::Point &dst, byte o, bool warp) { 
    397410        moveTo(dst.x, dst.y, o, warp); 
  • scummvm/trunk/engines/teenagent/teenagent.h

    r44377 r45575  
    6969        void displayMessage(const Common::String &str, byte color = 0xd1); 
    7070        void displayCredits(uint16 addr); 
     71        void displayCutsceneMessage(uint16 addr, uint16 position); 
    7172        void moveTo(const Common::Point &dst, byte o, bool warp = false); 
    7273        void moveTo(uint16 x, uint16 y, byte o, bool warp = false);