-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextBoxes.txt
More file actions
139 lines (124 loc) · 5.69 KB
/
TextBoxes.txt
File metadata and controls
139 lines (124 loc) · 5.69 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Addresses are MFOMTU
TextBoxHandle struct layout:
+00 | word | auto_ptr to TextBox
TextBox struct layout:
+000 | bit[00-01] | idk
+000 | bit[02-06] | bg map block to use (in increments of $800) for the box gfx
+000 | bit[07-08] | bg tile block to use (in increments of $4000) for the box gfx
+000 | bit[09-18] | bg base tile index to use for the box gfx
+000 | bit[19-22] | bg pal id to use for the box gfx
+004 | word |
+008 | word | state identifier?
state 0 = no box
state 1 = box opening?
state 2 = box closing?
state 3 = text is finished
state 4 = text is advancing
state 5 = text is waiting for input
state 6 = waiting for user choice?
+00C | byte | level of "displayedness" of the box? (like when it opens and closes) range 0 (closed) to 8 (opened)
+00D | byte |
+010 | PaletteSlotHolder |
+018 | TileVramSlotHodler |
+020 | VBlankNodeList
+03C | TransferRequestList<8> (?)
+00 | word | current size (max 8)
+04 | array of 8 (max) TransferRequest objects (size:$10)
+0C0 | some VBlankNode child (vtable 080EFDD8; size $10; [+0C] = TextBox+3C)
+0D0 | TextBoxDisplayManagerImpl
+0EC | TextBoxInterpreter
+120 | TextBoxTextTileSyncVNode
+130 | CheckerboardFakeTransparencyVNode
+148 | TextBoxBoxSyncVNode
+158 | word | current choice id for choice boxes?
+15C | word | something related to choice boxes?
+160 | DefinedSprite | hand cursor sprite
+190 | DefinedSprite | "text box arrow" sprite
+1C0 | SpriteAnimator | sprite animator for either the hand cursor or the "text box arrow"
+1D4 | TileVramSlotHodler |
+1DC+00bit | 1bit | ?
+1DC+01bit | 1bit | ?
+1E4 | some object
+00 | word | pointer to some dynamically allocated object (size: $20)
+00 | array of 4 of the following:?
+00 | word | ?
+04 | short | ?
+1E8 | PaletteSlotHolder
+1F0 | bit[00] | ??
+1F0 | bit[01] | ??
+500 | byte | 0? (wait why are we suddenly jumping $310 bytes ahead)
+504 | DefinedSprite | heart sprite
+534 | SpriteAnimator | heart sprite animator
+548 | PaletteSlotHolder
+550 | bit[00-05] | config bits?
& 01 = play some sound
& 04 = play text progess beeping noise thing
& 10 = play sounds when switching options in a text choice.
TextBoxDisplayManagerImpl struct layout:
+00 | TextBoxDisplayManager (vtable 080EFE00)
+04 | word | pointer to TextBox+10
+08 | word[3] | array of pointers to dynamically allocated TextBoxLineGfx (one per text line)
+14 | short | current x tile
+16 | short | current display line (0-3)
+18 | byte | current top gfx line (this may be different from 0 because it reuses the top one for the bottom one each time a scroll occurs)
+19 | byte | bool oam needs update? (set when scroll occurs)
+1A | byte | bool character added?
+1B | byte | bool non-blank character added (used to play the sound(tm))
TextBoxLineGfx struct layout:
+00 | array of 7 objects (size: $10) (one per sprite on the line)
+00 | word | pointer to dynamically allocated gfx buffer (size: $104)
+00 | word | ??
+04 | byte[$100] | tile gfx buffer (8 tiles)
+04 | TileVramManagerHandle
+08 | word | tile identifier
+0C | byte | needs sync bool (aka graphics were updated)
TextBoxTextTileSyncVNode struct layout:
+00 | VBlankNode (vtable 080EFDC8)
+0C | pointer to TextBoxDisplayManagerImpl
TextBoxBoxSyncVNode struct layout:
+00 | VBlankNode (vtable 080EFDB8)
+0C | bit[00-04] | from [TextBox:bit[02-06]] (bg map block (in increments of $800))
+0C | bit[05-14] | from [TextBox:bit[09-18]] (bg tile base to use for the box gfx)
+0C | bit[15-18] | from [TextBox:bit[19-22]] (bg pal id to use for the box gfx)
+0C | bit[19-22] | palette index from TextBox+10 (some obj tile id)
TextBoxInterpreter struct layout: (constructed by MFOMTU:080B2FA8)
+00 | word | state identifier
state 0 = end
state 1 = advance normally
state 2 = waiting for input)
+04 | short | text speed ($100 = 1 character per tick/frame)
+06 | short | text cursor (incremented by text speed each tick/frame)
+08 | word | pointer to null-terminated string
+0C | word | pointer to TextBoxCharExpander instance
+10 | word | pointer to another null-terminated string (takes priority over [+08])
+14 | byte[] | string buffer (for expanded text bits)
TextBoxCharExpander struct layout:
+00 | vtable ()
TextBoxDisplayManager struct layout:
+00 | vtable (080EFE48)
TextBoxInputManager struct layout:
+00 | vtable (080EFE30)
StaticTextBoxInputManager struct layout:
+00 | TextBoxInputManager (vtable 080EFDE8)
+04 | word | pressed keys
+08 | byte | allow advancing to next textbox
TextBoxCharExpander vtable layout:
+08 | (destructor)
+0C | <something> textTryExpandCharacter(int character); // expands, for example, the player name maybe?
TextBoxDisplayManager vtable layout:
+08 | (destructor)
+0C | int textDrawCharacter(int character); // returns 0 on failure
+10 | void textDoCarriageReturn(void);
+14 | void textDoLineFeed(void);
+18 | void textDoFormFeed(void);
TextBoxInputManager vtable layout:
+08 | (destructor)
+0C | int textIsInstant(void);
+10 | int textShouldWaitForInput(void);
+1C | int textCheckInput(void);
Text codes:
actually follows ascii:
- $05 is enquiry (wait for A press)
- $0A is line feed (go to new line; and acutally do not reset x cursor)
- $0C is form feed (clear the text box and start over)
- $0D is carriage return (reset x cursor)