summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ewram.h2
-rw-r--r--src/egg_hatch.c4
-rw-r--r--src/intro.c6
3 files changed, 4 insertions, 8 deletions
diff --git a/include/ewram.h b/include/ewram.h
index 55edf1b05..77c54d47f 100644
--- a/include/ewram.h
+++ b/include/ewram.h
@@ -17,9 +17,7 @@ extern u8 gSharedMem[];
#define ewramBerryPic (gSharedMem + 0x0)
#define eMatsudaDebugVar (gSharedMem[0x0])
#define eBrendanSprite (gSharedMem + 0x0)
-#define ewram0_7 (&gSharedMem[0])
#define eSaveSection (struct SaveSector *)(gSharedMem + 0x0)
-#define ewram0arr ((u8 (*)[32])gSharedMem)
#define eVoidSharedArr (void *)(ewram_addr + 0x0)
#define eSlotMachine ((struct SlotMachineEwramStruct *)(gSharedMem + 0x0))
#define ewram0_9(i) (u8 *)(ewram_addr + (i * 0x20))
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++)