mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Match InitDynaPoly actors (#1733)
* Match InitDynaPoly actors * Change BgJyaBombiwa_SetupDynaPoly pads to s32 * kzIceScale -> sKingZoraRedIceScale
This commit is contained in:
parent
0ba8cb38a7
commit
53b0114464
20 changed files with 137 additions and 74 deletions
|
@ -115,17 +115,20 @@ void BgIceShelter_InitColliders(BgIceShelter* this, PlayState* play) {
|
|||
void BgIceShelter_InitDynaPoly(BgIceShelter* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG registration failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_ice_shelter.c", 362,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgIceShelter_RotateY(Vec3f* dest, Vec3f* src, s16 angle) {
|
||||
|
@ -144,7 +147,6 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
void BgIceShelter_Init(Actor* thisx, PlayState* play) {
|
||||
static Vec3f kzIceScale = { 0.18f, 0.27f, 0.24f };
|
||||
BgIceShelter* this = (BgIceShelter*)thisx;
|
||||
s16 type = BGICESHELTER_GET_TYPE(&this->dyna.actor);
|
||||
|
||||
|
@ -158,7 +160,9 @@ void BgIceShelter_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (type == RED_ICE_KING_ZORA) {
|
||||
Math_Vec3f_Copy(&this->dyna.actor.scale, &kzIceScale);
|
||||
static Vec3f sKingZoraRedIceScale = { 0.18f, 0.27f, 0.24f };
|
||||
|
||||
Math_Vec3f_Copy(&this->dyna.actor.scale, &sKingZoraRedIceScale);
|
||||
} else {
|
||||
Actor_SetScale(&this->dyna.actor, sRedIceScales[type]);
|
||||
}
|
||||
|
|
|
@ -69,17 +69,20 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgJya1flift_InitDynapoly(BgJya1flift* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG login failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_1flift.c", 179,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgJya1flift_InitCollision(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -45,15 +45,19 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, PlayState* play, CollisionHeader* collision, s32 flag) {
|
||||
s32 pad1;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_amishutter.c", 129,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgJyaAmishutter_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -63,19 +63,22 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, PlayState* play, CollisionHeader* collision, s32 flag) {
|
||||
s16 pad1;
|
||||
s32 pad1;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning: move BG registration failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_bombiwa.c", 174,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, PlayState* play) {
|
||||
|
|
|
@ -118,27 +118,34 @@ void func_808958F0(Vec3f* dest, Vec3f* src, f32 arg2, f32 arg3) {
|
|||
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG Registration Failure"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_cobra.c", 247,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgJyaCobra_SpawnRay(BgJyaCobra* this, PlayState* play) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_MIR_RAY, this->dyna.actor.world.pos.x,
|
||||
this->dyna.actor.world.pos.y + 57.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 6);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.actor.child == NULL) {
|
||||
PRINTF(VT_FGCOL(RED));
|
||||
// "Error : Mir Ray occurrence failure"
|
||||
PRINTF("Error : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270);
|
||||
PRINTF(VT_RST);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void func_80895A70(BgJyaCobra* this) {
|
||||
|
|
|
@ -43,15 +43,19 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, PlayState* play, CollisionHeader* collision, s32 flag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_kanaami.c", 145,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgJyaKanaami_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -62,15 +62,19 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, CollisionHeader* collision, s32 flag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_zurerukabe.c", 194,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {
|
||||
|
|
|
@ -53,17 +53,20 @@ void BgMoriBigst_SetupAction(BgMoriBigst* this, BgMoriBigstActionFunc actionFunc
|
|||
void BgMoriBigst_InitDynapoly(BgMoriBigst* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG login failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_bigst.c", 190,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgMoriBigst_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -78,19 +78,21 @@ static InitChainEntry sInitChainLadder[] = {
|
|||
|
||||
void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader;
|
||||
s32 pad2;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
colHeader = NULL;
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG login failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashigo.c", 164,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgMoriHashigo_InitCollider(BgMoriHashigo* this, PlayState* play) {
|
||||
|
@ -260,9 +262,9 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this) {
|
||||
this->actionFunc = NULL;
|
||||
this->dyna.actor.gravity = 0.0f;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->actionFunc = NULL;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,19 +50,21 @@ void BgMoriHashira4_SetupAction(BgMoriHashira4* this, BgMoriHashira4ActionFunc a
|
|||
|
||||
void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader;
|
||||
s32 pad2;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
colHeader = NULL;
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG login failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashira4.c", 155,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgMoriHashira4_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -41,16 +41,20 @@ void BgSpot08Iceblock_SetupAction(BgSpot08Iceblock* this, BgSpot08IceblockAction
|
|||
void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning: move BG registration failed"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot08_iceblock.c", 0xD9,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Sets params to 0x10 (medium, nonrotating) if not in the cases listed.
|
||||
|
|
|
@ -46,15 +46,19 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_gate.c", 145,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgSpot12Gate_Init(Actor* thisx, PlayState* play) {
|
||||
|
@ -105,17 +109,19 @@ void func_808B317C(BgSpot12Gate* this) {
|
|||
|
||||
void func_808B318C(BgSpot12Gate* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 quakeIndex;
|
||||
|
||||
Math_StepToF(&this->dyna.actor.velocity.y, 1.6f, 0.03f);
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 200.0f,
|
||||
this->dyna.actor.velocity.y)) {
|
||||
func_808B3274(this);
|
||||
|
||||
quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_3);
|
||||
Quake_SetSpeed(quakeIndex, -0x3CB0);
|
||||
Quake_SetPerturbations(quakeIndex, 3, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, 12);
|
||||
{
|
||||
s32 quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_3);
|
||||
|
||||
Quake_SetSpeed(quakeIndex, -0x3CB0);
|
||||
Quake_SetPerturbations(quakeIndex, 3, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, 12);
|
||||
}
|
||||
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
|
||||
} else {
|
||||
|
|
|
@ -43,15 +43,19 @@ static InitChainEntry sInitChain[] = {
|
|||
void func_808B3420(BgSpot12Saku* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_saku.c", 140,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -58,17 +58,19 @@ static Vec3f sBoxGroundCheckPoints[] = {
|
|||
void func_808B3960(BgSpot15Rrbox* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
u32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot15_rrbox.c", 171,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BgSpot15Rrbox_RotatePoint(Vec3f* outPos, Vec3f* pos, f32 arg2, f32 arg3) {
|
||||
|
@ -224,11 +226,9 @@ s32 func_808B4010(BgSpot15Rrbox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808B4084(BgSpot15Rrbox* this, PlayState* play) {
|
||||
this->actionFunc = func_808B40AC;
|
||||
this->dyna.actor.gravity = 0.0f;
|
||||
this->dyna.actor.velocity.x = 0.0f;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->dyna.actor.velocity.z = 0.0f;
|
||||
this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
|
||||
this->actionFunc = func_808B40AC;
|
||||
}
|
||||
|
||||
void func_808B40AC(BgSpot15Rrbox* this, PlayState* play) {
|
||||
|
@ -301,9 +301,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808B4380(BgSpot15Rrbox* this, PlayState* play) {
|
||||
this->dyna.actor.velocity.x = 0.0f;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->dyna.actor.velocity.z = 0.0f;
|
||||
this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
|
||||
this->dyna.actor.gravity = -1.0f;
|
||||
this->dyna.actor.floorHeight = BgSpot15Rrbox_GetFloorHeight(this, play);
|
||||
this->actionFunc = func_808B43D0;
|
||||
|
|
|
@ -135,19 +135,20 @@ void ObjBean_InitCollider(Actor* thisx, PlayState* play) {
|
|||
|
||||
void ObjBean_InitDynaPoly(ObjBean* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader;
|
||||
s32 pad2;
|
||||
|
||||
colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_bean.c", 374,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjBean_FindFloor(ObjBean* this, PlayState* play) {
|
||||
|
@ -240,14 +241,8 @@ void ObjBean_FollowPath(ObjBean* this, PlayState* play) {
|
|||
Path* path;
|
||||
Vec3f acell;
|
||||
Vec3f pathPointsFloat;
|
||||
f32 speed;
|
||||
Vec3s* nextPathPoint;
|
||||
Vec3s* currentPoint;
|
||||
Vec3s* sp4C;
|
||||
Vec3f sp40;
|
||||
Vec3f sp34;
|
||||
f32 sp30;
|
||||
f32 mag;
|
||||
Vec3s* nextPathPoint;
|
||||
|
||||
Math_StepToF(&this->dyna.actor.speed, sBeanSpeeds[this->unk_1F6].velocity, sBeanSpeeds[this->unk_1F6].accel);
|
||||
path = &play->pathList[(this->dyna.actor.params >> 8) & 0x1F];
|
||||
|
@ -257,8 +252,13 @@ void ObjBean_FollowPath(ObjBean* this, PlayState* play) {
|
|||
|
||||
Math_Vec3f_Diff(&pathPointsFloat, &this->pathPoints, &acell);
|
||||
mag = Math3D_Vec3fMagnitude(&acell);
|
||||
speed = CLAMP_MIN(this->dyna.actor.speed, 0.5f);
|
||||
if (speed > mag) {
|
||||
if (CLAMP_MIN(this->dyna.actor.speed, 0.5f) > mag) {
|
||||
Vec3s* currentPoint;
|
||||
Vec3s* sp4C;
|
||||
Vec3f sp40;
|
||||
Vec3f sp34;
|
||||
f32 sp30;
|
||||
|
||||
currentPoint = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->currentPointIndex];
|
||||
|
||||
Math_Vec3f_Copy(&this->pathPoints, &pathPointsFloat);
|
||||
|
|
|
@ -46,16 +46,19 @@ void ObjElevator_SetupAction(ObjElevator* this, ObjElevatorActionFunc actionFunc
|
|||
void func_80B92B08(ObjElevator* this, PlayState* play, CollisionHeader* collision, s32 flag) {
|
||||
s16 pad1;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_elevator.c", 136, thisx->id,
|
||||
thisx->params);
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_elevator.c", 136,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjElevator_Init(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -55,15 +55,19 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) {
|
|||
void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 moveFlags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2[2];
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_hsblock.c", 163,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void func_80B93BF0(ObjHsblock* this, PlayState* play) {
|
||||
|
|
|
@ -64,16 +64,19 @@ void ObjLift_SetupAction(ObjLift* this, ObjLiftActionFunc actionFunc) {
|
|||
void ObjLift_InitDynaPoly(ObjLift* this, PlayState* play, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_lift.c", 188,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjLift_SpawnFragments(ObjLift* this, PlayState* play) {
|
||||
|
|
|
@ -87,17 +87,20 @@ static Vec2f sFaceDirection[] = {
|
|||
void ObjOshihiki_InitDynapoly(ObjOshihiki* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG registration failure"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_oshihiki.c", 280,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjOshihiki_RotateXZ(Vec3f* out, Vec3f* in, f32 sn, f32 cs) {
|
||||
|
@ -242,14 +245,13 @@ void ObjOshihiki_SetTexture(ObjOshihiki* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play) {
|
||||
Color_RGB8* src;
|
||||
void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
s16 paramsColorIdx = (this->dyna.actor.params >> 6) & 3;
|
||||
Color_RGB8* color = &this->color;
|
||||
s16 paramsColorIdx;
|
||||
Color_RGB8* src;
|
||||
s32 i;
|
||||
|
||||
paramsColorIdx = (this->dyna.actor.params >> 6) & 3;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sSceneIds); i++) {
|
||||
if (sSceneIds[i] == play->sceneId) {
|
||||
break;
|
||||
|
@ -315,14 +317,12 @@ void ObjOshihiki_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void ObjOshihiki_SetFloors(ObjOshihiki* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Vec3f colCheckPoint;
|
||||
Vec3f colCheckOffset;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
Vec3f colCheckPoint;
|
||||
Vec3f colCheckOffset;
|
||||
CollisionPoly** floorPoly;
|
||||
s32* floorBgId;
|
||||
|
||||
colCheckOffset.x = sColCheckPoints[i].x * (this->dyna.actor.scale.x * 10.0f);
|
||||
colCheckOffset.y = sColCheckPoints[i].y * (this->dyna.actor.scale.y * 10.0f);
|
||||
colCheckOffset.z = sColCheckPoints[i].z * (this->dyna.actor.scale.z * 10.0f);
|
||||
|
@ -331,10 +331,8 @@ void ObjOshihiki_SetFloors(ObjOshihiki* this, PlayState* play) {
|
|||
colCheckPoint.y += this->dyna.actor.prevPos.y;
|
||||
colCheckPoint.z += this->dyna.actor.world.pos.z;
|
||||
|
||||
floorPoly = &this->floorPolys[i];
|
||||
floorBgId = &this->floorBgIds[i];
|
||||
this->floorHeights[i] =
|
||||
BgCheck_EntityRaycastDown6(&play->colCtx, floorPoly, floorBgId, &this->dyna.actor, &colCheckPoint, 0.0f);
|
||||
this->floorHeights[i] = BgCheck_EntityRaycastDown6(&play->colCtx, &this->floorPolys[i], &this->floorBgIds[i],
|
||||
&this->dyna.actor, &colCheckPoint, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,9 +443,9 @@ s32 ObjOshihiki_MoveWithBlockUnder(ObjOshihiki* this, PlayState* play) {
|
|||
|
||||
void ObjOshihiki_SetupOnScene(ObjOshihiki* this, PlayState* play) {
|
||||
this->stateFlags |= PUSHBLOCK_SETUP_ON_SCENE;
|
||||
this->actionFunc = ObjOshihiki_OnScene;
|
||||
this->dyna.actor.gravity = 0.0f;
|
||||
this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
|
||||
this->actionFunc = ObjOshihiki_OnScene;
|
||||
}
|
||||
|
||||
void ObjOshihiki_OnScene(ObjOshihiki* this, PlayState* play) {
|
||||
|
@ -472,9 +470,9 @@ void ObjOshihiki_OnScene(ObjOshihiki* this, PlayState* play) {
|
|||
|
||||
void ObjOshihiki_SetupOnActor(ObjOshihiki* this, PlayState* play) {
|
||||
this->stateFlags |= PUSHBLOCK_SETUP_ON_ACTOR;
|
||||
this->actionFunc = ObjOshihiki_OnActor;
|
||||
this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
|
||||
this->dyna.actor.gravity = -1.0f;
|
||||
this->actionFunc = ObjOshihiki_OnActor;
|
||||
}
|
||||
|
||||
void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
||||
|
@ -649,6 +647,7 @@ void ObjOshihiki_Draw(Actor* thisx, PlayState* play) {
|
|||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_oshihiki.c", 1308),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
#if OOT_DEBUG
|
||||
switch (play->sceneId) {
|
||||
case SCENE_DEKU_TREE:
|
||||
case SCENE_DODONGOS_CAVERN:
|
||||
|
@ -664,6 +663,9 @@ void ObjOshihiki_Draw(Actor* thisx, PlayState* play) {
|
|||
gDPSetEnvColor(POLY_OPA_DISP++, mREG(13), mREG(14), mREG(15), 255);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, 255);
|
||||
#endif
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gPushBlockDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_oshihiki.c", 1334);
|
||||
|
|
|
@ -192,17 +192,20 @@ void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 rotY) {
|
|||
void ObjSwitch_InitDynaPoly(ObjSwitch* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
s32 pad2;
|
||||
|
||||
// "Warning : move BG registration failure"
|
||||
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_switch.c", 531,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* colliderJntSphInit) {
|
||||
|
|
Loading…
Reference in a new issue