mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-14 05:25:09 -05:00
Merge branch 'rando-navi-tips' into rando-next
This commit is contained in:
commit
d6210a2ebb
@ -1682,6 +1682,11 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
|
|||||||
memcpy(font->msgBuf, src, font->msgLength);
|
memcpy(font->msgBuf, src, font->msgLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (textId == 0x0140 && gSaveContext.n64ddFlag) { // 888888888
|
||||||
|
RandoNaviTip(globalCtx);
|
||||||
|
msgCtx->msgLength = font->msgLength = strlen(font->msgBuf);
|
||||||
|
}
|
||||||
|
|
||||||
msgCtx->textBoxProperties = font->charTexBuf[0];
|
msgCtx->textBoxProperties = font->charTexBuf[0];
|
||||||
msgCtx->textBoxType = msgCtx->textBoxProperties >> 4;
|
msgCtx->textBoxType = msgCtx->textBoxProperties >> 4;
|
||||||
msgCtx->textBoxPos = msgCtx->textBoxProperties & 0xF;
|
msgCtx->textBoxPos = msgCtx->textBoxProperties & 0xF;
|
||||||
|
82
soh/src/code/z_message_RandoNaviTips.c
Normal file
82
soh/src/code/z_message_RandoNaviTips.c
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "message_data_static.h"
|
||||||
|
#include "vt.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
// Function for letting Navi give general rando tips to the player instead of her
|
||||||
|
// normal generic quest tips.
|
||||||
|
|
||||||
|
// Only applies to Navi's overworld quest hints - does not apply to enemy information
|
||||||
|
// or contextual hints (e.g. "This hallway is twisted!" in Forest Temple)
|
||||||
|
|
||||||
|
void RandoNaviTip(GlobalContext* globalCtx) {
|
||||||
|
u16 randNaviTip = rand() % 4;
|
||||||
|
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||||
|
Font* font = &msgCtx->font;
|
||||||
|
|
||||||
|
if (randNaviTip == 0) {
|
||||||
|
switch (gSaveContext.language) {
|
||||||
|
case LANGUAGE_FRA:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44""French tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_GER:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44German tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_ENG:
|
||||||
|
default:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44Missing a small key in a dungeon?\x01Maybe the\x05\x41 "
|
||||||
|
"boss\x05\x44 has it!\x02");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (randNaviTip == 1) {
|
||||||
|
switch (gSaveContext.language) {
|
||||||
|
case LANGUAGE_FRA:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44""French tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_GER:
|
||||||
|
strcpy(font->msgBuf, "\x08German tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_ENG:
|
||||||
|
default:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44Sometimes you can use the \x05\x41Megaton\x01Hammer \x05\x44"
|
||||||
|
"instead of bombs!\x02");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (randNaviTip == 2) {
|
||||||
|
switch (gSaveContext.language) {
|
||||||
|
case LANGUAGE_FRA:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44""French tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_GER:
|
||||||
|
strcpy(font->msgBuf, "\x08German tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_ENG:
|
||||||
|
default:
|
||||||
|
strcpy(font->msgBuf,
|
||||||
|
"\x08\x05\x44There are three\x05\x42 business scrubs\x05\x44 in\x01"
|
||||||
|
"Hyrule who sell \x05\x49mysterious items\x05\x44. Do\x01you know where they are?\x02");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (randNaviTip == 3) {
|
||||||
|
switch (gSaveContext.language) {
|
||||||
|
case LANGUAGE_FRA:
|
||||||
|
strcpy(font->msgBuf, "\x08\x05\x44"
|
||||||
|
"French tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_GER:
|
||||||
|
strcpy(font->msgBuf, "\x08German tip about playing rando!\x02");
|
||||||
|
break;
|
||||||
|
case LANGUAGE_ENG:
|
||||||
|
default:
|
||||||
|
strcpy(font->msgBuf,
|
||||||
|
"\x08\x05\x44Stuck on this seed? You could\x01"
|
||||||
|
"throw in the towel and check the \x01"
|
||||||
|
"\x05\x49spoiler log\x05\x44...\x02");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -15292,5 +15292,9 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) {
|
|||||||
if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) {
|
if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) {
|
||||||
this->naviActor->flags |= ACTOR_FLAG_8;
|
this->naviActor->flags |= ACTOR_FLAG_8;
|
||||||
func_80835EA4(globalCtx, 0xB);
|
func_80835EA4(globalCtx, 0xB);
|
||||||
|
// If rando'd and Navi wants to give you a general quest tip, give a rando tip instead
|
||||||
|
if (actor->textId >= 0x0140 && actor->textId <= 0x015F && gSaveContext.n64ddFlag) {
|
||||||
|
Message_StartTextbox(globalCtx, 0x0140, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user