mirror of
https://github.com/MonsterDruide1/OdysseyDecomp.git
synced 2024-11-23 13:29:49 +00:00
Library/Play/Layout: Implement SimpleLayout
s (#109)
This commit is contained in:
parent
ace8c8ca7c
commit
46140d5aef
@ -765,9 +765,9 @@ Address,Quality,Size,Name
|
||||
0x0000007100018670,U,000068,_ZN21BossForestBarrierCtrl8exeBreakEv
|
||||
0x00000071000186b4,U,000036,_ZN21BossForestBarrierCtrlD0Ev
|
||||
0x00000071000186d8,U,000004,_ZNK12_GLOBAL__N_117HostTypeNrvHidden7executeEPN2al11NerveKeeperE
|
||||
0x00000071000186dc,U,000084,_ZNK12_GLOBAL__N_117HostTypeNrvAppear7executeEPN2al11NerveKeeperE
|
||||
0x00000071000186dc,M,000084,_ZNK12_GLOBAL__N_117HostTypeNrvAppear7executeEPN2al11NerveKeeperE
|
||||
0x0000007100018730,U,000068,_ZNK12_GLOBAL__N_116HostTypeNrvBreak7executeEPN2al11NerveKeeperE
|
||||
0x0000007100018774,U,000004,_ZNK12_GLOBAL__N_115HostTypeNrvWait7executeEPN2al11NerveKeeperE
|
||||
0x0000007100018774,M,000004,_ZNK12_GLOBAL__N_115HostTypeNrvWait7executeEPN2al11NerveKeeperE
|
||||
0x0000007100018778,U,001052,_ZN21BossForestBattlePhaseC2EP10BossForestRKN2al13ActorInitInfoEi
|
||||
0x0000007100018b94,U,000104,_ZN21BossForestBattlePhase6appearEv
|
||||
0x0000007100018bfc,U,000088,_ZNK21BossForestBattlePhase17isStateAttackableEv
|
||||
@ -1088,7 +1088,7 @@ Address,Quality,Size,Name
|
||||
0x00000071000229a8,U,000108,_ZNK12_GLOBAL__N_126HostTypeNrvWaitSwitchStart7executeEPN2al11NerveKeeperE
|
||||
0x0000007100022a14,U,000008,
|
||||
0x0000007100022a1c,U,000008,
|
||||
0x0000007100022a24,U,000016,_ZNK12_GLOBAL__N_114HostTypeNrvEnd7executeEPN2al11NerveKeeperE
|
||||
0x0000007100022a24,M,000016,_ZNK12_GLOBAL__N_114HostTypeNrvEnd7executeEPN2al11NerveKeeperE
|
||||
0x0000007100022a34,U,000452,_ZN11BossKnuckleC2EPKc
|
||||
0x0000007100022bf8,U,000448,_ZN11BossKnuckleC1EPKc
|
||||
0x0000007100022db8,U,001764,_ZN11BossKnuckle4initERKN2al13ActorInitInfoE
|
||||
@ -5137,7 +5137,7 @@ Address,Quality,Size,Name
|
||||
0x00000071000c53e0,O,000004,_ZN4sead14SafeStringBaseIDsED2Ev
|
||||
0x00000071000c53e4,U,000004,_ZN4sead16WFixedSafeStringILi32EED0Ev
|
||||
0x00000071000c53e8,U,000216,_ZN4sead16WFixedSafeStringILi32EEaSERKNS_14SafeStringBaseIDsEE
|
||||
0x00000071000c54c0,U,000004,_ZN4sead22BufferedSafeStringBaseIDsED0Ev
|
||||
0x00000071000c54c0,O,000004,_ZN4sead22BufferedSafeStringBaseIDsED0Ev
|
||||
0x00000071000c54c4,U,000040,
|
||||
0x00000071000c54ec,U,000020,_ZN21BossCameraTargetParamC2Ev
|
||||
0x00000071000c5500,U,000080,_ZN16BossCameraTargetC1EPKN2al9LiveActorEPK21BossCameraTargetParam
|
||||
@ -11664,7 +11664,7 @@ Address,Quality,Size,Name
|
||||
0x00000071001dd148,O,000004,_ZN4sead15FixedSafeStringILi256EED0Ev
|
||||
0x00000071001dd14c,O,000004,_ZN4sead19FixedSafeStringBaseIcLi256EED0Ev
|
||||
0x00000071001dd150,O,000240,_ZN4sead19FixedSafeStringBaseIcLi256EEaSERKNS_14SafeStringBaseIcEE
|
||||
0x00000071001dd240,U,000004,_ZN4sead16WFixedSafeStringILi256EED0Ev
|
||||
0x00000071001dd240,O,000004,_ZN4sead16WFixedSafeStringILi256EED0Ev
|
||||
0x00000071001dd244,U,000216,_ZN4sead16WFixedSafeStringILi256EEaSERKNS_14SafeStringBaseIDsEE
|
||||
0x00000071001dd31c,U,000212,_ZN13CinemaCaptionC2ERKN2al14LayoutInitInfoE
|
||||
0x00000071001dd3f0,U,000208,_ZN13CinemaCaptionC1ERKN2al14LayoutInitInfoE
|
||||
@ -61507,69 +61507,69 @@ Address,Quality,Size,Name
|
||||
0x0000007100998a4c,U,000068,
|
||||
0x0000007100998a90,U,000008,
|
||||
0x0000007100998a98,U,000008,
|
||||
0x0000007100998aa0,U,000156,_ZN2al18SimpleLayoutAppearC2EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998b3c,U,000160,_ZN2al18SimpleLayoutAppearC1EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998bdc,U,000052,_ZN2al18SimpleLayoutAppear6appearEv
|
||||
0x0000007100998c10,U,000176,_ZN2al22SimpleLayoutAppearWaitC2EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998cc0,U,000180,_ZN2al22SimpleLayoutAppearWaitC1EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998d74,U,000188,_ZN2al22SimpleLayoutAppearWaitC2EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x0000007100998e30,U,000188,_ZN2al22SimpleLayoutAppearWaitC1EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x0000007100998eec,U,000068,_ZN2al22SimpleLayoutAppearWait6appearEv
|
||||
0x0000007100998f30,U,000012,_ZNK2al22SimpleLayoutAppearWait6isWaitEv
|
||||
0x0000007100998f3c,U,000068,_ZN2al22SimpleLayoutAppearWait9exeAppearEv
|
||||
0x0000007100998f80,U,000064,_ZN2al22SimpleLayoutAppearWait7exeWaitEv
|
||||
0x0000007100998aa0,O,000156,_ZN2al18SimpleLayoutAppearC2EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998b3c,O,000160,_ZN2al18SimpleLayoutAppearC1EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998bdc,O,000052,_ZN2al18SimpleLayoutAppear6appearEv
|
||||
0x0000007100998c10,O,000176,_ZN2al22SimpleLayoutAppearWaitC2EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998cc0,O,000180,_ZN2al22SimpleLayoutAppearWaitC1EPKcS2_RKNS_14LayoutInitInfoES2_
|
||||
0x0000007100998d74,O,000188,_ZN2al22SimpleLayoutAppearWaitC2EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x0000007100998e30,O,000188,_ZN2al22SimpleLayoutAppearWaitC1EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x0000007100998eec,O,000068,_ZN2al22SimpleLayoutAppearWait6appearEv
|
||||
0x0000007100998f30,O,000012,_ZNK2al22SimpleLayoutAppearWait6isWaitEv
|
||||
0x0000007100998f3c,O,000068,_ZN2al22SimpleLayoutAppearWait9exeAppearEv
|
||||
0x0000007100998f80,O,000064,_ZN2al22SimpleLayoutAppearWait7exeWaitEv
|
||||
0x0000007100998fc0,U,000068,
|
||||
0x0000007100999004,U,000068,
|
||||
0x0000007100999048,U,000200,_ZN2al25SimpleLayoutAppearWaitEndC2EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x0000007100999110,U,000212,_ZN2al25SimpleLayoutAppearWaitEndC1EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x00000071009991e4,U,000196,_ZN2al25SimpleLayoutAppearWaitEndC2EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x00000071009992a8,U,000196,_ZN2al25SimpleLayoutAppearWaitEndC1EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x000000710099936c,U,000068,_ZN2al25SimpleLayoutAppearWaitEnd6appearEv
|
||||
0x00000071009993b0,U,000068,_ZN2al25SimpleLayoutAppearWaitEnd3endEv
|
||||
0x00000071009993f4,U,000072,_ZN2al25SimpleLayoutAppearWaitEnd9startWaitEv
|
||||
0x000000710099943c,U,000072,_ZN2al25SimpleLayoutAppearWaitEnd9exeAppearEv
|
||||
0x0000007100999484,U,000100,_ZN2al25SimpleLayoutAppearWaitEnd7exeWaitEv
|
||||
0x00000071009994e8,U,000100,_ZN2al25SimpleLayoutAppearWaitEnd6exeEndEv
|
||||
0x000000710099954c,U,000016,_ZNK2al25SimpleLayoutAppearWaitEnd6isWaitEv
|
||||
0x000000710099955c,U,000076,_ZNK2al25SimpleLayoutAppearWaitEnd14isAppearOrWaitEv
|
||||
0x0000007100999048,O,000200,_ZN2al25SimpleLayoutAppearWaitEndC2EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x0000007100999110,O,000212,_ZN2al25SimpleLayoutAppearWaitEndC1EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x00000071009991e4,O,000196,_ZN2al25SimpleLayoutAppearWaitEndC2EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x00000071009992a8,O,000196,_ZN2al25SimpleLayoutAppearWaitEndC1EPNS_11LayoutActorEPKcS4_RKNS_14LayoutInitInfoES4_
|
||||
0x000000710099936c,O,000068,_ZN2al25SimpleLayoutAppearWaitEnd6appearEv
|
||||
0x00000071009993b0,O,000068,_ZN2al25SimpleLayoutAppearWaitEnd3endEv
|
||||
0x00000071009993f4,O,000072,_ZN2al25SimpleLayoutAppearWaitEnd9startWaitEv
|
||||
0x000000710099943c,O,000072,_ZN2al25SimpleLayoutAppearWaitEnd9exeAppearEv
|
||||
0x0000007100999484,O,000100,_ZN2al25SimpleLayoutAppearWaitEnd7exeWaitEv
|
||||
0x00000071009994e8,O,000100,_ZN2al25SimpleLayoutAppearWaitEnd6exeEndEv
|
||||
0x000000710099954c,O,000016,_ZNK2al25SimpleLayoutAppearWaitEnd6isWaitEv
|
||||
0x000000710099955c,O,000076,_ZNK2al25SimpleLayoutAppearWaitEnd14isAppearOrWaitEv
|
||||
0x00000071009995a8,U,000072,
|
||||
0x00000071009995f0,U,000104,
|
||||
0x0000007100999658,U,000104,
|
||||
0x00000071009996c0,U,000216,_ZN2al16SimpleLayoutTextC2ERKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999798,U,000220,_ZN2al16SimpleLayoutTextC1ERKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999874,U,000256,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKci
|
||||
0x0000007100999974,U,000008,_ZN2al16SimpleLayoutText6setPosERKN4sead7Vector2IfEE
|
||||
0x000000710099997c,U,000200,_ZN2al16SimpleLayoutText7setTextEPKc
|
||||
0x0000007100999a44,U,000108,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKDsi
|
||||
0x0000007100999ab0,U,000028,_ZN2al16SimpleLayoutText7setTextEPKDs
|
||||
0x0000007100999acc,U,000140,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKcS7_i
|
||||
0x0000007100999b58,U,000008,_ZN2al16SimpleLayoutText8setScaleEf
|
||||
0x0000007100999b60,U,000024,_ZN2al16SimpleLayoutText8setColorERKN4sead8Color4u8E
|
||||
0x0000007100999b78,U,000016,_ZN2al16SimpleLayoutText18setPositionCenterHEv
|
||||
0x0000007100999b88,U,000072,_ZN2al16SimpleLayoutText7exeWaitEv
|
||||
0x0000007100999bd0,U,000240,_ZN2al22createSimpleLayoutTextERKNS_13ActorInitInfoEPKcS4_S4_
|
||||
0x00000071009996c0,O,000216,_ZN2al16SimpleLayoutTextC2ERKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999798,O,000220,_ZN2al16SimpleLayoutTextC1ERKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999874,O,000256,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKci
|
||||
0x0000007100999974,O,000008,_ZN2al16SimpleLayoutText6setPosERKN4sead7Vector2IfEE
|
||||
0x000000710099997c,O,000200,_ZN2al16SimpleLayoutText7setTextEPKc
|
||||
0x0000007100999a44,O,000108,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKDsi
|
||||
0x0000007100999ab0,O,000028,_ZN2al16SimpleLayoutText7setTextEPKDs
|
||||
0x0000007100999acc,O,000140,_ZN2al16SimpleLayoutText5startERKN4sead7Vector2IfEEPKcS7_i
|
||||
0x0000007100999b58,O,000008,_ZN2al16SimpleLayoutText8setScaleEf
|
||||
0x0000007100999b60,O,000024,_ZN2al16SimpleLayoutText8setColorERKN4sead8Color4u8E
|
||||
0x0000007100999b78,O,000016,_ZN2al16SimpleLayoutText18setPositionCenterHEv
|
||||
0x0000007100999b88,O,000072,_ZN2al16SimpleLayoutText7exeWaitEv
|
||||
0x0000007100999bd0,O,000240,_ZN2al22createSimpleLayoutTextERKNS_13ActorInitInfoEPKcS4_S4_
|
||||
0x0000007100999cc0,U,000072,
|
||||
0x0000007100999d08,U,000008,_ZN2al23SimpleLayoutTextWrapperC2EPNS_16SimpleLayoutTextE
|
||||
0x0000007100999d10,U,000040,_ZN2al23SimpleLayoutTextWrapper5startERKN4sead7Vector2IfEEPKci
|
||||
0x0000007100999d38,U,000040,_ZN2al23SimpleLayoutTextWrapper5startERKN4sead7Vector2IfEEPKDsi
|
||||
0x0000007100999d60,U,000040,_ZN2al23SimpleLayoutTextWrapper8setScaleEf
|
||||
0x0000007100999d88,U,000040,_ZN2al23SimpleLayoutTextWrapper8setColorERKN4sead8Color4u8E
|
||||
0x0000007100999db0,U,000040,_ZN2al23SimpleLayoutTextWrapper6setPosERKN4sead7Vector2IfEE
|
||||
0x0000007100999dd8,U,000236,_ZN2al22SimpleLayoutTextHolderC2EiRKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999ec4,U,000008,_ZN2al22SimpleLayoutTextHolder5resetEv
|
||||
0x0000007100999ecc,U,000060,_ZN2al22SimpleLayoutTextHolder5startERKN4sead7Vector2IfEEPKc
|
||||
0x0000007100999f08,U,000060,_ZN2al22SimpleLayoutTextHolder5startERKN4sead7Vector2IfEEPKDs
|
||||
0x0000007100999f44,U,000200,_ZN2al24SimplePopupMessageLayoutC2EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x000000710099a00c,U,000212,_ZN2al24SimplePopupMessageLayoutC1EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x000000710099a0e0,U,000068,_ZN2al24SimplePopupMessageLayout6appearEv
|
||||
0x000000710099a124,U,000068,_ZN2al24SimplePopupMessageLayout3endEv
|
||||
0x000000710099a168,U,000072,_ZN2al24SimplePopupMessageLayout9startWaitEv
|
||||
0x000000710099a1b0,U,000108,_ZN2al24SimplePopupMessageLayout9exeAppearEv
|
||||
0x000000710099a21c,U,000072,_ZN2al24SimplePopupMessageLayout10refreshPosEv
|
||||
0x000000710099a264,U,000140,_ZN2al24SimplePopupMessageLayout7exeWaitEv
|
||||
0x000000710099a2f0,U,000148,_ZN2al24SimplePopupMessageLayout6exeEndEv
|
||||
0x000000710099a384,U,000016,_ZNK2al24SimplePopupMessageLayout6isWaitEv
|
||||
0x000000710099a394,U,000076,_ZNK2al24SimplePopupMessageLayout14isAppearOrWaitEv
|
||||
0x0000007100999d08,O,000008,_ZN2al23SimpleLayoutTextWrapperC2EPNS_16SimpleLayoutTextE
|
||||
0x0000007100999d10,O,000040,_ZN2al23SimpleLayoutTextWrapper5startERKN4sead7Vector2IfEEPKci
|
||||
0x0000007100999d38,O,000040,_ZN2al23SimpleLayoutTextWrapper5startERKN4sead7Vector2IfEEPKDsi
|
||||
0x0000007100999d60,O,000040,_ZN2al23SimpleLayoutTextWrapper8setScaleEf
|
||||
0x0000007100999d88,O,000040,_ZN2al23SimpleLayoutTextWrapper8setColorERKN4sead8Color4u8E
|
||||
0x0000007100999db0,O,000040,_ZN2al23SimpleLayoutTextWrapper6setPosERKN4sead7Vector2IfEE
|
||||
0x0000007100999dd8,O,000236,_ZN2al22SimpleLayoutTextHolderC2EiRKNS_14LayoutInitInfoEPKcS5_S5_
|
||||
0x0000007100999ec4,O,000008,_ZN2al22SimpleLayoutTextHolder5resetEv
|
||||
0x0000007100999ecc,O,000060,_ZN2al22SimpleLayoutTextHolder5startERKN4sead7Vector2IfEEPKc
|
||||
0x0000007100999f08,O,000060,_ZN2al22SimpleLayoutTextHolder5startERKN4sead7Vector2IfEEPKDs
|
||||
0x0000007100999f44,O,000200,_ZN2al24SimplePopupMessageLayoutC2EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x000000710099a00c,O,000212,_ZN2al24SimplePopupMessageLayoutC1EPKcS2_RKNS_14LayoutInitInfoES2_b
|
||||
0x000000710099a0e0,O,000068,_ZN2al24SimplePopupMessageLayout6appearEv
|
||||
0x000000710099a124,O,000068,_ZN2al24SimplePopupMessageLayout3endEv
|
||||
0x000000710099a168,O,000072,_ZN2al24SimplePopupMessageLayout9startWaitEv
|
||||
0x000000710099a1b0,O,000108,_ZN2al24SimplePopupMessageLayout9exeAppearEv
|
||||
0x000000710099a21c,O,000072,_ZN2al24SimplePopupMessageLayout10refreshPosEv
|
||||
0x000000710099a264,O,000140,_ZN2al24SimplePopupMessageLayout7exeWaitEv
|
||||
0x000000710099a2f0,O,000148,_ZN2al24SimplePopupMessageLayout6exeEndEv
|
||||
0x000000710099a384,O,000016,_ZNK2al24SimplePopupMessageLayout6isWaitEv
|
||||
0x000000710099a394,O,000076,_ZNK2al24SimplePopupMessageLayout14isAppearOrWaitEv
|
||||
0x000000710099a3e0,U,000108,
|
||||
0x000000710099a44c,U,000148,
|
||||
0x000000710099a4e0,U,000008,
|
||||
|
Can't render this file because it is too large.
|
@ -75,6 +75,7 @@ public:
|
||||
void initViewIdHostActor(const ActorInitInfo&, const LiveActor*);
|
||||
void initNoViewId(const PlacementInfo*, const ActorInitInfo&);
|
||||
|
||||
const LayoutInitInfo& getLayoutInitInfo() const { return *mLayoutInitInfo; }
|
||||
const PlacementInfo& getPlacementInfo() const { return *mPlacementInfo; }
|
||||
|
||||
private:
|
||||
|
132
lib/al/Library/Message/MessageHolder.h
Normal file
132
lib/al/Library/Message/MessageHolder.h
Normal file
@ -0,0 +1,132 @@
|
||||
#pragma once
|
||||
|
||||
#include <prim/seadSafeString.h>
|
||||
|
||||
#include "Library/HostIO/HioNode.h"
|
||||
|
||||
namespace al {
|
||||
|
||||
class IUseMessageSystem;
|
||||
class LayoutActor;
|
||||
class LayoutSystem;
|
||||
class MessageProjectEx;
|
||||
class MessageTag;
|
||||
class MessageTagDataHolder;
|
||||
class ReplaceTimeInfo;
|
||||
|
||||
class MessageHolder : public HioNode {
|
||||
public:
|
||||
MessageHolder();
|
||||
|
||||
void init(const char*, const char*);
|
||||
const char16* getText(s32) const;
|
||||
const char16* getText(const char*) const;
|
||||
const char16* tryGetText(const char*) const;
|
||||
bool isExistText(const char*) const;
|
||||
s32 calcCharacterNum(s32) const;
|
||||
s32 calcCharacterNum(const char*) const;
|
||||
s32 calcCharacterByteSize(const char*) const;
|
||||
s32 getTextNum() const;
|
||||
void searchTextLabelByIndex(sead::BufferedSafeString*, s32) const;
|
||||
s32 getStyleByIndex(s32) const;
|
||||
s32 trySearchStyleIndexByLabel(const char*) const;
|
||||
};
|
||||
|
||||
const char* getLanguage();
|
||||
const char* getLayoutMessageArcName();
|
||||
bool isMessageTagMark(char16);
|
||||
bool isMessageTagEndMark(char16);
|
||||
bool isMessageTagPageBreak(const IUseMessageSystem*, const char16*);
|
||||
bool isMessageTagPageBreak(const IUseMessageSystem*, const MessageTag&);
|
||||
bool isMessageTagPageBreak(const MessageProjectEx*, const MessageTag&);
|
||||
const char* getMessageTagGroupName(const MessageProjectEx*, s32);
|
||||
const char* getMessageTagGroupName(const IUseMessageSystem*, s32);
|
||||
const char* getMessageTagName(const MessageProjectEx*, s32, s32);
|
||||
const char* getMessageTagName(const IUseMessageSystem*, s32, s32);
|
||||
bool isExistMessageTag(const char16*);
|
||||
s32 calcMessageSizeWithoutNullCharacter(const char16*, const char16*);
|
||||
bool isExistMessageTagTextPaneAnim(const IUseMessageSystem*, const char16*);
|
||||
bool tryGetMessageTagTextAnim(sead::BufferedSafeString*, const IUseMessageSystem*, const char16*);
|
||||
bool isMessageTagVoice(const IUseMessageSystem*, const char16*);
|
||||
void getMessageTagVoiceName(sead::BufferedSafeString*, const IUseMessageSystem*, const char16*);
|
||||
bool tryGetMessageTagVoiceNameInPage(sead::BufferedSafeString*, const IUseMessageSystem*,
|
||||
const char16*);
|
||||
bool isMessageTagPictFont(const IUseMessageSystem*, s32);
|
||||
bool isMessageTagDeviceFont(const IUseMessageSystem*, s32);
|
||||
bool isExistMessageTagPadSwitch(const IUseMessageSystem*, const char16*, s32);
|
||||
bool isMessageTagPadStyle(const IUseMessageSystem*, s32, s32);
|
||||
bool isMessageTagPadPair(const IUseMessageSystem*, s32, s32);
|
||||
bool isMessageTagPadStyle2P(const IUseMessageSystem*, s32, s32);
|
||||
bool isMessageTagAlignLeft(const IUseMessageSystem*, s32, s32);
|
||||
bool isMessageTagAlignCenter(const IUseMessageSystem*, s32, s32);
|
||||
void replaceMessageTagString(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
|
||||
const char16*);
|
||||
void replaceMessageTagTimeDirectRaceTime(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
ReplaceTimeInfo&);
|
||||
const char16* getSystemMessageString(const IUseMessageSystem*, const char*, const char*);
|
||||
void replaceMessageTagTimeDirectDate(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
ReplaceTimeInfo&);
|
||||
void replaceMessageTagTimeDirectDateDetail(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
ReplaceTimeInfo&);
|
||||
void replaceMessageTagScore(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
|
||||
s32, const char*);
|
||||
void replaceMessageTagCoinNum(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
|
||||
s32, const char*);
|
||||
void replaceMessageTagAmiiboName(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
const char16*, const char*, const char*);
|
||||
void replaceMessageTagUserName(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
|
||||
const char16*, const char*);
|
||||
void replaceMessageTagNamedString(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
const char16*, const char16*, const char*);
|
||||
void replaceMessageTagTime(sead::WBufferedSafeString*, const IUseMessageSystem*, const char16*,
|
||||
ReplaceTimeInfo&, const char*);
|
||||
void createReplaceTimeInfoForRaceTime(ReplaceTimeInfo*, s32, s32, s32);
|
||||
void createReplaceTimeInfoForDateTime(ReplaceTimeInfo*, u64);
|
||||
void replacePaneDateTime(LayoutActor*, const char*, u64);
|
||||
MessageTagDataHolder* initMessageTagDataHolder(s32);
|
||||
void registerMessageTagDataScore(MessageTagDataHolder*, const char*, const s32*);
|
||||
void registerMessageTagDataCoinNum(MessageTagDataHolder*, const char*, const s32*);
|
||||
void registerMessageTagDataUserName(MessageTagDataHolder*, const char*, const char16**);
|
||||
void registerMessageTagDataAmiiboName(MessageTagDataHolder*, const char*, const char**);
|
||||
void registerMessageTagDataString(MessageTagDataHolder*, const char*, const char16**);
|
||||
void replaceMessageTagData(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
const MessageTagDataHolder*, const char16*);
|
||||
s32 calcMessageSizeWithoutTag(const char16*, const char16*);
|
||||
bool isExistLayoutMessage(const IUseMessageSystem*, const char*);
|
||||
bool isExistSystemMessage(const IUseMessageSystem*, const char*);
|
||||
bool isExistStageMessage(const IUseMessageSystem*, const char*);
|
||||
bool isExistLabelInLayoutMessage(const IUseMessageSystem*, const char*, const char*);
|
||||
bool isExistLabelInSystemMessage(const IUseMessageSystem*, const char*, const char*);
|
||||
bool isExistLabelInStageMessage(const IUseMessageSystem*, const char*, const char*);
|
||||
s32 calcSystemMessageCharacterNum(const IUseMessageSystem*, const char*, const char*);
|
||||
s32 calcSystemMessageCharacterNumWithoutTag(const IUseMessageSystem*, const char*, const char*);
|
||||
const char16* getLayoutMessageString(const IUseMessageSystem*, const char*, const char*);
|
||||
const char16* getStageMessageString(const IUseMessageSystem*, const char*, const char*);
|
||||
bool tryGetStageMessageString(const char16**, const IUseMessageSystem*, const char*, const char*);
|
||||
const char16* getLayoutMessageString(const IUseMessageSystem*, const char*, s32);
|
||||
const char16* getSystemMessageString(const IUseMessageSystem*, const char*, s32);
|
||||
s32 getSystemMessageLabelNum(const IUseMessageSystem*, const char*);
|
||||
s32 getLayoutMessageLabelNum(const IUseMessageSystem*, const char*);
|
||||
const char* getMessageTagParamName(const IUseMessageSystem*, const MessageTag&, s32);
|
||||
s32 getMessageTagParamNum(const IUseMessageSystem*, const MessageTag&);
|
||||
void getMessageTagParamString(sead::WBufferedSafeString*, const IUseMessageSystem*,
|
||||
const MessageTag&, s32);
|
||||
void getSystemMessageLabelString(sead::BufferedSafeString*, const IUseMessageSystem*, const char*,
|
||||
s32);
|
||||
void getLayoutMessageLabelString(sead::BufferedSafeString*, const IUseMessageSystem*, const char*,
|
||||
s32);
|
||||
void getMessageLine(char16*, u32, const char16*, u32);
|
||||
s32 countMessageLine(const char16*);
|
||||
bool copyMessageExpandTag(char16*, s32, const IUseMessageSystem*, const char16*);
|
||||
bool copyMessageWithoutTag(char16*, s32, const char16*);
|
||||
bool copyMessageWithoutRubyTag(char16*, s32, const IUseMessageSystem*, const char16*);
|
||||
void copyMessageWithoutTagExpandRuby(char16*, s32, const IUseMessageSystem*, const char16*);
|
||||
s32 copyMessageWithTag(char16*, s32, const char16*);
|
||||
s32 copyMessageWithTagOnlyCurrentPage(const IUseMessageSystem*, char16*, s32, const char16*, s32);
|
||||
const char16* getMessageWithPage(const IUseMessageSystem*, const char16*, s32);
|
||||
void copyMessageOnlyRuby(char16*, s32, const IUseMessageSystem*, const char16*);
|
||||
s32 countMessagePage(const IUseMessageSystem*, const char16*, s32);
|
||||
const char16* getNextMessagePage(const IUseMessageSystem*, const char16*);
|
||||
void* getPictureFont(const LayoutSystem*); // TODO: unknown return type
|
||||
|
||||
} // namespace al
|
@ -52,6 +52,16 @@ al::initNerveAction(this, "Hide", &NrvExampleUseCase.mCollector, 0);
|
||||
|
||||
#define NERVE_IMPL(Class, Action) NERVE_IMPL_(Class, Action, Action)
|
||||
|
||||
#define NERVE_HOST_TYPE_IMPL_(Class, Action, ActionFunc) \
|
||||
class HostType##Nrv##Action : public al::Nerve { \
|
||||
public: \
|
||||
void execute(al::NerveKeeper* keeper) const override { \
|
||||
(keeper->getParent<Class>())->exe##ActionFunc(); \
|
||||
} \
|
||||
};
|
||||
|
||||
#define NERVE_HOST_TYPE_IMPL(Class, Action) NERVE_HOST_TYPE_IMPL_(Class, Action, Action)
|
||||
|
||||
#define NERVE_MAKE(Class, Action) Class##Nrv##Action Action;
|
||||
|
||||
#define NERVES_MAKE_STRUCT(Class, ...) \
|
||||
|
17
lib/al/Library/Play/Layout/SimpleLayoutAppear.cpp
Normal file
17
lib/al/Library/Play/Layout/SimpleLayoutAppear.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "Library/Play/Layout/SimpleLayoutAppear.h"
|
||||
|
||||
#include "Library/Layout/LayoutActionFunction.h"
|
||||
#include "Library/Layout/LayoutInitInfo.h"
|
||||
|
||||
namespace al {
|
||||
SimpleLayoutAppear::SimpleLayoutAppear(const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info, const char* archiveName)
|
||||
: LayoutActor(name) {
|
||||
initLayoutActor(this, info, layoutName, archiveName);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppear::appear() {
|
||||
startAction(this, "Appear", nullptr);
|
||||
LayoutActor::appear();
|
||||
}
|
||||
} // namespace al
|
15
lib/al/Library/Play/Layout/SimpleLayoutAppear.h
Normal file
15
lib/al/Library/Play/Layout/SimpleLayoutAppear.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
|
||||
namespace al {
|
||||
class LayoutInitInfo;
|
||||
|
||||
class SimpleLayoutAppear : public LayoutActor {
|
||||
public:
|
||||
SimpleLayoutAppear(const char* name, const char* layoutName, const LayoutInitInfo& info,
|
||||
const char* archiveName);
|
||||
|
||||
void appear() override;
|
||||
};
|
||||
} // namespace al
|
54
lib/al/Library/Play/Layout/SimpleLayoutAppearWait.cpp
Normal file
54
lib/al/Library/Play/Layout/SimpleLayoutAppearWait.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
#include "Library/Play/Layout/SimpleLayoutAppearWait.h"
|
||||
|
||||
#include "Library/Layout/LayoutActionFunction.h"
|
||||
#include "Library/Layout/LayoutInitInfo.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
|
||||
namespace {
|
||||
using namespace al;
|
||||
NERVE_IMPL(SimpleLayoutAppearWait, Appear);
|
||||
NERVE_IMPL(SimpleLayoutAppearWait, Wait);
|
||||
|
||||
NERVES_MAKE_NOSTRUCT(SimpleLayoutAppearWait, Appear, Wait);
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace al {
|
||||
|
||||
SimpleLayoutAppearWait::SimpleLayoutAppearWait(const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info, const char* archiveName)
|
||||
: LayoutActor(name) {
|
||||
initLayoutActor(this, info, layoutName, archiveName);
|
||||
initNerve(&Appear, 0);
|
||||
}
|
||||
|
||||
SimpleLayoutAppearWait::SimpleLayoutAppearWait(LayoutActor* parentActor, const char* name,
|
||||
const char* layoutName, const LayoutInitInfo& info,
|
||||
const char* archiveName)
|
||||
: LayoutActor(name) {
|
||||
initLayoutPartsActor(this, parentActor, info, layoutName, archiveName);
|
||||
initNerve(&Appear, 0);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWait::appear() {
|
||||
startAction(this, "Appear", nullptr);
|
||||
LayoutActor::appear();
|
||||
setNerve(this, &Appear);
|
||||
}
|
||||
|
||||
bool SimpleLayoutAppearWait::isWait() const {
|
||||
return isNerve(this, &Wait);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWait::exeAppear() {
|
||||
if (isActionEnd(this, 0))
|
||||
setNerve(this, &Wait);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWait::exeWait() {
|
||||
if (isFirstStep(this))
|
||||
startAction(this, "Wait", 0);
|
||||
}
|
||||
|
||||
} // namespace al
|
21
lib/al/Library/Play/Layout/SimpleLayoutAppearWait.h
Normal file
21
lib/al/Library/Play/Layout/SimpleLayoutAppearWait.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
|
||||
namespace al {
|
||||
class LayoutInitInfo;
|
||||
|
||||
class SimpleLayoutAppearWait : public LayoutActor {
|
||||
public:
|
||||
SimpleLayoutAppearWait(const char* name, const char* layoutName, const LayoutInitInfo& info,
|
||||
const char* archiveName);
|
||||
SimpleLayoutAppearWait(LayoutActor* parentActor, const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info, const char* archiveName);
|
||||
|
||||
void appear() override;
|
||||
|
||||
bool isWait() const;
|
||||
void exeAppear();
|
||||
void exeWait();
|
||||
};
|
||||
} // namespace al
|
85
lib/al/Library/Play/Layout/SimpleLayoutAppearWaitEnd.cpp
Normal file
85
lib/al/Library/Play/Layout/SimpleLayoutAppearWaitEnd.cpp
Normal file
@ -0,0 +1,85 @@
|
||||
#include "Library/Play/Layout/SimpleLayoutAppearWaitEnd.h"
|
||||
|
||||
#include "Library/Layout/LayoutActionFunction.h"
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
#include "Library/Layout/LayoutInitInfo.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
|
||||
namespace {
|
||||
using namespace al;
|
||||
NERVE_HOST_TYPE_IMPL(SimpleLayoutAppearWaitEnd, Appear);
|
||||
NERVE_HOST_TYPE_IMPL(SimpleLayoutAppearWaitEnd, End);
|
||||
NERVE_MAKE(HostType, End);
|
||||
NERVE_HOST_TYPE_IMPL(SimpleLayoutAppearWaitEnd, Wait);
|
||||
|
||||
NERVES_MAKE_STRUCT(HostType, Appear, Wait);
|
||||
} // namespace
|
||||
|
||||
namespace al {
|
||||
|
||||
SimpleLayoutAppearWaitEnd::SimpleLayoutAppearWaitEnd(const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info,
|
||||
const char* archiveName, bool localize)
|
||||
: LayoutActor(name) {
|
||||
if (localize)
|
||||
initLayoutActorLocalized(this, info, layoutName, archiveName);
|
||||
else
|
||||
initLayoutActor(this, info, layoutName, archiveName);
|
||||
initNerve(&NrvHostType.Appear, 0);
|
||||
}
|
||||
|
||||
SimpleLayoutAppearWaitEnd::SimpleLayoutAppearWaitEnd(LayoutActor* parentActor, const char* name,
|
||||
const char* layoutName,
|
||||
const LayoutInitInfo& info,
|
||||
const char* archiveName)
|
||||
: LayoutActor(name) {
|
||||
initLayoutPartsActor(this, parentActor, info, layoutName, archiveName);
|
||||
initNerve(&NrvHostType.Appear, 0);
|
||||
};
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::appear() {
|
||||
startAction(this, "Appear", nullptr);
|
||||
LayoutActor::appear();
|
||||
setNerve(this, &NrvHostType.Appear);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::end() {
|
||||
if (!isNerve(this, &End))
|
||||
setNerve(this, &End);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::startWait() {
|
||||
startAction(this, "Wait", nullptr);
|
||||
LayoutActor::appear();
|
||||
setNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::exeAppear() {
|
||||
if (isActionEnd(this, nullptr))
|
||||
setNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::exeWait() {
|
||||
if (isFirstStep(this))
|
||||
startAction(this, "Wait", nullptr);
|
||||
if (mLifetime >= 0 && isGreaterEqualStep(this, mLifetime))
|
||||
setNerve(this, &End);
|
||||
}
|
||||
|
||||
void SimpleLayoutAppearWaitEnd::exeEnd() {
|
||||
if (isFirstStep(this))
|
||||
startAction(this, "End", nullptr);
|
||||
if (isActionEnd(this, nullptr))
|
||||
kill();
|
||||
}
|
||||
|
||||
bool SimpleLayoutAppearWaitEnd::isWait() const {
|
||||
return isNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
bool SimpleLayoutAppearWaitEnd::isAppearOrWait() const {
|
||||
return isWait() || isNerve(this, &NrvHostType.Appear);
|
||||
}
|
||||
|
||||
} // namespace al
|
28
lib/al/Library/Play/Layout/SimpleLayoutAppearWaitEnd.h
Normal file
28
lib/al/Library/Play/Layout/SimpleLayoutAppearWaitEnd.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
|
||||
namespace al {
|
||||
class LayoutInitInfo;
|
||||
|
||||
class SimpleLayoutAppearWaitEnd : public LayoutActor {
|
||||
public:
|
||||
SimpleLayoutAppearWaitEnd(const char* name, const char* layoutName, const LayoutInitInfo& info,
|
||||
const char* archiveName, bool localize);
|
||||
SimpleLayoutAppearWaitEnd(LayoutActor* parentActor, const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info, const char* archiveName);
|
||||
|
||||
void appear() override;
|
||||
void end();
|
||||
void startWait();
|
||||
|
||||
void exeAppear();
|
||||
void exeWait();
|
||||
void exeEnd();
|
||||
bool isWait() const;
|
||||
bool isAppearOrWait() const;
|
||||
|
||||
private:
|
||||
s32 mLifetime = -1;
|
||||
};
|
||||
} // namespace al
|
91
lib/al/Library/Play/Layout/SimpleLayoutText.cpp
Normal file
91
lib/al/Library/Play/Layout/SimpleLayoutText.cpp
Normal file
@ -0,0 +1,91 @@
|
||||
#include "Library/Play/Layout/SimpleLayoutText.h"
|
||||
|
||||
#include <prim/seadStringUtil.h>
|
||||
|
||||
#include "Library/Layout/LayoutActorUtil.h"
|
||||
#include "Library/Layout/LayoutInitInfo.h"
|
||||
#include "Library/LiveActor/ActorInitInfo.h"
|
||||
#include "Library/Message/MessageHolder.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
|
||||
namespace {
|
||||
using namespace al;
|
||||
NERVE_IMPL(SimpleLayoutText, Wait);
|
||||
NERVES_MAKE_NOSTRUCT(SimpleLayoutText, Wait);
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace al {
|
||||
|
||||
SimpleLayoutText::SimpleLayoutText(const LayoutInitInfo& info, const char* name,
|
||||
const char* paneName, const char* archiveName)
|
||||
: LayoutActor("テキストレイアウト"), mPaneName(paneName) {
|
||||
initLayoutActor(this, info, name, archiveName);
|
||||
initNerve(&Wait, 0);
|
||||
kill();
|
||||
}
|
||||
|
||||
void SimpleLayoutText::start(const sead::Vector2f& pos, const char* str, s32 lifetime) {
|
||||
setPos(pos);
|
||||
mLifetime = lifetime;
|
||||
|
||||
setText(str);
|
||||
setNerve(this, &Wait);
|
||||
appear();
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setPos(const sead::Vector2f& pos) {
|
||||
setLocalTrans(this, pos);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setText(const char* text) {
|
||||
sead::WFixedSafeString<256> utf16str;
|
||||
|
||||
sead::StringUtil::convertUtf8ToUtf16(utf16str.getBuffer(), utf16str.getBufferSize(), text, -1);
|
||||
|
||||
// doesn't match with call to setText(const char16*)
|
||||
setPaneString(this, mPaneName, utf16str.cstr(), 0);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::start(const sead::Vector2f& pos, const char16* str, s32 lifetime) {
|
||||
setPos(pos);
|
||||
mLifetime = lifetime;
|
||||
setText(str);
|
||||
setNerve(this, &Wait);
|
||||
appear();
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setText(const char16* str) {
|
||||
setPaneString(this, mPaneName, str, 0);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::start(const sead::Vector2f& pos, const char* category, const char* key,
|
||||
s32 lifetime) {
|
||||
const char16* localizedStr = getSystemMessageString(this, category, key);
|
||||
start(pos, localizedStr, lifetime);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setScale(f32 scale) {
|
||||
setLocalScale(this, scale);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setColor(const sead::Color4u8& color) {
|
||||
setPaneVtxColor(this, mPaneName, color);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::setPositionCenterH() {
|
||||
setTextPositionCenterH(this, mPaneName);
|
||||
}
|
||||
|
||||
void SimpleLayoutText::exeWait() {
|
||||
if (mLifetime >= 0 && !isLessStep(this, mLifetime))
|
||||
kill();
|
||||
}
|
||||
|
||||
SimpleLayoutText* createSimpleLayoutText(const ActorInitInfo& info, const char* name,
|
||||
const char* paneName, const char* archiveName) {
|
||||
return new SimpleLayoutText(info.getLayoutInitInfo(), name, paneName, archiveName);
|
||||
}
|
||||
|
||||
} // namespace al
|
36
lib/al/Library/Play/Layout/SimpleLayoutText.h
Normal file
36
lib/al/Library/Play/Layout/SimpleLayoutText.h
Normal file
@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <gfx/seadColor.h>
|
||||
#include <math/seadVector.h>
|
||||
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
|
||||
namespace al {
|
||||
class ActorInitInfo;
|
||||
class LayoutInitInfo;
|
||||
|
||||
class SimpleLayoutText : public LayoutActor {
|
||||
public:
|
||||
SimpleLayoutText(const LayoutInitInfo& info, const char* name, const char* paneName,
|
||||
const char* archiveName);
|
||||
|
||||
void start(const sead::Vector2f& pos, const char* str, s32 lifetime);
|
||||
void setPos(const sead::Vector2f& pos);
|
||||
void setText(const char* text);
|
||||
void start(const sead::Vector2f& pos, const char16* str, s32 lifetime);
|
||||
void setText(const char16* str);
|
||||
void start(const sead::Vector2f& pos, const char* category, const char* key, s32 lifetime);
|
||||
void setScale(f32 scale);
|
||||
void setColor(const sead::Color4u8& color);
|
||||
void setPositionCenterH();
|
||||
|
||||
void exeWait();
|
||||
|
||||
private:
|
||||
s32 mLifetime = -1;
|
||||
const char* mPaneName;
|
||||
};
|
||||
|
||||
SimpleLayoutText* createSimpleLayoutText(const ActorInitInfo& info, const char* name,
|
||||
const char* paneName, const char* archiveName);
|
||||
} // namespace al
|
68
lib/al/Library/Play/Layout/SimpleLayoutTextHolder.cpp
Normal file
68
lib/al/Library/Play/Layout/SimpleLayoutTextHolder.cpp
Normal file
@ -0,0 +1,68 @@
|
||||
#include "Library/Play/Layout/SimpleLayoutTextHolder.h"
|
||||
|
||||
#include "Library/Play/Layout/SimpleLayoutText.h"
|
||||
|
||||
namespace al {
|
||||
|
||||
SimpleLayoutTextWrapper::SimpleLayoutTextWrapper(SimpleLayoutText* simpleLayoutText)
|
||||
: mSimpleLayoutText(simpleLayoutText) {}
|
||||
|
||||
SimpleLayoutTextWrapper* SimpleLayoutTextWrapper::start(const sead::Vector2f& pos, const char* str,
|
||||
s32 lifetime) {
|
||||
mSimpleLayoutText->start(pos, str, lifetime);
|
||||
return this;
|
||||
}
|
||||
|
||||
SimpleLayoutTextWrapper* SimpleLayoutTextWrapper::start(const sead::Vector2f& pos,
|
||||
const char16_t* str, s32 lifetime) {
|
||||
mSimpleLayoutText->start(pos, str, lifetime);
|
||||
return this;
|
||||
}
|
||||
|
||||
SimpleLayoutTextWrapper* SimpleLayoutTextWrapper::setScale(f32 scale) {
|
||||
mSimpleLayoutText->setScale(scale);
|
||||
return this;
|
||||
}
|
||||
|
||||
SimpleLayoutTextWrapper* SimpleLayoutTextWrapper::setColor(const sead::Color4u8& color) {
|
||||
mSimpleLayoutText->setColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
SimpleLayoutTextWrapper* SimpleLayoutTextWrapper::setPos(const sead::Vector2f& pos) {
|
||||
mSimpleLayoutText->setPos(pos);
|
||||
return this;
|
||||
}
|
||||
|
||||
SimpleLayoutTextHolder::SimpleLayoutTextHolder(s32 amount, const LayoutInitInfo& info,
|
||||
const char* name, const char* paneName,
|
||||
const char* archiveName)
|
||||
: mNumEntries(amount) {
|
||||
mLayouts = new SimpleLayoutText*[amount];
|
||||
mEntries = new SimpleLayoutTextHolderEntry*[amount];
|
||||
|
||||
for (s32 i = 0; i < mNumEntries; i++) {
|
||||
mLayouts[i] = new SimpleLayoutText(info, name, paneName, archiveName);
|
||||
mEntries[i] = new SimpleLayoutTextHolderEntry(mLayouts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleLayoutTextHolder::reset() {
|
||||
mCurrentIndex = 0;
|
||||
}
|
||||
|
||||
SimpleLayoutTextHolderEntry* SimpleLayoutTextHolder::start(const sead::Vector2f& pos,
|
||||
const char* str) {
|
||||
SimpleLayoutTextHolderEntry* entry = mEntries[mCurrentIndex++];
|
||||
entry->text->start(pos, str, 1);
|
||||
return entry;
|
||||
}
|
||||
|
||||
SimpleLayoutTextHolderEntry* SimpleLayoutTextHolder::start(const sead::Vector2f& pos,
|
||||
const char16_t* str) {
|
||||
SimpleLayoutTextHolderEntry* entry = mEntries[mCurrentIndex++];
|
||||
entry->text->start(pos, str, 1);
|
||||
return entry;
|
||||
}
|
||||
|
||||
} // namespace al
|
42
lib/al/Library/Play/Layout/SimpleLayoutTextHolder.h
Normal file
42
lib/al/Library/Play/Layout/SimpleLayoutTextHolder.h
Normal file
@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <gfx/seadColor.h>
|
||||
#include <math/seadVector.h>
|
||||
|
||||
namespace al {
|
||||
class LayoutInitInfo;
|
||||
class SimpleLayoutText;
|
||||
|
||||
class SimpleLayoutTextWrapper {
|
||||
public:
|
||||
SimpleLayoutTextWrapper(SimpleLayoutText* simpleLayoutText);
|
||||
SimpleLayoutTextWrapper* start(const sead::Vector2f& pos, const char* str, s32 lifetime);
|
||||
SimpleLayoutTextWrapper* start(const sead::Vector2f& pos, const char16_t* str, s32 lifetime);
|
||||
SimpleLayoutTextWrapper* setScale(f32 scale);
|
||||
SimpleLayoutTextWrapper* setColor(const sead::Color4u8& color);
|
||||
SimpleLayoutTextWrapper* setPos(const sead::Vector2f& pos);
|
||||
|
||||
private:
|
||||
SimpleLayoutText* mSimpleLayoutText;
|
||||
};
|
||||
|
||||
struct SimpleLayoutTextHolderEntry {
|
||||
SimpleLayoutTextHolderEntry(SimpleLayoutText* e) : text(e) {}
|
||||
SimpleLayoutText* text;
|
||||
};
|
||||
|
||||
class SimpleLayoutTextHolder {
|
||||
public:
|
||||
SimpleLayoutTextHolder(s32 amount, const LayoutInitInfo& info, const char* name,
|
||||
const char* paneName, const char* archiveName);
|
||||
void reset();
|
||||
SimpleLayoutTextHolderEntry* start(const sead::Vector2f& pos, const char* str);
|
||||
SimpleLayoutTextHolderEntry* start(const sead::Vector2f& pos, const char16_t* str);
|
||||
|
||||
private:
|
||||
s32 mCurrentIndex = 0;
|
||||
s32 mNumEntries = 0;
|
||||
SimpleLayoutText** mLayouts;
|
||||
SimpleLayoutTextHolderEntry** mEntries;
|
||||
};
|
||||
} // namespace al
|
90
lib/al/Library/Play/Layout/SimplePopupMessageLayout.cpp
Normal file
90
lib/al/Library/Play/Layout/SimplePopupMessageLayout.cpp
Normal file
@ -0,0 +1,90 @@
|
||||
#include "Library/Play/Layout/SimplePopupMessageLayout.h"
|
||||
|
||||
#include "Library/Layout/LayoutActionFunction.h"
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
#include "Library/Layout/LayoutActorUtil.h"
|
||||
#include "Library/Layout/LayoutInitInfo.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
#include "Library/Screen/ScreenFunction.h"
|
||||
|
||||
namespace {
|
||||
using namespace al;
|
||||
NERVE_HOST_TYPE_IMPL(SimplePopupMessageLayout, Appear);
|
||||
NERVE_HOST_TYPE_IMPL(SimplePopupMessageLayout, End);
|
||||
NERVE_MAKE(HostType, End);
|
||||
NERVE_HOST_TYPE_IMPL(SimplePopupMessageLayout, Wait);
|
||||
|
||||
NERVES_MAKE_STRUCT(HostType, Appear, Wait);
|
||||
} // namespace
|
||||
|
||||
namespace al {
|
||||
|
||||
SimplePopupMessageLayout::SimplePopupMessageLayout(const char* name, const char* layoutName,
|
||||
const LayoutInitInfo& info,
|
||||
const char* archiveName, bool localize)
|
||||
: LayoutActor(name) {
|
||||
if (localize)
|
||||
initLayoutActorLocalized(this, info, layoutName, archiveName);
|
||||
else
|
||||
initLayoutActor(this, info, layoutName, archiveName);
|
||||
initNerve(&NrvHostType.Appear, 0);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::appear() {
|
||||
startAction(this, "Appear", nullptr);
|
||||
LayoutActor::appear();
|
||||
setNerve(this, &NrvHostType.Appear);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::end() {
|
||||
if (!isNerve(this, &End))
|
||||
setNerve(this, &End);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::startWait() {
|
||||
startAction(this, "Wait", nullptr);
|
||||
LayoutActor::appear();
|
||||
setNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::exeAppear() {
|
||||
refreshPos();
|
||||
|
||||
if (isActionEnd(this, nullptr))
|
||||
setNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::refreshPos() {
|
||||
sead::Vector2f layoutPos = sead::Vector2f::zero;
|
||||
calcLayoutPosFromWorldPos(&layoutPos, this, mWorldPos);
|
||||
setLocalTrans(this, layoutPos);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::exeWait() {
|
||||
refreshPos();
|
||||
|
||||
if (isFirstStep(this))
|
||||
startAction(this, "Wait", nullptr);
|
||||
if (mLifetime >= 0 && isGreaterEqualStep(this, mLifetime))
|
||||
setNerve(this, &End);
|
||||
}
|
||||
|
||||
void SimplePopupMessageLayout::exeEnd() {
|
||||
refreshPos();
|
||||
|
||||
if (isFirstStep(this))
|
||||
startAction(this, "End", nullptr);
|
||||
if (isActionEnd(this, nullptr))
|
||||
kill();
|
||||
}
|
||||
|
||||
bool SimplePopupMessageLayout::isWait() const {
|
||||
return isNerve(this, &NrvHostType.Wait);
|
||||
}
|
||||
|
||||
bool SimplePopupMessageLayout::isAppearOrWait() const {
|
||||
return isWait() || isNerve(this, &NrvHostType.Appear);
|
||||
}
|
||||
|
||||
} // namespace al
|
27
lib/al/Library/Play/Layout/SimplePopupMessageLayout.h
Normal file
27
lib/al/Library/Play/Layout/SimplePopupMessageLayout.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <math/seadVector.h>
|
||||
|
||||
#include "Library/Layout/LayoutActor.h"
|
||||
|
||||
namespace al {
|
||||
class LayoutInitInfo;
|
||||
class SimplePopupMessageLayout : public LayoutActor {
|
||||
public:
|
||||
SimplePopupMessageLayout(const char* name, const char* layoutName, const LayoutInitInfo& info,
|
||||
const char* archiveName, bool localize);
|
||||
void appear() override;
|
||||
void end();
|
||||
void startWait();
|
||||
void exeAppear();
|
||||
void refreshPos();
|
||||
void exeWait();
|
||||
void exeEnd();
|
||||
bool isWait() const;
|
||||
bool isAppearOrWait() const;
|
||||
|
||||
private:
|
||||
s32 mLifetime = -1;
|
||||
sead::Vector3f mWorldPos;
|
||||
};
|
||||
} // namespace al
|
Loading…
Reference in New Issue
Block a user