public override bool Inputs() { bool ret = false; if (CONTAINER.Pos.Contains(MouseLocation)) { if (Input2.DelayedButton(MouseButtons.MouseWheelup)) { PageLeft(); ret = true; } else if (Input2.DelayedButton(MouseButtons.MouseWheeldown)) { PageRight(); ret = true; } if (ret) { if (!skipsnd) { init_debugger_Audio.PlaySound(0); } } } if (!ret) { ret = base.Inputs(); } if (ret) { CheckMode(); } return(ret); }
public static void Update() { #if DEBUG // lets you move through all the feilds just holding left or right. it will just loop when it runs out. if (Input2.DelayedButton(FF8TextTagKey.Left)) { init_debugger_Audio.PlaySound(0); Module_main_menu_debug.FieldPointer--; ResetField(); } if (Input2.DelayedButton(FF8TextTagKey.Right)) { init_debugger_Audio.PlaySound(0); Module_main_menu_debug.FieldPointer++; ResetField(); } #endif switch (mod) { case Field_mods.INIT: Init(); break; case Field_mods.DEBUGRENDER: UpdateScript(); break; //await events here case Field_mods.DISABLED: break; } }
public static void Update() { if (Input2.DelayedButton(FF8TextTagKey.Confirm) || Input2.DelayedButton(FF8TextTagKey.Cancel) || Input2.DelayedButton(Keys.Space)) { AV.Music.Stop(); Memory.Module = MODULE.MAINMENU_DEBUG; } switch (publicModule) { case OverturepublicModule._0InitSound: InitSound(); break; case OverturepublicModule._1WaitBeforeFirst: Memory.SuppressDraw = true; WaitForFirst(); break; case OverturepublicModule._2PlaySequence: SplashUpdate(ref splashIndex); break; case OverturepublicModule._4Squaresoft: publicModule = OverturepublicModule._0InitSound; Module_movie_test.Index = 104;//104 is SE logo in steam release. Module_movie_test.ReturnState = MODULE.OVERTURE_DEBUG; Memory.Module = MODULE.MOVIETEST; break; case OverturepublicModule._5Reset: ResetModule(); Update(); return; } }
public override bool Inputs() { skipsnd = true; if (Input2.DelayedButton(FF8TextTagKey.RotateRight)) { Inputs_OKAY(); return(true); } return(base.Inputs()); }
public static void Update() { switch (currentMode) { case Mode.Initialize: Initialize(); currentMode++; break; case Mode.Draw: currentMode++; break; case Mode.Wait: if (Input2.DelayedButton(InputActions.Cancel)) { Memory.Module = OpenVIII.Module.MainMenuDebug; return; } //time += Memory.gameTime.ElapsedGameTime; //if (time > totaltime) //{ // currentMode--; // time = TimeSpan.Zero; //} //else if (pointer < 0 || Input2.DelayedButton(Button_Flags.Right, ButtonTrigger.OnPress | ButtonTrigger.Force)) { pointer++; if (pointer >= CardValue.Length) { pointer = 0; } currentMode--; } else if (Input2.DelayedButton(Button_Flags.Left, ButtonTrigger.OnPress | ButtonTrigger.Force)) { pointer--; if (pointer < 0) { pointer = CardValue.Length - 1; } currentMode--; } else { Memory.SuppressDraw = true; } break; } }
private static bool UpdateLGChooseSlot() { bool ret = false; for (int i = 0; i < SlotLocs.Length; i++) { if (SlotLocs[i] != null && SlotLocs[i].Item1.Contains(ml)) { SlotLoc = (sbyte)i; ret = true; if (Input2.Button(MouseButtons.MouseWheelup) || Input2.Button(MouseButtons.MouseWheeldown)) { return(ret); } break; } } if (Input2.DelayedButton(FF8TextTagKey.Down)) { init_debugger_Audio.PlaySound(0); SlotLoc++; ret = true; } else if (Input2.DelayedButton(FF8TextTagKey.Up)) { init_debugger_Audio.PlaySound(0); SlotLoc--; ret = true; } if (Input2.DelayedButton(FF8TextTagKey.Cancel)) { init_debugger_Audio.PlaySound(8); init_debugger_Audio.StopMusic(); Dchoose = 0; Fade = 0.0f; State = MainMenuStates.MainLobby; ret = true; } else if (Input2.DelayedButton(FF8TextTagKey.Confirm)) { PercentLoaded = 0f; State = MainMenuStates.LoadGameCheckingSlot; } return(ret); }
public static void Inputs() { var files = Files.Instance; if (Input2.DelayedButton(FF8TextTagKey.Confirm) || Input2.DelayedButton(FF8TextTagKey.Cancel) || Input2.DelayedButton(Keys.Space)) { Return(); } #if DEBUG // lets you move through all the fields just holding left or right. it will just loop // when it runs out. else if (Input2.DelayedButton(FF8TextTagKey.Left)) { Sound.Play(0); if (Index > 0) { Index--; } else { Index = files.Count - 1; } Reset(); } else if (Input2.DelayedButton(FF8TextTagKey.Right)) { Sound.Play(0); if (Index < files.Count - 1) { Index++; } else { Index = 0; } Reset(); } #endif }
private bool InputBattleFunction() { bool ret = false; if (BoolRenzokeken()) { return(GetOneRenzokeken().Inputs()); } foreach (Menu m in menus.Where(m => m.GetType().Equals(typeof(BattleMenu)) && m.Damageable.GetBattleMode().Equals(Damageable.BattleMode.YourTurn))) { ret = m.Inputs() || ret; if (ret) { return(ret); } } if (Input2.DelayedButton(FF8TextTagKey.Cancel)) { if (GetCurrentBattleMenu().Damageable.Switch()) { int cnt = 0; do { if (++_player > 2) { _player = 0; } if (++cnt > 6) { return(false); } }while (menus.Count <= _player || menus[_player] == null || menus[_player].GetType() != typeof(BattleMenu) || !GetCurrentBattleMenu().Damageable.StartTurn()); NewTurnSND(); } } return(ret); }
public static void Update() { if (Input2.DelayedButton(FF8TextTagKey.Confirm) || Input2.DelayedButton(FF8TextTagKey.Cancel) || Input2.DelayedButton(Keys.Space)) { init_debugger_Audio.StopMusic(); Memory.module = MODULE.MAINMENU_DEBUG; } switch (publicModule) { case OverturepublicModule._0InitSound: InitSound(); break; case OverturepublicModule._1WaitBeforeFirst: Memory.SuppressDraw = true; WaitForFirst(); break; case OverturepublicModule._2PlaySequence: SplashUpdate(ref splashIndex); break; } }
public static void Update() { switch (currentMode) { case Mode.Initialize: Initialize(); currentMode++; break; case Mode.Draw: pointer++; if (pointer >= FaceValue.Length) { pointer = 0; } currentMode++; break; case Mode.Wait: if (Input2.DelayedButton(InputActions.Cancel)) { Memory.Module = OpenVIII.Module.MainMenuDebug; return; } time += Memory.ElapsedGameTime; if (time > TimeSpan.FromMilliseconds(2000)) { currentMode--; time = TimeSpan.Zero; } else { Memory.SuppressDraw = true; } break; } }
public static void Inputs() { if (Input2.DelayedButton(FF8TextTagKey.Confirm) || Input2.DelayedButton(FF8TextTagKey.Cancel) || Input2.DelayedButton(Keys.Space)) { Return(); } #if DEBUG // lets you move through all the feilds just holding left or right. it will just loop // when it runs out. else if (Input2.DelayedButton(FF8TextTagKey.Left)) { init_debugger_Audio.PlaySound(0); if (Module_movie_test.Index > 0) { Module_movie_test.Index--; } else { Module_movie_test.Index = Movie.Files.Count - 1; } Reset(); } else if (Input2.DelayedButton(FF8TextTagKey.Right)) { init_debugger_Audio.PlaySound(0); if (Module_movie_test.Index < Movie.Files.Count - 1) { Module_movie_test.Index++; } else { Module_movie_test.Index = 0; } Reset(); } #endif }
public static void Update() { if (Input2.DelayedButton(InputActions.Cancel)) { Memory.Module = OpenVIII.Module.MainMenuDebug; return; } if (Input2.DelayedButton(new InputButton() { Key = Keys.OemMinus, Trigger = ButtonTrigger.Press }) || Input2.DelayedButton(new InputButton() { Key = Keys.Subtract, Trigger = ButtonTrigger.Press })) { if (zoom - 1 < 1f) { zoom = 1f; } else { zoom--; } Show(); } if (Input2.DelayedButton(new InputButton() { Key = Keys.OemPlus, Trigger = ButtonTrigger.Press }) || Input2.DelayedButton(new InputButton() { Key = Keys.Add, Trigger = ButtonTrigger.Press })) { if (zoom + 1 > 100f) { zoom = 100f; } else { zoom++; } Show(); } if (Input2.DelayedButton(FF8TextTagKey.Up)) { if (palette <= 0) { palette = (int)Memory.Icons.PaletteCount - 1; } else { palette--; } Show(); } if (Input2.DelayedButton(FF8TextTagKey.Down)) { if (palette >= Memory.Icons.PaletteCount - 1) { palette = 0; } else { palette++; } Show(); } if (Input2.DelayedButton(FF8TextTagKey.Right) || Input2.Button(Keys.PageDown)) { do { if (icon >= Enum.GetValues(typeof(Icons.ID)).Cast <Icons.ID>().Max()) { icon = 0; } else { icon++; } }while (Memory.Icons.GetEntry(icon) == null); Show(); } if (Input2.DelayedButton(FF8TextTagKey.Left) || Input2.Button(Keys.PageUp)) { do { if (icon <= 0) { icon = Enum.GetValues(typeof(Icons.ID)).Cast <Icons.ID>().Max(); } //else if (Memory.Icons.GetEntry(icon) != null && Memory.Icons.GetEntry(icon).GetLoc.Count > 1) // icon -= Memory.Icons.GetEntry(icon).GetLoc.Count; else { icon--; } }while (Memory.Icons.GetEntry(icon) == null); Show(); } switch (currentMode) { case Mode.Initialize: //SaveStringToFile(); currentMode++; break; case Mode.Draw: currentMode++; break; case Mode.Wait: Memory.SuppressDraw = true; break; } }
public static async void Update(GameTime gameTime) { if (lastModule != module) { GC.Collect(); GC.WaitForPendingFinalizers(); lastModule = module; } module = Memory.module; #if DEBUG if (Input2.DelayedButton(FF8TextTagKey.Reset) || Input2.DelayedButton(FF8TextTagKey.Cancel)) { if (Memory.module != MODULE.MAINMENU_DEBUG && Memory.module != MODULE.BATTLE_DEBUG) { Memory.module = MODULE.MAINMENU_DEBUG; InputMouse.Mode = MouseLockMode.Screen; } } #endif switch (module) { //doesn't need memory case MODULE.OVERTURE_DEBUG: case MODULE.MOVIETEST: break; default: //requires memory to be loaded. if ((Memory.InitTask != null) && (Memory.InitTask.IsCompleted == false || Memory.InitTask.Status == TaskStatus.Running || Memory.InitTask.Status == TaskStatus.WaitingToRun || Memory.InitTask.Status == TaskStatus.WaitingForActivation)) { //task is still running loading assets blank screen and wait. Memory.SuppressDraw = true; await Memory.InitTask; //fade in doesn't happen because time was set before the await. //ending here causes update to be run again with new time return; } break; } switch (module) { case MODULE.BATTLE: module_battle.Update(); break; case MODULE.BATTLE_DEBUG: Module_battle_debug.Update(); break; case MODULE.MOVIETEST: Module_movie_test.Update(); break; case MODULE.FIELD_DEBUG: Module_field_debug.Update(); break; case MODULE.OVERTURE_DEBUG: Module_overture_debug.Update(); break; case MODULE.MAINMENU_DEBUG: Module_main_menu_debug.Update(); break; case MODULE.WORLD_DEBUG: Module_world_debug.Update(gameTime); break; case MODULE.FACE_TEST: Module_face_test.Update(); break; case MODULE.ICON_TEST: Module_icon_test.Update(); break; case MODULE.CARD_TEST: Module_card_test.Update(); break; } }
public static async void Update(GameTime gameTime) { if (lastModule != module) { //got stuck on this once had to force close. //GC.Collect(); //GC.WaitForPendingFinalizers(); lastModule = module; } module = Memory.Module; //#if DEBUG if (Input2.DelayedButton(FF8TextTagKey.Reset)) // || Input2.DelayedButton(FF8TextTagKey.Cancel)) { if (Memory.Module != Module.MainMenuDebug) // && Memory.Module != Module.BattleDebug) { Memory.Module = Module.MainMenuDebug; InputMouse.Mode = MouseLockMode.Screen; } } //#endif switch (module) { //doesn't need memory case Module.OvertureDebug: case Module.MovieTest: break; default: //requires memory to be loaded. if ((Memory.InitTask != null) && (Memory.InitTask.IsCompleted == false || Memory.InitTask.Status == TaskStatus.Running || Memory.InitTask.Status == TaskStatus.WaitingToRun || Memory.InitTask.Status == TaskStatus.WaitingForActivation)) { //task is still running loading assets blank screen and wait. Memory.SuppressDraw = true; await Memory.InitTask; //fade in doesn't happen because time was set before the await. //ending here causes update to be run again with new time return; } break; } switch (module) { case Module.Battle: ModuleBattle.Update(); break; case Module.BattleDebug: Menu.UpdateOnce(); ModuleBattleDebug.Update(); break; case Module.MovieTest: ModuleMovieTest.Update(); break; case Module.FieldDebug: Fields.Module.Update(); break; case Module.OvertureDebug: Module_overture_debug.Update(); break; case Module.MainMenuDebug: Menu.UpdateOnce(); Menu.Module.Update(); break; case Module.WorldDebug: Module_world_debug.Update(gameTime); break; case Module.FaceTest: Module_face_test.Update(); break; case Module.IconTest: Module_icon_test.Update(); break; case Module.CardTest: Module_card_test.Update(); break; case Module.FieldModelTest: Fields.ModuleFieldObjectTest.Update(); break; } }
public static void Update() { if (Input2.DelayedButton(FF8TextTagKey.Confirm) || Input2.DelayedButton(FF8TextTagKey.Cancel) || Input2.DelayedButton(Keys.Space)) { //init_debugger_Audio.StopAudio(); //Memory.module = MODULE.MAINMENU_DEBUG; MovieState = STATE_RETURN; } #if DEBUG // lets you move through all the feilds just holding left or right. it will just loop // when it runs out. if (Input2.DelayedButton(FF8TextTagKey.Left)) { init_debugger_Audio.PlaySound(0); Module_main_menu_debug.MoviePointer--; Reset(); } if (Input2.DelayedButton(FF8TextTagKey.Right)) { init_debugger_Audio.PlaySound(0); Module_main_menu_debug.MoviePointer++; Reset(); } #endif switch (MovieState) { case STATE_LOAD: MovieState++; LoadMovie(); break; case STATE_CLEAR: break; case STATE_STARTPLAY: MovieState++; if (FfccAudio != null) { FfccAudio.PlayInTask(); } if (FfccVideo != null) { FfccVideo.Play(); } break; case STATE_PLAYING: //if (FfccAudio != null && !FfccAudio.Ahead) //{ // // if we are behind the timer get the next frame of audio. // FfccAudio.Next(); //} if (FfccVideo == null) { MovieState = STATE_FINISHED; } else if (FfccVideo.Behind) { if (FfccVideo.Next() < 0) { MovieState = STATE_FINISHED; //Memory.SuppressDraw = true; break; } else if (frameTex != null) { frameTex.Dispose(); GC.Collect(); GC.WaitForPendingFinalizers(); frameTex = null; } } else { Memory.SuppressDraw = true; } if (frameTex == null) { if (FfccVideo != null) { if (Memory.State?.Fieldvars != null) { Memory.State.Fieldvars.FMVFrames = (ulong)FfccVideo.CurrentFrameNum; } frameTex = FfccVideo.Texture2D(); } } break; case STATE_PAUSED: //todo add a function to pause sound //pausing the stopwatch will cause the video to pause because it calcs the current frame based on time. break; case STATE_FINISHED: break; case STATE_RESET: Reset(); break; case STATE_RETURN: default: Reset(); Memory.module = ReturnState; ReturnState = MODULE.MAINMENU_DEBUG; break; } }