mirror of
https://github.com/zeldaret/oot
synced 2026-08-19 05:52:22 -04: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:
+8
-8
@@ -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) {
|
||||
}
|
||||
|
||||
@@ -1126,7 +1126,7 @@ void FileSelect_ConfigModeDraw(GameState* thisx) {
|
||||
eyeZ = 1000.0f * Math_SinS(ZREG(11)) + 1000.0f * Math_CosS(ZREG(11));
|
||||
|
||||
FileSelect_SetView(this, eyeX, eyeY, eyeZ);
|
||||
SkyboxDraw_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
|
||||
Skybox_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
|
||||
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_NONE);
|
||||
ZREG(11) += ZREG(10);
|
||||
Environment_UpdateSkybox(SKYBOX_NORMAL_SKY, &this->envCtx, &this->skyboxCtx);
|
||||
@@ -1539,7 +1539,7 @@ void FileSelect_SelectModeDraw(GameState* thisx) {
|
||||
eyeZ = 1000.0f * Math_SinS(ZREG(11)) + 1000.0f * Math_CosS(ZREG(11));
|
||||
|
||||
FileSelect_SetView(this, eyeX, eyeY, eyeZ);
|
||||
SkyboxDraw_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
|
||||
Skybox_Draw(&this->skyboxCtx, this->state.gfxCtx, 1, this->envCtx.skyboxBlend, eyeX, eyeY, eyeZ);
|
||||
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_NONE);
|
||||
ZREG(11) += ZREG(10);
|
||||
Environment_UpdateSkybox(SKYBOX_NORMAL_SKY, &this->envCtx, &this->skyboxCtx);
|
||||
|
||||
Reference in New Issue
Block a user