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
+9 -8
View File
@@ -370,7 +370,7 @@ void MapObjectDoorBase::vfunc_5C(MapObjState state, unk32 param2) {
auStack_5c.mUnk_36 = unk_1E;
auStack_5c.mUnk_34 = unk_1C;
auStack_5c.mUnk_1E = this->mAngle;
auStack_5c.mUnk_1E = this->mAngle.angle_s;
this->mUnk_74 = data_027e09b8->func_ov000_02073388(&auStack_5c, 0);
}
@@ -454,7 +454,7 @@ void MapObjectDoorBase::vfunc_5C(MapObjState state, unk32 param2) {
auStack_9c.mUnk_36 = unk_1E;
auStack_9c.mUnk_34 = unk_1C;
auStack_9c.mUnk_1E = this->mAngle;
auStack_9c.mUnk_1E = this->mAngle.angle_s;
this->mUnk_74 = data_027e09b8->func_ov000_02073388(&auStack_9c, 0);
this->mUnk_84 = 0x0D;
@@ -636,15 +636,15 @@ void MapObjectDoorBase::vfunc_4C() {}
void MapObjectDoorBase::vfunc_84(unk32 param1, VecFx32 *param2, unk16 *param3) {
VecFx32 local_20;
*param3 = this->mAngle;
*param3 = this->mAngle.angle_s;
if (param1 != 0) {
local_20.x = MUL_FX32(SIN((u16) this->mAngle), 0x1000);
local_20.z = MUL_FX32(COS((u16) this->mAngle), 0x1000);
local_20.x = MUL_FX32(SIN((u16) this->mAngle.angle_s), 0x1000);
local_20.z = MUL_FX32(COS((u16) this->mAngle.angle_s), 0x1000);
local_20.y = 0;
} else {
local_20.x = MUL_FX32(SIN((u16) this->mAngle), 0xC00);
local_20.z = MUL_FX32(COS((u16) this->mAngle), 0xC00);
local_20.x = MUL_FX32(SIN((u16) this->mAngle.angle_s), 0xC00);
local_20.z = MUL_FX32(COS((u16) this->mAngle.angle_s), 0xC00);
local_20.y = 0;
*param3 += -DEG_TO_ANG(180);
@@ -687,7 +687,8 @@ void MapObjectDoorBase::vfunc2_08() {
u16 *temp_r3;
u16 *temp_r3_2;
if (this->mState != MapObjDoorBaseState_1 || !this->mUnk_8C || (u16) (this->mAngle + 0x2000) / DEG_TO_ANG(90) != 2) {
if (this->mState != MapObjDoorBaseState_1 || !this->mUnk_8C ||
(u16) (this->mAngle.angle_s + 0x2000) / DEG_TO_ANG(90) != 2) {
return;
}