diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/easy_chat.h | 10 | ||||
-rw-r--r-- | include/easy_chat.h | 67 | ||||
-rw-r--r-- | include/global.h | 8 | ||||
-rw-r--r-- | include/mevent.h | 1 | ||||
-rw-r--r-- | include/pokemon_size_record.h | 4 | ||||
-rw-r--r-- | include/strings.h | 24 |
6 files changed, 73 insertions, 41 deletions
diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h index 2c437c88e..746f10679 100644 --- a/include/constants/easy_chat.h +++ b/include/constants/easy_chat.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_EASY_CHAT_H #define GUARD_CONSTANTS_EASY_CHAT_H -#define EC_GROUP_POKEMON 0x0 +#define EC_GROUP_POKEMON_2 0x0 #define EC_GROUP_TRAINER 0x1 #define EC_GROUP_STATUS 0x2 #define EC_GROUP_BATTLE 0x3 @@ -22,7 +22,8 @@ #define EC_GROUP_MOVE_1 0x12 #define EC_GROUP_MOVE_2 0x13 #define EC_GROUP_TRENDY_SAYING 0x14 -#define EC_GROUP_POKEMON_2 0x15 +#define EC_GROUP_POKEMON 0x15 +#define EC_NUM_GROUPS 0x16 // TRAINER #define EC_WORD_I_CHOOSE_YOU (EC_GROUP_TRAINER << 9) | 0x0 @@ -51,7 +52,6 @@ #define EC_WORD_GOLD (EC_GROUP_TRAINER << 9) | 0x17 #define EC_WORD_LEAF (EC_GROUP_TRAINER << 9) | 0x18 #define EC_WORD_SILVER (EC_GROUP_TRAINER << 9) | 0x19 -#define EC_WORD_EMERALD (EC_GROUP_TRAINER << 9) | 0x1a // STATUS #define EC_WORD_DARK (EC_GROUP_STATUS << 9) | 0x0 @@ -1031,7 +1031,6 @@ #define EC_WORD_UNION (EC_GROUP_EVENTS << 9) | 0x19 #define EC_WORD_ROOM (EC_GROUP_EVENTS << 9) | 0x1a #define EC_WORD_WIRELESS (EC_GROUP_EVENTS << 9) | 0x1b -#define EC_WORD_FRONTIER (EC_GROUP_EVENTS << 9) | 0x1c // TRENDY_SAYING #define EC_WORD_KTHX_BYE (EC_GROUP_TRENDY_SAYING << 9) | 0x0 @@ -1075,5 +1074,8 @@ #define EC_GROUP(word) ((word) >> 9) #define EC_INDEX(word) ((word) & 0x1FF) +#define EC_WORD(groupId, index) ((((groupId) & 0x7F) << 9) | ((index) & 0x1FF)) + +#define EC_WORD_UNDEFINED (0xFFFF) #endif // GUARD_CONSTANTS_EASY_CHAT_H diff --git a/include/easy_chat.h b/include/easy_chat.h index a487c9456..6c3947ea9 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -2,43 +2,48 @@ #define GUARD_EASYCHAT_H #include "global.h" +#include "constants/easy_chat.h" -// Taken from Pokeruby, check if it's correct -enum +struct EasyChatWordInfo { - EC_GROUP_POKEMON, - EC_GROUP_TRAINER, - EC_GROUP_STATUS, - EC_GROUP_BATTLE, - EC_GROUP_GREETINGS, - EC_GROUP_PEOPLE, - EC_GROUP_VOICES, - EC_GROUP_SPEECH, - EC_GROUP_ENDINGS, - EC_GROUP_FEELINGS, - EC_GROUP_CONDITIONS, - EC_GROUP_ACTIONS, - EC_GROUP_LIFESTYLE, - EC_GROUP_HOBBIES, - EC_GROUP_TIME, - EC_GROUP_MISC, - EC_GROUP_ADJECTIVES, - EC_GROUP_EVENTS, - EC_GROUP_MOVE_1, - EC_GROUP_MOVE_2, - EC_GROUP_TRENDY_SAYING, - EC_GROUP_POKEMON_2, + const u8 *text; + int alphabeticalOrder; + int enabled; +}; + +typedef union +{ + const u16 *valueList; + const struct EasyChatWordInfo *words; +} EasyChatGroupWordData; + +struct EasyChatGroup +{ + EasyChatGroupWordData wordData; + u16 numWords; + u16 numEnabledWords; +}; + +struct EasyChatWordsByLetter +{ + const u16 *words; + int numWords; }; void InitEasyChatPhrases(void); -void easy_chat_input_maybe(void); -void CopyEasyChatWord(u8 *dest, u16 word); -bool32 sub_811F8D8(u16 word); -void InitializeEasyChatWordArray(u16 *words, u16 length); -void ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2); -bool8 ECWord_CheckIfOutsideOfValidRange(u16 word); -void sub_80BDE28(void); +u8 *CopyEasyChatWord(u8 *dest, u16 word); +u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2); +bool8 EC_DoesEasyChatStringFitOnLine(const u16 *easyChatWords, u8 columns, u8 rows, u16 maxLength); +void ResetSomeMEventECBuffer_3120_338(void); void InitEasyChatPhrases(void); void EnableRareWord(u8); +bool8 InitEasyChatSelection(void); +void DestroyEasyChatSelectionData(void); +u8 GetSelectedGroupByIndex(u8); +void GetUnlockedECWords(bool32 isAlphabetical, u16 groupId); +u16 GetDisplayedWordByIndex(u16 index); +u16 GetNumDisplayedWords(void); +const u8 *GetEasyChatWordGroupName(u8); +u8 *CopyEasyChatWordPadded(u8 *, u16, u16); #endif // GUARD_EASYCHAT_H diff --git a/include/global.h b/include/global.h index 9588deae3..22faa7b1c 100644 --- a/include/global.h +++ b/include/global.h @@ -754,10 +754,10 @@ struct SaveBlock1 /*0x1000*/ u16 vars[VARS_COUNT]; /*0x1200*/ u32 gameStats[NUM_GAME_STATS]; /*0x1300*/ struct QuestLog questLog[4]; - /*0x2CA0*/ u16 unk2CA0[6]; - /*0x2CAC*/ u16 unk2CAC[6]; - /*0x2CB8*/ u16 unk2CB8[6]; - /*0x2CC4*/ u16 unk2CC4[6]; + /*0x2CA0*/ u16 easyChatProfile[6]; + /*0x2CAC*/ u16 easyChatBattleStart[6]; + /*0x2CB8*/ u16 easyChatBattleWon[6]; + /*0x2CC4*/ u16 easyChatBattleLost[6]; /*0x2CD0*/ struct MailStruct mail[MAIL_COUNT]; /*0x2F10*/ u8 additionalPhrases[EASY_CHAT_EXTRA_PHRASES_SIZE]; /*0x2F18*/ OldMan oldMan; // unused diff --git a/include/mevent.h b/include/mevent.h index 6b67aa27c..31ab9e421 100644 --- a/include/mevent.h +++ b/include/mevent.h @@ -69,5 +69,6 @@ u32 MENews_GetInput(u16 input); void sub_8143D24(void); u16 sub_81445C0(u32 command); void sub_8144714(u32 a0, u32 a1); +u16 *sub_8143DA8(void); #endif //GUARD_MEVENT_H diff --git a/include/pokemon_size_record.h b/include/pokemon_size_record.h index d62ced51d..8324f44bf 100644 --- a/include/pokemon_size_record.h +++ b/include/pokemon_size_record.h @@ -11,8 +11,8 @@ void InitLotadSizeRecord(void); void GetLotadSizeRecordInfo(void); void CompareLotadSize(void); -void sub_80A0904(void); -void sub_80A0958(void); +void InitHeracrossSizeRecord(void); +void InitMagikarpSizeRecord(void); void GiveGiftRibbonToParty(u8 index, u8 ribbonId); diff --git a/include/strings.h b/include/strings.h index 7231755c5..45f228e19 100644 --- a/include/strings.h +++ b/include/strings.h @@ -686,4 +686,28 @@ extern const u8 gUnknown_84170E0[]; extern const u8 gUnknown_84170FC[]; extern const u8 gUnknown_841E09F[]; +extern const u8 gEasyChatGroupName_Pokemon[]; +extern const u8 gEasyChatGroupName_Trainer[]; +extern const u8 gEasyChatGroupName_Status[]; +extern const u8 gEasyChatGroupName_Battle[]; +extern const u8 gEasyChatGroupName_Greetings[]; +extern const u8 gEasyChatGroupName_People[]; +extern const u8 gEasyChatGroupName_Voices[]; +extern const u8 gEasyChatGroupName_Speech[]; +extern const u8 gEasyChatGroupName_Endings[]; +extern const u8 gEasyChatGroupName_Feelings[]; +extern const u8 gEasyChatGroupName_Conditions[]; +extern const u8 gEasyChatGroupName_Actions[]; +extern const u8 gEasyChatGroupName_Lifestyle[]; +extern const u8 gEasyChatGroupName_Hobbies[]; +extern const u8 gEasyChatGroupName_Time[]; +extern const u8 gEasyChatGroupName_Misc[]; +extern const u8 gEasyChatGroupName_Adjectives[]; +extern const u8 gEasyChatGroupName_Events[]; +extern const u8 gEasyChatGroupName_Move1[]; +extern const u8 gEasyChatGroupName_Move2[]; +extern const u8 gEasyChatGroupName_TrendySaying[]; +extern const u8 gEasyChatGroupName_Pokemon2[]; +extern const u8 gText_ThreeQuestionMarks[]; + #endif //GUARD_STRINGS_H |