public EventWork7b(SAV7b sav) : base(sav) { Offset = sav.GetBlockOffset(BelugaBlockIndex.EventWork); // Zone @ 0x21A0 - 0x21AF (128 flags) // System @ 0x21B0 - 0x21EF (512 flags) -- is this really 256 instead, with another 256 region after for the small vanish? // Vanish @ 0x21F0 - 0x22AF (1536 flags) // Event @ 0x22B0 - 0x23A7 (rest of the flags) (512) -- I think trainer flags are afterwards.... For now, this is a catch-all // time flags (39 used flags of 42) = 6 bytes 0x22F0-0x22F5 // trainer flags (???) = 0x22F6 - end? }
public SaveBlockAccessor7b(SAV7b sav) { Zukan = new Zukan7b(sav, GetBlockOffset(BelugaBlockIndex.Zukan), 0x550); Config = new ConfigSave7b(sav, GetBlockOffset(BelugaBlockIndex.ConfigSave)); Items = new MyItem7b(sav, GetBlockOffset(BelugaBlockIndex.MyItem)); Storage = new PokeListHeader(sav, GetBlockOffset(BelugaBlockIndex.PokeListHeader)); Status = new MyStatus7b(sav, GetBlockOffset(BelugaBlockIndex.MyStatus)); Played = new PlayTime7b(sav, GetBlockOffset(BelugaBlockIndex.PlayTime)); Misc = new Misc7b(sav, GetBlockOffset(BelugaBlockIndex.Misc)); EventWork = new EventWork7b(sav, GetBlockOffset(BelugaBlockIndex.EventWork)); GiftRecords = new WB7Records(sav, GetBlockOffset(BelugaBlockIndex.WB7Record)); }
public PokeListHeader(SAV7b sav, int offset) : base(sav) { Offset = offset; PokeListInfo = LoadPointerData(); if (!sav.Exportable) { for (int i = 0; i < COUNT; i++) { PokeListInfo[i] = SLOT_EMPTY; } } PartyCount = PokeListInfo.Take(6).Count(z => z < MAX_SLOTS); }
public EventWork7b(SAV7b sav, int offset) : base(sav) { Offset = offset; // Zone @ 0x21A0 - 0x21AF (128 flags) // System @ 0x21B0 - 0x21EF (512 flags) -- is this really 256 instead, with another 256 region after for the small vanish? // Vanish @ 0x21F0 - 0x22AF (1536 flags) // Event @ 0x22B0 - 0x23A7 (rest of the flags) (512) -- I think trainer flags are afterwards.... For now, this is a catch-all // time flags (39 used flags of 42) = 6 bytes 0x22F0-0x22F5 // trainer flags (???) = 0x22F6 - end? // Title flags @ 0x2498 - 0x24AB (160 flags): unlocked Master Trainer Titles (last 4 unused) }
private static IEnumerable <ComboItem> GetFilteredSpecies(IGameValueLimit sav, GameDataSource source, bool HaX = false) { if (HaX) { return(source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID)); } // Some games cannot acquire every Species that exists. Some can only acquire a subset. return(sav switch { SAV7b _ => source.SpeciesDataSource // LGPE: Kanto 151, Meltan/Melmetal .Where(s => s.Value <= (int)Core.Species.Mew || s.Value == (int)Core.Species.Meltan || s.Value == (int)Core.Species.Melmetal), _ => source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID) });
public PokeListHeader(SAV7b sav, int offset) : base(sav) { Offset = offset; var info = PokeListInfo = LoadPointerData(); if (!sav.State.Exportable) { for (int i = 0; i < COUNT; i++) { info[i] = SLOT_EMPTY; } } else { for (int i = 0; i < 6; i++) { if (info[i] < MAX_SLOTS) { ++_partyCount; } } } }
public Misc7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
public PlayTime7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
protected override int DexLangIDCount => 9; // CHT, skipping langID 6 (unused) public Zukan7b(SAV7b sav, int dex, int langflag) : base(sav, dex, langflag) { }
public WB7Records(SAV7b sav, int offset) : base(sav) => Offset = offset;
public MyStatus7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
protected Zukan7(SAV7b sav, int dex, int langflag) : this(sav, dex, langflag, DexFormUtil.GetDexFormIndexGG) { }
public CaptureRecords(SAV7b sav, int offset) : base(sav) => Offset = offset;
public ConfigSave7b(SAV7b sav) : base(sav) { Offset = sav.GetBlockOffset(BelugaBlockIndex.ConfigSave); }
/* ===First 8 bits=== * talkSpeed:2 * battleAnim:1 * battleStyle:1 * language:4 * * everything else: unknown */ public ConfigSave7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
private const int Key = 0x0B38; // 6 public MyItem7b(SAV7b sav, int offset) : base(sav) => Offset = offset;