diff options
author | Kurausukun <lord.uber1@gmail.com> | 2020-12-10 23:30:52 -0500 |
---|---|---|
committer | Kurausukun <lord.uber1@gmail.com> | 2020-12-10 23:30:52 -0500 |
commit | 58976ebaa8d73d174940f622ec36f22bcd2fd8a2 (patch) | |
tree | c27ab24ed83fdb16654b5814d681af487b119601 /src/contest_painting.c | |
parent | 32ae13f9b66ab1b01146e5746e9350f97f055526 (diff) | |
parent | 8d29f65c6c7f34aa53ae2e7ae3e4f34a95025602 (diff) |
Merge remote-tracking branch 'upstream/master' into berry_crush
Diffstat (limited to 'src/contest_painting.c')
-rw-r--r-- | src/contest_painting.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/contest_painting.c b/src/contest_painting.c index e903edbbb..1602eb94f 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -397,16 +397,16 @@ static void _InitContestMonPixels(u8 *spriteGfx, u16 *palette, u16 (*destPixels) { for (pixelX = 0; pixelX < 8; pixelX++) { - colorIndex = spriteGfx[((tileY * 8) + tileX) * 32 + (pixelY << 2) + (pixelX >> 1)]; + colorIndex = spriteGfx[32 * (tileY * 8 + tileX) + (pixelY << 2) + (pixelX >> 1)]; if (pixelX & 1) colorIndex >>= 4; else - colorIndex &= 0xF; // %=16 works here too. Both match + colorIndex &= 0xF; - if (colorIndex == 0) // transparent pixel - (*destPixels)[tileY * 8 + pixelY][tileX * 8 + pixelX] = 0x8000; + if (colorIndex == 0) // transparent pixel + (*destPixels)[8 * tileY + pixelY][tileX * 8 + pixelX] = 0x8000; else - (*destPixels)[tileY * 8 + pixelY][tileX * 8 + pixelX] = palette[colorIndex]; + (*destPixels)[8 * tileY + pixelY][tileX * 8 + pixelX] = palette[colorIndex]; } } } @@ -501,7 +501,6 @@ static void LoadContestPaintingFrame(u8 contestWinnerId, bool8 arg1) static void InitPaintingMonOamData(u8 contestWinnerId) { - gMain.oamBuffer[0] = sContestPaintingMonOamData; gMain.oamBuffer[0].tileNum = 0; @@ -512,7 +511,7 @@ static void InitPaintingMonOamData(u8 contestWinnerId) } else { - gMain.oamBuffer[0].x = 88; // Duplicated Code + gMain.oamBuffer[0].x = 88; // Duplicated code gMain.oamBuffer[0].y = 24; } } |