blob: e85590b9599ed6bc1efd5505610760a5f0d80aeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
#ifndef TEXTBOX_H
#define TEXTBOX_H
#include "global.h"
#include "entity.h"
#include "structures.h"
typedef struct {
u8 doTextBox;
u8 unk;
u8 textSpeed;
u8 unk3; // HI?
u8 textWindowWidth;
u8 textWindowHeight;
u8 textWindowPosX;
u8 textWindowPosY;
u16 textIndex;
u16 unk2; // HI?
u16 field_0xc;
u16 field_0xe;
u32 field_0x10;
u32 field_0x14;
u32 field_0x18;
u32 field_0x1c;
} TextBox;
extern TextBox gTextBox;
typedef struct {
TextBox textBox;
u8 _20;
u8 _21;
u16 _22;
u16 _24;
u16 _26;
u16 _28;
u8 _2a[0x2];
void* _2c;
u8 _30[0x20];
WStruct _50;
char playerName[0xa];
u8 _66[0x10];
u8 _76;
u8 _77[0x11];
u8 _88;
u8 state;
u8 _8a;
u8 _8b;
u8 _8c;
u8 _8d;
u8 _8e;
u8 _8f;
u8 _90;
u8 _91;
s8 _92;
u8 _93;
u8 _94;
u8 _95;
u8 _96;
u8 _97;
union {
u32 word;
struct {
u8 b0;
u8 b1;
u8 b2;
s8 sizeScale;
} bytes;
} _98;
u8 _9c;
u8 _9d;
u16 _9e;
u16 _a0;
u16 _a2;
u16 _a4;
u16 _a6;
} CurrentTextBox;
extern CurrentTextBox gCurrentTextBox;
static_assert(sizeof(CurrentTextBox) == 0xa8);
/**
* @brief Initialize the message system.
*/
void MessageInitialize(void);
/**
* @brief Show a message on screen.
*
* @param index u32 Message index
*/
void ShowTextbox(u32 index);
/**
* @brief Show a message at screen posiiton.
*
* @param index u32 Message index
* @param x u32 Screen x
* @param y u32 Screen y
*/
void TextboxAtPosition(u32 index, u32 x, u32 y);
/**
* @brief Show a message that attempts not to obscure the entity.
*
* @param index u32 Message index
* @param entity Entity* Your important entity
*/
void TextboxNoOverlap(u32 index, Entity* entity);
/**
* @brief Show a message that attempts not to obscure the camera target.
*
* @param index u32 Message index
*/
void TextboxNoOverlapFollow(u32 index);
#endif
|