Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
filemenu_msg.c
Go to the documentation of this file.
1#include "common.h"
2#include "filemenu.h"
3#include "ld_addrs.h"
4
5#include "charset/charset.h"
6
7s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags);
8
10extern PAL_BIN D_802F4560[80][8];
11extern u8 filemenu_glyphBuffer[20][0x80];
12
13#if VERSION_IQUE
14u8 filemenu_msg_C6[] = { 0xF7, 0xF7, 0x84, 0x05, 0x62, 0x14, 0xFD };
15u8 filemenu_msg_C7[] = { 0xFD };
16u8 filemenu_msg_C8[] = { 0xFD };
17u8 filemenu_msg_C9[] = { 0x6C, 0x2B, 0x8D, 0x04, 0xFD };
18u8 filemenu_msg_CA[] = { 0x7C, 0x04, 0x7D, 0x04, 0xFD };
19#elif VERSION_PAL
20u8 filemenu_msg_C6[] = {0xFD}; // SPACE[End]
21u8 filemenu_msg_C7[] = {0xFD}; // [End]
22u8 filemenu_msg_C8[] = {0xFD}; // [End]
23u8 filemenu_msg_C9[] = {0x94, 0xFD}; // BACK[End]
24u8 filemenu_msg_CA[] = {0x25, 0x2E, 0x24, 0xFD}; // END[End]
25u8 filemenu_msg_CA_de[] = {0x25, 0x2E, 0x24, 0x25, 0xFD}; // ENDE[End]
26u8 filemenu_msg_CA_fr[] = {0x26, 0x29, 0x2E, 0xFD};
27u8 filemenu_msg_CA_es[] = {0x26, 0x29, 0x2E, 0xFD};
28#else
29u8 filemenu_msg_C6[] = { 0x33, 0x30, 0x21, 0x23, 0x25, 0xFD }; // SPACE[End]
30u8 filemenu_msg_C7[] = { 0xFD }; // [End]
31u8 filemenu_msg_C8[] = { 0xFD }; // [End]
32u8 filemenu_msg_C9[] = { 0x22, 0x21, 0x23, 0x2B, 0xFD }; // BACK[End]
33u8 filemenu_msg_CA[] = { 0x25, 0x2E, 0x24, 0xFD }; // END[End]
34#endif
35
36#if VERSION_PAL
37u8* filemenu_specialSymbols[][5] = {
42};
43#else
45#endif
46
48 gsDPPipeSync(),
49 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
50 gsDPSetCycleType(G_CYC_1CYCLE),
51 gsDPSetTexturePersp(G_TP_NONE),
52 gsDPSetTextureDetail(G_TD_CLAMP),
53 gsDPSetTextureLOD(G_TL_TILE),
54 gsDPSetTextureFilter(G_TF_POINT),
55 gsDPSetTextureLUT(G_TT_RGBA16),
56 gsDPSetTextureConvert(G_TC_FILT),
57 gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2),
58 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
59 gsDPSetPrimColor(0, 0, 40, 40, 40, 72),
60 gsSPEndDisplayList(),
61};
62
67
68#if VERSION_IQUE
69u32 filemenu_glyphBufferIndex = 0;
70#endif
71
72#if VERSION_PAL
73u8 D_filemenu_802508D0[] = {0x21, 0x24, 0x26, 0x26};
74u8 D_filemenu_802508D4[] = {0x07, 0x07, 0x05, 0x05};
75u8 D_filemenu_802508D8[] = {0x22, 0x22, 0x1A, 0x26};
76u8 D_filemenu_802508DC[] = {0x0B, 0x0B, 0x1A, 0x1A};
77u8 D_filemenu_802508E0[] = {0x32, 0x32, 0x26, 0x2C};
78u8 D_filemenu_802508E4[] = {0x1E, 0x19, 0x0A, 0x18};
79u8 D_filemenu_802508E8[] = {0x08, 0x10, 0x10, 0x14};
80u8 D_filemenu_802508EC[] = {0x0E, 0x0E, 0x16, 0x15};
81u8 D_filemenu_802508F0[] = {0x14, 0x08, 0x12, 0x19};
82u8 D_filemenu_802508F4[] = {0x14, 0x08, 0x12, 0x19};
83u8 D_filemenu_802508F8[] = {0x26, 0x33, 0x3B, 0x3C};
84u8 D_filemenu_802508FC[] = {0x26, 0x33, 0x3C, 0x3F};
85u16 D_filemenu_80250900[] = {0x00B4, 0x00C8, 0x0124, 0x00B4};
86u8 D_filemenu_80250908[] = {0x75, 0x3E, 0xD0, 0x96};
87u8 D_filemenu_8025090C[] = {0xFD, 0x00, 0xFD, 0xFD};
88u8 D_filemenu_80250910[] = {0xA2, 0xA2, 0xA2, 0xA2, 0xA2, 0xC8, 0xC8, 0xC8, 0xA2, 0xB2, 0xA2, 0xA6, 0xA2, 0xC8, 0xA2, 0xA2};
89u8 D_filemenu_80250920[] = {0x76, 0x8A, 0x9A, 0xA2};
90u8 D_filemenu_80250924[] = {0x0A, 0x42, 0x0A, 0x0A};
91u8 D_filemenu_80250928[] = {0x3C, 0x0A, 0x4B, 0x4F};
92u8 D_filemenu_8025092C[] = {0x01, 0x3B, 0x01, 0x01};
93u8 D_filemenu_80250930[] = {0xB6, 0xB6, 0xC2, 0xD4};
94u8 D_filemenu_80250934[] = {0x00, 0x00, 0x14, 0x11};
95u8 D_filemenu_80250938[] = {0x19, 0x0A, 0x19, 0x0A};
96u8 D_filemenu_8025093C[] = {0x10, 0x0A, 0x0A, 0x14};
97u16 D_filemenu_80250940[] = {0x00B6, 0x0113, 0x00BE, 0x00C6};
98u8 D_filemenu_80250948[] = {0x4A, 0x1E, 0x46, 0x44};
99u8 D_filemenu_8025094C[] = {0x14, 0x25, 0x15, 0x12};
100s8 D_filemenu_80250950[] = {0xFD, 0x02, 0xFD, 0xFD};
101u8 D_filemenu_80250954[] = {0x9A, 0xAE, 0x9A, 0x9A};
102u8 D_filemenu_80250958[] = {0xA4, 0xA4, 0xC0, 0xA4};
103u8 D_filemenu_8025095C[] = {0x24, 0x24, 0x32, 0x24};
104u8 D_filemenu_80250960[] = {0xA4, 0xA4, 0xA4, 0xB4};
105u8 D_filemenu_80250964[] = {0xB8, 0xB4, 0xA0, 0xCC};
106u8 D_filemenu_80250968[] = {0x00, 0x00, 0x00, 0x10};
107#endif
108
109
110#if VERSION_IQUE
111u8 filemenu_msg_01[] = { 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x79, 0x04, 0x7A, 0x04, 0xFD };
112u8 filemenu_msg_02[] = { 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x8C, 0x30, 0x6C, 0x12, 0xFD };
113u8 filemenu_msg_03[] = { 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x89, 0x0D, 0x71, 0x15, 0xFD };
114u8 filemenu_msg_04[] = { 0x82, 0x08, 0x68, 0x12, 0x85, 0x0B, 0x6D, 0x05, 0x79, 0x19, 0x7F, 0x06, 0x74, 0x08, 0xFD };
115u8 filemenu_msg_05[] = { 0x82, 0x08, 0x68, 0x12, 0x82, 0x06, 0x85, 0x0B, 0x6D, 0x05, 0x79, 0x19, 0x7F, 0x06, 0x74, 0x08, 0xFD };
116u8 filemenu_msg_06[] = { 0x71, 0x05, 0xFD };
117u8 filemenu_msg_07[] = { 0x82, 0x07, 0x6C, 0x02, 0xFD };
118u8 filemenu_msg_08[] = { 0x7D, 0x0C, 0x85, 0x12, 0x85, 0x05, 0x79, 0x02, 0xFD };
119u8 filemenu_msg_09[] = { 0x8C, 0x30, 0x6C, 0x12, 0x79, 0x19, 0x7F, 0x06, 0xFD };
120u8 filemenu_msg_10[] = { 0x8F, 0x0F, 0x66, 0x0B, 0xFD };
121u8 filemenu_msg_11[] = { 0x82, 0x08, 0x68, 0x12, 0x79, 0x19, 0x7F, 0x06, 0xFD };
122u8 filemenu_msg_12[] = { 0x79, 0x04, 0x7A, 0x04, 0x7D, 0x0C, 0x85, 0x12, 0xFD };
123u8 filemenu_msg_13[] = { 0x75, 0x05, 0xFD };
124u8 filemenu_msg_14[] = { 0x62, 0x06, 0xFD };
125u8 filemenu_msg_15[] = { 0x7D, 0x0F, 0xFD };
126u8 filemenu_msg_16[] = { 0x8C, 0x30, 0x6C, 0x12, 0xFD };
127u8 filemenu_msg_17[] = { 0x89, 0x22, 0x68, 0x03, 0x76, 0x0C, 0x71, 0x05, 0x75, 0x19, 0x76, 0x19, 0xFD };
128u8 filemenu_msg_18[] = { 0x8E, 0x0C, 0x74, 0x06, 0x5F, 0x09, 0x74, 0x08, 0xFD };
129u8 filemenu_msg_19[] = { 0x79, 0x19, 0x7F, 0x06, 0x72, 0x0A, 0x66, 0x11, 0x62, 0x06, 0xFD };
130u8 filemenu_msg_20[] = { 0x75, 0x05, 0xFD };
131u8 filemenu_msg_21[] = { 0x8E, 0x0C, 0x74, 0x06, 0x5F, 0x09, 0x74, 0x08, 0xFD };
132u8 filemenu_msg_22[] = { 0x79, 0x19, 0x7F, 0x06, 0xFD };
133u8 filemenu_msg_23[] = { 0x83, 0x02, 0x84, 0x09, 0x8C, 0x30, 0x6C, 0x12, 0x74, 0x08, 0xFD };
134u8 filemenu_msg_24[] = { 0x8E, 0x0C, 0x74, 0x06, 0x82, 0x08, 0x68, 0x12, 0x82, 0x06, 0x6C, 0x05, 0x6D, 0x05, 0x79, 0x19, 0x7F, 0x06, 0x74, 0x08, 0xFD };
135u8 filemenu_msg_25[] = { 0x79, 0x04, 0x7A, 0x04, 0x7D, 0x0C, 0x85, 0x12, 0xFD };
136u8 filemenu_msg_26[] = { 0x79, 0x19, 0x7F, 0x06, 0xFD };
137u8 filemenu_msg_27[] = { 0x8B, 0x08, 0x7D, 0x08, 0x8C, 0x30, 0x6C, 0x12, 0x8C, 0x04, 0x75, 0x05, 0xFD };
138u8 filemenu_msg_28[] = { 0xFD };
139u8 filemenu_msg_29[] = { 0x82, 0x08, 0x68, 0x12, 0xFD };
140u8 filemenu_msg_30[] = { 0x82, 0x06, 0xFD };
141u8 filemenu_msg_31[] = { 0x8B, 0x08, 0x7D, 0x08, 0x8A, 0x1C, 0x64, 0x1E, 0x75, 0x05, 0xFD };
142u8 filemenu_msg_32[] = { 0x73, 0x1F, 0x7B, 0x11, 0x73, 0x06, 0x6D, 0x05, 0x79, 0x19, 0x7F, 0x06, 0x72, 0x0A, 0x66, 0x11, 0x87, 0x04, 0xFD };
144 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D,
145 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
146 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
147 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
148 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x10, 0x0E, 0x0D, 0xF7,
149 0x00, 0x90, 0x91, 0x20, 0xC6, 0xF7, 0xF7, 0xC9, 0xF7, 0xF7, 0xCA, 0xF7, 0xF7
150};
151u8 filemenu_msg_33[] = { 0x74, 0x08, 0xFD };
152u8 filemenu_msg_34[] = { 0x75, 0x05, 0xFD };
153#elif VERSION_PAL
154
155
156u8 filemenu_msg_24[] = {0x1F, 0xFD};
157
158// Select file to start
159u8 filemenu_msg_01[] = {0x33, 0x45, 0x4C, 0x45, 0x43, 0x54, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x53, 0x54, 0x41, 0x52, 0x54, 0x1A, 0xFD};
160u8 filemenu_msg_01_de[] = {0x37, 0x7A, 0x48, 0x4C, 0x45, 0xF7, 0x45, 0x49, 0x4E, 0x45, 0xF7, 0x24, 0x41, 0x54, 0x45, 0x49, 0x1A, 0xFD};
161u8 D_filemenu_8025099C[] = {0x23, 0x48, 0x4F, 0x49, 0x53, 0x49, 0x52, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0x1A, 0xFD};
162u8 D_filemenu_802509B0[] = {0x25, 0x4C, 0x49, 0x47, 0x45, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0x1A, 0xFD};
163
164// Select file to delete
165u8 filemenu_msg_02[] = {0x33, 0x45, 0x4C, 0x45, 0x43, 0x54, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x44, 0x45, 0x4C, 0x45, 0x54, 0x45, 0x1A, 0xFD};
166u8 filemenu_msg_02_de[] = {0x37, 0x7A, 0x48, 0x4C, 0x45, 0xF7, 0x5A, 0x55, 0xF7, 0x4C, 0x88, 0x53, 0x43, 0x48, 0x45, 0x4E, 0x44, 0x45, 0xF7, 0x24, 0x41, 0x54, 0x45, 0x49, 0x1A, 0xFD};
167u8 D_filemenu_802509F4[] = {0x23, 0x48, 0x4F, 0x49, 0x53, 0x49, 0x52, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0xF7, 0x77, 0xF7, 0x45, 0x46, 0x46, 0x41, 0x43, 0x45, 0x52, 0x1A, 0xFD};
168u8 D_filemenu_80250A10[] = {0x25, 0x4C, 0x49, 0x47, 0x45, 0xF7, 0x45, 0x4C, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0xF7, 0x41, 0xF7, 0x42, 0x4F, 0x52, 0x52, 0x41, 0x52, 0x1A, 0xFD};
169
170// Copy which file
171u8 filemenu_msg_03[] = {0x23, 0x4F, 0x50, 0x59, 0xF7, 0x57, 0x48, 0x49, 0x43, 0x48, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0x1F, 0xFD};
172u8 filemenu_msg_03_de[] = {0x37, 0x45, 0x4C, 0x43, 0x48, 0x45, 0xF7, 0x24, 0x41, 0x54, 0x45, 0x49, 0xF7, 0x4B, 0x4F, 0x50, 0x49, 0x45, 0x52, 0x45, 0x4E, 0x1F, 0xFD};
173u8 D_filemenu_80250A58[] = {0x26, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0xF7, 0x53, 0x4F, 0x55, 0x52, 0x43, 0x45, 0x1F, 0xFD};
174u8 D_filemenu_80250A68[] = {0x8E, 0x31, 0x55, 0x7D, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0xF7, 0x43, 0x4F, 0x50, 0x49, 0x41, 0x53, 0x1F, 0xFD};
175
176// Copy to which file
177u8 filemenu_msg_04[] = {0x23, 0x4F, 0x50, 0x59, 0xF7, 0x54, 0x4F, 0xF7, 0x57, 0x48, 0x49, 0x43, 0x48, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0x1F, 0xFD};
178u8 filemenu_msg_04_de[] = {0x29, 0x4E, 0xF7, 0x57, 0x45, 0x4C, 0x43, 0x48, 0x45, 0xF7, 0x24, 0x41, 0x54, 0x45, 0x49, 0xF7, 0x4B, 0x4F, 0x50, 0x49, 0x45, 0x52, 0x45, 0x4E, 0x1F, 0xFD};
179u8 D_filemenu_80250AB0[] = {0x26, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0xF7, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4E, 0x41, 0x54, 0x49, 0x4F, 0x4E, 0x1F, 0xFD};
180u8 D_filemenu_80250AC8[] = {0x8E, 0x24, 0x86, 0x4E, 0x44, 0x45, 0xF7, 0x4C, 0x4F, 0xF7, 0x43, 0x4F, 0x50, 0x49, 0x41, 0x53, 0x1F, 0xFD};
181
182u8 filemenu_msg_05[] = {0x2E, 0x25, 0x37, 0xFD};
183u8 filemenu_msg_05_de[] = {0x2E, 0x45, 0x55, 0xFD};
184u8 D_filemenu_80250AE4[] = {0x2E, 0x4F, 0x55, 0x56, 0x45, 0x41, 0x55, 0xFD};
185u8 D_filemenu_80250AEC[] = {0x2E, 0x55, 0x45, 0x56, 0x4F, 0xFD};
186u8 filemenu_msg_06[] = {0x2C, 0x45, 0x56, 0x45, 0x4C, 0xFD};
187u8 D_filemenu_80250AFC[] = {0x2E, 0x49, 0x56, 0x45, 0x41, 0x55, 0xFD};
188u8 D_filemenu_80250B04[] = {0x2E, 0x49, 0x56, 0x45, 0x4C, 0xFD};
189u8 filemenu_msg_07[] = {0x30, 0x4C, 0x41, 0x59, 0xF7, 0x34, 0x49, 0x4D, 0x45, 0xFD};
190u8 filemenu_msg_07_de[] = {0x33, 0x50, 0x49, 0x45, 0x4C, 0x5A, 0x45, 0x49, 0x54, 0xFD};
191u8 D_filemenu_80250B24[] = {0x34, 0x45, 0x4D, 0x50, 0x53, 0xFD};
192u8 D_filemenu_80250B2C[] = {0x34, 0x49, 0x45, 0x4D, 0x50, 0x4F, 0xFD};
193u8 filemenu_msg_08[] = {0x24, 0x45, 0x4C, 0x45, 0x54, 0x45, 0xF7, 0x26, 0x49, 0x4C, 0x45, 0xFD};
194u8 filemenu_msg_08_de[] = {0x2C, 0x88, 0x53, 0x43, 0x48, 0x45, 0x4E, 0xFD};
195u8 D_filemenu_80250B48[] = {0x25, 0x46, 0x46, 0x41, 0x43, 0x45, 0x52, 0xFD};
196u8 D_filemenu_80250B50[] = {0x22, 0x4F, 0x52, 0x52, 0x41, 0x52, 0xFD};
197u8 filemenu_msg_09[] = {0x23, 0x41, 0x4E, 0x43, 0x45, 0x4C, 0xFD};
198u8 filemenu_msg_09_de[] = {0x21, 0x42, 0x42, 0x52, 0x45, 0x43, 0x48, 0x45, 0x4E, 0xFD};
199u8 D_filemenu_80250B6C[] = {0x21, 0x4E, 0x4E, 0x55, 0x4C, 0x45, 0x52, 0xFD};
200u8 D_filemenu_80250B74[] = {0x33, 0x41, 0x4C, 0x49, 0x52, 0xFD};
201u8 filemenu_msg_10[] = {0x23, 0x4F, 0x50, 0x59, 0xF7, 0x26, 0x49, 0x4C, 0x45, 0xFD};
202u8 filemenu_msg_10_de[] = {0x2B, 0x4F, 0x50, 0x49, 0x45, 0x52, 0x45, 0x4E, 0xFD};
203u8 D_filemenu_80250B94[] = {0x23, 0x4F, 0x50, 0x49, 0x45, 0x52, 0xFD};
204u8 D_filemenu_80250B9C[] = {0x23, 0x4F, 0x50, 0x49, 0x41, 0x52, 0xFD};
205u8 filemenu_msg_11[] = {0x26, 0x49, 0x52, 0x53, 0x54, 0xF7, 0x30, 0x4C, 0x41, 0x59, 0xFD};
206u8 filemenu_msg_11_de[] = {0x2E, 0x45, 0x55, 0x45, 0x53, 0xF7, 0x33, 0x50, 0x49, 0x45, 0x4C, 0xFD};
207u8 D_filemenu_80250BBC[] = {0x30, 0x52, 0x45, 0x4D, 0x49, 0x7C, 0x52, 0x45, 0xF7, 0x50, 0x41, 0x52, 0x54, 0x49, 0x45, 0xFD};
208u8 D_filemenu_80250BCC[] = {0x30, 0x52, 0x49, 0x4D, 0x45, 0x52, 0x41, 0xF7, 0x36, 0x45, 0x5A, 0xFD};
209u8 filemenu_msg_12[] = {0x0E, 0xFD};
210u8 filemenu_msg_13[] = {0x39, 0x45, 0x53, 0xFD};
211u8 filemenu_msg_13_de[] = {0x2A, 0x41, 0xFD};
212u8 D_filemenu_80250BE4[] = {0x2F, 0x55, 0x49, 0xFD};
213u8 D_filemenu_80250BE8[] = {0x33, 0x81, 0xFD};
214u8 filemenu_msg_14[] = {0x2E, 0x4F, 0xFD};
215u8 filemenu_msg_14_de[] = {0x2E, 0x45, 0x49, 0x4E, 0xFD};
216u8 D_filemenu_80250BF8[] = {0x2E, 0x4F, 0x4E, 0xFD};
217u8 D_filemenu_80250BFC[] = {0x2E, 0x4F, 0xFD};
218u8 filemenu_msg_15[] = {0x24, 0x45, 0x4C, 0x45, 0x54, 0x45, 0xFD};
219u8 filemenu_msg_15_de[] = {0x4C, 0x88, 0x53, 0x43, 0x48, 0x45, 0x4E, 0xFD};
220u8 D_filemenu_80250C10[] = {0x25, 0x46, 0x46, 0x41, 0x43, 0x45, 0x52, 0xFD};
221u8 D_filemenu_80250C18[] = {0x8E, 0x22, 0x4F, 0x52, 0x52, 0x4F, 0xF7, 0x45, 0x4C, 0xFD};
222u8 filemenu_msg_16[] = {0x26, 0x49, 0x4C, 0x45, 0xF7, 0x4E, 0x41, 0x4D, 0x45, 0xF7, 0x49, 0x53, 0xF7, 0x1A, 0xFD};
223u8 filemenu_msg_16_de[] = {0x24, 0x45, 0x52, 0xF7, 0x2E, 0x41, 0x4D, 0x45, 0xF7, 0x4C, 0x41, 0x55, 0x54, 0x45, 0x54, 0xF7, 0x1A, 0xFD};
224u8 D_filemenu_80250C48[] = {0x2E, 0x4F, 0x4D, 0xF7, 0x44, 0x55, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0xF7, 0x1A, 0xFD};
225u8 D_filemenu_80250C5C[] = {0x2E, 0x4F, 0x4D, 0x42, 0x52, 0x45, 0xF7, 0x44, 0x45, 0x4C, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0xF7, 0x1A, 0xFD};
226u8 filemenu_msg_18[] = {0x2F, 0x2B, 0x1F, 0xFD};
227u8 D_filemenu_80250C78[] = {0x8E, 0x36, 0x41, 0x4C, 0x45, 0x1F, 0xFD};
228u8 filemenu_msg_19[] = {0x26, 0x49, 0x4C, 0x45, 0xFD};
229u8 filemenu_msg_19_de[] = {0x24, 0x41, 0x54, 0x45, 0x49, 0xFD};
230u8 D_filemenu_80250C90[] = {0x26, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0xFD};
231u8 D_filemenu_80250C98[] = {0x26, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0xFD};
232u8 filemenu_msg_20_de[] = {0x24, 0x41, 0x54, 0x0E, 0xFD};
233u8 D_filemenu_80250CA8[] = {0x26, 0x49, 0x43, 0x48, 0x0E, 0xFD};
234u8 filemenu_msg_21[] = {0x57, 0x49, 0x4C, 0x4C, 0xF7, 0x42, 0x45, 0xF7, 0x44, 0x45, 0x4C, 0x45, 0x54, 0x45, 0x44, 0x0E, 0xFD};
235u8 filemenu_msg_21_de[] = {0x57, 0x49, 0x52, 0x44, 0xF7, 0x47, 0x45, 0x4C, 0x88, 0x53, 0x43, 0x48, 0x54, 0x0E, 0xFD};
236u8 D_filemenu_80250CD4[] = {0x53, 0x45, 0x52, 0x41, 0xF7, 0x45, 0x46, 0x46, 0x41, 0x43, 0x7D, 0x0E, 0xFD};
237u8 D_filemenu_80250CE4[] = {0x53, 0x45, 0x52, 0x78, 0xF7, 0x42, 0x4F, 0x52, 0x52, 0x41, 0x44, 0x4F, 0x0E, 0xFD};
238u8 filemenu_msg_22[] = {0x2F, 0x2B, 0xF7, 0x54, 0x4F, 0xF7, 0x43, 0x4F, 0x50, 0x59, 0xF7, 0x54, 0x4F, 0xF7, 0x54, 0x48, 0x49, 0x53, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0x1F, 0xFD};
239u8 D_filemenu_80250D10[] = {0x33, 0x4F, 0x4C, 0x4C, 0xF7, 0x41, 0x55, 0x46, 0xF7, 0x44, 0x49, 0x45, 0x53, 0x45, 0xF7, 0x24, 0x41, 0x54, 0x45, 0x49, 0xF7, 0x4B, 0x4F, 0x50, 0x49, 0x45, 0x52, 0x54, 0xF7, 0x57, 0x45, 0x52, 0x44, 0x45, 0x4E, 0x1F, 0xFD};
240u8 D_filemenu_80250D38[] = {0x23, 0x4F, 0x4E, 0x46, 0x49, 0x52, 0x4D, 0x45, 0x52, 0xF7, 0x4C, 0x41, 0xF7, 0x43, 0x4F, 0x50, 0x49, 0x45, 0x1F, 0xFD};
241u8 D_filemenu_80250D4C[] = {0x8E, 0x31, 0x55, 0x49, 0x45, 0x52, 0x45, 0x53, 0xF7, 0x43, 0x4F, 0x50, 0x49, 0x41, 0x52, 0x4C, 0x4F, 0xF7, 0x41, 0x51, 0x55, 0x81, 0xF7, 0x1F, 0xFD};
242u8 filemenu_msg_23[] = {0x33, 0x54, 0x41, 0x52, 0x54, 0xF7, 0x47, 0x41, 0x4D, 0x45, 0xF7, 0x57, 0x49, 0x54, 0x48, 0xFD};
243u8 D_filemenu_80250D78[] = {0x33, 0x50, 0x49, 0x45, 0x4C, 0xF7, 0x4D, 0x49, 0x54, 0xFD};
244u8 D_filemenu_80250D84[] = {0x23, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x43, 0x45, 0x52, 0xF7, 0x55, 0x4E, 0x45, 0xF7, 0x50, 0x41, 0x52, 0x54, 0x49, 0x45, 0xF7, 0x41, 0x56, 0x45, 0x43, 0xF7, 0x4C, 0x45, 0xFD};
245u8 D_filemenu_80250DA4[] = {0x8E, 0x31, 0x55, 0x49, 0x45, 0x52, 0x45, 0x53, 0xF7, 0x45, 0x53, 0x54, 0x45, 0xF7, 0x46, 0x49, 0x43, 0x48, 0x45, 0x52, 0x4F, 0x1F, 0xFD};
246u8 D_filemenu_80250DBC[] = {0x42, 0x45, 0x47, 0x49, 0x4E, 0x4E, 0x45, 0x4E, 0x1F, 0xFD};
247u8 filemenu_msg_26[] = {0x48, 0x41, 0x53, 0xF7, 0x42, 0x45, 0x45, 0x4E, 0xF7, 0x44, 0x45, 0x4C, 0x45, 0x54, 0x45, 0x44, 0x0E, 0xFD};
248u8 D_filemenu_80250DDC[] = {0x57, 0x55, 0x52, 0x44, 0x45, 0xF7, 0x47, 0x45, 0x4C, 0x88, 0x53, 0x43, 0x48, 0x54, 0x0E, 0xFD};
249u8 D_filemenu_80250DEC[] = {0x41, 0xF7, 0x7D, 0x54, 0x7D, 0xF7, 0x45, 0x46, 0x46, 0x41, 0x43, 0x7D, 0x0E, 0xFD};
250u8 D_filemenu_80250DFC[] = {0x48, 0x41, 0xF7, 0x53, 0x49, 0x44, 0x4F, 0xF7, 0x42, 0x4F, 0x52, 0x52, 0x41, 0x44, 0x4F, 0x0E, 0xFD};
251u8 filemenu_msg_27[] = {0xFD};
252u8 D_filemenu_80250E14[] = {0x2C, 0x45, 0xFD};
253u8 D_filemenu_80250E18[] = {0x25, 0x4C, 0xFD};
254u8 filemenu_msg_28[] = {0x23, 0x4F, 0x50, 0x59, 0xF7, 0x46, 0x52, 0x4F, 0x4D, 0xFD};
255u8 D_filemenu_80250E28[] = {0x36, 0x4F, 0x4E, 0xFD};
256u8 D_filemenu_80250E2C[] = {0x23, 0x4F, 0x50, 0x49, 0x45, 0x52, 0xF7, 0x44, 0x55, 0xFD};
257u8 D_filemenu_80250E38[] = {0x23, 0x4F, 0x50, 0x49, 0x41, 0xF7, 0x44, 0x45, 0x4C, 0xFD};
258u8 filemenu_msg_29[] = {0x54, 0x4F, 0xFD};
259u8 D_filemenu_80250E48[] = {0x4E, 0x41, 0x43, 0x48, 0xFD};
260u8 D_filemenu_80250E50[] = {0x41, 0x55, 0xFD};
261u8 D_filemenu_80250E54[] = {0x41, 0x4C, 0xFD};
262u8 D_filemenu_80250E58[] = {0x4B, 0x4F, 0x50, 0x49, 0x45, 0x52, 0x45, 0x4E, 0x0E, 0xFD};
263u8 filemenu_msg_31[] = {0x48, 0x41, 0x53, 0xF7, 0x42, 0x45, 0x45, 0x4E, 0xF7, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x0E, 0xFD};
264u8 D_filemenu_80250E78[] = {0x57, 0x55, 0x52, 0x44, 0x45, 0xF7, 0x45, 0x52, 0x53, 0x54, 0x45, 0x4C, 0x4C, 0x54, 0x0E, 0xFD};
265u8 D_filemenu_80250E88[] = {0x41, 0xF7, 0x7D, 0x54, 0x7D, 0xF7, 0x43, 0x52, 0x7D, 0x7D, 0x0E, 0xFD};
266u8 D_filemenu_80250E94[] = {0x48, 0x41, 0xF7, 0x53, 0x49, 0x44, 0x4F, 0xF7, 0x43, 0x52, 0x45, 0x41, 0x44, 0x4F, 0x0E, 0xFD};
267
268// Enter a file name
269u8 filemenu_msg_33[] = {0x25, 0x4E, 0x54, 0x45, 0x52, 0xF7, 0x41, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x4E, 0x41, 0x4D, 0x45, 0x01, 0xFD};
270u8 D_filemenu_80250EB8[] = {0x27, 0x49, 0x42, 0xF7, 0x45, 0x49, 0x4E, 0x45, 0x4E, 0xF7, 0x2E, 0x41, 0x4D, 0x45, 0x4E, 0xF7, 0x45, 0x49, 0x4E, 0x01, 0xFD};
271u8 D_filemenu_80250ED0[] = {0x25, 0x4E, 0x54, 0x52, 0x45, 0x52, 0xF7, 0x4C, 0x45, 0xF7, 0x4E, 0x4F, 0x4D, 0xF7, 0x44, 0x55, 0xF7, 0x26, 0x49, 0x43, 0x48, 0x49, 0x45, 0x52, 0x01, 0xFD};
272u8 D_filemenu_80250EEC[] = {0x8D, 0x29, 0x4E, 0x54, 0x52, 0x4F, 0x44, 0x55, 0x43, 0x45, 0xF7, 0x4E, 0x4F, 0x4D, 0x42, 0x52, 0x45, 0x01, 0xFD};
273u8 filemenu_msg_36[] = {0x11, 0xFD};
274u8 filemenu_msg_37[] = {0x12, 0xFD};
275u8 filemenu_msg_38[] = {0x13, 0xFD};
276u8 filemenu_msg_39[] = {0x14, 0xFD};
277u8 filemenu_createfile_gridData[] = {0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x66, 0x6A, 0x6D, 0x6F, 0x73, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x81, 0x82, 0x84, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x10, 0x0E, 0x0D, 0xF7, 0x00, 0x90, 0x91, 0x20, 0xF7, 0xF7, 0xF7, 0xC9, 0xF7, 0xF7, 0xCA, 0xF7, 0xF7};
278
279
280#else
281u8 filemenu_msg_01[] = { 0x33, 0x45, 0x4C, 0x45, 0x43, 0x54, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x53,
282 0x54, 0x41, 0x52, 0x54, 0x1A, 0xFD };
283u8 filemenu_msg_02[] = { 0x33, 0x45, 0x4C, 0x45, 0x43, 0x54, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x44,
284 0x45, 0x4C, 0x45, 0x54, 0x45, 0x1A, 0xFD };
285u8 filemenu_msg_03[] = { 0x33, 0x45, 0x4C, 0x45, 0x43, 0x54, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x53,
286 0x41, 0x56, 0x45, 0xFD };
287u8 filemenu_msg_04[] = { 0x23, 0x4F, 0x50, 0x59, 0xF7, 0x57, 0x48, 0x49, 0x43, 0x48, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0x1F,
288 0xFD };
289u8 filemenu_msg_05[] = { 0x23, 0x4F, 0x50, 0x59, 0xF7, 0x54, 0x4F, 0xF7, 0x57, 0x48, 0x49, 0x43, 0x48, 0xF7, 0x46, 0x49,
290 0x4C, 0x45, 0x1F, 0xFD };
291u8 filemenu_msg_06[] = { 0x2E, 0x25, 0x37, 0xFD };
292u8 filemenu_msg_07[] = { 0x2C, 0x45, 0x56, 0x45, 0x4C, 0xFD };
293u8 filemenu_msg_08[] = { 0x30, 0x4C, 0x41, 0x59, 0xF7, 0x34, 0x49, 0x4D, 0x45, 0xFD };
294u8 filemenu_msg_09[] = { 0x24, 0x45, 0x4C, 0x45, 0x54, 0x45, 0xF7, 0x26, 0x49, 0x4C, 0x45, 0xFD };
295u8 filemenu_msg_10[] = { 0x23, 0x41, 0x4E, 0x43, 0x45, 0x4C, 0xFD };
296u8 filemenu_msg_11[] = { 0x23, 0x4F, 0x50, 0x59, 0xF7, 0x26, 0x49, 0x4C, 0x45, 0xFD };
297u8 filemenu_msg_12[] = { 0x26, 0x49, 0x52, 0x53, 0x54, 0xF7, 0x30, 0x4C, 0x41, 0x59, 0xFD };
298u8 filemenu_msg_13[] = { 0x0E, 0xFD };
299u8 filemenu_msg_14[] = { 0x39, 0x45, 0x53, 0xFD };
300u8 filemenu_msg_15[] = { 0x2E, 0x4F, 0xFD };
301u8 filemenu_msg_16[] = { 0x24, 0x45, 0x4C, 0x45, 0x54, 0x45, 0xFD };
302u8 filemenu_msg_17[] = { 0x2F, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0xF7, 0x54, 0x4F, 0xF7, 0x2E, 0x45, 0x57, 0xF7,
303 0x24, 0x41, 0x54, 0x41, 0xFD };
304u8 filemenu_msg_18[] = { 0x33, 0x41, 0x56, 0x45, 0xF7, 0x2F, 0x2B, 0x1F, 0xFD };
305u8 filemenu_msg_19[] = { 0x26, 0x49, 0x4C, 0x45, 0xF7, 0x4E, 0x41, 0x4D, 0x45, 0xF7, 0x49, 0x53, 0xF7, 0x1A, 0xFD };
306u8 filemenu_msg_20[] = { 0x0E, 0xFD };
307u8 filemenu_msg_21[] = { 0x2F, 0x2B, 0x1F, 0xFD };
308u8 filemenu_msg_22[] = { 0x26, 0x49, 0x4C, 0x45, 0xFD };
309u8 filemenu_msg_23[] = { 0x57, 0x49, 0x4C, 0x4C, 0xF7, 0x42, 0x45, 0xF7, 0x44, 0x45, 0x4C, 0x45, 0x54, 0x45, 0x44, 0x0E,
310 0xFD };
311u8 filemenu_msg_24[] = { 0x2F, 0x2B, 0xF7, 0x54, 0x4F, 0xF7, 0x43, 0x4F, 0x50, 0x59, 0xF7, 0x54, 0x4F, 0xF7, 0x54, 0x48,
312 0x49, 0x53, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0x1F, 0xFD };
313u8 filemenu_msg_25[] = { 0x33, 0x54, 0x41, 0x52, 0x54, 0xF7, 0x47, 0x41, 0x4D, 0x45, 0xF7, 0x57, 0x49, 0x54, 0x48, 0xFD };
314u8 filemenu_msg_26[] = { 0x26, 0x49, 0x4C, 0x45, 0xFD };
315u8 filemenu_msg_27[] = { 0x48, 0x41, 0x53, 0xF7, 0x42, 0x45, 0x45, 0x4E, 0xF7, 0x44, 0x45, 0x4C, 0x45, 0x54, 0x45, 0x44,
316 0x0E, 0xFD };
317u8 filemenu_msg_28[] = { 0xFD };
318u8 filemenu_msg_29[] = { 0x23, 0x4F, 0x50, 0x59, 0xF7, 0x46, 0x52, 0x4F, 0x4D, 0xFD };
319u8 filemenu_msg_30[] = { 0x54, 0x4F, 0xFD };
320u8 filemenu_msg_31[] = { 0x48, 0x41, 0x53, 0xF7, 0x42, 0x45, 0x45, 0x4E, 0xF7, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44,
321 0x0E, 0xFD };
322u8 filemenu_msg_32[] = { 0x25, 0x4E, 0x54, 0x45, 0x52, 0xF7, 0x41, 0xF7, 0x46, 0x49, 0x4C, 0x45, 0xF7, 0x4E, 0x41, 0x4D,
323 0x45, 0x01, 0xFD };
324u8 filemenu_createfile_gridData[] = { 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D,
325 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
326 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
327 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
328 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x10, 0x0E, 0x0D, 0xF7,
329 0x00, 0x90, 0x91, 0x20, 0xC6, 0xF7, 0xF7, 0xC9, 0xF7, 0xF7, 0xCA, 0xF7, 0xF7
330};
331u8 filemenu_msg_33[] = { 0x1F, 0xFD };
332u8 filemenu_msg_34[] = { 0x0E, 0xFD };
333#endif
334
335#if VERSION_PAL
336u8 *gFileMenuMessages[] = {
344 filemenu_msg_12, filemenu_msg_36, filemenu_msg_37, filemenu_msg_38, filemenu_msg_39,
345};
346#else
356#endif
357
358#if VERSION_PAL
359u8* D_filemenu_80251018[] = {
360 0,
361 filemenu_msg_01_de,
362 filemenu_msg_02_de,
363 filemenu_msg_03_de,
364 filemenu_msg_04_de,
365 filemenu_msg_05_de,
367 filemenu_msg_07_de,
368 filemenu_msg_08_de,
369 filemenu_msg_09_de,
370 filemenu_msg_10_de,
371 filemenu_msg_11_de,
373 filemenu_msg_13_de,
374 filemenu_msg_14_de,
375 filemenu_msg_15_de,
376 filemenu_msg_16_de,
379 filemenu_msg_19_de,
380 filemenu_msg_20_de,
381 filemenu_msg_21_de,
382 D_filemenu_80250D10,
383 D_filemenu_80250D78,
384 D_filemenu_80250DBC,
385 filemenu_msg_19_de,
386 D_filemenu_80250DDC,
388 D_filemenu_80250E28,
389 D_filemenu_80250E48,
390 D_filemenu_80250E58,
391 D_filemenu_80250E78,
393 D_filemenu_80250EB8,
396 filemenu_msg_36,
397 filemenu_msg_37,
398 filemenu_msg_38,
399 filemenu_msg_39,
400};
401 u8* D_filemenu_802510B8[] = {
402 0,
403 D_filemenu_8025099C,
404 D_filemenu_802509F4,
405 D_filemenu_80250A58,
406 D_filemenu_80250AB0,
407 D_filemenu_80250AE4,
408 D_filemenu_80250AFC,
409 D_filemenu_80250B24,
410 D_filemenu_80250B48,
411 D_filemenu_80250B6C,
412 D_filemenu_80250B94,
413 D_filemenu_80250BBC,
415 D_filemenu_80250BE4,
416 D_filemenu_80250BF8,
417 D_filemenu_80250C10,
418 D_filemenu_80250C48,
421 D_filemenu_80250C90,
422 D_filemenu_80250CA8,
423 D_filemenu_80250CD4,
424 D_filemenu_80250D38,
425 D_filemenu_80250D84,
427 D_filemenu_80250C90,
428 D_filemenu_80250DEC,
429 D_filemenu_80250E14,
430 D_filemenu_80250E2C,
431 D_filemenu_80250E50,
433 D_filemenu_80250E88,
435 D_filemenu_80250ED0,
438 filemenu_msg_36,
439 filemenu_msg_37,
440 filemenu_msg_38,
441 filemenu_msg_39,
442};
443
444u8* D_filemenu_80251158[] = {
445 0,
446 D_filemenu_802509B0,
447 D_filemenu_80250A10,
448 D_filemenu_80250A68,
449 D_filemenu_80250AC8,
450 D_filemenu_80250AEC,
451 D_filemenu_80250B04,
452 D_filemenu_80250B2C,
453 D_filemenu_80250B50,
454 D_filemenu_80250B74,
455 D_filemenu_80250B9C,
456 D_filemenu_80250BCC,
458 D_filemenu_80250BE8,
459 D_filemenu_80250BFC,
460 D_filemenu_80250C18,
461 D_filemenu_80250C5C,
463 D_filemenu_80250C78,
464 D_filemenu_80250C98,
465 D_filemenu_80250CA8,
466 D_filemenu_80250CE4,
467 D_filemenu_80250D4C,
468 D_filemenu_80250DA4,
470 D_filemenu_80250C98,
471 D_filemenu_80250DFC,
472 D_filemenu_80250E18,
473 D_filemenu_80250E38,
474 D_filemenu_80250E54,
476 D_filemenu_80250E94,
477 D_filemenu_80250E18,
478 D_filemenu_80250EEC,
481 filemenu_msg_36,
482 filemenu_msg_37,
483 filemenu_msg_38,
484 filemenu_msg_39,
485};
486
487u8 **gFileMenuMessages_intl[] = {
489 D_filemenu_80251018,
490 D_filemenu_802510B8,
491 D_filemenu_80251158,
492};
493#endif
494
495
496s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2) {
497 MessageCharset* charset;
498 s32 texSizeX;
499 s32 texSizeY;
500 s32 charRasterSize;
501 MessageCharData* charData;
502 u8* raster;
503 s32 charWidth;
504
505 if (flag1 != filemenu_charset) {
506 filemenu_charset = flag1;
508 }
509
510 charset = MsgCharsets[filemenu_charset];
511 texSizeX = charset->texSize.x;
512 texSizeY = charset->texSize.y;
513 charRasterSize = charset->charRasterSize;
514 charData = &charset->rasters[filemenu_charset_raster_id];
515 charWidth = charData->monospaceWidth;
516 raster = charData->raster;
517
518 if (c < 0xA2) {
519 charWidth = charData->charWidthTable[c];
521 gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init);
523 }
524
525 if (filemenu_char_color != color) {
526 filemenu_char_color = color;
527 gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]);
528 }
529
530 if (texSizeX >= 16 && texSizeX % 16 == 0) {
531 gDPLoadTextureBlock_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI,
532 texSizeX, texSizeY, 0,
533 G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
534 } else {
535 gDPLoadTextureTile_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI,
536 texSizeX, texSizeY,
537 0, 0, texSizeX - 1, texSizeY - 1, 0,
538 G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
539 }
540
541 if (flag2) {
542 gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
543 gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
544 filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (2 + x + texSizeX) * 4, (2 + y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400);
545 gDPPipeSync(gMainGfxPos++);
546 gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
547 gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
548 }
549
550 filemenu_draw_rect(x * 4, y * 4, (x + texSizeX) * 4, (y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400);
552 return charWidth;
553 }
554
555#if VERSION_IQUE
556 if (c >= 0x100) {
557 int offset;
558 s32 character;
559 s32* offsetPtr = &filemenu_glyphBufferIndex;
560
561 character = c < 0 ? c + 0xFF : c;
562 offset = (((character >> 8) - 1) * 0x31) + (c & 0xff) + 0x47;
563 *offsetPtr = offset; // Probably modifying data outside of the filemenu_glyphBuffer array
564
565 load_font_data(charset_standard_OFFSET + offset * 0x80, 0x80, &filemenu_glyphBuffer[*offsetPtr][0]);
566
568 gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init);
570 }
571
572 if (filemenu_char_color != color) {
573 filemenu_char_color = color;
574 gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]);
575 }
576
577 gDPLoadTextureBlock_4b(gMainGfxPos++, &filemenu_glyphBuffer[*offsetPtr][0], G_IM_FMT_CI, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
578
579 if (flag2) {
580 gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
581 gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
582 filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (x + 18) * 4, (y + 18) * 4, 0, 0, 0, 0x400, 0x400);
583 gDPPipeSync(gMainGfxPos++);
584 gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
585 gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
586 }
587
588 filemenu_draw_rect(x * 4, y * 4, (x + 16) * 4, (y + 16) * 4, 0, 0, 0, 0x400, 0x400);
590 *offsetPtr = (*offsetPtr + 1) % 20;
591
592 return 16;
593 }
594#endif
595
596 if (c == 0xF7) {
597 return charWidth - 6;
598 }
599
600 switch (c) {
601 case 0xF3:
603 break;
604 case 0xF4:
606 break;
607 case 0xF5:
609 break;
610 case 0xF6:
612 break;
613 }
614 return 0;
615}
616
617void filemenu_draw_message(u8* message, s32 x, s32 y, s32 alpha, s32 color, u32 flags) {
618 s32 flag1 = flags & 1;
619 s32 flag2 = flags >> 3;
620
621 flag2 &= 1;
622 if (flag1 == 1) {
623 y -= 2;
624 }
625
626 if ((u32)message < 0x100) {
627 if ((u32)message - 0xA2 >= 0x4E) {
628 filemenu_draw_char((s32)message, x, y, flag1, color, flag2);
629 return;
630 }
631 if ((s32) message >= 0xC6) {
632#if VERSION_PAL
633 message = (u8*) filemenu_specialSymbols[gCurrentLanguage][(s32) message - 0xC6];
634#else
635 message = (u8*)filemenu_specialSymbols[(s32) message - 0xC6];
636#endif
637 }
638 }
639
640 if ((s32) message < 0) {
641 u8* tmp;
642 filemenu_draw_char(0xF3, x, y, flag1, color, flag2);
643 tmp = message;
644 while (*tmp != 0xFD) {
645#if VERSION_IQUE
646 int ord = *tmp;
647 if (ord >= MSG_CHAR_MULTIBYTE_FIRST && ord <= MSG_CHAR_MULTIBYTE_LAST) {
648 tmp++;
649 ord = (*tmp << 8) + ord;
650 x += filemenu_draw_char(ord, x, y + 1, flag1, color, flag2);
651 } else {
652 ord = *tmp;
653 x += filemenu_draw_char(ord, x, y, flag1, color, flag2);
654 }
655 tmp++;
656#else
657 x += filemenu_draw_char(*tmp, x, y, flag1, color, flag2);
658 tmp++;
659#endif
660 }
661 }
662}
663
665#if VERSION_PAL
666 return gFileMenuMessages_intl[gCurrentLanguage][idx];
667#else
668 return (u8*)gFileMenuMessages[idx];
669#endif
670}
671
672void filemenu_draw_file_name(u8* filename, s32 length, s32 x, s32 y, s32 alpha, s32 arg5, s32 arg6, s32 charWidth) {
673 s32 i;
674
675 for (i = 0; i < length; i++) {
676 u32 c = filename[i];
677
678 if (c != 0xF7) {
679#if VERSION_IQUE
680 // Numerals get drawn one pixel lower than other characters
681 if (c >= MSG_CHAR_DIGIT_0 && c <= MSG_CHAR_DIGIT_9) {
682 filemenu_draw_message((u8*)c, x + (i * charWidth), y + 1, alpha, arg5, arg6);
683 } else {
684 filemenu_draw_message((u8*)c, x + (i * charWidth), y, alpha, arg5, arg6);
685 }
686#elif VERSION_PAL
687 s32 offset = (8 - msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1)) / 2;
688
689 filemenu_draw_message((u8*)c, x + (i * charWidth) + offset, y, alpha, arg5, arg6);
690#else
691 filemenu_draw_message((u8*)c, x + (i * charWidth), y, alpha, arg5, arg6);
692#endif
693 }
694 }
695}
unsigned char charset_standard_OFFSET[]
MessageCharData * rasters
#define PAL_BIN
s8 flags
Definition demo_api.c:15
@ LANGUAGE_DE
Definition enums.h:6401
@ LANGUAGE_ES
Definition enums.h:6403
@ LANGUAGE_EN
Definition enums.h:6400
@ LANGUAGE_FR
Definition enums.h:6402
@ MSG_CHAR_DIGIT_0
Definition enums.h:5872
@ MSG_CHAR_DIGIT_9
Definition enums.h:5881
void filemenu_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
u8 filemenu_msg_31[]
u8 filemenu_glyphBuffer[20][0x80]
s32 filemenu_specialSymbols[]
u8 filemenu_msg_33[]
s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2)
u8 filemenu_msg_06[]
u8 filemenu_msg_08[]
u8 filemenu_msg_15[]
u8 filemenu_msg_23[]
u8 filemenu_msg_22[]
u8 filemenu_msg_17[]
u8 filemenu_msg_CA[]
u8 filemenu_msg_25[]
u8 filemenu_msg_C8[]
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags)
Definition msg.c:1578
u8 filemenu_msg_29[]
u8 filemenu_msg_01[]
u8 filemenu_msg_18[]
void filemenu_draw_file_name(u8 *filename, s32 length, s32 x, s32 y, s32 alpha, s32 arg5, s32 arg6, s32 charWidth)
Gfx * filemenu_savedGfxPos
u8 filemenu_msg_27[]
Gfx filemenu_dl_draw_char_init[]
s32 gFileMenuMessages[]
u8 filemenu_msg_12[]
u8 filemenu_msg_30[]
u8 filemenu_msg_21[]
u8 filemenu_msg_19[]
void filemenu_draw_message(u8 *message, s32 x, s32 y, s32 alpha, s32 color, u32 flags)
u8 filemenu_msg_05[]
u8 filemenu_msg_C7[]
PAL_BIN D_802F4560[80][8]
s32 filemenu_char_color
u8 filemenu_msg_C9[]
u8 filemenu_msg_10[]
u8 filemenu_msg_24[]
u8 filemenu_msg_02[]
u8 filemenu_msg_C6[]
u8 filemenu_msg_03[]
s32 filemenu_charset
u8 * filemenu_get_menu_message(s32 idx)
u8 filemenu_msg_11[]
u8 filemenu_msg_04[]
u8 filemenu_msg_13[]
u8 filemenu_msg_14[]
u8 filemenu_msg_07[]
u8 filemenu_createfile_gridData[]
u8 filemenu_msg_20[]
s32 filemenu_charset_raster_id
u8 filemenu_msg_34[]
u8 filemenu_msg_16[]
MessageCharset * MsgCharsets[5]
Definition msg_data.c:865
u8 filemenu_msg_32[]
u8 filemenu_msg_28[]
u8 filemenu_msg_26[]
u8 filemenu_msg_09[]
void load_font_data(Addr offset, u16 size, void *dest)
Definition msg.c:218
#define PM_CC_07
Definition macros.h:282
#define gCurrentLanguage
Definition variables.h:115
Gfx * gMainGfxPos
Definition cam_main.c:15