NScumm.Sky.Screen.FnFadeDown C# (CSharp) Méthode

FnFadeDown() public méthode

public FnFadeDown ( uint scroll ) : void
scroll uint
Résultat void
        public void FnFadeDown(uint scroll)
        {
            if (((scroll != 123) && (scroll != 321)) || SystemVars.Instance.SystemFlags.HasFlag(SystemFlags.NoScroll))
            {
                var delayTime = Environment.TickCount;
                for (var cnt = 0; cnt < 32; cnt++)
                {
                    delayTime += 20;
                    PaletteFadeDownHelper(_palette, GameColors);
                    _system.GraphicsManager.SetPalette(_palette, 0, GameColors);
                    _system.GraphicsManager.UpdateScreen();
                    var waitTime = delayTime - Environment.TickCount;
                    if (waitTime < 0)
                        waitTime = 0;
                    ServiceLocator.Platform.Sleep(waitTime);
                }
            }
            else
            {
                // scrolling is performed by fnFadeUp. It's just prepared here
                _scrollScreen = Current;
                Current = new byte[FullScreenWidth * FullScreenHeight];
                // the game will draw the new room into _currentScreen which
                // will be scrolled into the visible screen by fnFadeUp
                // fnFadeUp also frees the _scrollScreen
            }
        }