mirror of
https://github.com/BanjoRecomp/BanjoRecomp
synced 2026-08-24 15:06:45 -04:00
0e89ee2fe2
* Add jinjo saving support * Cleanup * jinjo saving: Improve jiggy position lock, and update static vars on level change * jinjo saving: Check if jiggy during actor search * jinjo saving: Remove redundant var * jinjo saving: Address an uncommon logic scenario that could confuse players, plus some cleanup * jinjo saving: Cleanup * jinjo saving: Account for the case where a save file already has the jinjo jiggy collected Thanks iCloudius for pointing this out Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Update UI for the same case Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Extend "note saving" option in settings menu to control jinjo saving * jinjo saving: Cleanup * jinjo saving: Fix accidental regression preventing jiggy respawn Thanks iCloudius for tracking it down. Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Add bounds checks for jinjoIdx And remove some old declarations that went unused after removing the patch for chjiggy_update * jinjo saving: Add support for mods that save jinjos in Grunty's Lair, like Jiggies of Time Thanks iCloudius for the suggestion * jinjo saving: Prevent conflicts with Furnace Fun and credits when saving lair jinjos * jinjo saving: Fix missing jinjo sfx Thanks BoozemanDoorslam for the report! A bit surprised this wasn't picked up on sooner --------- Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com>
26 lines
869 B
C
26 lines
869 B
C
#ifndef __SAVE_EXTENSION_H__
|
|
#define __SAVE_EXTENSION_H__
|
|
|
|
typedef struct {
|
|
u8 bytes[32]; // 32*8 = 256 bits per level, enough to account for mods with unused vanilla rooms.
|
|
} LevelNotes;
|
|
|
|
// This struct must be 256 bytes to add up to 1536 bytes, which adds to the original 512 bytes of save data to equal exactly 2048 bytes.
|
|
typedef struct {
|
|
LevelNotes level_notes[9];
|
|
u8 jinjo_data[8]; // 10 levels * 6 = 60 ~~ 64 bits, rounded up to the nearest byte
|
|
u8 padding[24]; // Reserved for future use.
|
|
} SaveFileExtensionData;
|
|
|
|
_Static_assert(sizeof(SaveFileExtensionData) == 320, "SaveExtensionData must be 256 bytes");
|
|
|
|
typedef struct {
|
|
u8 padding[256];
|
|
} SaveGlobalExtensionData;
|
|
|
|
_Static_assert(sizeof(SaveGlobalExtensionData) == 256, "save_global_extension_data must be 512 bytes");
|
|
|
|
extern SaveFileExtensionData loaded_file_extension_data;
|
|
|
|
#endif
|