public PoffinCase4(SAV4Sinnoh sav) { SAV = sav; Offset = sav.OFS_PoffinCase; Poffins = ReadPoffins(SAV, Offset); }
private void ReadPoketch(SAV4Sinnoh s) { string[] PoketchTitle = Enum.GetNames(typeof(PoketchApp)); CB_CurrentApp.Items.AddRange(PoketchTitle); CB_CurrentApp.SelectedIndex = s.CurrentPoketchApp; CLB_Poketch.Items.Clear(); for (int i = 0; i < PoketchTitle.Length; i++) { var title = $"{i:00} - {PoketchTitle[i]}"; var val = s.GetPoketchAppUnlocked((PoketchApp)i); CLB_Poketch.Items.Add(title, val); } DotArtistByte = s.GetPoketchDotArtistData(); ColorTable = new byte[] { 248, 168, 88, 8 }; SetPictureBoxFromFlags(DotArtistByte); string tip = "Guide about D&D ImageFile Format"; tip += Environment.NewLine + " width = 24px"; tip += Environment.NewLine + " height = 20px"; tip += Environment.NewLine + " used color count <= 4"; tip += Environment.NewLine + " file size < 2058byte"; tip1.SetToolTip(PB_DotArtist, tip); TAB_Main.AllowDrop = true; }
public SAV_Underground(SaveFile sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV4Sinnoh)(Origin = sav).Clone(); GetUGScores(); }
private static void WritePoffins(SAV4Sinnoh sav, int offset, IReadOnlyList <Poffin4> poffins) { Debug.Assert(poffins.Count == Count); for (int i = 0; i < poffins.Count; i++) { sav.SetData(sav.General, poffins[i].Data, offset + (i * Poffin4.SIZE)); } }
private void SavePoketch(SAV4Sinnoh s) { s.CurrentPoketchApp = (sbyte)CB_CurrentApp.SelectedIndex; for (int i = 0; i < CLB_Poketch.Items.Count; i++) { var b = CLB_Poketch.GetItemChecked(i); s.SetPoketchAppUnlocked((PoketchApp)i, b); } s.SetPoketchDotArtistData(DotArtistByte); }
private static Poffin4[] ReadPoffins(SAV4Sinnoh sav, int offset) { var Poffins = new Poffin4[Count]; for (int i = 0; i < Poffins.Length; i++) { Poffins[i] = new Poffin4(sav.General, offset + (i * Poffin4.SIZE)); } return(Poffins); }
public void Initialize(SAV4Sinnoh sav) { Case = new PoffinCase4(sav); LB_Poffins.Items.Clear(); for (int i = 0; i < Case.Poffins.Length; i++) { LB_Poffins.Items.Add(GetPoffinText(i)); } LB_Poffins.SelectedIndex = 0; }
public SAV_Underground(SaveFile sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV4Sinnoh)(Origin = sav).Clone(); ugGoods = GameInfo.Strings.uggoods; ugSpheres = GameInfo.Strings.ugspheres; ugTraps = GameInfo.Strings.ugtraps; ugTreasures = GameInfo.Strings.ugtreasures; ugGoodsSorted = SanitizeList(ugGoods); ugTrapsSorted = SanitizeList(ugTraps); ugTreasuresSorted = SanitizeList(ugTreasures); InitializeDGV(); GetUGScores(); ReadUGData(); }
public SAV_HoneyTree(SAV4Sinnoh sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV4Sinnoh)(Origin = sav).Clone(); Table = SAV switch { SAV4DP _ => HoneyTree.TableDP, SAV4Pt _ => HoneyTree.TablePt, _ => throw new Exception() }; // Get Munchlax tree for this savegame in screen MunchlaxTrees = SAV.GetMunchlaxTrees(); const string sep = "- "; L_Tree0.Text = string.Join(Environment.NewLine, MunchlaxTrees.Select(z => sep + CB_TreeList.Items[z])); CB_TreeList.SelectedIndex = 0; }
public SAV_HoneyTree(SAV4Sinnoh sav) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); SAV = (SAV4Sinnoh)(Origin = sav).Clone(); if (SAV is SAV4DP) { Table = HoneyTree.TableDP; } else if (SAV is SAV4Pt) { Table = HoneyTree.TablePt; } // Get Munchlax tree for this savegame in screen MunchlaxTrees = SAV.GetMunchlaxTrees(); const string sep = "- "; L_Tree0.Text = string.Join(Environment.NewLine, MunchlaxTrees.Select(z => sep + CB_TreeList.Items[z])); CB_TreeList.SelectedIndex = 0; }