summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-06-28 09:45:36 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-06-28 09:45:36 -0400
commit1dc19be2c22ef5832742d44376435fc8669d3b02 (patch)
treee648d359f2156e9fdd12808d06eadd9055ae151f /src
parent921a99ec5bc3a310d896a6a148294c04612ed354 (diff)
Resolve ewram0arr in intro.c, ewram0_7 in egg_hatch.c
Diffstat (limited to 'src')
-rw-r--r--src/egg_hatch.c4
-rw-r--r--src/intro.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index f0c8f232a..d6410391e 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -419,8 +419,8 @@ static void CB2_EggHatch_0(void)
break;
case 2:
LZDecompressVram(&gBattleTextboxTiles, (void*)(VRAM));
- CpuSet(&gBattleTextboxTilemap, ewram0_7, 0x800);
- DmaCopy16(3, ewram0_7, (void*)(VRAM + 0x2800), 0x500);
+ CpuSet(&gBattleTextboxTilemap, gSharedMem, 0x800);
+ DmaCopy16(3, gSharedMem, (void*)(VRAM + 0x2800), 0x500);
LoadCompressedPalette(&gBattleTextboxPalette, 0, 0x20);
gMain.state++;
break;
diff --git a/src/intro.c b/src/intro.c
index f0fda8862..5b4dc87dd 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -770,7 +770,7 @@ const struct SpritePalette gIntro3MiscPal_Table[] =
// Game Freak probably used the raw address here.
// Treating this like a u8 * causes the compiler
// to remove it at link time.
-const u32 unusedSharedMemPtr = (u32)gSharedMem;
+u8 (*const ewram0arr)[32] = (u8 (*)[32])gSharedMem;
static void MainCB2_EndIntro(void);
void Task_IntroLoadPart1Graphics(u8);
@@ -1212,8 +1212,6 @@ static void Task_IntroWaitToSetupPart3DoubleFight(u8 taskId)
gTasks[taskId].func = Task_IntroLoadPart3Streaks;
}
-//extern u8 gSharedMem[][32];
-
static void Task_IntroLoadPart3Streaks(u8 taskId)
{
u16 i;
@@ -1225,7 +1223,7 @@ static void Task_IntroLoadPart3Streaks(u8 taskId)
ewram0arr[1][i] = 17;
ewram0arr[2][i] = 34;
}
- DmaCopy16Defvars(3, gSharedMem, (void *)(VRAM + 0x0), 0x60);
+ DmaCopy16Defvars(3, ewram0arr, (void *)(VRAM + 0x0), 0x60);
for (i = 0; i < 0x280; i++)
((u16 *)(VRAM + 0x3000))[i] = 0xF001;
for (i = 0; i < 0x80; i++)