diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-11-26 23:53:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-26 17:53:41 -0500 |
| commit | 92f081d7f35c91794e5696b6bb1f86541b8b40ea (patch) | |
| tree | 7fdee7423727b8e2a06d570887207d1db908a6c7 /src/code | |
| parent | 186ecc72b5a052cbc4dcc1125a6bb204c354506d (diff) | |
Add skybox .h and cleanup, `SkyboxDraw_` -> `Skybox_` (#1435)
* Add skybox .h and cleanup
* move forward declared structs to top of file
* `SkyboxDraw_` -> `Skybox_`
* format
* move more forward declared structs to top of file
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_play.c | 16 | ||||
| -rw-r--r-- | src/code/z_vr_box_draw.c | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_play.c b/src/code/z_play.c index b576e2118..ef2dbeed6 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -939,7 +939,7 @@ void Play_Update(PlayState* this) { } PLAY_LOG(3708); - SkyboxDraw_Update(&this->skyboxCtx); + Skybox_Update(&this->skyboxCtx); PLAY_LOG(3716); @@ -1135,11 +1135,11 @@ void Play_Draw(PlayState* this) { if (this->skyboxId && (this->skyboxId != SKYBOX_UNSET_1D) && !this->envCtx.skyboxDisabled) { if ((this->skyboxId == SKYBOX_NORMAL_SKY) || (this->skyboxId == SKYBOX_CUTSCENE_MAP)) { Environment_UpdateSkybox(this->skyboxId, &this->envCtx, &this->skyboxCtx); - SkyboxDraw_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, this->envCtx.skyboxBlend, - this->view.eye.x, this->view.eye.y, this->view.eye.z); + Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, this->envCtx.skyboxBlend, + this->view.eye.x, this->view.eye.y, this->view.eye.z); } else if (this->skyboxCtx.unk_140 == 0) { - SkyboxDraw_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x, - this->view.eye.y, this->view.eye.z); + Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x, this->view.eye.y, + this->view.eye.z); } } } @@ -1183,8 +1183,8 @@ void Play_Draw(PlayState* this) { Vec3f quakeOffset; Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(this)); - SkyboxDraw_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x + quakeOffset.x, - this->view.eye.y + quakeOffset.y, this->view.eye.z + quakeOffset.z); + Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x + quakeOffset.x, + this->view.eye.y + quakeOffset.y, this->view.eye.z + quakeOffset.z); } } @@ -1268,7 +1268,7 @@ void Play_Draw(PlayState* this) { View_UpdateViewingMatrix(&this->view); this->view.unk_124 = 0; if (this->skyboxId && (this->skyboxId != SKYBOX_UNSET_1D) && !this->envCtx.skyboxDisabled) { - SkyboxDraw_UpdateMatrix(&this->skyboxCtx, this->view.eye.x, this->view.eye.y, this->view.eye.z); + Skybox_UpdateMatrix(&this->skyboxCtx, this->view.eye.x, this->view.eye.y, this->view.eye.z); } } diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c index a9728c3c5..60fa408d0 100644 --- a/src/code/z_vr_box_draw.c +++ b/src/code/z_vr_box_draw.c @@ -2,7 +2,7 @@ Mtx* sSkyboxDrawMatrix; -Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { +Mtx* Skybox_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { Matrix_Translate(x, y, z, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); Matrix_RotateX(skyboxCtx->rot.x, MTXMODE_APPLY); @@ -11,7 +11,7 @@ Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { return Matrix_ToMtx(sSkyboxDrawMatrix, "../z_vr_box_draw.c", 42); } -void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z) { +void Skybox_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z) { OPEN_DISPS(gfxCtx, "../z_vr_box_draw.c", 52); Gfx_SetupDL_40Opa(gfxCtx); @@ -80,5 +80,5 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb CLOSE_DISPS(gfxCtx, "../z_vr_box_draw.c", 125); } -void SkyboxDraw_Update(SkyboxContext* skyboxCtx) { +void Skybox_Update(SkyboxContext* skyboxCtx) { } |
