Misc Stuff 3 (#39)

* cutscene stuff

* fix build issues

* revert accidental change and document random stuff

* document cutscene indices

* make mUnk_0D a bool + disambiguate a reloc

* decomp some itcm functions
This commit is contained in:
Yanis
2026-04-17 02:16:40 +02:00
committed by GitHub
parent ec62ef3392
commit 4a07ec0baa
23 changed files with 1104 additions and 81 deletions
+72
View File
@@ -0,0 +1,72 @@
#include "MapObject/MapObjectManager.hpp"
struct UnkStruct {
unk32 one;
unk32 two;
unk32 three;
unk32 four;
};
extern "C" void func_01ffecdc(int, void *);
MapObject *MapObjectManager::func_01fff498(UnkStruct_func_01fff498 param1) {
if (this->mUnk_0C[param1.valueIndex][param1.ptrIndex] < 0) {
return NULL;
}
return this->mMapObjTable[this->mUnk_0C[param1.valueIndex][param1.ptrIndex]];
}
void MapObjectManager::func_01fff4cc(UnkCallback_func_01fff4cc param1, void *param2) {
MapObject **ptr = this->mMapObjTable;
while (ptr != this->mUnk_08) {
if (*ptr != NULL && GET_FLAG((*ptr)->mFlags, MapObjFlag_Alive)) {
param1(*ptr, param2);
}
ptr++;
}
}
MapObject **MapObjectManager::func_01fff520(UnkStruct_ov000_020b34c4 *param1, MapObject **param2) {
MapObject **ptr = param2;
while (ptr != this->mUnk_08) {
MapObject *ptr2 = *ptr;
if (ptr2 != NULL && GET_FLAG((ptr2)->mFlags, MapObjFlag_Alive)) {
//! TODO: fake match
if (param1->vfunc_00(ptr2)) {
break;
}
}
ptr++;
}
return ptr;
}
MapObjectId MapObject::GetMapObjectId() {
return this->mpProfile->mMapObjId;
}
void MapObject::func_01fff590(unk32 param2) {
UnkStruct stack;
unk32 one;
unk32 two;
unk32 three;
unk32 four;
four = this->mpProfile->mUnk_08;
one = (three = this->mPos.x);
two = this->mPos.y;
three = this->mPos.z;
stack.one = one;
stack.two = two;
stack.three = three;
stack.four = four;
func_01ffecdc(param2, &stack);
}