Esempio n. 1
0
        private void ConfigureScreen()
        {
            switch (Mode)
            {
            case ScreenMode.Zero:
                _resolution     = null;
                _textResolution = new TextResolution(TextColumnWidth.Eighty, TextRowHeight.TwentyFive);
                SetWidth(TextColumnWidth.Eighty, TextRowHeight.TwentyFive);
                _colorEnabled     = true;
                _colorAttributes  = ColorAttributes.Sixteen;
                _colorDepth       = ColorDepth.d4Bit;
                _videoMemoryPages = MinimumPages;
                InitPages(PageSize.m2K);
                break;

            case ScreenMode.One:
                _resolution = new Resolution(320, 200);
                break;

            case ScreenMode.Two:
                _resolution = new Resolution(640, 200);
                break;

            case ScreenMode.Three:
                _resolution = new Resolution(720, 348);
                break;

            case ScreenMode.Four:
                _resolution = new Resolution(640, 400);
                break;

            case ScreenMode.Seven:
                _resolution = new Resolution(320, 200);
                break;

            case ScreenMode.Eight:
                _resolution = new Resolution(640, 200);
                break;

            case ScreenMode.Nine:
                _resolution = new Resolution(640, 350);
                break;

            case ScreenMode.Ten:
                _resolution = new Resolution(640, 350);
                break;

            case ScreenMode.Eleven:
                _resolution = new Resolution(640, 480);
                break;

            case ScreenMode.Twelve:
                _resolution = new Resolution(640, 480);
                break;

            case ScreenMode.Thirteen:
                _resolution = new Resolution(320, 200);
                break;
            }
        }
Esempio n. 2
0
        public BasicPage(PageSize pageSize, TextResolution textResolution, ColorDepth depth, ColorAttributes colorAttributes, IUI ui)
        {
            _blinkingTexts = new List <BlinkingText>();

            PageSize         = pageSize;
            _textResolution  = textResolution;
            ScreenTextBuffer = new Buffer(_textResolution.Width, _textResolution.Height);

            _colorAttributes            = colorAttributes;
            CurrentForegroundColorIndex = 15;
            CurrentBackgroundColorIndex = 0;
            Palette        = new Palette(colorAttributes, depth);
            _cursorVisible = true;
            _cursorLoc     = new Vector2(1, 1);

            _ui = ui;
        }