5 #include "YesNoPrompt.h"
7 #include "StageSelect.h"
8 #include "SaveSelect.h"
12 #define MSG_X ((SCREEN_WIDTH / 2) - (MSG_W / 2))
13 #define MSG_NORMAL_Y ((SCREEN_HEIGHT - MSG_H) - 2)
14 #define MSG_UPPER_Y 24
17 #define MSG_LINE_SPACING 16
23 TB_DRAW_AT_TOP
= 0x01,
26 TB_LINE_AT_ONCE
= 0x04,
27 TB_VARIABLE_WIDTH_CHARS
= 0x08,
28 TB_CURSOR_NEVER_SHOWN
= 0x10
37 void SetVisible(bool enable
, uint8_t flags
= TB_DEFAULTS
);
40 void AddText(const char *str
);
41 void SetText(const char *str
);
44 void SetFace(int newface
);
46 void SetFlags(uint8_t flags
, bool enable
);
47 void SetFlags(uint8_t flags
);
48 void ShowCursor(bool enable
);
50 TB_YNJPrompt YesNoPrompt
;
51 TB_ItemImage ItemImage
;
52 TB_StageSelect StageSelect
;
53 TB_SaveSelect SaveSelect
;
59 static void DrawFrame(int x
, int y
, int w
, int h
);
61 uint8_t GetFlags() { return fFlags
; }
62 void SetCanSpeedUp(bool newstate
);
72 uint8_t fFace
; // current NPC face or 0 if none
73 int fFaceXOffset
; // for face slide-in animation
75 // currently visible lines
76 char fLines
[MSG_NLINES
][80];
80 // handles scrolling lines off
84 // chars waiting to be added
85 char fCharsWaiting
[256];
86 uint8_t fCWHead
, fCWTail
;
91 // blinking cursor control
106 #define MSG_UPPER_INVISIBLE 2
112 #define YESNO_APPEAR 1
122 // 1 - normal text box
123 // 2 - upper text box, box is invisible
124 // 3 - upper text box, box is visible
131 uchar face; // current face or 0 if none
132 int face_xoff; // for face slide-in animation
134 char instantline; // instead of a char at a type, we do a line at a time
136 char line[MSG_NLINES][80];
143 char chars_waiting[256];
144 uchar cwhead, cwtail;