From 80985df175f67ea1b90772d2d82c5f97bda44106 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Oct 2017 22:16:21 -0400 Subject: sub_8123244 --- include/cable_car_util.h | 12 ++++++++++ include/field_weather.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ include/gba/macro.h | 30 ++++++++++++++++++++++++ include/global.h | 1 + 4 files changed, 103 insertions(+) create mode 100644 include/cable_car_util.h (limited to 'include') diff --git a/include/cable_car_util.h b/include/cable_car_util.h new file mode 100644 index 000000000..0f50914c8 --- /dev/null +++ b/include/cable_car_util.h @@ -0,0 +1,12 @@ +#ifndef GUARD_CABLE_CAR_UTIL_H +#define GUARD_CABLE_CAR_UTIL_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations + +void sub_8124F08(u16 *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); + +#endif //GUARD_CABLE_CAR_UTIL_H diff --git a/include/field_weather.h b/include/field_weather.h index 409f76028..790fadaea 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -47,4 +47,64 @@ bool8 sub_807DDFC(void); void SetWeather(u32); void UpdateWeatherPerDay(u16); +struct WeatherSubstruct { + u8 filler_0[5]; + u8 unk_5_0:2; + u8 unk_5_2:2; + u8 unk_5_4:4; +}; + +struct Weather +{ + u8 filler_000[0xf0]; + struct WeatherSubstruct *unk_0f0[20]; + u8 filler_140[0xc0]; + u8 unknown_200[2][32]; + u8 filler_240[0x480]; + s8 unknown_6C0; + s8 unknown_6C1; + u8 unknown_6C2; + u8 unknown_6C3; + u16 unknown_6C4; + u8 unknown_6C6; + u8 unknown_6C7; + u8 unknown_6C8; + u8 unknown_6C9; + u8 unknown_6CA; + u8 unknown_6CB; + u8 filler_6CC[2]; + u16 unknown_6CE; + u8 unknown_6D0; + u8 unknown_6D1; + u8 filler_6D2[1]; + u8 unknown_6D3; + u8 unknown_6D4; + u8 unknown_6D5; + u8 filler_6D6[2]; + u8 unknown_6D8; + u8 filler_6D9[1]; + u8 unknown_6DA; + u8 filler_6DB[3]; + u8 unknown_6DE; + u8 filler_6DF[5]; + u8 unknown_6E4; + u8 filler_6E5[0x15]; + u8 unknown_6FA; + u8 unknown_6FB; + u8 filler_6FC[4]; + u8 unknown_700; + u8 filler_701[0x15]; + u8 unknown_716; + u8 unknown_717; + u8 filler_718[0xc]; + u8 unknown_724; + u8 filler_725[9]; + u8 unknown_72E; +}; + +#define gWeather gUnknown_0202F7E8 +extern struct Weather gWeather; + +extern struct Weather *const gUnknown_08396FC4; + #endif // GUARD_WEATHER_H diff --git a/include/gba/macro.h b/include/gba/macro.h index 1e0254806..71ff15590 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -118,4 +118,34 @@ #define DmaCopy16Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 16) #define DmaCopy32Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 32) +#define DmaFillLarge(dmaNum, fillval, dest, size, block, bit) \ +{ \ + void *_dest = dest; \ + u32 _size = (u32)(size); \ + while (1) \ + { \ + DmaFill##bit(dmaNum, fillval, _dest, (block)); \ + _dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaFill##bit(dmaNum, fillval, _dest, _size); \ + break; \ + } \ + } \ +} + +#define DmaFill16Large(dmaNum, fillval, dest, size, block) DmaFillLarge(dmaNum, fillval, dest, size, block, 16) +#define DmaFill32Large(dmaNum, fillval, dest, size, block) DmaFillLarge(dmaNum, fillval, dest, size, block, 32) + +#define DmaFillDefvars(dmaNum, fillval, dest, size, bit) \ +{ \ + void *_dest = dest; \ + u32 _size = (u##bit)(size); \ + DmaFill##bit(dmaNum, fillval, _dest, _size); \ +} + +#define DmaFill16Defvars(dmaNum, fillval, dest, size) DmaFillDefvars(dmaNum, fillval, dest, size, 16) +#define DmaFill32Defvars(dmaNum, fillval, dest, size) DmaFillDefvars(dmaNum, fillval, dest, size, 32) + #endif // GUARD_GBA_MACRO_H diff --git a/include/global.h b/include/global.h index f0eb7401f..4604c8cbb 100644 --- a/include/global.h +++ b/include/global.h @@ -799,5 +799,6 @@ struct HallOfFame extern struct HallOfFame gHallOfFame; extern struct SaveBlock2 gSaveBlock2; +extern u8 ewram[]; #endif // GUARD_GLOBAL_H -- cgit v1.2.3 From b833bf304963f92de2670529d1d9083180ade9ba Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Oct 2017 22:34:01 -0400 Subject: sub_8123740 --- include/gba/macro.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/gba/macro.h b/include/gba/macro.h index 71ff15590..a183a44fc 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -87,7 +87,7 @@ #define DmaCopyLarge(dmaNum, src, dest, size, block, bit) \ { \ const void *_src = src; \ - void *_dest = dest; \ + void *_dest = (void *)(dest); \ u32 _size = size; \ while (1) \ { \ @@ -110,7 +110,7 @@ #define DmaCopyDefvars(dmaNum, src, dest, size, bit) \ { \ const void *_src = src; \ - void *_dest = dest; \ + void *_dest = (void *)(dest); \ u32 _size = size; \ DmaCopy##bit(dmaNum, _src, _dest, _size); \ } @@ -120,8 +120,8 @@ #define DmaFillLarge(dmaNum, fillval, dest, size, block, bit) \ { \ - void *_dest = dest; \ - u32 _size = (u32)(size); \ + void *_dest = (void *)(dest); \ + u32 _size = (u32)(size); \ while (1) \ { \ DmaFill##bit(dmaNum, fillval, _dest, (block)); \ @@ -140,7 +140,7 @@ #define DmaFillDefvars(dmaNum, fillval, dest, size, bit) \ { \ - void *_dest = dest; \ + void *_dest = (void *)(dest); \ u32 _size = (u##bit)(size); \ DmaFill##bit(dmaNum, fillval, _dest, _size); \ } -- cgit v1.2.3 From 89904a0f2492e9e579b7478c4a66cc547027cf48 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Oct 2017 23:07:27 -0400 Subject: sub_8123878 --- include/field_weather.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'include') diff --git a/include/field_weather.h b/include/field_weather.h index 790fadaea..b51c47de7 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -47,17 +47,10 @@ bool8 sub_807DDFC(void); void SetWeather(u32); void UpdateWeatherPerDay(u16); -struct WeatherSubstruct { - u8 filler_0[5]; - u8 unk_5_0:2; - u8 unk_5_2:2; - u8 unk_5_4:4; -}; - struct Weather { u8 filler_000[0xf0]; - struct WeatherSubstruct *unk_0f0[20]; + struct Sprite *unk_0f0[20]; u8 filler_140[0xc0]; u8 unknown_200[2][32]; u8 filler_240[0x480]; -- cgit v1.2.3 From 91a171ff93f10ba185a826257c5b1f2564e59a22 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Oct 2017 23:40:20 -0400 Subject: sub_81239E4 --- include/cable_car_util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/cable_car_util.h b/include/cable_car_util.h index 0f50914c8..76198af02 100644 --- a/include/cable_car_util.h +++ b/include/cable_car_util.h @@ -8,5 +8,6 @@ // Exported ROM declarations void sub_8124F08(u16 *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); +void sub_8124E7C(u16 *dest, u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); #endif //GUARD_CABLE_CAR_UTIL_H -- cgit v1.2.3 From acf2820efce9893e71700c8892b00f9acceb9477 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Oct 2017 10:18:11 -0400 Subject: sub_8123AF8 --- include/field_weather.h | 3 ++- include/global.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/field_weather.h b/include/field_weather.h index b51c47de7..d3b1f4ffd 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -84,7 +84,8 @@ struct Weather u8 filler_6E5[0x15]; u8 unknown_6FA; u8 unknown_6FB; - u8 filler_6FC[4]; + u16 unknown_6FC; + u8 filler_6FE[2]; u8 unknown_700; u8 filler_701[0x15]; u8 unknown_716; diff --git a/include/global.h b/include/global.h index 4604c8cbb..a22f0d817 100644 --- a/include/global.h +++ b/include/global.h @@ -14,9 +14,9 @@ #define INCBIN_S8 {0} #define INCBIN_S16 {0} #define INCBIN_S32 {0} -void * memcpy (void *, const void *, size_t); -void * memset (void *, int, size_t); -int strcmp (const char *, const char *); +void *memcpy (void *, const void *, size_t); +void *memset (void *, int, size_t); +int strcmp (const char *, const char *); #endif // Prevent cross-jump optimization. -- cgit v1.2.3 From 259d0cfc75f03da9b2e9f02d45810bb4eb7de12a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Oct 2017 11:00:34 -0400 Subject: sub_8123CB8 --- include/sprite.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/sprite.h b/include/sprite.h index 769e1584d..68bb0b0e1 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -120,10 +120,6 @@ union AffineAnimCmd {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}} #define AFFINEANIMCMD_END \ {.type = AFFINEANIMCMDTYPE_END} -#define AFFINEANIMCMD_LOOP(_count) \ - {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}} -#define AFFINEANIMCMD_JUMP(_target) \ - {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}} struct AffineAnimState { -- cgit v1.2.3 From 28e98d9df7db41f9dcc813ad4e0b37c568833aee Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Mon, 1 Jan 2018 23:09:51 -0600 Subject: decompile sub_80E60D8 - sub_80E6AC4 --- include/easy_chat.h | 1 + include/global.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index a6277fba8..541a697be 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -3,6 +3,7 @@ extern u8 gUnknown_020388AC; +void sub_80E62A0(u8 arg0, u16 *arg1, void *arg2, u8 arg3); u16 sub_80EB72C(u16 group); void sub_80EB6FC(u16 *, u16); void InitEasyChatPhrases(void); diff --git a/include/global.h b/include/global.h index a4e71852c..3dc7ebc11 100644 --- a/include/global.h +++ b/include/global.h @@ -690,7 +690,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B40*/ u16 unk2B40[6]; } easyChats; /*0x2B4C*/ struct MailStruct mail[16]; - /*0x2D8C*/ u8 unk2D8C[4]; + /*0x2D8C*/ u8 unk2D8C[4]; // What is this? Apparently it's supposed to be 64 bytes in size. /*0x2D90*/ u8 filler_2D90[0x4]; /*0x2D94*/ union MauvilleMan mauvilleMan; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff -- cgit v1.2.3 From 82b9b4fc7e9c45caa6229a1f88bf8034381862e6 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 2 Jan 2018 15:38:48 -0600 Subject: decompile sub_80E6AE4 - sub_80E7294 --- include/dewford_trend.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dewford_trend.h b/include/dewford_trend.h index c12d0d740..16b2bdd75 100644 --- a/include/dewford_trend.h +++ b/include/dewford_trend.h @@ -2,6 +2,7 @@ #define GUARD_DEWFORDTREND_H void InitDewfordTrend(void); +bool8 sub_80FA364(u16 *a); void sub_80FA4E4(void *, u32, u8); void UpdateDewfordTrendPerDay(u16); -- cgit v1.2.3 From a2e854bb7cda3d4de0b4f2d1fc9e7bd88a471980 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 2 Jan 2018 19:22:51 -0600 Subject: decompile sub_80E7324 - sub_80E7AD4 --- include/easy_chat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 541a697be..a752720a6 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -3,7 +3,7 @@ extern u8 gUnknown_020388AC; -void sub_80E62A0(u8 arg0, u16 *arg1, void *arg2, u8 arg3); +void sub_80E62A0(u8 arg0, u16 *arg1, void (*arg2)(void), u8 arg3); u16 sub_80EB72C(u16 group); void sub_80EB6FC(u16 *, u16); void InitEasyChatPhrases(void); -- cgit v1.2.3 From cf37681831a9a8289d5941e66ce673b896abf71f Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 3 Jan 2018 14:30:23 -0600 Subject: decompile sub_80E810C - sub_80E872C --- include/easy_chat.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/graphics.h | 2 ++ 2 files changed, 94 insertions(+) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index a752720a6..8d13ecc42 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -1,8 +1,100 @@ #ifndef GUARD_EASYCHAT_H #define GUARD_EASYCHAT_H +struct Sprite; + +struct Shared1000 +{ + void (*unk0)(void); // main cb 2 + u16 *unk4; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u16 unkC[(0x20-0xC)/2]; // unknown length + void (*unk20)(void); + u16 unk24; + u8 unk26; + u8 unk27; + u16 unk28; + u8 unk2A[11][2]; // unknown length + u8 unk40[4][14]; + u8 unk78[0x7D - 0x78]; // unknown length + u8 unk7D; + u8 unk7E[0x83-0x7E]; + s8 unk83; // s8? + //u8 unk83; // s8? + s8 unk84; + s8 unk85; + s8 unk86; + bool8 unk87; + u16 unk88; + u16 unk8A; + u8 unk8C[(0x96-0x8C)/2][2]; + u8 unk96; + u8 filler97; + struct Sprite *unk98; + struct Sprite *unk9C; + struct Sprite *unkA0; + struct Sprite *unkA4; + u8 fillerA8[0x1A8-0xA8]; + s8 unk1A8; + s8 unk1A9; + s8 unk1AA[0xB5-0xAA]; // unknown length + s8 unk1B5; + s8 unk1B6; + s8 unk1B7; + u8 unk1B8; + u8 unk1B9; + u16 unk1BA; + u8 filler1BC[0xBE - 0xBC]; + u8 unk1BE; + u8 filler1BF; + s8 unk1C0; + u8 filler1C1[3]; + void (*unk1C4)(void); + u8 filler1C8[0x4142-0x1C8]; +#if GERMAN + u8 filler4142_de[0x32A]; +#endif + u16 unk4142[(0x78-0x42)/2]; + u16 unk4178[(0x99A4-0x4178)/2]; // unknown length +#if GERMAN + u8 filler99A4_de[2]; +#endif + s8 unk99A4; + s8 unk99A5; + s8 unk99A6[0xA28-0x9A6]; + s8 unk9A28; + s8 unk9A29; + //u8 filler9A2A[0xC7C-0xA2A]; + u16 unk9A2A[0x94][2]; // unknown length + u8 filler9C7A[2]; + u16 unk9C7C; // this is at 0x9FA8 in German + s16 unk9C7E; + u8 unk9C80[0xC9-0x80]; + u8 unk9CC9[0xD12-0xCC9]; + u8 unk9D12[0x5B-0x12]; + u8 unk9D5B[0xA4-0x5B]; + u8 unk9DA4[0xC8-0xA4]; + u8 filler9DC8[0xE14 - 0xDC8]; + u8 unk9E14[0xE41 - 0xE14]; + u8 unk9E41[0x6E - 0x41]; + u8 unk9E6E[0xEE - 0x6E]; + u8 unk9EEE[0xF6E - 0xEEE]; + u8 unk9F6E[1]; // unknown length +}; + +#define static_assert(cond) \ + typedef char test_[(cond) ? 1 : -1] + +//static_assert(offsetof(struct Shared1000, unk1A8) == 0x1A8); + extern u8 gUnknown_020388AC; +// const pointer to shared1000. easy_chat might be two separate files. +extern struct Shared1000 *const gUnknown_083DB694; + void sub_80E62A0(u8 arg0, u16 *arg1, void (*arg2)(void), u8 arg3); u16 sub_80EB72C(u16 group); void sub_80EB6FC(u16 *, u16); diff --git a/include/graphics.h b/include/graphics.h index 488de07c0..130e21f58 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2656,4 +2656,6 @@ extern const u8 gNamingScreenRightPointingTriangleTiles[]; extern const u8 gNamingScreenUnderscoreTiles[]; extern const u16 gNamingScreenPalettes[][16]; +extern const u8 gInterviewOutlineCursorTiles[]; + #endif // GUARD_GRAPHICS_H -- cgit v1.2.3 From 324705201c8648830a9b5ed7926891bf38bfcabe Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 3 Jan 2018 20:24:50 -0600 Subject: decompile sub_80E8760 - sub_80E8B78 --- include/easy_chat.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 8d13ecc42..58442a890 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -37,7 +37,10 @@ struct Shared1000 struct Sprite *unk9C; struct Sprite *unkA0; struct Sprite *unkA4; - u8 fillerA8[0x1A8-0xA8]; + struct Sprite *unkA8; + struct Sprite *unkAC[2]; + struct Sprite *unkB4[2]; + u8 fillerBC[0x1A8-0xBC]; s8 unk1A8; s8 unk1A9; s8 unk1AA[0xB5-0xAA]; // unknown length @@ -67,9 +70,12 @@ struct Shared1000 s8 unk99A6[0xA28-0x9A6]; s8 unk9A28; s8 unk9A29; - //u8 filler9A2A[0xC7C-0xA2A]; - u16 unk9A2A[0x94][2]; // unknown length - u8 filler9C7A[2]; + u16 unk9A2A[0x90][2]; // unknown length + u8 filler9C6A[2]; + s8 *unk9C6C; + u8 unk9C70; + s8 unk9C71; + u8 filler9C72[0xC-0x2]; u16 unk9C7C; // this is at 0x9FA8 in German s16 unk9C7E; u8 unk9C80[0xC9-0x80]; -- cgit v1.2.3 From c6fd37b0dffe1975159699cee3ce57c9ea5716d4 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 4 Jan 2018 17:29:36 -0600 Subject: decompile sub_80E8BF4 - sub_80E95A4 --- include/easy_chat.h | 26 ++++++++++++++++++++------ include/field_map_obj.h | 2 +- include/graphics.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 58442a890..0c42f4685 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -10,7 +10,7 @@ struct Shared1000 u8 unk8; u8 unk9; u8 unkA; - u8 unkB; + u8 unkB; // reporter talked to (Gabby or Ty) u16 unkC[(0x20-0xC)/2]; // unknown length void (*unk20)(void); u16 unk24; @@ -40,7 +40,8 @@ struct Shared1000 struct Sprite *unkA8; struct Sprite *unkAC[2]; struct Sprite *unkB4[2]; - u8 fillerBC[0x1A8-0xBC]; + u8 unkBC; + u8 fillerBD[0x1A8-0xBD]; s8 unk1A8; s8 unk1A9; s8 unk1AA[0xB5-0xAA]; // unknown length @@ -56,7 +57,8 @@ struct Shared1000 s8 unk1C0; u8 filler1C1[3]; void (*unk1C4)(void); - u8 filler1C8[0x4142-0x1C8]; + u8 unk1C8[0x6C8-0x1C8]; + u8 unk6C8[0x4142-0x6C8]; #if GERMAN u8 filler4142_de[0x32A]; #endif @@ -70,12 +72,17 @@ struct Shared1000 s8 unk99A6[0xA28-0x9A6]; s8 unk9A28; s8 unk9A29; - u16 unk9A2A[0x90][2]; // unknown length + u16 unk9A2A[(0x9C32-0x9A2A)/4][2]; // unknown length + u8 unk9C32; + u8 filler9C33; + u16 unk9C34[3][9]; u8 filler9C6A[2]; s8 *unk9C6C; u8 unk9C70; s8 unk9C71; - u8 filler9C72[0xC-0x2]; + u8 filler9C72[2]; + struct Sprite *unk9C74; + u8 filler9C78[4]; u16 unk9C7C; // this is at 0x9FA8 in German s16 unk9C7E; u8 unk9C80[0xC9-0x80]; @@ -88,7 +95,13 @@ struct Shared1000 u8 unk9E41[0x6E - 0x41]; u8 unk9E6E[0xEE - 0x6E]; u8 unk9EEE[0xF6E - 0xEEE]; - u8 unk9F6E[1]; // unknown length + u8 unk9F6E[0x8E - 0x6E]; // unknown length + u8 unk9F8E[1]; // unknown length + /* + u8 unk9F8F; + u8 unk9F90; + u8 unk9F91[1]; // unknown length + */ }; #define static_assert(cond) \ @@ -97,6 +110,7 @@ struct Shared1000 //static_assert(offsetof(struct Shared1000, unk1A8) == 0x1A8); extern u8 gUnknown_020388AC; +extern u8 gUnknown_03000740; // const pointer to shared1000. easy_chat might be two separate files. extern struct Shared1000 *const gUnknown_083DB694; diff --git a/include/field_map_obj.h b/include/field_map_obj.h index f0b0bb5ab..cf3be36b2 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -337,7 +337,7 @@ void RemoveFieldObjectInternal(struct MapObject *); u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); u8 show_sprite(u8, u8, u8); void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjTemplate, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables); -u8 AddPseudoFieldObject(u16 graphicsId, void (*callback)(struct Sprite *), s16 c, s16 d, u8 subpriority); +u8 AddPseudoFieldObject(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority); u8 sub_805B410(u8, u8, s16, s16, u8, u8); void sub_805B55C(s16 a, s16 b); void sub_805B710(u16 i, u16 i1); diff --git a/include/graphics.h b/include/graphics.h index 130e21f58..e869b88e9 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2656,6 +2656,37 @@ extern const u8 gNamingScreenRightPointingTriangleTiles[]; extern const u8 gNamingScreenUnderscoreTiles[]; extern const u16 gNamingScreenPalettes[][16]; +extern const u8 gUnknown_08E94510[]; +extern const u8 gUnknown_08E94550[]; +extern const u8 gUnknown_08E94590[]; +extern const u8 gUnknown_08E945D0[]; +extern const u8 gUnknown_08E94AD0[]; +extern const u8 gUnknown_08E953D0[]; +extern const u8 gUnknown_08E954B0[]; +extern const u8 gUnknown_08E95774[]; + +extern const u8 gMenuWordGroupIndicator_Gfx[]; +extern const u8 gMenuWordGroupFrame_Gfx[]; +extern const u16 gMenuWordGroupIndicator_Pal[]; +extern const u16 gMenuWordGroupFrame1_Pal[]; +extern const u16 gMenuWordGroupFrame2_Pal[]; + +extern const u8 gUnknown_08E99FB0[]; +extern const u8 gUnknown_08E9A100[]; +extern const u8 gUnknown_08E9A300[]; +extern const u8 gUnknown_08E9AB00[]; +extern const u8 gUnknown_08E9AB40[]; +extern const u8 gUnknown_08E9AB60[]; +extern const u8 gUnknown_08E9ABB4[]; +extern const u8 gUnknown_08E9AC2C[]; +extern const u8 gUnknown_08E9AC4C[]; + extern const u8 gInterviewOutlineCursorTiles[]; +extern const u8 gTitleScreenPressStart_Gfx[]; +extern const u16 gTitleScreenLogoShinePalette[]; +extern const u8 gUnknown_08E9D8CC[]; +extern const u8 gVersionTiles[]; +extern const u16 gUnknown_08E9F624[]; +extern const u8 gUnknown_08E9F7E4[]; #endif // GUARD_GRAPHICS_H -- cgit v1.2.3 From d7970fba2fef5fd8949eb1b2c24f0556103bda27 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 4 Jan 2018 22:26:27 -0600 Subject: decompile sub_80E9620 - sub_80EA184 --- include/easy_chat.h | 19 ++++++++----------- include/global.h | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 0c42f4685..7b3b849f0 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -41,7 +41,9 @@ struct Shared1000 struct Sprite *unkAC[2]; struct Sprite *unkB4[2]; u8 unkBC; - u8 fillerBD[0x1A8-0xBD]; + u8 fillerBD; + u16 unkBE; + u8 fillerC0[0x1A8-0xC0]; s8 unk1A8; s8 unk1A9; s8 unk1AA[0xB5-0xAA]; // unknown length @@ -51,9 +53,9 @@ struct Shared1000 u8 unk1B8; u8 unk1B9; u16 unk1BA; - u8 filler1BC[0xBE - 0xBC]; + u16 unk1BC; u8 unk1BE; - u8 filler1BF; + s8 unk1BF; s8 unk1C0; u8 filler1C1[3]; void (*unk1C4)(void); @@ -89,19 +91,14 @@ struct Shared1000 u8 unk9CC9[0xD12-0xCC9]; u8 unk9D12[0x5B-0x12]; u8 unk9D5B[0xA4-0x5B]; - u8 unk9DA4[0xC8-0xA4]; - u8 filler9DC8[0xE14 - 0xDC8]; + u8 unk9DA4[0xC9-0xA4]; + u8 unk9DC9[0xE14 - 0xDC9]; u8 unk9E14[0xE41 - 0xE14]; u8 unk9E41[0x6E - 0x41]; u8 unk9E6E[0xEE - 0x6E]; u8 unk9EEE[0xF6E - 0xEEE]; u8 unk9F6E[0x8E - 0x6E]; // unknown length - u8 unk9F8E[1]; // unknown length - /* - u8 unk9F8F; - u8 unk9F90; - u8 unk9F91[1]; // unknown length - */ + u8 unk9F8E[7]; // unknown length }; #define static_assert(cond) \ diff --git a/include/global.h b/include/global.h index 27b4b84a2..c7027eccf 100644 --- a/include/global.h +++ b/include/global.h @@ -41,7 +41,7 @@ fndec\ #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 -#define min(a, b) ((a) <= (b) ? (a) : (b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) // why does GF hate 2d arrays -- cgit v1.2.3 From 4149e858836f39836c476a8a6bc1403a6429c141 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 5 Jan 2018 15:28:36 -0600 Subject: decompile sub_80EA1E0 - sub_80EAD7C --- include/easy_chat.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 7b3b849f0..2fe11dd11 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -3,6 +3,15 @@ struct Sprite; +struct UnknownEasyChatStruct1 +{ + u16 unk0; + u16 unk2; + u16 unk4; + u16 unk6; + void *unk8; +}; + struct Shared1000 { void (*unk0)(void); // main cb 2 @@ -21,7 +30,7 @@ struct Shared1000 u8 unk40[4][14]; u8 unk78[0x7D - 0x78]; // unknown length u8 unk7D; - u8 unk7E[0x83-0x7E]; + u8 unk7E[5]; s8 unk83; // s8? //u8 unk83; // s8? s8 unk84; @@ -43,7 +52,12 @@ struct Shared1000 u8 unkBC; u8 fillerBD; u16 unkBE; - u8 fillerC0[0x1A8-0xC0]; + u8 fillerC0[2]; + u16 unkC2; // length of unkC8 and unk148 arrays + u16 unkC4; + u8 fillerC6[2]; + u16 unkC8[(0x148-0xC8)/16][8]; + struct UnknownEasyChatStruct1 unk148[(0x1A8-0x148)/12]; s8 unk1A8; s8 unk1A9; s8 unk1AA[0xB5-0xAA]; // unknown length -- cgit v1.2.3 From 319eb710ed84f816b7c8194b35c53a8d32e916c5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 5 Jan 2018 21:13:50 -0500 Subject: through sub_81245F4 --- include/cable_car_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cable_car_util.h b/include/cable_car_util.h index 76198af02..d109190b0 100644 --- a/include/cable_car_util.h +++ b/include/cable_car_util.h @@ -7,7 +7,7 @@ // Exported ROM declarations -void sub_8124F08(u16 *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); -void sub_8124E7C(u16 *dest, u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); +void sub_8124F08(void *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); +void sub_8124E7C(void *dest, u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); #endif //GUARD_CABLE_CAR_UTIL_H -- cgit v1.2.3 From 66a7a42a108c2d6c86c80d28397ea243969094cd Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 5 Jan 2018 20:23:49 -0600 Subject: decompile sub_80EADC0 - sub_80EB37C --- include/easy_chat.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index 2fe11dd11..d2b562931 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -74,12 +74,14 @@ struct Shared1000 u8 filler1C1[3]; void (*unk1C4)(void); u8 unk1C8[0x6C8-0x1C8]; - u8 unk6C8[0x4142-0x6C8]; + u8 unk6C8[0xB78-0x6C8]; + u16 unkB78[0x1B][255]; #if GERMAN u8 filler4142_de[0x32A]; #endif u16 unk4142[(0x78-0x42)/2]; - u16 unk4178[(0x99A4-0x4178)/2]; // unknown length + u16 unk4178[(0x41A4-0x4178)/2]; // unknown length + const u8 *unk41A4[0x16][0x100]; #if GERMAN u8 filler99A4_de[2]; #endif -- cgit v1.2.3 From fe7e54d6d8d158409316af91ca4e119a6af73faf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 5 Jan 2018 21:37:20 -0500 Subject: Make static what can be made static --- include/graphics.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 17abb840e..32f3a1c1f 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2703,4 +2703,11 @@ extern const u16 gUnknown_08E95A18[]; extern const u16 gUnknown_08E95AB8[]; extern const u16 gUnknown_08E95FB8[]; +extern const u8 gCableCar_Gfx[]; +extern const u8 gCableCarDoor_Gfx[]; +extern const u8 gCableCarCord_Gfx[]; +extern const u16 gCableCar_Pal[]; +extern const u16 gCableCarBG_Pal[]; +extern const u8 gCableCarBG_Gfx[]; + #endif // GUARD_GRAPHICS_H -- cgit v1.2.3 From 60ab994a0fdf75bc007a5349f424b6e346604de6 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 5 Jan 2018 21:27:40 -0600 Subject: fix German build --- include/easy_chat.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index d2b562931..9342663d8 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -75,16 +75,14 @@ struct Shared1000 void (*unk1C4)(void); u8 unk1C8[0x6C8-0x1C8]; u8 unk6C8[0xB78-0x6C8]; - u16 unkB78[0x1B][255]; #if GERMAN - u8 filler4142_de[0x32A]; + u16 unkB78[0x1B][270]; +#else + u16 unkB78[0x1B][255]; #endif - u16 unk4142[(0x78-0x42)/2]; + u16 unk4142[(0x78-0x42)/2]; //0x446C u16 unk4178[(0x41A4-0x4178)/2]; // unknown length - const u8 *unk41A4[0x16][0x100]; -#if GERMAN - u8 filler99A4_de[2]; -#endif + const u8 *unk41A4[0x16][0x100]; //0x44CE in german s8 unk99A4; s8 unk99A5; s8 unk99A6[0xA28-0x9A6]; @@ -117,11 +115,6 @@ struct Shared1000 u8 unk9F8E[7]; // unknown length }; -#define static_assert(cond) \ - typedef char test_[(cond) ? 1 : -1] - -//static_assert(offsetof(struct Shared1000, unk1A8) == 0x1A8); - extern u8 gUnknown_020388AC; extern u8 gUnknown_03000740; @@ -145,7 +138,7 @@ u16 sub_80EB8EC(void); u8 *sub_80EB544(u8 *dst, u16 *words, u16 arg2, u16 arg3); #if GERMAN -u32 de_sub_80EB748(u32, u32); +u32 de_sub_80EB748(s32, s32); #endif #endif // GUARD_EASYCHAT_H -- cgit v1.2.3 From e28c11ef9518c80e23ce0076b8ba9be4cb140015 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 5 Jan 2018 23:07:57 -0500 Subject: Update delcarations of cable car util funtions --- include/cable_car_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cable_car_util.h b/include/cable_car_util.h index d109190b0..f1f52bb3c 100644 --- a/include/cable_car_util.h +++ b/include/cable_car_util.h @@ -7,7 +7,7 @@ // Exported ROM declarations -void sub_8124F08(void *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); -void sub_8124E7C(void *dest, u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); +void sub_8124F08(u16 dest[][32], const u16 *src, u8 x, u8 y, u8 width, u8 height); +void sub_8124E7C(u16 dest[][32], u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); #endif //GUARD_CABLE_CAR_UTIL_H -- cgit v1.2.3 From 7d181ec03bdc8e5b9424e08e4428b76bab8eb5fd Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 5 Jan 2018 22:18:57 -0600 Subject: minor cleanup --- include/constants/easy_chat.h | 4 ++-- include/easy_chat.h | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h index 12350aebe..215dac48c 100644 --- a/include/constants/easy_chat.h +++ b/include/constants/easy_chat.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_EASY_CHAT_H #define GUARD_CONSTANTS_EASY_CHAT_H -#define EC_GROUP_POKEMON 0x0 +#define EC_GROUP_POKEMON_1 0x0 #define EC_GROUP_TRAINER 0x1 #define EC_GROUP_STATUS 0x2 #define EC_GROUP_BATTLE 0x3 @@ -1053,7 +1053,7 @@ #define EC_WORD_YOUNG (EC_GROUP_TRENDY_SAYING << 9) | 0x1f #define EC_WORD_UGLY (EC_GROUP_TRENDY_SAYING << 9) | 0x20 -#define EC_POKEMON(mon) ((EC_GROUP_POKEMON << 9) | SPECIES_##mon) +#define EC_POKEMON(mon) ((EC_GROUP_POKEMON_1 << 9) | SPECIES_##mon) #define EC_POKEMON2(mon) ((EC_GROUP_POKEMON_2 << 9) | SPECIES_##mon) #define EC_MOVE(move) ((EC_GROUP_MOVE_1 << 9) | MOVE_##move) #define EC_MOVE2(move) ((EC_GROUP_MOVE_2 << 9) | MOVE_##move) diff --git a/include/easy_chat.h b/include/easy_chat.h index 9342663d8..a70d7ad0c 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -18,21 +18,20 @@ struct Shared1000 u16 *unk4; u8 unk8; u8 unk9; - u8 unkA; + u8 unkA; // length of unkC array u8 unkB; // reporter talked to (Gabby or Ty) - u16 unkC[(0x20-0xC)/2]; // unknown length + u16 unkC[9]; void (*unk20)(void); u16 unk24; u8 unk26; u8 unk27; u16 unk28; - u8 unk2A[11][2]; // unknown length + u8 unk2A[11][2]; u8 unk40[4][14]; - u8 unk78[0x7D - 0x78]; // unknown length + u8 unk78[5]; u8 unk7D; u8 unk7E[5]; - s8 unk83; // s8? - //u8 unk83; // s8? + s8 unk83; s8 unk84; s8 unk85; s8 unk86; @@ -60,7 +59,7 @@ struct Shared1000 struct UnknownEasyChatStruct1 unk148[(0x1A8-0x148)/12]; s8 unk1A8; s8 unk1A9; - s8 unk1AA[0xB5-0xAA]; // unknown length + s8 unk1AA[0xB5-0xAA]; s8 unk1B5; s8 unk1B6; s8 unk1B7; @@ -73,19 +72,19 @@ struct Shared1000 s8 unk1C0; u8 filler1C1[3]; void (*unk1C4)(void); - u8 unk1C8[0x6C8-0x1C8]; + u8 unk1C8[0x500]; u8 unk6C8[0xB78-0x6C8]; #if GERMAN - u16 unkB78[0x1B][270]; + u16 unkB78[27][270]; #else - u16 unkB78[0x1B][255]; + u16 unkB78[27][255]; #endif u16 unk4142[(0x78-0x42)/2]; //0x446C u16 unk4178[(0x41A4-0x4178)/2]; // unknown length - const u8 *unk41A4[0x16][0x100]; //0x44CE in german + const u8 *ecWordStrings[0x16][0x100]; //0x44CE in german s8 unk99A4; s8 unk99A5; - s8 unk99A6[0xA28-0x9A6]; + s8 unk99A6[130]; s8 unk9A28; s8 unk9A29; u16 unk9A2A[(0x9C32-0x9A2A)/4][2]; // unknown length @@ -119,7 +118,7 @@ extern u8 gUnknown_020388AC; extern u8 gUnknown_03000740; // const pointer to shared1000. easy_chat might be two separate files. -extern struct Shared1000 *const gUnknown_083DB694; +extern struct Shared1000 *const gEasyChatStruct; void sub_80E62A0(u8 arg0, u16 *arg1, void (*arg2)(void), u8 arg3); u16 sub_80EB72C(u16 group); -- cgit v1.2.3 From 8d035c81528d172570338ec82c07770e7ebcfe50 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 5 Jan 2018 22:15:05 -0700 Subject: cable car util --- include/cable_car_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cable_car_util.h b/include/cable_car_util.h index f1f52bb3c..7126331a1 100644 --- a/include/cable_car_util.h +++ b/include/cable_car_util.h @@ -7,7 +7,7 @@ // Exported ROM declarations -void sub_8124F08(u16 dest[][32], const u16 *src, u8 x, u8 y, u8 width, u8 height); -void sub_8124E7C(u16 dest[][32], u16 a1, u8 a2, u8 a3, u8 a4, u8 a5); +void CableCarUtil_FillWrapped(void *dest, u16 value, u8 x, u8 y, u8 width, u8 height); +void CableCarUtil_CopyWrapped(void *dest, const u16 *src, u8 x, u8 y, u8 width, u8 height); #endif //GUARD_CABLE_CAR_UTIL_H -- cgit v1.2.3 From b3551bc2f328c286c6ecc45ea288665d46b44260 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sat, 6 Jan 2018 12:27:27 -0600 Subject: fix some code and formatting anomalies --- include/battle.h | 10 ---- include/contest.h | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/ewram.h | 1 - 3 files changed, 167 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 0881cf82c..0824fc46c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -368,16 +368,6 @@ struct Struct2017100 u32 arr[4]; }; -struct Struct2019348 -{ - u16 unk0; - u16 unk2; - u8 unk4; - u32 unk8; - u32 unkC; - u32 unk10; -}; - struct Struct2017800 { u8 invisible:1; diff --git a/include/contest.h b/include/contest.h index 10392c00e..6e71358a2 100644 --- a/include/contest.h +++ b/include/contest.h @@ -87,4 +87,171 @@ bool8 Contest_SaveWinner(u8); u8 sub_80B2C4C(u8, u8); void Contest_ResetWinners(void); +// Contest Shared EWRAM + +struct Shared18000 +{ + /*0x18000*/ u8 unk18000; + /*0x18001*/ u8 filler18001[3]; + /*0x18004*/ u16 unk18004[16][16]; + /*0x18204*/ u16 unk18204[0x200]; + /*0x18604*/ u16 unk18604[0x200]; + /*0x18A04*/ u8 unk18A04[0x800]; +}; + +struct Contest +{ + /*0x19204*/ u8 playerMoveChoice; + /*0x19205*/ u8 turnNumber; + /*0x19206*/ u8 unk19206[4]; // seems to only be used by an unref function + /*0x1920A*/ u16 unk1920A_0:1; // Task active flags? + u16 unk1920A_1:1; + u16 unk1920A_2:1; + u16 unk1920A_3:1; + u16 unk1920A_4:1; + u16 unk1920A_5:1; + u16 unk1920A_6:1; + u16 unk1920A_7:1; + /*0x1920B*/ u16 unk1920B_0:1; + u16 unk1920B_1:1; + u16 unk1920B_2:1; + /*0x1920C*/ u8 mainTaskId; + /*0x1920D*/ u8 unk1920D[4]; + /*0x19211*/ u8 unk19211; + /*0x19212*/ u8 unk19212; + /*0x19213*/ u8 filler19213; + /*0x19214*/ u8 unk19214; + /*0x19215*/ u8 unk19215; + /*0x19216*/ u8 unk19216; // sprite ID + /*0x19217*/ s8 applauseLevel; + /*0x19218*/ u8 unk19218[4]; + /*0x1921C*/ u32 unk1921C; // saved RNG value? + u16 unk19220[5][4]; // move history? + u8 unk19248[5][4]; // excitement history + u8 applauseMeterSpriteId; // sprite ID + /*0x1925D*/ u8 unk1925D; + /*0x1925E*/ u8 unk1925E; +}; + +struct ContestantStatus +{ + s16 appeal1; // move appeal? + s16 appeal2; // final appeal after end of turn, maybe? + s16 unk4; + u16 currMove; + u16 prevMove; + u8 moveCategory; + u8 unkB_0:2; + u8 unkB_2:2; + u8 moveRepeatCount:3; + u8 unkB_7:1; // used a one-time move? + u8 unkC_0:1; + u8 unkC_1:2; + s8 unkD; + u8 unkE; + u8 unkF; + u8 unk10_0:1; + u8 unk10_1:1; + u8 unk10_2:1; + u8 unk10_3:1; + u8 unk10_4:2; + u8 unk10_6:2; + u8 unk11_0:2; + u8 unk11_2:1; + u8 unk11_3:1; + u8 unk11_4:1; + u8 unk11_5:1; + u8 unk12; + u8 unk13; // status action? + u8 unk14; + u8 disappointedRepeat:1; + u8 unk15_1:1; + u8 unk15_2:1; + u8 unk15_3:1; + u8 unk15_4:1; + u8 unk15_5:1; + u8 unk15_6:1; + u8 unk16; + u8 unk17; + u8 unk18; + u8 unk19; // turn position + u8 attentionLevel; // How much the Pokemon "stood out" + u8 unk1B; +}; + +struct UnknownContestStruct3 +{ + u8 unk0; + u8 unk1; + //u8 unk2_0:1; + //u8 unk2_1:1; + u8 unk2; // maybe a bitfield + u8 filler3; +}; + +// possibly the same as UnknownContestStruct3? +struct UnknownContestStruct4 +{ + u8 unk0; // sprite ID + u8 unk1; // sprite ID + u8 unk2_0:1; + u8 unk2_1:1; + u8 unk2_2:1; + u8 filler3; +}; + +struct UnknownContestStruct5 +{ + s8 bits_0; // current move excitement? + u8 bits_8:1; + u8 bits_9:3; + u8 bits_C:4; + s8 unk2; + u8 filler3; +}; + +struct UnknownContestStruct7 +{ + u8 unk0[4]; + u16 unk4; + u16 unk6; + u8 filler8[0xD-8]; + u8 unkD[4]; + u8 unk11; + u8 filler12[2]; +}; + +struct UnknownContestStruct8 +{ + u16 unk0; + u16 unk2; + u8 unk4_0:1; + u8 unk5; + u8 filler6[2]; + u32 unk8; + u32 unkC; + u32 unk10; +}; + +struct UnknownContestStruct6 +{ + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; +}; + +#define shared15800 (gSharedMem + 0x15800) +#define shared15DE0 (*(struct ContestWinner *)(gSharedMem + 0x15DE0)) +#define shared16800 (gSharedMem + 0x16800) +#define shared18000 (*(struct Shared18000 *)(gSharedMem + 0x18000)) +#define shared18004 ((u16 *)(gSharedMem + 0x18004)) +#define sContest (*(struct Contest *)(gSharedMem + 0x19204)) +#define sContestantStatus ((struct ContestantStatus *)(gSharedMem + 0x19260)) +#define shared192D0 (*(struct UnknownContestStruct7 *)(gSharedMem + 0x192D0)) +#define shared192E4 (gSharedMem + 0x192E4) +#define shared19328 (*(struct UnknownContestStruct5 *)(gSharedMem + 0x19328)) +#define shared19338 ((struct UnknownContestStruct4 *)(gSharedMem + 0x19338)) +#define shared19348 (*(struct UnknownContestStruct8 *)(gSharedMem + 0x19348)) + #endif // GUARD_CONTEST_H diff --git a/include/ewram.h b/include/ewram.h index 5a350840a..60fa43b41 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -215,7 +215,6 @@ extern u8 gSharedMem[]; #define ewram19000 (&gSharedMem[0x19000]) #define ePokedexView3 (struct PokedexView *)(gSharedMem + 0x19000) #define EWRAM_19348 (*(u16 *)(gSharedMem + 0x19348)) -#define ewram19348 (*(struct Struct2019348 *)(gSharedMem + 0x19348)) #define ewram19800 (&gSharedMem[0x19800]) #define ePokedexView4 (struct PokedexView *)(gSharedMem + 0x19800) #define ewram1A000 (&gSharedMem[0x1A000]) -- cgit v1.2.3