From 56ed4d33395765cd96ba3e04c0f994c4e9307ffd Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 1 Feb 2026 12:33:31 -0800 Subject: [PATCH] Fix ConvertHSVToRGB parameter labels (#1737) --- LEGO1/lego/legoomni/include/legoutils.h | 2 +- LEGO1/lego/legoomni/src/common/legoutils.cpp | 32 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoutils.h b/LEGO1/lego/legoomni/include/legoutils.h index dc5d951c..44b78ec8 100644 --- a/LEGO1/lego/legoomni/include/legoutils.h +++ b/LEGO1/lego/legoomni/include/legoutils.h @@ -53,7 +53,7 @@ void CalculateViewFromAnimation(LegoAnimPresenter* p_presenter); Extra::ActionType MatchActionString(const char*); void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender); void SetCameraControllerFromIsle(); -void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut); +void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_gOut, float* p_bOut); void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool); void ResetViewVelocity(); MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id); diff --git a/LEGO1/lego/legoomni/src/common/legoutils.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp index 9b62e5b1..dc310953 100644 --- a/LEGO1/lego/legoomni/src/common/legoutils.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -385,7 +385,7 @@ void SetCameraControllerFromIsle() } // FUNCTION: LEGO1 0x1003eae0 -void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut) +void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_gOut, float* p_bOut) { double calc; double p; @@ -403,8 +403,8 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO calc = (p_v + 1.0) * sDbl; } if (calc <= 0.0) { - *p_gOut = 0.0f; *p_bOut = 0.0f; + *p_gOut = 0.0f; *p_rOut = 0.0f; return; } @@ -416,38 +416,38 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO switch (hueIndex) { case 0: *p_rOut = calc; - *p_bOut = v12; - *p_gOut = p; + *p_gOut = v12; + *p_bOut = p; break; case 1: *p_rOut = v13; - *p_bOut = calc; - *p_gOut = p; + *p_gOut = calc; + *p_bOut = p; break; case 2: *p_rOut = p; - *p_bOut = calc; - *p_gOut = v12; + *p_gOut = calc; + *p_bOut = v12; break; case 3: *p_rOut = p; - *p_bOut = v13; - *p_gOut = calc; + *p_gOut = v13; + *p_bOut = calc; break; case 4: *p_rOut = v12; - *p_bOut = p; - *p_gOut = calc; + *p_gOut = p; + *p_bOut = calc; break; case 5: *p_rOut = calc; - *p_bOut = p; - *p_gOut = v13; + *p_gOut = p; + *p_bOut = v13; break; case 6: *p_rOut = calc; - *p_bOut = p; - *p_gOut = v13; + *p_gOut = p; + *p_bOut = v13; break; default: return;