Ejemplo n.º 1
0
        /// <summary>
        /// SCR_SetUpToDrawConsole
        /// </summary>
        static void SetUpToDrawConsole()
        {
            Con.CheckResize();

            if (_DrawLoading)
            {
                return;                 // never a console with loading plaque
            }
            // decide on the height of the console
            Con.ForcedUp = (Client.cl.worldmodel == null) || (Client.cls.signon != Client.SIGNONS);

            if (Con.ForcedUp)
            {
                _ConLines   = _VidDef.height; // full screen
                _ConCurrent = _ConLines;
            }
            else if (Key.Destination == keydest_t.key_console)
            {
                _ConLines = _VidDef.height / 2;         // half screen
            }
            else
            {
                _ConLines = 0;         // none visible
            }
            if (_ConLines < _ConCurrent)
            {
                _ConCurrent -= (int)(_ConSpeed.Value * Host.FrameTime);
                if (_ConLines > _ConCurrent)
                {
                    _ConCurrent = _ConLines;
                }
            }
            else if (_ConLines > _ConCurrent)
            {
                _ConCurrent += (int)(_ConSpeed.Value * Host.FrameTime);
                if (_ConLines < _ConCurrent)
                {
                    _ConCurrent = _ConLines;
                }
            }

            if (_ClearConsole++ < _VidDef.numpages)
            {
                Sbar.Changed();
            }
            else if (ClearNotify++ < _VidDef.numpages)
            {
                //????????????
            }
            else
            {
                Con.NotifyLines = 0;
            }
        }