pokeheartgold/include/easy_chat.h
2023-06-30 15:54:49 +01:00

50 lines
1.8 KiB
C

#ifndef POKEHEARTGOLD_EASY_CHAT_H
#define POKEHEARTGOLD_EASY_CHAT_H
#include "pm_string.h"
#include "msgdata.h"
#include "constants/easy_chat.h"
typedef u16 ECWORD;
typedef struct EasyChatManager {
HeapID heapId;
MSGDATA *msgData[EC_GROUP_MAX];
} ECMAN;
typedef struct SaveEasyChat {
u32 greetings;
u32 trendy;
} SAVE_EASY_CHAT_T;
struct WallpaperPasswordBank {
u32 count;
u32 *words;
};
SAVE_EASY_CHAT_T *Save_EasyChat_Get(SaveData *saveData);
u16 GetECWordIndexByPair(u32 msgBank, u32 word);
u16 EasyChat_GetMsgBankForGroup(int category);
void GetECWordIntoStringByIndex(u16 ecWord, String *dest);
void EasyChatManager_Delete(ECMAN *ecMan);
void EasyChatManager_ReadWordIntoString(ECMAN *ecMan, u16 ecWord, String *dest);
BOOL GetCategoryAndMsgNoByECWordIdx(u16 ecWord, u32 *category, u32 *msgno);
u32 Save_EasyChat_sizeof(void);
void Save_EasyChat_Init(SAVE_EASY_CHAT_T *ec);
BOOL Save_EasyChat_GetTrendySayingFlag(SAVE_EASY_CHAT_T *ec, int flag);
u32 Save_EasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec);
BOOL Save_EasyChat_TrendySayingsUnlockedAllCheck(SAVE_EASY_CHAT_T *ec);
ECWORD TrendyWordIdxToECWord(int a0);
BOOL Save_EasyChat_GetGreetingsFlag(SAVE_EASY_CHAT_T *ec, u8 idx);
void Save_EasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 idx);
void WallpaperPasswordBank_Delete(struct WallpaperPasswordBank *pwdBank);
u32 WallpaperPasswordBank_GetNum(struct WallpaperPasswordBank *pwdBank);
ECWORD WallpaperPasswordBank_GetWordI(struct WallpaperPasswordBank *pwdBank, int idx);
s16 WallpaperPasswordBank_GetIndexOfWord(struct WallpaperPasswordBank *unk, int value);
s32 GetDuplicateWordNum(ECWORD a0);
ECWORD RemapDuplicateWord(ECWORD a0, s32 a1);
ECMAN *EasyChatManager_New(HeapID heapId);
struct WallpaperPasswordBank *WallpaperPasswordBank_Create(HeapID heapId);
#endif //POKEHEARTGOLD_EASY_CHAT_H