Skip to content

Commit

Permalink
Merge pull request HarbourMasters#110 from Dog/skulltulas
Browse files Browse the repository at this point in the history
Feature: Count Golden Skulltulas
  • Loading branch information
briaguya-ai authored Jun 11, 2022
2 parents c468901 + c23c8a9 commit 95e4daa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libultraship/libultraship/SohImGuiImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,8 @@ namespace SohImGui {
Tooltip("Allows toggling boots and using the Ocarina from the DPad.");
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask");
EnhancementCheckbox("Count Golden Skulltulas", "gInjectSkulltulaCount");
Tooltip("Injects Golden Skulltula total count in pickup messages");
EnhancementCheckbox("Fast Chests", "gFastChests");
Tooltip("Kick open every chest");
EnhancementCheckbox("No Forced Navi", "gNoForcedNavi");
Expand Down
8 changes: 7 additions & 1 deletion soh/src/code/z_message_PAL.c
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,13 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
// Pass the sizeof the message buffer so we don't hardcode any sizes and can rely on globals.
// If no hint can be found, this just returns 0 size and doesn't modify the buffer, so no worries.
msgCtx->msgLength = font->msgLength = CopyHintFromCheck(hintCheck, font->msgBuf, sizeof(font->msgBuf));
} else {
} else if (textId == 0x00b4 && CVar_GetS32("gInjectSkulltulaCount", 0) != 0) {
strcpy(font->msgBuf, "\x08\x13\x71You got a \x05\x41Gold Skulltula Token\x05\x40!\x01You've collected "
"\x05\x41\x19\x05\x40 tokens\x01in total!\x02");

msgCtx->msgLength = font->msgLength = strlen(font->msgBuf);
}
else {
msgCtx->msgLength = font->msgLength;
char* src = (uintptr_t)font->msgOffset;
memcpy(font->msgBuf, src, font->msgLength);
Expand Down

0 comments on commit 95e4daa

Please sign in to comment.