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:
Garrett Cox
2022-11-06 02:24:34 -06:00
committed by GitHub
parent 710a768d76
commit 99260acaf1
926 changed files with 41210 additions and 41210 deletions
+6 -6
View File
@@ -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);
}
}