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

More bg actors (#1743)

This commit is contained in:
cadmic 2024-02-20 04:00:55 -08:00 committed by GitHub
parent 59017f201e
commit 5c31e686f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 192 additions and 138 deletions

View File

@ -347,11 +347,13 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
Actor_MoveXZGravity(&this->dyna.actor); Actor_MoveXZGravity(&this->dyna.actor);
func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent); func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent);
#if OOT_DEBUG
if (((this->dyna.actor.params & 0xFF) <= 0) || ((this->dyna.actor.params & 0xFF) >= 6)) { if (((this->dyna.actor.params & 0xFF) <= 0) || ((this->dyna.actor.params & 0xFF) >= 6)) {
// "[Hammer Step] arg_data strange (arg_data = %d)" // "[Hammer Step] arg_data strange (arg_data = %d)"
PRINTF("【ハンマーステップ】 arg_data おかしい (arg_data = %d)", this->dyna.actor.params); PRINTF("【ハンマーステップ】 arg_data おかしい (arg_data = %d)", this->dyna.actor.params);
PRINTF("%s %d\n", "../z_bg_hidan_hamstep.c", 696); PRINTF("%s %d\n", "../z_bg_hidan_hamstep.c", 696);
} }
#endif
if (((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) <= if (((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) <=
sYPosOffsets[(this->dyna.actor.params & 0xFF) - 1]) && sYPosOffsets[(this->dyna.actor.params & 0xFF) - 1]) &&

View File

@ -82,6 +82,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) {
s32 i; s32 i;
s32 j; s32 j;
CollisionHeader* collisionHeader = NULL; CollisionHeader* collisionHeader = NULL;
Vec3f* vtx;
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
this->unk_16A = thisx->params & 0x3F; this->unk_16A = thisx->params & 0x3F;
@ -103,7 +104,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) {
if (1) { if (1) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
Vec3f* vtx = &colliderElementInit->dim.vtx[j]; vtx = &colliderElementInit->dim.vtx[j];
vertices[j].x = vtx->z * sinRotY + (thisx->home.pos.x + vtx->x * cosRotY); vertices[j].x = vtx->z * sinRotY + (thisx->home.pos.x + vtx->x * cosRotY);
vertices[j].y = vtx->y + thisx->home.pos.y; vertices[j].y = vtx->y + thisx->home.pos.y;

View File

@ -73,9 +73,12 @@ void BgHidanKousi_Init(Actor* thisx, PlayState* play) {
((s32)thisx->params >> 8) & 0xFF); ((s32)thisx->params >> 8) & 0xFF);
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
#if OOT_DEBUG
if (((thisx->params & 0xFF) < 0) || ((thisx->params & 0xFF) >= 3)) { if (((thisx->params & 0xFF) < 0) || ((thisx->params & 0xFF) >= 3)) {
PRINTF("arg_data おかしい 【格子】\n"); PRINTF("arg_data おかしい 【格子】\n");
} }
#endif
CollisionHeader_GetVirtual(sMetalFencesCollisions[thisx->params & 0xFF], &colHeader); CollisionHeader_GetVirtual(sMetalFencesCollisions[thisx->params & 0xFF], &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);

View File

@ -130,9 +130,10 @@ void func_8088CEC0(BgHidanSekizou* this, s32 arg1, s16 arg2) {
s32 end = start + 3; s32 end = start + 3;
f32 sp30 = Math_SinS(arg2); f32 sp30 = Math_SinS(arg2);
f32 sp2C = Math_CosS(arg2); f32 sp2C = Math_CosS(arg2);
ColliderJntSphElement* element;
for (i = start; i < end; i++) { for (i = start; i < end; i++) {
ColliderJntSphElement* element = &this->collider.elements[i]; element = &this->collider.elements[i];
element->dim.worldSphere.center.x = this->dyna.actor.home.pos.x + (sp2C * element->dim.modelSphere.center.x) + element->dim.worldSphere.center.x = this->dyna.actor.home.pos.x + (sp2C * element->dim.modelSphere.center.x) +
(sp30 * element->dim.modelSphere.center.z); (sp30 * element->dim.modelSphere.center.z);
@ -301,8 +302,8 @@ Gfx* func_8088D9F4(PlayState* play, BgHidanSekizou* this, s16 arg2, MtxF* arg3,
f32 phi_f12; f32 phi_f12;
arg6 = (((arg6 + arg2) % 8) * 7) * (1 / 7.0f); arg6 = (((arg6 + arg2) % 8) * 7) * (1 / 7.0f);
arg2++;
gSPSegment(arg7++, 9, SEGMENTED_TO_VIRTUAL(sFireballsTexs[arg6])); gSPSegment(arg7++, 9, SEGMENTED_TO_VIRTUAL(sFireballsTexs[arg6]));
arg2++;
if (arg2 != 4) { if (arg2 != 4) {
phi_f12 = arg2 + ((4 - this->unk_170) / 4.0f); phi_f12 = arg2 + ((4 - this->unk_170) / 4.0f);
} else { } else {

View File

@ -49,7 +49,6 @@ void BgIceShutter_Init(Actor* thisx, PlayState* play) {
f32 sp24; f32 sp24;
CollisionHeader* colHeader; CollisionHeader* colHeader;
s32 sp28; s32 sp28;
f32 temp_f6;
colHeader = NULL; colHeader = NULL;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
@ -78,7 +77,8 @@ void BgIceShutter_Init(Actor* thisx, PlayState* play) {
} }
if (sp28 == 2) { if (sp28 == 2) {
temp_f6 = Math_SinS(this->dyna.actor.shape.rot.x) * 50.0f; f32 temp_f6 = Math_SinS(this->dyna.actor.shape.rot.x) * 50.0f;
this->dyna.actor.focus.pos.x = this->dyna.actor.focus.pos.x =
(Math_SinS(this->dyna.actor.shape.rot.y) * temp_f6) + this->dyna.actor.home.pos.x; (Math_SinS(this->dyna.actor.shape.rot.y) * temp_f6) + this->dyna.actor.home.pos.x;
this->dyna.actor.focus.pos.y = this->dyna.actor.home.pos.y; this->dyna.actor.focus.pos.y = this->dyna.actor.home.pos.y;

View File

@ -74,10 +74,12 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, PlayState* play) {
this->puzzleFlags &= ~cobraPuzzleFlags[i]; this->puzzleFlags &= ~cobraPuzzleFlags[i];
} }
#if OOT_DEBUG
if (curCobraInfo->cobra->dyna.actor.update == NULL) { if (curCobraInfo->cobra->dyna.actor.update == NULL) {
// "Cobra deleted" // "Cobra deleted"
PRINTF("Error : コブラ削除された (%s %d)\n", "../z_bg_jya_bigmirror.c", 203); PRINTF("Error : コブラ削除された (%s %d)\n", "../z_bg_jya_bigmirror.c", 203);
} }
#endif
} else { } else {
curCobraInfo->cobra = (BgJyaCobra*)Actor_SpawnAsChild( curCobraInfo->cobra = (BgJyaCobra*)Actor_SpawnAsChild(
&play->actorCtx, &this->actor, play, ACTOR_BG_JYA_COBRA, curSpawnData->pos.x, curSpawnData->pos.y, &play->actorCtx, &this->actor, play, ACTOR_BG_JYA_COBRA, curSpawnData->pos.x, curSpawnData->pos.y,
@ -136,17 +138,10 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, PlayState* play) {
this->lightBeams[1] = NULL; this->lightBeams[1] = NULL;
this->lightBeams[0] = NULL; this->lightBeams[0] = NULL;
} else { } else {
puzzleSolved = !!(this->puzzleFlags & (BIGMIR_PUZZLE_IN_STATUE_ROOM | BIGMIR_PUZZLE_IN_1ST_TOP_ROOM)); // Only spawn if puzzle solved
lightBeamToggles[0] = (this->puzzleFlags & (BIGMIR_PUZZLE_IN_STATUE_ROOM | BIGMIR_PUZZLE_IN_1ST_TOP_ROOM)) &&
if (puzzleSolved) { (this->puzzleFlags & BIGMIR_PUZZLE_COBRA2_SOLVED) &&
puzzleSolved = !!(this->puzzleFlags & BIGMIR_PUZZLE_COBRA2_SOLVED); (this->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED);
if (puzzleSolved) {
puzzleSolved = !!(this->puzzleFlags & BIGMIR_PUZZLE_COBRA1_SOLVED);
}
}
lightBeamToggles[0] = puzzleSolved; // Only spawn if puzzle solved
if (1) {}
lightBeamToggles[1] = lightBeamToggles[2] = lightBeamToggles[1] = lightBeamToggles[2] =
this->puzzleFlags & (BIGMIR_PUZZLE_IN_1ST_TOP_ROOM | BIGMIR_PUZZLE_IN_2ND_TOP_ROOM); this->puzzleFlags & (BIGMIR_PUZZLE_IN_1ST_TOP_ROOM | BIGMIR_PUZZLE_IN_2ND_TOP_ROOM);
@ -158,10 +153,12 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, sMirRayPositions[i].x, sMirRayPositions[i].y, Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, sMirRayPositions[i].x, sMirRayPositions[i].y,
sMirRayPositions[i].z, 0, 0, 0, sMirRayParamsVals[i]); sMirRayPositions[i].z, 0, 0, 0, sMirRayParamsVals[i]);
#if OOT_DEBUG
if (this->lightBeams[i] == NULL) { if (this->lightBeams[i] == NULL) {
// "Mir Ray generation failed" // "Mir Ray generation failed"
PRINTF("Error : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_bigmirror.c", 310); PRINTF("Error : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_bigmirror.c", 310);
} }
#endif
} }
} else { } else {
if (this->lightBeams[i] != NULL) { if (this->lightBeams[i] != NULL) {

View File

@ -106,10 +106,13 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, PlayState* play, EnIk
f32 sins; f32 sins;
s32 pad[2]; s32 pad[2];
#if OOT_DEBUG
if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) { if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) {
PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 233, enIk->unk_2FF); PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 233, enIk->unk_2FF);
return; return;
} }
#endif
PRINTF("¢ attack_type(%d)\n", enIk->unk_2FF); PRINTF("¢ attack_type(%d)\n", enIk->unk_2FF);
rotY = Actor_WorldYawTowardActor(&this->dyna.actor, &enIk->actor) + D_808994D8[enIk->unk_2FF - 1]; rotY = Actor_WorldYawTowardActor(&this->dyna.actor, &enIk->actor) + D_808994D8[enIk->unk_2FF - 1];
@ -169,10 +172,13 @@ void BgJyaIronobj_SpawnThroneParticles(BgJyaIronobj* this, PlayState* play, EnIk
f32 sins; f32 sins;
s32 pad[2]; s32 pad[2];
#if OOT_DEBUG
if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) { if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) {
PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 362, enIk->unk_2FF); PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 362, enIk->unk_2FF);
return; return;
} }
#endif
PRINTF("¢ attack_type(%d)\n", enIk->unk_2FF); PRINTF("¢ attack_type(%d)\n", enIk->unk_2FF);
rotY = Actor_WorldYawTowardActor(&this->dyna.actor, &enIk->actor) + D_808994D8[enIk->unk_2FF - 1]; rotY = Actor_WorldYawTowardActor(&this->dyna.actor, &enIk->actor) + D_808994D8[enIk->unk_2FF - 1];
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {

View File

@ -217,10 +217,11 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, PlayState* play) {
void BgJyaMegami_SetupExplode(BgJyaMegami* this) { void BgJyaMegami_SetupExplode(BgJyaMegami* this) {
u32 i; u32 i;
Vec3f* pos = &this->dyna.actor.world.pos;
this->actionFunc = BgJyaMegami_Explode; this->actionFunc = BgJyaMegami_Explode;
for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { for (i = 0; i < ARRAY_COUNT(this->pieces); i++) {
Math_Vec3f_Copy(&this->pieces[i].pos, &this->dyna.actor.world.pos); Math_Vec3f_Copy(&this->pieces[i].pos, pos);
this->pieces[i].vel.x = sPiecesInit[i].velX; this->pieces[i].vel.x = sPiecesInit[i].velX;
} }
this->explosionTimer = 0; this->explosionTimer = 0;

View File

@ -182,7 +182,14 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
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);
switch ((u16)this->dyna.actor.params & 0xF) { switch ((u16)this->dyna.actor.params & 0xF) {
case MIZUBWALL_FLOOR: case MIZUBWALL_FLOOR: {
f32 sin;
f32 cos;
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL; this->dList = NULL;
@ -194,12 +201,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.params); this->dyna.actor.params);
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);
} else { } else {
f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); sin = Math_SinS(this->dyna.actor.shape.rot.y);
f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); cos = Math_CosS(this->dyna.actor.shape.rot.y);
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) { for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
@ -217,7 +220,15 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} }
} }
break; break;
case MIZUBWALL_RUTO_ROOM: }
case MIZUBWALL_RUTO_ROOM: {
f32 sin;
f32 cos;
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL; this->dList = NULL;
@ -229,12 +240,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.params); this->dyna.actor.params);
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);
} else { } else {
f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); sin = Math_SinS(this->dyna.actor.shape.rot.y);
f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); cos = Math_CosS(this->dyna.actor.shape.rot.y);
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
for (i = 0; i < ARRAY_COUNT(sTrisElementInitRutoWall); i++) { for (i = 0; i < ARRAY_COUNT(sTrisElementInitRutoWall); i++) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
@ -252,7 +259,15 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} }
} }
break; break;
case MIZUBWALL_UNUSED: }
case MIZUBWALL_UNUSED: {
f32 sin;
f32 cos;
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL; this->dList = NULL;
@ -264,12 +279,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.params); this->dyna.actor.params);
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);
} else { } else {
f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); sin = Math_SinS(this->dyna.actor.shape.rot.y);
f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); cos = Math_CosS(this->dyna.actor.shape.rot.y);
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) { for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
@ -289,7 +300,15 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} }
} }
break; break;
case MIZUBWALL_STINGER_ROOM_1: }
case MIZUBWALL_STINGER_ROOM_1: {
f32 sin;
f32 cos;
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL; this->dList = NULL;
@ -302,12 +321,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.params); this->dyna.actor.params);
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);
} else { } else {
f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); sin = Math_SinS(this->dyna.actor.shape.rot.y);
f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); cos = Math_CosS(this->dyna.actor.shape.rot.y);
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) { for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
@ -327,7 +342,15 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} }
} }
break; break;
case MIZUBWALL_STINGER_ROOM_2: }
case MIZUBWALL_STINGER_ROOM_2: {
f32 sin;
f32 cos;
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) { if (Flags_GetSwitch(play, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dList = NULL; this->dList = NULL;
@ -340,12 +363,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.params); this->dyna.actor.params);
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);
} else { } else {
f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); sin = Math_SinS(this->dyna.actor.shape.rot.y);
f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); cos = Math_CosS(this->dyna.actor.shape.rot.y);
s32 i;
s32 j;
Vec3f offset;
Vec3f vtx[3];
for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) { for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
for (j = 0; j < 3; j++) { for (j = 0; j < 3; j++) {
@ -365,6 +384,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} }
} }
break; break;
}
} }
} }
@ -377,9 +397,8 @@ void BgMizuBwall_Destroy(Actor* thisx, PlayState* play) {
} }
void BgMizuBwall_SetAlpha(BgMizuBwall* this, PlayState* play) { void BgMizuBwall_SetAlpha(BgMizuBwall* this, PlayState* play) {
f32 waterLevel = play->colCtx.colHeader->waterBoxes[2].ySurface; WaterBox* waterBoxes = play->colCtx.colHeader->waterBoxes;
f32 waterLevel = waterBoxes[2].ySurface;
if (play->colCtx.colHeader->waterBoxes) {}
if (waterLevel < WATER_TEMPLE_WATER_F1_Y) { if (waterLevel < WATER_TEMPLE_WATER_F1_Y) {
this->scrollAlpha1 = 255; this->scrollAlpha1 = 255;

View File

@ -53,6 +53,7 @@ static InitChainEntry sInitChain[] = {
u32 BgMizuWater_GetWaterLevelActionIndex(s16 switchFlag, PlayState* play) { u32 BgMizuWater_GetWaterLevelActionIndex(s16 switchFlag, PlayState* play) {
u32 ret; u32 ret;
#if OOT_DEBUG
if (bREG(0) != 0) { if (bREG(0) != 0) {
switch (bREG(1)) { switch (bREG(1)) {
case 0: case 0:
@ -67,6 +68,8 @@ u32 BgMizuWater_GetWaterLevelActionIndex(s16 switchFlag, PlayState* play) {
} }
bREG(0) = 0; bREG(0) = 0;
} }
#endif
if (Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG) && (switchFlag != WATER_TEMPLE_WATER_F1_FLAG)) { if (Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG) && (switchFlag != WATER_TEMPLE_WATER_F1_FLAG)) {
ret = 3; ret = 3;
} else if (Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG) && (switchFlag != WATER_TEMPLE_WATER_F2_FLAG)) { } else if (Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG) && (switchFlag != WATER_TEMPLE_WATER_F2_FLAG)) {
@ -297,10 +300,13 @@ void BgMizuWater_Update(Actor* thisx, PlayState* play) {
s32 unk1; s32 unk1;
s32 pad; s32 pad;
#if OOT_DEBUG
if (bREG(15) == 0) { if (bREG(15) == 0) {
PRINTF("%x %x %x\n", Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG), PRINTF("%x %x %x\n", Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG),
Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG), Flags_GetSwitch(play, WATER_TEMPLE_WATER_F3_FLAG)); Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG), Flags_GetSwitch(play, WATER_TEMPLE_WATER_F3_FLAG));
} }
#endif
if (this->type == 0) { if (this->type == 0) {
posY = this->actor.world.pos.y; posY = this->actor.world.pos.y;
unk0 = 0; unk0 = 0;

View File

@ -88,27 +88,31 @@ void BgMoriElevator_Init(Actor* thisx, PlayState* play) {
this->unk_172 = sIsSpawned; this->unk_172 = sIsSpawned;
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX); this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
#if OOT_DEBUG
if (this->moriTexObjectSlot < 0) { if (this->moriTexObjectSlot < 0) {
Actor_Kill(thisx); Actor_Kill(thisx);
// "Forest Temple obj elevator Bank Danger!" // "Forest Temple obj elevator Bank Danger!"
PRINTF("Error : 森の神殿 obj elevator バンク危険!(%s %d)\n", "../z_bg_mori_elevator.c", 277); PRINTF("Error : 森の神殿 obj elevator バンク危険!(%s %d)\n", "../z_bg_mori_elevator.c", 277);
} else { return;
switch (sIsSpawned) { }
case false: #endif
// "Forest Temple elevator CT"
PRINTF("森の神殿 elevator CT\n"); switch (sIsSpawned) {
sIsSpawned = true; case false:
this->dyna.actor.room = -1; // "Forest Temple elevator CT"
Actor_ProcessInitChain(&this->dyna.actor, sInitChain); PRINTF("森の神殿 elevator CT\n");
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); sIsSpawned = true;
CollisionHeader_GetVirtual(&gMoriElevatorCol, &colHeader); this->dyna.actor.room = -1;
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader); Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
BgMoriElevator_SetupWaitAfterInit(this); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
break; CollisionHeader_GetVirtual(&gMoriElevatorCol, &colHeader);
case true: this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
Actor_Kill(thisx); BgMoriElevator_SetupWaitAfterInit(this);
break; break;
} case true:
Actor_Kill(thisx);
break;
} }
} }

View File

@ -12,7 +12,7 @@
void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play); void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play);
void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play); void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play);
void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play); void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play2);
void BgMoriRakkatenjo_Draw(Actor* thisx, PlayState* play); void BgMoriRakkatenjo_Draw(Actor* thisx, PlayState* play);
void BgMoriRakkatenjo_SetupWaitForMoriTex(BgMoriRakkatenjo* this); void BgMoriRakkatenjo_SetupWaitForMoriTex(BgMoriRakkatenjo* this);
@ -52,6 +52,8 @@ void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play) {
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS); DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
#if OOT_DEBUG
// "Forest Temple obj. Falling Ceiling" // "Forest Temple obj. Falling Ceiling"
PRINTF("森の神殿 obj. 落下天井 (home posY %f)\n", this->dyna.actor.home.pos.y); PRINTF("森の神殿 obj. 落下天井 (home posY %f)\n", this->dyna.actor.home.pos.y);
if ((fabsf(1991.0f - this->dyna.actor.home.pos.x) > 0.001f) || if ((fabsf(1991.0f - this->dyna.actor.home.pos.x) > 0.001f) ||
@ -64,6 +66,8 @@ void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play) {
// "The set Angle has changed. Let's fix the program." // "The set Angle has changed. Let's fix the program."
PRINTF("Warning : セット Angle が変更されています。プログラムを修正しましょう。\n"); PRINTF("Warning : セット Angle が変更されています。プログラムを修正しましょう。\n");
} }
#endif
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX); this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) { if (this->moriTexObjectSlot < 0) {
// "Forest Temple obj Falling Ceiling Bank Danger!" // "Forest Temple obj Falling Ceiling Bank Danger!"
@ -197,8 +201,8 @@ void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, PlayState* play) {
} }
} }
void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play) { void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play2) {
s32 pad; PlayState* play = (PlayState*)play2;
BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx; BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx;
if (this->timer > 0) { if (this->timer > 0) {

View File

@ -197,8 +197,9 @@ void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, PlayState* play)
} }
void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) {
BgSpot00Hanebasi* this = (BgSpot00Hanebasi*)thisx;
s32 pad; s32 pad;
BgSpot00Hanebasi* this = (BgSpot00Hanebasi*)thisx;
Player* player;
this->actionFunc(this, play); this->actionFunc(this, play);
@ -206,7 +207,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) {
if (play->sceneId == SCENE_HYRULE_FIELD) { if (play->sceneId == SCENE_HYRULE_FIELD) {
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) && if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80) && LINK_IS_CHILD) { CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80) && LINK_IS_CHILD) {
Player* player = GET_PLAYER(play); player = GET_PLAYER(play);
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) && if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
(player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) && (player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) &&

