From dd7e19107879f74d8f962a6a47d619470eaefbcd Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 16 Jul 2017 20:03:00 +0200 Subject: Battle4.C Changed labels: sub_801A02C = ItemBattleEffects sub_8015150 = GetBattleBank gUnknown_02024BEA = gRandomMove BattleBufferB = gBattleBufferB sub_8090D90 = GetNationalPokedexFlag sub_80151D4 = PressurePPLose ai_rate_move = AI_TypeCalc sub_801B928 = IsPokeDisobedient sub_801E3B4 = BankGetTurnOrder sub_801E3EC = SetMoveEffect sub_814A7FC = DestroyMenuCursor sub_8010B88 = SwitchInClearStructs sub_80325B8 = BattleMusicStop sub_8017718 = CantUseMove sub_8028350 = IsTwoTurnsMove b_feature_update_destiny_bond = DestinyBondFlagUpdate sub_801C108 = JumpIfMoveAffectedByProtect move_weather_interaction = AttacksThisTurn sub_8025E20 = ChangeStatBuffs sub_8020B54 = MoveValuesCleanUp --- include/global.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index e90fcdd0f..0f5bcde6d 100644 --- a/include/global.h +++ b/include/global.h @@ -43,6 +43,17 @@ fndec\ #define min(a, b) (a >= b ? a : b) #define max(a, b) (a <= b ? a : b) +// why does GF hate 2d arrays +#define MULTI_DIM_ARR(x, dim, y) ((x) * dim + (y)) + +// dim access enums +enum +{ + B_8 = 1, + B_16 = 2, + B_32 = 4 +}; + enum { VERSION_SAPPHIRE = 1, -- cgit v1.2.3 From 275344c3de95471b93a6a417e2178d93688887a9 Mon Sep 17 00:00:00 2001 From: drifloony Date: Tue, 18 Jul 2017 20:24:49 -0700 Subject: finish decompiling mystery_event_script --- include/global.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 73f73093d..f076274cc 100644 --- a/include/global.h +++ b/include/global.h @@ -557,6 +557,20 @@ struct LinkBattleRecord u16 draws; }; +struct RecordMixingGiftData +{ + u8 unk0; + u8 quantity; + u16 itemId; + u8 filler4[8]; +}; + +struct RecordMixingGift +{ + int checksum; + struct RecordMixingGiftData data; +}; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -642,7 +656,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x3144*/ struct Roamer roamer; /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; - /*0x3A7C*/ u8 filler_3A7C[0x10]; + /*0x3A7C*/ struct RecordMixingGift recordMixingGift; /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related }; @@ -674,7 +688,8 @@ struct SaveBlock2_Sub /*0x0000, 0x00A8*/ u8 filler_000[0x3D8]; /*0x03D8, 0x0480*/ u16 var_480; /*0x03DA, 0x0482*/ u16 var_482; - /*0x03DC, 0x0484*/ u8 filler_3DC[0xD0]; + /*0x03DC, 0x0484*/ u8 filler_3DC[0x14]; + /*0x03F0, 0x0498*/ u8 ereaderTrainer[0xBC]; /*0x04AC, 0x0554*/ u8 var_4AC; /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE[2]; -- cgit v1.2.3 From bfc4b338cbd3e78062c71ff6f72f821631277c1b Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 22 Aug 2017 17:34:42 -0500 Subject: rename some mauville man stuff --- include/global.h | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f076274cc..bb501ac93 100644 --- a/include/global.h +++ b/include/global.h @@ -447,11 +447,19 @@ struct MailStruct /*0x20*/ u16 itemId; }; -struct UnkMauvilleOldManStruct + +// Mauville Pokemon Center men + +struct MauvilleManCommon +{ + u8 id; +}; + +struct MauvilleManBard { - u8 unk_2D94; + u8 id; u8 unk_2D95; - /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; + /*0x2D96*/ u16 songLyrics[6]; /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; /*0x2DAE*/ u8 playerName[8]; /*0x2DB6*/ u8 filler_2DB6[0x3]; @@ -459,29 +467,43 @@ struct UnkMauvilleOldManStruct u8 unk_2DBD; }; /*size = 0x2C*/ -struct UnkMauvilleOldManStruct2 +struct MauvilleManHipster { - u8 filler0; + u8 id; u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u8 mauvilleOldMan_ecArray2[12]; - u8 fillerF[0x2]; -}; /*size = 0x2C*/ +}; -struct MauvilleOldManTrader +struct MauvilleManTrader { - u8 unk0; + u8 id; u8 unk1[4]; u8 unk5[4][11]; u8 unk31; }; +struct MauvilleManStoryteller +{ + u8 id; +}; + +struct MauvilleManGiddy +{ + u8 id; + u8 unk1; + u8 unk2; + u16 mauvilleOldMan_ecArray[10]; + u8 mauvilleOldMan_ecArray2[12]; + u8 fillerF[0x2]; +}; /*size = 0x2C*/ + typedef union OldMan { - struct UnkMauvilleOldManStruct oldMan1; - struct UnkMauvilleOldManStruct2 oldMan2; - struct MauvilleOldManTrader trader; + struct MauvilleManCommon common; + struct MauvilleManBard bard; + struct MauvilleManHipster hipster; + struct MauvilleManTrader trader; + struct MauvilleManStoryteller storyteller; + struct MauvilleManGiddy giddy; u8 filler[0x40]; } OldMan; -- cgit v1.2.3 From 4f36e317f9d2489e7c192f2a70c44a087e7d1998 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 23 Aug 2017 15:55:01 +0200 Subject: name labels --- include/global.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f076274cc..8f28c8c59 100644 --- a/include/global.h +++ b/include/global.h @@ -37,6 +37,7 @@ fndec\ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +#define POKEMON_SLOTS_NUMBER 412 #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -571,6 +572,11 @@ struct RecordMixingGift struct RecordMixingGiftData data; }; +// there should be enough flags for all 412 slots +// each slot takes up 8 flags +// if the value is not divisible by 8, we need to account for the reminder as well +#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -597,7 +603,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x640*/ struct ItemSlot bagPocket_TMHM[64]; /*0x740*/ struct ItemSlot bagPocket_Berries[46]; /*0x7F8*/ struct Pokeblock pokeblocks[40]; - /*0x938*/ u8 unk938[52]; // pokedex related + /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO]; /*0x96C*/ u16 berryBlenderRecords[3]; /*0x972*/ u8 filler_972[0x6]; /*0x978*/ u16 trainerRematchStepCounter; @@ -657,7 +663,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; /*0x3A7C*/ struct RecordMixingGift recordMixingGift; - /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related + /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO]; }; extern struct SaveBlock1 gSaveBlock1; @@ -679,8 +685,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[52]; - /*0x44*/ u8 seen[52]; + /*0x10*/ u8 owned[DEX_FLAGS_NO]; + /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; struct SaveBlock2_Sub -- cgit v1.2.3 From 988f5a685a36d3591d07f71ca778d988fb26720a Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 01:10:30 -0500 Subject: decompile up to sub_80F8598 --- include/global.h | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index bb501ac93..67039d50e 100644 --- a/include/global.h +++ b/include/global.h @@ -457,14 +457,14 @@ struct MauvilleManCommon struct MauvilleManBard { - u8 id; - u8 unk_2D95; - /*0x2D96*/ u16 songLyrics[6]; - /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; - /*0x2DAE*/ u8 playerName[8]; - /*0x2DB6*/ u8 filler_2DB6[0x3]; - /*0x2DB9*/ u8 playerTrainerId[4]; - u8 unk_2DBD; + /*0x00*/ u8 id; + /*0x01*/ u8 unk_2D95; + /*0x02*/ u16 songLyrics[6]; + /*0x0E*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x1A*/ u8 playerName[8]; + /*0x22*/ u8 filler_2DB6[0x3]; + /*0x25*/ u8 playerTrainerId[4]; + /*0x29*/ u8 unk_2DBD; }; /*size = 0x2C*/ struct MauvilleManHipster @@ -484,18 +484,24 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; + u8 unk1; + u8 filler2[2]; + u8 unk4[4]; + u8 unk8[4][7]; + u8 unk24[2][4]; // unknown length }; struct MauvilleManGiddy { - u8 id; - u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u8 mauvilleOldMan_ecArray2[12]; - u8 fillerF[0x2]; + /*0x00*/ u8 id; + /*0x01*/ u8 unk1; + /*0x02*/ u8 questionNum; + /*0x04*/ u16 mauvilleOldMan_ecArray[10]; + /*0x18*/ u8 questionList[12]; + /*0x24*/ u8 fillerF[0x2]; }; /*size = 0x2C*/ + typedef union OldMan { struct MauvilleManCommon common; -- cgit v1.2.3 From a277e60789d9ea78fe03a4bcded2edf7b91e548e Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 13:40:03 -0500 Subject: finish decompiling mauville_old_man --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 67039d50e..f172c12a3 100644 --- a/include/global.h +++ b/include/global.h @@ -484,7 +484,7 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; - u8 unk1; + bool8 unk1; u8 filler2[2]; u8 unk4[4]; u8 unk8[4][7]; -- cgit v1.2.3 From 1ae38be0a46d1d901a2d9e5bb22938a0cecf6b7f Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 15:19:55 -0500 Subject: do some renaming and reorganizing --- include/global.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f172c12a3..32a6beb2b 100644 --- a/include/global.h +++ b/include/global.h @@ -464,7 +464,7 @@ struct MauvilleManBard /*0x1A*/ u8 playerName[8]; /*0x22*/ u8 filler_2DB6[0x3]; /*0x25*/ u8 playerTrainerId[4]; - /*0x29*/ u8 unk_2DBD; + /*0x29*/ bool8 hasChangedSong; }; /*size = 0x2C*/ struct MauvilleManHipster @@ -502,7 +502,7 @@ struct MauvilleManGiddy }; /*size = 0x2C*/ -typedef union OldMan +union MauvilleMan { struct MauvilleManCommon common; struct MauvilleManBard bard; @@ -511,7 +511,7 @@ typedef union OldMan struct MauvilleManStoryteller storyteller; struct MauvilleManGiddy giddy; u8 filler[0x40]; -} OldMan; +}; struct Unk_SB_Access_Struct1 { @@ -668,7 +668,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 unk2D8C[4]; /*0x2D90*/ u8 filler_2D90[0x4]; - /*0x2D94*/ OldMan oldMan; + /*0x2D94*/ union MauvilleMan mauvilleMan; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; -- cgit v1.2.3 From 4a583141ba483dcd49f49760a29c403c5d259efb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 15:33:07 -0500 Subject: more labeling and fix German build --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 32a6beb2b..6c0fc28ef 100644 --- a/include/global.h +++ b/include/global.h @@ -460,7 +460,7 @@ struct MauvilleManBard /*0x00*/ u8 id; /*0x01*/ u8 unk_2D95; /*0x02*/ u16 songLyrics[6]; - /*0x0E*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x0E*/ u16 temporaryLyrics[6]; /*0x1A*/ u8 playerName[8]; /*0x22*/ u8 filler_2DB6[0x3]; /*0x25*/ u8 playerTrainerId[4]; -- cgit v1.2.3 From 1b715eb7ba38ff408acf5e5e0a9ea88642f912bb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 16:52:49 -0500 Subject: more Mauville man labeling --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 6c0fc28ef..0e0c29045 100644 --- a/include/global.h +++ b/include/global.h @@ -478,7 +478,7 @@ struct MauvilleManTrader u8 id; u8 unk1[4]; u8 unk5[4][11]; - u8 unk31; + bool8 alreadyTraded; }; struct MauvilleManStoryteller @@ -487,7 +487,7 @@ struct MauvilleManStoryteller bool8 unk1; u8 filler2[2]; u8 unk4[4]; - u8 unk8[4][7]; + u8 playerNames[4][7]; u8 unk24[2][4]; // unknown length }; -- cgit v1.2.3 From 670255f950a98f8a5cc636a20682b9ed42a31b21 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 19:54:39 -0500 Subject: fix build for real this time --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 0e0c29045..875ea7815 100644 --- a/include/global.h +++ b/include/global.h @@ -486,9 +486,9 @@ struct MauvilleManStoryteller u8 id; bool8 unk1; u8 filler2[2]; - u8 unk4[4]; - u8 playerNames[4][7]; - u8 unk24[2][4]; // unknown length + u8 gameStatIDs[4]; + u8 trainerNames[4][7]; + u8 unk24[4][4]; }; struct MauvilleManGiddy -- cgit v1.2.3 From 8c57ef0fad270bc795d0b64a75d96fafc0f63513 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 20:50:39 -0500 Subject: finish labeling script --- include/global.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 875ea7815..7c673f13e 100644 --- a/include/global.h +++ b/include/global.h @@ -494,11 +494,10 @@ struct MauvilleManStoryteller struct MauvilleManGiddy { /*0x00*/ u8 id; - /*0x01*/ u8 unk1; + /*0x01*/ u8 taleCounter; /*0x02*/ u8 questionNum; - /*0x04*/ u16 mauvilleOldMan_ecArray[10]; + /*0x04*/ u16 randomWords[10]; /*0x18*/ u8 questionList[12]; - /*0x24*/ u8 fillerF[0x2]; }; /*size = 0x2C*/ -- cgit v1.2.3 From b6ea4d9a77cdb6b416d3dd94eef68ce8a56cd4eb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 21:18:07 -0500 Subject: label more stuff in mauville_old_man.c --- include/global.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 7c673f13e..ab7d43955 100644 --- a/include/global.h +++ b/include/global.h @@ -458,7 +458,6 @@ struct MauvilleManCommon struct MauvilleManBard { /*0x00*/ u8 id; - /*0x01*/ u8 unk_2D95; /*0x02*/ u16 songLyrics[6]; /*0x0E*/ u16 temporaryLyrics[6]; /*0x1A*/ u8 playerName[8]; @@ -470,7 +469,7 @@ struct MauvilleManBard struct MauvilleManHipster { u8 id; - u8 unk1; + bool8 alreadySpoken; }; struct MauvilleManTrader @@ -484,11 +483,11 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; - bool8 unk1; + bool8 alreadyRecorded; u8 filler2[2]; u8 gameStatIDs[4]; u8 trainerNames[4][7]; - u8 unk24[4][4]; + u8 statValues[4][4]; }; struct MauvilleManGiddy @@ -509,7 +508,7 @@ union MauvilleMan struct MauvilleManTrader trader; struct MauvilleManStoryteller storyteller; struct MauvilleManGiddy giddy; - u8 filler[0x40]; + u8 filler[0x40]; // needed to pad out the struct }; struct Unk_SB_Access_Struct1 -- cgit v1.2.3 From f25a1e6106fef11318301666359ee5ec2d45677f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 29 Aug 2017 22:14:29 -0400 Subject: Daycare_SendPokemon --- include/global.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f076274cc..d5535a9c7 100644 --- a/include/global.h +++ b/include/global.h @@ -534,18 +534,32 @@ struct GabbyAndTyData /*2b1b*/ u8 valB_5:3; }; -struct RecordMixing_UnknownStructSub +struct DayCareMail { - u32 unk0; - u8 data[0x34]; - //u8 data[0x38]; + /*0x00*/ struct MailStruct mail; + /*0x24*/ u8 names[19]; }; -struct RecordMixing_UnknownStruct -{ - struct RecordMixing_UnknownStructSub data[2]; +struct DayCareMailExtra { u32 unk70; - u16 unk74[0x2]; + u16 unk74[2]; +}; + +struct DayCareMailEtc +{ + struct DayCareMail data[2]; + union { + struct DayCareMailExtra rc; + u32 unk70[2]; + } extra; +}; + +struct DayCareData { + struct BoxPokemon mons[2]; + struct DayCareMailEtc mail; + u8 unk_118[2]; + u8 unk_11a; + u8 unk_11b; }; struct LinkBattleRecord @@ -644,11 +658,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C; - /*0x30AC*/ u8 filler_30B4[0x2]; - /*0x30B6*/ u8 filler_30B6; - /*0x30B7*/ u8 filler_30B7[1]; + /*0x2F9C*/ struct DayCareData daycareData; /*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5]; /*0x3108*/ u8 filler_3108[8]; /*0x3110*/ u8 giftRibbons[7]; -- cgit v1.2.3 From 36bafa9f9fad1efd7baead651c7f357f6a832023 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 29 Aug 2017 22:41:26 -0400 Subject: sub_8041570 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index d5535a9c7..3f30544a8 100644 --- a/include/global.h +++ b/include/global.h @@ -550,7 +550,7 @@ struct DayCareMailEtc struct DayCareMail data[2]; union { struct DayCareMailExtra rc; - u32 unk70[2]; + u32 steps[2]; } extra; }; -- cgit v1.2.3 From 885aa7d1b875de62569319f28a5d2836d5c366e6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 30 Aug 2017 08:15:03 -0400 Subject: unref_sub_8041824 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 3f30544a8..ee54007b2 100644 --- a/include/global.h +++ b/include/global.h @@ -557,7 +557,7 @@ struct DayCareMailEtc struct DayCareData { struct BoxPokemon mons[2]; struct DayCareMailEtc mail; - u8 unk_118[2]; + u16 unk_118; u8 unk_11a; u8 unk_11b; }; -- cgit v1.2.3 From 97d9399be794f6a94137a1945af52ef1e26de4a7 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 30 Aug 2017 16:02:46 -0400 Subject: Restore previously-decompiled functions; make static what should be static --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index ee54007b2..82dcd1a53 100644 --- a/include/global.h +++ b/include/global.h @@ -557,7 +557,7 @@ struct DayCareMailEtc struct DayCareData { struct BoxPokemon mons[2]; struct DayCareMailEtc mail; - u16 unk_118; + u16 eggPersonalityLo; u8 unk_11a; u8 unk_11b; }; -- cgit v1.2.3 From a1c5f2e6bad52af49dbf7de48ac78d4015dd073f Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 30 Aug 2017 16:42:05 -0400 Subject: Nonmatching sub_80421B0 --- include/global.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 82dcd1a53..b2b4ffcc4 100644 --- a/include/global.h +++ b/include/global.h @@ -540,26 +540,30 @@ struct DayCareMail /*0x24*/ u8 names[19]; }; -struct DayCareMailExtra { +struct DayCareMailExtra_RecordMixing { u32 unk70; u16 unk74[2]; }; +struct DayCareMailExtra_EggData { + u32 steps[2]; + u16 personalityLo; + u8 unk_11a; +}; + struct DayCareMailEtc { struct DayCareMail data[2]; union { - struct DayCareMailExtra rc; - u32 steps[2]; + struct DayCareMailExtra_RecordMixing rc; + struct DayCareMailExtra_EggData egg; + u8 misc[12]; } extra; }; struct DayCareData { struct BoxPokemon mons[2]; struct DayCareMailEtc mail; - u16 eggPersonalityLo; - u8 unk_11a; - u8 unk_11b; }; struct LinkBattleRecord -- cgit v1.2.3 From b7f9479bdb37f12774f7e31a934a3dd5e8f821e0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 30 Aug 2017 19:04:07 -0400 Subject: Fix building --- include/global.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index b2b4ffcc4..0a415e3e6 100644 --- a/include/global.h +++ b/include/global.h @@ -551,14 +551,17 @@ struct DayCareMailExtra_EggData { u8 unk_11a; }; +struct RecordMixingDayCareMail +{ + struct DayCareMail data[2]; + u32 unk70; + u16 unk74[2]; +}; + struct DayCareMailEtc { struct DayCareMail data[2]; - union { - struct DayCareMailExtra_RecordMixing rc; - struct DayCareMailExtra_EggData egg; - u8 misc[12]; - } extra; + struct DayCareMailExtra_EggData egg; }; struct DayCareData { -- cgit v1.2.3 From 1b2096556ae0dcbc31723e782cfec354a4a94117 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 4 Sep 2017 23:05:24 -0400 Subject: sub_804AF10 and sub_804AF84 --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f076274cc..07ea6a410 100644 --- a/include/global.h +++ b/include/global.h @@ -651,8 +651,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x30B7*/ u8 filler_30B7[1]; /*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5]; /*0x3108*/ u8 filler_3108[8]; - /*0x3110*/ u8 giftRibbons[7]; - /*0x3117*/ u8 filler_311B[0x2D]; + /*0x3110*/ u8 giftRibbons[11]; + /*0x3117*/ u8 filler_311B[0x29]; /*0x3144*/ struct Roamer roamer; /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; -- cgit v1.2.3 From a185f8a26dc5e5a04908c272ab54bede7af8a10c Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 12 Sep 2017 16:53:04 -0500 Subject: lots more relabeling --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index ab7d43955..79269937f 100644 --- a/include/global.h +++ b/include/global.h @@ -608,7 +608,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2C*/ u16 battleMusic; /*0x2E*/ u8 weather; /*0x2F*/ u8 filler_2F; - /*0x30*/ u8 flashUsed; + /*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest /*0x32*/ u16 mapDataId; /*0x34*/ u16 mapView[0x100]; /*0x234*/ u8 playerPartyCount; -- cgit v1.2.3 From cdc5d1b683dd89e80d3daaf13965cae916ed9f6c Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sat, 23 Sep 2017 23:49:37 -0500 Subject: do some scrcmd/overworld labeling --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 79269937f..2d049a412 100644 --- a/include/global.h +++ b/include/global.h @@ -603,7 +603,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x04*/ struct WarpData location; /*0x0C*/ struct WarpData warp1; /*0x14*/ struct WarpData warp2; - /*0x1C*/ struct WarpData warp3; + /*0x1C*/ struct WarpData lastHealLocation; /*0x24*/ struct WarpData warp4; /*0x2C*/ u16 battleMusic; /*0x2E*/ u8 weather; -- cgit v1.2.3 From 0c234d0929a6f7bb41277275f06abae1b3d7e823 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 24 Sep 2017 12:12:53 -0500 Subject: more renaming --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2d049a412..240f58ece 100644 --- a/include/global.h +++ b/include/global.h @@ -605,7 +605,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x14*/ struct WarpData warp2; /*0x1C*/ struct WarpData lastHealLocation; /*0x24*/ struct WarpData warp4; - /*0x2C*/ u16 battleMusic; + /*0x2C*/ u16 savedMusic; /*0x2E*/ u8 weather; /*0x2F*/ u8 filler_2F; /*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest -- cgit v1.2.3 From 9f736e58afff3e3e3be1398ceebac93614ec70e1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 29 Sep 2017 22:25:20 -0400 Subject: Rename daycare structs to be slightly less insensible --- include/global.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 43a105162..ac28507e8 100644 --- a/include/global.h +++ b/include/global.h @@ -562,16 +562,11 @@ struct GabbyAndTyData struct DayCareMail { - /*0x00*/ struct MailStruct mail; + /*0x00*/ struct MailStruct message; /*0x24*/ u8 names[19]; }; -struct DayCareMailExtra_RecordMixing { - u32 unk70; - u16 unk74[2]; -}; - -struct DayCareMailExtra_EggData { +struct DayCareStepCountersEtc { u32 steps[2]; u16 personalityLo; u8 unk_11a; @@ -579,20 +574,20 @@ struct DayCareMailExtra_EggData { struct RecordMixingDayCareMail { - struct DayCareMail data[2]; + struct DayCareMail mail[2]; u32 unk70; u16 unk74[2]; }; -struct DayCareMailEtc +struct DayCareMisc { - struct DayCareMail data[2]; - struct DayCareMailExtra_EggData egg; + struct DayCareMail mail[2]; + struct DayCareStepCountersEtc countersEtc; }; struct DayCareData { struct BoxPokemon mons[2]; - struct DayCareMailEtc mail; + struct DayCareMisc misc; }; struct LinkBattleRecord -- cgit v1.2.3