From a60d6675d7f802215150e6df4c771b965e5df3dc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 28 Apr 2021 18:35:53 -0400 Subject: Trainer tower sets to C --- include/cereader_tool.h | 4 ++-- include/constants/trainer_tower.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cereader_tool.h b/include/cereader_tool.h index dd1866fb3..c7d1fcca9 100644 --- a/include/cereader_tool.h +++ b/include/cereader_tool.h @@ -8,7 +8,7 @@ struct TrainerTowerTrainer { /* 0x000 */ u8 name[11]; /* 0x00B */ u8 facilityClass; - /* 0x00C */ u8 gender; + /* 0x00C */ u8 textColor; /* 0x00E */ u16 speechBefore[6]; /* 0x01A */ u16 speechWin[6]; /* 0x026 */ u16 speechLose[6]; @@ -18,7 +18,7 @@ struct TrainerTowerTrainer struct TrainerTowerFloor { - /* 0x000 */ u8 unk_000; + /* 0x000 */ u8 flags; /* 0x001 */ u8 floorIdx; /* 0x002 */ u8 challengeType; /* 0x003 */ u8 prize; diff --git a/include/constants/trainer_tower.h b/include/constants/trainer_tower.h index 6372a30e8..823adcf3e 100644 --- a/include/constants/trainer_tower.h +++ b/include/constants/trainer_tower.h @@ -4,6 +4,7 @@ #define CHALLENGE_TYPE_SINGLE 0 #define CHALLENGE_TYPE_DOUBLE 1 #define CHALLENGE_TYPE_KNOCKOUT 2 +#define CHALLENGE_TYPE_MIXED 3 // Mixed challenges use one of the above 3 for each floor #define CHALLENGE_STATUS_LOST 0 -- cgit v1.2.3 From 9a91476b81b559db70c9f9cc4467439b55244beb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 28 Apr 2021 20:44:15 -0400 Subject: Improve documentation of trainer tower sets --- include/cereader_tool.h | 2 +- include/constants/trainer_tower.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/cereader_tool.h b/include/cereader_tool.h index c7d1fcca9..5dd0a7589 100644 --- a/include/cereader_tool.h +++ b/include/cereader_tool.h @@ -18,7 +18,7 @@ struct TrainerTowerTrainer struct TrainerTowerFloor { - /* 0x000 */ u8 flags; + /* 0x000 */ u8 id; /* 0x001 */ u8 floorIdx; /* 0x002 */ u8 challengeType; /* 0x003 */ u8 prize; diff --git a/include/constants/trainer_tower.h b/include/constants/trainer_tower.h index 823adcf3e..ea0039ea1 100644 --- a/include/constants/trainer_tower.h +++ b/include/constants/trainer_tower.h @@ -11,6 +11,22 @@ #define CHALLENGE_STATUS_UNK 1 // Never set, possibly e-Card related #define CHALLENGE_STATUS_NORMAL 2 // Not started or ongoing +#define TTPRIZE_HP_UP 0 +#define TTPRIZE_PROTEIN 1 +#define TTPRIZE_IRON 2 +#define TTPRIZE_CARBOS 3 +#define TTPRIZE_CALCIUM 4 +#define TTPRIZE_ZINC 5 +#define TTPRIZE_BRIGHT_POWDER 6 +#define TTPRIZE_WHITE_HERB 7 +#define TTPRIZE_MENTAL_HERB 8 +#define TTPRIZE_CHOICE_BAND 9 +#define TTPRIZE_KINGS_ROCK 10 +#define TTPRIZE_SCOPE_LENS 11 +#define TTPRIZE_METAL_COAT 12 +#define TTPRIZE_DRAGON_SCALE 13 +#define TTPRIZE_UP_GRADE 14 + #define MAX_TRAINER_TOWER_FLOORS 8 #define MAX_TRAINERS_PER_FLOOR 3 -- cgit v1.2.3 From d0f3c277a7bd68e9c2a44efed04d9c0cdbb64355 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Apr 2021 09:56:44 -0400 Subject: Corrections and augmentations to ttower docs --- include/cereader_tool.h | 2 +- include/easy_chat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cereader_tool.h b/include/cereader_tool.h index 5dd0a7589..b7e9cbe47 100644 --- a/include/cereader_tool.h +++ b/include/cereader_tool.h @@ -8,7 +8,7 @@ struct TrainerTowerTrainer { /* 0x000 */ u8 name[11]; /* 0x00B */ u8 facilityClass; - /* 0x00C */ u8 textColor; + /* 0x00C */ u8 unkC; /* 0x00E */ u16 speechBefore[6]; /* 0x01A */ u16 speechWin[6]; /* 0x026 */ u16 speechLose[6]; diff --git a/include/easy_chat.h b/include/easy_chat.h index 11711cbbc..9c6400fd1 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -31,7 +31,7 @@ struct EasyChatWordsByLetter }; u8 *CopyEasyChatWord(u8 *dest, u16 word); -u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2); +u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows); bool8 EC_DoesEasyChatStringFitOnLine(const u16 *easyChatWords, u8 columns, u8 rows, u16 maxLength); void EC_ResetMEventProfileMaybe(void); void InitEasyChatPhrases(void); -- cgit v1.2.3 From 693e1c0fc934e3e2ee343d2c48ee61bb122e388d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 6 May 2021 09:14:13 -0400 Subject: Replace unknown list struct --- include/list_menu.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 24c614e39..df204b247 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -28,6 +28,28 @@ struct ListMenuItem struct ListMenu; +// For ListMenuGet/SetTemplateField +enum ListMenuFields +{ + LISTFIELD_MOVECURSORFUNC = 0, + LISTFIELD_MOVECURSORFUNC2, + LISTFIELD_TOTALITEMS, + LISTFIELD_MAXSHOWED, + LISTFIELD_WINDOWID, + LISTFIELD_HEADERX, + LISTFIELD_ITEMX, + LISTFIELD_CURSORX, + LISTFIELD_UPTEXTY, + LISTFIELD_CURSORPAL, + LISTFIELD_FILLVALUE, + LISTFIELD_CURSORSHADOWPAL, + LISTFIELD_LETTERSPACING, + LISTFIELD_ITEMVERTICALPADDING, + LISTFIELD_SCROLLMULTIPLE, + LISTFIELD_FONTID, + LISTFIELD_CURSORKIND, +}; + struct ListMenuTemplate { /*0x00*/ const struct ListMenuItem *items; @@ -82,6 +104,6 @@ void ListMenuGetScrollAndRow(u8 listTaskId, u16 *cursorPos, u16 *itemsAbove); u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId); void ListMenuOverrideSetColors(u8 cursorPal, u8 fillValue, u8 cursorShadowPal); void ListMenuDefaultCursorMoveFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); -void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value); +void ListMenuSetTemplateField(u8 taskId, u8 field, s32 value); #endif //GUARD_LIST_MENU_H -- cgit v1.2.3 From b79634e2f34ac0b7034702dd81183af201dd8ed1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 6 May 2021 12:52:05 -0400 Subject: TrainerTowerTrainer.{unkC --> textColor} --- include/cereader_tool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/cereader_tool.h b/include/cereader_tool.h index b7e9cbe47..5dd0a7589 100644 --- a/include/cereader_tool.h +++ b/include/cereader_tool.h @@ -8,7 +8,7 @@ struct TrainerTowerTrainer { /* 0x000 */ u8 name[11]; /* 0x00B */ u8 facilityClass; - /* 0x00C */ u8 unkC; + /* 0x00C */ u8 textColor; /* 0x00E */ u16 speechBefore[6]; /* 0x01A */ u16 speechWin[6]; /* 0x026 */ u16 speechLose[6]; -- cgit v1.2.3