Add jinjo saving support (finished) (#240)

* 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>
This commit is contained in:
wedarobi
2026-07-24 12:17:09 +10:00
committed by GitHub
parent 136cc733f9
commit 0e89ee2fe2
11 changed files with 936 additions and 12 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
#include "misc_funcs.h"
#include "save_extension.h"
#include "note_saving.h"
#include "jinjo_saving.h"
#include "functions.h"
#include "prop.h"
@@ -441,7 +442,7 @@ s32 get_collected_note_count(enum level_e level) {
return count;
}
// @recomp Patched to restore the saved note count when entering a level and reset the per-map collected dynamic note counts.
// @recomp Patched to restore the saved note and jinjo count when entering a level and reset the per-map collected dynamic note counts.
RECOMP_PATCH void itemscore_levelReset(enum level_e level){
int i;
@@ -481,6 +482,9 @@ RECOMP_PATCH void itemscore_levelReset(enum level_e level){
map_dynamic_note_despawn_counts[map_id] = 0;
}
}
// @recomp Restore the saved jinjo count for the current level, etc
jinjo_saving_on_item_reset(level);
}
// @recomp Patched to return true for FILEPROG_99_PAST_50_NOTE_DOOR_TEXT if note saving is enabled.