Example #1
0
        public static void setup()
        {
            screen = new Cosmos.Hardware.VGAScreen();
            screen.SetGraphicsMode(VGAScreen.ScreenSize.Size320x200, VGAScreen.ColorDepth.BitDepth8);
            for (int i = 0; i <= 255; i++)
            {
                screen.SetPaletteEntry(i, (byte)i, (byte)i, (byte)i);
            }
            screen.Clear(255);

            mouse = new Cosmos.Hardware.Mouse();
            mouse.Initialize(320, 200);
        }
Example #2
0
        public static void show()
        {
            int X = 0;

            while (true)
            {
                X++;
                screen.Clear(X % 255);
                uint curX = (uint)mouse.X;;
                uint curY = (uint)mouse.Y;
                if (curX != oldx || curY != oldy)
                {
                    WipeMouse();
                }
                DrawMouse(curX, curY);
            }
        }