Create Timer struct, improve angle usage and name known virtual functions (#154)

* name some actor vfuncs

* name some map object vfuncs

* remove angle union

* fix lots of clangd errors

* create Timer struct

* fix regressions
This commit is contained in:
Yanis
2026-10-02 20:54:43 +02:00
committed by GitHub
parent 205dc5a1ca
commit 07a5bd9fcc
204 changed files with 1851 additions and 1985 deletions
@@ -81,9 +81,8 @@ void MapObjectSwitchStep_40::vfunc_1C(UnkSystem4_vfunc_1C *param1) {
}
MapObjectSwitchStep::MapObjectSwitchStep() :
mUnk_A4(&mUnk_C4, NULL) {
this->mUnk_E4 = 0;
this->mUnk_E6 = 0;
mUnk_A4(&mUnk_C4, NULL),
mUnk_E4(0, 0) {
this->mUnk_E8 = 0;
this->mUnk_EA = 0;
this->mUnk_EB = 0;
@@ -105,7 +104,7 @@ MapObjectSwitchStep::~MapObjectSwitchStep() {
}
}
bool MapObjectSwitchStep::vfunc_00(void) {
bool MapObjectSwitchStep::Init(void) {
SET_FLAG(this->mFlags, MapObjFlag_9);
this->mUnk_18[0] = 1;
@@ -127,9 +126,8 @@ bool MapObjectSwitchStep::vfunc_00(void) {
}
void MapObjectSwitchStep::func_ov000_0209e11c(MapObjState state, unk32 param2) {
this->mState = state;
this->mUnk_E6 = -1;
this->mUnk_E4 = 0;
this->mState = state;
this->mUnk_E4.Reset();
this->mUnk_A4.func_01ffc3b4();
switch (this->mState) {
@@ -161,8 +159,7 @@ void MapObjectSwitchStep::func_ov000_0209e11c(MapObjState state, unk32 param2) {
}
if (this->mUnk_20.mParams[0] == 2) {
this->mUnk_E6 = this->mUnk_20.mParams[1];
this->mUnk_E4 = 0;
this->mUnk_E4.Set(0, this->mUnk_20.mParams[1]);
}
this->mUnk_A4.func_ov000_020577f8(0x1000);
@@ -222,7 +219,7 @@ void MapObjectSwitchStep::vfunc_18(s8 *param1) {
}
void MapObjectSwitchStep::func_ov000_0209e38c(void) {
if (this->mUnk_E6 - this->mUnk_E4 < 0x3C) {
if (this->mUnk_E4.GetRemainingTime() < 60) {
data_ov000_020b5214.func_ov000_0206e7e8(0x92);
} else {
data_ov000_020b5214.func_ov000_0206e7e8(0x91);