diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-11 15:32:38 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-11 15:32:38 -0500 |
commit | 9974fd77611d0321ebe51750427e1ec273c1c7af (patch) | |
tree | ddb33ee5dff3cff02c6738ca3256ef8edea87a46 /src/scene/intro.c | |
parent | 531c8d8fd17b1927e9764d230458878b9eff3d52 (diff) |
eliminate remaining RAM pointers in src/
Diffstat (limited to 'src/scene/intro.c')
-rw-r--r-- | src/scene/intro.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/scene/intro.c b/src/scene/intro.c index c4bb1f9ea..03a573c90 100644 --- a/src/scene/intro.c +++ b/src/scene/intro.c @@ -20,6 +20,7 @@ #include "title_screen.h" #include "trig.h" #include "unknown_task.h" +#include "ewram.h" extern struct SpriteTemplate gUnknown_02024E8C; extern u16 gUnknown_02039358; @@ -765,7 +766,11 @@ const struct SpritePalette gIntro3MiscPal_Table[] = {gIntro3Misc2Palette, 2004}, {NULL}, }; -const u32 unusedData = 0x02000000; + +// 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; static void MainCB2_EndIntro(void); void Task_IntroLoadPart1Graphics(u8); @@ -1207,8 +1212,7 @@ static void Task_IntroWaitToSetupPart3DoubleFight(u8 taskId) gTasks[taskId].func = Task_IntroLoadPart3Streaks; } -// TODO: use ewram define instead -extern u8 gSharedMem[][32]; +//extern u8 gSharedMem[][32]; static void Task_IntroLoadPart3Streaks(u8 taskId) { @@ -1218,9 +1222,9 @@ static void Task_IntroLoadPart3Streaks(u8 taskId) intro_reset_and_hide_bgs(); for (i = 0; i < 32; i++) { - gSharedMem[0][i] = 0; - gSharedMem[1][i] = 17; - gSharedMem[2][i] = 34; + ewram0arr[0][i] = 0; + ewram0arr[1][i] = 17; + ewram0arr[2][i] = 34; } vram = (void *)VRAM; DmaCopy16(3, gSharedMem, vram, 0x60); |