1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +00:00

PlayState Rename (#1231)

* global context -> play

* fix PlayState* PlayState
This commit is contained in:
fig02 2022-05-21 14:23:43 -04:00 committed by GitHub
parent 154f44b6da
commit 2e6279bc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
912 changed files with 40489 additions and 41078 deletions

View file

@ -9,11 +9,11 @@
#define FLAGS ACTOR_FLAG_4
void EnStream_Init(Actor* thisx, GlobalContext* globalCtx);
void EnStream_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnStream_Update(Actor* thisx, GlobalContext* globalCtx);
void EnStream_Draw(Actor* thisx, GlobalContext* globalCtx);
void EnStream_WaitForPlayer(EnStream* this, GlobalContext* globalCtx);
void EnStream_Init(Actor* thisx, PlayState* play);
void EnStream_Destroy(Actor* thisx, PlayState* play);
void EnStream_Update(Actor* thisx, PlayState* play);
void EnStream_Draw(Actor* thisx, PlayState* play);
void EnStream_WaitForPlayer(EnStream* this, PlayState* play);
const ActorInit En_Stream_InitVars = {
ACTOR_EN_STREAM,
@ -35,7 +35,7 @@ void EnStream_SetupAction(EnStream* this, EnStreamActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void EnStream_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnStream_Init(Actor* thisx, PlayState* play) {
EnStream* this = (EnStream*)thisx;
this->unk_150 = thisx->params & 0xFF;
@ -46,7 +46,7 @@ void EnStream_Init(Actor* thisx, GlobalContext* globalCtx) {
EnStream_SetupAction(this, EnStream_WaitForPlayer);
}
void EnStream_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnStream_Destroy(Actor* thisx, PlayState* play) {
}
// Checks if the player is in range of the vortex
@ -79,8 +79,8 @@ s32 func_80B0B81C(Vec3f* vortexPosRot, Vec3f* playerPosRot, Vec3f* posDifference
return ret;
}
void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
void EnStream_SuckPlayer(EnStream* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 pad48;
Vec3f posDifference;
f32 xzDist;
@ -110,8 +110,8 @@ void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
}
}
void EnStream_WaitForPlayer(EnStream* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
void EnStream_WaitForPlayer(EnStream* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s16 pad;
Vec3f temp;
@ -120,25 +120,25 @@ void EnStream_WaitForPlayer(EnStream* this, GlobalContext* globalCtx) {
}
}
void EnStream_Update(Actor* thisx, GlobalContext* globalCtx) {
void EnStream_Update(Actor* thisx, PlayState* play) {
EnStream* this = (EnStream*)thisx;
this->actionFunc(this, globalCtx);
this->actionFunc(this, play);
func_8002F948(thisx, NA_SE_EV_WHIRLPOOL - SFX_FLAG);
}
void EnStream_Draw(Actor* thisx, GlobalContext* globalCtx) {
void EnStream_Draw(Actor* thisx, PlayState* play) {
u32 multipliedFrames;
u32 frames = globalCtx->gameplayFrames;
u32 frames = play->gameplayFrames;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_stream.c", 295);
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_stream.c", 299),
OPEN_DISPS(play->state.gfxCtx, "../z_en_stream.c", 295);
func_80093D84(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_stream.c", 299),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
multipliedFrames = frames * 20;
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, frames * 30, -multipliedFrames, 0x40, 0x40, 1,
multipliedFrames, -multipliedFrames, 0x40, 0x40));
Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 30, -multipliedFrames, 0x40, 0x40, 1, multipliedFrames,
-multipliedFrames, 0x40, 0x40));
gSPDisplayList(POLY_XLU_DISP++, object_stream_DL_000950);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_stream.c", 310);
CLOSE_DISPS(play->state.gfxCtx, "../z_en_stream.c", 310);
}

View file

@ -6,7 +6,7 @@
struct EnStream;
typedef void (*EnStreamActionFunc)(struct EnStream*, GlobalContext*);
typedef void (*EnStreamActionFunc)(struct EnStream*, PlayState*);
typedef struct EnStream {
/* 0x0000 */ Actor actor;