mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-09 11:14:28 -04:00
Use PlayState instead of GlobalContext (#1927)
* Use PlayState instead of GlobalContext - GlobalContext -> PlayState - globalCtx -> play - GlobalCtx -> PlayState - globalContext -> playState * Find and replace Gameplay_ with Play_ * Correct some misnamed argument cases
This commit is contained in:
@@ -148,12 +148,12 @@ u16 ElfMessage_GetTextFromMsgs(ElfMessage* msg) {
|
||||
}
|
||||
}
|
||||
|
||||
u16 ElfMessage_GetSariaText(GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
u16 ElfMessage_GetSariaText(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
ElfMessage* msgs;
|
||||
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Actor_FindNearby(globalCtx, &player->actor, ACTOR_EN_SA, 4, 800.0f) == NULL) {
|
||||
if (Actor_FindNearby(play, &player->actor, ACTOR_EN_SA, 4, 800.0f) == NULL) {
|
||||
msgs = sChildSariaMsgs;
|
||||
} else {
|
||||
return 0x0160; // Special text about Saria preferring to talk to you face-to-face
|
||||
@@ -165,10 +165,10 @@ u16 ElfMessage_GetSariaText(GlobalContext* globalCtx) {
|
||||
return ElfMessage_GetTextFromMsgs(msgs);
|
||||
}
|
||||
|
||||
u16 ElfMessage_GetCUpText(GlobalContext* globalCtx) {
|
||||
if (globalCtx->cUpElfMsgs == NULL) {
|
||||
u16 ElfMessage_GetCUpText(PlayState* play) {
|
||||
if (play->cUpElfMsgs == NULL) {
|
||||
return 0;
|
||||
} else {
|
||||
return ElfMessage_GetTextFromMsgs(globalCtx->cUpElfMsgs);
|
||||
return ElfMessage_GetTextFromMsgs(play->cUpElfMsgs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user