mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07: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:
parent
710a768d76
commit
99260acaf1
926 changed files with 41210 additions and 41210 deletions
|
@ -1,19 +1,19 @@
|
|||
#include "global.h"
|
||||
#include <textures/do_action_static/do_action_static.h>
|
||||
|
||||
void func_80110990(GlobalContext* globalCtx) {
|
||||
Map_Destroy(globalCtx);
|
||||
void func_80110990(PlayState* play) {
|
||||
Map_Destroy(play);
|
||||
}
|
||||
|
||||
void func_801109B0(GlobalContext* globalCtx) {
|
||||
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
|
||||
void func_801109B0(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
u32 parameterSize;
|
||||
u8 temp;
|
||||
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
gSaveContext.unk_13E8 = gSaveContext.unk_13EA = 0;
|
||||
|
||||
View_Init(&interfaceCtx->view, globalCtx->state.gfxCtx);
|
||||
View_Init(&interfaceCtx->view, play->state.gfxCtx);
|
||||
|
||||
interfaceCtx->unk_1FA = interfaceCtx->unk_261 = interfaceCtx->unk_1FC = 0;
|
||||
interfaceCtx->unk_1EC = interfaceCtx->unk_1EE = interfaceCtx->unk_1F0 = 0;
|
||||
|
@ -33,7 +33,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
// "Permanent PARAMETER Segment = %x"
|
||||
osSyncPrintf("常駐PARAMETERセグメント=%x\n", parameterSize);
|
||||
|
||||
interfaceCtx->parameterSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, parameterSize);
|
||||
interfaceCtx->parameterSegment = GAMESTATE_ALLOC_MC(&play->state, parameterSize);
|
||||
|
||||
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
|
||||
|
||||
|
@ -41,7 +41,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, parameterSize,
|
||||
__FILE__, 162);
|
||||
|
||||
interfaceCtx->doActionSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, 0x480);
|
||||
interfaceCtx->doActionSegment = GAMESTATE_ALLOC_MC(&play->state, 0x480);
|
||||
|
||||
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
|
||||
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
||||
|
@ -55,7 +55,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
memcpy(interfaceCtx->doActionSegment + attackDoActionTexSize, ResourceMgr_LoadTexByName(gReturnDoActionENGTex), ResourceMgr_LoadTexSizeByName(gReturnDoActionENGTex));
|
||||
|
||||
interfaceCtx->iconItemSegment = GAMESTATE_ALLOC_MC(
|
||||
&globalCtx->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
|
||||
&play->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
|
||||
|
||||
// "Icon Item Texture Initialization = %x"
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
|
||||
|
@ -118,8 +118,8 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
|
||||
osSyncPrintf("PARAMETER領域=%x\n", parameterSize + 0x5300); // "Parameter Area = %x"
|
||||
|
||||
HealthMeter_Init(globalCtx);
|
||||
Map_Init(globalCtx);
|
||||
HealthMeter_Init(play);
|
||||
Map_Init(play);
|
||||
|
||||
interfaceCtx->unk_23C = interfaceCtx->unk_242 = 0;
|
||||
|
||||
|
@ -136,29 +136,29 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
R_A_BTN_COLOR(2) = 50;
|
||||
}
|
||||
|
||||
void Message_Init(GlobalContext* globalCtx) {
|
||||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
void Message_Init(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
s32 pad;
|
||||
|
||||
Message_SetTables();
|
||||
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
|
||||
msgCtx->msgMode = MSGMODE_NONE;
|
||||
msgCtx->msgLength = 0;
|
||||
msgCtx->textId = msgCtx->textboxEndType = msgCtx->choiceIndex = msgCtx->ocarinaAction = msgCtx->textUnskippable = 0;
|
||||
msgCtx->textColorAlpha = 255;
|
||||
|
||||
View_Init(&msgCtx->view, globalCtx->state.gfxCtx);
|
||||
View_Init(&msgCtx->view, play->state.gfxCtx);
|
||||
|
||||
msgCtx->textboxSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, 0x2200);
|
||||
msgCtx->textboxSegment = GAMESTATE_ALLOC_MC(&play->state, 0x2200);
|
||||
|
||||
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
||||
|
||||
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
|
||||
ASSERT(msgCtx->textboxSegment != NULL);
|
||||
|
||||
Font_LoadOrderedFont(&globalCtx->msgCtx.font);
|
||||
Font_LoadOrderedFont(&play->msgCtx.font);
|
||||
|
||||
YREG(31) = 0;
|
||||
}
|
||||
|
@ -572,6 +572,6 @@ void func_80111070(void) {
|
|||
VREG(92) = -63;
|
||||
}
|
||||
|
||||
void func_80112098(GlobalContext* globalCtx) {
|
||||
void func_80112098(PlayState* play) {
|
||||
func_80111070();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue