From ecf2097abb1481109578b7b8260fd40606f27abe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 14 Aug 2019 23:38:42 -0400 Subject: initial event_scripts documentation --- include/constants/flags.h | 2 +- include/event_scripts.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/constants/flags.h b/include/constants/flags.h index 7aa5c3ed3..3dbf38780 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -367,7 +367,7 @@ #define FLAG_MET_SLATEPORT_FANCLUB_CHAIRMAN 0x156 #define FLAG_MET_BATTLE_FRONTIER_BETTOR 0x157 #define FLAG_ENABLE_MR_STONE_POKENAV 0x158 -#define FLAG_OLDALE_NURSE_MENTIONS_GOLD_CARD 0x159 +#define FLAG_NURSE_MENTIONS_GOLD_CARD 0x159 #define FLAG_MET_FRONTIER_BEAUTY_MOVE_TUTOR 0x15A #define FLAG_MET_FRONTIER_SWIMMER_MOVE_TUTOR 0x15B diff --git a/include/event_scripts.h b/include/event_scripts.h index fc0b3cde0..0cb09f9e1 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1,8 +1,8 @@ #ifndef GUARD_EVENT_SCRIPTS_H #define GUARD_EVENT_SCRIPTS_H -extern const u8 gUnknown_0823B4E8[]; -extern const u8 gUnknown_0823B5E9[]; +extern const u8 EventScript_SecretBasePCCancel[]; +extern const u8 EventScript_SecretBasePCStart[]; extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_TryGetTrainerScript[]; extern const u8 EventScript_275BB7[]; -- cgit v1.2.3 From 8c6b5648d4186022e674e5782aad01d3e8dd32e6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Sep 2019 16:16:21 -0400 Subject: document secret_base_1.inc --- include/event_scripts.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/event_scripts.h b/include/event_scripts.h index 0cb09f9e1..9b294f7cd 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1,8 +1,6 @@ #ifndef GUARD_EVENT_SCRIPTS_H #define GUARD_EVENT_SCRIPTS_H -extern const u8 EventScript_SecretBasePCCancel[]; -extern const u8 EventScript_SecretBasePCStart[]; extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_TryGetTrainerScript[]; extern const u8 EventScript_275BB7[]; @@ -15,8 +13,6 @@ extern const u8 EventScript_TryDoDoubleTrainerBattle[]; extern const u8 EventScript_TryDoNormalTrainerBattle[]; extern const u8 EventScript_TryDoDoubleRematchBattle[]; extern const u8 EventScript_TryDoRematchBattle[]; -extern const u8 SecretBase_EventScript_DollInteract[]; -extern const u8 SecretBase_EventScript_CushionInteract[]; extern const u8 BerryTreeScript[]; @@ -527,8 +523,6 @@ extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900CB[]; extern const u8 EventScript_PlayerPCMale[]; extern const u8 EventScript_PlayerPCFemale[]; -extern const u8 EventScript_SecretBasePC[]; -extern const u8 EventScript_RecordMixingSecretBasePC[]; extern const u8 EventScript_PC[]; extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_HiddenItemScript[]; @@ -552,8 +546,16 @@ extern const u8 EventScript_WirelessBoxResults[]; extern const u8 EventScript_CableBoxResults[]; extern const u8 EventScript_Questionnaire[]; extern const u8 EventScript_TrainerHillTimer[]; -extern const u8 EventScript_SecretBaseSandOrnament[]; -extern const u8 EventScript_SecretBaseShieldOrToyTV[]; + +extern const u8 SecretBase_EventScript_PC[]; +extern const u8 SecretBase_EventScript_RecordMixingPC[]; +extern const u8 SecretBase_EventScript_PCCancel[]; +extern const u8 SecretBase_EventScript_ShowRegisterMenu[]; +extern const u8 SecretBase_EventScript_SandOrnament[]; +extern const u8 SecretBase_EventScript_ShieldOrToyTV[]; +extern const u8 SecretBase_EventScript_DollInteract[]; +extern const u8 SecretBase_EventScript_CushionInteract[]; + extern const u8 EventScript_UseSurf[]; extern const u8 EventScript_UseWaterfall[]; extern const u8 EventScript_CannotUseWaterfall[]; -- cgit v1.2.3 From 9fbcd552de64511dd45c1306b5fcb9bd789b3ea4 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 6 Sep 2019 02:12:00 -0400 Subject: document remainder of secret_base scripts, delete unneeded scripts.incs --- include/constants/global.h | 3 +++ include/event_scripts.h | 56 +++++++++++++++++++++++----------------------- include/global.h | 10 ++++----- 3 files changed, 35 insertions(+), 34 deletions(-) (limited to 'include') diff --git a/include/constants/global.h b/include/constants/global.h index a862ecad2..0507f22cc 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -46,11 +46,14 @@ #define BAG_TMHM_COUNT 64 #define BAG_BERRIES_COUNT 46 #define EVENT_OBJECT_TEMPLATES_COUNT 64 +#define DECOR_MAX_SECRET_BASE 16 +#define DECOR_MAX_PLAYERS_HOUSE 12 #define PYRAMID_BAG_ITEMS_COUNT 10 #define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. #define TRAINER_ID_LENGTH 4 +#define PARTY_SIZE 6 // string lengths #define ITEM_NAME_LENGTH 14 diff --git a/include/event_scripts.h b/include/event_scripts.h index 9b294f7cd..02265413e 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -3,10 +3,6 @@ extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_TryGetTrainerScript[]; -extern const u8 EventScript_275BB7[]; -extern const u8 EventScript_275D0C[]; -extern const u8 EventScript_275D1F[]; -extern const u8 EventScript_275D2E[]; extern const u8 EventScript_271354[]; extern const u8 EventScript_DoTainerBattle[]; extern const u8 EventScript_TryDoDoubleTrainerBattle[]; @@ -364,16 +360,16 @@ extern const u8 gPokeNewsTextLilycove_Ending[]; extern const u8 gPokeNewsTextBlendMaster_Upcoming[]; extern const u8 gPokeNewsTextBlendMaster_Ongoing[]; extern const u8 gPokeNewsTextBlendMaster_Ending[]; -extern const u8 SecretBase_RedCave1_Text_274966[]; -extern const u8 SecretBase_RedCave1_Text_274D13[]; -extern const u8 SecretBase_RedCave1_Text_274FFE[]; -extern const u8 SecretBase_RedCave1_Text_275367[]; -extern const u8 SecretBase_RedCave1_Text_2756C7[]; -extern const u8 SecretBase_RedCave1_Text_274B24[]; -extern const u8 SecretBase_RedCave1_Text_274E75[]; -extern const u8 SecretBase_RedCave1_Text_2751E1[]; -extern const u8 SecretBase_RedCave1_Text_2754F6[]; -extern const u8 SecretBase_RedCave1_Text_2758CC[]; +extern const u8 SecretBase_Text_Trainer0Defeated[]; +extern const u8 SecretBase_Text_Trainer1Defeated[]; +extern const u8 SecretBase_Text_Trainer2Defeated[]; +extern const u8 SecretBase_Text_Trainer3Defeated[]; +extern const u8 SecretBase_Text_Trainer4Defeated[]; +extern const u8 SecretBase_Text_Trainer5Defeated[]; +extern const u8 SecretBase_Text_Trainer6Defeated[]; +extern const u8 SecretBase_Text_Trainer7Defeated[]; +extern const u8 SecretBase_Text_Trainer8Defeated[]; +extern const u8 SecretBase_Text_Trainer9Defeated[]; extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[]; @@ -526,7 +522,6 @@ extern const u8 EventScript_PlayerPCFemale[]; extern const u8 EventScript_PC[]; extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_HiddenItemScript[]; -extern const u8 EventScript_2759F1[]; extern const u8 EventScript_TV[]; extern const u8 EventScript_ClosedSootopolisDoor[]; extern const u8 SkyPillar_Outside_EventScript_2393F9[]; @@ -546,16 +541,6 @@ extern const u8 EventScript_WirelessBoxResults[]; extern const u8 EventScript_CableBoxResults[]; extern const u8 EventScript_Questionnaire[]; extern const u8 EventScript_TrainerHillTimer[]; - -extern const u8 SecretBase_EventScript_PC[]; -extern const u8 SecretBase_EventScript_RecordMixingPC[]; -extern const u8 SecretBase_EventScript_PCCancel[]; -extern const u8 SecretBase_EventScript_ShowRegisterMenu[]; -extern const u8 SecretBase_EventScript_SandOrnament[]; -extern const u8 SecretBase_EventScript_ShieldOrToyTV[]; -extern const u8 SecretBase_EventScript_DollInteract[]; -extern const u8 SecretBase_EventScript_CushionInteract[]; - extern const u8 EventScript_UseSurf[]; extern const u8 EventScript_UseWaterfall[]; extern const u8 EventScript_CannotUseWaterfall[]; @@ -575,15 +560,30 @@ extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224175[]; extern const u8 SSTidalCorridor_EventScript_23C050[]; extern const u8 gUnknown_082A8350[]; +// Secret Base +extern const u8 SecretBase_EventScript_PC[]; +extern const u8 SecretBase_EventScript_RecordMixingPC[]; +extern const u8 SecretBase_EventScript_PCCancel[]; +extern const u8 SecretBase_EventScript_ShowRegisterMenu[]; +extern const u8 SecretBase_EventScript_SandOrnament[]; +extern const u8 SecretBase_EventScript_ShieldOrToyTV[]; +extern const u8 SecretBase_EventScript_DollInteract[]; +extern const u8 SecretBase_EventScript_CushionInteract[]; +extern const u8 SecretBase_EventScript_CheckEntrance[]; +extern const u8 SecretBase_EventScript_Enter[]; +extern const u8 SecretBase_EventScript_InitDecorations[]; +extern const u8 SecretBase_EventScript_PutAwayDecoration[]; +extern const u8 SecretBase_EventScript_SetDecoration[]; + // Battle Pyramid. extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[]; extern const u8 BattlePyramid_TrainerBattle[]; extern const u8 BattlePyramid_FindItemBall[]; // fldeff misc -extern const u8 EventScript_275A86[]; -extern const u8 EventScript_275ADF[]; -extern const u8 EventScript_275B38[]; +extern const u8 SecretBase_EventScript_CaveUseSecretPower[]; +extern const u8 SecretBase_EventScript_TreeUseSecretPower[]; +extern const u8 SecretBase_EventScript_ShrubUseSecretPower[]; // trainer hill extern const u8 EventScript_2C83F0[]; diff --git a/include/global.h b/include/global.h index a82fe5861..d6d18a3ab 100644 --- a/include/global.h +++ b/include/global.h @@ -63,8 +63,6 @@ // Converts a Q24.8 fixed-point format number to a regular integer #define Q_24_8_TO_INT(n) ((int)((n) >> 8)) -#define PARTY_SIZE 6 - #define POKEMON_SLOTS_NUMBER 412 #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -500,8 +498,8 @@ struct SecretBase /*0x1AAA*/ u16 numSecretBasesReceived; /*0x1AAC*/ u8 numTimesEntered; /*0x1AAD*/ u8 sbr_field_11; - /*0x1AAE*/ u8 decorations[16]; - /*0x1ABE*/ u8 decorationPositions[16]; + /*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE]; + /*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE]; /*0x1AD0*/ struct SecretBaseParty party; }; @@ -925,8 +923,8 @@ struct SaveBlock1 /*0x159C*/ u32 gameStats[NUM_GAME_STATS]; /*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT]; /*0x1A9C*/ struct SecretBase secretBases[SECRET_BASES_COUNT]; - /*0x271C*/ u8 playerRoomDecor[12]; - /*0x2728*/ u8 playerRoomDecorPos[12]; + /*0x271C*/ u8 playerRoomDecor[DECOR_MAX_PLAYERS_HOUSE]; + /*0x2728*/ u8 playerRoomDecorPos[DECOR_MAX_PLAYERS_HOUSE]; /*0x2734*/ u8 decorDesk[10]; /*0x????*/ u8 decorChair[10]; /*0x????*/ u8 decorPlant[10]; -- cgit v1.2.3 From de6e1e9ecf72f9ffad23d83a3cfccdbabd2b239b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 23 Sep 2019 00:36:49 -0400 Subject: Use multi constants from merge --- include/constants/script_menu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h index b7ec908c1..928ca00e0 100644 --- a/include/constants/script_menu.h +++ b/include/constants/script_menu.h @@ -13,8 +13,8 @@ #define MULTI_ENTERINFO 2 #define MULTI_CONTEST_INFO 3 #define MULTI_CONTEST_TYPE 4 -#define MULTI_DECOR_NOREGISTRY 5 -#define MULTI_DECOR_REGISTRY 6 +#define MULTI_BASE_PC_NO_REGISTRY 5 +#define MULTI_BASE_PC_WITH_REGISTRY 6 #define MULTI_REGISTER_MENU 7 #define MULTI_SSTIDAL_LILYCOVE 8 // Exit only, populated by CreateLilycoveSSTidalMultichoice #define MULTI_UNUSED_9 9 -- cgit v1.2.3