Skip to content

Commit 591f8d3

Browse files
committed
Add FontRes split
1 parent cb197e3 commit 591f8d3

3 files changed

Lines changed: 73 additions & 64 deletions

File tree

configs/main.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ segments:
183183
- [0x1CB560, cpp, text_002CA560]
184184
- [0x1D3D80, cpp, FGDK3/Code/GameShell] # -O0 - Guessed filepath and name
185185
- [0x1D4598, cpp, text_002D3598]
186+
- [0x1D79B8, cpp, FGDK3/Code/FontRes]
186187
- [0x1D7BE8, cpp, text_002D6BE8]
187188
- [0x1DA560, cpp, text_002D9560]
188189
- [0x1DBB38, cpp, FGDK3/Code/DrawShape]
@@ -370,7 +371,9 @@ segments:
370371

371372
- [0x343CE8, .rodata, FGDK3/Code/GameShell]
372373
- [0x343D68, .rodata, text_002D3598]
374+
- [0x344A98, .rodata, FGDK3/Code/FontRes]
373375
- [0x344B70, .rodata, text_002D6BE8]
376+
374377
- [0x344DC8, .rodata, text_002D9560]
375378
- [0x345438, .rodata, FGDK3/Code/DrawShape]
376379
- [0x345498, .rodata, text_002DE720]

src/FGDK3/Code/FontRes.cpp

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#include "common.h"
2+
#include "unk.h"
3+
4+
#include "FGDK3/FontRes.h"
5+
#include "FGDK3/ThrowCat.h"
6+
#include "FGDK3/RelRecv.h"
7+
8+
9+
#ifdef NON_MATCHING
10+
Status FontRes_InternalInitialise() {
11+
return Status(0xFFFFFFFF, "c:/coding/fgdk3/Code/Common/FontRes.cpp", 47);
12+
}
13+
#else
14+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", FontRes_InternalInitialise__Fv);
15+
#endif
16+
17+
void FontRes_InternalFinalise() {
18+
return;
19+
}
20+
21+
#ifdef NON_MATCHING
22+
23+
StdInit_ModuleDescription FontRes_StdInit_Description = {
24+
0,
25+
&FontRes_StdInit_UsedModules
26+
};
27+
28+
void * const FontRes_StdInit_UsedModules[] = {
29+
&FontRes_InternalInitialise,
30+
&FontRes_InternalFinalise,
31+
&ThrowCatch_Initialise,
32+
&ThrowCatch_Finalise,
33+
&RelRecv_Initialise,
34+
&RelRecv_Finalise,
35+
0,
36+
0,
37+
};
38+
39+
Status FontRes_Initialise() {
40+
return StdInit_InitialisationSequence(&FontRes_StdInit_Description);
41+
}
42+
43+
void FontRes_Finalise() {
44+
StdInit_FinalisationSequence(&FontRes_StdInit_Description);
45+
}
46+
47+
#else
48+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", FontRes_Initialise__Fv);
49+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", FontRes_Finalise__Fv);
50+
#endif
51+
52+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", func_002D6A58); // load
53+
54+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", func_002D6B18); // unload
55+
56+
INCLUDE_RODATA("asm/nonmatchings/FGDK3/Code/FontRes", _vt$14Font_Resources);
57+
58+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", __tf14Font_Resources);
59+
60+
#ifdef NON_MATCHING
61+
char * func_002D6B88() { // Font_Resources virtual
62+
return "Font";
63+
}
64+
65+
#else
66+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", func_002D6B88);
67+
#endif
68+
69+
INCLUDE_ASM("asm/nonmatchings/FGDK3/Code/FontRes", __tft8Resource1Z11Font_Header);
70+

src/text_002D3598.cpp

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -379,68 +379,4 @@ INCLUDE_ASM("asm/nonmatchings/text_002D3598", func_002D6978);
379379

380380
INCLUDE_ASM("asm/nonmatchings/text_002D3598", func_002D6998);
381381

382-
// FontRes.cpp
383-
384-
#ifdef NON_MATCHING
385-
Status FontRes_InternalInitialise(void) {
386-
return Status(0xFFFFFFFF, "c:/coding/fgdk3/Code/Common/FontRes.cpp", 47);
387-
}
388-
#else
389-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", FontRes_InternalInitialise__Fv);
390-
#endif
391-
392-
void FontRes_InternalFinalise() {
393-
return;
394-
}
395-
396-
#ifdef NON_MATCHING
397-
398-
StdInit_ModuleDescription FontRes_StdInit_Description = {
399-
0,
400-
&FontRes_StdInit_UsedModules
401-
};
402-
403-
void * const FontRes_StdInit_UsedModules[] = {
404-
&FontRes_InternalInitialise,
405-
&FontRes_InternalFinalise,
406-
&ThrowCatch_Initialise,
407-
&ThrowCatch_Finalise,
408-
&RelRecv_Initialise,
409-
&RelRecv_Finalise,
410-
0,
411-
0,
412-
};
413-
414-
Status FontRes_Initialise() {
415-
return StdInit_InitialisationSequence(&FontRes_StdInit_Description);
416-
}
417-
418-
void FontRes_Finalise() {
419-
StdInit_FinalisationSequence(&FontRes_StdInit_Description);
420-
}
421-
422-
#else
423-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", FontRes_Initialise__Fv);
424-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", FontRes_Finalise__Fv);
425-
#endif
426-
427-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", func_002D6A58); // load
428-
429-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", func_002D6B18); // unload
430-
431-
INCLUDE_RODATA("asm/nonmatchings/text_002D3598", _vt$14Font_Resources);
432-
433-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", __tf14Font_Resources);
434-
435-
#ifdef NON_MATCHING
436-
char * func_002D6B88() { // Font_Resources virtual
437-
return "Font";
438-
}
439-
440-
#else
441-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", func_002D6B88);
442-
#endif
443-
444-
INCLUDE_ASM("asm/nonmatchings/text_002D3598", __tft8Resource1Z11Font_Header);
445-
446382

0 commit comments

Comments
 (0)