z_kankyo Decompiled (3 non-matching) (#1451)

* z_Kankyo progress

* build OK

* progress

* more progress

* Kankyo WIP

* Add docs

* func_800FEAF4

* more docs

* func_800FEAF4

* improve Init

* Small cleanup

* kankyo data

* data cleanup

* Environment_DrawLensFlare

* Match Environment_UpdateSkybox

* Match Environment_DrawRainImpl

* Start on Environment_UpdateLights

* Match Environment_DrawSandstorm

* gRainDropDL

* Some light renamings

* Fix merge

* cleanup

* improve non-equivalents

* cleanup

* PR Review

* match Environment_UpdatePostmanEvents

* PR Review

* small improvement to Environment_UpdatePostmanEvents from anon

* more cleanup

* void

* bits

* fix comment

* improve Environment_UpdateLights

* Skybox Stars Docs

* PR Review

* fix merge

* macros

* Add comments

* PR Review

* gRandFloat

* bug

---------

Co-authored-by: Rozelette <Uberpanzermensch@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
engineer124
2023-10-31 14:50:11 +11:00
committed by GitHub
parent 0492c8e89a
commit 83ceaf3717
26 changed files with 2702 additions and 120 deletions
+2620 -55
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -663,15 +663,15 @@ void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src,
dst->z = translation->z + (src->z * cos - src->x * sin);
}
void Color_RGB8_Lerp(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
void Color_RGB8_Lerp(Color_RGB8* from, Color_RGB8* to, f32 lerp, Color_RGB8* dst) {
f32 aF;
aF = a->r;
dst->r = aF + (b->r - aF) * t;
aF = a->g;
dst->g = aF + (b->g - aF) * t;
aF = a->b;
dst->b = aF + (b->b - aF) * t;
aF = from->r;
dst->r = aF + (to->r - aF) * lerp;
aF = from->g;
dst->g = aF + (to->g - aF) * lerp;
aF = from->b;
dst->b = aF + (to->b - aF) * lerp;
}
f32 Math_Vec3f_StepTo(Vec3f* start, Vec3f* target, f32 speed) {
+6 -5
View File
@@ -385,7 +385,7 @@ void Play_Destroy(GameState* thisx) {
BombersNotebook_Destroy(&sBombersNotebook);
this->state.gfxCtx->callback = NULL;
this->state.gfxCtx->callbackArg = 0;
this->state.gfxCtx->callbackArg = NULL;
Play_DestroyMotionBlur();
if (R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_OFF) {
@@ -1332,7 +1332,7 @@ void Play_DrawMain(PlayState* this) {
}
if (1) {
Environment_FillScreen(gfxCtx, 0, 0, 0, this->bgCoverAlpha, 1);
Environment_FillScreen(gfxCtx, 0, 0, 0, this->bgCoverAlpha, FILL_SCREEN_OPA);
}
if (1) {
@@ -1353,13 +1353,14 @@ void Play_DrawMain(PlayState* this) {
if (1) {
if (R_PLAY_FILL_SCREEN_ON) {
Environment_FillScreen(gfxCtx, R_PLAY_FILL_SCREEN_R, R_PLAY_FILL_SCREEN_G, R_PLAY_FILL_SCREEN_B,
R_PLAY_FILL_SCREEN_ALPHA, 3);
R_PLAY_FILL_SCREEN_ALPHA, FILL_SCREEN_OPA | FILL_SCREEN_XLU);
}
switch (this->envCtx.fillScreen) {
case 1:
Environment_FillScreen(gfxCtx, this->envCtx.screenFillColor[0], this->envCtx.screenFillColor[1],
this->envCtx.screenFillColor[2], this->envCtx.screenFillColor[3], 3);
this->envCtx.screenFillColor[2], this->envCtx.screenFillColor[3],
FILL_SCREEN_OPA | FILL_SCREEN_XLU);
break;
default:
@@ -1374,7 +1375,7 @@ void Play_DrawMain(PlayState* this) {
}
if (this->worldCoverAlpha != 0) {
Environment_FillScreen(gfxCtx, 0, 0, 0, this->worldCoverAlpha, 3);
Environment_FillScreen(gfxCtx, 0, 0, 0, this->worldCoverAlpha, FILL_SCREEN_OPA | FILL_SCREEN_XLU);
}
if (1) {