mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
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
This commit is contained in:
parent
186ecc72b5
commit
92f081d7f3
8 changed files with 92 additions and 70 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue