From 83ceaf371748aa4b0fe6e54e8aaf879de01ce1d1 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:50:11 +1100 Subject: 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 Co-authored-by: Derek Hensley --- src/code/z_lib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/code/z_lib.c') diff --git a/src/code/z_lib.c b/src/code/z_lib.c index c520b00d5..cf5666ed4 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -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) { -- cgit v1.2.3