mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Moves func_800CB000 to z_bg_item, decompiles func_800CB000, and documents z_bg_item and a few DynaPolyActor struct members. (#407)
* Moves func_800CB000 to z_bg_item, decompiles func_800CB000, and documents z_bg_item and a few DynaPolyActor struct members. * Adding usage of dynapoly state flag defines. * Formats z_bg_item * Update z_bg_item.c * Update z_bg_collect.c * Update z_bg_item.c * Update z_bg_item.c * Renames z_bg_item system to DynaPolyActor * Format
This commit is contained in:
+17
-17
@@ -995,7 +995,7 @@ s32 func_800C45C4(CollisionContext* colCtx, u32 arg1, Vec3f* arg2, Vec3f* arg3,
|
||||
// void func_800C5538(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
|
||||
s32 func_800C55C4(CollisionContext* colCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, u32 arg5, u32 arg6, u32 arg7, u32 arg8, u32* arg9);
|
||||
// void func_800C5650(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
|
||||
// void func_800C56E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
|
||||
s32 func_800C56E0(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, Actor* actor, f32 chkDist);
|
||||
s32 func_800C576C(CollisionContext* colCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, u32 arg5, u32 arg6, u32 arg7, u32 arg8, u32* arg9);
|
||||
// void func_800C57F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
// void func_800C583C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
|
||||
@@ -1109,22 +1109,22 @@ void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 index, Actor* ac
|
||||
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* actor);
|
||||
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 index);
|
||||
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 index, Actor* actor);
|
||||
void BcCheck3_BgActorInit(DynaPolyActor* actor, UNK_TYPE4 param_2);
|
||||
void BgCheck3_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* actor, CollisionHeader* meshHeader);
|
||||
void BgCheck3_ResetFlags(DynaPolyActor* actor);
|
||||
void func_800CAE88(DynaPolyActor* actor);
|
||||
void func_800CAE9C(DynaPolyActor* actor);
|
||||
void func_800CAEB0(CollisionContext* colCtx, s32 index);
|
||||
void func_800CAEE0(DynaPolyActor* actor);
|
||||
void func_800CAEF4(CollisionContext* colCtx, s32 index);
|
||||
void func_800CAF24(DynaPolyActor* actor);
|
||||
void func_800CAF38(DynaPolyActor* actor);
|
||||
s32 func_800CAF4C(DynaPolyActor* actor);
|
||||
s32 func_800CAF70(DynaPolyActor* actor);
|
||||
s32 func_800CAF94(DynaPolyActor* actor);
|
||||
s32 func_800CAFB8(DynaPolyActor* actor);
|
||||
s32 func_800CAFDC(DynaPolyActor* actor);
|
||||
// void func_800CB000(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
|
||||
void DynaPolyActor_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* dynaActor, CollisionHeader* meshHeader);
|
||||
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 index);
|
||||
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 index);
|
||||
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor);
|
||||
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor);
|
||||
s32 DynaPolyActor_ValidateMove(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
|
||||
f32 Camera_fabsf(f32 f);
|
||||
f32 Camera_LengthVec3f(Vec3f* v);
|
||||
// void func_800CB270(void);
|
||||
|
||||
+4
-4
@@ -228,12 +228,12 @@ typedef enum {
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ s32 bgId;
|
||||
/* 0x148 */ f32 unk148;
|
||||
/* 0x148 */ f32 pushForce;
|
||||
/* 0x14C */ f32 unk14C;
|
||||
/* 0x150 */ s16 unk150;
|
||||
/* 0x150 */ s16 yRotation;
|
||||
/* 0x152 */ u16 unk152;
|
||||
/* 0x154 */ u32 unk154;
|
||||
/* 0x158 */ u8 unk_158;
|
||||
/* 0x154 */ u32 flags;
|
||||
/* 0x158 */ u8 stateFlags;
|
||||
/* 0x15A */ s16 pad15A;
|
||||
} DynaPolyActor; // size = 0x15C
|
||||
|
||||
|
||||
@@ -457,7 +457,6 @@ beginseg
|
||||
include "build/data/code/z_bgcheck.bss.o"
|
||||
include "build/src/code/z_bg_collect.o"
|
||||
include "build/src/code/z_bg_item.o"
|
||||
include "build/src/code/code_800CB000.o"
|
||||
include "build/src/code/z_camera.o"
|
||||
include "build/data/code/z_camera.data.o"
|
||||
include "build/data/code/z_camera.bss.o"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800CB000/func_800CB000.s")
|
||||
+2
-2
@@ -509,8 +509,8 @@ f32 Actor_YDistance(Actor* actor1, Actor* actor2) {
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800B72E0.s")
|
||||
|
||||
void func_800B72F8(DynaPolyActor* dpactor, f32 a1, s16 a2) {
|
||||
dpactor->unk150 = a2;
|
||||
dpactor->unk148 += a1;
|
||||
dpactor->yRotation = a2;
|
||||
dpactor->pushForce += a1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/Actor_IsLinkFacingActor.s")
|
||||
|
||||
@@ -61,13 +61,13 @@ void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 index) {
|
||||
|
||||
meshActor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
if (meshActor != NULL) {
|
||||
func_800CAE88(meshActor);
|
||||
DynaPolyActor_SetRidingFallingState(meshActor);
|
||||
|
||||
if ((actor->flags & 0x4000000) == 0x4000000) {
|
||||
func_800CAF24(meshActor);
|
||||
DynaPolyActor_SetSwitchPressedState(meshActor);
|
||||
}
|
||||
if ((actor->flags & 0x20000) == 0x20000) {
|
||||
func_800CAF38(meshActor);
|
||||
DynaPolyActor_SetHeavySwitchPressedState(meshActor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 index, Acto
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (((colCtx->dyna.bgActorFlags[index] & 2) != 0) || ((colCtx->dyna.bgActorFlags[index] & 1) == 0)) {
|
||||
if (colCtx->dyna.bgActorFlags[index] & 2 || !(colCtx->dyna.bgActorFlags[index] & 1)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -90,12 +90,12 @@ u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 index, Acto
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((meshActor->unk154 & 1) != 0) {
|
||||
if (meshActor->flags & 1) {
|
||||
BgCheck2_UpdateActorPosition(colCtx, index, actor);
|
||||
wasUpdated = 1;
|
||||
}
|
||||
|
||||
if ((meshActor->unk154 & 2) != 0) {
|
||||
if (meshActor->flags & 2) {
|
||||
BgCheck2_UpdateActorYRotation(colCtx, index, actor);
|
||||
wasUpdated = 1;
|
||||
}
|
||||
|
||||
+94
-52
@@ -1,99 +1,141 @@
|
||||
#include "global.h"
|
||||
|
||||
void BcCheck3_BgActorInit(DynaPolyActor* actor, UNK_TYPE4 param_2) {
|
||||
actor->bgId = -1;
|
||||
actor->unk148 = 0;
|
||||
actor->unk14C = 0;
|
||||
actor->unk154 = param_2;
|
||||
actor->unk_158 = 0;
|
||||
#define DYNAPOLY_STATE_NONE 0
|
||||
#define DYNAPOLY_STATE_RIDING_FALLING (1 << 0)
|
||||
#define DYNAPOLY_STATE_RIDING_MOVING (1 << 1)
|
||||
#define DYNAPOLY_STATE_RIDING_ROTATING (1 << 2)
|
||||
#define DYNAPOLY_STATE_SWITCH_PRESSED (1 << 3)
|
||||
#define DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED (1 << 4)
|
||||
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) {
|
||||
dynaActor->bgId = -1;
|
||||
dynaActor->pushForce = 0.0f;
|
||||
dynaActor->unk14C = 0.0f;
|
||||
dynaActor->flags = flags;
|
||||
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
|
||||
}
|
||||
|
||||
void BgCheck3_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* actor, CollisionHeader* meshHeader) {
|
||||
CollisionHeader* header;
|
||||
void DynaPolyActor_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* dynaActor, CollisionHeader* meshHeader) {
|
||||
CollisionHeader* header = NULL;
|
||||
|
||||
header = NULL;
|
||||
BgCheck_RelocateMeshHeader(meshHeader, &header);
|
||||
actor->bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, actor, header);
|
||||
dynaActor->bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, dynaActor, header);
|
||||
}
|
||||
|
||||
void BgCheck3_ResetFlags(DynaPolyActor* actor) {
|
||||
actor->unk_158 = 0;
|
||||
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
|
||||
}
|
||||
|
||||
void func_800CAE88(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 1;
|
||||
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_FALLING;
|
||||
}
|
||||
|
||||
void func_800CAE9C(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 2;
|
||||
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_MOVING;
|
||||
}
|
||||
|
||||
void func_800CAEB0(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* actor;
|
||||
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* dynaActor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
|
||||
actor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
if (actor != (DynaPolyActor*)0x0) {
|
||||
func_800CAE9C(actor);
|
||||
if (dynaActor != NULL) {
|
||||
DynaPolyActor_SetRidingMovingState(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800CAEE0(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 4;
|
||||
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_ROTATING;
|
||||
}
|
||||
|
||||
void func_800CAEF4(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* actor;
|
||||
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* dynaActor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
|
||||
actor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
if (actor != (DynaPolyActor*)0x0) {
|
||||
func_800CAEE0(actor);
|
||||
if (dynaActor != NULL) {
|
||||
DynaPolyActor_SetRidingRotatingState(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800CAF24(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 8;
|
||||
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_SWITCH_PRESSED;
|
||||
}
|
||||
|
||||
void func_800CAF38(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 0x10;
|
||||
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED;
|
||||
}
|
||||
|
||||
s32 func_800CAF4C(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 1) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_FALLING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAF70(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 2) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_MOVING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAF94(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 4) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_ROTATING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAFB8(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 8) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_SWITCH_PRESSED) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAFDC(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 0x10) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 DynaPolyActor_ValidateMove(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 startRadius, s16 endRadius,
|
||||
s16 startHeight) {
|
||||
Vec3f startPos;
|
||||
Vec3f endPos;
|
||||
Vec3f intersectionPos;
|
||||
f32 sin = Math_SinS(dynaActor->yRotation);
|
||||
f32 cos = Math_CosS(dynaActor->yRotation);
|
||||
s32 bgId;
|
||||
CollisionPoly* poly;
|
||||
f32 adjustedStartRadius;
|
||||
f32 adjustedEndRadius;
|
||||
f32 sign = (0.0f <= dynaActor->pushForce) ? 1.0f : -1.0f;
|
||||
|
||||
adjustedStartRadius = (f32)startRadius - 0.1f;
|
||||
startPos.x = dynaActor->actor.world.pos.x + (adjustedStartRadius * cos);
|
||||
startPos.y = dynaActor->actor.world.pos.y + startHeight;
|
||||
startPos.z = dynaActor->actor.world.pos.z - (adjustedStartRadius * sin);
|
||||
|
||||
adjustedEndRadius = (f32)endRadius - 0.1f;
|
||||
endPos.x = sign * adjustedEndRadius * sin + startPos.x;
|
||||
endPos.y = startPos.y;
|
||||
endPos.z = sign * adjustedEndRadius * cos + startPos.z;
|
||||
|
||||
if (func_800C56E0(&globalCtx->colCtx, &startPos, &endPos, &intersectionPos, &poly, true, false, false, true, &bgId,
|
||||
&dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
startPos.x = (dynaActor->actor.world.pos.x * 2.0f) - startPos.x;
|
||||
startPos.z = (dynaActor->actor.world.pos.z * 2.0f) - startPos.z;
|
||||
endPos.x = sign * adjustedEndRadius * sin + startPos.x;
|
||||
endPos.z = sign * adjustedEndRadius * cos + startPos.z;
|
||||
if (func_800C56E0(&globalCtx->colCtx, &startPos, &endPos, &intersectionPos, &poly, true, false, false, true, &bgId,
|
||||
&dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,11 +143,11 @@ void BgCtowerGear_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
}
|
||||
if (type == WATER_WHEEL) {
|
||||
BcCheck3_BgActorInit(&this->dyna, 3);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06018588);
|
||||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06018588);
|
||||
} else if (type == ORGAN) {
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06016E70);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06016E70);
|
||||
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,18 +53,18 @@ void BgCtowerRot_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Vec3f offset;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
if (this->dyna.actor.params == CORRIDOR) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_060142E8);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_060142E8);
|
||||
this->actionFunc = BgCtowerRot_CorridorRotate;
|
||||
return;
|
||||
}
|
||||
player = GET_PLAYER(globalCtx);
|
||||
if (this->dyna.actor.params == MAIN_DOOR) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06017410);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06017410);
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y + 0x4000;
|
||||
} else {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06017650);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06017650);
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y - 0x4000;
|
||||
}
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
|
||||
@@ -36,7 +36,7 @@ void BgFuKaiten_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
CollisionHeader* header = 0;
|
||||
|
||||
Actor_SetScale(thisx, 1.0);
|
||||
BcCheck3_BgActorInit(&THIS->bg, 3);
|
||||
DynaPolyActor_Init(&THIS->bg, 3);
|
||||
BgCheck_RelocateMeshHeader(&D_06002D30, &header);
|
||||
THIS->bg.bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, &THIS->bg, header);
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ void BgHakaCurtain_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaCurtain* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06001588);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06001588);
|
||||
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
|
||||
func_80B6DE80(this);
|
||||
return;
|
||||
|
||||
@@ -47,8 +47,8 @@ void BgHakaTomb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTomb* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, D_06000EE8);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, D_06000EE8);
|
||||
func_8013E3B8(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
|
||||
func_80BD6624(this);
|
||||
}
|
||||
|
||||
@@ -704,8 +704,8 @@ void BgHakuginPost_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.world.rot.z = 0;
|
||||
this->dyna.actor.shape.rot.x = 0;
|
||||
this->dyna.actor.shape.rot.z = 0;
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_0600D3B0);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_0600D3B0);
|
||||
func_80A9B3BC(this, globalCtx);
|
||||
func_80A9CA94(this);
|
||||
} else {
|
||||
|
||||
@@ -70,8 +70,8 @@ void BgIcicle_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 paramsMid;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000294);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000294);
|
||||
|
||||
Collider_InitAndSetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
|
||||
Collider_UpdateCylinder(thisx, &this->collider);
|
||||
|
||||
@@ -67,8 +67,8 @@ void BgIkanaShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIkanaShutter* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000F28);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000F28);
|
||||
if (!((this->dyna.actor.params >> 8) & 1)) {
|
||||
if (BgIkanaShutter_AllSwitchesPressed(this, globalCtx)) {
|
||||
func_80BD599C(this);
|
||||
|
||||
@@ -115,8 +115,8 @@ void BgIkninSusceil_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIkninSusceil* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_0600CBAC);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_0600CBAC);
|
||||
this->animatedTexture = Lib_SegmentedToVirtual(&D_0600C670);
|
||||
func_80C0AC74(this);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void BgIknvObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
break;
|
||||
case IKNV_OBJ_RAISED_DOOR:
|
||||
this->displayListPtr = D_06011880;
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
BgCheck_RelocateMeshHeader(&D_060119D4, &colHeader);
|
||||
this->dyna.bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, &this->dyna, colHeader);
|
||||
this->actionFunc = BgIknvObj_UpdateRaisedDoor;
|
||||
@@ -83,7 +83,7 @@ void BgIknvObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
case IKNV_OBJ_SAKON_DOOR:
|
||||
this->displayListPtr = D_060129C8;
|
||||
this->actionFunc = BgIknvObj_UpdateSakonDoor;
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
BgCheck_RelocateMeshHeader(&D_06012CA4, &colHeader);
|
||||
this->dyna.bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, &this->dyna, colHeader);
|
||||
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
|
||||
@@ -158,8 +158,8 @@ void BgKin2Fence_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 i = 0;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000908);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000908);
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
|
||||
@@ -61,17 +61,17 @@ void BgLadder_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// Has to be `thisx` instead of `&this->actor` to match
|
||||
this->switchFlag = GET_BGLADDER_SWITCHFLAG(thisx);
|
||||
thisx->params = GET_BGLADDER_SIZE(thisx);
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
size = thisx->params;
|
||||
|
||||
if (size == LADDER_SIZE_12RUNG) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_060001D8);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_060001D8);
|
||||
} else if (size == LADDER_SIZE_16RUNG) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000408);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000408);
|
||||
} else if (size == LADDER_SIZE_20RUNG) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000638);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000638);
|
||||
} else if (size == LADDER_SIZE_24RUNG) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000868);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000868);
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
return;
|
||||
|
||||
@@ -38,8 +38,8 @@ void BgLbfshot_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->dyna.actor.uncullZoneForward = 4000.0f;
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_060014D8);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_060014D8);
|
||||
}
|
||||
void BgLbfshot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgLbfshot* this = THIS;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user