mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-21 17:41:42 +00:00
Fix mario body state shade/light clamping
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
This commit is contained in:
parent
5f5fc4863f
commit
d53338f2b8
2 changed files with 6 additions and 11 deletions
|
|
@ -97,11 +97,6 @@ gServerSettings = {}
|
|||
--- Struct containing the settings for Nametags
|
||||
gNametagsSettings = {}
|
||||
|
||||
--- @type Camera
|
||||
--- Struct contaning camera fields
|
||||
--- - This camera is the same as `gMarioStates[i].area.camera` or `gCurrentArea.camera`
|
||||
gCamera = {}
|
||||
|
||||
-----------
|
||||
-- hooks --
|
||||
-----------
|
||||
|
|
|
|||
|
|
@ -769,13 +769,13 @@ static struct PlayerColor geo_mario_get_player_color(const struct PlayerPalette
|
|||
for (s32 part = 0; part != PLAYER_PART_MAX; ++part) {
|
||||
color.parts[part] = (Lights1) gdSPDefLights1(
|
||||
// Shadow
|
||||
palette->parts[part][0] * bodyState->shadeR / 255.0f,
|
||||
palette->parts[part][1] * bodyState->shadeG / 255.0f,
|
||||
palette->parts[part][2] * bodyState->shadeB / 255.0f,
|
||||
min(palette->parts[part][0] * bodyState->shadeR / 255.0f, 255),
|
||||
min(palette->parts[part][1] * bodyState->shadeG / 255.0f, 255),
|
||||
min(palette->parts[part][2] * bodyState->shadeB / 255.0f, 255),
|
||||
// Light
|
||||
palette->parts[part][0] * bodyState->lightR / 255.0f,
|
||||
palette->parts[part][1] * bodyState->lightG / 255.0f,
|
||||
palette->parts[part][2] * bodyState->lightB / 255.0f,
|
||||
min(palette->parts[part][0] * bodyState->lightR / 255.0f, 255),
|
||||
min(palette->parts[part][1] * bodyState->lightG / 255.0f, 255),
|
||||
min(palette->parts[part][2] * bodyState->lightB / 255.0f, 255),
|
||||
0x28 + bodyState->lightingDirX * 127.0f, 0x28 + bodyState->lightingDirY * 127.0f, 0x28 + bodyState->lightingDirZ * 127.0f
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue