예제 #1
0
        protected override void Update(GameTime gameTime)
        {
            Memory.gameTime = gameTime;
            Memory.IsActive = IsActive;

            //it breaks the Font
            //Memory.PreferredViewportWidth = graphics.GraphicsDevice.Viewport.Width;
            //Memory.PreferredViewportHeight = graphics.GraphicsDevice.Viewport.Height;

            Input2.Update();
            Memory.Update();

            if (Input2.Button(FF8TextTagKey.Exit) || Input2.Button(FF8TextTagKey.ExitMenu))
            {
                Exit();
            }
            init_debugger_Audio.Update();
            ModuleHandler.Update(gameTime);
            base.Update(gameTime);
            if (Memory.SuppressDraw)
            {
                SuppressDraw();
                Memory.SuppressDraw = false;
            }

            IsMouseVisible = Memory.IsMouseVisible;
        }
예제 #2
0
 protected override void Draw(GameTime gameTime)
 {
     ModuleHandler.Draw(gameTime);
     base.Draw(gameTime);
     //if (Input.GetInputDelayed(Keys.F1))  //SCREENSHOT CAPABILITIES WIP; I'm leaving it as-is for now. I'll be probably using that for battle transitions (or not)
     //{
     //Texture2D tex = new Texture2D(graphics.GraphicsDevice, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color);
     //byte[] b = new byte[tex.Width * tex.Height * 4];
     //graphics.GraphicsDevice.GetBackBufferData<byte>(b);
     //tex.SetData(b);
     //    tex.SaveAsJpeg(new System.IO.FileStream("D:/test.jpg", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite), tex.Width, tex.Height);
     //}
 }
예제 #3
0
        protected override void Draw(GameTime gameTime)
        {
            ModuleHandler.Draw(gameTime);
            base.Draw(gameTime);
            if (!Extended.bRequestedBackBuffer)
            {
                return;
            }
            var tex = new Texture2D(_graphics.GraphicsDevice, _graphics.GraphicsDevice.Viewport.Width, _graphics.GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color);
            var b   = new byte[tex.Width * tex.Height * 4];

            _graphics.GraphicsDevice.GetBackBufferData(b);
            tex.SetData(b);
            Extended.BackBufferTexture    = tex;
            Extended.bRequestedBackBuffer = false;
            Extended.bBackBufferAvailable = true;
            Extended.postBackBufferDelegate();
        }