1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Match InitDynaPoly actors (#1733)

* Match InitDynaPoly actors

* Change BgJyaBombiwa_SetupDynaPoly pads to s32

* kzIceScale -> sKingZoraRedIceScale
This commit is contained in:
cadmic 2024-02-07 15:58:46 -08:00 committed by GitHub
parent 0ba8cb38a7
commit 53b0114464
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 137 additions and 74 deletions

View File

@ -115,17 +115,20 @@ void BgIceShelter_InitColliders(BgIceShelter* this, PlayState* play) {
void BgIceShelter_InitDynaPoly(BgIceShelter* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void BgIceShelter_InitDynaPoly(BgIceShelter* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG registration failed" // "Warning : move BG registration failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_ice_shelter.c", 362, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgIceShelter_RotateY(Vec3f* dest, Vec3f* src, s16 angle) { void BgIceShelter_RotateY(Vec3f* dest, Vec3f* src, s16 angle) {
@ -144,7 +147,6 @@ static InitChainEntry sInitChain[] = {
}; };
void BgIceShelter_Init(Actor* thisx, PlayState* play) { void BgIceShelter_Init(Actor* thisx, PlayState* play) {
static Vec3f kzIceScale = { 0.18f, 0.27f, 0.24f };
BgIceShelter* this = (BgIceShelter*)thisx; BgIceShelter* this = (BgIceShelter*)thisx;
s16 type = BGICESHELTER_GET_TYPE(&this->dyna.actor); 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) { 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 { } else {
Actor_SetScale(&this->dyna.actor, sRedIceScales[type]); Actor_SetScale(&this->dyna.actor, sRedIceScales[type]);
} }

View File

@ -69,17 +69,20 @@ static InitChainEntry sInitChain[] = {
void BgJya1flift_InitDynapoly(BgJya1flift* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void BgJya1flift_InitDynapoly(BgJya1flift* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG login failed" // "Warning : move BG login failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_1flift.c", 179, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgJya1flift_InitCollision(Actor* thisx, PlayState* play) { void BgJya1flift_InitCollision(Actor* thisx, PlayState* play) {

View File

@ -45,15 +45,19 @@ static InitChainEntry sInitChain[] = {
void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, PlayState* play, CollisionHeader* collision, s32 flag) { void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, PlayState* play, CollisionHeader* collision, s32 flag) {
s32 pad1; s32 pad1;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flag); DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgJyaAmishutter_Init(Actor* thisx, PlayState* play) { void BgJyaAmishutter_Init(Actor* thisx, PlayState* play) {

View File

@ -63,19 +63,22 @@ static InitChainEntry sInitChain[] = {
}; };
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, PlayState* play, CollisionHeader* collision, s32 flag) { void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, PlayState* play, CollisionHeader* collision, s32 flag) {
s16 pad1; s32 pad1;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s16 pad2;
DynaPolyActor_Init(&this->dyna, flag); DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning: move BG registration failed" // "Warning: move BG registration failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_bombiwa.c", 174, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, PlayState* play) { void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, PlayState* play) {

View File

@ -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) { void BgJyaCobra_InitDynapoly(BgJyaCobra* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG Registration Failure" // "Warning : move BG Registration Failure"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_cobra.c", 247, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgJyaCobra_SpawnRay(BgJyaCobra* this, PlayState* play) { void BgJyaCobra_SpawnRay(BgJyaCobra* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_MIR_RAY, this->dyna.actor.world.pos.x, 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); 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) { if (this->dyna.actor.child == NULL) {
PRINTF(VT_FGCOL(RED)); PRINTF(VT_FGCOL(RED));
// " : Mir Ray occurrence failure" // " : Mir Ray occurrence failure"
PRINTF(" : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270); PRINTF(" : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270);
PRINTF(VT_RST); PRINTF(VT_RST);
} }
#endif
} }
void func_80895A70(BgJyaCobra* this) { void func_80895A70(BgJyaCobra* this) {

View File

@ -43,15 +43,19 @@ static InitChainEntry sInitChain[] = {
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, PlayState* play, CollisionHeader* collision, s32 flag) { void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, PlayState* play, CollisionHeader* collision, s32 flag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flag); DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgJyaKanaami_Init(Actor* thisx, PlayState* play) { void BgJyaKanaami_Init(Actor* thisx, PlayState* play) {

View File

@ -62,15 +62,19 @@ static InitChainEntry sInitChain[] = {
void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, CollisionHeader* collision, s32 flag) { void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, CollisionHeader* collision, s32 flag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flag); DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) { void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {

View File

@ -53,17 +53,20 @@ void BgMoriBigst_SetupAction(BgMoriBigst* this, BgMoriBigstActionFunc actionFunc
void BgMoriBigst_InitDynapoly(BgMoriBigst* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void BgMoriBigst_InitDynapoly(BgMoriBigst* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG login failed" // "Warning : move BG login failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_bigst.c", 190, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgMoriBigst_Init(Actor* thisx, PlayState* play) { void BgMoriBigst_Init(Actor* thisx, PlayState* play) {

View File

@ -78,19 +78,21 @@ static InitChainEntry sInitChainLadder[] = {
void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader; CollisionHeader* colHeader = NULL;
s32 pad2;
colHeader = NULL;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG login failed" // "Warning : move BG login failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashigo.c", 164, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgMoriHashigo_InitCollider(BgMoriHashigo* this, PlayState* play) { void BgMoriHashigo_InitCollider(BgMoriHashigo* this, PlayState* play) {
@ -260,9 +262,9 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play) {
} }
void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this) { void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this) {
this->actionFunc = NULL;
this->dyna.actor.gravity = 0.0f; this->dyna.actor.gravity = 0.0f;
this->dyna.actor.velocity.y = 0.0f; this->dyna.actor.velocity.y = 0.0f;
this->actionFunc = NULL;
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
} }

View File

@ -50,19 +50,21 @@ void BgMoriHashira4_SetupAction(BgMoriHashira4* this, BgMoriHashira4ActionFunc a
void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader; CollisionHeader* colHeader = NULL;
s32 pad2;
colHeader = NULL;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG login failed" // "Warning : move BG login failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashira4.c", 155, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgMoriHashira4_Init(Actor* thisx, PlayState* play) { void BgMoriHashira4_Init(Actor* thisx, PlayState* play) {

View File

@ -41,16 +41,20 @@ void BgSpot08Iceblock_SetupAction(BgSpot08Iceblock* this, BgSpot08IceblockAction
void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, PlayState* play, CollisionHeader* collision, s32 flags) { void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning: move BG registration failed" // "Warning: move BG registration failed"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot08_iceblock.c", 0xD9, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
// Sets params to 0x10 (medium, nonrotating) if not in the cases listed. // Sets params to 0x10 (medium, nonrotating) if not in the cases listed.

View File

@ -46,15 +46,19 @@ static InitChainEntry sInitChain[] = {
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, PlayState* play, CollisionHeader* collision, s32 flags) { void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgSpot12Gate_Init(Actor* thisx, PlayState* play) { void BgSpot12Gate_Init(Actor* thisx, PlayState* play) {
@ -105,17 +109,19 @@ void func_808B317C(BgSpot12Gate* this) {
void func_808B318C(BgSpot12Gate* this, PlayState* play) { void func_808B318C(BgSpot12Gate* this, PlayState* play) {
s32 pad; s32 pad;
s32 quakeIndex;
Math_StepToF(&this->dyna.actor.velocity.y, 1.6f, 0.03f); 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, if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 200.0f,
this->dyna.actor.velocity.y)) { this->dyna.actor.velocity.y)) {
func_808B3274(this); func_808B3274(this);
quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_3); {
Quake_SetSpeed(quakeIndex, -0x3CB0); s32 quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_3);
Quake_SetPerturbations(quakeIndex, 3, 0, 0, 0);
Quake_SetDuration(quakeIndex, 12); 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); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
} else { } else {

View File

@ -43,15 +43,19 @@ static InitChainEntry sInitChain[] = {
void func_808B3420(BgSpot12Saku* this, PlayState* play, CollisionHeader* collision, s32 flags) { void func_808B3420(BgSpot12Saku* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgSpot12Saku_Init(Actor* thisx, PlayState* play) { void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {

View File

@ -58,17 +58,19 @@ static Vec3f sBoxGroundCheckPoints[] = {
void func_808B3960(BgSpot15Rrbox* this, PlayState* play, CollisionHeader* collision, s32 flags) { void func_808B3960(BgSpot15Rrbox* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
u32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void BgSpot15Rrbox_RotatePoint(Vec3f* outPos, Vec3f* pos, f32 arg2, f32 arg3) { 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) { void func_808B4084(BgSpot15Rrbox* this, PlayState* play) {
this->actionFunc = func_808B40AC;
this->dyna.actor.gravity = 0.0f; this->dyna.actor.gravity = 0.0f;
this->dyna.actor.velocity.x = 0.0f; this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.velocity.y = 0.0f; this->actionFunc = func_808B40AC;
this->dyna.actor.velocity.z = 0.0f;
} }
void func_808B40AC(BgSpot15Rrbox* this, PlayState* play) { 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) { void func_808B4380(BgSpot15Rrbox* this, PlayState* play) {
this->dyna.actor.velocity.x = 0.0f; this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.gravity = -1.0f; this->dyna.actor.gravity = -1.0f;
this->dyna.actor.floorHeight = BgSpot15Rrbox_GetFloorHeight(this, play); this->dyna.actor.floorHeight = BgSpot15Rrbox_GetFloorHeight(this, play);
this->actionFunc = func_808B43D0; this->actionFunc = func_808B43D0;

View File

@ -135,19 +135,20 @@ void ObjBean_InitCollider(Actor* thisx, PlayState* play) {
void ObjBean_InitDynaPoly(ObjBean* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void ObjBean_InitDynaPoly(ObjBean* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader; CollisionHeader* colHeader = NULL;
s32 pad2;
colHeader = NULL;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void ObjBean_FindFloor(ObjBean* this, PlayState* play) { void ObjBean_FindFloor(ObjBean* this, PlayState* play) {
@ -240,14 +241,8 @@ void ObjBean_FollowPath(ObjBean* this, PlayState* play) {
Path* path; Path* path;
Vec3f acell; Vec3f acell;
Vec3f pathPointsFloat; Vec3f pathPointsFloat;
f32 speed;
Vec3s* nextPathPoint;
Vec3s* currentPoint;
Vec3s* sp4C;
Vec3f sp40;
Vec3f sp34;
f32 sp30;
f32 mag; f32 mag;
Vec3s* nextPathPoint;
Math_StepToF(&this->dyna.actor.speed, sBeanSpeeds[this->unk_1F6].velocity, sBeanSpeeds[this->unk_1F6].accel); 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]; 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); Math_Vec3f_Diff(&pathPointsFloat, &this->pathPoints, &acell);
mag = Math3D_Vec3fMagnitude(&acell); mag = Math3D_Vec3fMagnitude(&acell);
speed = CLAMP_MIN(this->dyna.actor.speed, 0.5f); if (CLAMP_MIN(this->dyna.actor.speed, 0.5f) > mag) {
if (speed > mag) { Vec3s* currentPoint;
Vec3s* sp4C;
Vec3f sp40;
Vec3f sp34;
f32 sp30;
currentPoint = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->currentPointIndex]; currentPoint = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->currentPointIndex];
Math_Vec3f_Copy(&this->pathPoints, &pathPointsFloat); Math_Vec3f_Copy(&this->pathPoints, &pathPointsFloat);

View File

@ -46,16 +46,19 @@ void ObjElevator_SetupAction(ObjElevator* this, ObjElevatorActionFunc actionFunc
void func_80B92B08(ObjElevator* this, PlayState* play, CollisionHeader* collision, s32 flag) { void func_80B92B08(ObjElevator* this, PlayState* play, CollisionHeader* collision, s32 flag) {
s16 pad1; s16 pad1;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s16 pad2;
Actor* thisx = &this->dyna.actor;
DynaPolyActor_Init(&this->dyna, flag); DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader); 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) { 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, s32 pad2;
thisx->params);
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) { void ObjElevator_Init(Actor* thisx, PlayState* play) {

View File

@ -55,15 +55,19 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) {
void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 moveFlags) { void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 moveFlags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2[2];
DynaPolyActor_Init(&this->dyna, moveFlags); DynaPolyActor_Init(&this->dyna, moveFlags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void func_80B93BF0(ObjHsblock* this, PlayState* play) { void func_80B93BF0(ObjHsblock* this, PlayState* play) {

View File

@ -64,16 +64,19 @@ void ObjLift_SetupAction(ObjLift* this, ObjLiftActionFunc actionFunc) {
void ObjLift_InitDynaPoly(ObjLift* this, PlayState* play, CollisionHeader* collision, s32 flags) { void ObjLift_InitDynaPoly(ObjLift* this, PlayState* play, CollisionHeader* collision, s32 flags) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags); DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { 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, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void ObjLift_SpawnFragments(ObjLift* this, PlayState* play) { void ObjLift_SpawnFragments(ObjLift* this, PlayState* play) {

View File

@ -87,17 +87,20 @@ static Vec2f sFaceDirection[] = {
void ObjOshihiki_InitDynapoly(ObjOshihiki* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void ObjOshihiki_InitDynapoly(ObjOshihiki* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG registration failure" // "Warning : move BG registration failure"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_oshihiki.c", 280, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void ObjOshihiki_RotateXZ(Vec3f* out, Vec3f* in, f32 sn, f32 cs) { 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) { void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play2) {
Color_RGB8* src; PlayState* play = play2;
s16 paramsColorIdx = (this->dyna.actor.params >> 6) & 3;
Color_RGB8* color = &this->color; Color_RGB8* color = &this->color;
s16 paramsColorIdx; Color_RGB8* src;
s32 i; s32 i;
paramsColorIdx = (this->dyna.actor.params >> 6) & 3;
for (i = 0; i < ARRAY_COUNT(sSceneIds); i++) { for (i = 0; i < ARRAY_COUNT(sSceneIds); i++) {
if (sSceneIds[i] == play->sceneId) { if (sSceneIds[i] == play->sceneId) {
break; break;
@ -315,14 +317,12 @@ void ObjOshihiki_Destroy(Actor* thisx, PlayState* play) {
} }
void ObjOshihiki_SetFloors(ObjOshihiki* this, PlayState* play) { void ObjOshihiki_SetFloors(ObjOshihiki* this, PlayState* play) {
s32 pad;
Vec3f colCheckPoint;
Vec3f colCheckOffset;
s32 i; s32 i;
for (i = 0; i < 5; 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.x = sColCheckPoints[i].x * (this->dyna.actor.scale.x * 10.0f);
colCheckOffset.y = sColCheckPoints[i].y * (this->dyna.actor.scale.y * 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); 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.y += this->dyna.actor.prevPos.y;
colCheckPoint.z += this->dyna.actor.world.pos.z; colCheckPoint.z += this->dyna.actor.world.pos.z;
floorPoly = &this->floorPolys[i]; this->floorHeights[i] = BgCheck_EntityRaycastDown6(&play->colCtx, &this->floorPolys[i], &this->floorBgIds[i],
floorBgId = &this->floorBgIds[i]; &this->dyna.actor, &colCheckPoint, 0.0f);
this->floorHeights[i] =
BgCheck_EntityRaycastDown6(&play->colCtx, floorPoly, floorBgId, &this->dyna.actor, &colCheckPoint, 0.0f);
} }
} }
@ -445,9 +443,9 @@ s32 ObjOshihiki_MoveWithBlockUnder(ObjOshihiki* this, PlayState* play) {
void ObjOshihiki_SetupOnScene(ObjOshihiki* this, PlayState* play) { void ObjOshihiki_SetupOnScene(ObjOshihiki* this, PlayState* play) {
this->stateFlags |= PUSHBLOCK_SETUP_ON_SCENE; this->stateFlags |= PUSHBLOCK_SETUP_ON_SCENE;
this->actionFunc = ObjOshihiki_OnScene;
this->dyna.actor.gravity = 0.0f; this->dyna.actor.gravity = 0.0f;
this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = 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 = ObjOshihiki_OnScene;
} }
void ObjOshihiki_OnScene(ObjOshihiki* this, PlayState* play) { 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) { void ObjOshihiki_SetupOnActor(ObjOshihiki* this, PlayState* play) {
this->stateFlags |= PUSHBLOCK_SETUP_ON_ACTOR; 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.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.gravity = -1.0f; this->dyna.actor.gravity = -1.0f;
this->actionFunc = ObjOshihiki_OnActor;
} }
void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) { 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), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_obj_oshihiki.c", 1308),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
#if OOT_DEBUG
switch (play->sceneId) { switch (play->sceneId) {
case SCENE_DEKU_TREE: case SCENE_DEKU_TREE:
case SCENE_DODONGOS_CAVERN: 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); gDPSetEnvColor(POLY_OPA_DISP++, mREG(13), mREG(14), mREG(15), 255);
break; break;
} }
#else
gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, 255);
#endif
gSPDisplayList(POLY_OPA_DISP++, gPushBlockDL); gSPDisplayList(POLY_OPA_DISP++, gPushBlockDL);
CLOSE_DISPS(play->state.gfxCtx, "../z_obj_oshihiki.c", 1334); CLOSE_DISPS(play->state.gfxCtx, "../z_obj_oshihiki.c", 1334);

View File

@ -192,17 +192,20 @@ void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 rotY) {
void ObjSwitch_InitDynaPoly(ObjSwitch* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) { void ObjSwitch_InitDynaPoly(ObjSwitch* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
s32 pad; s32 pad;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, moveFlag); DynaPolyActor_Init(&this->dyna, moveFlag);
CollisionHeader_GetVirtual(collision, &colHeader); CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
#if OOT_DEBUG
if (this->dyna.bgId == BG_ACTOR_MAX) { if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
// "Warning : move BG registration failure" // "Warning : move BG registration failure"
PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_switch.c", 531, 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); this->dyna.actor.id, this->dyna.actor.params);
} }
#endif
} }
void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* colliderJntSphInit) { void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* colliderJntSphInit) {