Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 6411545

Browse files
committed
Use PALETTE_LEN_4BPP
1 parent 4149e8f commit 6411545

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/sprite.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,11 @@ static AnimCmdResult animCmd_GetPalette(void *cursor, Sprite *s)
325325
s32 paletteIndex = cmd->palId;
326326

327327
if (gFlags & FLAGS_20000) {
328-
CopyPalette(&gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP], s->palId * PALETTE_LEN_4BPP + cmd->insertOffset, cmd->numColors);
328+
CopyPalette(&gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP], s->palId * PALETTE_LEN_4BPP + cmd->insertOffset,
329+
cmd->numColors);
329330
} else {
330-
DmaCopy16(3, &gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP], &gObjPalette[s->palId * PALETTE_LEN_4BPP + cmd->insertOffset],
331-
cmd->numColors * 2);
331+
DmaCopy16(3, &gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP],
332+
&gObjPalette[s->palId * PALETTE_LEN_4BPP + cmd->insertOffset], cmd->numColors * 2);
332333

333334
gFlags |= FLAGS_UPDATE_SPRITE_PALETTES;
334335
}
@@ -1059,7 +1060,8 @@ static AnimCmdResult animCmd_GetPalette(void *cursor, Sprite *s)
10591060
if (!(s->frameFlags & SPRITE_FLAG_MASK_18)) {
10601061
s32 paletteIndex = cmd->palId;
10611062

1062-
DmaCopy32(3, &gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP], &gObjPalette[s->palId * PALETTE_LEN_4BPP + cmd->insertOffset], cmd->numColors * 2);
1063+
DmaCopy32(3, &gRefSpriteTables->palettes[paletteIndex * PALETTE_LEN_4BPP],
1064+
&gObjPalette[s->palId * PALETTE_LEN_4BPP + cmd->insertOffset], cmd->numColors * 2);
10631065

10641066
gFlags |= FLAGS_UPDATE_SPRITE_PALETTES;
10651067
}

0 commit comments

Comments
 (0)