mirror of
https://github.com/BanjoRecomp/BanjoRecomp
synced 2026-05-26 23:26:49 -04:00
e7185d889e
* WIP note saving implementation * Fix note saving affecting other files * Prevent note collection in demo playback for safety * Cache note saving enabled while in the lair or file select to prevent it changing in levels with notes * Prevent "Grunty's magic" note dialog from being shown if note saving is enabled * Implement dynamically spawned note saving * Properly clear loaded save extension data when score status is cleared * Hook up menu for note saving
25 lines
782 B
C
25 lines
782 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 padding[32]; // 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
|