mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 23:41:24 +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
|
@ -8,11 +8,11 @@
|
|||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EndTitle_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EndTitle_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EndTitle_DrawNintendoLogo(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EndTitle_Init(Actor* thisx, PlayState* play);
|
||||
void EndTitle_Destroy(Actor* thisx, PlayState* play);
|
||||
void EndTitle_Update(Actor* thisx, PlayState* play);
|
||||
void EndTitle_DrawFull(Actor* thisx, PlayState* play);
|
||||
void EndTitle_DrawNintendoLogo(Actor* thisx, PlayState* play);
|
||||
|
||||
const ActorInit End_Title_InitVars = {
|
||||
ACTOR_END_TITLE,
|
||||
|
@ -28,7 +28,7 @@ const ActorInit End_Title_InitVars = {
|
|||
|
||||
#include "overlays/ovl_End_Title/ovl_End_Title.c"
|
||||
|
||||
void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EndTitle_Init(Actor* thisx, PlayState* play) {
|
||||
EndTitle* this = (EndTitle*)thisx;
|
||||
|
||||
this->endAlpha = 0;
|
||||
|
@ -39,37 +39,37 @@ void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void EndTitle_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EndTitle_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EndTitle_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EndTitle_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
// Used in the castle courtyard
|
||||
void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
|
||||
MtxF* mf;
|
||||
EndTitle* this = (EndTitle*)thisx;
|
||||
s32 frameCount = globalCtx->csCtx.frames;
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 frameCount = play->csCtx.frames;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
mf = &player->mf_9E0;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 403);
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 403);
|
||||
|
||||
// Draw the Triforce on Link's left hand
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
func_80093D84(play->state.gfxCtx);
|
||||
Matrix_Mult(mf, MTXMODE_NEW);
|
||||
Matrix_Translate(0.0f, 150.0f, 170.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.13f, 0.13f, 0.13f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(0xBB8), MTXMODE_APPLY);
|
||||
Matrix_RotateY(0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_end_title.c", 412), G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sTriforceDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 417);
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_end_title.c", 417);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 419);
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 419);
|
||||
|
||||
// Draw title cards on the screen
|
||||
if ((frameCount > 890) && (this->endAlpha < 200)) {
|
||||
|
@ -107,24 +107,24 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
|
||||
1 << 10);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 515);
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_end_title.c", 515);
|
||||
}
|
||||
|
||||
// Used in the Temple of Time
|
||||
void EndTitle_DrawNintendoLogo(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EndTitle_DrawNintendoLogo(Actor* thisx, PlayState* play) {
|
||||
EndTitle* this = (EndTitle*)thisx;
|
||||
s32 pad;
|
||||
s32 frames = globalCtx->csCtx.frames;
|
||||
s32 frames = play->csCtx.frames;
|
||||
|
||||
if ((frames >= 1101) && (this->endAlpha < 255)) {
|
||||
this->endAlpha += 3;
|
||||
}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 594);
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 594);
|
||||
|
||||
OVERLAY_DISP = func_80093F34(OVERLAY_DISP);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0x80, 0, 0, 0, this->endAlpha);
|
||||
gSPDisplayList(OVERLAY_DISP++, sPresentedByNintendoDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 600);
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_end_title.c", 600);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue