diff options
| author | lepelog <lepelog@users.noreply.github.com> | 2021-04-01 12:06:29 +0200 |
|---|---|---|
| committer | lepelog <lepelog@users.noreply.github.com> | 2021-04-01 12:06:29 +0200 |
| commit | 53c6aa6c8b50d95e89f64db70d0cc08fb4111a93 (patch) | |
| tree | 20ce5067caef7892c2c9bb043b10918c15dd7868 /src/f_pc/f_pc_line.cpp | |
| parent | 87bc0e711b4fb2f990f3c37ca681be1fc027d554 (diff) | |
ported over f_pc
Diffstat (limited to 'src/f_pc/f_pc_line.cpp')
| -rw-r--r-- | src/f_pc/f_pc_line.cpp | 46 |
1 files changed, 12 insertions, 34 deletions
diff --git a/src/f_pc/f_pc_line.cpp b/src/f_pc/f_pc_line.cpp index b8b665e54b..29cf9891b3 100644 --- a/src/f_pc/f_pc_line.cpp +++ b/src/f_pc/f_pc_line.cpp @@ -6,51 +6,29 @@ #include "f_pc/f_pc_line.h" #include "dol2asm.h" #include "dolphin/types.h" - -// -// Types: -// - -struct node_list_class {}; - -// -// Forward References: -// - -void fpcLn_Create(); - -extern "C" void fpcLn_Create__Fv(); -extern "C" extern void* g_fpcLn_Queue[2]; - -// -// External References: -// - -void cLs_Create(node_list_class*); - -extern "C" void cLs_Create__FP15node_list_class(); +#include "f_pc/f_pc_node.h" // // Declarations: // +#define ARRAY_SIZE(o) (sizeof((o)) / sizeof(*(o))) + /* ############################################################################################## */ /* 803F4CF0-803F4DB0 00C0+00 s=2 e=0 z=0 None .bss l_fpcLn_Line */ -static u8 l_fpcLn_Line[192]; +static node_list_class l_fpcLn_Line[16]; /* 80021F64-80021FB8 0054+00 s=0 e=1 z=0 None .text fpcLn_Create__Fv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void fpcLn_Create() { - nofralloc -#include "asm/f_pc/f_pc_line/fpcLn_Create__Fv.s" +void fpcLn_Create(void) { + s32 i = ARRAY_SIZE(l_fpcLn_Line); + node_list_class* pLine = l_fpcLn_Line; + while (i-- > 0) + cLs_Create(pLine++); } -#pragma pop /* ############################################################################################## */ /* 804505D8-804505E0 0008+00 s=0 e=2 z=0 None .sdata g_fpcLn_Queue */ -SECTION_SDATA void* g_fpcLn_Queue[2] = { - (void*)&l_fpcLn_Line, - (void*)0x00000010, +node_lists_tree_class g_fpcLn_Queue = { + l_fpcLn_Line, + ARRAY_SIZE(l_fpcLn_Line), }; |
