From a02d40d1410ad0b63f943600028348daccdebbe4 Mon Sep 17 00:00:00 2001 From: tgsm Date: Sun, 25 Jul 2021 22:35:52 -0500 Subject: Decompile scrcmd_17 -> scrcmd_amity_square Command names courtesy of DSPRE. --- include/scrcmd.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 5e28a4d0..8c89e230 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -249,7 +249,12 @@ BOOL ScrCmd_Unk01A6(struct ScriptContext* ctx); BOOL ScrCmd_Unk01A7(struct ScriptContext* ctx); BOOL ScrCmd_Unk01AD(struct ScriptContext* ctx); -//scrcmd_18.c +//scrcmd_amity_square.c +BOOL ScrCmd_ClearAmitySquareSteps(struct ScriptContext* ctx); +BOOL ScrCmd_CheckAmitySquareSteps(struct ScriptContext* ctx); +BOOL ScrCmd_GetAmitySquareAccessory(struct ScriptContext* ctx); + +//scrcmd_party.c BOOL ScrCmd_GiveMon(struct ScriptContext* ctx); BOOL ScrCmd_GetPartyMonSpecies(struct ScriptContext* ctx); BOOL ScrCmd_CheckPartyMonOTID(struct ScriptContext* ctx); -- cgit v1.2.3 From 0c35b0accde7b0768b8f39776d807f1daef6b161 Mon Sep 17 00:00:00 2001 From: tgsm Date: Mon, 26 Jul 2021 19:06:06 -0500 Subject: constants: Add accessories --- include/constants/accessories.h | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 include/constants/accessories.h (limited to 'include') diff --git a/include/constants/accessories.h b/include/constants/accessories.h new file mode 100644 index 00000000..907e12cb --- /dev/null +++ b/include/constants/accessories.h @@ -0,0 +1,105 @@ +#ifndef POKEDIAMOND_CONSTANTS_ACCESSORIES_H +#define POKEDIAMOND_CONSTANTS_ACCESSORIES_H + +#define ACCESSORY_WHITE_FLUFF 0 +#define ACCESSORY_YELLOW_FLUFF 1 +#define ACCESSORY_PINK_FLUFF 2 +#define ACCESSORY_BROWN_FLUFF 3 +#define ACCESSORY_BLACK_FLUFF 4 +#define ACCESSORY_ORANGE_FLUFF 5 +#define ACCESSORY_ROUND_PEBBLE 6 +#define ACCESSORY_GLITTER_BOULDER 7 +#define ACCESSORY_SNAGGY_PEBBLE 8 +#define ACCESSORY_JAGGED_BOULDER 9 +#define ACCESSORY_BLACK_PEBBLE 10 +#define ACCESSORY_MINI_PEBBLE 11 +#define ACCESSORY_PINK_SCALE 12 +#define ACCESSORY_BLUE_SCALE 13 +#define ACCESSORY_GREEN_SCALE 14 +#define ACCESSORY_PURPLE_SCALE 15 +#define ACCESSORY_BIG_SCALE 16 +#define ACCESSORY_NARROW_SCALE 17 +#define ACCESSORY_BLUE_FEATHER 18 +#define ACCESSORY_RED_FEATHER 19 +#define ACCESSORY_YELLOW_FEATHER 20 +#define ACCESSORY_WHITE_FEATHER 21 +#define ACCESSORY_BLACK_MOUSTACHE 22 +#define ACCESSORY_WHITE_MOUSTACHE 23 +#define ACCESSORY_BLACK_BEARD 24 +#define ACCESSORY_WHITE_BEARD 25 +#define ACCESSORY_SMALL_LEAF 26 +#define ACCESSORY_BIG_LEAF 27 +#define ACCESSORY_NARROW_LEAF 28 +#define ACCESSORY_SHED_CLAW 29 +#define ACCESSORY_SHED_HORN 30 +#define ACCESSORY_THIN_MUSHROOM 31 +#define ACCESSORY_THICK_MUSHROOM 32 +#define ACCESSORY_STUMP 33 +#define ACCESSORY_PRETTY_DEWDROP 34 +#define ACCESSORY_SNOW_CRYSTAL 35 +#define ACCESSORY_SPARKS 36 +#define ACCESSORY_SHIMMERING_FIRE 37 +#define ACCESSORY_MYSTIC_FIRE 38 +#define ACCESSORY_DETERMINATION 39 +#define ACCESSORY_PECULIAR_SPOON 40 +#define ACCESSORY_PUFFY_SMOKE 41 +#define ACCESSORY_POISON_EXTRACT 42 +#define ACCESSORY_WEALTHY_COIN 43 +#define ACCESSORY_EERIE_THING 44 +#define ACCESSORY_SPRING 45 +#define ACCESSORY_SEASHELL 46 +#define ACCESSORY_HUMMING_NOTE 47 +#define ACCESSORY_SHINY_POWDER 48 +#define ACCESSORY_GLITTER_POWDER 49 +#define ACCESSORY_RED_FLOWER 50 +#define ACCESSORY_PINK_FLOWER 51 +#define ACCESSORY_WHITE_FLOWER 52 +#define ACCESSORY_BLUE_FLOWER 53 +#define ACCESSORY_ORANGE_FLOWER 54 +#define ACCESSORY_YELLOW_FLOWER 55 +#define ACCESSORY_GOOGLY_SPECS 56 +#define ACCESSORY_BLACK_SPECS 57 +#define ACCESSORY_GORGEOUS_SPECS 58 +#define ACCESSORY_SWEET_CANDY 59 +#define ACCESSORY_CONFETTI 60 +#define ACCESSORY_COLORED_PARASOL 61 +#define ACCESSORY_OLD_UMBRELLA 62 +#define ACCESSORY_SPOTLIGHT 63 +#define ACCESSORY_CAPE 64 +#define ACCESSORY_STANDING_MIKE 65 +#define ACCESSORY_SURFBOARD 66 +#define ACCESSORY_CARPET 67 +#define ACCESSORY_RETRO_PIPE 68 +#define ACCESSORY_FLUFFY_BED 69 +#define ACCESSORY_MIRROR_BALL 70 +#define ACCESSORY_PHOTO_BOARD 71 +#define ACCESSORY_PINK_BARRETTE 72 +#define ACCESSORY_RED_BARRETTE 73 +#define ACCESSORY_BLUE_BARRETTE 74 +#define ACCESSORY_YELLOW_BARRETTE 75 +#define ACCESSORY_GREEN_BARRETTE 76 +#define ACCESSORY_PINK_BALLOON 77 +#define ACCESSORY_RED_BALLOONS 78 +#define ACCESSORY_BLUE_BALLOONS 79 +#define ACCESSORY_YELLOW_BALLOON 80 +#define ACCESSORY_GREEN_BALLOONS 81 +#define ACCESSORY_LACE_HEADDRESS 82 +#define ACCESSORY_TOP_HAT 83 +#define ACCESSORY_SILK_VEIL 84 +#define ACCESSORY_HEROIC_HEADBAND 85 +#define ACCESSORY_PROFESSOR_HAT 86 +#define ACCESSORY_FLOWER_STAGE 87 +#define ACCESSORY_GOLD_PEDESTAL 88 +#define ACCESSORY_GLASS_STAGE 89 +#define ACCESSORY_AWARD_PODIUM 90 +#define ACCESSORY_CUBE_STAGE 91 +#define ACCESSORY_TURTWIG_MASK 92 +#define ACCESSORY_CHIMCHAR_MASK 93 +#define ACCESSORY_PIPLUP_MASK 94 +#define ACCESSORY_BIG_TREE 95 +#define ACCESSORY_FLAG 96 +#define ACCESSORY_CROWN 97 +#define ACCESSORY_TIARA 98 +#define ACCESSORY_COMET 99 + +#endif -- cgit v1.2.3 From a46463e4c6ca40cfc96dd47a7a28c11275a22ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 27 Jul 2021 21:30:10 +0200 Subject: decompile unk_02005CFC.s --- include/pokemon.h | 2 +- include/proto.h | 4 ---- include/unk_020040F4.h | 5 +++-- include/unk_02005CFC.h | 19 +++++++++++++++++++ 4 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 include/unk_02005CFC.h (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h index d107bf85..ec3ac77a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -294,7 +294,7 @@ void Party_SpreadPokerus(struct PlayerParty * party); BOOL Pokemon_HasPokerus(struct Pokemon * pokemon); BOOL Pokemon_IsImmuneToPokerus(struct Pokemon * pokemon); void Pokemon_UpdateArceusForme(struct Pokemon * pokemon); -void FUN_02069FB0(u32 r7, u32 r5, u32 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); +void FUN_02069FB0(u32 r7, u32 r5, u16 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); void FUN_0206A014(struct Pokemon * pokemon, struct PlayerData * a1, u32 pokeball, u32 a3, u32 encounterType, u32 heap_id); void FUN_0206A094(struct Pokemon * pokemon, u32 a1, u32 a2); BOOL FUN_0206A13C(struct Pokemon * pokemon, u32 a1); diff --git a/include/proto.h b/include/proto.h index 7af3f19d..43ed28ac 100644 --- a/include/proto.h +++ b/include/proto.h @@ -11,10 +11,6 @@ int TrainerClass_GetGenderOrTrainerCount(int x); int FUN_02014C3C(u8); void FUN_02014C54(int, int, struct UnkStruct_02069038 *, u8); u32 IsNighttime(void); // is day or night -int FUN_02005F14(int); -void FUN_02005E80(int); -void FUN_02005E90(int, int, int, int); -void FUN_020056AC(int, int, int, int, int); void FUN_020808AC(struct BoxPokemon *, struct PlayerData *, int, u32, u32); #endif //POKEDIAMOND_PROTO_H diff --git a/include/unk_020040F4.h b/include/unk_020040F4.h index 413e853f..f82ec034 100644 --- a/include/unk_020040F4.h +++ b/include/unk_020040F4.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_UNK_020040F4_H #include "global.h" +#include "SPI_mic.h" struct WaveArcInfo { @@ -65,8 +66,8 @@ u8 FUN_020048D0(u16 param0); u32 GF_SndPlayerGetSeqNo(u32 *param0); u32 FUN_020048F4(u16 param0); u16 FUN_02004900(u32 param0); -u32 GF_MIC_StartAutoSampling(u32 param0); -u32 GF_MIC_StopAutoSampling(u32 param0); +u32 GF_MIC_StartAutoSampling(struct MIC_SamplingData *param0); +u32 GF_MIC_StopAutoSampling(); u32 GF_MIC_DoSamplingAsync(u32 param0, u32 param1, u32 param2, u32 param3); void *FUN_02004930(u32 param0); BOOL FUN_02004984(u32 param0); diff --git a/include/unk_02005CFC.h b/include/unk_02005CFC.h new file mode 100644 index 00000000..7b5f73e2 --- /dev/null +++ b/include/unk_02005CFC.h @@ -0,0 +1,19 @@ +#ifndef POKEDIAMOND_UNK_02005CFC_H +#define POKEDIAMOND_UNK_02005CFC_H + +#include "global.h" +#include "sav_chatot.h" + +BOOL FUN_02005CFC(); +BOOL FUN_02005D20(struct SaveChatotSoundClip *param0); +u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +void FUN_02005DFC(); +u32 FUN_02005E28(); +void FUN_02005E64(); +void FUN_02005E6C(struct SaveChatotSoundClip *param0); +void FUN_02005E80(u8 param0); +void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); +u32 FUN_02005F14(s32 param0); + +#endif // POKEDIAMOND_UNK_02005CFC_H -- cgit v1.2.3 From 2caca24385a10df4f0af6000d498350cbb1e92b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 27 Jul 2021 21:43:18 +0200 Subject: rename to sound_chatot.c --- include/pokemon.h | 3 ++- include/sound_chatot.h | 19 +++++++++++++++++++ include/unk_02005CFC.h | 19 ------------------- 3 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 include/sound_chatot.h delete mode 100644 include/unk_02005CFC.h (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h index ec3ac77a..60fa1838 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -10,6 +10,7 @@ #include "constants/pokemon.h" #include "string16.h" #include "player_data.h" +#include "sound_chatot.h" struct BaseStats { /* 0x00 */ u8 hp; @@ -294,7 +295,7 @@ void Party_SpreadPokerus(struct PlayerParty * party); BOOL Pokemon_HasPokerus(struct Pokemon * pokemon); BOOL Pokemon_IsImmuneToPokerus(struct Pokemon * pokemon); void Pokemon_UpdateArceusForme(struct Pokemon * pokemon); -void FUN_02069FB0(u32 r7, u32 r5, u16 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); +void FUN_02069FB0(struct SaveChatotSoundClip *r7, u32 r5, u16 r4, s32 r6, s32 sp18, u32 sp1C, u32 sp20); void FUN_0206A014(struct Pokemon * pokemon, struct PlayerData * a1, u32 pokeball, u32 a3, u32 encounterType, u32 heap_id); void FUN_0206A094(struct Pokemon * pokemon, u32 a1, u32 a2); BOOL FUN_0206A13C(struct Pokemon * pokemon, u32 a1); diff --git a/include/sound_chatot.h b/include/sound_chatot.h new file mode 100644 index 00000000..fd7184cf --- /dev/null +++ b/include/sound_chatot.h @@ -0,0 +1,19 @@ +#ifndef POKEDIAMOND_SOUND_CHATOT_H +#define POKEDIAMOND_SOUND_CHATOT_H + +#include "global.h" +#include "sav_chatot.h" + +BOOL FUN_02005CFC(); +BOOL FUN_02005D20(struct SaveChatotSoundClip *param0); +u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +void FUN_02005DFC(); +u32 FUN_02005E28(); +void FUN_02005E64(); +void FUN_02005E6C(struct SaveChatotSoundClip *param0); +void FUN_02005E80(u8 param0); +void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); +u32 FUN_02005F14(s32 param0); + +#endif // POKEDIAMOND_UNK_02005CFC_H diff --git a/include/unk_02005CFC.h b/include/unk_02005CFC.h deleted file mode 100644 index 7b5f73e2..00000000 --- a/include/unk_02005CFC.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef POKEDIAMOND_UNK_02005CFC_H -#define POKEDIAMOND_UNK_02005CFC_H - -#include "global.h" -#include "sav_chatot.h" - -BOOL FUN_02005CFC(); -BOOL FUN_02005D20(struct SaveChatotSoundClip *param0); -u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); -void FUN_02005DFC(); -u32 FUN_02005E28(); -void FUN_02005E64(); -void FUN_02005E6C(struct SaveChatotSoundClip *param0); -void FUN_02005E80(u8 param0); -void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); -u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); -u32 FUN_02005F14(s32 param0); - -#endif // POKEDIAMOND_UNK_02005CFC_H -- cgit v1.2.3 From 610a801e1793ae3242aee3855bceae30aff019f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 27 Jul 2021 21:49:23 +0200 Subject: document some chatot sound functions --- include/sound_chatot.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sound_chatot.h b/include/sound_chatot.h index fd7184cf..cff116a2 100644 --- a/include/sound_chatot.h +++ b/include/sound_chatot.h @@ -8,9 +8,9 @@ BOOL FUN_02005CFC(); BOOL FUN_02005D20(struct SaveChatotSoundClip *param0); u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); void FUN_02005DFC(); -u32 FUN_02005E28(); -void FUN_02005E64(); -void FUN_02005E6C(struct SaveChatotSoundClip *param0); +u32 Chatot_startRecording(); +void Chatot_stopRecording(); +void Chatot_saveRecording(struct SaveChatotSoundClip *param0); void FUN_02005E80(u8 param0); void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); -- cgit v1.2.3 From 599ff56901be2bdee6e96d202a9210685b051daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 27 Jul 2021 21:58:07 +0200 Subject: document Chatot_checkCry --- include/sound_chatot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound_chatot.h b/include/sound_chatot.h index cff116a2..35e4363d 100644 --- a/include/sound_chatot.h +++ b/include/sound_chatot.h @@ -5,7 +5,7 @@ #include "sav_chatot.h" BOOL FUN_02005CFC(); -BOOL FUN_02005D20(struct SaveChatotSoundClip *param0); +BOOL Chatot_checkCry(struct SaveChatotSoundClip *param0); u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); void FUN_02005DFC(); u32 Chatot_startRecording(); -- cgit v1.2.3 From ac24b510d854953ef9d6f4b412a7de77da29757e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 4 Aug 2021 21:09:49 +0200 Subject: add void in parameter list --- include/sound_chatot.h | 8 ++++---- include/unk_020040F4.h | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/sound_chatot.h b/include/sound_chatot.h index 35e4363d..ac547354 100644 --- a/include/sound_chatot.h +++ b/include/sound_chatot.h @@ -4,12 +4,12 @@ #include "global.h" #include "sav_chatot.h" -BOOL FUN_02005CFC(); +BOOL FUN_02005CFC(void); BOOL Chatot_checkCry(struct SaveChatotSoundClip *param0); u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); -void FUN_02005DFC(); -u32 Chatot_startRecording(); -void Chatot_stopRecording(); +void FUN_02005DFC(void); +u32 Chatot_startRecording(void); +void Chatot_stopRecording(void); void Chatot_saveRecording(struct SaveChatotSoundClip *param0); void FUN_02005E80(u8 param0); void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); diff --git a/include/unk_020040F4.h b/include/unk_020040F4.h index f82ec034..819a96fa 100644 --- a/include/unk_020040F4.h +++ b/include/unk_020040F4.h @@ -32,11 +32,11 @@ struct UnkStruct_020040F4_2 }; void FUN_020040F4(u8 param0); -u8 FUN_02004104(); +u8 FUN_02004104(void); void FUN_02004110(u16 param0); -u16 FUN_02004124(); +u16 FUN_02004124(void); void FUN_02004130(u16 param0); -u16 FUN_02004140(); +u16 FUN_02004140(void); void FUN_0200414C(u16 param0); void FUN_0200415C(u8 param0); BOOL FUN_02004180(s32 param0); @@ -52,10 +52,10 @@ void FUN_020046C4(int param0, u32 param1); void FUN_020046E8(s32 param0); void FUN_02004704(s32 param0, int param1, u32 param2); void FUN_02004724(int param0); -void FUN_02004738(); +void FUN_02004738(void); int FUN_02004748(s32 param0); void FUN_020047C8(u8 param0, u8 param1); -void FUN_02004810(); +void FUN_02004810(void); void GF_SndPlayerMoveVolume(int playerNo, s32 param1, s32 param2); void GF_SndPlayerSetInitialVolume(int playerNo, s32 param1); void FUN_02004858(u32 param0, int playerNo); @@ -67,7 +67,7 @@ u32 GF_SndPlayerGetSeqNo(u32 *param0); u32 FUN_020048F4(u16 param0); u16 FUN_02004900(u32 param0); u32 GF_MIC_StartAutoSampling(struct MIC_SamplingData *param0); -u32 GF_MIC_StopAutoSampling(); +u32 GF_MIC_StopAutoSampling(void); u32 GF_MIC_DoSamplingAsync(u32 param0, u32 param1, u32 param2, u32 param3); void *FUN_02004930(u32 param0); BOOL FUN_02004984(u32 param0); @@ -81,12 +81,12 @@ void FUN_02004AF8(u32 param0, s32 param1); u32 FUN_02004B30(u32 param0, s32 param1, s32 param2, u32 param3, u32 param4); void FUN_02004C1C(u8 *param0, u32 param1); void FUN_02004C3C(u32 param0); -BOOL GF_SndCaptureIsActive(); +BOOL GF_SndCaptureIsActive(void); u32 GF_SndCaptureStartReverb(u32 param0); void GF_SndCaptureStopReverb(u32 param0); void GF_SndCaptureSetReverbVolume(u32 param0, u32 param1); -void FUN_02004CB4(); -void GF_SndCaptureStopEffect(); +void FUN_02004CB4(void); +void GF_SndCaptureStopEffect(void); void FUN_02004D04(s32 param0); void GF_SndPlayerSetTrackPitch(int playerNo, u32 param1, s32 param2); void FUN_02004D34(u16 param0, u32 param1, s32 param2); @@ -94,8 +94,8 @@ void GF_SndPlayerSetTrackPan(int playerNo, u32 param1, s32 param2); void GF_SndSetMonoFlag(u32 param0); void FUN_02004D74(s32 param0); void FUN_02004D84(u32 param0); -u16 FUN_02004D94(); -u8 *FUN_02004DB4(); +u16 FUN_02004D94(void); +u8 *FUN_02004DB4(void); void FUN_02004DBC(u8 param0); u32 FUN_02004DCC(u32 param0, u16 param1, u32 param2, u32 param3, u8 param4, u32 param5); u32 FUN_02004E08( @@ -111,7 +111,7 @@ void FUN_02004F70(struct UnkStruct_020040F4_2 *param0, u8 *param1, int param2, s void FUN_02005068(s16 *param0, s16 *param1, u32 param2, u32 param3, void *param4); void FUN_02005160(u32 param0); void FUN_0200516C(u32 param0); -void FUN_020051AC(); +void FUN_020051AC(void); void GF_SndPlayerSetPlayerVolume(u32 param0, u8 param1); #endif // POKEDIAMOND_UNK_020040F4_H -- cgit v1.2.3 From e7a61a19cda2047c8f47ed52cd5253e94f2379ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 4 Aug 2021 21:14:26 +0200 Subject: use BOOL --- include/sound_chatot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound_chatot.h b/include/sound_chatot.h index ac547354..fbbba0c6 100644 --- a/include/sound_chatot.h +++ b/include/sound_chatot.h @@ -14,6 +14,6 @@ void Chatot_saveRecording(struct SaveChatotSoundClip *param0); void FUN_02005E80(u8 param0); void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); -u32 FUN_02005F14(s32 param0); +BOOL FUN_02005F14(s32 param0); #endif // POKEDIAMOND_UNK_02005CFC_H -- cgit v1.2.3 From 7ab3252bf751152c746f1f395105d919ffd35600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 8 Aug 2021 19:40:13 +0200 Subject: decompile unk_02008AA4.s --- include/unk_02008AA4.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/unk_0200BB14.h | 29 +++++++++++++++++--------- 2 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 include/unk_02008AA4.h (limited to 'include') diff --git a/include/unk_02008AA4.h b/include/unk_02008AA4.h new file mode 100644 index 00000000..448a7101 --- /dev/null +++ b/include/unk_02008AA4.h @@ -0,0 +1,55 @@ +#ifndef POKEDIAMOND_UNK_02008AA4_H +#define POKEDIAMOND_UNK_02008AA4_H + +#include "global.h" +#include "unk_0200BB14.h" + +struct UnkStruct_02008AA4_1 +{ + struct UnkStruct_0200BB14_sub *unk00; + s32 unk04; +}; + +struct UnkStruct_02008AA4_2 +{ + s32 unk00; + s32 unk04; + s32 unk08; + s32 unk0C; + s32 unk10; + s32 unk14; + u32 unk18; + u32 unk1C; +}; + +void FUN_02008AA4(struct UnkStruct_0200BB14_sub *param0, + s32 param1, + s32 param2, + s32 param3, + s32 param4, + s32 param5, + s32 param6, + u32 param7, + u32 param8, + u32 param9, + u32 param10, + u32 param11, + u32 param12, + u32 param13, + u32 param14); +struct UnkStruct_02008AA4_1 *FUN_02008BE0(struct UnkStruct_02008AA4_2 *param0, + u32 param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7); +void FUN_02008C80(struct UnkStruct_02008AA4_1 *param0); +u32 FUN_02008C9C(u32 param0, void *param1, u32 param2); +void FUN_02008D04(u32 param0, u32 param1, u32 param2); +void FUN_02008D24(u32 param0, u32 param1, u32 param2); +void FUN_02008D44(u32 param0, u32 param1); +void FUN_02008DDC(u32 param0); + +#endif // POKEDIAMOND_UNK_02008AA4_H diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index a252fd93..04c6dcb0 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -15,7 +15,7 @@ struct UnkStruct_0200BB14_1 struct UnkStruct_0200BB14_2 { u32 unk00; - u32 unk04; + struct UnkStruct_02008AA4_1 *unk04; u32 *unk08; u32 unk0c[6]; u32 *unk24[6]; @@ -41,7 +41,16 @@ struct UnkStruct_0200BB14_3 struct UnkStruct_0200BB14_sub { - u8 unk00[0x24]; + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0C; + u32 unk10; + u32 unk14; + u32 unk18; + u32 unk1C; + u8 unk20; + u8 unk21[0x3]; }; struct UnkStruct_0200BB14_4 @@ -134,13 +143,13 @@ u8 FUN_0200C0DC(u32 param0, u32 param7, u32 param8, s32 param9); -u32 FUN_0200C124(u32 *param0, +BOOL FUN_0200C124(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); -u32 FUN_0200C13C(u32 *param0, +BOOL FUN_0200C13C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, @@ -150,10 +159,10 @@ struct UnkStruct_0200BB14_5 *FUN_0200C154( struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); u32 FUN_0200C334(u32 *param0, u32 param1); u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); -u32 FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200C3DC(u32 *param0); BOOL FUN_0200C404(u32 *param0, @@ -204,8 +213,8 @@ void FUN_0200C720(u32 param0, u32 param1, u32 param2, u32 param3); void FUN_0200C750(u32 *param0, u32 param1, u32 param2, u32 param3); void FUN_0200C75C(u32 param0, u16 *param1, u16 *param2); void FUN_0200C7A0(u32 *param0, u16 *param1, u16 *param2); -void FUN_0200C7AC(u32 param0, u16 *param1, u16 *param2, u32 param3); -void FUN_0200C7F0(u32 *param0, u16 *param1, u16 *param2, u32 param3); +void FUN_0200C7AC(u32 param0, u16 *param1, u16 *param2, s32 param3); +void FUN_0200C7F0(u32 *param0, u16 *param1, u16 *param2, s32 param3); void FUN_0200C7FC(u32 param0, u16 *param1, u16 *param2); void FUN_0200C82C(u32 *param0, u16 *param1, u16 *param2); void FUN_0200C838(u32 param0, u32 param1); -- cgit v1.2.3 From 79dc30189483e739d534bb7539729d0ca9d17961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 11 Aug 2021 22:51:41 +0200 Subject: decompile unk_02008DEC.s --- include/unk_02008DEC.h | 245 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 include/unk_02008DEC.h (limited to 'include') diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h new file mode 100644 index 00000000..0a94229a --- /dev/null +++ b/include/unk_02008DEC.h @@ -0,0 +1,245 @@ +#include "global.h" +#include "filesystem.h" + +struct UnkStruct1_sub +{ + u32 unk00; + u32 unk04; + void *unk08; +}; + +struct UnkStruct1 +{ + + u32 unk00; + struct UnkStruct1_sub *unk04; + s32 unk08; + u32 unk0C; + s32 unk10; +}; + +struct UnkStruct2 +{ + void *unk00; + s32 unk04; + u32 unk08; + u8 unk0C; +}; + +struct UnkStruct3 +{ + s32 unk00; + u8 unk04[0x40]; + u32 unk44; + u32 unk48; +}; + +struct UnkStruct4 +{ + NarcId unk00; + s32 unk04; + BOOL unk08; + s32 unk0C; + u32 unk10; + u32 unk14; +}; + +struct UnkStruct5 +{ + u32 *unk00; + s32 unk04; + u32 unk08; +}; + +struct UnkStruct1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); +void FUN_02008E2C(struct UnkStruct1 *param0); +struct UnkStruct1_sub *FUN_02008E6C(struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, u32 param3); +struct UnkStruct1_sub *FUN_02008F34(struct UnkStruct1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6); +struct UnkStruct1_sub *FUN_02008F90(struct UnkStruct1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + BOOL param7); +struct UnkStruct1_sub *FUN_02008FEC(struct UnkStruct1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +struct UnkStruct1_sub *FUN_0200904C(struct UnkStruct1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7, + BOOL param8); +struct UnkStruct1_sub *FUN_020090AC(struct UnkStruct1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6); +void FUN_020090FC(struct UnkStruct1 *param0, + struct UnkStruct1_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + u32 param5); +void FUN_02009168(struct UnkStruct1 *param0, + struct UnkStruct1_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + u32 param5); +u32 FUN_020091E0(struct UnkStruct1 *param0, + u32 param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6); +u32 FUN_0200923C(struct UnkStruct1 *param0, + u32 param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +u32 FUN_02009298(struct UnkStruct1 *param0, + u32 param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +u32 FUN_020092F8(struct UnkStruct1 *param0, + u32 param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +u32 FUN_02009358(struct UnkStruct1 *param0, + u32 param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6); +u32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2, u32 param3); +void FUN_020093DC(struct UnkStruct1 *param0, + struct UnkStruct2 *param1, + s32 param2, + s32 param3, + s32 *param4, + u32 param5); +struct UnkStruct5 *FUN_02009424(u32 param0, u32 param1); +void FUN_02009448(struct UnkStruct5 *param0); +u32 FUN_0200945C(struct UnkStruct1 *param0, s32 param1); +void FUN_02009474(struct UnkStruct1_sub *param0); +void FUN_02009490(struct UnkStruct1 *param0, struct UnkStruct1_sub *param1); +void FUN_020094C4(struct UnkStruct1 *param0); +struct UnkStruct1_sub *FUN_020094F0(struct UnkStruct1 *param0, u32 param1); +s32 FUN_02009530(struct UnkStruct1_sub *param0); +u32 FUN_02009544(struct UnkStruct1_sub *param0); +u32 FUN_0200955C(struct UnkStruct1_sub *param0); +u32 FUN_02009574(struct UnkStruct1_sub *param0); +u32 FUN_0200958C(struct UnkStruct1_sub *param0); +u32 FUN_020095A4(struct UnkStruct1_sub *param0); +u32 FUN_020095BC(struct UnkStruct1_sub *param0); +u32 FUN_020095D4(struct UnkStruct1_sub *param0); +u32 FUN_020095E4(struct UnkStruct1_sub *param0); +u32 FUN_02009610(struct UnkStruct1_sub *param0); +void FUN_02009630(struct UnkStruct1_sub *param0, u32 param1); +u32 FUN_0200965C(void); +u32 *FUN_02009660(u32 *param0, s32 param1); +void FUN_02009668(u32 *param0, struct UnkStruct2 *param1, u32 param2); +void FUN_020096B4(struct UnkStruct2 *param0); +s32 FUN_020096CC(struct UnkStruct2 *param0); +u32 FUN_020096DC(struct UnkStruct2 *param0, s32 param1); +u32 FUN_02009710(struct UnkStruct2 *param0, s32 param1); +u32 FUN_0200973C(struct UnkStruct2 *param0, s32 param1); +u32 FUN_02009768(struct UnkStruct2 *param0, s32 param1); +u32 FUN_0200979C(struct UnkStruct2 *param0, s32 param1); +struct UnkStruct1_sub *FUN_020097D0(struct UnkStruct1 *param0); +void FUN_020097FC(struct UnkStruct1_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); +struct CharacterData_02008DEC *FUN_0200986C(void *param0, u32 param1, u32 param2); +struct PaletteData_02008DEC *FUN_0200988C(void *param0, u32 param1, u32 param2, u32 param3); +struct CellDataBank_02008DEC *FUN_020098B0(void *param0, u32 param1); +struct AnimBank_02008DEC *FUN_020098CC(void *param0, u32 param1); +void *FUN_020098E8(void *param0, u32 param1); +void *FUN_02009904(void *param0, u32 param1); +void FUN_02009920(struct UnkStruct1_sub *param0); +u32 *FUN_02009934(struct UnkStruct1_sub *param0); +void FUN_0200994C(struct UnkStruct1 *param0, + struct UnkStruct1_sub *param1, + void *param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7); +void FUN_02009978(struct UnkStruct1 *param0, + struct UnkStruct1_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + s32 param5, + u32 param6, + u32 param7, + u32 param8, + u32 param9, + BOOL param10); +void FUN_020099B0(struct UnkStruct1 *param0, + struct UnkStruct1_sub *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8, + u32 param9, + u32 param10); +s32 FUN_020099E8(struct UnkStruct4 *param0); +void *FUN_02009A04(NARC *param0, u32 param1, u32 param2, u32 param3, u32 param4); +u32 FUN_02009A50(struct UnkStruct1_sub *param0); +void FUN_02009A90(struct UnkStruct5 *param0); +u32 FUN_02009AC4(struct UnkStruct1_sub *param0); +u32 FUN_02009B04(struct UnkStruct1_sub *param0); +void FUN_02009B44(struct UnkStruct5 *param0); +u32 FUN_02009B78(struct UnkStruct1_sub *param0); +void FUN_02009BB8(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); +void FUN_02009BE8(struct UnkStruct1_sub *param0); +void FUN_02009C0C(struct UnkStruct1_sub *param0); +void FUN_02009C30(struct UnkStruct5 *param0); +u32 FUN_02009C5C(struct UnkStruct1_sub *param0); +void FUN_02009C80(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); +void FUN_02009CDC(u32 param0); +u32 FUN_02009CF0(struct UnkStruct1_sub *param0); +void FUN_02009D34(struct UnkStruct5 *param0); +u32 FUN_02009D68(struct UnkStruct1_sub *param0); +void FUN_02009DAC(struct UnkStruct5 *param0); +void FUN_02009DE0(struct UnkStruct1_sub *param0); +void FUN_02009E04(struct UnkStruct1_sub *param0); +void FUN_02009E28(struct UnkStruct5 *param0); +u32 FUN_02009E54(struct UnkStruct1_sub *param0, u32 param1); +s32 FUN_02009E88(struct UnkStruct1_sub *param0, u32 param1); -- cgit v1.2.3 From 8f43e99f05cc2113398bcd40d29a6dfd952cf4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 11 Aug 2021 23:15:40 +0200 Subject: fix compiler warnings --- include/unk_02008DEC.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h index 0a94229a..a3cdfc1a 100644 --- a/include/unk_02008DEC.h +++ b/include/unk_02008DEC.h @@ -46,7 +46,7 @@ struct UnkStruct4 struct UnkStruct5 { - u32 *unk00; + struct UnkStruct1_sub **unk00; s32 unk04; u32 unk08; }; @@ -105,31 +105,31 @@ void FUN_02009168(struct UnkStruct1 *param0, s32 param3, BOOL param4, u32 param5); -u32 FUN_020091E0(struct UnkStruct1 *param0, - u32 param1, +struct UnkStruct1_sub *FUN_020091E0(struct UnkStruct1 *param0, + NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6); -u32 FUN_0200923C(struct UnkStruct1 *param0, - u32 param1, +struct UnkStruct1_sub *FUN_0200923C(struct UnkStruct1 *param0, + NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6, u32 param7); -u32 FUN_02009298(struct UnkStruct1 *param0, - u32 param1, +struct UnkStruct1_sub *FUN_02009298(struct UnkStruct1 *param0, + NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6, u32 param7); -u32 FUN_020092F8(struct UnkStruct1 *param0, - u32 param1, +struct UnkStruct1_sub *FUN_020092F8(struct UnkStruct1 *param0, + NARC *param1, u32 param2, u32 param3, s32 param4, @@ -137,21 +137,21 @@ u32 FUN_020092F8(struct UnkStruct1 *param0, u32 param6, u32 param7, u32 param8); -u32 FUN_02009358(struct UnkStruct1 *param0, - u32 param1, +struct UnkStruct1_sub *FUN_02009358(struct UnkStruct1 *param0, + NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6); -u32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2, u32 param3); +s32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2, u32 param3); void FUN_020093DC(struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, s32 param3, s32 *param4, u32 param5); -struct UnkStruct5 *FUN_02009424(u32 param0, u32 param1); +struct UnkStruct5 *FUN_02009424(s32 param0, u32 param1); void FUN_02009448(struct UnkStruct5 *param0); u32 FUN_0200945C(struct UnkStruct1 *param0, s32 param1); void FUN_02009474(struct UnkStruct1_sub *param0); @@ -174,9 +174,9 @@ u32 *FUN_02009660(u32 *param0, s32 param1); void FUN_02009668(u32 *param0, struct UnkStruct2 *param1, u32 param2); void FUN_020096B4(struct UnkStruct2 *param0); s32 FUN_020096CC(struct UnkStruct2 *param0); -u32 FUN_020096DC(struct UnkStruct2 *param0, s32 param1); -u32 FUN_02009710(struct UnkStruct2 *param0, s32 param1); -u32 FUN_0200973C(struct UnkStruct2 *param0, s32 param1); +s32 FUN_020096DC(struct UnkStruct2 *param0, s32 param1); +s32 FUN_02009710(struct UnkStruct2 *param0, s32 param1); +BOOL FUN_0200973C(struct UnkStruct2 *param0, s32 param1); u32 FUN_02009768(struct UnkStruct2 *param0, s32 param1); u32 FUN_0200979C(struct UnkStruct2 *param0, s32 param1); struct UnkStruct1_sub *FUN_020097D0(struct UnkStruct1 *param0); @@ -210,10 +210,10 @@ void FUN_02009978(struct UnkStruct1 *param0, BOOL param10); void FUN_020099B0(struct UnkStruct1 *param0, struct UnkStruct1_sub *param1, - u32 param2, + NARC *param2, u32 param3, u32 param4, - u32 param5, + s32 param5, u32 param6, u32 param7, u32 param8, -- cgit v1.2.3 From e3766102b2132d09de4368f0be4f3898c263c9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 12 Aug 2021 00:32:06 +0200 Subject: remove externs and cleanup some dependent code --- include/unk_02008AA4.h | 24 ++++++++-------- include/unk_02008DEC.h | 42 +++++++++++++++++++++++---- include/unk_0200BB14.h | 77 ++++++++++++++++++++++++++------------------------ 3 files changed, 88 insertions(+), 55 deletions(-) (limited to 'include') diff --git a/include/unk_02008AA4.h b/include/unk_02008AA4.h index 448a7101..2884547d 100644 --- a/include/unk_02008AA4.h +++ b/include/unk_02008AA4.h @@ -31,20 +31,20 @@ void FUN_02008AA4(struct UnkStruct_0200BB14_sub *param0, s32 param6, u32 param7, u32 param8, - u32 param9, - u32 param10, - u32 param11, - u32 param12, - u32 param13, - u32 param14); + struct UnkStruct1 *param9, + struct UnkStruct1 *param10, + struct UnkStruct1 *param11, + struct UnkStruct1 *param12, + struct UnkStruct1 *param13, + struct UnkStruct1 *param14); struct UnkStruct_02008AA4_1 *FUN_02008BE0(struct UnkStruct_02008AA4_2 *param0, u32 param1, - u32 param2, - u32 param3, - u32 param4, - u32 param5, - u32 param6, - u32 param7); + struct UnkStruct1 *param2, + struct UnkStruct1 *param3, + struct UnkStruct1 *param4, + struct UnkStruct1 *param5, + struct UnkStruct1 *param6, + struct UnkStruct1 *param7); void FUN_02008C80(struct UnkStruct_02008AA4_1 *param0); u32 FUN_02008C9C(u32 param0, void *param1, u32 param2); void FUN_02008D04(u32 param0, u32 param1, u32 param2); diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h index a3cdfc1a..99dc9579 100644 --- a/include/unk_02008DEC.h +++ b/include/unk_02008DEC.h @@ -1,4 +1,8 @@ +#ifndef POKEDIAMOND_UNK_02008DEC_H +#define POKEDIAMOND_UNK_02008DEC_H + #include "global.h" +#include "NNS_g2d.h" #include "filesystem.h" struct UnkStruct1_sub @@ -48,12 +52,36 @@ struct UnkStruct5 { struct UnkStruct1_sub **unk00; s32 unk04; + s32 unk08; +}; + +struct CharacterData_02008DEC +{ + NNSG2dCharacterData *chData; + u32 unk04; +}; + +struct PaletteData_02008DEC +{ + NNSG2dPaletteData *plttData; + u32 unk04; u32 unk08; }; +struct CellDataBank_02008DEC +{ + NNSG2dCellDataBank *cellBank; +}; + +struct AnimBank_02008DEC +{ + NNSG2dAnimBankData *bankData; +}; + struct UnkStruct1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); void FUN_02008E2C(struct UnkStruct1 *param0); -struct UnkStruct1_sub *FUN_02008E6C(struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, u32 param3); +struct UnkStruct1_sub *FUN_02008E6C( + struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, u32 param3); struct UnkStruct1_sub *FUN_02008F34(struct UnkStruct1 *param0, NarcId param1, s32 param2, @@ -144,12 +172,12 @@ struct UnkStruct1_sub *FUN_02009358(struct UnkStruct1 *param0, s32 param4, u32 param5, u32 param6); -s32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2, u32 param3); +s32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, struct UnkStruct5 *param2, u32 param3); void FUN_020093DC(struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, s32 param3, - s32 *param4, + struct UnkStruct5 *param4, u32 param5); struct UnkStruct5 *FUN_02009424(s32 param0, u32 param1); void FUN_02009448(struct UnkStruct5 *param0); @@ -157,7 +185,7 @@ u32 FUN_0200945C(struct UnkStruct1 *param0, s32 param1); void FUN_02009474(struct UnkStruct1_sub *param0); void FUN_02009490(struct UnkStruct1 *param0, struct UnkStruct1_sub *param1); void FUN_020094C4(struct UnkStruct1 *param0); -struct UnkStruct1_sub *FUN_020094F0(struct UnkStruct1 *param0, u32 param1); +struct UnkStruct1_sub *FUN_020094F0(struct UnkStruct1 *param0, s32 param1); s32 FUN_02009530(struct UnkStruct1_sub *param0); u32 FUN_02009544(struct UnkStruct1_sub *param0); u32 FUN_0200955C(struct UnkStruct1_sub *param0); @@ -170,7 +198,7 @@ u32 FUN_020095E4(struct UnkStruct1_sub *param0); u32 FUN_02009610(struct UnkStruct1_sub *param0); void FUN_02009630(struct UnkStruct1_sub *param0, u32 param1); u32 FUN_0200965C(void); -u32 *FUN_02009660(u32 *param0, s32 param1); +struct UnkStruct2 *FUN_02009660(struct UnkStruct2 *param0, s32 param1); void FUN_02009668(u32 *param0, struct UnkStruct2 *param1, u32 param2); void FUN_020096B4(struct UnkStruct2 *param0); s32 FUN_020096CC(struct UnkStruct2 *param0); @@ -232,7 +260,7 @@ void FUN_02009BE8(struct UnkStruct1_sub *param0); void FUN_02009C0C(struct UnkStruct1_sub *param0); void FUN_02009C30(struct UnkStruct5 *param0); u32 FUN_02009C5C(struct UnkStruct1_sub *param0); -void FUN_02009C80(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); +u32 FUN_02009C80(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); void FUN_02009CDC(u32 param0); u32 FUN_02009CF0(struct UnkStruct1_sub *param0); void FUN_02009D34(struct UnkStruct5 *param0); @@ -243,3 +271,5 @@ void FUN_02009E04(struct UnkStruct1_sub *param0); void FUN_02009E28(struct UnkStruct5 *param0); u32 FUN_02009E54(struct UnkStruct1_sub *param0, u32 param1); s32 FUN_02009E88(struct UnkStruct1_sub *param0, u32 param1); + +#endif // POKEDIAMOND_UNK_02008DEC_H diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index 04c6dcb0..20d4739d 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_UNK_0200BB14_H #include "global.h" +#include "unk_02008DEC.h" struct UnkStruct_0200BB14_1 { @@ -16,10 +17,10 @@ struct UnkStruct_0200BB14_2 { u32 unk00; struct UnkStruct_02008AA4_1 *unk04; - u32 *unk08; - u32 unk0c[6]; - u32 *unk24[6]; - u32 unk3c[6]; + struct UnkStruct2 *unk08; + struct UnkStruct1 *unk0c[6]; + struct UnkStruct5 *unk24[6]; + s32 unk3c[6]; s32 unk54; }; @@ -117,19 +118,19 @@ u32 FUN_0200BE74(u32 *param0, u32 param12, u32 param13); BOOL FUN_0200BF60( - struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, s32 *param2); BOOL FUN_0200C00C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); s32 FUN_0200C06C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, u32 param6, s32 param7); @@ -137,28 +138,28 @@ u8 FUN_0200C0DC(u32 param0, u32 param1, u32 *param2, struct UnkStruct_0200BB14_2 *param3, - u32 param4, - u32 param5, - u32 param6, + NarcId param4, + s32 param5, + BOOL param6, u32 param7, u32 param8, s32 param9); BOOL FUN_0200C124(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, s32 param5); BOOL FUN_0200C13C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, s32 param5); struct UnkStruct_0200BB14_5 *FUN_0200C154( struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); -u32 FUN_0200C334(u32 *param0, u32 param1); -u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); +u32 FUN_0200C334(struct UnkStruct1 **param0, s32 param1); +s32 FUN_0200C344(struct UnkStruct1 **param0, s32 param1, u32 param2); BOOL FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); BOOL FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); BOOL FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); @@ -167,15 +168,15 @@ void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14 void FUN_0200C3DC(u32 *param0); BOOL FUN_0200C404(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); -BOOL FUN_0200C474(u32 *param0, u32 param1); -BOOL FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); -BOOL FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); -BOOL FUN_0200C548(u32 param0, u32 *param1, u32 param2); +BOOL FUN_0200C474(struct UnkStruct5 *param0, struct UnkStruct1_sub *param1); +BOOL FUN_0200C4A8(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); +BOOL FUN_0200C4F4(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); +BOOL FUN_0200C548(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); void FUN_0200C59C(u32 param0); void FUN_0200C5A8(u32 *param0); void FUN_0200C5B4(u32 *param0, u32 param1); @@ -233,20 +234,22 @@ void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); BOOL FUN_0200C918(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); BOOL FUN_0200C978(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); -void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); -void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +void FUN_0200C9D8( + u32 *param0, struct UnkStruct1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); +void FUN_0200CA0C( + u32 *param0, struct UnkStruct1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); u32 FUN_0200CA40(u32 *param0); #endif // POKEDIAMOND_UNK_0200BB14_H -- cgit v1.2.3 From 5ded23bcd3e68fa316c46b37266047ab28d08a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 12 Aug 2021 00:34:18 +0200 Subject: global struct names --- include/unk_02008AA4.h | 24 +++---- include/unk_02008DEC.h | 178 ++++++++++++++++++++++++------------------------- include/unk_0200BB14.h | 22 +++--- 3 files changed, 112 insertions(+), 112 deletions(-) (limited to 'include') diff --git a/include/unk_02008AA4.h b/include/unk_02008AA4.h index 2884547d..00343884 100644 --- a/include/unk_02008AA4.h +++ b/include/unk_02008AA4.h @@ -31,20 +31,20 @@ void FUN_02008AA4(struct UnkStruct_0200BB14_sub *param0, s32 param6, u32 param7, u32 param8, - struct UnkStruct1 *param9, - struct UnkStruct1 *param10, - struct UnkStruct1 *param11, - struct UnkStruct1 *param12, - struct UnkStruct1 *param13, - struct UnkStruct1 *param14); + struct UnkStruct_02008DEC_1 *param9, + struct UnkStruct_02008DEC_1 *param10, + struct UnkStruct_02008DEC_1 *param11, + struct UnkStruct_02008DEC_1 *param12, + struct UnkStruct_02008DEC_1 *param13, + struct UnkStruct_02008DEC_1 *param14); struct UnkStruct_02008AA4_1 *FUN_02008BE0(struct UnkStruct_02008AA4_2 *param0, u32 param1, - struct UnkStruct1 *param2, - struct UnkStruct1 *param3, - struct UnkStruct1 *param4, - struct UnkStruct1 *param5, - struct UnkStruct1 *param6, - struct UnkStruct1 *param7); + struct UnkStruct_02008DEC_1 *param2, + struct UnkStruct_02008DEC_1 *param3, + struct UnkStruct_02008DEC_1 *param4, + struct UnkStruct_02008DEC_1 *param5, + struct UnkStruct_02008DEC_1 *param6, + struct UnkStruct_02008DEC_1 *param7); void FUN_02008C80(struct UnkStruct_02008AA4_1 *param0); u32 FUN_02008C9C(u32 param0, void *param1, u32 param2); void FUN_02008D04(u32 param0, u32 param1, u32 param2); diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h index 99dc9579..31bae117 100644 --- a/include/unk_02008DEC.h +++ b/include/unk_02008DEC.h @@ -5,24 +5,24 @@ #include "NNS_g2d.h" #include "filesystem.h" -struct UnkStruct1_sub +struct UnkStruct_02008DEC_sub { u32 unk00; u32 unk04; void *unk08; }; -struct UnkStruct1 +struct UnkStruct_02008DEC_1 { u32 unk00; - struct UnkStruct1_sub *unk04; + struct UnkStruct_02008DEC_sub *unk04; s32 unk08; u32 unk0C; s32 unk10; }; -struct UnkStruct2 +struct UnkStruct_02008DEC_2 { void *unk00; s32 unk04; @@ -30,7 +30,7 @@ struct UnkStruct2 u8 unk0C; }; -struct UnkStruct3 +struct UnkStruct_02008DEC_3 { s32 unk00; u8 unk04[0x40]; @@ -38,7 +38,7 @@ struct UnkStruct3 u32 unk48; }; -struct UnkStruct4 +struct UnkStruct_02008DEC_4 { NarcId unk00; s32 unk04; @@ -48,9 +48,9 @@ struct UnkStruct4 u32 unk14; }; -struct UnkStruct5 +struct UnkStruct_02008DEC_5 { - struct UnkStruct1_sub **unk00; + struct UnkStruct_02008DEC_sub **unk00; s32 unk04; s32 unk08; }; @@ -78,18 +78,18 @@ struct AnimBank_02008DEC NNSG2dAnimBankData *bankData; }; -struct UnkStruct1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); -void FUN_02008E2C(struct UnkStruct1 *param0); -struct UnkStruct1_sub *FUN_02008E6C( - struct UnkStruct1 *param0, struct UnkStruct2 *param1, s32 param2, u32 param3); -struct UnkStruct1_sub *FUN_02008F34(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); +void FUN_02008E2C(struct UnkStruct_02008DEC_1 *param0); +struct UnkStruct_02008DEC_sub *FUN_02008E6C( + struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_2 *param1, s32 param2, u32 param3); +struct UnkStruct_02008DEC_sub *FUN_02008F34(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, BOOL param3, s32 param4, u32 param5, u32 param6); -struct UnkStruct1_sub *FUN_02008F90(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_02008F90(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, BOOL param3, @@ -97,7 +97,7 @@ struct UnkStruct1_sub *FUN_02008F90(struct UnkStruct1 *param0, u32 param5, u32 param6, BOOL param7); -struct UnkStruct1_sub *FUN_02008FEC(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_02008FEC(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, BOOL param3, @@ -105,7 +105,7 @@ struct UnkStruct1_sub *FUN_02008FEC(struct UnkStruct1 *param0, u32 param5, u32 param6, u32 param7); -struct UnkStruct1_sub *FUN_0200904C(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_0200904C(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, BOOL param3, @@ -114,33 +114,33 @@ struct UnkStruct1_sub *FUN_0200904C(struct UnkStruct1 *param0, u32 param6, u32 param7, BOOL param8); -struct UnkStruct1_sub *FUN_020090AC(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_020090AC(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, BOOL param3, s32 param4, u32 param5, u32 param6); -void FUN_020090FC(struct UnkStruct1 *param0, - struct UnkStruct1_sub *param1, +void FUN_020090FC(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, NarcId param2, s32 param3, BOOL param4, u32 param5); -void FUN_02009168(struct UnkStruct1 *param0, - struct UnkStruct1_sub *param1, +void FUN_02009168(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, NarcId param2, s32 param3, BOOL param4, u32 param5); -struct UnkStruct1_sub *FUN_020091E0(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_020091E0(struct UnkStruct_02008DEC_1 *param0, NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6); -struct UnkStruct1_sub *FUN_0200923C(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_0200923C(struct UnkStruct_02008DEC_1 *param0, NARC *param1, u32 param2, u32 param3, @@ -148,7 +148,7 @@ struct UnkStruct1_sub *FUN_0200923C(struct UnkStruct1 *param0, u32 param5, u32 param6, u32 param7); -struct UnkStruct1_sub *FUN_02009298(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_02009298(struct UnkStruct_02008DEC_1 *param0, NARC *param1, u32 param2, u32 param3, @@ -156,7 +156,7 @@ struct UnkStruct1_sub *FUN_02009298(struct UnkStruct1 *param0, u32 param5, u32 param6, u32 param7); -struct UnkStruct1_sub *FUN_020092F8(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_020092F8(struct UnkStruct_02008DEC_1 *param0, NARC *param1, u32 param2, u32 param3, @@ -165,68 +165,68 @@ struct UnkStruct1_sub *FUN_020092F8(struct UnkStruct1 *param0, u32 param6, u32 param7, u32 param8); -struct UnkStruct1_sub *FUN_02009358(struct UnkStruct1 *param0, +struct UnkStruct_02008DEC_sub *FUN_02009358(struct UnkStruct_02008DEC_1 *param0, NARC *param1, u32 param2, u32 param3, s32 param4, u32 param5, u32 param6); -s32 FUN_020093A8(struct UnkStruct1 *param0, struct UnkStruct2 *param1, struct UnkStruct5 *param2, u32 param3); -void FUN_020093DC(struct UnkStruct1 *param0, - struct UnkStruct2 *param1, +s32 FUN_020093A8(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_2 *param1, struct UnkStruct_02008DEC_5 *param2, u32 param3); +void FUN_020093DC(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, s32 param2, s32 param3, - struct UnkStruct5 *param4, + struct UnkStruct_02008DEC_5 *param4, u32 param5); -struct UnkStruct5 *FUN_02009424(s32 param0, u32 param1); -void FUN_02009448(struct UnkStruct5 *param0); -u32 FUN_0200945C(struct UnkStruct1 *param0, s32 param1); -void FUN_02009474(struct UnkStruct1_sub *param0); -void FUN_02009490(struct UnkStruct1 *param0, struct UnkStruct1_sub *param1); -void FUN_020094C4(struct UnkStruct1 *param0); -struct UnkStruct1_sub *FUN_020094F0(struct UnkStruct1 *param0, s32 param1); -s32 FUN_02009530(struct UnkStruct1_sub *param0); -u32 FUN_02009544(struct UnkStruct1_sub *param0); -u32 FUN_0200955C(struct UnkStruct1_sub *param0); -u32 FUN_02009574(struct UnkStruct1_sub *param0); -u32 FUN_0200958C(struct UnkStruct1_sub *param0); -u32 FUN_020095A4(struct UnkStruct1_sub *param0); -u32 FUN_020095BC(struct UnkStruct1_sub *param0); -u32 FUN_020095D4(struct UnkStruct1_sub *param0); -u32 FUN_020095E4(struct UnkStruct1_sub *param0); -u32 FUN_02009610(struct UnkStruct1_sub *param0); -void FUN_02009630(struct UnkStruct1_sub *param0, u32 param1); +struct UnkStruct_02008DEC_5 *FUN_02009424(s32 param0, u32 param1); +void FUN_02009448(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_0200945C(struct UnkStruct_02008DEC_1 *param0, s32 param1); +void FUN_02009474(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009490(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_sub *param1); +void FUN_020094C4(struct UnkStruct_02008DEC_1 *param0); +struct UnkStruct_02008DEC_sub *FUN_020094F0(struct UnkStruct_02008DEC_1 *param0, s32 param1); +s32 FUN_02009530(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009544(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_0200955C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009574(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_0200958C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095A4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095BC(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095D4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095E4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009610(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009630(struct UnkStruct_02008DEC_sub *param0, u32 param1); u32 FUN_0200965C(void); -struct UnkStruct2 *FUN_02009660(struct UnkStruct2 *param0, s32 param1); -void FUN_02009668(u32 *param0, struct UnkStruct2 *param1, u32 param2); -void FUN_020096B4(struct UnkStruct2 *param0); -s32 FUN_020096CC(struct UnkStruct2 *param0); -s32 FUN_020096DC(struct UnkStruct2 *param0, s32 param1); -s32 FUN_02009710(struct UnkStruct2 *param0, s32 param1); -BOOL FUN_0200973C(struct UnkStruct2 *param0, s32 param1); -u32 FUN_02009768(struct UnkStruct2 *param0, s32 param1); -u32 FUN_0200979C(struct UnkStruct2 *param0, s32 param1); -struct UnkStruct1_sub *FUN_020097D0(struct UnkStruct1 *param0); -void FUN_020097FC(struct UnkStruct1_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); +struct UnkStruct_02008DEC_2 *FUN_02009660(struct UnkStruct_02008DEC_2 *param0, s32 param1); +void FUN_02009668(u32 *param0, struct UnkStruct_02008DEC_2 *param1, u32 param2); +void FUN_020096B4(struct UnkStruct_02008DEC_2 *param0); +s32 FUN_020096CC(struct UnkStruct_02008DEC_2 *param0); +s32 FUN_020096DC(struct UnkStruct_02008DEC_2 *param0, s32 param1); +s32 FUN_02009710(struct UnkStruct_02008DEC_2 *param0, s32 param1); +BOOL FUN_0200973C(struct UnkStruct_02008DEC_2 *param0, s32 param1); +u32 FUN_02009768(struct UnkStruct_02008DEC_2 *param0, s32 param1); +u32 FUN_0200979C(struct UnkStruct_02008DEC_2 *param0, s32 param1); +struct UnkStruct_02008DEC_sub *FUN_020097D0(struct UnkStruct_02008DEC_1 *param0); +void FUN_020097FC(struct UnkStruct_02008DEC_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); struct CharacterData_02008DEC *FUN_0200986C(void *param0, u32 param1, u32 param2); struct PaletteData_02008DEC *FUN_0200988C(void *param0, u32 param1, u32 param2, u32 param3); struct CellDataBank_02008DEC *FUN_020098B0(void *param0, u32 param1); struct AnimBank_02008DEC *FUN_020098CC(void *param0, u32 param1); void *FUN_020098E8(void *param0, u32 param1); void *FUN_02009904(void *param0, u32 param1); -void FUN_02009920(struct UnkStruct1_sub *param0); -u32 *FUN_02009934(struct UnkStruct1_sub *param0); -void FUN_0200994C(struct UnkStruct1 *param0, - struct UnkStruct1_sub *param1, +void FUN_02009920(struct UnkStruct_02008DEC_sub *param0); +u32 *FUN_02009934(struct UnkStruct_02008DEC_sub *param0); +void FUN_0200994C(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, void *param2, s32 param3, u32 param4, u32 param5, u32 param6, u32 param7); -void FUN_02009978(struct UnkStruct1 *param0, - struct UnkStruct1_sub *param1, +void FUN_02009978(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, NarcId param2, s32 param3, BOOL param4, @@ -236,8 +236,8 @@ void FUN_02009978(struct UnkStruct1 *param0, u32 param8, u32 param9, BOOL param10); -void FUN_020099B0(struct UnkStruct1 *param0, - struct UnkStruct1_sub *param1, +void FUN_020099B0(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, NARC *param2, u32 param3, u32 param4, @@ -247,29 +247,29 @@ void FUN_020099B0(struct UnkStruct1 *param0, u32 param8, u32 param9, u32 param10); -s32 FUN_020099E8(struct UnkStruct4 *param0); +s32 FUN_020099E8(struct UnkStruct_02008DEC_4 *param0); void *FUN_02009A04(NARC *param0, u32 param1, u32 param2, u32 param3, u32 param4); -u32 FUN_02009A50(struct UnkStruct1_sub *param0); -void FUN_02009A90(struct UnkStruct5 *param0); -u32 FUN_02009AC4(struct UnkStruct1_sub *param0); -u32 FUN_02009B04(struct UnkStruct1_sub *param0); -void FUN_02009B44(struct UnkStruct5 *param0); -u32 FUN_02009B78(struct UnkStruct1_sub *param0); -void FUN_02009BB8(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); -void FUN_02009BE8(struct UnkStruct1_sub *param0); -void FUN_02009C0C(struct UnkStruct1_sub *param0); -void FUN_02009C30(struct UnkStruct5 *param0); -u32 FUN_02009C5C(struct UnkStruct1_sub *param0); -u32 FUN_02009C80(struct UnkStruct1_sub *param0, struct UnkStruct1_sub *param1); +u32 FUN_02009A50(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009A90(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009AC4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009B04(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009B44(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009B78(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009BB8(struct UnkStruct_02008DEC_sub *param0, struct UnkStruct_02008DEC_sub *param1); +void FUN_02009BE8(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009C0C(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009C30(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009C5C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009C80(struct UnkStruct_02008DEC_sub *param0, struct UnkStruct_02008DEC_sub *param1); void FUN_02009CDC(u32 param0); -u32 FUN_02009CF0(struct UnkStruct1_sub *param0); -void FUN_02009D34(struct UnkStruct5 *param0); -u32 FUN_02009D68(struct UnkStruct1_sub *param0); -void FUN_02009DAC(struct UnkStruct5 *param0); -void FUN_02009DE0(struct UnkStruct1_sub *param0); -void FUN_02009E04(struct UnkStruct1_sub *param0); -void FUN_02009E28(struct UnkStruct5 *param0); -u32 FUN_02009E54(struct UnkStruct1_sub *param0, u32 param1); -s32 FUN_02009E88(struct UnkStruct1_sub *param0, u32 param1); +u32 FUN_02009CF0(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009D34(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009D68(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009DAC(struct UnkStruct_02008DEC_5 *param0); +void FUN_02009DE0(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009E04(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009E28(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009E54(struct UnkStruct_02008DEC_sub *param0, u32 param1); +s32 FUN_02009E88(struct UnkStruct_02008DEC_sub *param0, u32 param1); #endif // POKEDIAMOND_UNK_02008DEC_H diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index 20d4739d..7d5a0083 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -17,9 +17,9 @@ struct UnkStruct_0200BB14_2 { u32 unk00; struct UnkStruct_02008AA4_1 *unk04; - struct UnkStruct2 *unk08; - struct UnkStruct1 *unk0c[6]; - struct UnkStruct5 *unk24[6]; + struct UnkStruct_02008DEC_2 *unk08; + struct UnkStruct_02008DEC_1 *unk0c[6]; + struct UnkStruct_02008DEC_5 *unk24[6]; s32 unk3c[6]; s32 unk54; }; @@ -158,8 +158,8 @@ BOOL FUN_0200C13C(u32 *param0, s32 param5); struct UnkStruct_0200BB14_5 *FUN_0200C154( struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); -u32 FUN_0200C334(struct UnkStruct1 **param0, s32 param1); -s32 FUN_0200C344(struct UnkStruct1 **param0, s32 param1, u32 param2); +u32 FUN_0200C334(struct UnkStruct_02008DEC_1 **param0, s32 param1); +s32 FUN_0200C344(struct UnkStruct_02008DEC_1 **param0, s32 param1, u32 param2); BOOL FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); BOOL FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); BOOL FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); @@ -173,10 +173,10 @@ BOOL FUN_0200C404(u32 *param0, BOOL param4, u32 param5, s32 param6); -BOOL FUN_0200C474(struct UnkStruct5 *param0, struct UnkStruct1_sub *param1); -BOOL FUN_0200C4A8(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); -BOOL FUN_0200C4F4(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); -BOOL FUN_0200C548(struct UnkStruct1 *param0, struct UnkStruct5 *param1, u32 param2); +BOOL FUN_0200C474(struct UnkStruct_02008DEC_5 *param0, struct UnkStruct_02008DEC_sub *param1); +BOOL FUN_0200C4A8(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); +BOOL FUN_0200C4F4(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); +BOOL FUN_0200C548(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); void FUN_0200C59C(u32 param0); void FUN_0200C5A8(u32 *param0); void FUN_0200C5B4(u32 *param0, u32 param1); @@ -247,9 +247,9 @@ BOOL FUN_0200C978(u32 *param0, u32 param5, s32 param6); void FUN_0200C9D8( - u32 *param0, struct UnkStruct1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); + u32 *param0, struct UnkStruct_02008DEC_1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); void FUN_0200CA0C( - u32 *param0, struct UnkStruct1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); + u32 *param0, struct UnkStruct_02008DEC_1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); u32 FUN_0200CA40(u32 *param0); #endif // POKEDIAMOND_UNK_0200BB14_H -- cgit v1.2.3 From ee3f5159550b154ea8b5c01b518756638eb5c4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 14 Aug 2021 13:34:58 +0200 Subject: replace ugly casts with clean union --- include/unk_02008DEC.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h index 31bae117..6504b524 100644 --- a/include/unk_02008DEC.h +++ b/include/unk_02008DEC.h @@ -24,7 +24,11 @@ struct UnkStruct_02008DEC_1 struct UnkStruct_02008DEC_2 { - void *unk00; + union + { + struct UnkStruct_02008DEC_3 *unk00_3; + struct UnkStruct_02008DEC_4 *unk00_4; + }; s32 unk04; u32 unk08; u8 unk0C; @@ -80,8 +84,10 @@ struct AnimBank_02008DEC struct UnkStruct_02008DEC_1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); void FUN_02008E2C(struct UnkStruct_02008DEC_1 *param0); -struct UnkStruct_02008DEC_sub *FUN_02008E6C( - struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_2 *param1, s32 param2, u32 param3); +struct UnkStruct_02008DEC_sub *FUN_02008E6C(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, + s32 param2, + u32 param3); struct UnkStruct_02008DEC_sub *FUN_02008F34(struct UnkStruct_02008DEC_1 *param0, NarcId param1, s32 param2, @@ -172,7 +178,10 @@ struct UnkStruct_02008DEC_sub *FUN_02009358(struct UnkStruct_02008DEC_1 *param0, s32 param4, u32 param5, u32 param6); -s32 FUN_020093A8(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_2 *param1, struct UnkStruct_02008DEC_5 *param2, u32 param3); +s32 FUN_020093A8(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, + struct UnkStruct_02008DEC_5 *param2, + u32 param3); void FUN_020093DC(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_2 *param1, s32 param2, @@ -208,7 +217,8 @@ BOOL FUN_0200973C(struct UnkStruct_02008DEC_2 *param0, s32 param1); u32 FUN_02009768(struct UnkStruct_02008DEC_2 *param0, s32 param1); u32 FUN_0200979C(struct UnkStruct_02008DEC_2 *param0, s32 param1); struct UnkStruct_02008DEC_sub *FUN_020097D0(struct UnkStruct_02008DEC_1 *param0); -void FUN_020097FC(struct UnkStruct_02008DEC_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_020097FC( + struct UnkStruct_02008DEC_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); struct CharacterData_02008DEC *FUN_0200986C(void *param0, u32 param1, u32 param2); struct PaletteData_02008DEC *FUN_0200988C(void *param0, u32 param1, u32 param2, u32 param3); struct CellDataBank_02008DEC *FUN_020098B0(void *param0, u32 param1); -- cgit v1.2.3 From 2a568ac2b0bd8b1a8ca6441e8e3af914bffe38ba Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Aug 2021 16:17:18 -0400 Subject: Decompile unk_02021590 --- include/font.h | 15 +++++++++----- include/script_buffers.h | 2 +- include/string16.h | 11 +++------- include/unk_02021590.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 include/unk_02021590.h (limited to 'include') diff --git a/include/font.h b/include/font.h index 963e36bc..3c0f4267 100644 --- a/include/font.h +++ b/include/font.h @@ -4,28 +4,33 @@ #include "global.h" #include "text.h" -struct UnkStruct_02002C14 +struct UnkStruct_02002C14_sub { const char buf[0x80]; u8 width; u8 height; +}; + +struct UnkStruct_02002C14 +{ + struct UnkStruct_02002C14_sub unk00; void *unk84[4]; - struct UnkStruct_0202199C *unk94[4]; + struct FontData *unk94[4]; }; extern struct UnkStruct_02002C14 *UNK_02106FC8; void FUN_02002C14(); -void FUN_02002C50(u32 param0, u32 param1); +void FUN_02002C50(u32 font_id, u32 heap_id); void FUN_02002C84(s32 param0, u32 param1); void FUN_02002CC0(s32 param0); void FUN_02002CF8(int param0); -struct UnkStruct_02002C14 *FUN_02002D94(u32 param0, u32 param1); +struct UnkStruct_02002C14_sub *FUN_02002D94(u32 param0, u32 param1); u32 FontFunc(u32 fontId, struct TextPrinter *printer); u32 FUN_02002DE0(u32 param0, u16 *str, u32 param2); u32 FUN_02002E14(u32 param0, struct String *str, u32 param2); s32 GetFontAttribute(u8 fontId, s32 attr); -void FUN_02002ED0(u32 layer, u32 baseAddr, u32 heap_id); +void FUN_02002ED0(enum GFBgLayer layer, u32 baseAddr, u32 heap_id); void FUN_02002EEC(u32 layer, u32 baseAddr, u32 heap_id); s32 FUN_02002F08(u32 param0, struct String *str, u32 param2); u32 FUN_02002F40(u32 param0, struct String *str, u32 param2, u32 param3); diff --git a/include/script_buffers.h b/include/script_buffers.h index b9f0e268..e5c39291 100644 --- a/include/script_buffers.h +++ b/include/script_buffers.h @@ -104,7 +104,7 @@ void BufferMonthNameAbbr(struct ScrStrBufs * mgr, u32 idx, u32 month); void ScrStrBufs_UpperFirstChar(struct ScrStrBufs * mgr, u32 idx); void StringExpandPlaceholders(struct ScrStrBufs * mgr, struct String * dest, struct String * src); void ScrStrBufs_ResetBuffers(struct ScrStrBufs * mgr); -struct UnkStruct_0200B870 * MessagePrinter_new(u32 r5, u32 r6, u32 sp4, u32 r4); +struct UnkStruct_0200B870 * MessagePrinter_new(u32 color1, u32 color2, u32 color3, u32 heap_id); void MessagePrinter_delete(struct UnkStruct_0200B870 * a0); void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, struct Window * a2, int a3, int a4); void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, struct Window *window, int x, int y); diff --git a/include/string16.h b/include/string16.h index 69ea4e30..f42ff918 100644 --- a/include/string16.h +++ b/include/string16.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_STRING16_H #include "string_util.h" +#include "unk_02021590.h" struct String { @@ -12,12 +13,6 @@ struct String u8 padding[2]; }; -struct UnkStruct_0202199C -{ - u8 filler_00[0x70]; - int (*unk_70)(struct UnkStruct_0202199C *, int); -}; - #define STR16_MAGIC 0xB6F8D2EC struct String * String_ctor(u32 count, u32 heap_id); @@ -25,8 +20,8 @@ BOOL StringCompare(struct String *, struct String *); void CopyU16ArrayToStringN(struct String *, u16 *, u32); // copy void StringSetEmpty(struct String *); // set empty struct String * StringDup(struct String *, u32 heap_id); -s32 StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6); -s32 StringGetWidth_SingleLine_HandleClearToControlCode(struct UnkStruct_0202199C * r6, const u16 * arr); +s32 StringGetWidth(struct FontData * r7, const u16 * arr, u32 r6); +s32 StringGetWidth_SingleLine_HandleClearToControlCode(struct FontData * r6, const u16 * arr); void String_dtor(struct String * str); void StringCopy(struct String * dest, struct String * src); void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strConvMode, BOOL whichCharset); diff --git a/include/unk_02021590.h b/include/unk_02021590.h new file mode 100644 index 00000000..6ed73bb8 --- /dev/null +++ b/include/unk_02021590.h @@ -0,0 +1,52 @@ +#ifndef POKEDIAMOND_UNK_02021590_H +#define POKEDIAMOND_UNK_02021590_H + +#include "filesystem.h" +#include "font.h" + +struct FontGraphicHeader +{ + u32 headerSize; + u32 widthDataStart; + u32 numGlyphs; + u8 fixedWidth; + u8 fixedHeight; + u8 glyphWidth; + u8 glyphHeight; +}; + +struct FontData +{ + u32 glyphAccessMode; + void (*uncompGlyphFunc)(struct FontData *, u16, struct UnkStruct_02002C14_sub *); + u32 glyphShape; + u32 glyphSize; + void * narcReadBuf; + u8 glyphReadBuf[0x40]; + NARC * narc; + u32 fileId; + struct FontGraphicHeader gfxHeader; + BOOL isFixedWidthFont; + int (*glyphWidthFunc)(struct FontData *, int); + u8 * glyphWidths; +}; + +struct FontData *FontData_new(NarcId narcId, s32 fileId, u32 unk2, BOOL unk3, u32 heap_id); +void FontData_delete(struct FontData * ptr); +void FontData_ModeSwitch(struct FontData * ptr, u32 a1, u32 heap_id); +void FontData_Init(struct FontData *ptr, NarcId narcId, s32 fileId, BOOL unk, u32 heap_id); +void FontData_FreeWidthsAndNarc(struct FontData * ptr); +void InitFontResources(struct FontData * ptr, u32 a1, u32 heap_id); +void InitFontResources_FromPreloaded(struct FontData * ptr, u32 heap_id); +void InitFontResources_LazyFromNarc(struct FontData * ptr, u32 heap_id); +void FreeLoadedFontResources(struct FontData * ptr); +void FreeLoadedFontResources_FromPreloaded(struct FontData * ptr); +void FreeLoadedFontResources_LazyFromNarc(struct FontData * ptr); +void TryLoadGlyph(struct FontData * ptr, u32 param1, struct UnkStruct_02002C14_sub * ptr2); +void DecompressGlyphTiles_FromPreloaded(struct FontData * ptr, u16 param1, struct UnkStruct_02002C14_sub * param2); +void DecompressGlyphTiles_LazyFromNarc(struct FontData * ptr, u16 param1, struct UnkStruct_02002C14_sub * param2); +u32 GetStringWidth(struct FontData * ptr, const u16 * str, u32 letterSpacing); +int GetGlyphWidth_VariableWidth(struct FontData * ptr, int a1); +int GetGlyphWidth_FixedWidth(struct FontData * ptr, int a1); + +#endif //POKEDIAMOND_UNK_02021590_H -- cgit v1.2.3 From 496ab2d25dd76329ef5bb95090291e237a56f474 Mon Sep 17 00:00:00 2001 From: red031000 Date: Mon, 16 Aug 2021 14:51:17 +0100 Subject: literally one single random scrcmd func in a mod04 PR --- include/scrcmd.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 8c89e230..7a0ab21e 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -15,6 +15,14 @@ struct UnkStruct_0203A288 { u8 padding[1]; }; +typedef struct UnkStruct_0203B174 +{ + BOOL Unk00; + u32 Unk04; + void *Unk08; + struct UnkSavStruct80 *Unk0C; +} UnkStruct_0203B174; + //scrcmd.c BOOL ScrCmd_Nop(struct ScriptContext* ctx); BOOL ScrCmd_Dummy(struct ScriptContext* ctx); -- cgit v1.2.3 From 20b8fa77bcd1875640cb2bb61375bcf0a0bdd45f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 18 Aug 2021 08:18:54 -0400 Subject: unk_02015D14 --- include/unk_02015D14.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 include/unk_02015D14.h (limited to 'include') diff --git a/include/unk_02015D14.h b/include/unk_02015D14.h new file mode 100644 index 00000000..c20cd9c9 --- /dev/null +++ b/include/unk_02015D14.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_UNK_02015D14_H +#define POKEDIAMOND_UNK_02015D14_H + +BOOL FUN_02015D88(const u8 * a, u16 * b, u32 c, u32 d); + +#endif //POKEDIAMOND_UNK_02015D14_H -- cgit v1.2.3 From ed84d6a9a3bfc2c092e22b8e941cac775dc14127 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 18 Aug 2021 08:44:22 -0400 Subject: Rename unk_0201D514 --> rs_migrate_string; document --- include/rs_migrate_string.h | 26 ++++++++++++++++++++++++++ include/unk_02015D14.h | 6 ------ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 include/rs_migrate_string.h delete mode 100644 include/unk_02015D14.h (limited to 'include') diff --git a/include/rs_migrate_string.h b/include/rs_migrate_string.h new file mode 100644 index 00000000..b83807f5 --- /dev/null +++ b/include/rs_migrate_string.h @@ -0,0 +1,26 @@ +#ifndef POKEDIAMOND_UNK_02015D14_H +#define POKEDIAMOND_UNK_02015D14_H + +// -------------------------------------------- +// ConvertRSStringToDPStringInternational +// ============================================ +// Param rs_str: Pointer to u8 representing +// the name of a Pokemon or +// its OT when migrating from +// Advanced Gameboy. +// Param dp_str: Pointer to u16 representing +// the destination string buffer +// for migration to Diamond +// or Pearl. +// Param length: The length of the string +// to convert, including the +// terminator byte. +// Param language: Game language of origin. +// See include/config.h. +// Return: TRUE if the conversion was completed +// successfully. Otherwise, dp_str will +// be filled with up to 10 question mark +// characters. +BOOL ConvertRSStringToDPStringInternational(const u8 * rs_str, u16 * dp_str, u32 length, u32 language); + +#endif //POKEDIAMOND_UNK_02015D14_H diff --git a/include/unk_02015D14.h b/include/unk_02015D14.h deleted file mode 100644 index c20cd9c9..00000000 --- a/include/unk_02015D14.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEDIAMOND_UNK_02015D14_H -#define POKEDIAMOND_UNK_02015D14_H - -BOOL FUN_02015D88(const u8 * a, u16 * b, u32 c, u32 d); - -#endif //POKEDIAMOND_UNK_02015D14_H -- cgit v1.2.3 From 06b3faa2ef3e9a0ad297f4dfa48573bbed7249d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 18 Aug 2021 17:50:40 +0200 Subject: decompile and split unk_02009EAC.s --- include/unk_02009EAC.h | 37 +++++++++++++++++++++++++++++++++++++ include/unk_0200A104.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 include/unk_02009EAC.h create mode 100644 include/unk_0200A104.h (limited to 'include') diff --git a/include/unk_02009EAC.h b/include/unk_02009EAC.h new file mode 100644 index 00000000..4b0d2b7e --- /dev/null +++ b/include/unk_02009EAC.h @@ -0,0 +1,37 @@ +#include "global.h" +#include "NNS_g2d.h" + +struct UnkStruct_02009EAC +{ + NNSG2dOamManager oamManagers[2]; + u32 heap_id; +}; + +void FUN_02009EAC(s32 param0, + s32 param1, + s32 param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +void FUN_02009EF0(u32 param0, + u32 param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +void FUN_02009F80(void); +void FUN_02009FA0(void); +void FUN_02009FD8(void *param0, u32 *param1, u32 param2, u32 param3); +NNSG2dOamManager *FUN_0200A03C(u32 param0); +void FUN_0200A064(u32 heap_id); +void FUN_0200A06C(u32 heap_id); +u32 FUN_0200A074(u32 param0, u32 param1); +u32 FUN_0200A094(u32 param0, u32 param1); +u32 FUN_0200A0B8(u32 param0); +u32 FUN_0200A0DC(u32 param0); diff --git a/include/unk_0200A104.h b/include/unk_0200A104.h new file mode 100644 index 00000000..6e3bb1f0 --- /dev/null +++ b/include/unk_0200A104.h @@ -0,0 +1,28 @@ +#include "global.h" +#include "nitro/FX_types.h" + +struct UnkStruct_0200A104 +{ + u32 unk00; + u32 unk04; + u16 unk08; + s16 unk0a; + u32 unk0c; + s8 unk10; + s16 unk12; + s16 unk14; + u16 unk16; + u16 unk18; + s16 unk1a; + u32 unk1c; +}; + +void FUN_0200A104(struct UnkStruct_0200A104 *param0); +void FUN_0200A1A0( + struct UnkStruct_0200A104 *param0, u16 param1, s16 param2, s16 param3, u32 param4, u32 param5); +void FUN_0200A208(u16 param0, s16 param1, s16 param2, u32 param3, u32 param4); +void FUN_0200A274(fx32 brightness, fx32 param1, u32 param2); +void FUN_0200A2AC(void); +void FUN_0200A2D8(u32 param0); +void FUN_0200A318(void); +u32 FUN_0200A344(u32 param0); -- cgit v1.2.3 From 4c6555ebcf6ad432ded5d9699d1d3b404907ce6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 18 Aug 2021 18:15:18 +0200 Subject: fix warnings --- include/unk_02009EAC.h | 15 ++++++++++----- include/unk_0200A104.h | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/unk_02009EAC.h b/include/unk_02009EAC.h index 4b0d2b7e..a2242605 100644 --- a/include/unk_02009EAC.h +++ b/include/unk_02009EAC.h @@ -1,3 +1,6 @@ +#ifndef POKEDIAMOND_UNK_02009EAC_H +#define POKEDIAMOND_UNK_02009EAC_H + #include "global.h" #include "NNS_g2d.h" @@ -16,15 +19,15 @@ void FUN_02009EAC(s32 param0, u32 param6, u32 param7, u32 param8); -void FUN_02009EF0(u32 param0, - u32 param1, - u32 param2, - u32 param3, +void FUN_02009EF0(s32 param0, + s32 param1, + s32 param2, + s32 param3, u32 param4, u32 param5, u32 param6, u32 param7, - u32 param8); + u32 heap_id); void FUN_02009F80(void); void FUN_02009FA0(void); void FUN_02009FD8(void *param0, u32 *param1, u32 param2, u32 param3); @@ -35,3 +38,5 @@ u32 FUN_0200A074(u32 param0, u32 param1); u32 FUN_0200A094(u32 param0, u32 param1); u32 FUN_0200A0B8(u32 param0); u32 FUN_0200A0DC(u32 param0); + +#endif // POKEDIAMOND_UNK_02009EAC_H diff --git a/include/unk_0200A104.h b/include/unk_0200A104.h index 6e3bb1f0..de46ed49 100644 --- a/include/unk_0200A104.h +++ b/include/unk_0200A104.h @@ -1,9 +1,16 @@ +#ifndef POKEDIAMOND_UNK_0200A104_H +#define POKEDIAMOND_UNK_0200A104_H + #include "global.h" #include "nitro/FX_types.h" + +#define reg_addr_G2_BLDCNT (u16 *)0x4000050 +#define reg_addr_G2S_DB_BLDCNT (u16 *)0x4001050 + struct UnkStruct_0200A104 { - u32 unk00; + fx32 unk00; u32 unk04; u16 unk08; s16 unk0a; @@ -19,10 +26,12 @@ struct UnkStruct_0200A104 void FUN_0200A104(struct UnkStruct_0200A104 *param0); void FUN_0200A1A0( - struct UnkStruct_0200A104 *param0, u16 param1, s16 param2, s16 param3, u32 param4, u32 param5); -void FUN_0200A208(u16 param0, s16 param1, s16 param2, u32 param3, u32 param4); + struct UnkStruct_0200A104 *param0, u16 param1, s16 param2, s16 param3, fx32 param4, u32 param5); +void FUN_0200A208(u16 param0, s16 param1, s16 param2, fx32 param3, u32 param4); void FUN_0200A274(fx32 brightness, fx32 param1, u32 param2); void FUN_0200A2AC(void); void FUN_0200A2D8(u32 param0); void FUN_0200A318(void); u32 FUN_0200A344(u32 param0); + +#endif // POKEDIAMOND_UNK_0200A104_H -- cgit v1.2.3 From bb8d0b174dfafd4d268a874ef55f2d09f510b82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Wed, 18 Aug 2021 19:57:28 +0200 Subject: partially document oam.c and brightness.c --- include/brightness.h | 38 ++++++++++++++++++++++++++++++++++++++ include/oam.h | 42 ++++++++++++++++++++++++++++++++++++++++++ include/unk_02009EAC.h | 42 ------------------------------------------ include/unk_0200A104.h | 37 ------------------------------------- 4 files changed, 80 insertions(+), 79 deletions(-) create mode 100644 include/brightness.h create mode 100644 include/oam.h delete mode 100644 include/unk_02009EAC.h delete mode 100644 include/unk_0200A104.h (limited to 'include') diff --git a/include/brightness.h b/include/brightness.h new file mode 100644 index 00000000..029ee0b9 --- /dev/null +++ b/include/brightness.h @@ -0,0 +1,38 @@ +#ifndef POKEDIAMOND_UNK_0200A104_H +#define POKEDIAMOND_UNK_0200A104_H + +#include "global.h" +#include "nitro/FX_types.h" + +struct BrightnessData +{ + fx32 surfaceMask; + u32 screenMask; + u16 step_count; + s16 target_brightness; + u32 unk0c; + s8 transition_direction; + s16 brightness_diff; + s16 step_size_integer; + u16 step_size_fractional; + u16 fractional_count; + s16 current_brightness; + BOOL transitionActive; +}; + +void DoBrightnessTransitionStep(struct BrightnessData *brightness); +void InitBrightnessTransition(struct BrightnessData *brightnessData, + u16 step_count, + s16 target_brightness, + s16 start_brightness, + fx32 surfaceMask, + u32 screenMask); +void StartBrightnessTransition( + u16 step_count, s16 target_brightness, s16 start_brightness, fx32 surfaceMask, u32 screenMask); +void SetBrightness(fx32 brightness, fx32 surfaceMask, u32 screenMask); +void InitAllScreenBrightnessData(void); +void InitScreenBrightnessData(u32 screenMask); +void DoAllScreenBrightnessTransitionStep(void); +BOOL IsBrightnessTransitionActive(u32 screenMask); + +#endif // POKEDIAMOND_UNK_0200A104_H diff --git a/include/oam.h b/include/oam.h new file mode 100644 index 00000000..773c985d --- /dev/null +++ b/include/oam.h @@ -0,0 +1,42 @@ +#ifndef POKEDIAMOND_UNK_02009EAC_H +#define POKEDIAMOND_UNK_02009EAC_H + +#include "global.h" +#include "NNS_g2d.h" + +struct OamData +{ + NNSG2dOamManager oamManagers[2]; + u32 heap_id; +}; + +void FUN_02009EAC(s32 param0, + s32 param1, + s32 param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +void InitOamData(s32 param0, + s32 param1, + s32 param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 heap_id); +void ApplyAndResetOamManagerBuffer(void); +void DeinitOamData(void); +void FUN_02009FD8(void *param0, u32 *param1, u32 param2, u32 param3); +NNSG2dOamManager *GetOamManager(u32 screen); +void FUN_0200A064(u32 heap_id); +void FUN_0200A06C(u32 heap_id); +u32 EntryOamManagerOamWithAffineIdxMainScreen(u32 param0, u32 param1); +u32 EntryOamManagerOamWithAffineIdxSubScreen(u32 param0, u32 param1); +u32 EntryOamManagerAffineMainScreen(u32 param0); +u32 EntryOamManagerAffineSubScreen(u32 param0); + +#endif // POKEDIAMOND_UNK_02009EAC_H diff --git a/include/unk_02009EAC.h b/include/unk_02009EAC.h deleted file mode 100644 index a2242605..00000000 --- a/include/unk_02009EAC.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef POKEDIAMOND_UNK_02009EAC_H -#define POKEDIAMOND_UNK_02009EAC_H - -#include "global.h" -#include "NNS_g2d.h" - -struct UnkStruct_02009EAC -{ - NNSG2dOamManager oamManagers[2]; - u32 heap_id; -}; - -void FUN_02009EAC(s32 param0, - s32 param1, - s32 param2, - s32 param3, - u32 param4, - u32 param5, - u32 param6, - u32 param7, - u32 param8); -void FUN_02009EF0(s32 param0, - s32 param1, - s32 param2, - s32 param3, - u32 param4, - u32 param5, - u32 param6, - u32 param7, - u32 heap_id); -void FUN_02009F80(void); -void FUN_02009FA0(void); -void FUN_02009FD8(void *param0, u32 *param1, u32 param2, u32 param3); -NNSG2dOamManager *FUN_0200A03C(u32 param0); -void FUN_0200A064(u32 heap_id); -void FUN_0200A06C(u32 heap_id); -u32 FUN_0200A074(u32 param0, u32 param1); -u32 FUN_0200A094(u32 param0, u32 param1); -u32 FUN_0200A0B8(u32 param0); -u32 FUN_0200A0DC(u32 param0); - -#endif // POKEDIAMOND_UNK_02009EAC_H diff --git a/include/unk_0200A104.h b/include/unk_0200A104.h deleted file mode 100644 index de46ed49..00000000 --- a/include/unk_0200A104.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef POKEDIAMOND_UNK_0200A104_H -#define POKEDIAMOND_UNK_0200A104_H - -#include "global.h" -#include "nitro/FX_types.h" - - -#define reg_addr_G2_BLDCNT (u16 *)0x4000050 -#define reg_addr_G2S_DB_BLDCNT (u16 *)0x4001050 - -struct UnkStruct_0200A104 -{ - fx32 unk00; - u32 unk04; - u16 unk08; - s16 unk0a; - u32 unk0c; - s8 unk10; - s16 unk12; - s16 unk14; - u16 unk16; - u16 unk18; - s16 unk1a; - u32 unk1c; -}; - -void FUN_0200A104(struct UnkStruct_0200A104 *param0); -void FUN_0200A1A0( - struct UnkStruct_0200A104 *param0, u16 param1, s16 param2, s16 param3, fx32 param4, u32 param5); -void FUN_0200A208(u16 param0, s16 param1, s16 param2, fx32 param3, u32 param4); -void FUN_0200A274(fx32 brightness, fx32 param1, u32 param2); -void FUN_0200A2AC(void); -void FUN_0200A2D8(u32 param0); -void FUN_0200A318(void); -u32 FUN_0200A344(u32 param0); - -#endif // POKEDIAMOND_UNK_0200A104_H -- cgit v1.2.3 From f31aa875f127653e7e1fc81a3093b2d8f09aea8f Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 20 Aug 2021 16:49:35 -0400 Subject: Decompile unk_02089D90 -> save_data_read_error --- include/save_data_read_error.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 include/save_data_read_error.h (limited to 'include') diff --git a/include/save_data_read_error.h b/include/save_data_read_error.h new file mode 100644 index 00000000..fe78b8f0 --- /dev/null +++ b/include/save_data_read_error.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_SAVE_READ_DATA_ERROR_H +#define POKEDIAMOND_SAVE_READ_DATA_ERROR_H + +void ShowSaveDataReadError(u32 heap_id); + +#endif -- cgit v1.2.3 From 7f998da0acf97bfa98cba5b82d0ef406157751c1 Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 20 Aug 2021 17:12:07 -0400 Subject: save_data_read_error: Fix include-guard typo --- include/save_data_read_error.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/save_data_read_error.h b/include/save_data_read_error.h index fe78b8f0..482e78d7 100644 --- a/include/save_data_read_error.h +++ b/include/save_data_read_error.h @@ -1,5 +1,5 @@ -#ifndef POKEDIAMOND_SAVE_READ_DATA_ERROR_H -#define POKEDIAMOND_SAVE_READ_DATA_ERROR_H +#ifndef POKEDIAMOND_SAVE_DATA_READ_ERROR_H +#define POKEDIAMOND_SAVE_DATA_READ_ERROR_H void ShowSaveDataReadError(u32 heap_id); -- cgit v1.2.3 From 614fcf2c7cc60e71d0c4707df67a822c19cdc1b4 Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 20 Aug 2021 17:27:56 -0400 Subject: Document gMain.unk65 -> gMain.screensFlipped --- include/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index ba4d7bc2..87110de5 100644 --- a/include/main.h +++ b/include/main.h @@ -94,7 +94,7 @@ struct Main u16 touchNew; u16 touchHeld; u8 touchpadReadAuto; - u8 unk65; + u8 screensFlipped; u8 unk66; u8 unk67; u8 softResetDisabled; -- cgit v1.2.3 From a09a13e2b35e6ca07ab623464189b8bf602a66a8 Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 20 Aug 2021 21:31:50 -0400 Subject: Decompile unk_02089F24 -> save_data_write_error --- include/save_block_2.h | 2 +- include/save_data_write_error.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 include/save_data_write_error.h (limited to 'include') diff --git a/include/save_block_2.h b/include/save_block_2.h index a4514c96..fb2bc92a 100644 --- a/include/save_block_2.h +++ b/include/save_block_2.h @@ -152,6 +152,6 @@ BOOL FlashLoadChunk(u32 src, void * dest, u32 size); void FlashWriteCommandCallback(void * arg); int FlashWriteChunkInternal(u32 dest, void * src, u32 size); BOOL WaitFlashWrite(int lock, BOOL * res); -void SaveErrorHandling(int lock, int errno); +void SaveErrorHandling(int lock, u32 errno); #endif //POKEDIAMOND_SAVE_BLOCK_2_H diff --git a/include/save_data_write_error.h b/include/save_data_write_error.h new file mode 100644 index 00000000..45f8f614 --- /dev/null +++ b/include/save_data_write_error.h @@ -0,0 +1,7 @@ +#ifndef POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H +#define POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H + +void ShowGBACartRemovedError(u32 heap_id); +void ShowSaveDataWriteError(u32 heap_id, u32 err_no); + +#endif -- cgit v1.2.3 From 0d600f46805de96895678bb76d7c3e87466f459f Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 20 Aug 2021 21:41:10 -0400 Subject: Move ShowGBACartRemovedError to save_data_read_error --- include/save_data_read_error.h | 1 + include/save_data_write_error.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/save_data_read_error.h b/include/save_data_read_error.h index 482e78d7..d3556734 100644 --- a/include/save_data_read_error.h +++ b/include/save_data_read_error.h @@ -2,5 +2,6 @@ #define POKEDIAMOND_SAVE_DATA_READ_ERROR_H void ShowSaveDataReadError(u32 heap_id); +void ShowGBACartRemovedError(u32 heap_id); #endif diff --git a/include/save_data_write_error.h b/include/save_data_write_error.h index 45f8f614..e4c77453 100644 --- a/include/save_data_write_error.h +++ b/include/save_data_write_error.h @@ -1,7 +1,6 @@ #ifndef POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H #define POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H -void ShowGBACartRemovedError(u32 heap_id); void ShowSaveDataWriteError(u32 heap_id, u32 err_no); #endif -- cgit v1.2.3 From d7426e1f1c75846151eea1828bc2ab069c5a072e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 22 Aug 2021 01:21:52 +0200 Subject: decompile unk_0200CABC.s --- include/bg_window.h | 2 +- include/unk_0200CABC.h | 142 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 include/unk_0200CABC.h (limited to 'include') diff --git a/include/bg_window.h b/include/bg_window.h index 24ed152b..9ac29965 100644 --- a/include/bg_window.h +++ b/include/bg_window.h @@ -267,7 +267,7 @@ void CopyBgTilemapRectAffine(struct Bg *bg, u8 srcHeight, u8 adjustForSrcDims); void FillBgTilemapRect(struct BgConfig *bgConfig, - u32 bgId, + u8 bgId, u16 fillValue, u8 x, u8 y, diff --git a/include/unk_0200CABC.h b/include/unk_0200CABC.h new file mode 100644 index 00000000..8f96a4b0 --- /dev/null +++ b/include/unk_0200CABC.h @@ -0,0 +1,142 @@ +#ifndef POKEDIAMOND_UNK_0200CABC_H +#define POKEDIAMOND_UNK_0200CABC_H + +#include "global.h" +#include "bg_window.h" +#include "pokemon.h" +#include "unk_02008DEC.h" + +struct UnkStruct_0200CABC_1 +{ + struct Window *unk000; + u8 unk004[9][0x80]; + u16 unk484; + u8 unk486; + u8 unk487 : 7; + u8 unk488 : 2; +}; + +struct UnkStruct_0200CABC_2 +{ + u32 unk000; + u8 unk004[0x12c]; + struct UnkStruct_02008DEC_1 *unk130; + struct UnkStruct_02008DEC_1 *unk134; + u8 unk138[0x2a]; + u16 unk162; + u32 *unk164; + struct BgConfig *unk168; + u8 unk16c; + u8 unk16d; + u8 unk16e; + u8 unk16f; +}; + +struct UnkStruct_0200CABC_3 +{ + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; +}; + +u32 FUN_0200CABC(struct BgConfig *bgConfig, u32 layer, u32 numTiles, u32 param3, u32 heap_id); +u32 FUN_0200CAFC(void); +void FUN_0200CB00( + struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); +void FUN_0200CB6C(struct BgConfig *bgConfig, + u8 bgId, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u16 param7); +void FUN_0200CCA4(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void FUN_0200CCF8(struct Window *window, BOOL copy_to_vram); +s32 FUN_0200CD60(s32 param0); +s32 FUN_0200CD64(s32 param0); +void FUN_0200CD68( + struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); +void FUN_0200CDD8(struct BgConfig *bgConfig, + u8 bgId, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u16 param7); +void FUN_0200D06C(struct Window *window, u32 fill_value, u32 palette_num); +void FUN_0200D0BC(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void FUN_0200D0E0(struct Window *window, BOOL param1); +void FUN_0200D148(u8 *param0, + u16 param1, + u16 param2, + u16 param3, + u16 param4, + u8 *param5, + u16 param6, + u16 param7, + u16 param8, + u16 param9, + u16 param10, + u16 param11); +void FUN_0200D18C(struct Window *window, u16 fill_value); +void FUN_0200D274( + struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); +void FUN_0200D300(struct BgConfig *bg_config, + u8 bg_id, + u16 numtiles, + u8 param3, + u8 param4, + u16 param5, + u32 heap_id); +void FUN_0200D378( + struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); +void FUN_0200D3B0(struct BgConfig *bgConfig, + u8 bgId, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u16 param7); +void FUN_0200D678(struct Window *window, u16 param1, u8 param2); +void FUN_0200D6F8(struct Window *window, BOOL param1, u16 param2, u8 param3, u8 param4); +void FUN_0200D7A0(struct Window *window, u32 param1, BOOL param2); +struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); +void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); +void FUN_0200DB7C(u32 param0, void *param1); +void FUN_0200DBE8(u32 param0, void *param1); +void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0); +void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0); +u8 *FUN_0200DC4C(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + u16 param6, + u8 param7, + s32 param8); +u8 *FUN_0200DCA4(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + struct Pokemon *param6, + s32 param7); +void FUN_0200DCF8(u32 param0, void *param1); +struct UnkStruct_0200CABC_2 *FUN_0200DD70( + struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4); +void FUN_0200DDAC(struct UnkStruct_0200CABC_2 *param0, u32 param1); +void FUN_0200DDD8(struct UnkStruct_0200CABC_2 *param0); +void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); +void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); +void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); +void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); +void FUN_0200DFD8(struct UnkStruct_0200CABC_2 *param0, u8 param1, u16 param2); +void FUN_0200E188(struct UnkStruct_0200CABC_2 *param0); + +#endif // POKEDIAMOND_UNK_0200CABC_H -- cgit v1.2.3 From 59f143d03b359f07c08da66c294fb048a33993ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 22 Aug 2021 10:02:23 +0200 Subject: remove old externs --- include/text_02054590.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/text_02054590.h b/include/text_02054590.h index 4d05260a..d55f0b80 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -15,6 +15,6 @@ u16 FUN_02054658(struct Window * window, struct String *str, struct Options *opt u16 DrawFieldMessage(struct Window * window, struct String *str, u8 fontId, u32 speed, u8 a4, s32 a5); u8 FUN_020546C8(u32 param0); void FUN_020546E0(struct BgConfig *param0, struct Window *param1, u32 param2, u32 param3); -void FUN_02054744(struct Window *param0, u32 param1, u32 param2); +void FUN_02054744(struct Window *param0, u32 param1, u16 param2); #endif // POKEDIAMOND_UNK_02054590_H -- cgit v1.2.3 From 99d4cb2b2addcd12e7775c7817c5ed7783cbe971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 22 Aug 2021 10:58:33 +0200 Subject: partially document unk_0200CABC --- include/unk_0200CABC.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/unk_0200CABC.h b/include/unk_0200CABC.h index 8f96a4b0..1dfba21d 100644 --- a/include/unk_0200CABC.h +++ b/include/unk_0200CABC.h @@ -10,7 +10,7 @@ struct UnkStruct_0200CABC_1 { struct Window *unk000; u8 unk004[9][0x80]; - u16 unk484; + u16 fillValue; u8 unk486; u8 unk487 : 7; u8 unk488 : 2; @@ -25,10 +25,10 @@ struct UnkStruct_0200CABC_2 u8 unk138[0x2a]; u16 unk162; u32 *unk164; - struct BgConfig *unk168; - u8 unk16c; - u8 unk16d; - u8 unk16e; + struct BgConfig *bgConfig; + u8 bgId; + u8 x; + u8 y; u8 unk16f; }; @@ -41,10 +41,10 @@ struct UnkStruct_0200CABC_3 }; u32 FUN_0200CABC(struct BgConfig *bgConfig, u32 layer, u32 numTiles, u32 param3, u32 heap_id); -u32 FUN_0200CAFC(void); +s32 FUN_0200CAFC(void); void FUN_0200CB00( struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); -void FUN_0200CB6C(struct BgConfig *bgConfig, +void DrawFrame1(struct BgConfig *bgConfig, u8 bgId, u8 param2, u8 param3, @@ -52,13 +52,13 @@ void FUN_0200CB6C(struct BgConfig *bgConfig, u8 param5, u8 param6, u16 param7); -void FUN_0200CCA4(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); -void FUN_0200CCF8(struct Window *window, BOOL copy_to_vram); +void DrawFrameAndWindow1(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow1(struct Window *window, BOOL copy_to_vram); s32 FUN_0200CD60(s32 param0); s32 FUN_0200CD64(s32 param0); void FUN_0200CD68( struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); -void FUN_0200CDD8(struct BgConfig *bgConfig, +void DrawFrame2(struct BgConfig *bgConfig, u8 bgId, u8 param2, u8 param3, @@ -66,10 +66,10 @@ void FUN_0200CDD8(struct BgConfig *bgConfig, u8 param5, u8 param6, u16 param7); -void FUN_0200D06C(struct Window *window, u32 fill_value, u32 palette_num); -void FUN_0200D0BC(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); -void FUN_0200D0E0(struct Window *window, BOOL param1); -void FUN_0200D148(u8 *param0, +void DrawWindowFrame2(struct Window *window, u32 fill_value, u32 palette_num); +void DrawFrameAndWindow2(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow2(struct Window *window, BOOL param1); +void BlitRect4Bit(u8 *param0, u16 param1, u16 param2, u16 param3, @@ -93,7 +93,7 @@ void FUN_0200D300(struct BgConfig *bg_config, u32 heap_id); void FUN_0200D378( struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); -void FUN_0200D3B0(struct BgConfig *bgConfig, +void DrawFrame3(struct BgConfig *bgConfig, u8 bgId, u8 param2, u8 param3, @@ -101,9 +101,9 @@ void FUN_0200D3B0(struct BgConfig *bgConfig, u8 param5, u8 param6, u16 param7); -void FUN_0200D678(struct Window *window, u16 param1, u8 param2); -void FUN_0200D6F8(struct Window *window, BOOL param1, u16 param2, u8 param3, u8 param4); -void FUN_0200D7A0(struct Window *window, u32 param1, BOOL param2); +void DrawWindowCorner(struct Window *window, u16 param1, u8 param2); +void DrawFrameAndWindow3(struct Window *window, BOOL param1, u16 param2, u8 param3, u8 param4); +void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL param2); struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); void FUN_0200DB7C(u32 param0, void *param1); @@ -136,7 +136,7 @@ void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); -void FUN_0200DFD8(struct UnkStruct_0200CABC_2 *param0, u8 param1, u16 param2); -void FUN_0200E188(struct UnkStruct_0200CABC_2 *param0); +void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 param1, u16 param2); +void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0); #endif // POKEDIAMOND_UNK_0200CABC_H -- cgit v1.2.3 From 08c88720e7d4a5520262468f70e62b99429c10cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 22 Aug 2021 11:02:04 +0200 Subject: rename unk_0200CABC to render_window --- include/render_window.h | 143 ++++++++++++++++++++++++++++++++++++++++++++++++ include/unk_0200CABC.h | 142 ----------------------------------------------- 2 files changed, 143 insertions(+), 142 deletions(-) create mode 100644 include/render_window.h delete mode 100644 include/unk_0200CABC.h (limited to 'include') diff --git a/include/render_window.h b/include/render_window.h new file mode 100644 index 00000000..385c61ad --- /dev/null +++ b/include/render_window.h @@ -0,0 +1,143 @@ +#ifndef POKEDIAMOND_UNK_0200CABC_H +#define POKEDIAMOND_UNK_0200CABC_H + +#include "global.h" +#include "bg_window.h" +#include "pokemon.h" +#include "unk_02008DEC.h" + +struct UnkStruct_0200CABC_1 +{ + struct Window *unk000; + u8 unk004[9][0x80]; + u16 fillValue; + u8 unk486; + u8 unk487 : 7; + u8 unk488 : 2; +}; + +struct UnkStruct_0200CABC_2 +{ + u32 unk000; + u8 unk004[0x12c]; + struct UnkStruct_02008DEC_1 *unk130; + struct UnkStruct_02008DEC_1 *unk134; + u8 unk138[0x2a]; + u16 unk162; + u32 *unk164; + struct BgConfig *bgConfig; + u8 bgId; + u8 x; + u8 y; + u8 unk16f; +}; + +struct UnkStruct_0200CABC_3 +{ + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; +}; + +u32 FUN_0200CABC(struct BgConfig *bgConfig, u32 layer, u32 numTiles, u32 param3, u32 heap_id); +s32 FUN_0200CAFC(void); +void FUN_0200CB00( + struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); +void DrawFrame1(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawFrameAndWindow1(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow1(struct Window *window, BOOL copy_to_vram); +s32 FUN_0200CD60(s32 param0); +s32 FUN_0200CD64(s32 param0); +void FUN_0200CD68( + struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); +void DrawFrame2(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawWindowFrame2(struct Window *window, u32 fill_value, u32 palette_num); +void DrawFrameAndWindow2(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow2(struct Window *window, BOOL param1); +void BlitRect4Bit(u8 *srcPixels, + u16 srcX, + u16 srcY, + u16 srcWidth, + u16 srcHeight, + u8 *dstPixels, + u16 dstWidth, + u16 dstHeight, + u16 dstX, + u16 dstY, + u16 width, + u16 height); +void FUN_0200D18C(struct Window *window, u16 fill_value); +void FUN_0200D274( + struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); +void FUN_0200D300(struct BgConfig *bg_config, + u8 bg_id, + u16 numtiles, + u8 param3, + u8 param4, + u16 param5, + u32 heap_id); +void FUN_0200D378( + struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); +void DrawFrame3(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawWindowCorner(struct Window *window, u16 fillValue, u8 paletteNum); +void DrawFrameAndWindow3( + struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4); +void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL copy_to_vram); +struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); +void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); +void FUN_0200DB7C(u32 param0, void *param1); +void FUN_0200DBE8(u32 param0, void *param1); +void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0); +void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0); +u8 *FUN_0200DC4C(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + u16 param6, + u8 param7, + s32 param8); +u8 *FUN_0200DCA4(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + struct Pokemon *param6, + s32 param7); +void FUN_0200DCF8(u32 param0, void *param1); +struct UnkStruct_0200CABC_2 *FUN_0200DD70( + struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4); +void FUN_0200DDAC(struct UnkStruct_0200CABC_2 *param0, u32 param1); +void FUN_0200DDD8(struct UnkStruct_0200CABC_2 *param0); +void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); +void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); +void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); +void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); +void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 paletteNum, u16 fillValue); +void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0); + +#endif // POKEDIAMOND_UNK_0200CABC_H diff --git a/include/unk_0200CABC.h b/include/unk_0200CABC.h deleted file mode 100644 index 1dfba21d..00000000 --- a/include/unk_0200CABC.h +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef POKEDIAMOND_UNK_0200CABC_H -#define POKEDIAMOND_UNK_0200CABC_H - -#include "global.h" -#include "bg_window.h" -#include "pokemon.h" -#include "unk_02008DEC.h" - -struct UnkStruct_0200CABC_1 -{ - struct Window *unk000; - u8 unk004[9][0x80]; - u16 fillValue; - u8 unk486; - u8 unk487 : 7; - u8 unk488 : 2; -}; - -struct UnkStruct_0200CABC_2 -{ - u32 unk000; - u8 unk004[0x12c]; - struct UnkStruct_02008DEC_1 *unk130; - struct UnkStruct_02008DEC_1 *unk134; - u8 unk138[0x2a]; - u16 unk162; - u32 *unk164; - struct BgConfig *bgConfig; - u8 bgId; - u8 x; - u8 y; - u8 unk16f; -}; - -struct UnkStruct_0200CABC_3 -{ - u32 unk00; - u32 unk04; - u32 unk08; - u32 unk0c; -}; - -u32 FUN_0200CABC(struct BgConfig *bgConfig, u32 layer, u32 numTiles, u32 param3, u32 heap_id); -s32 FUN_0200CAFC(void); -void FUN_0200CB00( - struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); -void DrawFrame1(struct BgConfig *bgConfig, - u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); -void DrawFrameAndWindow1(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); -void ClearFrameAndWindow1(struct Window *window, BOOL copy_to_vram); -s32 FUN_0200CD60(s32 param0); -s32 FUN_0200CD64(s32 param0); -void FUN_0200CD68( - struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); -void DrawFrame2(struct BgConfig *bgConfig, - u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); -void DrawWindowFrame2(struct Window *window, u32 fill_value, u32 palette_num); -void DrawFrameAndWindow2(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); -void ClearFrameAndWindow2(struct Window *window, BOOL param1); -void BlitRect4Bit(u8 *param0, - u16 param1, - u16 param2, - u16 param3, - u16 param4, - u8 *param5, - u16 param6, - u16 param7, - u16 param8, - u16 param9, - u16 param10, - u16 param11); -void FUN_0200D18C(struct Window *window, u16 fill_value); -void FUN_0200D274( - struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); -void FUN_0200D300(struct BgConfig *bg_config, - u8 bg_id, - u16 numtiles, - u8 param3, - u8 param4, - u16 param5, - u32 heap_id); -void FUN_0200D378( - struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); -void DrawFrame3(struct BgConfig *bgConfig, - u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); -void DrawWindowCorner(struct Window *window, u16 param1, u8 param2); -void DrawFrameAndWindow3(struct Window *window, BOOL param1, u16 param2, u8 param3, u8 param4); -void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL param2); -struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); -void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); -void FUN_0200DB7C(u32 param0, void *param1); -void FUN_0200DBE8(u32 param0, void *param1); -void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0); -void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0); -u8 *FUN_0200DC4C(struct BgConfig *bg_config, - u8 bg_id, - u8 param2, - u8 param3, - u8 param4, - u16 param5, - u16 param6, - u8 param7, - s32 param8); -u8 *FUN_0200DCA4(struct BgConfig *bg_config, - u8 bg_id, - u8 param2, - u8 param3, - u8 param4, - u16 param5, - struct Pokemon *param6, - s32 param7); -void FUN_0200DCF8(u32 param0, void *param1); -struct UnkStruct_0200CABC_2 *FUN_0200DD70( - struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4); -void FUN_0200DDAC(struct UnkStruct_0200CABC_2 *param0, u32 param1); -void FUN_0200DDD8(struct UnkStruct_0200CABC_2 *param0); -void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); -void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); -void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); -void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); -void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 param1, u16 param2); -void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0); - -#endif // POKEDIAMOND_UNK_0200CABC_H -- cgit v1.2.3