1#pragma once
2
3#include <prim/seadSafeString.h>
4
5#include "Library/HostIO/HioNode.h"
6
7namespace al {
8
9class IUseMessageSystem;
10class LayoutActor;
11class LayoutSystem;
12class MessageProjectEx;
13class MessageTag;
14class MessageTagDataHolder;
15
16struct ReplaceTimeInfo {
17 u32 year;
18 u32 month;
19 u32 day;
20 u32 hour;
21 u32 minute;
22 u32 second;
23 u32 centiSecond;
24};
25
26class MessageHolder : public HioNode {
27public:
28 MessageHolder();
29
30 void init(const char*, const char*);
31 const char16* getText(s32) const;
32 const char16* getText(const char*) const;
33 const char16* tryGetText(const char*) const;
34 bool isExistText(const char*) const;
35 s32 calcCharacterNum(s32) const;
36 s32 calcCharacterNum(const char*) const;
37 s32 calcCharacterByteSize(const char*) const;
38 s32 getTextNum() const;
39 void searchTextLabelByIndex(sead::BufferedSafeString*, s32) const;
40 s32 getStyleByIndex(s32) const;
41 s32 trySearchStyleIndexByLabel(const char*) const;
42};
43
44const char* getLanguage();
45const char* getLayoutMessageArcName();
46bool isMessageTagMark(char16);
47bool isMessageTagEndMark(char16);
48bool isMessageTagPageBreak(const IUseMessageSystem*, const char16*);
49bool isMessageTagPageBreak(const IUseMessageSystem*, const MessageTag&);
50bool isMessageTagPageBreak(const MessageProjectEx*, const MessageTag&);
51const char* getMessageTagGroupName(const MessageProjectEx*, s32);
52const char* getMessageTagGroupName(const IUseMessageSystem*, s32);
53const char* getMessageTagName(const MessageProjectEx*, s32, s32);
54const char* getMessageTagName(const IUseMessageSystem*, s32, s32);
55bool isExistMessageTag(const char16*);
56s32 calcMessageSizeWithoutNullCharacter(const char16*, const char16*);
57bool isExistMessageTagTextPaneAnim(const IUseMessageSystem*, const char16*);
58bool tryGetMessageTagTextAnim(sead::BufferedSafeString*, const IUseMessageSystem*, const char16*);
59bool isMessageTagVoice(const IUseMessageSystem*, const char16*);
60void getMessageTagVoiceName(sead::BufferedSafeString*, const IUseMessageSystem*, const char16*);
61bool tryGetMessageTagVoiceNameInPage(sead::BufferedSafeString*, const IUseMessageSystem*,
62 const char16*);
63bool isMessageTagPictFont(const IUseMessageSystem*, s32);
64bool isMessageTagDeviceFont(const IUseMessageSystem*, s32);
65bool isExistMessageTagPadSwitch(const IUseMessageSystem*, const char16*, s32);
66bool isMessageTagPadStyle(const IUseMessageSystem*, s32, s32);
67bool isMessageTagPadPair(const IUseMessageSystem*, s32, s32);
68bool isMessageTagPadStyle2P(const IUseMessageSystem*, s32, s32);
69bool isMessageTagAlignLeft(const IUseMessageSystem*, s32, s32);
70bool isMessageTagAlignCenter(const IUseMessageSystem*, s32, s32);
71void replaceMessageTagString(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
72 const char16*);
73void replaceMessageTagTimeDirectRaceTime(sead::WBufferedSafeString*, const IUseMessageSystem*,
74 ReplaceTimeInfo&);
75const char16* getSystemMessageString(const IUseMessageSystem*, const char*, const char*);
76void replaceMessageTagTimeDirectDate(sead::WBufferedSafeString*, const IUseMessageSystem*,
77 ReplaceTimeInfo&);
78void replaceMessageTagTimeDirectDateDetail(sead::WBufferedSafeString*, const IUseMessageSystem*,
79 ReplaceTimeInfo&);
80void replaceMessageTagScore(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
81 s32, const char*);
82void replaceMessageTagCoinNum(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
83 s32, const char*);
84void replaceMessageTagAmiiboName(sead::WBufferedSafeString*, const IUseMessageSystem*,
85 const char16*, const char*, const char*);
86void replaceMessageTagUserName(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
87 const char16*, const char*);
88void replaceMessageTagNamedString(sead::WBufferedSafeString*, const IUseMessageSystem*,
89 const char16*, const char16*, const char*);
90void replaceMessageTagTime(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
91 ReplaceTimeInfo&, const char*);
92void createReplaceTimeInfoForRaceTime(ReplaceTimeInfo*, s32, s32, s32);
93void createReplaceTimeInfoForDateTime(ReplaceTimeInfo*, u64);
94void replacePaneDateTime(LayoutActor*, const char*, u64);
95MessageTagDataHolder* initMessageTagDataHolder(s32);
96void registerMessageTagDataScore(MessageTagDataHolder*, const char*, const s32*);
97void registerMessageTagDataCoinNum(MessageTagDataHolder*, const char*, const s32*);
98void registerMessageTagDataUserName(MessageTagDataHolder*, const char*, const char16**);
99void registerMessageTagDataAmiiboName(MessageTagDataHolder*, const char*, const char**);
100void registerMessageTagDataString(MessageTagDataHolder*, const char*, const char16**);
101void replaceMessageTagData(sead::WBufferedSafeString*, const IUseMessageSystem*,
102 const MessageTagDataHolder*, const char16*);
103s32 calcMessageSizeWithoutTag(const char16*, const char16*);
104bool isExistLayoutMessage(const IUseMessageSystem*, const char*);
105bool isExistSystemMessage(const IUseMessageSystem*, const char*);
106bool isExistStageMessage(const IUseMessageSystem*, const char*);
107bool isExistLabelInLayoutMessage(const IUseMessageSystem*, const char*, const char*);
108bool isExistLabelInSystemMessage(const IUseMessageSystem*, const char*, const char*);
109bool isExistLabelInStageMessage(const IUseMessageSystem*, const char*, const char*);
110s32 calcSystemMessageCharacterNum(const IUseMessageSystem*, const char*, const char*);
111s32 calcSystemMessageCharacterNumWithoutTag(const IUseMessageSystem*, const char*, const char*);
112const char16* getLayoutMessageString(const IUseMessageSystem*, const char*, const char*);
113const char16* getStageMessageString(const IUseMessageSystem*, const char*, const char*);
114bool tryGetStageMessageString(const char16**, const IUseMessageSystem*, const char*, const char*);
115const char16* getLayoutMessageString(const IUseMessageSystem*, const char*, s32);
116const char16* getSystemMessageString(const IUseMessageSystem*, const char*, s32);
117s32 getSystemMessageLabelNum(const IUseMessageSystem*, const char*);
118s32 getLayoutMessageLabelNum(const IUseMessageSystem*, const char*);
119const char* getMessageTagParamName(const IUseMessageSystem*, const MessageTag&, s32);
120s32 getMessageTagParamNum(const IUseMessageSystem*, const MessageTag&);
121void getMessageTagParamString(sead::WBufferedSafeString*, const IUseMessageSystem*,
122 const MessageTag&, s32);
123void getSystemMessageLabelString(sead::BufferedSafeString*, const IUseMessageSystem*, const char*,
124 s32);
125void getLayoutMessageLabelString(sead::BufferedSafeString*, const IUseMessageSystem*, const char*,
126 s32);
127void getMessageLine(char16*, u32, const char16*, u32);
128s32 countMessageLine(const char16*);
129bool copyMessageExpandTag(char16*, s32, const IUseMessageSystem*, const char16*);
130bool copyMessageWithoutTag(char16*, s32, const char16*);
131bool copyMessageWithoutRubyTag(char16*, s32, const IUseMessageSystem*, const char16*);
132void copyMessageWithoutTagExpandRuby(char16*, s32, const IUseMessageSystem*, const char16*);
133s32 copyMessageWithTag(char16*, s32, const char16*);
134s32 copyMessageWithTagOnlyCurrentPage(const IUseMessageSystem*, char16*, s32, const char16*, s32);
135const char16* getMessageWithPage(const IUseMessageSystem*, const char16*, s32);
136void copyMessageOnlyRuby(char16*, s32, const IUseMessageSystem*, const char16*);
137s32 countMessagePage(const IUseMessageSystem*, const char16*, s32);
138const char16* getNextMessagePage(const IUseMessageSystem*, const char16*);
139void* getPictureFont(const LayoutSystem*); // TODO: unknown return type
140
141} // namespace al
142