Fix TextIntoHealthboxObject fakematch (#2329)

This commit is contained in:
AZero13
2026-08-26 06:25:47 -04:00
committed by GitHub
parent 298239cbb4
commit 4d9208ea0c

View File

@@ -2584,16 +2584,14 @@ static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 window
static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 windowWidth)
{
int i;
CpuCopy32(windowTileData + 256, dest + 256, windowWidth * TILE_SIZE_4BPP);
// + 256 as that prevents the top 4 blank rows of sHealthboxWindowTemplate from being copied
if (windowWidth > 0)
// + 256 as that prevents the top 4 blank rows of sHealthboxWindowTemplate from being copied
for (i = 0; i < windowWidth; i++)
{
do
{
CpuCopy32(windowTileData + 20, dest + 20, 12);
dest += 32, windowTileData += 32;
windowWidth--;
} while (windowWidth != 0);
CpuCopy32(windowTileData + 20, dest + 20, 12);
dest += 32;
windowTileData += 32;
}
}