View File

@ -117,10 +117,11 @@ void func_808AAE6C(BgSpot01Idohashira* this, PlayState* play) {
void func_808AAF34(BgSpot01Idohashira* this, PlayState* play) { void func_808AAF34(BgSpot01Idohashira* this, PlayState* play) {
s32 pad[2]; s32 pad[2];
Vec3f dest;
Vec3f src;
if (this->unk_170 != 0) { if (this->unk_170 != 0) {
Vec3f dest;
Vec3f src;
src.x = kREG(20) + 1300.0f; src.x = kREG(20) + 1300.0f;
src.y = kREG(21) + 200.0f; src.y = kREG(21) + 200.0f;
src.z = 0.0f; src.z = 0.0f;
@ -170,13 +171,11 @@ void func_808AB18C(BgSpot01Idohashira* this) {
f32 func_808AB1DC(f32 arg0, f32 arg1, u16 arg2, u16 arg3, u16 arg4) { f32 func_808AB1DC(f32 arg0, f32 arg1, u16 arg2, u16 arg3, u16 arg4) {
f32 temp_f12; f32 temp_f12;
f32 regFloat; f32 regFloat;
f32 diff23; f32 diff23 = arg2 - arg3;
f32 diff43; f32 diff43 = arg4 - arg3;
diff23 = arg2 - arg3;
if (diff23 != 0.0f) { if (diff23 != 0.0f) {
regFloat = kREG(9) + 30.0f; regFloat = kREG(9) + 30.0f;
diff43 = arg4 - arg3;
temp_f12 = regFloat * diff43; temp_f12 = regFloat * diff43;
return (((((arg1 - arg0) - temp_f12) / SQ(diff23)) * diff43) * diff43) + temp_f12; return (((((arg1 - arg0) - temp_f12) / SQ(diff23)) * diff43) * diff43) + temp_f12;
} }

View File

@ -13,8 +13,8 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play);
void BgSpot02Objects_Destroy(Actor* thisx, PlayState* play); void BgSpot02Objects_Destroy(Actor* thisx, PlayState* play);
void BgSpot02Objects_Update(Actor* thisx, PlayState* play); void BgSpot02Objects_Update(Actor* thisx, PlayState* play);
void BgSpot02Objects_Draw(Actor* thisx, PlayState* play); void BgSpot02Objects_Draw(Actor* thisx, PlayState* play);
void func_808ACCB8(Actor* thisx, PlayState* play); void func_808ACCB8(Actor* thisx, PlayState* play2);
void func_808AD450(Actor* thisx, PlayState* play); void func_808AD450(Actor* thisx, PlayState* play2);
void func_808AC8FC(BgSpot02Objects* this, PlayState* play); void func_808AC8FC(BgSpot02Objects* this, PlayState* play);
void func_808AC908(BgSpot02Objects* this, PlayState* play); void func_808AC908(BgSpot02Objects* this, PlayState* play);
@ -212,10 +212,10 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
} }
} }
void func_808ACCB8(Actor* thisx, PlayState* play) { void func_808ACCB8(Actor* thisx, PlayState* play2) {
BgSpot02Objects* this = (BgSpot02Objects*)thisx; BgSpot02Objects* this = (BgSpot02Objects*)thisx;
PlayState* play = (PlayState*)play2;
f32 rate; f32 rate;
s32 pad;
u8 redPrim; u8 redPrim;
u8 greenPrim; u8 greenPrim;
u8 bluePrim; u8 bluePrim;
@ -225,6 +225,8 @@ void func_808ACCB8(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 600); OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 600);
if (1) {}
if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) { if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) {
if (this->unk_16A < 5) { if (this->unk_16A < 5) {
rate = (this->unk_16A / 5.0f); rate = (this->unk_16A / 5.0f);
@ -278,9 +280,9 @@ void func_808AD3D4(BgSpot02Objects* this, PlayState* play) {
} }
} }
void func_808AD450(Actor* thisx, PlayState* play) { void func_808AD450(Actor* thisx, PlayState* play2) {
BgSpot02Objects* this = (BgSpot02Objects*)thisx; BgSpot02Objects* this = (BgSpot02Objects*)thisx;
s32 pad; PlayState* play = (PlayState*)play2;
f32 lerp; f32 lerp;
OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 736); OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 736);

View File

@ -147,6 +147,8 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_001580); gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_001580);
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_bg_spot03_taki.c", 358); CLOSE_DISPS(play->state.gfxCtx, "../z_bg_spot03_taki.c", 358);
this->bufferIndex = this->bufferIndex == 0; this->bufferIndex = this->bufferIndex == 0;

View File

@ -111,11 +111,12 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) {
if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) { if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) {
thisx->world.pos.y = thisx->home.pos.y + 120.0f; thisx->world.pos.y = thisx->home.pos.y + 120.0f;
this->actionFunc = BgSpot06Objects_DoNothing; this->actionFunc = BgSpot06Objects_DoNothing;
} else { } else {
this->actionFunc = BgSpot06Objects_GateWaitForSwitch; this->actionFunc = BgSpot06Objects_GateWaitForSwitch;
} }
if (1) {}
break; break;
case LHO_WATER_TEMPLE_ENTRANCE_LOCK: case LHO_WATER_TEMPLE_ENTRANCE_LOCK:
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);

