Esempio n. 1
0
        static void Main(string[] args)
        {
            //BitmapFont someFont = new BitmapFont("arial.ttf");
            //Console.ReadKey();

            ConfigReader.Read("config.txt");

            DisplayDevice device = DisplayDevice.GetDisplay((DisplayIndex)GameWindowSettings.displayID);

            if (GameWindowSettings.width == 0)
            {
                GameWindowSettings.width = device.Width;
            }
            if (GameWindowSettings.height == 0)
            {
                GameWindowSettings.height = device.Height;
            }

            Debug.WriteLine("Using gfx device: " + device.ToString());
            InkubusCore core = new InkubusCore((GameWindowSettings.fullscreen) ? 0 : (device.Width / 2 - GameWindowSettings.width / 2),
                                               (GameWindowSettings.fullscreen) ? 0 : (device.Height / 2 - GameWindowSettings.height / 2),
                                               GameWindowSettings.width,
                                               GameWindowSettings.height,
                                               GraphicsMode.Default,
                                               GameWindowSettings.fullscreen ? GameWindowFlags.Fullscreen : GameWindowFlags.FixedWindow,
                                               device);
        }
Esempio n. 2
0
        public InkubusCore(int x, int y, int width, int height, GraphicsMode mode, GameWindowFlags flags, DisplayDevice device) : base(width, height, mode, "Inkubus", flags, device, 4, 4, GraphicsContextFlags.ForwardCompatible)
        {
            Instance = this;
            //WindowBorder = WindowBorder.Hidden;
            Load    += OnWindowLoaded;
            Location = new Point(x, y);
            Closed  += OnClosed;

            inputManager = new InputManager();
            Run(1.0d / 60.0d);
        }