-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPrepScreen.txt
More file actions
110 lines (87 loc) · 3.89 KB
/
PrepScreen.txt
File metadata and controls
110 lines (87 loc) · 3.89 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
addresses are FE8U
Kirb started this.
SALLYCURSOR proc layout:
00 | header
58 | word | active prep screen map menu item type
this is checked when on map to decide on whether swapping units is allowed
(since "view map" and "formation" have otherwise the same effect)
AtMenu proc layout:
00 | header
29 | byte | unit count
2A | byte | max selected unit count
2B | byte | selected unit count
2D | byte
2E | byte
2F | byte | some bitfield related to the support menu item
30 | byte
31 | byte
32 | byte
33 | byte | current submenu?
0 = still in menu?
1 = picking units
2 = managing items
3 = saving
4 = viewing supports
5 = ?
34 | byte
35 | byte | active prep screen menu item type
36 | byte | (bool) true to end prep screen
3C | word
40 | word
prep screen menu proc: (scr: FE8U:8A186EC)
00 | header
29 | byte | (bool) is displaying R-text for active item
2A | byte | active menu item index
2B | byte | menu item count
34 | short | origin tile x
36 | short | origin tile y
38 | word[8] | item dummy proc pointer array
58 | word | pointer to on B press callback (sig: "int (*) (struct Proc* menuParent);")
5C | word | pointer to on Start press callback (sig: "int (*) (struct Proc* menuParent);")
the return value of OnBPress and OnStartPress should be 1 on success, 0 on failure. The prep screen menu will react accordingly
60 | word | pointer to on end callback (sig: "void (*) (struct Proc* menuParent);")
prep screen menu item dummy proc: (src: FE8U:8A186DC)
00 | header
2C | word | pointer to on select callback (sig: "void (*) (struct Proc* menuParent);")
30 | word | R-help text id
34 | word | label text id
38 | byte | (bool) true = unusable/grayed out
39 | byte | item type id
For non-map prep screen menu:
0 = pick units
1 = items
2 = save
3 = link arena cancel
4 = support
5 = ? (one of: fortune, ranking)
6 = ? (one of: fortune, ranking)
7 = check map
8 = start battle?
For map prep screen menu:
1 = view map
2 = formation
3C | TextHandle
The prep screen menu system seems generic enough that it could be used for any menu.
PREP SCREEN ITEM USE SCREEN (thanks circles):
proc layout (scr: FE8U:08A19064)
00 | header
2C | word | unit pointer
30 | word | current hovered item index
38 | word | current hovered item index for help text (0xFF if none)
proc scr labels:
label 0 (FE8U:08A1906C): start (fade in)
label 1 (FE8U:08A19094): main idle (handles keyin, jumping to label 2, 6, and displaying/managing help text)
label 2 (FE8U:08A190A4): "are you sure"? jumps to either 1 or 3.
label 3 (FE8U:08A190C4): do use item. Jumps to 4, 5, or falls through depending on item id.
(FE8U:08A190D4): (fallback from label 3) stat boost use effect. calls blocking proc (src: FE8U:08A191A4). jumps to 1 when finished.
label 4 (FE8U:08A190E4): juna fruit use effect. calls blocking proc (src: FE8U:08A191C4). jumps to 1 when finished.
label 5 (FE8U:08A190FC): promotion use effect. inline (no blocking proc). jumps to 1 when finished.
label 6 (FE8U:08A19174): fade out into end
label 7 (FE8U:08A1918C): end
0809C4E4 (called under label 0, and towards the end of promotion effect) is what draws everything. It sets up a "parallel worker" proc that updates the sms.
promotion effect fades into a completely different screen and calls promotion stuff once there.
PREP SCREEN HAND CURSOR:
proc layout (src: FE8U:08A20C1C)
00 | header
??
It is accessed through a single instance and functions calling FindProc (or whataver name is used for that function in your env)