diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-11-11 12:53:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-11 12:53:51 -0800 |
commit | 999c4d59793e761ca71ab7b27272de46d78de138 (patch) | |
tree | e92c7c464611db96d956a97f033f9f4d63d23493 /src/scene/intro.c | |
parent | ed8c51dd404287c6355ba75dc4b9e2944d80e1d9 (diff) | |
parent | 4b1db681ea1e6a3b1e2d1c28699a94cb1393dc88 (diff) |
Merge pull request #455 from ProjectRevoTPP/remove_pointers
eliminate remaining pointers from dissassembly
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); |