diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp index b6d3a3859aa..6e4dd76d12f 100644 --- a/engines/chewy/r_event.cpp +++ b/engines/chewy/r_event.cpp @@ -943,16 +943,6 @@ void flic_cut(int16 nr) { if (_G(Ci).Handle) { switch (nr) { - case FCUT_005: -#ifndef NEW_VIDEO_CODE - _G(mem)->file->select_pool_item(_G(Ci).Handle, nr); - _G(flc)->set_custom_user_function(Room10::cut_serv); - _G(flc)->custom_play(&_G(Ci)); - _G(flc)->remove_custom_user_function(); -#else - g_engine->_video->playVideo(nr); -#endif - break; case FCUT_009: #ifndef NEW_VIDEO_CODE diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp index 28216cb7836..1493b6d78cf 100644 --- a/engines/chewy/rooms/room10.cpp +++ b/engines/chewy/rooms/room10.cpp @@ -63,13 +63,5 @@ void Room10::get_surimy() { showCur(); } -int16 Room10::cut_serv(int16 frame) { - _G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly); - if (frame == 31) - start_aad(107, 0); - - return 0; -} - } // namespace Rooms } // namespace Chewy diff --git a/engines/chewy/rooms/room10.h b/engines/chewy/rooms/room10.h index 6c0c8cb65f5..f93c83f8868 100644 --- a/engines/chewy/rooms/room10.h +++ b/engines/chewy/rooms/room10.h @@ -29,8 +29,6 @@ class Room10 { public: static void entry(); static void get_surimy(); - - static int16 cut_serv(int16 frame); }; } // namespace Rooms diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp index e2ad47a8a86..98bb6434cb8 100644 --- a/engines/chewy/video/video_player.cpp +++ b/engines/chewy/video/video_player.cpp @@ -50,6 +50,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) { bool skipVideo = false; byte curPalette[256 * 3]; uint32 curFrame = 0; + bool customExit = false; g_system->getPaletteManager()->grabPalette(curPalette, 0, 256); //save_palette(curPalette); @@ -62,18 +63,22 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) { cfoDecoder->start(); - while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && handleCustom(num, curFrame)) { + while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && !customExit) { if (cfoDecoder->needsUpdate()) { const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame(); if (frame) { - g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h); + byte *srcP = (byte *)frame->getPixels(); + byte *destP = (byte *)g_screen->getPixels(); + Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), destP); + g_screen->markAllDirty(); + customExit = !handleCustom(num, curFrame); curFrame = cfoDecoder->getCurFrame(); if (cfoDecoder->hasDirtyPalette()) g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256); - //setScummVMPalette(cfoDecoder->getPalette(), 0, 256); + //setScummVMPalette(cfoDecoder->getPalette(), 0, 256); - g_system->updateScreen(); + g_screen->update(); } } @@ -104,14 +109,9 @@ bool VideoPlayer::handleCustom(uint num, uint frame) { return (frame == 40) ? false : true; case FCUT_005: // Room10::cut_serv - // TODO: The text functions print to an overlay buffer _G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly); - if (frame == 31) { + if (frame == 31) start_aad(107, 0); - //TextEntryList *text = _G(txt)->getDialog(107, 0); - //g_engine->_sound->playSpeech(text->front().speechId); - //delete text; - } break; case FCUT_094: //Room87::proc3