diff options
-rw-r--r-- | gfx.cpp | 13 | ||||
-rw-r--r-- | saveload.cpp | 4 | ||||
-rw-r--r-- | script_v2.cpp | 2 | ||||
-rw-r--r-- | scumm.h | 2 | ||||
-rw-r--r-- | scummvm.cpp | 2 |
5 files changed, 14 insertions, 9 deletions
@@ -555,13 +555,14 @@ void Scumm::moveMemInPalRes(int start, int end, byte direction) } } -void Scumm::unkVirtScreen4(int a) +void Scumm::fadeToBlackEffect(int a) { VirtScreen *vs; setDirtyRange(0, 0, 0); if (!(_features & GF_AFTER_V7)) camera._last.x = camera._cur.x; + if (!_screenEffectFlag) return; _screenEffectFlag = false; @@ -569,10 +570,12 @@ void Scumm::unkVirtScreen4(int a) if (a == 0) return; + // Fill screen 0 with black vs = &virtscr[0]; gdi._backbuff_ptr = vs->screenPtr + vs->xstart; memset(gdi._backbuff_ptr, 0, vs->size); + // Fade to black with the specified effect, if any. switch (a) { case 1: case 2: @@ -583,8 +586,9 @@ void Scumm::unkVirtScreen4(int a) unkScreenEffect6(); break; case 129: - //setDirtyRange(0, 0, vs->height); - //updateDirtyScreen(0); + // Just blit screen 0 to the display (i.e. display will be black) + setDirtyRange(0, 0, vs->height); + updateDirtyScreen(0); /* XXX: EGA_proc4(0); */ // warning("EGA_proc4"); /* FIXME */ break; @@ -595,7 +599,7 @@ void Scumm::unkVirtScreen4(int a) unkScreenEffect5(1); break; default: - warning("unkVirtScreen4: default case %d", a); + warning("fadeToBlackEffect: default case %d", a); } } @@ -1759,6 +1763,7 @@ static const byte screen_eff7_table3[4] = { 13, 25, 25, 25 }; +/* Transition effect */ void Scumm::unkScreenEffect7(int a) { int tab_1[16]; diff --git a/saveload.cpp b/saveload.cpp index 8855623413..1c3eb44291 100644 --- a/saveload.cpp +++ b/saveload.cpp @@ -127,8 +127,8 @@ bool Scumm::loadState(int slot, bool compat) gdi._mask_left = -1; initScreens(0, 0, 320, 200); - _screenEffectFlag = 1; - unkVirtScreen4(129); + _screenEffectFlag = true; + fadeToBlackEffect(129); initScreens(0, sb, 320, sh); diff --git a/script_v2.cpp b/script_v2.cpp index 4a25d761dd..f4dc5edf1c 100644 --- a/script_v2.cpp +++ b/script_v2.cpp @@ -2776,7 +2776,7 @@ void Scumm::o6_miscOps() grabCursor(args[1], args[2], args[3], args[4]); break; case 5: - unkVirtScreen4(args[1]); + fadeToBlackEffect(args[1]); break; case 6: _fullRedraw = 1; @@ -1212,7 +1212,7 @@ public: void updateDirtyScreen(int slot); VirtScreen *findVirtScreen(int y); - void unkVirtScreen4(int a); + void fadeToBlackEffect(int a); static void setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int bottom); void screenEffect(int effect); diff --git a/scummvm.cpp b/scummvm.cpp index d610997324..a80a2e97a7 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -374,7 +374,7 @@ void Scumm::startScene(int room, Actor * a, int objectNr) clearMsgQueue(); - unkVirtScreen4(_switchRoomEffect2); + fadeToBlackEffect(_switchRoomEffect2); _newEffect = _switchRoomEffect; if (_currentScript != 0xFF) { |