mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
En_Mt_tag OK and documented (Goron Race Manager) (#659)
* EnMttag_Init OK * EnMttag_Destroy OK * EnMttag_Update OK * func_809CF9A0 OK * Update struct * func_809CF444 OK * func_809CFA00 OK * func_809CF394 OK * func_809CF8EC OK * func_809CFA54 OK * func_809CF350 OK * func_809CF848 OK * func_809CF950 OK * func_809CFBC4 OK * func_809CFD98 OK * func_809CFE28 OK * func_809CFF94 OK * func_809CFC38 OK * Get super close on func_809CF4EC * Import data * Get a start on func_809CF67C * func_809CF4EC OK, thanks engineer! * func_809CF67C OK, thanks engineer! * Use the generated reloc * Name message functions and raceGorons array * Name some more stuff * Name more functions * Name most functions * Take a stab at trying to figure out what the data represents * Much better naming and understanding * Name more * Strip out debugging junk * Better name * Name the rest of the variables * Describe bug * Document the h*ck out of things * Simplify PlayerCheatStatus a bit * Use sCheckpointPositions as per engineer's advice * Do some really stupid naming nonsense to explain the side effect of a function * Fix Racing/RaceGoron inconsistency * Decimal weekEventReg accesses * Rename to EnMttag_UpdateCheckPoints * Capitalization consistency + update functions.txt * Respond to review * Respond to review * Respond to Elliptic's review * idk if Elliptic meant the function name or the variable so let's just do both lol * Fix function name changed by z_demo merge
This commit is contained in:
@@ -2481,8 +2481,7 @@ beginseg
|
||||
name "ovl_En_Mt_tag"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.o"
|
||||
include "build/data/ovl_En_Mt_tag/ovl_En_Mt_tag.data.o"
|
||||
include "build/data/ovl_En_Mt_tag/ovl_En_Mt_tag.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Mt_tag/ovl_En_Mt_tag_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,20 @@
|
||||
#define Z_EN_MT_TAG_H
|
||||
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Rg/z_en_rg.h"
|
||||
|
||||
struct EnMttag;
|
||||
|
||||
typedef void (*EnMttagActionFunc)(struct EnMttag*, GlobalContext*);
|
||||
|
||||
typedef struct EnMttag {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ EnMttagActionFunc actionFunc;
|
||||
/* 0x0148 */ char unk_148[0x20];
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ EnMttagActionFunc actionFunc;
|
||||
/* 0x148 */ EnRg* raceGorons[4];
|
||||
/* 0x158 */ u16 raceInitialized;
|
||||
/* 0x15A */ s16 timer;
|
||||
/* 0x15C */ UNK_TYPE1 unk_15C[0x8];
|
||||
/* 0x164 */ s32 shouldRestartRace;
|
||||
} EnMttag; // size = 0x168
|
||||
|
||||
extern const ActorInit En_Mt_tag_InitVars;
|
||||
|
||||
@@ -477,11 +477,11 @@ s32 func_80BF47AC(EnRg* this, GlobalContext* globalCtx) {
|
||||
|
||||
if ((this->unk_310 & 0x400) || (this->unk_310 & 0x1000)) {
|
||||
phi_f0 = 0.0f;
|
||||
} else if (this->unk_348 >= 2) {
|
||||
} else if (this->numCheckpointsAheadOfPlayer >= 2) {
|
||||
phi_f0 = phi_f2 * 0.5f;
|
||||
} else if (this->unk_348 == 1) {
|
||||
} else if (this->numCheckpointsAheadOfPlayer == 1) {
|
||||
phi_f0 = phi_f2 * 0.75f;
|
||||
} else if (this->unk_348 == 0) {
|
||||
} else if (this->numCheckpointsAheadOfPlayer == 0) {
|
||||
s16 temp_v0_3 = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
|
||||
if ((ABS_ALT(temp_v0_3) > 0x4000) || (this->unk_326 > 0)) {
|
||||
@@ -489,7 +489,7 @@ s32 func_80BF47AC(EnRg* this, GlobalContext* globalCtx) {
|
||||
} else {
|
||||
phi_f0 = phi_f2 * 0.94f;
|
||||
}
|
||||
} else if (this->unk_348 == -1) {
|
||||
} else if (this->numCheckpointsAheadOfPlayer == -1) {
|
||||
phi_f0 = phi_f2 * 1.6f;
|
||||
} else {
|
||||
phi_f0 = 2.0f * phi_f2;
|
||||
|
||||
@@ -48,7 +48,7 @@ typedef struct EnRg {
|
||||
/* 0x033C */ s32 unk_33C;
|
||||
/* 0x0340 */ s32 unk_340;
|
||||
/* 0x0344 */ s32 unk_344;
|
||||
/* 0x0348 */ s32 unk_348;
|
||||
/* 0x0348 */ s32 numCheckpointsAheadOfPlayer;
|
||||
/* 0x034C */ EnRgStruct unk_34C[32];
|
||||
} EnRg; // size = 0xACC
|
||||
|
||||
|
||||
+16
-16
@@ -9198,22 +9198,22 @@
|
||||
0x809CEEAC:("func_809CEEAC",),
|
||||
0x809CEF0C:("BgSpdweb_Update",),
|
||||
0x809CEF30:("BgSpdweb_Draw",),
|
||||
0x809CF350:("func_809CF350",),
|
||||
0x809CF394:("func_809CF394",),
|
||||
0x809CF444:("func_809CF444",),
|
||||
0x809CF4EC:("func_809CF4EC",),
|
||||
0x809CF67C:("func_809CF67C",),
|
||||
0x809CF848:("func_809CF848",),
|
||||
0x809CF8EC:("func_809CF8EC",),
|
||||
0x809CF950:("func_809CF950",),
|
||||
0x809CF9A0:("func_809CF9A0",),
|
||||
0x809CFA00:("func_809CFA00",),
|
||||
0x809CFA54:("func_809CFA54",),
|
||||
0x809CFBC4:("func_809CFBC4",),
|
||||
0x809CFC38:("func_809CFC38",),
|
||||
0x809CFD98:("func_809CFD98",),
|
||||
0x809CFE28:("func_809CFE28",),
|
||||
0x809CFF94:("func_809CFF94",),
|
||||
0x809CF350:("EnMttag_IsInFinishLine",),
|
||||
0x809CF394:("EnMttag_CheckPlayerCheatStatus",),
|
||||
0x809CF444:("EnMttag_AreFourRaceGoronsPresent",),
|
||||
0x809CF4EC:("EnMttag_GetCurrentCheckpoint",),
|
||||
0x809CF67C:("EnMttag_UpdateCheckpoints",),
|
||||
0x809CF848:("EnMttag_ExitRace",),
|
||||
0x809CF8EC:("EnMttag_ShowFalseStartMessage",),
|
||||
0x809CF950:("EnMttag_ShowCantWinMessage",),
|
||||
0x809CF9A0:("EnMttag_ShowIntroCutscene",),
|
||||
0x809CFA00:("EnMttag_WaitForIntroCutsceneToEnd",),
|
||||
0x809CFA54:("EnMttag_RaceStart",),
|
||||
0x809CFBC4:("EnMttag_IsAnyRaceGoronOverFinishLine",),
|
||||
0x809CFC38:("EnMttag_Race",),
|
||||
0x809CFD98:("EnMttag_RaceFinish",),
|
||||
0x809CFE28:("EnMttag_PotentiallyRestartRace",),
|
||||
0x809CFF94:("EnMttag_HandleCantWinChoice",),
|
||||
0x809D0090:("EnMttag_Init",),
|
||||
0x809D0138:("EnMttag_Destroy",),
|
||||
0x809D0168:("EnMttag_Update",),
|
||||
|
||||
Reference in New Issue
Block a user