gsSPLightColor() support (#948)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

* G_MW_LIGHTCOL

* Update gfx_pc.c

---------

Co-authored-by: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com>
This commit is contained in:
ManIsCat2 2025-09-15 20:26:40 +03:30 committed by GitHub
parent d3f57ae845
commit f80f8eba62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}
}
}