Add text script command macro for textbox auto press

This commit is contained in:
DizzyEggg
2025-06-18 14:03:03 +02:00
parent a20ec30b07
commit 5c3b02570d
22 changed files with 195 additions and 174 deletions

View File

@@ -17,8 +17,8 @@ extern u8 gFormatBuffer_Names[10][FORMAT_BUFFER_LEN];
extern u8 gSpeakerNameBuffer[FORMAT_BUFFER_LEN];
extern u8 gFormatBuffer_FriendArea[FRIEND_AREA_BUFFER_LEN];
void sub_8014144(void);
void sub_801416C(s32 param_1,s32 param_2);
void ResetDialogueBox(void);
void SetDialogueBoxAutoPressFrames(s32 endMsgFrames, s32 midMsgFrames);
void CreateDialogueBoxAndPortrait(const u8 *text, void *param_2, MonPortraitMsg *monPortraitPtr, u16 flags);
void CreateYesNoDialogueBoxAndPortrait_DefaultYes(const u8 *text, MonPortraitMsg *monPortraitPtr, u16 flags);
void CreateYesNoDialogueBoxAndPortrait_DefaultNo(const u8 *text, MonPortraitMsg *monPortraitPtr, u16 flags);
@@ -30,10 +30,13 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags);
void PrintFormattedStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr);
void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing);
#define STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS_2 0x1 // Same as STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS, except the check is in a different place. Functionally, both need to be set to wait for the button press.
#define STR_FORMAT_FLAG_TIMED_AUTO_MSG_CLOSE 0x2 // Textbox closes automatically after waiting a couple of frames.
#define STR_FORMAT_FLAG_DIALOGUE_SOUND 0x4
#define STR_FORMAT_FLAG_SPEAKER_NAME 0x8
#define STR_FORMAT_FLAG_INSTANT_TEXT 0x20
#define STR_FORMAT_FLAG_INSTANT_TEXT_ON_AB_PRESS 0x40
#define STR_FORMAT_FLAG_NEW_LINE_TERMINATES 0x80
#define STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS 0x100
#endif // GUARD_STRING_FORMAT_H