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

Flip() public méthode

public Flip ( bool doUpdate = true ) : void
doUpdate bool
Résultat void
        public void Flip(bool doUpdate = true)
        {
            int copyX, copyWidth;
            copyX = copyWidth = 0;
            for (byte cnty = 0; cnty < GridY; cnty++)
            {
                for (byte cntx = 0; cntx < GridX; cntx++)
                {
                    if ((_gameGrid[cnty * GridX + cntx] & 1) != 0)
                    {
                        unchecked
                        {
                            _gameGrid[cnty * GridX + cntx] &= (byte)~1;
                        }
                        if (copyWidth == 0)
                            copyX = cntx * GridW;
                        copyWidth += GridW;
                    }
                    else if (copyWidth != 0)
                    {
                        _system.GraphicsManager.CopyRectToScreen(Current, cnty * GridH * GameScreenWidth + copyX,
                            GameScreenWidth, copyX, cnty * GridH, copyWidth, GridH);
                        copyWidth = 0;
                    }
                }
                if (copyWidth != 0)
                {
                    _system.GraphicsManager.CopyRectToScreen(Current, cnty * GridH * GameScreenWidth + copyX,
                        GameScreenWidth, copyX, cnty * GridH, copyWidth, GridH);
                    copyWidth = 0;
                }
            }
            if (doUpdate)
                _system.GraphicsManager.UpdateScreen();
        }