diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/global.h | 2 | ||||
-rw-r--r-- | include/constants/party_menu.h | 16 | ||||
-rw-r--r-- | include/constants/quest_log.h | 133 | ||||
-rw-r--r-- | include/constants/vars.h | 4 | ||||
-rw-r--r-- | include/event_scripts.h | 7 | ||||
-rw-r--r-- | include/global.h | 16 | ||||
-rw-r--r-- | include/item.h | 2 | ||||
-rw-r--r-- | include/party_menu.h | 2 | ||||
-rw-r--r-- | include/quest_log.h | 9 | ||||
-rw-r--r-- | include/quest_log_8150454.h | 8 | ||||
-rw-r--r-- | include/quest_log_815A008.h | 9 | ||||
-rw-r--r-- | include/quest_log_battle.h | 4 | ||||
-rw-r--r-- | include/quest_log_objects.h | 9 | ||||
-rw-r--r-- | include/quest_log_player.h | 8 | ||||
-rw-r--r-- | include/text.h | 15 |
15 files changed, 205 insertions, 39 deletions
diff --git a/include/constants/global.h b/include/constants/global.h index c11945ed8..420a9da71 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -32,6 +32,8 @@ #define BAG_TMHM_COUNT 58 #define BAG_BERRIES_COUNT 43 +#define QUEST_LOG_SCENE_COUNT 4 + #define MALE 0 #define FEMALE 1 diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index 9b5660f6f..28ce39cd3 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -31,6 +31,20 @@ #define TUTOR_MOVE_BLAST_BURN 16 #define TUTOR_MOVE_HYDRO_CANNON 17 +#define FIELD_MOVE_FLASH 0 +#define FIELD_MOVE_CUT 1 +#define FIELD_MOVE_FLY 2 +#define FIELD_MOVE_STRENGTH 3 +#define FIELD_MOVE_SURF 4 +#define FIELD_MOVE_ROCK_SMASH 5 +#define FIELD_MOVE_WATERFALL 6 +#define FIELD_MOVE_TELEPORT 7 +#define FIELD_MOVE_DIG 8 +#define FIELD_MOVE_MILK_DRINK 9 +#define FIELD_MOVE_SOFT_BOILED 10 +#define FIELD_MOVE_SWEET_SCENT 11 +#define FIELD_MOVE_END 12 + #define PARTY_LAYOUT_SINGLE 0 #define PARTY_LAYOUT_DOUBLE 1 #define PARTY_LAYOUT_MULTI 2 @@ -58,7 +72,7 @@ #define PARTY_ACTION_USE_ITEM 3 #define PARTY_ACTION_ABILITY_PREVENTS 4 #define PARTY_ACTION_GIVE_ITEM 5 -#define PARTY_ACTION_GIVE_PC_ITEM 6 // TODO: rename this one if necessary. Used for quest log. +#define PARTY_ACTION_GIVE_PC_ITEM 6 #define PARTY_ACTION_GIVE_MAILBOX_MAIL 7 #define PARTY_ACTION_SWITCH 8 #define PARTY_ACTION_SWITCHING 9 diff --git a/include/constants/quest_log.h b/include/constants/quest_log.h new file mode 100644 index 000000000..c1eaf3f07 --- /dev/null +++ b/include/constants/quest_log.h @@ -0,0 +1,133 @@ +#ifndef GUARD_CONSTANTS_QUEST_LOG_H +#define GUARD_CONSTANTS_QUEST_LOG_H + +// TODO: Name and use state constants +#define QL_STATE_1 1 +#define QL_STATE_2 2 +#define QL_STATE_3 3 + +#define QL_EVENT_0 0 // Null +#define QL_EVENT_1 1 // Null +#define QL_EVENT_2 2 // Null +#define QL_EVENT_SWITCHED_PARTY_ORDER 3 +#define QL_EVENT_USED_ITEM 4 +#define QL_EVENT_GAVE_HELD_ITEM 5 +#define QL_EVENT_GAVE_HELD_ITEM_BAG 6 +#define QL_EVENT_GAVE_HELD_ITEM_PC 7 +#define QL_EVENT_TOOK_HELD_ITEM 8 +#define QL_EVENT_SWAPPED_HELD_ITEM 9 +#define QL_EVENT_SWAPPED_HELD_ITEM_PC 10 +#define QL_EVENT_USED_PKMN_CENTER 11 +#define QL_EVENT_LINK_TRADED 12 +#define QL_EVENT_LINK_BATTLED_SINGLE 13 +#define QL_EVENT_LINK_BATTLED_DOUBLE 14 +#define QL_EVENT_LINK_BATTLED_MULTI 15 +#define QL_EVENT_USED_UNION_ROOM 16 +#define QL_EVENT_USED_UNION_ROOM_CHAT 17 +#define QL_EVENT_LINK_TRADED_UNION 18 +#define QL_EVENT_LINK_BATTLED_UNION 19 +#define QL_EVENT_SWITCHED_MONS_BETWEEN_BOXES 20 +#define QL_EVENT_SWITCHED_MONS_WITHIN_BOX 21 +#define QL_EVENT_SWITCHED_PARTY_MON_FOR_PC_MON 22 +#define QL_EVENT_MOVED_MON_BETWEEN_BOXES 23 +#define QL_EVENT_MOVED_MON_WITHIN_BOX 24 +#define QL_EVENT_WITHDREW_MON_PC 25 +#define QL_EVENT_DEPOSITED_MON_PC 26 +#define QL_EVENT_SWITCHED_MULTIPLE_MONS 27 +#define QL_EVENT_DEPOSITED_ITEM_PC 28 +#define QL_EVENT_WITHDREW_ITEM_PC 29 +#define QL_EVENT_DEFEATED_GYM_LEADER 30 +#define QL_EVENT_DEFEATED_WILD_MON 31 +#define QL_EVENT_DEFEATED_E4_MEMBER 32 +#define QL_EVENT_DEFEATED_CHAMPION 33 +#define QL_EVENT_DEFEATED_TRAINER 34 +#define QL_EVENT_DEPARTED 35 +#define QL_EVENT_USED_FIELD_MOVE 36 +#define QL_EVENT_BOUGHT_ITEM 37 +#define QL_EVENT_SOLD_ITEM 38 +#define QL_EVENT_39 39 // Null +#define QL_EVENT_OBTAINED_ITEM 40 +#define QL_EVENT_41 41 // Null +#define QL_EVENT_ARRIVED 42 + +#define QL_EVENT_USED_POKEMART QL_EVENT_BOUGHT_ITEM - 1 // Used as a start pos for QL_EVENT_BOUGHT_ITEM / QL_EVENT_SOLD_ITEM + +#define IS_LINK_QL_EVENT(event)((event) >= QL_EVENT_LINK_TRADED && (event) <= QL_EVENT_LINK_BATTLED_UNION) +#define IS_VALID_QL_EVENT(event)((event) >= QL_EVENT_SWITCHED_PARTY_ORDER && (event) <= QL_EVENT_ARRIVED) + +#define QL_LOCATION_HOME 0 +#define QL_LOCATION_OAKS_LAB 1 +#define QL_LOCATION_VIRIDIAN_GYM 2 +#define QL_LOCATION_LEAGUE_GATE_1 3 +#define QL_LOCATION_LEAGUE_GATE_2 4 +#define QL_LOCATION_VIRIDIAN_FOREST_1 5 +#define QL_LOCATION_VIRIDIAN_FOREST_2 6 +#define QL_LOCATION_PEWTER_MUSEUM 7 +#define QL_LOCATION_PEWTER_GYM 8 +#define QL_LOCATION_MT_MOON_1 9 +#define QL_LOCATION_MT_MOON_2 10 +#define QL_LOCATION_CERULEAN_GYM 11 +#define QL_LOCATION_BIKE_SHOP 12 +#define QL_LOCATION_BILLS_HOUSE 13 +#define QL_LOCATION_DAY_CARE 14 +#define QL_LOCATION_UNDERGROUND_PATH_1 15 +#define QL_LOCATION_UNDERGROUND_PATH_2 16 +#define QL_LOCATION_PKMN_FAN_CLUB 17 +#define QL_LOCATION_VERMILION_GYM 18 +#define QL_LOCATION_SS_ANNE 19 +#define QL_LOCATION_DIGLETTS_CAVE_1 20 +#define QL_LOCATION_DIGLETTS_CAVE_2 21 +#define QL_LOCATION_ROCK_TUNNEL_1 22 +#define QL_LOCATION_ROCK_TUNNEL_2 23 +#define QL_LOCATION_POWER_PLANT 24 +#define QL_LOCATION_PKMN_TOWER 25 +#define QL_LOCATION_VOLUNTEER_HOUSE 26 +#define QL_LOCATION_NAME_RATERS_HOUSE 27 +#define QL_LOCATION_UNDERGROUND_PATH_3 28 +#define QL_LOCATION_UNDERGROUND_PATH_4 29 +#define QL_LOCATION_CELADON_DEPT_STORE 30 +#define QL_LOCATION_CELADON_MANSION 31 +#define QL_LOCATION_GAME_CORNER 32 +#define QL_LOCATION_CELADON_GYM 33 +#define QL_LOCATION_CELADON_RESTAURANT 34 +#define QL_LOCATION_ROCKET_HIDEOUT 35 +#define QL_LOCATION_SAFARI_ZONE 36 +#define QL_LOCATION_FUCHSIA_GYM 37 +#define QL_LOCATION_WARDENS_HOME 38 +#define QL_LOCATION_FIGHTING_DOJO 39 +#define QL_LOCATION_SAFFRON_GYM 40 +#define QL_LOCATION_SILPH_CO 41 +#define QL_LOCATION_SEAFOAM_ISLANDS_1 42 +#define QL_LOCATION_SEAFOAM_ISLANDS_2 43 +#define QL_LOCATION_PKMN_MANSION 44 +#define QL_LOCATION_CINNABAR_GYM 45 +#define QL_LOCATION_CINNABAR_LAB 46 +#define QL_LOCATION_VICTORY_ROAD_1 47 +#define QL_LOCATION_VICTORY_ROAD_2 48 +#define QL_LOCATION_PKMN_LEAGUE 49 +#define QL_LOCATION_CERULEAN_CAVE 50 + +#define QL_DEPARTED_TOWN_BUILDING 0 +#define QL_DEPARTED_MUSEUM 1 +#define QL_DEPARTED_GAME_CORNER 2 +#define QL_DEPARTED_HOME 3 +#define QL_DEPARTED_OAKS_LAB 4 +#define QL_DEPARTED_GYM 5 +#define QL_DEPARTED_SAFARI_ZONE 6 +#define QL_DEPARTED_CAVE 7 +#define QL_DEPARTED_MISC_BUILDING_1 8 +#define QL_DEPARTED_MISC_BUILDING_2 9 + + +#define FANCLUB_MEMBER1 0 +#define FANCLUB_MEMBER2 1 +#define FANCLUB_MEMBER3 2 +#define FANCLUB_MEMBER4 3 +#define FANCLUB_MEMBER5 4 +#define FANCLUB_MEMBER6 5 +#define FANCLUB_MEMBER7 6 +#define FANCLUB_MEMBER8 7 + +#define NUM_TRAINER_FAN_CLUB_MEMBERS 8 + +#endif //GUARD_CONSTANTS_QUEST_LOG_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 54375e08e..043f5bc39 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -98,8 +98,8 @@ #define VAR_RESORT_GOREGEOUS_STEP_COUNTER 0x4035 #define VAR_RESORT_GORGEOUS_REQUESTED_MON 0x4036 #define VAR_PC_BOX_TO_SEND_MON 0x4037 -#define VAR_0x4038 0x4038 -#define VAR_0x4039 0x4039 +#define VAR_FANCLUB_FAN_COUNTER 0x4038 +#define VAR_FANCLUB_LOSE_FAN_TIMER 0x4039 #define VAR_ELEVATOR_FLOOR 0x403A #define VAR_RESORT_GORGEOUS_REWARD 0x403B #define VAR_0x403C 0x403C diff --git a/include/event_scripts.h b/include/event_scripts.h index 2fc045a37..b5e355484 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -375,8 +375,9 @@ extern const u8 SecretBase_RedCave1_Text_2751E1[]; extern const u8 SecretBase_RedCave1_Text_2754F6[]; extern const u8 SecretBase_RedCave1_Text_2758CC[]; -extern const u8 gUnknown_84178D0[]; -extern const u8 gUnknown_84178DA[]; +extern const u8 gText_LtSurge[]; +extern const u8 gText_Koga[]; +extern const u8 gText_PokemonCenter[]; // vs_seeker extern const u8 gUnknown_81C137C[]; extern const u8 gUnknown_81C13D6[]; @@ -1177,7 +1178,7 @@ extern const u8 gText_PlayerSavedTheGame[]; extern const u8 gText_DifferentGameFile[]; // script_menu -extern const u8 EventScript_1A7AE0[]; +extern const u8 EventScript_ReleaseEnd[]; extern const u8 CableClub_Text_TradeMonsUsingLinkCable[]; extern const u8 CableClub_Text_BattleUsingLinkCable[]; extern const u8 CableClub_Text_CancelSelectedItem[]; diff --git a/include/global.h b/include/global.h index 6386071c4..180a1e0a3 100644 --- a/include/global.h +++ b/include/global.h @@ -601,17 +601,17 @@ struct QuestLogObjectEvent struct QuestLog { /*0x0000*/ u8 unk_000; - /*0x0001*/ s8 unk_001; - /*0x0002*/ s8 unk_002; - /*0x0003*/ s8 unk_003; - /*0x0004*/ s16 unk_004; - /*0x0006*/ s16 unk_006; + /*0x0001*/ u8 mapGroup; + /*0x0002*/ u8 mapNum; + /*0x0003*/ u8 warpId; + /*0x0004*/ s16 x; + /*0x0006*/ s16 y; /*0x0008*/ struct QuestLogObjectEvent unk_008[OBJECT_EVENTS_COUNT]; // These arrays hold the game state for // playing back the quest log - /*0x0148*/ u8 flags[0x120]; - /*0x02c8*/ u16 vars[0x100]; + /*0x0148*/ u8 flags[FLAGS_COUNT]; + /*0x02c8*/ u16 vars[VARS_COUNT]; /*0x0468*/ struct QuestLogNPCData npcData[64]; /*0x0568*/ u16 unk_568[128]; /*0x0668*/ u16 end[0]; @@ -752,7 +752,7 @@ struct SaveBlock1 /*0x0EE0*/ u8 flags[FLAGS_COUNT]; /*0x1000*/ u16 vars[VARS_COUNT]; /*0x1200*/ u32 gameStats[NUM_GAME_STATS]; - /*0x1300*/ struct QuestLog questLog[4]; + /*0x1300*/ struct QuestLog questLog[QUEST_LOG_SCENE_COUNT]; /*0x2CA0*/ u16 easyChatProfile[6]; /*0x2CAC*/ u16 easyChatBattleStart[6]; /*0x2CB8*/ u16 easyChatBattleWon[6]; diff --git a/include/item.h b/include/item.h index 7a4279976..1d63c1a22 100644 --- a/include/item.h +++ b/include/item.h @@ -62,7 +62,7 @@ u8 ItemId_GetSecondaryId(u16 itemId); u16 itemid_get_market_price(u16 itemId); void ClearBag(void); void ClearPCItemSlots(void); -void sub_809A824(u16 itemId); +void TrySetObtainedItemQuestLogEvent(u16 itemId); bool8 AddBagItem(u16 itemId, u16 amount); void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket); diff --git a/include/party_menu.h b/include/party_menu.h index e2aee442f..cc8889137 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -49,7 +49,7 @@ void CB2_SelectBagItemToGive(void); void CB2_GiveHoldItem(void); bool8 FieldCallback_PrepareFadeInFromMenu(void); void CB2_ReturnToPartyMenuFromFlyMap(void); -void sub_8124C1C(const u8 *healLocCtrlData); +void SetUsedFlyQuestLogEvent(const u8 *healLocCtrlData); void CB2_ShowPartyMenuForItemUse(void); void ItemUseCB_Medicine(u8 taskId, TaskFunc func); void ItemUseCB_MedicineStep(u8 taskId, TaskFunc func); diff --git a/include/quest_log.h b/include/quest_log.h index 3dfd5f35c..eddd4c02a 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -3,6 +3,7 @@ #include "global.h" #include "quest_log_battle.h" +#include "constants/quest_log.h" struct UnkStruct_3005E90 { @@ -15,7 +16,7 @@ struct UnkStruct_3005E90 u8 unk_2; }; -extern u8 gUnknown_203ADFA; +extern u8 gQuestLogState; extern u8 gUnknown_3005E88; extern u16 sNumQuestLogs; extern struct UnkStruct_3005E90 gUnknown_3005E90; @@ -23,7 +24,7 @@ extern struct UnkStruct_203AE98 * gUnknown_3005E94; extern const u16 gUnknown_84566A8[]; void sub_8112720(u8); -void sub_8113550(u16, const u16 *); +void SetQuestLogEvent(u16, const u16 *); void sub_811539C(void); void sub_8115748(u16); u8 sub_8112CAC(void); @@ -35,8 +36,8 @@ u8 CreateHelpMessageWindow(void); void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode); void MapNamePopupWindowIdSetDummy(void); void sub_8111CF0(void); -void sub_811089C(void); -void sub_8113044(void); +void ResetQuestLog(void); +void ResetTrainerFanClub(void); void TrySetUpQuestLogScenes_ElseContinueFromSave(u8 taskId); void sub_8112450(void); void sub_8112364(void); diff --git a/include/quest_log_8150454.h b/include/quest_log_8150454.h deleted file mode 100644 index adf5d193e..000000000 --- a/include/quest_log_8150454.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef GUARD_QUEST_LOG_8150454_H -#define GUARD_QUEST_LOG_8150454_H - -#include "global.h" - -void sub_8150454(void); - -#endif //GUARD_QUEST_LOG_8150454_H diff --git a/include/quest_log_815A008.h b/include/quest_log_815A008.h deleted file mode 100644 index 72613be86..000000000 --- a/include/quest_log_815A008.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef GUARD_QUEST_LOG_815A008_H -#define GUARD_QUEST_LOG_815A008_H - -#include "global.h" - -void sub_815A008(struct QuestLog *); -void sub_815A1F8(struct QuestLog *, struct ObjectEventTemplate *); - -#endif //GUARD_QUEST_LOG_815A008_H diff --git a/include/quest_log_battle.h b/include/quest_log_battle.h index 45d656e14..3047bb56d 100644 --- a/include/quest_log_battle.h +++ b/include/quest_log_battle.h @@ -3,7 +3,7 @@ #include "global.h" -void sub_812BFDC(void); -void sub_812C224(void); +void TrySetQuestLogBattleEvent(void); +void TrySetQuestLogLinkBattleEvent(void); #endif // GUARD_QUEST_LOG_BATTLE_H diff --git a/include/quest_log_objects.h b/include/quest_log_objects.h new file mode 100644 index 000000000..e582ba27a --- /dev/null +++ b/include/quest_log_objects.h @@ -0,0 +1,9 @@ +#ifndef GUARD_QUEST_LOG_OBJECTS_H +#define GUARD_QUEST_LOG_OBJECTS_H + +#include "global.h" + +void SetQuestLogObjectEventsData(struct QuestLog *); +void sub_815A1F8(struct QuestLog *, struct ObjectEventTemplate *); + +#endif //GUARD_QUEST_LOG_OBJECTS_H diff --git a/include/quest_log_player.h b/include/quest_log_player.h new file mode 100644 index 000000000..9cde1747e --- /dev/null +++ b/include/quest_log_player.h @@ -0,0 +1,8 @@ +#ifndef GUARD_QUEST_LOG_PLAYER_H +#define GUARD_QUEST_LOG_PLAYER_H + +#include "global.h" + +void sub_8150454(void); + +#endif //GUARD_QUEST_LOG_PLAYER_H diff --git a/include/text.h b/include/text.h index e538123fd..cd059e0e5 100644 --- a/include/text.h +++ b/include/text.h @@ -95,6 +95,21 @@ #define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green #define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean +#define PLACEHOLDER_ID_UNKNOWN 0x0 +#define PLACEHOLDER_ID_PLAYER 0x1 +#define PLACEHOLDER_ID_STRING_VAR_1 0x2 +#define PLACEHOLDER_ID_STRING_VAR_2 0x3 +#define PLACEHOLDER_ID_STRING_VAR_3 0x4 +#define PLACEHOLDER_ID_KUN 0x5 +#define PLACEHOLDER_ID_RIVAL 0x6 +#define PLACEHOLDER_ID_VERSION 0x7 +#define PLACEHOLDER_ID_MAGMA 0x8 +#define PLACEHOLDER_ID_AQUA 0x9 +#define PLACEHOLDER_ID_MAXIE 0xA +#define PLACEHOLDER_ID_ARCHIE 0xB +#define PLACEHOLDER_ID_GROUDON 0xC +#define PLACEHOLDER_ID_KYOGRE 0xD + // battle placeholders are located in battle_message.h #define EXT_CTRL_CODE_COLOR 0x1 #define EXT_CTRL_CODE_HIGHLIGHT 0x2 |