From f80f8eba62ecf45f66155a60f6eb60132ff492b2 Mon Sep 17 00:00:00 2001 From: ManIsCat2 <137772623+ManIsCat2@users.noreply.github.com> Date: Mon, 15 Sep 2025 20:26:40 +0330 Subject: [PATCH] gsSPLightColor() support (#948) * G_MW_LIGHTCOL * Update gfx_pc.c --------- Co-authored-by: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com> --- src/pc/gfx/gfx_pc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pc/gfx/gfx_pc.c b/src/pc/gfx/gfx_pc.c index 03b9f1558..10cb2b500 100644 --- a/src/pc/gfx/gfx_pc.c +++ b/src/pc/gfx/gfx_pc.c @@ -1354,6 +1354,16 @@ static void gfx_sp_moveword(uint8_t index, uint16_t offset, uint32_t data) { rsp.fresnel_offset = (int16_t)data; } break; + case G_MW_LIGHTCOL: { + int lightNum = offset / 24; + // data = packed color + if (lightNum >= 0 && lightNum <= MAX_LIGHTS) { + rsp.current_lights[lightNum].col[0] = (uint8_t)(data >> 24); + rsp.current_lights[lightNum].col[1] = (uint8_t)(data >> 16); + rsp.current_lights[lightNum].col[2] = (uint8_t)(data >> 8); + } + break; + } } }