Detect potential misalignment in modern

This commit is contained in:
Martin Griffin
2023-07-24 19:04:23 +01:00
parent b53cca1a06
commit 31a3ada7de
30 changed files with 142 additions and 45 deletions
+3 -3
View File
@@ -2429,16 +2429,16 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2)
static void CopyPocketNameToWindow(u32 a)
{
u8 (* tileDataBuffer)[32][32];
u8 (*tileDataBuffer)[32][32];
u8 *windowTileData;
int b;
if (a > 8)
a = 8;
tileDataBuffer = &gBagMenu->pocketNameBuffer;
windowTileData = (u8 *)GetWindowAttribute(2, WINDOW_TILE_DATA);
CpuCopy32(tileDataBuffer[0][a], windowTileData, 0x100); // Top half of pocket name
CpuCopy32(&tileDataBuffer[0][a], windowTileData, 0x100); // Top half of pocket name
b = a + 16;
CpuCopy32(tileDataBuffer[0][b], windowTileData + 0x100, 0x100); // Bottom half of pocket name
CpuCopy32(&tileDataBuffer[0][b], windowTileData + 0x100, 0x100); // Bottom half of pocket name
CopyWindowToVram(WIN_POCKET_NAME, COPYWIN_GFX);
}