From d4effceefd6610b8bb782fec97387ed2340ec4f2 Mon Sep 17 00:00:00 2001 From: Tom Overton Date: Sun, 31 Oct 2021 09:25:10 -0700 Subject: En_Elforg (Stray Fairy) OK and mostly documented (#359) * Migrate data to C * EnElforg_Init OK * func_80ACC470 OK * EnElforg_Destroy OK * EnElforg_Update OK * func_80ACCBD0 OK * func_80ACCBB8 OK * func_80ACD6EC OK * func_80ACD59C OK * func_80ACD6A8 OK * func_80ACD610 OK * func_80ACD878 OK * Declare animated materials for Elforg * EnElforg_Draw OK * func_80ACCC98 OK * func_80ACC7E4 OK * func_80ACC8D4 OK * func_80ACCEB0 OK * func_80ACC994 OK * PLAYER -> GET_PLAYER * func_80ACCE4C OK * func_80ACC934 OK * func_80ACCAC0 OK * func_80ACD2E4 OK * func_80ACD1F0 OK * func_80ACD164 OK * func_80ACD1B0 OK (maybe fakematch but oh well) * func_80ACD088 OK * Better match for func_80ACD1B0 * Use compiled reloc * Move static data to appropriate function * Name sCylinderInit appropriately * Add explanatory comment * Clean up forward declarations * Add macro for the flag * Macro and enum for type * Add STRAY_FAIRY_GET_PARAM_1C0 macro (no clue what this does) * Document the area stuff * Name some functions * Document timer and direction * Eliminate some early returns * Tons more documentation * Name remaining functions * Document flags * Name targetDistanceFromHome * fairyFountainTimer -> secondaryTimer, since it's used outside of Fairy Fountains * Name the unknown flag * Name the collider fairy type * Last bit of renaming/documenting * Remove zero check * Use hex constant for newAngle * Merge animation updates * Use 0x10000 instead of 65536.0f * Use decimal for alpha * Move yDifference initialization up to the same line as declaration * Use +=/-= * <= 30 instead of < 31 * += -1 -> -- * >= 81 -> > 80 * 0xDFFFFFFF -> ~0x20000000 * EnElforg_InitializeSpeedAndRotation -> EnElforg_InitializeParams --- src/boot_O2_g3/CIC6105.c | 1 + src/boot_O2_g3/boot_main.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/boot_O2_g3') diff --git a/src/boot_O2_g3/CIC6105.c b/src/boot_O2_g3/CIC6105.c index 4ab4ca4e8..7e9d960bf 100644 --- a/src/boot_O2_g3/CIC6105.c +++ b/src/boot_O2_g3/CIC6105.c @@ -1,3 +1,4 @@ +#include "prevent_bss_reordering.h" #include "global.h" #include "prevent_bss_reordering.h" diff --git a/src/boot_O2_g3/boot_main.c b/src/boot_O2_g3/boot_main.c index ec6b446e7..be281d248 100644 --- a/src/boot_O2_g3/boot_main.c +++ b/src/boot_O2_g3/boot_main.c @@ -1,3 +1,4 @@ +#include "prevent_bss_reordering.h" #include "global.h" #include "prevent_bss_reordering.h" -- cgit v1.2.3