Skip to content

Commit

Permalink
fix SetLimitedFade to use correct code.
Browse files Browse the repository at this point in the history
  • Loading branch information
LittlePlanetCD committed Oct 26, 2024
1 parent 8e2f5f3 commit cf532d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RSDKv4/Palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void SetLimitedFade(byte paletteID, byte R, byte G, byte B, ushort blendAmount,
return;

uint blendA = 0xFF - blendAmount;
for (int i = startIndex; i <= endIndex; ++i) {
for (int i = startIndex; i < endIndex; ++i) {
PACK_RGB888(activePalette[i], (byte)((ushort)(R * blendAmount + blendA * activePalette32[i].r) >> 8),
(byte)((ushort)(G * blendAmount + blendA * activePalette32[i].g) >> 8),
(byte)((ushort)(B * blendAmount + blendA * activePalette32[i].b) >> 8));
Expand Down

0 comments on commit cf532d7

Please sign in to comment.