diff options
| author | robojumper <robojumper@gmail.com> | 2025-08-03 15:51:20 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:13:11 +0200 |
| commit | 402586bf5248a703934bd3cbcdc37c5285ec2fe3 (patch) | |
| tree | 30ed6a0873c359204d32c15348b7ccad18700126 /include | |
| parent | b4200519b168b970b3afdccf357d1ef42001b52a (diff) | |
d_lyt_common_title OK
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/lyt/d_lyt_common_title.h | 63 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_control_game.h | 7 | ||||
| -rw-r--r-- | include/sized_string.h | 4 |
3 files changed, 73 insertions, 1 deletions
diff --git a/include/d/lyt/d_lyt_common_title.h b/include/d/lyt/d_lyt_common_title.h new file mode 100644 index 00000000..9b2261fd --- /dev/null +++ b/include/d/lyt/d_lyt_common_title.h @@ -0,0 +1,63 @@ +#ifndef D_LYT_COMMON_TITLE_H +#define D_LYT_COMMON_TITLE_H + +#include "common.h" +#include "d/lyt/d2d.h" +#include "s/s_State.hpp" +#include "sized_string.h" + +class dLytCommonTitle_c { +public: + dLytCommonTitle_c(); + virtual ~dLytCommonTitle_c() {} + + bool build(); + bool remove(); + bool execute(); + bool draw(); + + bool set(s32 arg, const char *title, const char *caption); + const char *setSubTitle(s32 msgIdx); + const char *setSysTitle(s32 msgIdx); + const char *setSysCaption(s32 msgIdx); + +private: + void gotoStateNone(); + void startAnim(int idx); + void stopAnim(int idx); + void playBackwards(d2d::AnmGroup_c &anm); + + void applyText(); + void applyTextChange(s32 arg); + + void applyTitle(s32 arg); + void applyCaption(s32 arg); + + d2d::AnmGroup_c &getAnm(int idx) { + return mAnm[idx]; + } + + STATE_FUNC_DECLARE(dLytCommonTitle_c, None); + STATE_FUNC_DECLARE(dLytCommonTitle_c, In); + STATE_FUNC_DECLARE(dLytCommonTitle_c, Wait); + STATE_FUNC_DECLARE(dLytCommonTitle_c, Out); + STATE_FUNC_DECLARE(dLytCommonTitle_c, Change); + + /* 0x004 */ UI_STATE_MGR_DECLARE(dLytCommonTitle_c); + /* 0x040 */ d2d::LytBase_c mLyt; + /* 0x0D0 */ d2d::ResAccIf_c mResAcc; + /* 0x440 */ d2d::AnmGroup_c mAnm[8]; + /* 0x640 */ SizedString<0x20> mTitle; + /* 0x660 */ SizedString<0x20> mCaption; + + /* 0x680 */ UNKWORD field_0x680; + /* 0x680 */ UNKWORD field_0x684; + /* 0x688 */ s32 mStep; + /* 0x68C */ bool mChangeRequest; + /* 0x68D */ bool field_0x68D; + /* 0x68E */ bool mVisible; + /* 0x68F */ bool field_0x68F; + /* 0x690 */ bool field_0x690; +}; + +#endif diff --git a/include/d/lyt/d_lyt_control_game.h b/include/d/lyt/d_lyt_control_game.h index 1c43e800..31858c3e 100644 --- a/include/d/lyt/d_lyt_control_game.h +++ b/include/d/lyt/d_lyt_control_game.h @@ -21,6 +21,10 @@ public: return sInstance; } + bool getField_0x15C67() const { + return field_0x15C67; + } + STATE_FUNC_DECLARE(dLytControlGame_c, Normal); STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SetRes); STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SyncRes); @@ -37,7 +41,8 @@ public: private: /* 0x00068 */ UI_STATE_MGR_DECLARE(dLytControlGame_c); - + /* 0x000A4 */ u8 _0x000A4[0x15C67 - 0x000A4]; + /* 0x15C67 */ bool field_0x15C67; static dLytControlGame_c *sInstance; }; diff --git a/include/sized_string.h b/include/sized_string.h index 44e26ebe..3d67e74a 100644 --- a/include/sized_string.h +++ b/include/sized_string.h @@ -37,6 +37,10 @@ struct SizedString { return mChars; } + void empty() { + mChars[0] = '\0'; + } + void operator=(const char *src) { if (src != mChars) { mChars[0] = '\0'; |
