internal static void Input() { if (Input2.Button(FF8TextTagKey.Up) /* || shift.Y > 0*/) { if (fulscrMapCurY < 0.070f) { fulscrMapCurY = 0.870f; } fulscrMapCurY -= 0.005f * (float)Memory.ElapsedGameTime.TotalMilliseconds / 25.0f; } else if (Input2.Button(FF8TextTagKey.Down) /* || shift.Y < 0*/) { if (fulscrMapCurY > 0.870f) { fulscrMapCurY = 0.070f; } fulscrMapCurY += 0.005f * (float)Memory.ElapsedGameTime.TotalMilliseconds / 25.0f; } if (Input2.Button(FF8TextTagKey.Left) /*|| shift.X < 0*/) { if (fulscrMapCurX < 0.145f) { fulscrMapCurX = 0.745f; } fulscrMapCurX -= 0.003f * (float)Memory.ElapsedGameTime.TotalMilliseconds / 25.0f; } else if (Input2.Button(FF8TextTagKey.Right) /* || shift.X > 0*/) { if (fulscrMapCurX > 0.745) { fulscrMapCurX = 0.145f; } fulscrMapCurX += 0.003f * (float)Memory.ElapsedGameTime.TotalMilliseconds / 25.0f; } }
public override void Inputs_Left() { if (Input2.Button(MouseButtons.MouseWheelup) || Col == 0) { PAGE_PREV(); Refresh(); } else { CURSOR_SELECT -= Rows; } base.Inputs_Left(); }
public override void Inputs_Right() { if (Input2.Button(MouseButtons.MouseWheeldown) || Col == Cols - 1) { PAGE_NEXT(); Refresh(); } else { CURSOR_SELECT += Rows; } base.Inputs_Right(); }
public static void Update() { if (!bInitialized) { fps_camera = new FPS_Camera(); //init renderer effect = new BasicEffect(Memory.graphics.GraphicsDevice); effect.EnableDefaultLighting(); effect.TextureEnabled = true; effect.DirectionalLight0.Enabled = true; effect.DirectionalLight1.Enabled = false; effect.DirectionalLight2.Enabled = false; effect.DirectionalLight0.Direction = new Vector3( -0.349999f, 0.499999f, -0.650000f ); effect.DirectionalLight0.SpecularColor = new Vector3(0.8500003f, 0.8500003f, 0.8500003f); effect.DirectionalLight0.DiffuseColor = new Vector3(1.54999f, 1.54999f, 1.54999f); camTarget = new Vector3(0, 0f, 0f); camPosition = new Vector3(0, 0f, 0f); projectionMatrix = Matrix.CreatePerspectiveFieldOfView( MathHelper.ToRadians(60), Memory.graphics.GraphicsDevice.Viewport.AspectRatio, 1f, 10000f); viewMatrix = Matrix.CreateLookAt(camPosition, camTarget, new Vector3(0f, 1f, 0f)); // Y up //worldMatrix = Matrix.CreateWorld(camTarget, Vector3. // Forward, Vector3.Up); worldMatrix = Matrix.CreateTranslation(0, 0, 0); //temporarily disabling this, because I'm getting more and more tired of this music playing over and over when debugging //Memory.musicIndex = 30; //init_debugger_Audio.PlayMusic(); ate = new AlphaTestEffect(Memory.graphics.GraphicsDevice) { Projection = projectionMatrix, View = viewMatrix, World = worldMatrix, FogEnabled = false, FogColor = Color.CornflowerBlue.ToVector3(), FogStart = 9.75f, FogEnd = renderCamDistance }; bInitialized = true; } if (lastFieldId != Memory.FieldHolder.FieldID) { ReInit(); } viewMatrix = fps_camera.Update(ref camPosition, ref camTarget, ref degrees); if (Input2.Button(MouseButtons.LeftButton, ButtonTrigger.OnRelease)) { debugModelId++; } if (Input2.Button(Microsoft.Xna.Framework.Input.Keys.F1, ButtonTrigger.OnRelease)) { ReInit(); } if (Input2.Button(Microsoft.Xna.Framework.Input.Keys.F2, ButtonTrigger.OnPress)) { Memory.FieldHolder.FieldID++; } if (Input2.Button(Microsoft.Xna.Framework.Input.Keys.F3, ButtonTrigger.OnPress)) { Memory.FieldHolder.FieldID--; } if (Input2.Button(Microsoft.Xna.Framework.Input.Keys.F4, ButtonTrigger.OnPress)) { animId++; animFrame = 0; } timer += (float)Memory.gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0f; if (timer > 0.033f) { animFrame++; timer = 0f; } }