mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
PlayState Rename (#1231)
* global context -> play * fix PlayState* PlayState
This commit is contained in:
parent
154f44b6da
commit
2e6279bc8e
912 changed files with 40489 additions and 41078 deletions
|
@ -1,11 +1,11 @@
|
|||
#include "global.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;
|
||||
u16 doActionOffset;
|
||||
u8 temp;
|
||||
|
@ -13,7 +13,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
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;
|
||||
|
@ -32,7 +32,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
// "Permanent PARAMETER Segment = %x"
|
||||
osSyncPrintf("常駐PARAMETERセグメント=%x\n", parameterSize);
|
||||
|
||||
interfaceCtx->parameterSegment = GameState_Alloc(&globalCtx->state, parameterSize, "../z_construct.c", 159);
|
||||
interfaceCtx->parameterSegment = GameState_Alloc(&play->state, parameterSize, "../z_construct.c", 159);
|
||||
|
||||
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
|
||||
|
||||
|
@ -40,7 +40,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (u32)_parameter_staticSegmentRomStart, parameterSize,
|
||||
"../z_construct.c", 162);
|
||||
|
||||
interfaceCtx->doActionSegment = GameState_Alloc(&globalCtx->state, 0x480, "../z_construct.c", 166);
|
||||
interfaceCtx->doActionSegment = GameState_Alloc(&play->state, 0x480, "../z_construct.c", 166);
|
||||
|
||||
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
|
||||
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
||||
|
@ -69,7 +69,7 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
DmaMgr_SendRequest1(interfaceCtx->doActionSegment + 0x300, (u32)_do_action_staticSegmentRomStart + doActionOffset,
|
||||
0x180, "../z_construct.c", 178);
|
||||
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(&globalCtx->state, 0x4000, "../z_construct.c", 190);
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, 0x4000, "../z_construct.c", 190);
|
||||
|
||||
// "Icon Item Texture Initialization = %x"
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
|
||||
|
@ -146,8 +146,8 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
|
||||
osSyncPrintf("PARAMETER領域=%x\n", parameterSize + 0x5300); // "Parameter Area = %x"
|
||||
|
||||
Health_InitMeter(globalCtx);
|
||||
Map_Init(globalCtx);
|
||||
Health_InitMeter(play);
|
||||
Map_Init(play);
|
||||
|
||||
interfaceCtx->unk_23C = interfaceCtx->unk_242 = 0;
|
||||
|
||||
|
@ -164,29 +164,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(&globalCtx->state, 0x2200, "../z_construct.c", 349);
|
||||
msgCtx->textboxSegment = GameState_Alloc(&play->state, 0x2200, "../z_construct.c", 349);
|
||||
|
||||
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
||||
|
||||
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
|
||||
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
|
||||
|
||||
Font_LoadOrderedFont(&globalCtx->msgCtx.font);
|
||||
Font_LoadOrderedFont(&play->msgCtx.font);
|
||||
|
||||
YREG(31) = 0;
|
||||
}
|
||||
|
@ -600,6 +600,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