From 87ac555e71e01e1e431a8257bc326738e9d42579 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 28 Jul 2019 21:18:28 -0500 Subject: [PATCH] remove hardcoded VRAM addresses --- src/contest_painting.c | 2 +- src/fldeff_flash.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contest_painting.c b/src/contest_painting.c index 820505b6ea..66127cbbcc 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -684,7 +684,7 @@ static void sub_8130760(u8 contestResult) gUnknown_030061A0.var_16 = 2; gUnknown_030061A0.var_0 = contestResult; - gUnknown_030061A0.var_10 = 0x6010000; + gUnknown_030061A0.var_10 = OBJ_VRAM0; sub_8124F2C(&gUnknown_030061A0); sub_81261A4(&gUnknown_030061A0); diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index c002f700f6..a2457307b1 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -219,8 +219,8 @@ static void sub_8137404(u8 taskId) static void sub_8137420(u8 taskId) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000); - LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800); + LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000)); + LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800)); LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20); LoadPalette(gUnknown_085B28A0, 0xE0, 0x10); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 @@ -304,8 +304,8 @@ static void sub_81375BC(u8 taskId) static void sub_81375D8(u8 taskId) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000); - LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800); + LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000)); + LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800)); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0);