summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-04-29 10:53:04 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-04-29 10:53:04 -0400
commit30b7a6fb95d8c364d6c7aaacf2fbf49bff0061cb (patch)
treefeb67a938de6e0c4f11c0b23329f2f013b40ef5f
parent63d3135bde32ed110ddf7624ea4dc8a76b20523b (diff)
Remove useless struct and deprecated definition
-rw-r--r--include/ewram.h1
-rw-r--r--include/global.h12
-rw-r--r--src/pokedex_cry_screen.c20
3 files changed, 13 insertions, 20 deletions
diff --git a/include/ewram.h b/include/ewram.h
index 6b164648b..87af8dd53 100644
--- a/include/ewram.h
+++ b/include/ewram.h
@@ -248,7 +248,6 @@ extern u8 gSharedMem[];
#define ewram1c000 (*(struct Unk201C000 *)(gSharedMem + 0x1C000)) // FIXME, names too similar
#define eHallOfFameMons1 (struct HallofFameMons*)(&gSharedMem[0x1C000])
#define eHOFPCScreenEffect (*(struct PCScreenEffectStruct *)(gSharedMem + 0x1c000))
-#define EWRAM_1C800 (*(struct Unk201C800 *)(gSharedMem + 0x1C800))
#define ewram1D000 ((struct Pokemon *)(gSharedMem + 0x1D000))
#define ewram1D000_2 ((u16 *)(gSharedMem + 0x1D000))
#define ewram1D400 ((u16 *)(gSharedMem + 0x1D400))
diff --git a/include/global.h b/include/global.h
index 89f56e174..82c4916bd 100644
--- a/include/global.h
+++ b/include/global.h
@@ -10,12 +10,12 @@
#if defined(__APPLE__) || defined(__CYGWIN__)
#define _(x) x
#define __(x) x
-#define INCBIN_U8(...) {0}
-#define INCBIN_U16(...) {0}
-#define INCBIN_U32(...) {0}
-#define INCBIN_S8(...) {0}
-#define INCBIN_S16(...) {0}
-#define INCBIN_S32(...) {0}
+#define INCBIN_U8 {0}
+#define INCBIN_U16 {0}
+#define INCBIN_U32 {0}
+#define INCBIN_S8 {0}
+#define INCBIN_S16 {0}
+#define INCBIN_S32 {0}
#endif
// Prevent cross-jump optimization.
diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c
index 6d2b09a4b..8877a0bce 100644
--- a/src/pokedex_cry_screen.c
+++ b/src/pokedex_cry_screen.c
@@ -11,10 +11,6 @@
extern struct SoundInfo gSoundInfo;
extern struct MusicPlayerInfo gMPlay_BGM;
-struct Unk2000000 {
- u8 unk0000[7 * 32 * 32];
-};
-
struct Unk201C800 {
s8 unk_0;
s8 unk_1;
@@ -35,8 +31,6 @@ struct PokedexCryScreen_201C000
u8 unk001B;
};
-#define ePokedexCryScreenGfx (*(struct Unk2000000 *)gSharedMem)
-
void sub_811A0A0(u16 species);
void sub_811A0C0(void);
void sub_811A124(void);
@@ -151,7 +145,7 @@ u8 sub_8119E3C(struct CryRelatedStruct *cry, u8 arg1)
{
for (j = 0; j < 32; j++)
{
- DmaCopy16(3, gUnknown_083FB718, ePokedexCryScreenGfx.unk0000[32 * i + j], 32);
+ DmaCopy16(3, gUnknown_083FB718, gSharedMem[32 * i + j], 32);
}
}
gUnknown_03005E98++;
@@ -504,7 +498,7 @@ void sub_811A15C(u8 a0)
r3 = (gPokedexCryScreenPtr->unk0011 / 8 + gPokedexCryScreenPtr->unk0016 + 1) % 32;
for (i = 0; i < 7; i++)
{
- DmaCopy16(3, gUnknown_083FB718, &ePokedexCryScreenGfx.unk0000[32 * (32 * i + r3)], 32);
+ DmaCopy16(3, gUnknown_083FB718, &gSharedMem[32 * (32 * i + r3)], 32);
}
}
@@ -525,8 +519,8 @@ void sub_811A1C8(u8 a0, u8 a1)
{
do
{
- ePokedexCryScreenGfx.unk0000[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] &= gUnknown_083FB738[r7];
- ePokedexCryScreenGfx.unk0000[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] |= gUnknown_083FB73A[r7][((i / 3) - 1) & 0x0F];
+ gSharedMem[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] &= gUnknown_083FB738[r7];
+ gSharedMem[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] |= gUnknown_083FB73A[r7][((i / 3) - 1) & 0x0F];
i--;
} while (i > gPokedexCryScreenPtr->unk0012);
}
@@ -534,8 +528,8 @@ void sub_811A1C8(u8 a0, u8 a1)
{
do
{
- ePokedexCryScreenGfx.unk0000[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] &= gUnknown_083FB738[r7];
- ePokedexCryScreenGfx.unk0000[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] |= gUnknown_083FB73A[r7][((i / 3) - 1) & 0x0F];
+ gSharedMem[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] &= gUnknown_083FB738[r7];
+ gSharedMem[(u16)(r8 * 32 + gUnknown_083FB274[a0 % 8][i])] |= gUnknown_083FB73A[r7][((i / 3) - 1) & 0x0F];
i++;
} while (i < gPokedexCryScreenPtr->unk0012);
}
@@ -712,7 +706,7 @@ NAKED void sub_811A1C8(u8 a0, u8 a1)
void sub_811A324(void)
{
- DmaCopy16(3, ePokedexCryScreenGfx.unk0000, VRAM + gPokedexCryScreenPtr->unk0014, 0x1c00);
+ DmaCopy16(3, gSharedMem, VRAM + gPokedexCryScreenPtr->unk0014, 0x1c00);
}
void sub_811A350(u8 a0, u16 a1, u8 a2)