mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
func_800418D0 and func_800417A0 in z_bgcheck.c, matching (#79)
* func_800418D0 and func_800417A0 in z_bgcheck.c, matching * func_800417A0 cleanup * More func_800418D0 cleanup Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
28387947e2
commit
e126e37084
3 changed files with 48 additions and 13 deletions
|
@ -481,8 +481,8 @@ typedef struct {
|
|||
} StaticCollisionContext; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ char unk_00[0x04];
|
||||
/* 0x0004 */ ActorMesh actorMeshArr[50];
|
||||
/* 0x0000 */ ActorMesh actorMeshArr[50];
|
||||
/* 0x1388 */ char unk_1388[0x04];
|
||||
/* 0x138C */ u16 flags[50];
|
||||
/* 0x13F0 */ char unk_13F0[0x24];
|
||||
} DynaCollisionContext; // size = 0x1414
|
||||
|
|
|
@ -174,15 +174,17 @@ typedef struct Actor {
|
|||
} Actor; // size = 0x14C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Actor* actor;
|
||||
/* 0x04 */ char unk_04[0x10];
|
||||
/* 0x14 */ Vec3f scale1;
|
||||
/* 0x20 */ Vec3s rot1;
|
||||
/* 0x28 */ Vec3f pos1;
|
||||
/* 0x34 */ Vec3f scale2;
|
||||
/* 0x40 */ Vec3s rot2;
|
||||
/* 0x48 */ Vec3f pos2;
|
||||
/* 0x54 */ char unk_54[0x10];
|
||||
/* 0x00 */ char unk_00[0x04];
|
||||
/* 0x04 */ Actor* actor;
|
||||
/* 0x08 */ void* unk_08; // Struct800417A0*
|
||||
/* 0x0C */ char unk_0C[0x0C];
|
||||
/* 0x18 */ Vec3f scale1;
|
||||
/* 0x24 */ Vec3s rot1;
|
||||
/* 0x2C */ Vec3f pos1;
|
||||
/* 0x38 */ Vec3f scale2;
|
||||
/* 0x44 */ Vec3s rot2;
|
||||
/* 0x4C */ Vec3f pos2;
|
||||
/* 0x58 */ char unk_58[0x0C];
|
||||
} ActorMesh; // size = 0x64
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -298,11 +298,44 @@ void func_8003E954(u32 uParm1, u8* puParm2) {
|
|||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041648.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800417A0.s")
|
||||
typedef struct {
|
||||
/* 0x00 */ char unk_00[0x10];
|
||||
/* 0x10 */ void* unk_10;
|
||||
/* 0x14 */ char unk_[0x04];
|
||||
/* 0x18 */ void* unk_18;
|
||||
/* 0x1C */ void* unk_1C;
|
||||
/* 0x20 */ void* unk_20;
|
||||
/* 0x24 */ char unk_24[4];
|
||||
/* 0x28 */ void* unk_28;
|
||||
} Struct800417A0; // size = 0x32
|
||||
|
||||
// called by func_800418D0 with actorMesh->unk_08
|
||||
void func_800417A0(Struct800417A0* arg0) {
|
||||
arg0->unk_10 = SEGMENTED_TO_VIRTUAL(arg0->unk_10);
|
||||
arg0->unk_18 = SEGMENTED_TO_VIRTUAL(arg0->unk_18);
|
||||
arg0->unk_1C = SEGMENTED_TO_VIRTUAL(arg0->unk_1C);
|
||||
arg0->unk_20 = SEGMENTED_TO_VIRTUAL(arg0->unk_20);
|
||||
arg0->unk_28 = SEGMENTED_TO_VIRTUAL(arg0->unk_28);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041880.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800418D0.s")
|
||||
void func_800418D0(CollisionContext* colCtx, GlobalContext* globalCtx) {
|
||||
ActorMesh* actorMesh;
|
||||
DynaCollisionContext* dynaColCtx;
|
||||
s32 i;
|
||||
u16 flag;
|
||||
|
||||
dynaColCtx = &colCtx->dyna;
|
||||
for (i = 0; i < 50; i++) {
|
||||
flag = dynaColCtx->flags[i];
|
||||
if ((flag & 1) && !(flag & 2)) {
|
||||
actorMesh = &dynaColCtx->actorMeshArr[i];
|
||||
Actor_SetObjectDependency(globalCtx, actorMesh->actor);
|
||||
func_800417A0(actorMesh->unk_08);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_80041978(int iParm1, int iParm2) {
|
||||
|
|
Loading…
Reference in a new issue