public SaveBlockAccessor8LA(SAV8LA sav) { BlockInfo = sav.AllBlocks; BoxInfo = new Box8(sav, GetBlock(KBox)); PokedexSave = new PokedexSave8a(sav, GetBlock(KZukan)); BoxLayout = new BoxLayout8a(sav, GetBlock(KBoxLayout)); PartyInfo = new Party8a(sav, GetBlock(KParty)); MyStatus = new MyStatus8a(sav, GetBlock(KMyStatus)); Items = new MyItem8a(sav, GetBlock(KItemRegular)); AdventureStart = new AdventureStart8a(sav, GetBlock(KAdventureStart)); LastSaved = new LastSaved8a(sav, GetBlock(KLastSaved)); Played = new PlayTime8a(sav, GetBlock(KPlayTime)); Coordinates = new Coordinates8a(sav, GetBlock(KCoordinates)); FashionPlayer = new PlayerFashion8a(sav, GetBlock(KFashionPlayer)); }
public SAV_Trainer8a(SAV8LA sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV8LA)(Origin = sav).Clone(); if (Main.Unicode) { TB_OTName.Font = FontUtil.GetPKXFont(); } B_MaxCash.Click += (_, _) => MT_Money.Text = SAV.MaxMoney.ToString(); CB_Gender.Items.Clear(); CB_Gender.Items.AddRange(Main.GenderSymbols.Take(2).ToArray()); // m/f depending on unicode selection GetComboBoxes(); GetTextBoxes(); }
public SAV_PokedexLA(SAV8LA sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV8LA)(Origin = sav).Clone(); Dex = SAV.Blocks.PokedexSave; var speciesNames = GameInfo.Strings.Species; CHK_SeenWild = new[] { CHK_S0, CHK_S1, CHK_S2, CHK_S3, CHK_S4, CHK_S5, CHK_S6, CHK_S7 }; CHK_Obtained = new[] { CHK_O0, CHK_O1, CHK_O2, CHK_O3, CHK_O4, CHK_O5, CHK_O6, CHK_O7 }; CHK_CaughtWild = new[] { CHK_C0, CHK_C1, CHK_C2, CHK_C3, CHK_C4, CHK_C5, CHK_C6, CHK_C7 }; TaskControls = new [] { PRT_1, PRT_2, PRT_3, PRT_4, PRT_5, PRT_6, PRT_7, PRT_8, PRT_9, PRT_10, }; foreach (var tc in TaskControls) { tc.Visible = false; tc.SetStrings(TaskDescriptions, SpeciesQuests, TimeTaskDescriptions); } SpeciesToDex = new int[SAV.Personal.MaxSpeciesID + 1]; var maxDex = 0; for (var s = 1; s <= SAV.Personal.MaxSpeciesID; s++) { var hisuiDex = PokedexSave8a.GetDexIndex(PokedexType8a.Hisui, s); if (hisuiDex == 0) { continue; } SpeciesToDex[s] = hisuiDex; if (hisuiDex > maxDex) { maxDex = hisuiDex; } } DexToSpecies = new int[maxDex + 1]; for (var s = 1; s <= SAV.Personal.MaxSpeciesID; s++) { if (SpeciesToDex[s] != 0) { DexToSpecies[SpeciesToDex[s]] = s; } } Editing = true; // Clear Listbox and ComboBox LB_Species.Items.Clear(); CB_Species.Items.Clear(); // Fill List CB_Species.InitializeBinding(); var species = GameInfo.FilteredSources.Species.Where(z => PokedexSave8a.GetDexIndex(PokedexType8a.Hisui, z.Value) != 0).ToArray(); CB_Species.DataSource = new BindingSource(species, null); CB_DisplayForm.InitializeBinding(); DisplayedForms = new List <ComboItem> { new(GameInfo.Strings.types[0], 0) }; CB_DisplayForm.DataSource = new BindingSource(DisplayedForms, null); for (var d = 1; d < DexToSpecies.Length; d++) { LB_Species.Items.Add($"{d:000} - {speciesNames[DexToSpecies[d]]}"); } Editing = false; LB_Species.SelectedIndex = 0; CB_Species.KeyDown += WinFormsUtil.RemoveDropCB; CanSave = true; }
public PlayTime8a(SAV8LA sav, SCBlock block) : base(sav, block.Data) { }
public MyItem8a(SAV8LA SAV, SCBlock block) : base(SAV, block.Data) { }
public MyStatus8a(SAV8LA sav, SCBlock block) : base(sav, block.Data) { }
public SAV_PokedexResearchEditorLA(SAV8LA sav, int species, int dexIdx, IReadOnlyList <string> tasks, IReadOnlyList <string> timeTasks) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV8LA)(Origin = sav).Clone(); Dex = SAV.Blocks.PokedexSave; Species = species; L_Species.Text = GameInfo.Strings.Species[species]; #region Declare Arrays Label[] taskLabels = { L_Catch, L_CatchAlpha, L_CatchLarge, L_CatchSmall, L_CatchHeavy, L_CatchLight, L_CatchAtTime, L_CatchSleeping, L_CatchInAir, L_CatchNotSpotted, L_UseMove0, L_UseMove1, L_UseMove2, L_UseMove3, L_DefeatWithMove0, L_DefeatWithMove1, L_DefeatWithMove2, L_Defeat, L_StrongStyle, L_AgileStyle, L_Evolve, L_GiveFood, L_Stun, L_Scare, L_Lure, L_LeapTrees, L_LeapLeaves, L_LeapSnow, L_LeapOre, L_LeapTussocks, }; TaskNUPs = new[] { NUP_Catch, NUP_CatchAlpha, NUP_CatchLarge, NUP_CatchSmall, NUP_CatchHeavy, NUP_CatchLight, NUP_CatchAtTime, NUP_CatchSleeping, NUP_CatchInAir, NUP_CatchNotSpotted, NUP_UseMove0, NUP_UseMove1, NUP_UseMove2, NUP_UseMove3, NUP_DefeatWithMove0, NUP_DefeatWithMove1, NUP_DefeatWithMove2, NUP_Defeat, NUP_StrongStyle, NUP_AgileStyle, NUP_Evolve, NUP_GiveFood, NUP_Stun, NUP_Scare, NUP_Lure, NUP_LeapTrees, NUP_LeapLeaves, NUP_LeapSnow, NUP_LeapOre, NUP_LeapTussocks, }; TaskTypes = new[] { Catch, CatchAlpha, CatchLarge, CatchSmall, CatchHeavy, CatchLight, CatchAtTime, CatchSleeping, CatchInAir, CatchNotSpotted, UseMove, UseMove, UseMove, UseMove, DefeatWithMoveType, DefeatWithMoveType, DefeatWithMoveType, Defeat, UseStrongStyleMove, UseAgileStyleMove, Evolve, GiveFood, StunWithItems, ScareWithScatterBang, LureWithPokeshiDoll, LeapFromTrees, LeapFromLeaves, LeapFromSnow, LeapFromOre, LeapFromTussocks, }; TaskIndexes = new[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; TaskParameters = new int[TaskIndexes.Length]; InitializeTaskParameters(dexIdx); #endregion // Initialize labels/values for (int i = 0; i < taskLabels.Length; i++) { taskLabels[i].Text = PokedexResearchTask8aExtensions.GetGenericTaskLabelString(TaskTypes[i], TaskIndexes[i], TaskParameters[i], tasks, timeTasks); Dex.GetResearchTaskProgressByForce(Species, TaskTypes[i], TaskIndexes[i], out var curValue); TaskNUPs[i].Value = curValue; } // Detect empty WasEmpty = IsEmpty(); }
private const int StringMaxLength = SAV6.LongStringLength / 2; // 0x22 bytes public BoxLayout8a(SAV8LA sav, SCBlock block) : base(sav, block.Data) { }
public Party8a(SAV8LA sav, SCBlock block) : base(sav, block.Data) { }