public BoxPokeBox(IPokePC pokePC, uint boxNumber, byte[] rawName, bool boxA, PokeBoxWallpapers wallpaper, byte[] storage) { this.pokePC = pokePC; this.boxNumber = boxNumber; this.rawName = rawName; this.boxA = boxA; this.wallpaper = wallpaper; this.pokemonList = new IPokemon[30]; for (int i = 0; i < 30; i++) { int boxIndex = (i % 6) + (i / 6) * 12 + (!boxA ? 6 : 0); BoxPokemon pkm = new BoxPokemon(ByteHelper.SubByteArray(boxIndex * 84, storage, 84)); if (pkm.Experience != 0 && pkm.SpeciesID != 0 && pkm.Checksum != 0) { if (pkm.IsValid) { pokemonList[i] = pkm; } else { pokemonList[i] = BoxPokemon.CreateInvalidPokemon(pkm); } pokemonList[i].PokeContainer = this; } } }
public XDPokeBox(IPokePC pokePC, byte boxNumber, byte[] data) { this.pokePC = pokePC; this.raw = data; this.boxNumber = boxNumber; this.wallpaper = (PokeBoxWallpapers)boxNumber; this.pokemonStorage = new PokemonStorage(ByteHelper.SubByteArray(20, data, 196 * 30), PokemonFormatTypes.Gen3XD, this); }
public GBAPokeBox(IPokePC pokePC, uint boxNumber, byte[] rawName, PokeBoxWallpapers wallpaper) { this.pokePC = pokePC; this.boxNumber = boxNumber; this.rawName = rawName; this.wallpaper = wallpaper; this.pokemonStorage = new PokemonStorage(new byte[2400], PokemonFormatTypes.Gen3GBA, this); }
public ManagerPokeBox(IPokePC pokePC, uint boxNumber, string name, PokeBoxWallpapers wallpaper) { this.pokePC = pokePC; this.boxNumber = boxNumber; this.name = name; this.wallpaper = wallpaper; this.usingCustomWallpaper = false; this.wallpaperName = ((ManagerPokeBoxWallpapers)wallpaper).ToString(); this.pokemonList = new GBAPokemon[30]; }
public GBAPokeBox(IPokePC pokePC, uint boxNumber, byte[] rawName, PokeBoxWallpapers wallpaper, byte[] storage) { if (storage.Length != 2400) { throw new Exception("GBA Storage size should be 2400 bytes"); } this.pokePC = pokePC; this.boxNumber = boxNumber; this.rawName = rawName; this.wallpaper = wallpaper; this.pokemonStorage = new PokemonStorage(storage, PokemonFormatTypes.Gen3GBA, this); }
public void Load(byte[] data) { this.raw = data; this.boxes = new BoxPokeBox[25 * 2]; // Since boxes are still stored in sets of 30 and not 60 in this program this.currentBox = (int)(LittleEndian.ToUInt32(data, 0) * 2); for (int i = 0; i < 25; i++) { byte[] boxSetData = ByteHelper.SubByteArray(4 + i * 60 * 84, data, 60 * 84); PokeBoxWallpapers wallpaper = (PokeBoxWallpapers)data[4 + 1500 * 84 + 225 + i]; byte[] nameRaw = ByteHelper.SubByteArray(4 + 1500 * 84 + i * 9, data, 9); boxes[i * 2] = new BoxPokeBox(this, (byte)(i * 2), nameRaw, true, wallpaper, boxSetData); boxes[i * 2 + 1] = new BoxPokeBox(this, (byte)(i * 2 + 1), nameRaw, false, wallpaper, boxSetData); } }
public BoxPokeBox(IPokePC pokePC, uint boxNumber, byte[] rawName, bool boxA, PokeBoxWallpapers wallpaper, byte[] storage) { this.pokePC = pokePC; this.boxNumber = boxNumber; this.rawName = rawName; this.boxA = boxA; this.wallpaper = wallpaper; this.pokemonList = new IPokemon[30]; for (int i = 0; i < 30; i++) { int boxIndex = (i % 6) + (i / 6) * 12 + (!boxA ? 6 : 0); BoxPokemon pkm = new BoxPokemon(ByteHelper.SubByteArray(boxIndex * 84, storage, 84)); if (pkm.Experience != 0 && pkm.SpeciesID != 0 && pkm.Checksum != 0) { if (pkm.IsValid) pokemonList[i] = pkm; else pokemonList[i] = BoxPokemon.CreateInvalidPokemon(pkm); pokemonList[i].PokeContainer = this; } } }
public void AddBox(string name, PokeBoxWallpapers wallpaper) { AddBox(new ManagerPokeBox(this, (byte)boxes.Count, name, wallpaper)); }
public void AddBox(PokeBoxWallpapers wallpaper) { AddBox(new ManagerPokeBox(this, (byte)boxes.Count, "BOX" + (boxes.Count + 1).ToString(), wallpaper)); }