protected void FadeIn(byte effect)
{
if (_disableFadeInEffect)
{
// fadeIn() calls can be disabled in TheDig after a SMUSH movie
// has been played. Like the original interpreter, we introduce
// an extra flag to handle
_disableFadeInEffect = false;
_doEffect = false;
_screenEffectFlag = true;
return;
}
UpdatePalette();
switch (effect)
{
case 0:
// seems to do nothing
break;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
// Some of the transition effects won't work properly unless
// the screen is marked as clean first. At first I thought I
// could safely do this every time fadeIn() was called, but
// that broke the FOA intro. Probably other things as well.
//
// Hopefully it's safe to do it at this point, at least.
MainVirtScreen.SetDirtyRange(0, 0);
DoTransitionEffect(effect - 1);
break;
case 128:
UnkScreenEffect6();
break;
case 129:
break;
case 130:
case 131:
case 132:
case 133:
ScrollEffect(133 - effect);
break;
case 134:
DissolveEffect(1, 1);
break;
case 135:
DissolveEffect(1, MainVirtScreen.Height);
break;
default:
throw new NotSupportedException(string.Format("Unknown screen effect {0}", effect));
}
_screenEffectFlag = true;
}