mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-13 15:08:03 -05:00
First test of Rando-specific Navi tips
First test of this experiment
This commit is contained in:
parent
a03ffc90dc
commit
7144d1a321
@ -1750,6 +1750,9 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
|
||||
break;
|
||||
}
|
||||
msgCtx->msgLength = font->msgLength = strlen(font->msgBuf);
|
||||
} else if (textId == 0x0140 && gSaveContext.n64ddFlag) { //888888888
|
||||
RandoNaviTip(globalCtx);
|
||||
msgCtx->msgLength = font->msgLength = strlen(font->msgBuf);
|
||||
} else {
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
char* src = (uintptr_t)font->msgOffset;
|
||||
|
58
soh/src/code/z_message_RandoNaviTips.c
Normal file
58
soh/src/code/z_message_RandoNaviTips.c
Normal file
@ -0,0 +1,58 @@
|
||||
#include "global.h"
|
||||
#include "message_data_static.h"
|
||||
#include "vt.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void RandoNaviTip(GlobalContext* globalCtx) {
|
||||
u16 randNaviTip = rand() % 3;
|
||||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
Font* font = &msgCtx->font;
|
||||
|
||||
if (randNaviTip == 0) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_FRA:
|
||||
strcpy(font->msgBuf, "\x08French 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, "\x08Missing a small key in a dungeon?\x01Maybe the\x05\x43 "
|
||||
"boss\x05\x40 has it!\x02");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (randNaviTip == 1) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_FRA:
|
||||
strcpy(font->msgBuf, "\x08French 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, "\x08Sometimes you can use the \x05\x41Megaton\x01Hammer \x05\x40"
|
||||
"instead of bombs!\x02");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (randNaviTip == 2) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_FRA:
|
||||
strcpy(font->msgBuf, "\x08French 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,
|
||||
"\x08There are three\x05\x42 business scrubs\x05\x40 in\x01"
|
||||
"Hyrule who sell \x05\x44mysterious items\x05\x40. Do\x01you know where they are?\x02");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1382,7 +1382,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (player->naviTextId == 0) {
|
||||
if (player->unk_664 == NULL) {
|
||||
if (((gSaveContext.naviTimer >= 600) && (gSaveContext.naviTimer <= 3000)) || (nREG(89) != 0)) {
|
||||
if (((gSaveContext.naviTimer >= 40) && (gSaveContext.naviTimer <= 3000)) || (nREG(89) != 0)) {
|
||||
player->naviTextId = ElfMessage_GetCUpText(globalCtx);
|
||||
|
||||
if (player->naviTextId == 0x15F) {
|
||||
@ -1401,7 +1401,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (thisx->textId == ElfMessage_GetCUpText(globalCtx)) {
|
||||
this->fairyFlags |= 0x80;
|
||||
gSaveContext.naviTimer = 3001;
|
||||
gSaveContext.naviTimer = 10;
|
||||
}
|
||||
|
||||
this->fairyFlags |= 0x10;
|
||||
|
@ -15286,5 +15286,9 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) {
|
||||
if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) {
|
||||
this->naviActor->flags |= ACTOR_FLAG_8;
|
||||
func_80835EA4(globalCtx, 0xB);
|
||||
|
||||
if (actor->textId >= 0x0140 && actor->textId <= 0x015F && gSaveContext.n64ddFlag) {
|
||||
Message_StartTextbox(globalCtx, 0x0140, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user