View File

@ -125,7 +125,6 @@ void BgSpot11Oasis_Update(Actor* thisx, PlayState* play) {
BgSpot11Oasis* this = (BgSpot11Oasis*)thisx; BgSpot11Oasis* this = (BgSpot11Oasis*)thisx;
s32 pad; s32 pad;
u32 gameplayFrames; u32 gameplayFrames;
Vec3f sp30;
this->actionFunc(this, play); this->actionFunc(this, play);
if (this->actionFunc == func_808B2980) { if (this->actionFunc == func_808B2980) {
@ -136,6 +135,8 @@ void BgSpot11Oasis_Update(Actor* thisx, PlayState* play) {
if (this->unk_150 && (this->actor.projectedPos.z < 400.0f) && (this->actor.projectedPos.z > -40.0f)) { if (this->unk_150 && (this->actor.projectedPos.z < 400.0f) && (this->actor.projectedPos.z > -40.0f)) {
gameplayFrames = play->gameplayFrames; gameplayFrames = play->gameplayFrames;
if (gameplayFrames & 4) { if (gameplayFrames & 4) {
Vec3f sp30;
Math_Vec3f_Sum(&this->actor.world.pos, &D_808B2E34[this->unk_151], &sp30); Math_Vec3f_Sum(&this->actor.world.pos, &D_808B2E34[this->unk_151], &sp30);
EffectSsBubble_Spawn(play, &sp30, 0.0f, 15.0f, 50.0f, (Rand_ZeroOne() * 0.12f) + 0.02f); EffectSsBubble_Spawn(play, &sp30, 0.0f, 15.0f, 50.0f, (Rand_ZeroOne() * 0.12f) + 0.02f);
if (Rand_ZeroOne() < 0.3f) { if (Rand_ZeroOne() < 0.3f) {

View File

@ -230,8 +230,8 @@ s32 func_808B4E58(BgSpot16Bombstone* this, PlayState* play) {
} }
void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) { void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) {
s16 shouldLive = true;
BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx; BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx;
s16 shouldLive;
func_808B4C30(this); func_808B4C30(this);
@ -240,6 +240,7 @@ void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) {
// The boulder is intact // The boulder is intact
shouldLive = func_808B4D9C(this, play); shouldLive = func_808B4D9C(this, play);
break; break;
case 0: case 0:
case 1: case 1:
case 2: case 2:
@ -249,11 +250,14 @@ void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) {
// The boulder is debris // The boulder is debris
shouldLive = func_808B4E58(this, play); shouldLive = func_808B4E58(this, play);
break; break;
#if OOT_DEBUG
default: default:
PRINTF("Error : arg_data おかしいな(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot16_bombstone.c", 668, PRINTF("Error : arg_data おかしいな(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot16_bombstone.c", 668,
this->actor.params); this->actor.params);
shouldLive = false; shouldLive = false;
break; break;
#endif
} }
if (!shouldLive) { if (!shouldLive) {
@ -451,12 +455,14 @@ void func_808B5950(BgSpot16Bombstone* this, PlayState* play) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
} }
#if OOT_DEBUG
if (mREG(64) == 1) { if (mREG(64) == 1) {
func_808B561C(this, play); func_808B561C(this, play);
mREG(64) = -10; mREG(64) = -10;
} else if (mREG(64) < 0) { } else if (mREG(64) < 0) {
mREG(64)++; mREG(64)++;
} }
#endif
} }
void func_808B5A78(BgSpot16Bombstone* this) { void func_808B5A78(BgSpot16Bombstone* this) {

View File

@ -91,33 +91,33 @@ void func_808B7770(BgSpot18Basket* this, PlayState* play, f32 arg2) {
s32 i; s32 i;
f32 randomValue; f32 randomValue;
f32 sinValue; f32 sinValue;
s32 count;
for (i = 0, count = 2; i != count; i++) { for (i = 0; i != 2; i++) {
if (play) {} if (arg2 < Rand_ZeroOne()) {
if (!(arg2 < Rand_ZeroOne())) { continue;
D_808B85D0 += 0x7530;
sinValue = Math_SinS(D_808B85D0);
cosValue = Math_CosS(D_808B85D0);
randomValue = (Rand_ZeroOne() * 35.0f) + 35.0f;
position.x = (randomValue * sinValue) + this->dyna.actor.world.pos.x;
position.y = this->dyna.actor.world.pos.y + 10.0f;
position.z = (randomValue * cosValue) + this->dyna.actor.world.pos.z;
velocity.x = sinValue;
velocity.y = 0.0f;
velocity.z = cosValue;
acceleration.x = 0.0f;
acceleration.y = 0.5f;
acceleration.z = 0.0f;
func_800286CC(play, &position, &velocity, &acceleration, ((Rand_ZeroOne() * 16) + 80),
((Rand_ZeroOne() * 30) + 80));
} }
D_808B85D0 += 0x7530;
sinValue = Math_SinS(D_808B85D0);
cosValue = Math_CosS(D_808B85D0);
randomValue = (Rand_ZeroOne() * 35.0f) + 35.0f;
position.x = (randomValue * sinValue) + this->dyna.actor.world.pos.x;
position.y = this->dyna.actor.world.pos.y + 10.0f;
position.z = (randomValue * cosValue) + this->dyna.actor.world.pos.z;
velocity.x = sinValue;
velocity.y = 0.0f;
velocity.z = cosValue;
acceleration.x = 0.0f;
acceleration.y = 0.5f;
acceleration.z = 0.0f;
func_800286CC(play, &position, &velocity, &acceleration, ((Rand_ZeroOne() * 16) + 80),
((Rand_ZeroOne() * 30) + 80));
} }
} }
@ -240,9 +240,6 @@ void func_808B7D38(BgSpot18Basket* this) {
} }
void func_808B7D50(BgSpot18Basket* this, PlayState* play) { void func_808B7D50(BgSpot18Basket* this, PlayState* play) {
f32 tempValue2;
f32 tempValue;
if (this->unk_216 > 120) { if (this->unk_216 > 120) {
Math_StepToS(&this->unk_210, 0x3E8, 0x32); Math_StepToS(&this->unk_210, 0x3E8, 0x32);
} else { } else {
@ -281,11 +278,12 @@ void func_808B7D50(BgSpot18Basket* this, PlayState* play) {
func_808B7770(this, play, 0.8f); func_808B7770(this, play, 0.8f);
} }
tempValue2 = (this->unk_210 - 500) * 0.0006f; {
f32 tempValue2 = (this->unk_210 - 500) * 0.0006f;
f32 tempValue = CLAMP(tempValue2, 0.0f, 1.5f);
tempValue = CLAMP(tempValue2, 0.0f, 1.5f); func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, tempValue);
}
func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, tempValue);
} }
void func_808B7F74(BgSpot18Basket* this) { void func_808B7F74(BgSpot18Basket* this) {
@ -308,9 +306,7 @@ void func_808B7F74(BgSpot18Basket* this) {
void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { void func_808B7FC0(BgSpot18Basket* this, PlayState* play) {
s32 pad; s32 pad;
s32 tempUnk214; s32 tempUnk214;
f32 tempUnk210;
s16 arrayValue; s16 arrayValue;
f32 clampedTempUnk210;
this->unk_212 += 0xBB8; this->unk_212 += 0xBB8;
@ -343,11 +339,12 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) {
func_808B7770(this, play, 0.3f); func_808B7770(this, play, 0.3f);
} }
tempUnk210 = (this->unk_210 - 500) * 0.0006f; {
f32 tempUnk210 = (this->unk_210 - 500) * 0.0006f;
f32 clampedTempUnk210 = CLAMP(tempUnk210, 0.0f, 1.5f);
clampedTempUnk210 = CLAMP(tempUnk210, 0.0f, 1.5f); func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, clampedTempUnk210);
}
func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, clampedTempUnk210);
} }
void func_808B818C(BgSpot18Basket* this) { void func_808B818C(BgSpot18Basket* this) {

View File

@ -111,7 +111,7 @@ s32 func_808B8910(BgSpot18Obj* this, PlayState* play) {
case 2: case 2:
PRINTF("Error : Obj出現判定が設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 202, PRINTF("Error : Obj出現判定が設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 202,
this->dyna.actor.params); this->dyna.actor.params);
break; return 0;
default: default:
PRINTF("Error : Obj出現判定失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 210, PRINTF("Error : Obj出現判定失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 210,
this->dyna.actor.params); this->dyna.actor.params);
@ -235,11 +235,9 @@ void func_808B8E7C(BgSpot18Obj* this, PlayState* play) {
void func_808B8EE0(BgSpot18Obj* this) { void func_808B8EE0(BgSpot18Obj* this) {
this->actionFunc = func_808B8F08; this->actionFunc = func_808B8F08;
this->dyna.actor.world.rot.y = 0;
this->dyna.actor.speed = 0.0f; this->dyna.actor.speed = 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.velocity.y = 0.0f; this->dyna.actor.world.rot.y = 0;
this->dyna.actor.velocity.x = 0.0f;
} }
void func_808B8F08(BgSpot18Obj* this, PlayState* play) { void func_808B8F08(BgSpot18Obj* this, PlayState* play) {

View File

@ -171,10 +171,10 @@ void BgYdanHasi_Update(Actor* thisx, PlayState* play) {
void BgYdanHasi_Draw(Actor* thisx, PlayState* play) { void BgYdanHasi_Draw(Actor* thisx, PlayState* play) {
static Gfx* dLists[] = { gDTSlidingPlatformDL, gDTWaterPlaneDL, gDTRisingPlatformsDL }; static Gfx* dLists[] = { gDTSlidingPlatformDL, gDTWaterPlaneDL, gDTRisingPlatformsDL };
BgYdanHasi* this = (BgYdanHasi*)thisx; s16 params = thisx->params;
if (this->dyna.actor.params == HASI_WATER_BLOCK || this->dyna.actor.params == HASI_THREE_BLOCKS) { if (params == HASI_WATER_BLOCK || params == HASI_THREE_BLOCKS) {
Gfx_DrawDListOpa(play, dLists[this->dyna.actor.params]); Gfx_DrawDListOpa(play, dLists[params]);
} else { } else {
OPEN_DISPS(play->state.gfxCtx, "../z_bg_ydan_hasi.c", 577); OPEN_DISPS(play->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);

View File

@ -417,6 +417,9 @@ void BgYdanSp_Draw(Actor* thisx, PlayState* play) {
MtxF mtxF; MtxF mtxF;
OPEN_DISPS(play->state.gfxCtx, "../z_bg_ydan_sp.c", 781); OPEN_DISPS(play->state.gfxCtx, "../z_bg_ydan_sp.c", 781);
if (1) {}
Gfx_SetupDL_25Xlu(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (thisx->params == WEB_WALL) { if (thisx->params == WEB_WALL) {
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_ydan_sp.c", 787), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_bg_ydan_sp.c", 787),