Takes Ganondor's text & hint from CustomMessageTable

This commit is contained in:
Christopher Leggett 2022-07-24 19:43:11 -04:00
parent c1155bb08c
commit 9f2eb46663
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
2 changed files with 10 additions and 12 deletions

View File

@ -1478,14 +1478,12 @@ extern "C" CustomMessageEntry Randomizer_CopyAltarMessage() {
: CustomMessage::Instance->RetrieveMessage(Randomizer::hintMessageTableID, 0x7040);
}
extern "C" int Randomizer_CopyGanonText(char* buffer, const int maxBufferSize) {
const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonText();
return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize);
extern "C" CustomMessageEntry Randomizer_CopyGanonText() {
return CustomMessage::Instance->RetrieveMessage(Randomizer::hintMessageTableID, 0x70CD);
}
extern "C" int Randomizer_CopyGanonHintText(char* buffer, const int maxBufferSize) {
const std::string& ganonText = OTRGlobals::Instance->gRandomizer->GetGanonHintText();
return CopyStringToCharBuffer(ganonText, buffer, maxBufferSize);
extern "C" CustomMessageEntry Randomizer_CopyGanonHintText() {
return CustomMessage::Instance->RetrieveMessage(Randomizer::hintMessageTableID, 0x70CC);
}
extern "C" CustomMessageEntry Randomizer_CopyHintFromCheck(RandomizerCheck check) {
@ -1550,6 +1548,12 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
} else if (textId == 0x7040 || textId == 0x7088) {
// rando hints at altar
messageEntry = Randomizer_CopyAltarMessage();
} else if (gSaveContext.n64ddFlag && textId == 0x70CC) {
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) {
messageEntry = Randomizer_CopyGanonText();
} else {
messageEntry = Randomizer_CopyGanonHintText();
}
}
}
if (textId == 0x00B4 || textId == 0x00B5) {

View File

@ -1677,12 +1677,6 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
Message_FindMessage(globalCtx, textId);
if (gSaveContext.n64ddFlag && (textId == 0x10A2 || textId == 0x10DC || textId == 0x10DD)) {
msgCtx->msgLength = font->msgLength = CopyScrubMessage(textId, font->msgBuf, sizeof(font->msgBuf));
} else if (gSaveContext.n64ddFlag && textId == 0x70CC) {
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) {
msgCtx->msgLength = font->msgLength = Randomizer_CopyGanonText(font->msgBuf, sizeof(font->msgBuf));
} else {
msgCtx->msgLength = font->msgLength = Randomizer_CopyGanonHintText(font->msgBuf, sizeof(font->msgBuf));
}
} else {
msgCtx->msgLength = font->msgLength;
char* src = (uintptr_t)font->msgOffset;