renamed unkVirtScreen4 to fadeToBlackEffect; fixed graphic transition glitch (#551584)
svn-id: r4294
This commit is contained in:
parent
e78435b817
commit
271f50b044
5 changed files with 14 additions and 9 deletions
13
gfx.cpp
13
gfx.cpp
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
2
scumm.h
2
scumm.h
|
@ -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);
|
||||
|
|
|
@ -374,7 +374,7 @@ void Scumm::startScene(int room, Actor * a, int objectNr)
|
|||
|
||||
clearMsgQueue();
|
||||
|
||||
unkVirtScreen4(_switchRoomEffect2);
|
||||
fadeToBlackEffect(_switchRoomEffect2);
|
||||
_newEffect = _switchRoomEffect;
|
||||
|
||||
if (_currentScript != 0xFF) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue