Scarlet and Violet Blueberry Clubroom Support Board + Style (#4162)

* Scarlet and Violet Blueberry Clubroom Support Board + Style

* Sync to master

* Fix BaseballClub2TwirlingNinja Flags

---------

Co-authored-by: Kurt <kaphotics@gmail.com>
This commit is contained in:
Jonathan Herbert 2024-01-15 23:29:39 -04:00 committed by GitHub
parent fe1a5750dc
commit 5a5ce7c273
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 103 additions and 12 deletions

View file

@ -2029,7 +2029,6 @@ public sealed class SaveBlockAccessor9SV : SCBlockAccessor, ISaveBlock9Main
private const uint KGameClearIndigoDisk = 0x0DDBBAAF; // FSYS_SCENARIO_GAME_CLEAR_SU2
private const uint KBlueberryClubRoom = 0x08290F0F;
public const uint KThrowStyle = 0xD86EB052;
// ItemMachineSave

View file

@ -446,9 +446,11 @@ public sealed class SAV9SV : SaveFile, ISaveBlock9Main, ISCBlockArray, ISaveFile
}
// Update Support Board
BlueberryClubRoom.BaseballClub2Done = true;
BlueberryClubRoom.BaseballClub2Unread = false;
BlueberryClubRoom.BaseballClub3Done = true;
BlueberryClubRoom.BaseballClub3Unread = false;
BlueberryClubRoom.SupportBoard.BaseballClub1SmugElegantPurchased = true;
BlueberryClubRoom.SupportBoard.BaseballClub1SmugElegantUnread = false;
BlueberryClubRoom.SupportBoard.BaseballClub2TwirlingNinjaPurchased = true;
BlueberryClubRoom.SupportBoard.BaseballClub2TwirlingNinjaUnread = false;
BlueberryClubRoom.SupportBoard.BaseballClub3ChampionPurchased = true;
BlueberryClubRoom.SupportBoard.BaseballClub3ChampionUnread = false;
}
}

View file

@ -6,12 +6,102 @@ public sealed class BlueberryClubRoom9(SAV9SV sav, SCBlock block) : SaveBlock<SA
{
private Span<byte> Span => Data.AsSpan();
public bool BaseballClub1Done { get => Span[0x04] == 1; set => Span[0x04] = value ? (byte)1 : (byte)0; }
public bool BaseballClub1Unread { get => Span[0x05] == 1; set => Span[0x05] = value ? (byte)1 : (byte)0; }
public BlueberrySupportBoard9 SupportBoard = new(block.Data.AsMemory()[0x00..0x38]);
public bool BaseballClub2Done { get => Span[0x06] == 1; set => Span[0x06] = value ? (byte)1 : (byte)0; }
public bool BaseballClub2Unread { get => Span[0x07] == 1; set => Span[0x07] = value ? (byte)1 : (byte)0; }
public bool BaseballClub3Done { get => Span[0x08] == 1; set => Span[0x08] = value ? (byte)1 : (byte)0; }
public bool BaseballClub3Unread { get => Span[0x09] == 1; set => Span[0x09] = value ? (byte)1 : (byte)0; }
public BlueberryClubRoomStyle9 CurrentStyle { get => (BlueberryClubRoomStyle9)Span[0xE6C]; set => Span[0xE6C] = (byte)value; }
}
public sealed class BlueberrySupportBoard9(Memory<byte> Data)
{
private Span<byte> Span => Data.Span;
private bool GetBoolean(int index) => Span[index] == 1;
private void SetBoolean(int index, bool value) => Span[index] = value ? (byte)1 : (byte)0;
public bool BaseballClub1SmugElegantPurchased { get => GetBoolean(0x04); set => SetBoolean(0x04, value); }
public bool BaseballClub1SmugElegantUnread { get => GetBoolean(0x05); set => SetBoolean(0x05, value); }
public bool BaseballClub2TwirlingNinjaPurchased { get => GetBoolean(0x06); set => SetBoolean(0x06, value); }
public bool BaseballClub2TwirlingNinjaUnread { get => GetBoolean(0x07); set => SetBoolean(0x07, value); }
public bool BaseballClub3ChampionPurchased { get => GetBoolean(0x08); set => SetBoolean(0x08, value); }
public bool BaseballClub3ChampionUnread { get => GetBoolean(0x09); set => SetBoolean(0x09, value); }
public bool BaseballClubChangeStylePurchased { get => GetBoolean(0x0A); set => SetBoolean(0x0A, value); }
public bool BaseballClubChangeStyleUnread { get => GetBoolean(0x0B); set => SetBoolean(0x0B, value); }
public bool ScienceClubItemPrinterPurchased { get => GetBoolean(0x0C); set => SetBoolean(0x0C, value); }
public bool ScienceClubItemPrinterUnread { get => GetBoolean(0x0D); set => SetBoolean(0x0D, value); }
public bool PhotographyClub1NewEffectsPurchased { get => GetBoolean(0x0E); set => SetBoolean(0x0E, value); }
public bool PhotographyClub1NewEffectsUnread { get => GetBoolean(0x0F); set => SetBoolean(0x0F, value); }
public bool PhotographyClub2CuteEffectsPurchased { get => GetBoolean(0x10); set => SetBoolean(0x10, value); }
public bool PhotographyClub2CuteEffectsUnread { get => GetBoolean(0x11); set => SetBoolean(0x11, value); }
public bool PhotographyClub3CoolEffectsPurchased { get => GetBoolean(0x12); set => SetBoolean(0x12, value); }
public bool PhotographyClub3CoolEffectsUnread { get => GetBoolean(0x13); set => SetBoolean(0x13, value); }
public bool PhotographyClub4TouchUpPurchased { get => GetBoolean(0x14); set => SetBoolean(0x14, value); }
public bool PhotographyClub4TouchUpUnread { get => GetBoolean(0x15); set => SetBoolean(0x15, value); }
public bool PhotographyClub5LockOnPurchased { get => GetBoolean(0x16); set => SetBoolean(0x16, value); }
public bool PhotographyClub5LockOnUnread { get => GetBoolean(0x17); set => SetBoolean(0x17, value); }
public bool ArtClubRemodelPurchased { get => GetBoolean(0x1A); set => SetBoolean(0x1A, value); }
public bool ArtClubRemodelUnread { get => GetBoolean(0x1B); set => SetBoolean(0x1B, value); }
public bool ArtClub1FancyDarkPurchased { get => GetBoolean(0x1C); set => SetBoolean(0x1C, value); }
public bool ArtClub1FancyDarkUnread { get => GetBoolean(0x1D); set => SetBoolean(0x1D, value); }
public bool ArtClub2ClassicFuturisticPurchased { get => GetBoolean(0x1E); set => SetBoolean(0x1E, value); }
public bool ArtClub2ClassicFuturisticUnread { get => GetBoolean(0x1F); set => SetBoolean(0x1F, value); }
public bool ArtClub3GorgeousPurchased { get => GetBoolean(0x20); set => SetBoolean(0x20, value); }
public bool ArtClub3GorgeousUnread { get => GetBoolean(0x21); set => SetBoolean(0x21, value); }
public bool MusicClub1NewSpeakerPurchased { get => GetBoolean(0x22); set => SetBoolean(0x22, value); }
public bool MusicClub1NewSpeakerUnread { get => GetBoolean(0x23); set => SetBoolean(0x23, value); }
public bool MusicClub2OutdoorAdventuresAlbumPurchased { get => GetBoolean(0x24); set => SetBoolean(0x24, value); }
public bool MusicClub2OutdoorAdventuresAlbumUnread { get => GetBoolean(0x25); set => SetBoolean(0x25, value); }
public bool MusicClub3TownLifeAlbumPurchased { get => GetBoolean(0x26); set => SetBoolean(0x26, value); }
public bool MusicClub3TownLifeAlbumUnread { get => GetBoolean(0x27); set => SetBoolean(0x27, value); }
public bool MusicClub4FamousDestinationsAlbumPurchased { get => GetBoolean(0x28); set => SetBoolean(0x28, value); }
public bool MusicClub4FamousDestinationsAlbumUnread { get => GetBoolean(0x29); set => SetBoolean(0x29, value); }
public bool MusicClub5KitakamiAlbumPurchased { get => GetBoolean(0x2A); set => SetBoolean(0x2A, value); }
public bool MusicClub5KitakamiAlbumUnread { get => GetBoolean(0x2B); set => SetBoolean(0x2B, value); }
public bool MusicClub6SpecialSongsAlbumPurchased { get => GetBoolean(0x2C); set => SetBoolean(0x2C, value); }
public bool MusicClub6SpecialSongsAlbumUnread { get => GetBoolean(0x2D); set => SetBoolean(0x2D, value); }
public bool TerariumClubBiodiversityCoastalBiomePurchased { get => GetBoolean(0x2E); set => SetBoolean(0x2E, value); }
public bool TerariumClubBiodiversityCoastalBiomeUnread { get => GetBoolean(0x2F); set => SetBoolean(0x2F, value); }
public bool TerariumClubBiodiversitySavannaBiomePurchased { get => GetBoolean(0x30); set => SetBoolean(0x30, value); }
public bool TerariumClubBiodiversitySavannaBiomeUnread { get => GetBoolean(0x31); set => SetBoolean(0x31, value); }
public bool TerariumClubBiodiversityPolarBiomePurchased { get => GetBoolean(0x32); set => SetBoolean(0x32, value); }
public bool TerariumClubBiodiversityPolarBiomeUnread { get => GetBoolean(0x33); set => SetBoolean(0x33, value); }
public bool TerariumClubBiodiversityCanyonBiomePurchased { get => GetBoolean(0x34); set => SetBoolean(0x34, value); }
public bool TerariumClubBiodiversityCanyonBiomeUnread { get => GetBoolean(0x35); set => SetBoolean(0x35, value); }
public bool SecretBossPurchased { get => GetBoolean(0x36); set => SetBoolean(0x36, value); }
public bool SecretBossUnread { get => GetBoolean(0x37); set => SetBoolean(0x37, value); }
}
public enum BlueberryClubRoomStyle9 : byte
{
Normal = 0,
Gorgeous = 1,
Fancy = 2,
Futuristic = 3,
Classic = 4,
Monochrome = 5,
Natural = 6,
Dark = 7,
}