mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +00:00
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
parent
209f0d21b8
commit
3cef03f5ff
416 changed files with 6610 additions and 13487 deletions
|
@ -1,23 +1,64 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800430A0/func_800430A0.s")
|
||||
void func_800430A0(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
MtxF prevTransform;
|
||||
MtxF prevTransformInv;
|
||||
MtxF curTransform;
|
||||
Vec3f pos;
|
||||
Vec3f tempPos;
|
||||
|
||||
void func_800432A0(CollisionContext* colCtx, u32 floorPolySource, Actor* actor) {
|
||||
if (func_8003E934(floorPolySource) != 0) {
|
||||
s16 v1 = colCtx->dyna.actorMeshArr[floorPolySource].rot2.y - colCtx->dyna.actorMeshArr[floorPolySource].rot1.y;
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
SkinMatrix_SetScaleRotateYRPTranslate(
|
||||
&prevTransform, colCtx->dyna.bgActors[bgId].prevTransform.scale.x,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.scale.y, colCtx->dyna.bgActors[bgId].prevTransform.scale.z,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.rot.x, colCtx->dyna.bgActors[bgId].prevTransform.rot.y,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.rot.z, colCtx->dyna.bgActors[bgId].prevTransform.pos.x,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.pos.y, colCtx->dyna.bgActors[bgId].prevTransform.pos.z);
|
||||
if (SkinMatrix_Invert(&prevTransform, &prevTransformInv) != 2) {
|
||||
SkinMatrix_SetScaleRotateYRPTranslate(
|
||||
&curTransform, colCtx->dyna.bgActors[bgId].curTransform.scale.x,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.scale.y, colCtx->dyna.bgActors[bgId].curTransform.scale.z,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.rot.x, colCtx->dyna.bgActors[bgId].curTransform.rot.y,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.rot.z, colCtx->dyna.bgActors[bgId].curTransform.pos.x,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.pos.y, colCtx->dyna.bgActors[bgId].curTransform.pos.z);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&prevTransformInv, &actor->posRot.pos, &tempPos);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&curTransform, &tempPos, &pos);
|
||||
actor->posRot.pos = pos;
|
||||
if (BGCHECK_XYZ_ABSMAX <= pos.x || pos.x <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.y ||
|
||||
pos.y <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.z || pos.z <= -BGCHECK_XYZ_ABSMAX) {
|
||||
|
||||
if (actor->id == 0) {
|
||||
((Player*)actor)->currentYaw += v1;
|
||||
osSyncPrintf(VT_FGCOL(RED));
|
||||
// @bug file and line are not passed to osSyncPrintf
|
||||
// Position is not valid
|
||||
osSyncPrintf(
|
||||
"BGCheckCollection_typicalActorPos():位置が妥当ではありません。\npos (%f,%f,%f) file:%s line:%d\n",
|
||||
pos.x, pos.y, pos.z);
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
}
|
||||
|
||||
actor->shape.rot.y += v1;
|
||||
actor->posRot.rot.y += v1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80043334(CollisionContext* colCtx, Actor* actor, u32 floorPolySource) {
|
||||
if (func_8003E934(floorPolySource) != 0) {
|
||||
DynaPolyActor* dynaActor = DynaPolyInfo_GetActor(colCtx, floorPolySource);
|
||||
/**
|
||||
* Rotate actor
|
||||
*/
|
||||
void func_800432A0(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
s16 rot = colCtx->dyna.bgActors[bgId].curTransform.rot.y - colCtx->dyna.bgActors[bgId].prevTransform.rot.y;
|
||||
|
||||
if (actor->id == ACTOR_PLAYER) {
|
||||
((Player*)actor)->currentYaw += rot;
|
||||
}
|
||||
|
||||
actor->shape.rot.y += rot;
|
||||
actor->posRot.rot.y += rot;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) {
|
||||
if (DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
if (dynaActor != NULL) {
|
||||
func_800434A8(dynaActor);
|
||||
|
||||
|
@ -28,33 +69,37 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, u32 floorPolySource)
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_800433A4(CollisionContext* colCtx, u32 floorPolySource, Actor* actor) {
|
||||
s32 sp24 = 0;
|
||||
/**
|
||||
* Transform actor's position
|
||||
* `actor` is the actor to update
|
||||
*/
|
||||
s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
s32 result = false;
|
||||
DynaPolyActor* dynaActor;
|
||||
|
||||
if (func_8003E934(floorPolySource) == 0) {
|
||||
return 0;
|
||||
if (DynaPoly_IsBgIdBgActor(bgId) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((colCtx->dyna.flags[floorPolySource] & 2) || !(colCtx->dyna.flags[floorPolySource] & 1)) {
|
||||
return 0;
|
||||
if ((colCtx->dyna.bgActorFlags[bgId] & 2) || !(colCtx->dyna.bgActorFlags[bgId] & 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
dynaActor = DynaPolyInfo_GetActor(colCtx, floorPolySource);
|
||||
dynaActor = (DynaPolyActor*)DynaPoly_GetActor(colCtx, bgId);
|
||||
|
||||
if (dynaActor == NULL) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dynaActor->unk_15C & 1) {
|
||||
func_800430A0(colCtx, floorPolySource, actor);
|
||||
sp24 = 1;
|
||||
func_800430A0(colCtx, bgId, actor);
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (dynaActor->unk_15C & 2) {
|
||||
func_800432A0(colCtx, floorPolySource, actor);
|
||||
sp24 = 1;
|
||||
func_800432A0(colCtx, bgId, actor);
|
||||
result = true;
|
||||
}
|
||||
|
||||
return sp24;
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "global.h"
|
||||
|
||||
void DynaPolyInfo_SetActorMove(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags) {
|
||||
dynaActor->dynaPolyId = -1;
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags) {
|
||||
dynaActor->bgId = -1;
|
||||
dynaActor->unk_15C = flags;
|
||||
dynaActor->unk_160 = 0;
|
||||
dynaActor->unk_150 = 0.0f;
|
||||
|
@ -20,8 +20,8 @@ void func_800434B8(DynaPolyActor* dynaActor) {
|
|||
dynaActor->unk_160 |= 2;
|
||||
}
|
||||
|
||||
void func_800434C8(CollisionContext* colCtx, u32 floorPolySource) {
|
||||
DynaPolyActor* dynaActor = DynaPolyInfo_GetActor(colCtx, floorPolySource);
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorPolySource) {
|
||||
DynaPolyActor* dynaActor = (DynaPolyActor*)DynaPoly_GetActor(colCtx, floorPolySource);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434B8(dynaActor);
|
||||
|
@ -32,8 +32,8 @@ void func_800434F8(DynaPolyActor* dynaActor) {
|
|||
dynaActor->unk_160 |= 4;
|
||||
}
|
||||
|
||||
void func_80043508(CollisionContext* colCtx, u32 floorPolySource) {
|
||||
DynaPolyActor* dynaActor = DynaPolyInfo_GetActor(colCtx, floorPolySource);
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorPolySource) {
|
||||
DynaPolyActor* dynaActor = (DynaPolyActor*)DynaPoly_GetActor(colCtx, floorPolySource);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434F8(dynaActor);
|
||||
|
@ -46,34 +46,72 @@ void func_80043538(DynaPolyActor* dynaActor) {
|
|||
|
||||
s32 func_80043548(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 1) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_8004356C(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 2) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80043590(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 4) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800435B4(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->unk_160 & 8) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80043480/func_800435D8.s")
|
||||
s32 func_800435D8(GlobalContext* globalCtx, DynaPolyActor* actor, s16 arg2, s16 arg3, s16 arg4) {
|
||||
Vec3f posA;
|
||||
Vec3f posB;
|
||||
Vec3f posResult;
|
||||
f32 sin;
|
||||
f32 cos;
|
||||
s32 bgId;
|
||||
CollisionPoly* poly;
|
||||
f32 a2;
|
||||
f32 a3;
|
||||
f32 sign;
|
||||
|
||||
sin = Math_SinS(actor->unk_158);
|
||||
cos = Math_CosS(actor->unk_158);
|
||||
sign = (0.0f <= actor->unk_150) ? 1.0f : -1.0f;
|
||||
|
||||
a2 = (f32)arg2 - 0.1f;
|
||||
posA.x = actor->actor.posRot.pos.x + (a2 * cos);
|
||||
posA.y = actor->actor.posRot.pos.y + arg4;
|
||||
posA.z = actor->actor.posRot.pos.z - (a2 * sin);
|
||||
|
||||
a3 = (f32)arg3 - 0.1f;
|
||||
posB.x = sign * a3 * sin + posA.x;
|
||||
posB.y = posA.y;
|
||||
posB.z = sign * a3 * cos + posA.z;
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &posA, &posB, &posResult, &poly, true, false, false, true, &bgId,
|
||||
actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
posA.x = (actor->actor.posRot.pos.x * 2) - posA.x;
|
||||
posA.z = (actor->actor.posRot.pos.z * 2) - posA.z;
|
||||
posB.x = sign * a3 * sin + posA.x;
|
||||
posB.z = sign * a3 * cos + posA.z;
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &posA, &posB, &posResult, &poly, true, false, false, true, &bgId,
|
||||
actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -821,7 +821,7 @@ void Actor_Init(Actor* actor, GlobalContext* globalCtx) {
|
|||
actor->uncullZoneScale = 350.0f;
|
||||
actor->uncullZoneDownward = 700.0f;
|
||||
func_80061E48(&actor->colChkInfo);
|
||||
actor->floorPolySource = 0x32;
|
||||
actor->floorPolySource = BGCHECK_SCENE;
|
||||
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) {
|
||||
Actor_SetObjectDependency(globalCtx, actor);
|
||||
|
@ -1142,30 +1142,30 @@ s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
UNK_TYPE D_8015BBA0;
|
||||
u32 D_8015BBA4;
|
||||
CollisionPoly* D_8015BBA0;
|
||||
s32 D_8015BBA4;
|
||||
|
||||
s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3) {
|
||||
f32 sp34;
|
||||
s32 sp30;
|
||||
s32 bgId;
|
||||
|
||||
arg2->y += 50.0f;
|
||||
|
||||
actor->groundY = func_8003CA0C(globalCtx, &globalCtx->colCtx, &actor->floorPoly, &sp30, actor, arg2);
|
||||
actor->groundY = BgCheck_EntityRaycastFloor5(globalCtx, &globalCtx->colCtx, &actor->floorPoly, &bgId, actor, arg2);
|
||||
actor->bgCheckFlags &= ~0x0086;
|
||||
|
||||
if (actor->groundY <= -32000.0f) {
|
||||
return func_8002E234(actor, -32000.0f, arg3);
|
||||
if (actor->groundY <= BGCHECK_Y_MIN) {
|
||||
return func_8002E234(actor, BGCHECK_Y_MIN, arg3);
|
||||
}
|
||||
|
||||
sp34 = actor->groundY - actor->posRot.pos.y;
|
||||
actor->floorPolySource = sp30;
|
||||
actor->floorPolySource = bgId;
|
||||
|
||||
if (sp34 >= 0.0f) {
|
||||
actor->bgCheckFlags |= 0x80;
|
||||
|
||||
if (actor->bgCheckFlags & 0x10) {
|
||||
if (sp30 != D_8015BBA4) {
|
||||
if (bgId != D_8015BBA4) {
|
||||
if (sp34 > 15.0f) {
|
||||
actor->bgCheckFlags |= 0x100;
|
||||
}
|
||||
|
@ -1204,29 +1204,29 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
|
|||
f32 sp74;
|
||||
s32 pad;
|
||||
Vec3f sp64;
|
||||
u32 sp60;
|
||||
s32 bgId;
|
||||
CollisionPoly* sp5C;
|
||||
f32 sp58;
|
||||
WaterBox* sp54;
|
||||
WaterBox* waterBox;
|
||||
f32 sp50;
|
||||
Vec3f ripplePos;
|
||||
|
||||
sp74 = actor->posRot.pos.y - actor->pos4.y;
|
||||
|
||||
if ((actor->floorPolySource != 0x32) && (actor->bgCheckFlags & 1)) {
|
||||
if ((actor->floorPolySource != BGCHECK_SCENE) && (actor->bgCheckFlags & 1)) {
|
||||
func_800433A4(&globalCtx->colCtx, actor->floorPolySource, actor);
|
||||
}
|
||||
|
||||
if (arg5 & 1) {
|
||||
if ((!(arg5 & 0x80) && func_8003D52C(&globalCtx->colCtx, &sp64, &actor->posRot.pos, &actor->pos4, arg3,
|
||||
&actor->wallPoly, &sp60, actor, arg2)) ||
|
||||
((arg5 & 0x80) && func_8003D594(&globalCtx->colCtx, &sp64, &actor->posRot.pos, &actor->pos4, arg3,
|
||||
&actor->wallPoly, &sp60, actor, arg2))) {
|
||||
if ((!(arg5 & 0x80) && BgCheck_EntitySphVsWall3(&globalCtx->colCtx, &sp64, &actor->posRot.pos, &actor->pos4,
|
||||
arg3, &actor->wallPoly, &bgId, actor, arg2)) ||
|
||||
((arg5 & 0x80) && BgCheck_EntitySphVsWall4(&globalCtx->colCtx, &sp64, &actor->posRot.pos, &actor->pos4,
|
||||
arg3, &actor->wallPoly, &bgId, actor, arg2))) {
|
||||
sp5C = actor->wallPoly;
|
||||
Math_Vec3f_Copy(&actor->posRot.pos, &sp64);
|
||||
actor->wallPolyRot = Math_Atan2S(sp5C->norm.z, sp5C->norm.x);
|
||||
actor->wallPolyRot = Math_Atan2S(sp5C->normal.z, sp5C->normal.x);
|
||||
actor->bgCheckFlags |= 8;
|
||||
actor->wallPolySource = sp60;
|
||||
actor->wallPolySource = bgId;
|
||||
} else {
|
||||
actor->bgCheckFlags &= ~8;
|
||||
}
|
||||
|
@ -1237,7 +1237,8 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
|
|||
|
||||
if (arg5 & 2) {
|
||||
sp64.y = actor->pos4.y + 10.0f;
|
||||
if (func_8003D7A0(&globalCtx->colCtx, &sp58, &sp64, (arg4 + sp74) - 10.0f, &D_8015BBA0, &D_8015BBA4, actor)) {
|
||||
if (BgCheck_EntityCheckCeiling(&globalCtx->colCtx, &sp58, &sp64, (arg4 + sp74) - 10.0f, &D_8015BBA0,
|
||||
&D_8015BBA4, actor)) {
|
||||
actor->bgCheckFlags |= 0x10;
|
||||
actor->posRot.pos.y = (sp58 + sp74) - 10.0f;
|
||||
} else {
|
||||
|
@ -1249,7 +1250,8 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
|
|||
sp64.y = actor->pos4.y;
|
||||
func_8002E2AC(globalCtx, actor, &sp64, arg5);
|
||||
sp50 = actor->posRot.pos.y;
|
||||
if (func_8004213C(globalCtx, &globalCtx->colCtx, actor->posRot.pos.x, actor->posRot.pos.z, &sp50, &sp54)) {
|
||||
if (WaterBox_GetSurface1(globalCtx, &globalCtx->colCtx, actor->posRot.pos.x, actor->posRot.pos.z, &sp50,
|
||||
&waterBox)) {
|
||||
actor->yDistToWater = sp50 - actor->posRot.pos.y;
|
||||
if (actor->yDistToWater < 0.0f) {
|
||||
actor->bgCheckFlags &= ~0x60;
|
||||
|
@ -1269,7 +1271,7 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
|
|||
}
|
||||
} else {
|
||||
actor->bgCheckFlags &= ~0x60;
|
||||
actor->yDistToWater = -32000.0f;
|
||||
actor->yDistToWater = BGCHECK_Y_MIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1674,7 +1676,7 @@ void func_8002F850(GlobalContext* globalCtx, Actor* actor) {
|
|||
sfxId = NA_SE_PL_WALK_WATER1 - SFX_FLAG;
|
||||
}
|
||||
} else {
|
||||
sfxId = func_80041F34(&globalCtx->colCtx, actor->floorPoly, actor->floorPolySource);
|
||||
sfxId = SurfaceType_GetSfx(&globalCtx->colCtx, actor->floorPoly, actor->floorPolySource);
|
||||
}
|
||||
|
||||
func_80078914(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
|
||||
|
@ -1716,15 +1718,16 @@ void func_8002F994(Actor* actor, s32 arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* arg2, u32 arg3, Vec3f* arg4) {
|
||||
if (func_80041D4C(&globalCtx->colCtx, arg2, arg3) == 8) {
|
||||
// Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true
|
||||
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
|
||||
if (func_80041D4C(&globalCtx->colCtx, poly, bgId) == 8) {
|
||||
globalCtx->unk_11D30[0] = 1;
|
||||
func_8005DFAC(globalCtx, 0, arg4);
|
||||
func_8005DFAC(globalCtx, NULL, pos);
|
||||
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Local data used for Farore's Wind light (stored in BSS, possibly a struct?)
|
||||
|
@ -2104,7 +2107,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
if (i == ACTORTYPE_BG) {
|
||||
func_8003F984(globalCtx, &globalCtx->colCtx.dyna);
|
||||
DynaPoly_Setup(globalCtx, &globalCtx->colCtx.dyna);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2125,7 +2128,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
|
||||
func_8002C7BC(&actorCtx->targetCtx, player, actor, globalCtx);
|
||||
TitleCard_Update(globalCtx, &actorCtx->titleCtx);
|
||||
func_8003FB64(globalCtx, &globalCtx->colCtx.dyna);
|
||||
DynaPoly_UpdateBgActorTransforms(globalCtx, &globalCtx->colCtx.dyna);
|
||||
}
|
||||
|
||||
void Actor_FaultPrint(Actor* actor, char* command) {
|
||||
|
@ -2927,9 +2930,9 @@ void func_800328D4(GlobalContext* globalCtx, ActorContext* actorCtx, Player* pla
|
|||
if (actor != sp84) {
|
||||
var = func_8002EFC0(actor, player, D_8015BBFC);
|
||||
if ((var < D_8015BBF0) && func_8002F090(actor, var) && func_80032880(globalCtx, actor) &&
|
||||
(!func_8003DD6C(&globalCtx->colCtx, &player->actor.posRot2.pos, &actor->posRot2.pos, &sp70, &sp80,
|
||||
1, 1, 1, 1, &sp7C) ||
|
||||
func_80042048(&globalCtx->colCtx, sp80, sp7C))) {
|
||||
(!BgCheck_CameraLineTest1(&globalCtx->colCtx, &player->actor.posRot2.pos, &actor->posRot2.pos,
|
||||
&sp70, &sp80, 1, 1, 1, 1, &sp7C) ||
|
||||
SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, sp80, sp7C))) {
|
||||
if (actor->unk_10D != 0) {
|
||||
if (actor->unk_10D < D_8015BBF8) {
|
||||
D_8015BBEC = actor;
|
||||
|
@ -3433,7 +3436,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
|
|||
sp50.y = arg0->y + 1.0f;
|
||||
sp50.z = arg0->z;
|
||||
|
||||
var = func_8003C8EC(globalCtx, &globalCtx->colCtx, &sp4C, &sp50);
|
||||
var = BgCheck_EntityRaycastFloor2(globalCtx, &globalCtx->colCtx, &sp4C, &sp50);
|
||||
|
||||
if (sp4C != NULL) {
|
||||
func_80038A28(sp4C, arg0->x, var, arg0->z, &sp60);
|
||||
|
@ -4113,9 +4116,9 @@ void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2) {
|
|||
|
||||
if (actor->floorPoly != NULL) {
|
||||
floorPoly = actor->floorPoly;
|
||||
sp44 = floorPoly->norm.x * (1.0f / 32767);
|
||||
sp40 = floorPoly->norm.y * (1.0f / 32767);
|
||||
sp3C = floorPoly->norm.z * (1.0f / 32767);
|
||||
sp44 = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
sp40 = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
sp3C = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
|
||||
sp38 = Math_SinS(arg1);
|
||||
sp34 = Math_CosS(arg1);
|
||||
|
|
4892
src/code/z_bgcheck.c
4892
src/code/z_bgcheck.c
File diff suppressed because it is too large
Load diff
|
@ -215,7 +215,7 @@ s32 Camera_BGCheckInfo(Camera* camera, Vec3f* from, CamColChk* to) {
|
|||
fromToOffset.r += 8.0f;
|
||||
Camera_Vec3fVecSphGeoAdd(&toPoint, from, &fromToOffset);
|
||||
|
||||
if (!func_8003DD6C(colCtx, from, &toPoint, &toNewPos, &to->poly, 1, 1, 1, -1, &to->bgId)) {
|
||||
if (!BgCheck_CameraLineTest1(colCtx, from, &toPoint, &toNewPos, &to->poly, 1, 1, 1, -1, &to->bgId)) {
|
||||
// no poly in path.
|
||||
OLib_Vec3fDistNormalize(&fromToNorm, from, &to->pos);
|
||||
|
||||
|
@ -225,7 +225,7 @@ s32 Camera_BGCheckInfo(Camera* camera, Vec3f* from, CamColChk* to) {
|
|||
|
||||
toNewPos = to->pos;
|
||||
toNewPos.y += 5.0f;
|
||||
floorPolyY = func_8003CCA4(colCtx, &floorPoly, &floorBgId, &toNewPos);
|
||||
floorPolyY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, &floorBgId, &toNewPos);
|
||||
|
||||
if ((to->pos.y - floorPolyY) > 5.0f) {
|
||||
// if the y distance from the check point to the floor is more than 5 units
|
||||
|
@ -241,9 +241,9 @@ s32 Camera_BGCheckInfo(Camera* camera, Vec3f* from, CamColChk* to) {
|
|||
to->bgId = floorBgId;
|
||||
}
|
||||
|
||||
to->norm.x = to->poly->norm.x * COLPOLY_NORM_FRAC;
|
||||
to->norm.y = to->poly->norm.y * COLPOLY_NORM_FRAC;
|
||||
to->norm.z = to->poly->norm.z * COLPOLY_NORM_FRAC;
|
||||
to->norm.x = COLPOLY_GET_NORMAL(to->poly->normal.x);
|
||||
to->norm.y = COLPOLY_GET_NORMAL(to->poly->normal.y);
|
||||
to->norm.z = COLPOLY_GET_NORMAL(to->poly->normal.z);
|
||||
to->pos.x = to->norm.x + toNewPos.x;
|
||||
to->pos.y = to->norm.y + toNewPos.y;
|
||||
to->pos.z = to->norm.z + toNewPos.z;
|
||||
|
@ -278,14 +278,14 @@ s32 func_80043F94(Camera* camera, Vec3f* from, CamColChk* to) {
|
|||
OLib_Vec3fDiffToVecSphGeo(&fromToGeo, from, &to->pos);
|
||||
fromToGeo.r += 8.0f;
|
||||
Camera_Vec3fVecSphGeoAdd(&toPos, from, &fromToGeo);
|
||||
if (!func_8003DD6C(colCtx, from, &toPos, &toNewPos, &to->poly, 1, 1, 1, -1, &to->bgId)) {
|
||||
if (!BgCheck_CameraLineTest1(colCtx, from, &toPos, &toNewPos, &to->poly, 1, 1, 1, -1, &to->bgId)) {
|
||||
OLib_Vec3fDistNormalize(&fromToNorm, from, &to->pos);
|
||||
to->norm.x = -fromToNorm.x;
|
||||
to->norm.y = -fromToNorm.y;
|
||||
to->norm.z = -fromToNorm.z;
|
||||
toNewPos = to->pos;
|
||||
toNewPos.y += 5.0f;
|
||||
floorY = func_8003CCA4(colCtx, &floorPoly, &bgId, &toNewPos);
|
||||
floorY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, &bgId, &toNewPos);
|
||||
if ((to->pos.y - floorY) > 5.0f) {
|
||||
// to is not on the ground or below it.
|
||||
to->pos.x += to->norm.x;
|
||||
|
@ -298,17 +298,17 @@ s32 func_80043F94(Camera* camera, Vec3f* from, CamColChk* to) {
|
|||
toNewPos.y = floorY + 1.0f;
|
||||
to->bgId = bgId;
|
||||
}
|
||||
to->norm.x = to->poly->norm.x * COLPOLY_NORM_FRAC;
|
||||
to->norm.y = to->poly->norm.y * COLPOLY_NORM_FRAC;
|
||||
to->norm.z = to->poly->norm.z * COLPOLY_NORM_FRAC;
|
||||
to->norm.x = COLPOLY_GET_NORMAL(to->poly->normal.x);
|
||||
to->norm.y = COLPOLY_GET_NORMAL(to->poly->normal.y);
|
||||
to->norm.z = COLPOLY_GET_NORMAL(to->poly->normal.z);
|
||||
if ((to->norm.y > 0.5f) || (to->norm.y < -0.8f)) {
|
||||
to->pos.x = to->norm.x + toNewPos.x;
|
||||
to->pos.y = to->norm.y + toNewPos.y;
|
||||
to->pos.z = to->norm.z + toNewPos.z;
|
||||
} else if (playerFloorPoly != NULL) {
|
||||
playerFloorNormF.x = playerFloorPoly->norm.x * COLPOLY_NORM_FRAC;
|
||||
playerFloorNormF.y = playerFloorPoly->norm.y * COLPOLY_NORM_FRAC;
|
||||
playerFloorNormF.z = playerFloorPoly->norm.z * COLPOLY_NORM_FRAC;
|
||||
playerFloorNormF.x = COLPOLY_GET_NORMAL(playerFloorPoly->normal.x);
|
||||
playerFloorNormF.y = COLPOLY_GET_NORMAL(playerFloorPoly->normal.y);
|
||||
playerFloorNormF.z = COLPOLY_GET_NORMAL(playerFloorPoly->normal.z);
|
||||
if (Math3D_LineSegVsPlane(playerFloorNormF.x, playerFloorNormF.y, playerFloorNormF.z, playerFloorPoly->dist,
|
||||
from, &toPos, &toNewPos, 1)) {
|
||||
// line is from->to is touching the poly the player is on.
|
||||
|
@ -353,7 +353,8 @@ s32 Camera_CheckOOB(Camera* camera, Vec3f* from, Vec3f* to) {
|
|||
CollisionContext* colCtx = &camera->globalCtx->colCtx;
|
||||
|
||||
poly = NULL;
|
||||
if (func_8003DD6C(colCtx, from, to, &intersect, &poly, 1, 1, 1, 0, &bgId) && (func_80038B7C(poly, from) < 0.0f)) {
|
||||
if (BgCheck_CameraLineTest1(colCtx, from, to, &intersect, &poly, 1, 1, 1, 0, &bgId) &&
|
||||
(CollisionPoly_GetPointDistanceFromPlane(poly, from) < 0.0f)) {
|
||||
// if there is a poly between `from` and `to` and the `from` is behind the poly.
|
||||
return true;
|
||||
}
|
||||
|
@ -368,7 +369,7 @@ s32 Camera_CheckOOB(Camera* camera, Vec3f* from, Vec3f* to) {
|
|||
f32 Camera_GetFloorYNorm(Camera* camera, Vec3f* floorNorm, Vec3f* chkPos, s32* bgId) {
|
||||
s32 pad;
|
||||
CollisionPoly* floorPoly;
|
||||
f32 floorY = func_8003C940(&camera->globalCtx->colCtx, &floorPoly, bgId, chkPos);
|
||||
f32 floorY = BgCheck_EntityRaycastFloor3(&camera->globalCtx->colCtx, &floorPoly, bgId, chkPos);
|
||||
|
||||
if (floorY == BGCHECK_Y_MIN) {
|
||||
// no floor
|
||||
|
@ -376,9 +377,9 @@ f32 Camera_GetFloorYNorm(Camera* camera, Vec3f* floorNorm, Vec3f* chkPos, s32* b
|
|||
floorNorm->y = 1.0f;
|
||||
floorNorm->z = 0.0f;
|
||||
} else {
|
||||
floorNorm->x = floorPoly->norm.x * COLPOLY_NORM_FRAC;
|
||||
floorNorm->y = floorPoly->norm.y * COLPOLY_NORM_FRAC;
|
||||
floorNorm->z = floorPoly->norm.z * COLPOLY_NORM_FRAC;
|
||||
floorNorm->x = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
floorNorm->y = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
floorNorm->z = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
}
|
||||
|
||||
return floorY;
|
||||
|
@ -409,9 +410,9 @@ f32 Camera_GetFloorYLayer(Camera* camera, Vec3f* norm, Vec3f* pos, u32* bgId) {
|
|||
s32 i;
|
||||
|
||||
for (i = 3; i > 0; i--) {
|
||||
floorY = func_8003CCA4(colCtx, &floorPoly, bgId, pos);
|
||||
floorY = BgCheck_CameraRaycastFloor2(colCtx, &floorPoly, bgId, pos);
|
||||
if (floorY == BGCHECK_Y_MIN ||
|
||||
(camera->playerGroundY < floorY && !((floorPoly->norm.y * COLPOLY_NORM_FRAC) > 0.5f))) {
|
||||
(camera->playerGroundY < floorY && !(COLPOLY_GET_NORMAL(floorPoly->normal.y) > 0.5f))) {
|
||||
// no floor, or player is below the floor and floor is not considered steep
|
||||
norm->x = 0.0f;
|
||||
norm->y = 1.0f;
|
||||
|
@ -423,9 +424,9 @@ f32 Camera_GetFloorYLayer(Camera* camera, Vec3f* norm, Vec3f* pos, u32* bgId) {
|
|||
pos->y = floorY - 10.0f;
|
||||
continue;
|
||||
} else {
|
||||
norm->x = floorPoly->norm.x * COLPOLY_NORM_FRAC;
|
||||
norm->y = floorPoly->norm.y * COLPOLY_NORM_FRAC;
|
||||
norm->z = floorPoly->norm.z * COLPOLY_NORM_FRAC;
|
||||
norm->x = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
norm->y = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
norm->z = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -439,14 +440,14 @@ f32 Camera_GetFloorYLayer(Camera* camera, Vec3f* norm, Vec3f* pos, u32* bgId) {
|
|||
* Returns the CameraSettingType of the camera at index `camDataIdx`
|
||||
*/
|
||||
s16 Camera_GetCamDataSetting(Camera* camera, s32 camDataIdx) {
|
||||
return func_80041A4C(&camera->globalCtx->colCtx, camDataIdx, 50);
|
||||
return func_80041A4C(&camera->globalCtx->colCtx, camDataIdx, BGCHECK_SCENE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the scene camera info for the current camera data index
|
||||
*/
|
||||
Vec3s* Camera_GetCamBGData(Camera* camera) {
|
||||
return func_80041C10(&camera->globalCtx->colCtx, camera->camDataIdx, 50);
|
||||
return func_80041C10(&camera->globalCtx->colCtx, camera->camDataIdx, BGCHECK_SCENE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -459,7 +460,7 @@ s32 Camera_GetDataIdxForPoly(Camera* camera, u32* bgId, CollisionPoly* poly) {
|
|||
s32 ret;
|
||||
|
||||
func_8002EF44(&playerPosRot, &camera->player->actor); // unused.
|
||||
camDataIdx = func_80041A28(&camera->globalCtx->colCtx, poly, *bgId);
|
||||
camDataIdx = SurfaceType_GetCamDataIndex(&camera->globalCtx->colCtx, poly, *bgId);
|
||||
|
||||
if (func_80041A4C(&camera->globalCtx->colCtx, camDataIdx, *bgId) == CAM_SET_NONE) {
|
||||
ret = -1;
|
||||
|
@ -482,12 +483,13 @@ Vec3s* Camera_GetCamBgDataUnderPlayer(Camera* camera, u16* dataCnt) {
|
|||
|
||||
func_8002EF44(&playerPosShape, &camera->player->actor);
|
||||
playerPosShape.pos.y += Player_GetHeight(camera->player);
|
||||
if (func_8003C940(&camera->globalCtx->colCtx, &floorPoly, &bgId, &playerPosShape.pos) == BGCHECK_Y_MIN) {
|
||||
if (BgCheck_EntityRaycastFloor3(&camera->globalCtx->colCtx, &floorPoly, &bgId, &playerPosShape.pos) ==
|
||||
BGCHECK_Y_MIN) {
|
||||
// no floor
|
||||
return NULL;
|
||||
}
|
||||
*dataCnt = func_80041B80(&camera->globalCtx->colCtx, floorPoly, bgId);
|
||||
return func_80041C98(&camera->globalCtx->colCtx, floorPoly, bgId);
|
||||
*dataCnt = SurfaceType_GetNumCameras(&camera->globalCtx->colCtx, floorPoly, bgId);
|
||||
return SurfaceType_GetCamPosData(&camera->globalCtx->colCtx, floorPoly, bgId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -504,8 +506,8 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
|
|||
func_8002EF44(&playerPosShape, &camera->player->actor);
|
||||
*waterY = playerPosShape.pos.y;
|
||||
|
||||
if (!func_8004213C(camera->globalCtx, &camera->globalCtx->colCtx, playerPosShape.pos.x, playerPosShape.pos.z,
|
||||
waterY, &waterBox)) {
|
||||
if (!WaterBox_GetSurface1(camera->globalCtx, &camera->globalCtx->colCtx, playerPosShape.pos.x, playerPosShape.pos.z,
|
||||
waterY, &waterBox)) {
|
||||
// player's position is not in a water box.
|
||||
*waterY = BGCHECK_Y_MIN;
|
||||
return -1;
|
||||
|
@ -517,8 +519,8 @@ s32 Camera_GetWaterBoxDataIdx(Camera* camera, f32* waterY) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
ret = func_80042538(&camera->globalCtx->colCtx, waterBox);
|
||||
if ((ret <= 0) || (func_80042548(&camera->globalCtx->colCtx, waterBox) <= 0)) {
|
||||
ret = WaterBox_GetCamDataIndex(&camera->globalCtx->colCtx, waterBox);
|
||||
if ((ret <= 0) || (WaterBox_GetCameraSType(&camera->globalCtx->colCtx, waterBox) <= 0)) {
|
||||
// no camera data idx, or no CameraSettingType
|
||||
return -2;
|
||||
}
|
||||
|
@ -539,7 +541,8 @@ f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
|
|||
func_8002EF44(&playerPosRot, &camera->player->actor);
|
||||
waterY = playerPosRot.pos.y;
|
||||
|
||||
if (!func_8004213C(camera->globalCtx, &camera->globalCtx->colCtx, chkPos->x, chkPos->z, &waterY, &waterBox)) {
|
||||
if (!WaterBox_GetSurface1(camera->globalCtx, &camera->globalCtx->colCtx, chkPos->x, chkPos->z, &waterY,
|
||||
&waterBox)) {
|
||||
// chkPos is not within the x/z boundaries of a water box.
|
||||
return BGCHECK_Y_MIN;
|
||||
}
|
||||
|
@ -550,7 +553,7 @@ f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
|
|||
return BGCHECK_Y_MIN;
|
||||
}
|
||||
|
||||
*envProp = func_8004259C(&camera->globalCtx->colCtx, waterBox);
|
||||
*envProp = WaterBox_GetLightSettingIndex(&camera->globalCtx->colCtx, waterBox);
|
||||
return waterY;
|
||||
}
|
||||
|
||||
|
@ -1284,7 +1287,7 @@ s16 Camera_CalcDefaultYaw(Camera* camera, s16 cur, s16 target, f32 arg3, f32 acc
|
|||
|
||||
if (camera->xzSpeed > 0.001f) {
|
||||
angDelta = target - BINANG_ROT180(cur);
|
||||
speedT = BINANG_ROT180(angDelta) * COLPOLY_NORM_FRAC;
|
||||
speedT = COLPOLY_GET_NORMAL(BINANG_ROT180(angDelta));
|
||||
} else {
|
||||
angDelta = target - BINANG_ROT180(cur);
|
||||
speedT = PCT(OREG(48));
|
||||
|
@ -3603,7 +3606,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
|||
OLib_Vec3fDiffToVecSphGeo(&spA8, at, eyeNext);
|
||||
D_8015BD50 = playerPosRot->pos;
|
||||
D_8015BD50.y += playerHeight;
|
||||
temp_f0_2 = func_8003CCA4(&camera->globalCtx->colCtx, &spC0, &i, &D_8015BD50);
|
||||
temp_f0_2 = BgCheck_CameraRaycastFloor2(&camera->globalCtx->colCtx, &spC0, &i, &D_8015BD50);
|
||||
if (temp_f0_2 > (keep4->unk_00 + D_8015BD50.y)) {
|
||||
D_8015BD50.y = temp_f0_2 + 10.0f;
|
||||
} else {
|
||||
|
@ -6833,7 +6836,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon
|
|||
camera->setting = camera->prevSetting = 0x21;
|
||||
camera->camDataIdx = camera->prevCamDataIdx = -1;
|
||||
camera->mode = 0;
|
||||
camera->bgCheckId = 0x32;
|
||||
camera->bgCheckId = BGCHECK_SCENE;
|
||||
camera->unk_168 = 0x7FFF;
|
||||
camera->timer = -1;
|
||||
camera->unk_14C |= 0x4000;
|
||||
|
@ -7092,7 +7095,7 @@ s32 Camera_CheckWater(Camera* camera) {
|
|||
}
|
||||
if (camera->playerGroundY != camera->playerPosRot.pos.y) {
|
||||
prevBgId = camera->bgCheckId;
|
||||
camera->bgCheckId = 50;
|
||||
camera->bgCheckId = BGCHECK_SCENE;
|
||||
Camera_ChangeSettingFlags(camera, CAM_SET_NORMAL3, 2);
|
||||
*waterPrevCamSetting = camera->setting;
|
||||
camera->bgCheckId = prevBgId;
|
||||
|
@ -7108,7 +7111,7 @@ s32 Camera_CheckWater(Camera* camera) {
|
|||
}
|
||||
if (camera->playerGroundY != camera->playerPosRot.pos.y) {
|
||||
prevBgId = camera->bgCheckId;
|
||||
camera->bgCheckId = 50;
|
||||
camera->bgCheckId = BGCHECK_SCENE;
|
||||
Camera_ChangeDataIdx(camera, waterCamIdx);
|
||||
*waterPrevCamSetting = camera->setting;
|
||||
camera->bgCheckId = prevBgId;
|
||||
|
@ -7118,7 +7121,7 @@ s32 Camera_CheckWater(Camera* camera) {
|
|||
osSyncPrintf("camera: water: off\n");
|
||||
camera->unk_14C &= ~0x200;
|
||||
prevBgId = camera->bgCheckId;
|
||||
camera->bgCheckId = 50;
|
||||
camera->bgCheckId = BGCHECK_SCENE;
|
||||
if (camera->waterPrevCamIdx < 0) {
|
||||
func_80057FC4(camera);
|
||||
camera->camDataIdx = -1;
|
||||
|
@ -7342,14 +7345,14 @@ Vec3s* Camera_Update(Vec3s* outVec, Camera* camera) {
|
|||
spAC = curPlayerPosRot.pos;
|
||||
spAC.y += Player_GetHeight(camera->player);
|
||||
|
||||
playerGroundY = func_8003CA0C(camera->globalCtx, &camera->globalCtx->colCtx, &playerFloorPoly, &bgCheckId,
|
||||
&camera->player->actor, &spAC);
|
||||
playerGroundY = BgCheck_EntityRaycastFloor5(camera->globalCtx, &camera->globalCtx->colCtx, &playerFloorPoly,
|
||||
&bgCheckId, &camera->player->actor, &spAC);
|
||||
if (playerGroundY != BGCHECK_Y_MIN) {
|
||||
// player is above ground.
|
||||
sOOBTimer = 0;
|
||||
camera->floorNorm.x = playerFloorPoly->norm.x * COLPOLY_NORM_FRAC;
|
||||
camera->floorNorm.y = playerFloorPoly->norm.y * COLPOLY_NORM_FRAC;
|
||||
camera->floorNorm.z = playerFloorPoly->norm.z * COLPOLY_NORM_FRAC;
|
||||
camera->floorNorm.x = COLPOLY_GET_NORMAL(playerFloorPoly->normal.x);
|
||||
camera->floorNorm.y = COLPOLY_GET_NORMAL(playerFloorPoly->normal.y);
|
||||
camera->floorNorm.z = COLPOLY_GET_NORMAL(playerFloorPoly->normal.z);
|
||||
camera->bgCheckId = bgCheckId;
|
||||
camera->playerGroundY = playerGroundY;
|
||||
} else {
|
||||
|
@ -7378,7 +7381,7 @@ Vec3s* Camera_Update(Vec3s* outVec, Camera* camera) {
|
|||
camDataIdx = Camera_GetDataIdxForPoly(camera, &bgCheckId, playerFloorPoly);
|
||||
if (camDataIdx != -1) {
|
||||
camera->nextBGCheckId = bgCheckId;
|
||||
if (bgCheckId == 50) {
|
||||
if (bgCheckId == BGCHECK_SCENE) {
|
||||
camera->nextCamDataIdx = camDataIdx;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1025,10 +1025,10 @@ void CollisionCheck_Draw(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
|||
}
|
||||
}
|
||||
if (AREG(24)) {
|
||||
func_80042C3C(globalCtx, &globalCtx->colCtx);
|
||||
BgCheck_DrawDynaCollision(globalCtx, &globalCtx->colCtx);
|
||||
}
|
||||
if (AREG(25)) {
|
||||
func_80042FC4(globalCtx, &globalCtx->colCtx);
|
||||
BgCheck_DrawStaticCollision(globalCtx, &globalCtx->colCtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1281,13 +1281,14 @@ s32 func_8005DF74(ColliderBody* left, ColliderBody* right) {
|
|||
void func_8005DF9C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
||||
}
|
||||
|
||||
void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
||||
// Blue EffectSpark
|
||||
void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* pos) {
|
||||
static EffectSparkInit D_8015D8A0;
|
||||
s32 sp24;
|
||||
|
||||
D_8015D8A0.position.x = (s32)v->x;
|
||||
D_8015D8A0.position.y = (s32)v->y;
|
||||
D_8015D8A0.position.z = (s32)v->z;
|
||||
D_8015D8A0.position.x = (s32)pos->x;
|
||||
D_8015D8A0.position.y = (s32)pos->y;
|
||||
D_8015D8A0.position.z = (s32)pos->z;
|
||||
D_8015D8A0.uDiv = 5;
|
||||
D_8015D8A0.vDiv = 5;
|
||||
D_8015D8A0.colorStart[0].r = 10;
|
||||
|
@ -1330,13 +1331,14 @@ void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
|||
Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015D8A0);
|
||||
}
|
||||
|
||||
void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
||||
// Green EffectSpark
|
||||
void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* pos) {
|
||||
static EffectSparkInit D_8015DD68;
|
||||
s32 sp24;
|
||||
|
||||
D_8015DD68.position.x = (s32)v->x;
|
||||
D_8015DD68.position.y = (s32)v->y;
|
||||
D_8015DD68.position.z = (s32)v->z;
|
||||
D_8015DD68.position.x = (s32)pos->x;
|
||||
D_8015DD68.position.y = (s32)pos->y;
|
||||
D_8015DD68.position.z = (s32)pos->z;
|
||||
D_8015DD68.uDiv = 5;
|
||||
D_8015DD68.vDiv = 5;
|
||||
D_8015DD68.colorStart[0].r = 10;
|
||||
|
@ -1590,7 +1592,7 @@ void CollisionCheck_AC_JntSphVsJntSph(GlobalContext* globalCtx, CollisionCheckCo
|
|||
sp60.x = rItem->dim.worldSphere.center.x;
|
||||
sp60.y = rItem->dim.worldSphere.center.y;
|
||||
sp60.z = rItem->dim.worldSphere.center.z;
|
||||
if (!(fabsf(sp88) < 0.008f)) {
|
||||
if (!IS_ZERO(sp88)) {
|
||||
temp_f0 = rItem->dim.worldSphere.radius / sp88;
|
||||
sp78.x = (((sp6C.x - sp60.x) * temp_f0) + sp60.x);
|
||||
sp78.y = (((sp6C.y - sp60.y) * temp_f0) + sp60.y);
|
||||
|
@ -1639,7 +1641,7 @@ void CollisionCheck_AC_JntSphVsCyl(GlobalContext* globalCtx, CollisionCheckConte
|
|||
sp58.x = right->dim.pos.x;
|
||||
sp58.y = right->dim.pos.y;
|
||||
sp58.z = right->dim.pos.z;
|
||||
if (!(fabsf(sp7C) < 0.008f)) {
|
||||
if (!IS_ZERO(sp7C)) {
|
||||
temp_f0 = right->dim.radius / sp7C;
|
||||
if (temp_f0 <= 1.0f) {
|
||||
sp70.x = ((sp64.x - sp58.x) * temp_f0) + sp58.x;
|
||||
|
@ -1689,7 +1691,7 @@ void CollisionCheck_AC_CylVsJntSph(GlobalContext* globalCtx, CollisionCheckConte
|
|||
sp70.x = rItem->dim.worldSphere.center.x;
|
||||
sp70.y = rItem->dim.worldSphere.center.y;
|
||||
sp70.z = rItem->dim.worldSphere.center.z;
|
||||
if (!(fabsf(sp98) < 0.008f)) {
|
||||
if (!IS_ZERO(sp98)) {
|
||||
temp_f0 = (f32)rItem->dim.worldSphere.radius / sp98;
|
||||
if (temp_f0 <= 1.0f) {
|
||||
sp88.x = ((sp7C.x - sp70.x) * temp_f0) + sp70.x;
|
||||
|
@ -1908,7 +1910,7 @@ void CollisionCheck_AC_CylVsCyl(GlobalContext* globalCtx, CollisionCheckContext*
|
|||
if (Math3D_CylOutsideCylDist(&left->dim, &right->dim, &sp6C, &sp68) == 1) {
|
||||
Math_Vec3s_ToVec3f(&sp50, &left->dim.pos);
|
||||
Math_Vec3s_ToVec3f(&sp44, &right->dim.pos);
|
||||
if (!(fabsf(sp68) < 0.008f)) {
|
||||
if (!IS_ZERO(sp68)) {
|
||||
temp_f0 = (f32)right->dim.radius / sp68;
|
||||
sp5C.y = (f32)right->dim.pos.y + (f32)right->dim.yShift + (f32)right->dim.height * 0.5f;
|
||||
sp5C.x = ((f32)left->dim.pos.x - right->dim.pos.x) * temp_f0 + right->dim.pos.x;
|
||||
|
@ -2489,7 +2491,7 @@ void func_800614A4(Collider* left, ColliderBody* leftBody, Vec3f* leftv, Collide
|
|||
leftMass = leftActor->colChkInfo.mass;
|
||||
rightMass = rightActor->colChkInfo.mass;
|
||||
totalMass = leftMass + rightMass;
|
||||
if (fabsf(totalMass) < 0.008f) {
|
||||
if (IS_ZERO(totalMass)) {
|
||||
totalMass = (leftMass = rightMass = 1.0f) * 2;
|
||||
}
|
||||
xDelta = rightv->x - leftv->x;
|
||||
|
@ -2525,7 +2527,7 @@ void func_800614A4(Collider* left, ColliderBody* leftBody, Vec3f* leftv, Collide
|
|||
}
|
||||
}
|
||||
|
||||
if (!(fabsf(xzDist) < 0.008f)) {
|
||||
if (!IS_ZERO(xzDist)) {
|
||||
temp_f0 = arg6 / xzDist;
|
||||
xDelta *= temp_f0;
|
||||
zDelta *= temp_f0;
|
||||
|
|
|
@ -39,8 +39,14 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
{ 25, 60, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static UNK_PTR D_8011546C[] = {
|
||||
0x040394B0, 0x040394B0, 0x0403A120, 0x0403A480, 0x0403A7F0, 0x06000730,
|
||||
extern CollisionHeader D_040394B0;
|
||||
extern CollisionHeader D_0403A120;
|
||||
extern CollisionHeader D_0403A480;
|
||||
extern CollisionHeader D_0403A7F0;
|
||||
extern CollisionHeader D_06000730;
|
||||
|
||||
static CollisionHeader* D_8011546C[] = {
|
||||
&D_040394B0, &D_040394B0, &D_0403A120, &D_0403A480, &D_0403A7F0, &D_06000730,
|
||||
};
|
||||
|
||||
static Gfx* D_80115484[] = {
|
||||
|
@ -53,7 +59,7 @@ void EnAObj_SetupAction(EnAObj* this, EnAObjActionFunc actionFunc) {
|
|||
}
|
||||
|
||||
void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
u32 sp34 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad;
|
||||
EnAObj* this = THIS;
|
||||
f32 sp28;
|
||||
|
@ -91,35 +97,35 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, sp28);
|
||||
|
||||
thisx->posRot2.pos = thisx->posRot.pos;
|
||||
this->dyna.dynaPolyId = -1;
|
||||
this->dyna.bgId = BGACTOR_NEG_ONE;
|
||||
this->dyna.unk_160 = 0;
|
||||
this->dyna.unk_15C = 0;
|
||||
this->dyna.unk_15C = DPM_UNK;
|
||||
thisx->uncullZoneDownward = 1200.0f;
|
||||
thisx->uncullZoneScale = 200.0f;
|
||||
|
||||
switch (thisx->params) {
|
||||
case A_OBJ_BLOCK_LARGE:
|
||||
case A_OBJ_BLOCK_HUGE:
|
||||
this->dyna.dynaPolyId = 1;
|
||||
this->dyna.bgId = 1;
|
||||
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, thisx, ACTORTYPE_BG);
|
||||
func_8001D5C8(this, thisx->params);
|
||||
break;
|
||||
case A_OBJ_BLOCK_SMALL_ROT:
|
||||
case A_OBJ_BLOCK_LARGE_ROT:
|
||||
this->dyna.dynaPolyId = 3;
|
||||
this->dyna.bgId = 3;
|
||||
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, thisx, ACTORTYPE_BG);
|
||||
func_8001D310(this, thisx->params);
|
||||
break;
|
||||
case A_OBJ_UNKNOWN_6:
|
||||
// clang-format off
|
||||
thisx->flags |= 0x1; this->dyna.dynaPolyId = 5; this->unk_178 = 10.0f;
|
||||
thisx->flags |= 0x1; this->dyna.bgId = 5; this->unk_178 = 10.0f;
|
||||
// clang-format on
|
||||
thisx->gravity = -2.0f;
|
||||
func_8001D234(this, thisx->params);
|
||||
break;
|
||||
case A_OBJ_GRASS_CLUMP:
|
||||
case A_OBJ_TREE_STUMP:
|
||||
this->dyna.dynaPolyId = 0;
|
||||
this->dyna.bgId = 0;
|
||||
func_8001D234(this, thisx->params);
|
||||
break;
|
||||
case A_OBJ_SIGNPOST_OBLONG:
|
||||
|
@ -149,16 +155,16 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->colChkInfo.mass = 0xFF;
|
||||
}
|
||||
|
||||
if (this->dyna.dynaPolyId != -1) {
|
||||
DynaPolyInfo_Alloc(D_8011546C[this->dyna.dynaPolyId], &sp34);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp34);
|
||||
if (this->dyna.bgId != BGACTOR_NEG_ONE) {
|
||||
CollisionHeader_GetVirtual(D_8011546C[this->dyna.bgId], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
}
|
||||
|
||||
void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnAObj* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
switch (this->dyna.actor.params) {
|
||||
case A_OBJ_SIGNPOST_OBLONG:
|
||||
|
@ -277,10 +283,7 @@ void func_8001D5C8(EnAObj* this, s16 params) {
|
|||
void func_8001D608(EnAObj* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.speedXZ += this->dyna.unk_150;
|
||||
this->dyna.actor.posRot.rot.y = this->dyna.unk_158;
|
||||
|
||||
this->dyna.actor.speedXZ = (this->dyna.actor.speedXZ < -2.5f)
|
||||
? -2.5f
|
||||
: ((this->dyna.actor.speedXZ > 2.5f) ? 2.5f : this->dyna.actor.speedXZ);
|
||||
this->dyna.actor.speedXZ = CLAMP(this->dyna.actor.speedXZ, -2.5f, 2.5f);
|
||||
|
||||
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
|
||||
|
||||
|
|
|
@ -471,9 +471,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (D_80157D90 != globalCtx->gameplayFrames) {
|
||||
D_80157D90_ = globalCtx->gameplayFrames;
|
||||
D_80157D94 = 0;
|
||||
for (i = 0; i < 50; i++) {
|
||||
if (globalCtx->colCtx.dyna.flags[i] & 1) {
|
||||
dynaActor = globalCtx->colCtx.dyna.actorMeshArr[i].actor;
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
if (globalCtx->colCtx.dyna.bgActorFlags[i] & 1) {
|
||||
dynaActor = globalCtx->colCtx.dyna.bgActors[i].actor;
|
||||
if ((dynaActor != NULL) && (dynaActor->update != NULL) &&
|
||||
((dynaActor->posRot.pos.x != dynaActor->pos4.x) ||
|
||||
(dynaActor->posRot.pos.y != dynaActor->pos4.y) ||
|
||||
|
|
|
@ -12,11 +12,11 @@ void func_8007C76C(Vec3f* src, Vec3s* dst) {
|
|||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C7A8.s")
|
||||
|
||||
void func_8007C7F8(CollisionContext* colCtx, Vec3f* arg1) {
|
||||
void func_8007C7F8(CollisionContext* colCtx, Vec3f* pos) {
|
||||
CollisionPoly* poly;
|
||||
s32 bgId;
|
||||
|
||||
func_8003C940(colCtx, &poly, &bgId, arg1);
|
||||
BgCheck_EntityRaycastFloor3(colCtx, &poly, &bgId, pos);
|
||||
}
|
||||
|
||||
void func_8007C820(OnePointDemoCamera* onePointCamera, s16 actionParameters, s16 initTimer,
|
||||
|
|
|
@ -1379,39 +1379,39 @@ s32 Gameplay_InCsMode(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
|
||||
CollisionPoly sp50;
|
||||
CollisionPoly poly;
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
f32 temp3;
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
f32 floorY;
|
||||
f32 nx;
|
||||
f32 ny;
|
||||
f32 nz;
|
||||
s32 pad[5];
|
||||
|
||||
sp40 = func_8003CB30(&globalCtx->colCtx, &sp50, vec, mf);
|
||||
floorY = BgCheck_AnyRaycastFloor1(&globalCtx->colCtx, &poly, vec);
|
||||
|
||||
if (sp40 > -32000.0f) {
|
||||
sp3C = sp50.norm.x * (1.0f / 32767.0f);
|
||||
sp38 = sp50.norm.y * (1.0f / 32767.0f);
|
||||
sp34 = sp50.norm.z * (1.0f / 32767.0f);
|
||||
if (floorY > BGCHECK_Y_MIN) {
|
||||
nx = COLPOLY_GET_NORMAL(poly.normal.x);
|
||||
ny = COLPOLY_GET_NORMAL(poly.normal.y);
|
||||
nz = COLPOLY_GET_NORMAL(poly.normal.z);
|
||||
|
||||
temp1 = sqrtf(1.0f - SQ(sp3C));
|
||||
temp1 = sqrtf(1.0f - SQ(nx));
|
||||
|
||||
if (temp1 != 0.0f) {
|
||||
temp2 = sp38 * temp1;
|
||||
temp3 = -sp34 * temp1;
|
||||
temp2 = ny * temp1;
|
||||
temp3 = -nz * temp1;
|
||||
} else {
|
||||
temp3 = 0.0f;
|
||||
temp2 = 0.0f;
|
||||
}
|
||||
|
||||
mf->xx = temp1;
|
||||
mf->xy = -sp3C * temp2;
|
||||
mf->xz = sp3C * temp3;
|
||||
mf->yx = sp3C;
|
||||
mf->yy = sp38;
|
||||
mf->yz = sp34;
|
||||
mf->xy = -nx * temp2;
|
||||
mf->xz = nx * temp3;
|
||||
mf->yx = nx;
|
||||
mf->yy = ny;
|
||||
mf->yz = nz;
|
||||
mf->zy = temp3;
|
||||
mf->zz = temp2;
|
||||
mf->xw = 0.0f;
|
||||
|
@ -1419,7 +1419,7 @@ f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
|
|||
mf->zx = 0.0f;
|
||||
mf->zw = 0.0f;
|
||||
mf->wx = vec->x;
|
||||
mf->wy = sp40;
|
||||
mf->wy = floorY;
|
||||
mf->wz = vec->z;
|
||||
mf->ww = 1.0f;
|
||||
} else {
|
||||
|
@ -1441,7 +1441,7 @@ f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
|
|||
mf->ww = 1.0f;
|
||||
}
|
||||
|
||||
return sp40;
|
||||
return floorY;
|
||||
}
|
||||
|
||||
void* Gameplay_LoadFile(GlobalContext* globalCtx, RomFile* file) {
|
||||
|
@ -1826,18 +1826,20 @@ s32 func_800C0D34(GlobalContext* globalCtx, Actor* actor, s16* yaw) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* arg1) {
|
||||
WaterBox* sp3C;
|
||||
CollisionPoly* sp38;
|
||||
Vec3f sp2C;
|
||||
s32 sp28;
|
||||
s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* pos) {
|
||||
WaterBox* waterBox;
|
||||
CollisionPoly* poly;
|
||||
Vec3f waterSurfacePos;
|
||||
s32 bgId;
|
||||
|
||||
sp2C = *arg1;
|
||||
waterSurfacePos = *pos;
|
||||
|
||||
if ((func_8004213C(globalCtx, &globalCtx->colCtx, sp2C.x, sp2C.z, &sp2C.y, &sp3C) == 1) && (arg1->y < sp2C.y) &&
|
||||
(func_8003C940(&globalCtx->colCtx, &sp38, &sp28, &sp2C) != -32000.0f)) {
|
||||
return 1;
|
||||
if (WaterBox_GetSurface1(globalCtx, &globalCtx->colCtx, waterSurfacePos.x, waterSurfacePos.z, &waterSurfacePos.y,
|
||||
&waterBox) == true &&
|
||||
pos->y < waterSurfacePos.y &&
|
||||
BgCheck_EntityRaycastFloor3(&globalCtx->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -741,7 +741,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
|
|||
|
||||
footprintPos.y += 15.0f;
|
||||
|
||||
sp80 = func_8003C9A4(&globalCtx->colCtx, &sp88, &sp84, &this->actor, &footprintPos) + sp74;
|
||||
sp80 = BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &sp88, &sp84, &this->actor, &footprintPos) + sp74;
|
||||
|
||||
if (sp98.y < sp80) {
|
||||
sp70 = sp98.x - spA4.x;
|
||||
|
@ -783,7 +783,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
|
|||
|
||||
temp3 = func_80041D4C(&globalCtx->colCtx, sp88, sp84);
|
||||
|
||||
if ((temp3 >= 2) && (temp3 < 4) && !func_80042108(&globalCtx->colCtx, sp88, sp84)) {
|
||||
if ((temp3 >= 2) && (temp3 < 4) && !SurfaceType_IsWallDamage(&globalCtx->colCtx, sp88, sp84)) {
|
||||
footprintPos.y = sp80;
|
||||
EffectSsGFire_Spawn(globalCtx, &footprintPos);
|
||||
}
|
||||
|
@ -1084,7 +1084,7 @@ void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) {
|
|||
|
||||
if (1) {}
|
||||
|
||||
if (func_8003E188(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98)) {
|
||||
if (BgCheck_AnyLineTest3(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2572);
|
||||
|
||||
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07);
|
||||
|
|
|
@ -389,7 +389,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
|||
camera = ACTIVE_CAM;
|
||||
camId = camera->camDataIdx;
|
||||
// jfifid
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, 50)[2].y;
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, BGCHECK_SCENE)[2].y;
|
||||
if (camId2 >= 0) {
|
||||
camId = camId2;
|
||||
}
|
||||
|
|
|
@ -220,13 +220,13 @@ void func_80098674(GlobalContext* globalCtx, SceneCmd* cmd) {
|
|||
|
||||
colHeader = SEGMENTED_TO_VIRTUAL(cmd->colHeader.segment);
|
||||
|
||||
colHeader->vertexArray = SEGMENTED_TO_VIRTUAL(colHeader->vertexArray);
|
||||
colHeader->polygonArray = SEGMENTED_TO_VIRTUAL(colHeader->polygonArray);
|
||||
colHeader->polygonTypes = SEGMENTED_TO_VIRTUAL(colHeader->polygonTypes);
|
||||
colHeader->cameraData = SEGMENTED_TO_VIRTUAL(colHeader->cameraData);
|
||||
colHeader->vtxList = SEGMENTED_TO_VIRTUAL(colHeader->vtxList);
|
||||
colHeader->polyList = SEGMENTED_TO_VIRTUAL(colHeader->polyList);
|
||||
colHeader->surfaceTypeList = SEGMENTED_TO_VIRTUAL(colHeader->surfaceTypeList);
|
||||
colHeader->cameraDataList = SEGMENTED_TO_VIRTUAL(colHeader->cameraDataList);
|
||||
colHeader->waterBoxes = SEGMENTED_TO_VIRTUAL(colHeader->waterBoxes);
|
||||
|
||||
func_8003C078(&globalCtx->colCtx, globalCtx, colHeader);
|
||||
BgCheck_Allocate(&globalCtx->colCtx, globalCtx, colHeader);
|
||||
}
|
||||
|
||||
// Scene Command 0x04: Room List
|
||||
|
|
|
@ -142,7 +142,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
|||
f32 sp90;
|
||||
s32 pad;
|
||||
CollisionPoly* poly;
|
||||
u32 dynaPolyID;
|
||||
s32 bgId;
|
||||
Vec3f sp78;
|
||||
Vec3f prevFrameDiff;
|
||||
Vec3f sp60;
|
||||
|
@ -258,17 +258,17 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
|||
sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x);
|
||||
sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y);
|
||||
sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z);
|
||||
if (func_8003DE84(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, 1, 1, 1, 1, &dynaPolyID) != 0) {
|
||||
if (func_8002F9EC(globalCtx, &this->actor, poly, dynaPolyID, &sp78) == 0) {
|
||||
sp5C = poly->norm.x * (1 / SHT_MAX);
|
||||
sp58 = poly->norm.z * (1 / SHT_MAX);
|
||||
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, 1, 1, 1, 1, &bgId) != 0) {
|
||||
if (func_8002F9EC(globalCtx, &this->actor, poly, bgId, &sp78) == false) {
|
||||
sp5C = COLPOLY_GET_NORMAL(poly->normal.x);
|
||||
sp58 = COLPOLY_GET_NORMAL(poly->normal.z);
|
||||
Math_Vec3f_Copy(&this->actor.posRot.pos, &sp78);
|
||||
this->actor.posRot.pos.x += 10.0f * sp5C;
|
||||
this->actor.posRot.pos.z += 10.0f * sp58;
|
||||
this->timer = 0;
|
||||
if (func_80041FE8(&globalCtx->colCtx, poly, dynaPolyID) != 0) {
|
||||
if (dynaPolyID != 0x32) {
|
||||
dynaPolyActor = DynaPolyInfo_GetActor(&globalCtx->colCtx, dynaPolyID);
|
||||
if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId) != 0) {
|
||||
if (bgId != BGCHECK_SCENE) {
|
||||
dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId);
|
||||
if (dynaPolyActor != NULL) {
|
||||
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
|
||||
}
|
||||
|
|
|
@ -62,9 +62,9 @@ static Gfx* D_8086CDA0[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_060038E8[];
|
||||
extern UNK_TYPE D_06005048;
|
||||
extern UNK_TYPE D_06005580;
|
||||
extern UNK_TYPE D_06008CE0;
|
||||
extern CollisionHeader D_06005048;
|
||||
extern CollisionHeader D_06005580;
|
||||
extern CollisionHeader D_06008CE0;
|
||||
|
||||
s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
||||
switch (arg1) {
|
||||
|
@ -99,20 +99,20 @@ void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgBdanObjects* this = THIS;
|
||||
s32 pad;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(this, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(this, 1);
|
||||
DynaPolyActor_Init(this, DPM_PLAYER);
|
||||
this->unk_168 = (thisx->params >> 8) & 0x3F;
|
||||
thisx->params &= 0xFF;
|
||||
if (thisx->params == 2) {
|
||||
thisx->flags |= 0x30;
|
||||
globalCtx->colCtx.stat.colHeader->waterBoxes[7].ySurface = thisx->posRot.pos.y;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[7].ySurface = thisx->posRot.pos.y;
|
||||
this->actionFunc = func_8086C9A8;
|
||||
return;
|
||||
}
|
||||
if (thisx->params == 0) {
|
||||
DynaPolyInfo_Alloc(&D_06008CE0, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06008CE0, &colHeader);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, this, &sCylinderInit);
|
||||
thisx->posRot.pos.y = (f32)(thisx->posRot.pos.y + -79.0f);
|
||||
|
@ -137,12 +137,12 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
if (thisx->params == 1) {
|
||||
DynaPolyInfo_Alloc(&D_06005048, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06005048, &colHeader);
|
||||
this->unk_16A = 0x200;
|
||||
this->unk_168 = 0;
|
||||
this->actionFunc = func_8086C874;
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_06005580, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06005580, &colHeader);
|
||||
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
|
||||
this->actionFunc = BgBdanObjects_DoNothing;
|
||||
thisx->posRot.pos.y = thisx->initPosRot.pos.y - 400.0f;
|
||||
|
@ -151,13 +151,13 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, this, localC);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
|
||||
void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgBdanObjects* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if (thisx->params == 0) {
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ void func_8086C9F0(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
func_8002F948(this, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
|
||||
}
|
||||
globalCtx->colCtx.stat.colHeader->waterBoxes[7].ySurface = this->dyna.actor.posRot.pos.y;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[7].ySurface = this->dyna.actor.posRot.pos.y;
|
||||
}
|
||||
|
||||
void func_8086CABC(BgBdanObjects* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -55,7 +55,7 @@ const ActorInit Bg_Bdan_Switch_InitVars = {
|
|||
(ActorFunc)BgBdanSwitch_Draw,
|
||||
};
|
||||
|
||||
extern UNK_PTR D_06005CF8;
|
||||
extern CollisionHeader D_06005CF8;
|
||||
extern Gfx D_060061A0[];
|
||||
extern Gfx D_06005A20[];
|
||||
|
||||
|
@ -80,16 +80,15 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
static Vec3f D_8086E0E0 = { 0, 140.0f, 0 };
|
||||
|
||||
void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, u32 collision, DynaPolyMoveFlag flag) {
|
||||
void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
|
||||
s16 pad1;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, flag);
|
||||
DynaPolyInfo_Alloc(collision, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_bdan_switch.c", 325,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
|
@ -147,7 +146,7 @@ void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case BLUE:
|
||||
case YELLOW_HEAVY:
|
||||
case YELLOW:
|
||||
func_8086D010(this, globalCtx, &D_06005CF8, 1);
|
||||
func_8086D010(this, globalCtx, &D_06005CF8, DPM_PLAYER);
|
||||
break;
|
||||
case YELLOW_TALL_1:
|
||||
case YELLOW_TALL_2:
|
||||
|
@ -198,7 +197,7 @@ void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case BLUE:
|
||||
case YELLOW_HEAVY:
|
||||
case YELLOW:
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
break;
|
||||
case YELLOW_TALL_1:
|
||||
case YELLOW_TALL_2:
|
||||
|
|
|
@ -30,7 +30,7 @@ const ActorInit Bg_Bom_Guard_InitVars = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06001C40;
|
||||
extern CollisionHeader D_06001C40;
|
||||
|
||||
void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -39,11 +39,11 @@ void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) {
|
|||
void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgBomGuard* this = THIS;
|
||||
s32 pad[2];
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06001C40, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06001C40, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 透明ガード出現 ☆☆☆☆☆ \n" VT_RST);
|
||||
|
@ -58,7 +58,7 @@ void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgBomGuard* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8086E638(BgBomGuard* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -61,14 +61,13 @@ const ActorInit Bg_Bombwall_InitVars = {
|
|||
void BgBombwall_InitDynapoly(BgBombwall* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s32 pad2;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_050041B0, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_050041B0, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_bombwall.c", 243,
|
||||
this->dyna.actor.params);
|
||||
|
@ -133,7 +132,7 @@ void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void BgBombwall_DestroyCollision(BgBombwall* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_2A2 & 2) {
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->unk_2A2 &= ~2;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ void BgBowlWall_FallDoEffects(BgBowlWall* this, GlobalContext* globalCtx);
|
|||
void BgBowlWall_FinishFall(BgBowlWall* this, GlobalContext* globalCtx);
|
||||
void BgBowlWall_Reset(BgBowlWall* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_06000CB8;
|
||||
extern ColHeader D_06001B00;
|
||||
extern CollisionHeader D_06000CB8;
|
||||
extern CollisionHeader D_06001B00;
|
||||
extern Gfx D_06000610[];
|
||||
extern Gfx D_06001390[];
|
||||
|
||||
|
@ -54,18 +54,17 @@ void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgBowlWall* this = THIS;
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
|
||||
if (this->dyna.actor.params == 0) {
|
||||
DynaPolyInfo_Alloc(&D_06000CB8, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_06000CB8, &colHeader);
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_06001B00, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_06001B00, &colHeader);
|
||||
}
|
||||
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->initPos = this->dyna.actor.posRot.pos;
|
||||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ ボーリングおじゃま壁発生 ☆☆☆☆☆ %d\n" VT_RST, this->dyna.actor.params);
|
||||
|
@ -76,7 +75,7 @@ void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgBowlWall* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgBowlWall_SpawnBullseyes(BgBowlWall* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -19,7 +19,7 @@ void BgDdanJd_Idle(BgDdanJd* this, GlobalContext* globalCtx);
|
|||
void BgDdanJd_Move(BgDdanJd* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_060037B8[];
|
||||
extern ColHeader D_06003CE0;
|
||||
extern CollisionHeader D_06003CE0;
|
||||
|
||||
const ActorInit Bg_Ddan_Jd_InitVars = {
|
||||
ACTOR_BG_DDAN_JD,
|
||||
|
@ -57,12 +57,12 @@ typedef enum {
|
|||
void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDdanJd* this = THIS;
|
||||
s32 pad;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(thisx, DPM_PLAYER);
|
||||
DynaPolyInfo_Alloc(&D_06003CE0, &colHeader);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
DynaPolyActor_Init(thisx, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(&D_06003CE0, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
this->idleTimer = IDLE_FRAMES;
|
||||
this->state = STATE_GO_BOTTOM;
|
||||
|
||||
|
@ -80,7 +80,7 @@ void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDdanJd* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgDdanJd_Idle(BgDdanJd* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -48,7 +48,7 @@ static f32 D_808718FC[] = { 0.0f, 5.0f };
|
|||
static f32 D_80871904[] = { 0.0f };
|
||||
static f32 D_80871908[] = { 0.0f, -0.45f, 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
|
||||
extern UNK_TYPE D_06004F30;
|
||||
extern CollisionHeader D_06004F30;
|
||||
extern Gfx D_060048A8[];
|
||||
|
||||
void BgDdanKd_SetupAction(BgDdanKd* this, BgDdanKdActionFunc actionFunc) {
|
||||
|
@ -58,17 +58,17 @@ void BgDdanKd_SetupAction(BgDdanKd* this, BgDdanKdActionFunc actionFunc) {
|
|||
void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDdanKd* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
this->prevExplosive = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, 1);
|
||||
DynaPolyActor_Init(&this->dyna.actor, DPM_PLAYER);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
DynaPolyInfo_Alloc(&D_06004F30, &sp24);
|
||||
CollisionHeader_GetVirtual(&D_06004F30, &colHeader);
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) == 0) {
|
||||
BgDdanKd_SetupAction(this, BgDdanKd_CheckForExplosions);
|
||||
|
@ -81,7 +81,7 @@ void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDdanKd* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ static ColliderCylinderInit sColCylinderInit1 = {
|
|||
static s16 sHasParent = false;
|
||||
|
||||
extern Gfx D_60013500[];
|
||||
extern UNK_TYPE D_06001DDC;
|
||||
extern CollisionHeader D_06001DDC;
|
||||
|
||||
void BgDodoago_SetupAction(BgDodoago* this, BgDodoagoActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -84,12 +84,12 @@ static s32 D_80872824;
|
|||
void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDodoago* this = THIS;
|
||||
s32 pad;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06001DDC, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06001DDC, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
ActorShape_Init(&this->dyna.actor.shape, 0.0f, NULL, 0.0f);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
|
||||
|
@ -112,7 +112,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgDodoago* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyCylinder(globalCtx, &this->colliders[0]);
|
||||
Collider_DestroyCylinder(globalCtx, &this->colliders[1]);
|
||||
Collider_DestroyCylinder(globalCtx, &this->colliders[2]);
|
||||
|
|
|
@ -69,24 +69,22 @@ static f32 sSideAngles[] = { M_PI / 2, -M_PI / 2, 0.0f, M_PI };
|
|||
|
||||
static CamData sCameraDataList[] = { { 0, 0, 0 } };
|
||||
|
||||
static UNK_TYPE sSurfaceTypeList[] = {
|
||||
0x00000000,
|
||||
0x000007C0,
|
||||
0x00000000,
|
||||
0x000007C2,
|
||||
static SurfaceType sSurfaceTypeList[] = {
|
||||
{ 0x00000000, 0x000007C0 },
|
||||
{ 0x00000000, 0x000007C2 },
|
||||
};
|
||||
|
||||
static CollisionPoly sPolyList[] = {
|
||||
{ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02 }, { 32767, 0, 0 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03 }, { 32767, 0, 0 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x04 }, { 0, 0, -32767 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05 }, { 0, 0, -32767 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x06 }, { -32767, 0, 0 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07 }, { -32767, 0, 0 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x00, 0x01 }, { 0, 0, 32767 }, -60 },
|
||||
{ { 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00 }, { 0, 0, 32767 }, -60 },
|
||||
{ { 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05 }, { 0, 32767, 0 }, 0 },
|
||||
{ { 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07 }, { 0, 32767, 0 }, 0 },
|
||||
{ 0x0000, 0x0000, 0x0001, 0x0002, { 32767, 0, 0 }, -60 },
|
||||
{ 0x0000, 0x0000, 0x0002, 0x0003, { 32767, 0, 0 }, -60 },
|
||||
{ 0x0000, 0x0003, 0x0002, 0x0004, { 0, 0, -32767 }, -60 },
|
||||
{ 0x0000, 0x0003, 0x0004, 0x0005, { 0, 0, -32767 }, -60 },
|
||||
{ 0x0000, 0x0005, 0x0004, 0x0006, { -32767, 0, 0 }, -60 },
|
||||
{ 0x0000, 0x0005, 0x0006, 0x0007, { -32767, 0, 0 }, -60 },
|
||||
{ 0x0000, 0x0007, 0x0006, 0x0001, { 0, 0, 32767 }, -60 },
|
||||
{ 0x0000, 0x0007, 0x0001, 0x0000, { 0, 0, 32767 }, -60 },
|
||||
{ 0x0001, 0x0000, 0x0003, 0x0005, { 0, 32767, 0 }, 0 },
|
||||
{ 0x0001, 0x0000, 0x0005, 0x0007, { 0, 32767, 0 }, 0 },
|
||||
};
|
||||
|
||||
static Vec3s sVtxList[] = {
|
||||
|
@ -105,9 +103,9 @@ void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&sColHeader, &colHeader);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&sColHeader, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (thisx->params != 0x23) {
|
||||
thisx->draw = NULL;
|
||||
|
@ -120,7 +118,7 @@ void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgGanonOtyuka_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgGanonOtyuka* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("WHY !!!!!!!!!!!!!!!!\n");
|
||||
|
@ -169,7 +167,7 @@ void BgGanonOtyuka_WaitToFall(BgGanonOtyuka* this, GlobalContext* globalCtx) {
|
|||
center.x = this->dyna.actor.posRot.pos.x + D_80876A68[i].x;
|
||||
center.y = this->dyna.actor.posRot.pos.y;
|
||||
center.z = this->dyna.actor.posRot.pos.z + D_80876A68[i].z;
|
||||
if (func_8003E30C(&globalCtx->colCtx, ¢er, 50.0f)) {
|
||||
if (BgCheck_SphVsFirstPoly(&globalCtx->colCtx, ¢er, 50.0f)) {
|
||||
this->unwalledSides |= sSides[i];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,16 +34,16 @@ const ActorInit Bg_Gate_Shutter_InitVars = {
|
|||
};
|
||||
|
||||
extern Gfx D_06001CD0[];
|
||||
extern UNK_TYPE D_06001DA8;
|
||||
extern CollisionHeader D_06001DA8;
|
||||
|
||||
void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgGateShutter* this = THIS;
|
||||
s32 pad[2];
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06001DA8, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06001DA8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
this->somePos.x = thisx->posRot.pos.x;
|
||||
this->somePos.y = thisx->posRot.pos.y;
|
||||
this->somePos.z = thisx->posRot.pos.z;
|
||||
|
@ -63,7 +63,7 @@ void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgGateShutter* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8087828C(BgGateShutter* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -37,27 +37,27 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_06000600[];
|
||||
extern UNK_TYPE D_06000DB8;
|
||||
extern CollisionHeader D_06000DB8;
|
||||
extern CutsceneData D_02002640[];
|
||||
|
||||
void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgGjyoBridge* this = THIS;
|
||||
s32 pad;
|
||||
s32 local_c;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
local_c = 0;
|
||||
colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000DB8, &local_c);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000DB8, &colHeader);
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x2000) {
|
||||
this->actionFunc = func_808787A4;
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgGjyoBridge_TriggerCutscene;
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgGjyoBridge* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808787A4(BgGjyoBridge* this, GlobalContext* globalCtx) {
|
||||
|
@ -89,7 +89,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
|
|||
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[2] != NULL) &&
|
||||
(globalCtx->csCtx.npcActions[2]->action == 2)) {
|
||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
gSaveContext.eventChkInf[4] |= 0x2000;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,23 +36,23 @@ const ActorInit Bg_Gnd_Darkmeiro_InitVars = {
|
|||
|
||||
extern Gfx D_060088B0[];
|
||||
extern Gfx D_0600BEC0[];
|
||||
extern ColHeader D_0600C080;
|
||||
extern CollisionHeader D_0600C080;
|
||||
|
||||
void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx) {
|
||||
if (this->actionFlags & 2) {
|
||||
if (this->timer1 == 0) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFlags &= ~2;
|
||||
}
|
||||
} else if (this->timer1 != 0) {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFlags |= 2;
|
||||
}
|
||||
}
|
||||
|
||||
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
BgGndDarkmeiro* this = THIS;
|
||||
|
||||
this->updateFunc = BgGndDarkmeiro_Noop;
|
||||
|
@ -63,9 +63,8 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.flags |= 0x80;
|
||||
break;
|
||||
case DARKMEIRO_CLEAR_BLOCK:
|
||||
DynaPolyInfo_Alloc(&D_0600C080, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
CollisionHeader_GetVirtual(&D_0600C080, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (((this->dyna.actor.params >> 8) & 0x3F) == 0x3F) {
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateStaticBlock;
|
||||
this->dyna.actor.draw = BgGndDarkmeiro_DrawStaticBlock;
|
||||
|
@ -74,7 +73,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->draw = BgGndDarkmeiro_DrawSwitchBlock;
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateSwitchBlock;
|
||||
if (!Flags_GetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
this->timer1 = 64;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -108,7 +107,7 @@ void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->dyna.actor.params & 0xFF) == 1) {
|
||||
if (1) {}
|
||||
DynaPolyInfo_Free(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, GlobalContext* globalCtx);
|
|||
void BgGndIceblock_Slide(BgGndIceblock* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_06004420[];
|
||||
extern ColHeader D_06004618;
|
||||
extern CollisionHeader D_06004618;
|
||||
|
||||
const ActorInit Bg_Gnd_Iceblock_InitVars = {
|
||||
ACTOR_BG_GND_ICEBLOCK,
|
||||
|
@ -51,15 +51,14 @@ static u8 sBlockPositions[2];
|
|||
void BgGndIceblock_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgGndIceblock* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06004618, &colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06004618, &colHeader);
|
||||
this->targetPos = this->dyna.actor.initPosRot.pos;
|
||||
this->actionFunc = BgGndIceblock_Idle;
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (this->dyna.actor.posRot.pos.x == 2792.0f) {
|
||||
this->dyna.actor.params = 0;
|
||||
sBlockPositions[0] = 7;
|
||||
|
@ -76,7 +75,7 @@ void BgGndIceblock_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgGndIceblock* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -38,26 +38,26 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000428;
|
||||
extern CollisionHeader D_06000428;
|
||||
extern Gfx D_060001B0[];
|
||||
extern Gfx D_060002A8[];
|
||||
|
||||
void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHaka* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000428, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000428, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->actionFunc = func_8087B7E8;
|
||||
}
|
||||
|
||||
void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHaka* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8087B758(BgHaka* this, Player* player) {
|
||||
|
|
|
@ -47,12 +47,12 @@ void BgHakaGate_SkullOfTruth(BgHakaGate* this, GlobalContext* globalCtx);
|
|||
void BgHakaGate_FalseSkull(BgHakaGate* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_0404D4E0[];
|
||||
extern ColHeader D_0600A938;
|
||||
extern CollisionHeader D_0600A938;
|
||||
extern Gfx D_0600F1B0[];
|
||||
extern Gfx D_06010A10[];
|
||||
extern Gfx D_06010C10[];
|
||||
extern ColHeader D_06010E10;
|
||||
extern ColHeader D_060131C4;
|
||||
extern CollisionHeader D_06010E10;
|
||||
extern CollisionHeader D_060131C4;
|
||||
|
||||
static s16 sSkullOfTruthRotY = 0x100;
|
||||
static u8 sPuzzleState = 1;
|
||||
|
@ -79,12 +79,12 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgHakaGate* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
this->switchFlag = (thisx->params >> 8) & 0xFF;
|
||||
thisx->params &= 0xFF;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
if (thisx->params == BGHAKAGATE_SKULL) {
|
||||
if (sSkullOfTruthRotY != 0x100) {
|
||||
this->actionFunc = BgHakaGate_FalseSkull;
|
||||
|
@ -111,7 +111,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
if (thisx->params == BGHAKAGATE_STATUE) {
|
||||
DynaPolyInfo_Alloc(&D_060131C4, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_060131C4, &colHeader);
|
||||
this->vTimer = 0;
|
||||
sStatueDistToLink = 0.0f;
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
|
@ -120,14 +120,14 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BgHakaGate_StatueIdle;
|
||||
}
|
||||
} else if (thisx->params == BGHAKAGATE_FLOOR) {
|
||||
DynaPolyInfo_Alloc(&D_06010E10, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_06010E10, &colHeader);
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actionFunc = BgHakaGate_DoNothing;
|
||||
} else {
|
||||
this->actionFunc = BgHakaGate_FloorClosed;
|
||||
}
|
||||
} else { // BGHAKAGATE_GATE
|
||||
DynaPolyInfo_Alloc(&D_0600A938, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_0600A938, &colHeader);
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actionFunc = BgHakaGate_DoNothing;
|
||||
thisx->posRot.pos.y += 80.0f;
|
||||
|
@ -137,7 +137,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BgHakaGate_GateWait;
|
||||
}
|
||||
}
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ void BgHakaGate_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgHakaGate* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if (this->dyna.actor.params == BGHAKAGATE_STATUE) {
|
||||
sSkullOfTruthRotY = 0x100;
|
||||
sPuzzleState = 1;
|
||||
|
@ -250,7 +250,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->vTimer = 60;
|
||||
this->actionFunc = BgHakaGate_FloorOpen;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ void BgHakaGate_FloorOpen(BgHakaGate* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->vTimer == 0) {
|
||||
if (Math_ScaledStepToS(&this->vOpenAngle, 0, 0x800)) {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgHakaGate_FloorClosed;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -35,9 +35,11 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static UNK_PTR sDynaAllocArg0[] = {
|
||||
0x06001830, 0x06001AB8, 0x00000000, 0x06004330, 0x060044D0, 0x00000000, 0x06004780,
|
||||
0x06004940, 0x00000000, 0x06004B00, 0x00000000, 0x06004CC0, 0x00000000,
|
||||
extern CollisionHeader D_06001830, D_06001AB8, D_06004330, D_060044D0, D_06004780, D_06004940, D_06004B00, D_06004CC0;
|
||||
|
||||
static CollisionHeader* sCollisionHeaders[] = {
|
||||
&D_06001830, &D_06001AB8, NULL, &D_06004330, &D_060044D0, NULL, &D_06004780,
|
||||
&D_06004940, NULL, &D_06004B00, NULL, &D_06004CC0, NULL,
|
||||
};
|
||||
|
||||
static Gfx* sDLists[] = {
|
||||
|
@ -51,7 +53,7 @@ void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgHakaMegane* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
|
||||
if (thisx->params < 3) {
|
||||
this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKACH_OBJECTS);
|
||||
|
@ -69,12 +71,12 @@ void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaMegane* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) {
|
||||
s32 localC;
|
||||
UNK_TYPE arg0;
|
||||
CollisionHeader* colHeader;
|
||||
CollisionHeader* collision;
|
||||
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
|
||||
this->dyna.actor.objBankIndex = this->objBankIndex;
|
||||
|
@ -82,11 +84,10 @@ void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) {
|
|||
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
|
||||
if (globalCtx->roomCtx.curRoom.showInvisActors) {
|
||||
this->actionFunc = func_8087DBF0;
|
||||
arg0 = sDynaAllocArg0[this->dyna.actor.params];
|
||||
if (arg0 != 0) {
|
||||
DynaPolyInfo_Alloc(arg0, &localC);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
collision = sCollisionHeaders[this->dyna.actor.params];
|
||||
if (collision != NULL) {
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
} else {
|
||||
this->actionFunc = BgHakaMegane_DoNothing;
|
||||
|
@ -99,10 +100,10 @@ void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->actorCtx.unk_03 != 0) {
|
||||
thisx->flags |= 0x80;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
thisx->flags &= ~0x80;
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,36 +54,36 @@ static Gfx* D_8087E410[] = {
|
|||
0x06000040,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000118;
|
||||
extern UNK_TYPE D_06005334;
|
||||
extern CollisionHeader D_06000118;
|
||||
extern CollisionHeader D_06005334;
|
||||
extern Gfx D_06008EB0[];
|
||||
extern UNK_TYPE D_06009168;
|
||||
extern UNK_TYPE D_0600A7F4;
|
||||
extern CollisionHeader D_06009168;
|
||||
extern CollisionHeader D_0600A7F4;
|
||||
|
||||
void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgHakaMeganeBG* this = THIS;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->unk_168 = (thisx->params >> 8) & 0xFF;
|
||||
thisx->params &= 0xFF;
|
||||
|
||||
if (thisx->params == 2) {
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 3);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK3);
|
||||
thisx->flags |= 0x10;
|
||||
DynaPolyInfo_Alloc(&D_06005334, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06005334, &colHeader);
|
||||
this->actionFunc = func_8087E258;
|
||||
} else {
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 1);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
|
||||
if (thisx->params == 0) {
|
||||
DynaPolyInfo_Alloc(&D_06009168, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06009168, &colHeader);
|
||||
thisx->flags |= 0x80;
|
||||
this->unk_16A = 20;
|
||||
this->actionFunc = func_8087DFF8;
|
||||
} else if (thisx->params == 3) {
|
||||
DynaPolyInfo_Alloc(&D_06000118, &localC);
|
||||
CollisionHeader_GetVirtual(&D_06000118, &colHeader);
|
||||
thisx->initPosRot.pos.y += 100.0f;
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
|
||||
|
@ -94,7 +94,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_8087E288;
|
||||
}
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_0600A7F4, &localC);
|
||||
CollisionHeader_GetVirtual(&D_0600A7F4, &colHeader);
|
||||
this->unk_16A = 80;
|
||||
this->actionFunc = func_8087E10C;
|
||||
thisx->uncullZoneScale = 3000.0f;
|
||||
|
@ -102,13 +102,13 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaMeganeBG* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8087DFF8(BgHakaMeganeBG* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -71,16 +71,16 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060081D0;
|
||||
extern UNK_TYPE D_06008D10;
|
||||
extern UNK_TYPE D_06009CD0;
|
||||
extern CollisionHeader D_060081D0;
|
||||
extern CollisionHeader D_06008D10;
|
||||
extern CollisionHeader D_06009CD0;
|
||||
|
||||
void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static UNK_TYPE D_80881014 = 0;
|
||||
|
||||
BgHakaTrap* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp28 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
thisx->params &= 0xFF;
|
||||
|
@ -101,11 +101,11 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->actionFunc = func_80880484;
|
||||
} else {
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_PLAYER);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
thisx->flags |= 0x10;
|
||||
|
||||
if (thisx->params == HAKA_TRAP_SPIKED_BOX) {
|
||||
DynaPolyInfo_Alloc(&D_06009CD0, &sp28);
|
||||
CollisionHeader_GetVirtual(&D_06009CD0, &colHeader);
|
||||
this->timer = 30;
|
||||
|
||||
if (D_80881014 != 0) {
|
||||
|
@ -124,11 +124,11 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->colliderCylinder.dim.height = 40;
|
||||
} else {
|
||||
if (thisx->params == HAKA_TRAP_SPIKED_WALL) {
|
||||
DynaPolyInfo_Alloc(&D_060081D0, &sp28);
|
||||
CollisionHeader_GetVirtual(&D_060081D0, &colHeader);
|
||||
thisx->initPosRot.pos.x -= 200.0f;
|
||||
} else {
|
||||
thisx->initPosRot.pos.x += 200.0f;
|
||||
DynaPolyInfo_Alloc(&D_06008D10, &sp28);
|
||||
CollisionHeader_GetVirtual(&D_06008D10, &colHeader);
|
||||
}
|
||||
|
||||
Collider_InitTris(globalCtx, &this->colliderSpikes);
|
||||
|
@ -143,7 +143,7 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808801B8;
|
||||
}
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp28);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
} else {
|
||||
this->timer = 40;
|
||||
|
@ -159,7 +159,7 @@ void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (thisx->params != HAKA_TRAP_PROPELLER) {
|
||||
if (thisx->params != HAKA_TRAP_GUILLOTINE_SLOW) {
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if ((thisx->params == HAKA_TRAP_SPIKED_WALL) || (thisx->params == HAKA_TRAP_SPIKED_WALL_2)) {
|
||||
Collider_DestroyTris(globalCtx, &this->colliderSpikes);
|
||||
}
|
||||
|
@ -338,8 +338,9 @@ void func_808806BC(BgHakaTrap* this, GlobalContext* globalCtx) {
|
|||
tempf20 = this->dyna.actor.groundY;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
temp =
|
||||
func_8003C9A4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &sp64, &this->dyna.actor, &vector) - 25.0f;
|
||||
temp = BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &sp64, &this->dyna.actor,
|
||||
&vector) -
|
||||
25.0f;
|
||||
if (tempf20 < temp) {
|
||||
tempf20 = temp;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060108B8;
|
||||
extern CollisionHeader D_060108B8;
|
||||
extern Gfx D_0600FE40[];
|
||||
extern Gfx D_0400CD80[];
|
||||
extern Gfx D_040184B0[];
|
||||
|
@ -56,12 +56,12 @@ extern Gfx D_040184B0[];
|
|||
void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTubo* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK3);
|
||||
DynaPolyInfo_Alloc(&D_060108B8, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK3);
|
||||
CollisionHeader_GetVirtual(&D_060108B8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Collider_InitCylinder(globalCtx, &this->potCollider);
|
||||
Collider_SetCylinder(globalCtx, &this->potCollider, &this->dyna.actor, &sPotColliderInit);
|
||||
Collider_InitCylinder(globalCtx, &this->flamesCollider);
|
||||
|
@ -74,7 +74,7 @@ void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTubo* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyCylinder(globalCtx, &this->potCollider);
|
||||
Collider_DestroyCylinder(globalCtx, &this->flamesCollider);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void func_80881D94(BgHakaWater* this, GlobalContext* globalCtx) {
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
globalCtx->colCtx.stat.colHeader->waterBoxes[i].ySurface = (s16)this->actor.posRot.pos.y - 8;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[i].ySurface = (s16)this->actor.posRot.pos.y - 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_0600169C;
|
||||
extern CollisionHeader D_0600169C;
|
||||
extern Gfx D_060013C0[];
|
||||
extern Gfx D_06001A30[];
|
||||
extern Gfx D_060018A0[];
|
||||
|
@ -80,13 +80,11 @@ void BgHeavyBlock_InitPiece(BgHeavyBlock* this, f32 scale) {
|
|||
|
||||
void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
||||
s32 pad[2];
|
||||
UNK_TYPE a1;
|
||||
|
||||
a1 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
this->dyna.actor.flags |= 0x20030;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_0600169C, &a1);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, a1);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_0600169C, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -164,7 +162,7 @@ void BgHeavyBlock_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case HEAVYBLOCK_SMALL_PIECE:
|
||||
break;
|
||||
default:
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +382,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BgHeavyBlock_Fly(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR arg2;
|
||||
s32 bgId;
|
||||
s32 quakeIndex;
|
||||
Vec3f pos;
|
||||
f32 raycastResult;
|
||||
|
@ -393,7 +391,8 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
|||
pos.x = this->dyna.actor.initPosRot.pos.x;
|
||||
pos.y = this->dyna.actor.initPosRot.pos.y + 1000.0f;
|
||||
pos.z = this->dyna.actor.initPosRot.pos.z;
|
||||
raycastResult = func_8003C9A4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &arg2, &this->dyna.actor, &pos);
|
||||
raycastResult =
|
||||
BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &pos);
|
||||
this->dyna.actor.groundY = raycastResult;
|
||||
|
||||
if (this->dyna.actor.initPosRot.pos.y <= raycastResult) {
|
||||
|
@ -504,8 +503,8 @@ void BgHeavyBlock_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Translate(-D_80884ED4.x, -D_80884ED4.y, -D_80884ED4.z, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_MultVec3f(&D_80884EC8, &thisx->posRot);
|
||||
Matrix_MultVec3f(&D_80884ED4, &thisx->initPosRot);
|
||||
Matrix_MultVec3f(&D_80884EC8, &thisx->posRot.pos);
|
||||
Matrix_MultVec3f(&D_80884ED4, &thisx->initPosRot.pos);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_heavy_block.c", 931),
|
||||
|
|
|
@ -62,18 +62,17 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
extern Gfx D_0600BBF0[];
|
||||
extern Gfx D_0600BDF0[];
|
||||
extern UNK_TYPE D_0600DA10;
|
||||
extern CollisionHeader D_0600DA10;
|
||||
|
||||
void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanDalm* this = THIS;
|
||||
s32 pad;
|
||||
u32 dynaUnk;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
dynaUnk = 0;
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK);
|
||||
DynaPolyInfo_Alloc(&D_0600DA10, &dynaUnk);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, dynaUnk);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_0600DA10, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
Collider_InitTris(globalCtx, &this->collider);
|
||||
Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, this->colliderItems);
|
||||
|
||||
|
@ -89,7 +88,7 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanDalm* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyTris(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ void func_8088706C(BgHidanFslift* this, GlobalContext* globalCtx);
|
|||
void func_808870D8(BgHidanFslift* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_0600B630[];
|
||||
extern UNK_TYPE D_0600E1E8;
|
||||
extern CollisionHeader D_0600E1E8;
|
||||
|
||||
const ActorInit Bg_Hidan_Fslift_InitVars = {
|
||||
ACTOR_BG_HIDAN_FSLIFT,
|
||||
|
@ -44,13 +44,13 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanFslift* this = THIS;
|
||||
s32 pad1;
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(thisx, 1);
|
||||
DynaPolyInfo_Alloc(&D_0600E1E8, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(thisx, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(&D_0600E1E8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_HSBLOCK, thisx->posRot.pos.x,
|
||||
thisx->posRot.pos.y + 40.0f, thisx->posRot.pos.z + -28.0f, 0, 0, 0, 2) == NULL) {
|
||||
Actor_Kill(thisx);
|
||||
|
@ -74,7 +74,7 @@ void func_80886F24(BgHidanFslift* this) {
|
|||
void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanFslift* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80886FB4(BgHidanFslift* this) {
|
||||
|
|
|
@ -23,8 +23,8 @@ void BgHidanHamstep_DoNothing(BgHidanHamstep* this, GlobalContext* globalCtx);
|
|||
|
||||
extern Gfx D_0600A548[];
|
||||
extern Gfx D_0600A668[];
|
||||
extern ColHeader D_0600DE44;
|
||||
extern ColHeader D_0600DD1C;
|
||||
extern CollisionHeader D_0600DE44;
|
||||
extern CollisionHeader D_0600DD1C;
|
||||
|
||||
static f32 sYPosOffsets[] = {
|
||||
-20.0f, -120.0f, -220.0f, -320.0f, -420.0f,
|
||||
|
@ -113,13 +113,13 @@ s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx)
|
|||
void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanHamstep* this = THIS;
|
||||
s32 pad;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
Vec3f sp48[3];
|
||||
s32 i;
|
||||
s32 i2;
|
||||
BgHidanHamstep* step;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, 1);
|
||||
DynaPolyActor_Init(&this->dyna.actor, DPM_PLAYER);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 0) {
|
||||
|
@ -137,13 +137,12 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 0) {
|
||||
DynaPolyInfo_Alloc(&D_0600DE44, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_0600DE44, &colHeader);
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_0600DD1C, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_0600DD1C, &colHeader);
|
||||
}
|
||||
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF)) {
|
||||
if ((this->dyna.actor.params & 0xFF) == 0) {
|
||||
|
@ -184,7 +183,7 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanHamstep* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 0) {
|
||||
Collider_DestroyTris(globalCtx, &this->collider);
|
||||
|
|
|
@ -40,10 +40,12 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static UNK_PTR D_80889E70[] = {
|
||||
0x0600E2CC,
|
||||
0x0600E380,
|
||||
0x0600E430,
|
||||
extern CollisionHeader D_0600E2CC, D_0600E380, D_0600E430;
|
||||
|
||||
static CollisionHeader* D_80889E70[] = {
|
||||
&D_0600E2CC,
|
||||
&D_0600E380,
|
||||
&D_0600E430,
|
||||
};
|
||||
|
||||
static s16 D_80889E7C[] = {
|
||||
|
@ -53,7 +55,7 @@ static s16 D_80889E7C[] = {
|
|||
0x0000,
|
||||
};
|
||||
|
||||
static Gfx* D_80889E84[] = {
|
||||
static Gfx (*D_80889E84[])[] = {
|
||||
0x0600C798,
|
||||
0x0600BFA8,
|
||||
0x0600BB58,
|
||||
|
@ -66,9 +68,9 @@ void BgHidanKousi_SetupAction(BgHidanKousi* this, BgHidanKousiActionFunc actionF
|
|||
void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanKousi* this = THIS;
|
||||
s32 pad;
|
||||
u32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
Actor_SetHeight(thisx, 50.0f);
|
||||
osSyncPrintf("◯◯◯炎の神殿オブジェクト【格子(arg_data : %0x)】出現 (%d %d)\n", thisx->params, thisx->params & 0xFF,
|
||||
((s32)thisx->params >> 8) & 0xFF);
|
||||
|
@ -78,8 +80,8 @@ void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("arg_data おかしい 【格子】\n");
|
||||
}
|
||||
|
||||
DynaPolyInfo_Alloc(D_80889E70[thisx->params & 0xFF], &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
CollisionHeader_GetVirtual(D_80889E70[thisx->params & 0xFF], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
thisx->posRot.rot.y = D_80889E7C[this->dyna.actor.params & 0xFF] + thisx->shape.rot.y;
|
||||
if (Flags_GetSwitch(globalCtx, (thisx->params >> 8) & 0xFF)) {
|
||||
func_80889ACC(this);
|
||||
|
@ -91,7 +93,7 @@ void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanKousi* this = THIS;
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80889ACC(BgHidanKousi* this) {
|
||||
|
|
|
@ -50,18 +50,17 @@ static ColliderJntSphInit sJntSphInit = {
|
|||
};
|
||||
|
||||
void BgHidanKowarerukabe_InitDynaPoly(BgHidanKowarerukabe* this, GlobalContext* globalCtx) {
|
||||
static ColHeader* collisionHeaders[] = { 0x0600D800, 0x0600D878, 0x0600D8F8 };
|
||||
static CollisionHeader* collisionHeaders[] = { 0x0600D800, 0x0600D878, 0x0600D8F8 };
|
||||
s32 pad;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
if (collisionHeaders[this->dyna.actor.params & 0xFF] != NULL) {
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(collisionHeaders[this->dyna.actor.params & 0xFF], &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(collisionHeaders[this->dyna.actor.params & 0xFF], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
} else {
|
||||
this->dyna.dynaPolyId = -1;
|
||||
this->dyna.bgId = BGACTOR_NEG_ONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +120,7 @@ void BgHidanKowarerukabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHidanKowarerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanKowarerukabe* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,21 +63,21 @@ static InitChainEntry sInitChain[] = {
|
|||
static UNK_PTR D_8088CD74[] = { 0x06015D20, 0x06016120, 0x06016520, 0x06016920,
|
||||
0x06016D20, 0x06017120, 0x06017520, 0x06017920 };
|
||||
|
||||
extern UNK_TYPE D_0600D5C0; // Dynapoly Data in Object
|
||||
extern Gfx D_0600AD00[]; // Display List
|
||||
extern Gfx D_0600DC30[]; // Display List
|
||||
extern CollisionHeader D_0600D5C0;
|
||||
extern Gfx D_0600AD00[]; // Display List
|
||||
extern Gfx D_0600DC30[]; // Display List
|
||||
|
||||
void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanRsekizou* this = THIS;
|
||||
s32 i;
|
||||
s32 pad;
|
||||
s32 polyID;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
polyID = 0;
|
||||
colHeader = NULL;
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_0600D5C0, &polyID);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, polyID);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_0600D5C0, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
|
||||
for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) {
|
||||
|
@ -90,7 +90,7 @@ void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanRsekizou* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,17 +36,17 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_0600A7E0[];
|
||||
extern UNK_TYPE D_0600E568;
|
||||
extern CollisionHeader* D_0600E568;
|
||||
|
||||
void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanSyoku* this = THIS;
|
||||
s32 pad;
|
||||
u32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 1);
|
||||
DynaPolyInfo_Alloc(&D_0600E568, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, local_c);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(&D_0600E568, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->actionFunc = func_8088F4B8;
|
||||
this->dyna.actor.initPosRot.pos.y += 540.0f;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHidanSyoku* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8088F47C(BgHidanSyoku* this) {
|
||||
|
|
|
@ -21,7 +21,7 @@ void BgIceObjects_Reset(BgIceObjects* this, GlobalContext* globalCtx);
|
|||
void BgIceObjects_Stuck(BgIceObjects* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_06000190[];
|
||||
extern ColHeader D_060003F0;
|
||||
extern CollisionHeader D_060003F0;
|
||||
|
||||
static Color_RGBA8 sWhite = { 250, 250, 250, 255 };
|
||||
static Color_RGBA8 sGray = { 180, 180, 180, 255 };
|
||||
|
@ -46,15 +46,14 @@ InitChainEntry sInitChain[] = {
|
|||
void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgIceObjects* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_060003F0, &colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060003F0, &colHeader);
|
||||
Math_Vec3f_Copy(&this->targetPos, &this->dyna.actor.initPosRot.pos);
|
||||
this->actionFunc = BgIceObjects_Idle;
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.actor.params = 0;
|
||||
}
|
||||
|
||||
|
@ -62,7 +61,7 @@ void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgIceObjects* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
static s16 sXStarts[] = {
|
||||
|
|
|
@ -31,7 +31,7 @@ const ActorInit Bg_Ice_Shutter_InitVars = {
|
|||
(ActorFunc)BgIceShutter_Draw,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06002854;
|
||||
extern CollisionHeader D_06002854;
|
||||
extern Gfx D_06002740[];
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
|
@ -53,17 +53,17 @@ void func_80891AC0(BgIceShutter* this) {
|
|||
void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceShutter* this = THIS;
|
||||
f32 sp24;
|
||||
s32 localC;
|
||||
CollisionHeader* colHeader;
|
||||
s32 sp28;
|
||||
f32 temp_f6;
|
||||
|
||||
localC = 0;
|
||||
colHeader = NULL;
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
sp28 = this->dyna.actor.params & 0xFF;
|
||||
this->dyna.actor.params = (this->dyna.actor.params >> 8) & 0xFF;
|
||||
DynaPolyInfo_Alloc(&D_06002854, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
CollisionHeader_GetVirtual(&D_06002854, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (sp28 == 2) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceShutter* this = THIS;
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80891CF4(BgIceShutter* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -28,7 +28,7 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
};
|
||||
|
||||
extern Gfx D_060023D0[];
|
||||
extern ColHeader D_06002594;
|
||||
extern CollisionHeader D_06002594;
|
||||
|
||||
const ActorInit Bg_Ice_Turara_InitVars = {
|
||||
ACTOR_BG_ICE_TURARA,
|
||||
|
@ -52,16 +52,15 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceTurara* this = THIS;
|
||||
s32 pad;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06002594, &colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06002594, &colHeader);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (this->dyna.actor.params == TURARA_STALAGMITE) {
|
||||
this->actionFunc = BgIceTurara_Stalagmite;
|
||||
} else {
|
||||
|
@ -74,7 +73,7 @@ void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIceTurara* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
@ -136,7 +135,7 @@ void BgIceTurara_Shiver(BgIceTurara* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.posRot.pos.z = this->dyna.actor.initPosRot.pos.z;
|
||||
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgIceTurara_Fall;
|
||||
} else {
|
||||
sp28 = Rand_ZeroOne();
|
||||
|
@ -158,7 +157,7 @@ void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx) {
|
|||
BgIceTurara_Break(this, globalCtx, 40.0f);
|
||||
if (this->dyna.actor.params == TURARA_STALACTITE_REGROW) {
|
||||
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y + 120.0f;
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = BgIceTurara_Regrow;
|
||||
} else {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
|
|
@ -30,7 +30,7 @@ const ActorInit Bg_Ingate_InitVars = {
|
|||
(ActorFunc)BgIngate_Draw,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060011B8;
|
||||
extern CollisionHeader D_060011B8;
|
||||
extern Gfx D_06001040[];
|
||||
|
||||
void BgIngate_SetupAction(BgIngate* this, BgIngateActionFunc actionFunc) {
|
||||
|
@ -41,12 +41,12 @@ void BgIngate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgIngate* this = THIS;
|
||||
|
||||
s32 pad;
|
||||
s32 sp32 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_060011B8, &sp32);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060011B8, &colHeader);
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp32);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if ((globalCtx->sceneNum != SCENE_SPOT20 || LINK_IS_CHILD) ||
|
||||
(((gSaveContext.eventChkInf[1] & 0x100)) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
|
@ -66,7 +66,7 @@ void BgIngate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgIngate_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIngate* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80892890(BgIngate* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -53,23 +53,21 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060004A8;
|
||||
extern CollisionHeader D_060004A8;
|
||||
extern Gfx D_060001F0[];
|
||||
|
||||
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, UNK_PTR arg2, s32 moveFlag) {
|
||||
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
s32 localConst;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
localConst = 0;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(arg2, &localConst);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localConst);
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_1flift.c", 0xB3,
|
||||
osSyncPrintf("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);
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +89,7 @@ void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
BgJya1flift_InitDynapoly(this, globalCtx, &D_060004A8, 0);
|
||||
BgJya1flift_InitDynapoly(this, globalCtx, &D_060004A8, DPM_UNK);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
BgJya1flift_InitCollision(thisx, globalCtx);
|
||||
if (Flags_GetSwitch(globalCtx, (thisx->params & 0x3F))) {
|
||||
|
@ -110,7 +108,7 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->hasInitialized) {
|
||||
sIsSpawned = false;
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,18 +43,18 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_0600C4C8;
|
||||
extern CollisionHeader D_0600C4C8;
|
||||
extern Gfx D_0600C0A0[];
|
||||
|
||||
void func_808932C0(BgJyaAmishutter* this, GlobalContext* globalCtx, u32 collision, DynaPolyMoveFlag flag) {
|
||||
void func_808932C0(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
|
||||
s16 pad1;
|
||||
u32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->actor, flag);
|
||||
DynaPolyInfo_Alloc(collision, &local_c);
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, local_c);
|
||||
if (this->dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(&this->actor, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
if (this->bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_amishutter.c", 129,
|
||||
this->actor.id, this->actor.params);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void func_808932C0(BgJyaAmishutter* this, GlobalContext* globalCtx, u32 collisio
|
|||
void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaAmishutter* this = THIS;
|
||||
|
||||
func_808932C0(this, globalCtx, &D_0600C4C8, 0);
|
||||
func_808932C0(this, globalCtx, &D_0600C4C8, DPM_UNK);
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
func_808933BC(this);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaAmishutter* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void func_808933BC(BgJyaAmishutter* this) {
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef void (*BgJyaAmishutterActionFunc)(struct BgJyaAmishutter*);
|
|||
|
||||
typedef struct BgJyaAmishutter {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ u32 dynaPolyId;
|
||||
/* 0x014C */ s32 bgId;
|
||||
/* 0x0150 */ char unk_150[0x14];
|
||||
/* 0x0164 */ BgJyaAmishutterActionFunc actionFunc;
|
||||
} BgJyaAmishutter; // size = 0x0168
|
||||
|
|
|
@ -36,16 +36,16 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
extern UNK_TYPE D_05004350;
|
||||
extern Gfx D_05004CD0[];
|
||||
extern UNK_TYPE D_05004E98;
|
||||
extern CollisionHeader D_05004E98;
|
||||
|
||||
void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgJyaBlock* this = THIS;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_05004E98, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&D_05004E98, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
if ((LINK_AGE_IN_YEARS != YEARS_CHILD) || !Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
|
@ -56,7 +56,7 @@ void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaBlock* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgJyaBlock_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -41,20 +41,19 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_0600E710;
|
||||
extern CollisionHeader D_0600E710;
|
||||
extern Gfx D_0600E490[];
|
||||
extern Gfx D_0600EDC0[];
|
||||
|
||||
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, void* arg2, DynaPolyMoveFlag flag) {
|
||||
s16 pad1;
|
||||
s32 localConst = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, flag);
|
||||
DynaPolyInfo_Alloc(arg2, &localConst);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localConst);
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(&this->dyna, flag);
|
||||
CollisionHeader_GetVirtual(arg2, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
|
||||
// Warning: move BG registration failed
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_bombiwa.c", 174,
|
||||
|
@ -78,7 +77,7 @@ void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->params & 0x3F);
|
||||
osSyncPrintf(VT_SGR());
|
||||
}
|
||||
BgJyaBombiwa_SetupDynaPoly(thisx, globalCtx, &D_0600E710, 0);
|
||||
BgJyaBombiwa_SetupDynaPoly(thisx, globalCtx, &D_0600E710, DPM_UNK);
|
||||
BgJyaBombiwa_InitCollider(thisx, globalCtx);
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
Actor_Kill(thisx);
|
||||
|
@ -93,7 +92,7 @@ void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaBombiwa* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,8 @@ void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
pos.x = this->actor.posRot.pos.x;
|
||||
pos.y = this->actor.posRot.pos.y + 59.5f;
|
||||
pos.z = this->actor.posRot.pos.z;
|
||||
this->actor.groundY = func_8003C9A4(&globalCtx->colCtx, &this->actor.floorPoly, &sp38, &this->actor, &pos);
|
||||
this->actor.groundY =
|
||||
BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->actor.floorPoly, &sp38, &this->actor, &pos);
|
||||
func_80897970(this);
|
||||
if (this->collider.base.atFlags & 1) {
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
|
|
@ -41,17 +41,17 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_0600F000[];
|
||||
extern UNK_TYPE D_0600F208;
|
||||
extern CollisionHeader D_0600F208;
|
||||
|
||||
void func_80899740(BgJyaKanaami* this, GlobalContext* globalCtx, UNK_TYPE arg2, DynaPolyMoveFlag flag) {
|
||||
void func_80899740(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
|
||||
s32 pad;
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->actor, flag);
|
||||
DynaPolyInfo_Alloc(arg2, &local_c);
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, local_c);
|
||||
if (this->dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(&this->actor, flag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
if (this->bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_kanaami.c", 145,
|
||||
this->actor.id, this->actor.params);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaKanaami* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void func_80899880(BgJyaKanaami* this) {
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef void (*BgJyaKanaamiActionFunc)(struct BgJyaKanaami*, GlobalContext*);
|
|||
|
||||
typedef struct BgJyaKanaami {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ u32 dynaPolyId;
|
||||
/* 0x014C */ s32 bgId;
|
||||
/* 0x014C */ char unk_150[0x14];
|
||||
/* 0x0164 */ BgJyaKanaamiActionFunc actionFunc;
|
||||
/* 0x0168 */ s16 unk_168;
|
||||
|
|
|
@ -15,7 +15,8 @@ void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgJyaLift_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, u32 arg2, DynaPolyMoveFlag moveFlag);
|
||||
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader,
|
||||
DynaPolyMoveFlag moveFlag);
|
||||
void BgJyaLift_SetFinalPosY(BgJyaLift* this);
|
||||
void BgJyaLift_SetInitPosY(BgJyaLift* this);
|
||||
void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx);
|
||||
|
@ -43,17 +44,17 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_0600D7E8;
|
||||
extern CollisionHeader D_0600D7E8;
|
||||
extern Gfx D_0600CCE0[];
|
||||
|
||||
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, u32 arg2, DynaPolyMoveFlag moveFlag) {
|
||||
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader,
|
||||
DynaPolyMoveFlag moveFlag) {
|
||||
s32 pad1;
|
||||
s32 localConst = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(arg2, &localConst);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localConst);
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collisionHeader, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -87,7 +88,7 @@ void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// Goddess Lift DT
|
||||
osSyncPrintf("女神リフト DT\n");
|
||||
sIsSpawned = false;
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ void BgJyaMegami_SetupExplode(BgJyaMegami* this);
|
|||
void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_06005780[];
|
||||
extern UNK_TYPE D_06005C4C;
|
||||
extern CollisionHeader D_06005C4C;
|
||||
extern Gfx D_0600B9F8[];
|
||||
|
||||
typedef struct {
|
||||
|
@ -110,14 +110,14 @@ static Gfx* sDLists[] = {
|
|||
0x0600A418, 0x0600A568, 0x0600A6A0, 0x0600A7E0, 0x0600A978, 0x0600AAC8,
|
||||
};
|
||||
|
||||
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, void* collision, DynaPolyMoveFlag flags) {
|
||||
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision,
|
||||
DynaPolyMoveFlag flags) {
|
||||
s32 pad;
|
||||
u32 temp;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
temp = 0;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, flags);
|
||||
DynaPolyInfo_Alloc(collision, &temp);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, temp);
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgJyaMegami_InitCollider(BgJyaMegami* this, GlobalContext* globalCtx) {
|
||||
|
@ -160,7 +160,7 @@ void func_8089A41C(BgJyaMegami* this, GlobalContext* globalCtx, f32 arg2) {
|
|||
void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaMegami* this = THIS;
|
||||
|
||||
BgJyaMegami_InitDynaPoly(this, globalCtx, &D_06005C4C, 0);
|
||||
BgJyaMegami_InitDynaPoly(this, globalCtx, &D_06005C4C, DPM_UNK);
|
||||
BgJyaMegami_InitCollider(this, globalCtx);
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
@ -174,7 +174,7 @@ void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaMegami* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,18 +61,18 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_06012340[];
|
||||
extern UNK_PTR D_06012508;
|
||||
extern CollisionHeader D_06012508;
|
||||
|
||||
void func_8089B440(BgJyaZurerukabe* this, GlobalContext* globalCtx, void* arg2, s32 flags) {
|
||||
void func_8089B440(BgJyaZurerukabe* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
|
||||
s32 pad;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, flags);
|
||||
DynaPolyInfo_Alloc(arg2, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("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);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgJyaZurerukabe* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
D_8089B9C0[this->unk_168] = 0.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,23 +32,23 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_060038D0[];
|
||||
extern UNK_TYPE D_060042D8;
|
||||
extern CollisionHeader D_060042D8;
|
||||
|
||||
void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMenkuriKaiten* this = THIS;
|
||||
s32 pad;
|
||||
u32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->actor, 3);
|
||||
DynaPolyInfo_Alloc(&D_060042D8, &local_c);
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, local_c);
|
||||
DynaPolyActor_Init(&this->actor, DPM_UNK3);
|
||||
CollisionHeader_GetVirtual(&D_060042D8, &colHeader);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
}
|
||||
|
||||
void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMenkuriKaiten* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void BgMenkuriKaiten_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -8,7 +8,7 @@ struct BgMenkuriKaiten;
|
|||
|
||||
typedef struct BgMenkuriKaiten {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ u32 dynaPolyId;
|
||||
/* 0x014C */ s32 bgId;
|
||||
/* 0x0150 */ char unk_150[0x14];
|
||||
} BgMenkuriKaiten; // size = 0x0164
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ static ColliderTrisInit sTrisInitStingerWall = {
|
|||
static Gfx* sDLists[] = {
|
||||
0x06001A30, 0x06002390, 0x06001CD0, 0x06002090, 0x06001770,
|
||||
};
|
||||
static ColHeader* sColHeaders[] = {
|
||||
static CollisionHeader* sColHeaders[] = {
|
||||
0x06001C58, 0x060025A4, 0x06001DE8, 0x06001DE8, 0x06001DE8,
|
||||
};
|
||||
|
||||
|
@ -107,20 +107,19 @@ void BgMizuBwall_RotateVec3f(Vec3f* out, Vec3f* in, f32 sin, f32 cos) {
|
|||
void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMizuBwall* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, D_8089D854);
|
||||
this->yRot = this->dyna.actor.posRot.pos.y;
|
||||
this->dList = sDLists[(u16)this->dyna.actor.params & 0xF];
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 1);
|
||||
DynaPolyInfo_Alloc(sColHeaders[(u16)this->dyna.actor.params & 0xF], &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(sColHeaders[(u16)this->dyna.actor.params & 0xF], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
switch ((u16)this->dyna.actor.params & 0xF) {
|
||||
case MIZUBWALL_FLOOR:
|
||||
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -155,7 +154,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case MIZUBWALL_RUTO_ROOM:
|
||||
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -191,7 +190,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case MIZUBWALL_UNUSED:
|
||||
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -229,7 +228,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case MIZUBWALL_STINGER_ROOM_1:
|
||||
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -267,7 +266,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case MIZUBWALL_STINGER_ROOM_2:
|
||||
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
this->actionFunc = BgMizuBwall_DoNothing;
|
||||
} else {
|
||||
|
@ -310,15 +309,15 @@ void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMizuBwall* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyTris(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
void BgMizuBwall_SetAlpha(BgMizuBwall* this, GlobalContext* globalCtx) {
|
||||
f32 waterLevel = globalCtx->colCtx.stat.colHeader->waterBoxes[2].ySurface;
|
||||
f32 waterLevel = globalCtx->colCtx.colHeader->waterBoxes[2].ySurface;
|
||||
s32 alphaMod;
|
||||
|
||||
if (globalCtx->colCtx.stat.colHeader->waterBoxes) {}
|
||||
if (globalCtx->colCtx.colHeader->waterBoxes) {}
|
||||
|
||||
if (waterLevel < -15.0f) {
|
||||
this->scrollAlpha1 = 255;
|
||||
|
@ -404,7 +403,7 @@ void BgMizuBwall_Idle(BgMizuBwall* this, GlobalContext* globalCtx) {
|
|||
this->collider.base.acFlags &= ~2;
|
||||
Flags_SetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F);
|
||||
this->breakTimer = 1;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dList = NULL;
|
||||
BgMizuBwall_SpawnDebris(this, globalCtx);
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||
|
|
|
@ -51,9 +51,9 @@ void BgMizuShutter_Init(BgMizuShutter* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->displayList = sDisplayLists[SIZE_PARAM];
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 1);
|
||||
DynaPolyInfo_Alloc(sCollisionHeaders[SIZE_PARAM], &sp30);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp30);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(sCollisionHeaders[SIZE_PARAM], &sp30);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp30);
|
||||
if ((SIZE_PARAM == BGMIZUSHUTTER_SMALL) || (SIZE_PARAM == BGMIZUSHUTTER_LARGE)) {
|
||||
this->closedPos = this->dyna.actor.posRot.pos;
|
||||
this->timer = 0;
|
||||
|
@ -82,7 +82,7 @@ void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMizuShutter* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -33,36 +33,36 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060074EC;
|
||||
extern CollisionHeader D_060074EC;
|
||||
|
||||
void func_8089F788(BgMizuUzu* this, GlobalContext* globalCtx);
|
||||
|
||||
void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMizuUzu* this = THIS;
|
||||
s32 pad;
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(thisx, 0);
|
||||
DynaPolyInfo_Alloc(&D_060074EC, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(thisx, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060074EC, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
this->actionFunc = func_8089F788;
|
||||
}
|
||||
|
||||
void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMizuUzu* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_8089F788(BgMizuUzu* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (PLAYER->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_WATER_CONVECTION - SFX_FLAG);
|
||||
thisx->shape.rot.y += 0x1C0;
|
||||
|
|
|
@ -97,7 +97,7 @@ void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
WaterBox* waterBoxes;
|
||||
s32 waterLevelActionIndex;
|
||||
|
||||
waterBoxes = globalCtx->colCtx.stat.colHeader->waterBoxes;
|
||||
waterBoxes = globalCtx->colCtx.colHeader->waterBoxes;
|
||||
this->type = this->actor.params & 0xFF;
|
||||
this->switchFlag = (this->actor.params >> 8) & 0xFF;
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
|
@ -220,7 +220,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
|
|||
s32 waterLevelActionIndex;
|
||||
WaterBox* waterBoxes;
|
||||
|
||||
waterBoxes = globalCtx->colCtx.stat.colHeader->waterBoxes;
|
||||
waterBoxes = globalCtx->colCtx.colHeader->waterBoxes;
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
prevSwitchFlag = this->actor.params;
|
||||
|
@ -241,7 +241,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
func_80106CCC(globalCtx);
|
||||
}
|
||||
BgMizuWater_SetWaterBoxesHeight(globalCtx->colCtx.stat.colHeader->waterBoxes, this->actor.posRot.pos.y);
|
||||
BgMizuWater_SetWaterBoxesHeight(globalCtx->colCtx.colHeader->waterBoxes, this->actor.posRot.pos.y);
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
|
|
|
@ -33,8 +33,8 @@ const ActorInit Bg_Mjin_InitVars = {
|
|||
extern UNK_TYPE D_06000000;
|
||||
extern Gfx D_06000140[];
|
||||
extern Gfx D_06000330[];
|
||||
extern UNK_TYPE D_06000330_;
|
||||
extern UNK_TYPE D_06000658;
|
||||
extern CollisionHeader D_06000330_;
|
||||
extern CollisionHeader D_06000658;
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
|
||||
|
@ -67,23 +67,22 @@ void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMjin* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808A0850(BgMjin* this, GlobalContext* globalCtx) {
|
||||
u32 local_c;
|
||||
UNK_TYPE arg0;
|
||||
CollisionHeader* colHeader;
|
||||
CollisionHeader* collision;
|
||||
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
|
||||
local_c = 0;
|
||||
colHeader = NULL;
|
||||
this->dyna.actor.flags &= ~0x10;
|
||||
this->dyna.actor.objBankIndex = this->objBankIndex;
|
||||
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, 0);
|
||||
arg0 = this->dyna.actor.params != 0 ? &D_06000658 : &D_06000330_;
|
||||
DynaPolyInfo_Alloc(arg0, &local_c);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, local_c);
|
||||
DynaPolyActor_Init(&this->dyna.actor, 0);
|
||||
collision = this->dyna.actor.params != 0 ? &D_06000658 : &D_06000330_;
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
BgMjin_SetupAction(this, func_808A0920);
|
||||
this->dyna.actor.draw = BgMjin_Draw;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, GlobalContext* globalC
|
|||
void BgMoriBigst_StalfosPairFight(BgMoriBigst* this, GlobalContext* globalCtx);
|
||||
void BgMoriBigst_SetupDone(BgMoriBigst* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_0600221C;
|
||||
extern CollisionHeader D_0600221C;
|
||||
extern Gfx D_06001E50[];
|
||||
|
||||
const ActorInit Bg_Mori_Bigst_InitVars = {
|
||||
|
@ -53,17 +53,16 @@ void BgMoriBigst_SetupAction(BgMoriBigst* this, BgMoriBigstActionFunc actionFunc
|
|||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
void BgMoriBigst_InitDynapoly(BgMoriBigst* this, GlobalContext* globalCtx, ColHeader* collision, s32 moveFlag) {
|
||||
void BgMoriBigst_InitDynapoly(BgMoriBigst* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(collision, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("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);
|
||||
|
@ -102,7 +101,7 @@ void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMoriBigst* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgMoriBigst_SetupWaitForMoriTex(BgMoriBigst* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -39,7 +39,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060035F8;
|
||||
extern CollisionHeader D_060035F8;
|
||||
extern Gfx D_06002AD0[];
|
||||
|
||||
f32 func_808A1800(f32* pValue, f32 target, f32 scale, f32 maxStep, f32 minStep) {
|
||||
|
@ -88,8 +88,7 @@ void func_808A18FC(BgMoriElevator* this, f32 distTo) {
|
|||
void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMoriElevator* this = THIS;
|
||||
s32 pad;
|
||||
s32 localConst;
|
||||
localConst = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
this->unk_172 = sIsSpawned;
|
||||
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);
|
||||
|
@ -105,10 +104,9 @@ void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
sIsSpawned = true;
|
||||
this->dyna.actor.room = -1;
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_PLAYER);
|
||||
DynaPolyInfo_Alloc(&D_060035F8, &localConst);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localConst);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
CollisionHeader_GetVirtual(&D_060035F8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
BgMoriElevator_SetupWaitAfterInit(this);
|
||||
break;
|
||||
case true:
|
||||
|
@ -124,7 +122,7 @@ void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->unk_172 == 0) {
|
||||
// Forest Temple elevator DT
|
||||
osSyncPrintf("森の神殿 elevator DT\n");
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
sIsSpawned = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void BgMoriHashigo_SetupLadderFall(BgMoriHashigo* this);
|
|||
void BgMoriHashigo_LadderFall(BgMoriHashigo* this, GlobalContext* globalCtx);
|
||||
void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this);
|
||||
|
||||
extern ColHeader D_060037D8;
|
||||
extern CollisionHeader D_060037D8;
|
||||
extern Gfx D_060036B0[];
|
||||
extern Gfx D_06004770[];
|
||||
|
||||
|
@ -70,18 +70,18 @@ static InitChainEntry sInitChainLadder[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, GlobalContext* globalCtx, ColHeader* collision, s32 moveFlag) {
|
||||
void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, GlobalContext* globalCtx, CollisionHeader* collision,
|
||||
s32 moveFlag) {
|
||||
s32 pad;
|
||||
ColHeader* colHeader;
|
||||
CollisionHeader* colHeader;
|
||||
s32 pad2;
|
||||
|
||||
colHeader = NULL;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(collision, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("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);
|
||||
|
@ -177,7 +177,7 @@ void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgMoriHashigo* this = THIS;
|
||||
|
||||
if (this->dyna.actor.params == 0) {
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
if (this->dyna.actor.params == -1) {
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
|
|
|
@ -22,8 +22,8 @@ void BgMoriHashira4_PillarsRotate(BgMoriHashira4* this, GlobalContext* globalCtx
|
|||
void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_GateOpen(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_06001AF8;
|
||||
extern ColHeader D_060089E0;
|
||||
extern CollisionHeader D_06001AF8;
|
||||
extern CollisionHeader D_060089E0;
|
||||
|
||||
const ActorInit Bg_Mori_Hashira4_InitVars = {
|
||||
ACTOR_BG_MORI_HASHIRA4,
|
||||
|
@ -52,18 +52,18 @@ void BgMoriHashira4_SetupAction(BgMoriHashira4* this, BgMoriHashira4ActionFunc a
|
|||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, GlobalContext* globalCtx, ColHeader* collision, s32 moveFlag) {
|
||||
void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, GlobalContext* globalCtx, CollisionHeader* collision,
|
||||
s32 moveFlag) {
|
||||
s32 pad;
|
||||
ColHeader* colHeader;
|
||||
CollisionHeader* colHeader;
|
||||
s32 pad2;
|
||||
|
||||
colHeader = NULL;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(collision, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, moveFlag);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("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);
|
||||
|
@ -106,7 +106,7 @@ void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMoriHashira4* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgMoriHashira4_SetupWaitForMoriTex(BgMoriHashira4* this) {
|
||||
|
|
|
@ -47,10 +47,10 @@ static Gfx* sDLists[] = {
|
|||
0x06002B70,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060054B8;
|
||||
extern UNK_TYPE D_06003490;
|
||||
extern UNK_TYPE D_060043D0;
|
||||
extern UNK_TYPE D_06006078;
|
||||
extern CollisionHeader D_060054B8;
|
||||
extern CollisionHeader D_06003490;
|
||||
extern CollisionHeader D_060043D0;
|
||||
extern CollisionHeader D_06006078;
|
||||
extern Gfx D_04049FE0[]; // display list for studded dungeon door
|
||||
extern Gfx D_06000AE8[];
|
||||
extern Gfx D_06001678[];
|
||||
|
@ -62,7 +62,7 @@ void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 t6;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, DPM_PLAYER);
|
||||
DynaPolyActor_Init(&this->dyna.actor, DPM_PLAYER);
|
||||
|
||||
switchFlagParam = this->dyna.actor.params & 0x3F;
|
||||
t6 = this->dyna.actor.params & 0x4000;
|
||||
|
@ -110,11 +110,11 @@ void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgMoriHineri* this = THIS;
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808A39FC(BgMoriHineri* this, GlobalContext* globalCtx) {
|
||||
s32 sp2C;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
if ((Object_IsLoaded(&globalCtx->objectCtx, this->moriHineriObjIdx)) &&
|
||||
(Object_IsLoaded(&globalCtx->objectCtx, this->moriTexObjIdx)) &&
|
||||
|
@ -138,23 +138,22 @@ void func_808A39FC(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
|
||||
sp2C = 0;
|
||||
colHeader = NULL;
|
||||
this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom;
|
||||
if (this->dyna.actor.params == 0) {
|
||||
this->actionFunc = func_808A3C8C;
|
||||
DynaPolyInfo_Alloc(&D_060054B8, &sp2C);
|
||||
CollisionHeader_GetVirtual(&D_060054B8, &colHeader);
|
||||
} else if (this->dyna.actor.params == 1) {
|
||||
this->actionFunc = BgMoriHineri_SpawnBossKeyChest;
|
||||
DynaPolyInfo_Alloc(&D_06003490, &sp2C);
|
||||
CollisionHeader_GetVirtual(&D_06003490, &colHeader);
|
||||
} else if (this->dyna.actor.params == 2) {
|
||||
this->actionFunc = BgMoriHineri_DoNothing;
|
||||
DynaPolyInfo_Alloc(&D_060043D0, &sp2C);
|
||||
CollisionHeader_GetVirtual(&D_060043D0, &colHeader);
|
||||
} else {
|
||||
this->actionFunc = func_808A3C8C;
|
||||
DynaPolyInfo_Alloc(&D_06006078, &sp2C);
|
||||
CollisionHeader_GetVirtual(&D_06006078, &colHeader);
|
||||
}
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp2C);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void BgMoriIdomizu_SetupAction(BgMoriIdomizu* this, BgMoriIdomizuActionFunc acti
|
|||
}
|
||||
|
||||
void BgMoriIdomizu_SetWaterLevel(GlobalContext* globalCtx, s16 waterLevel) {
|
||||
WaterBox* waterBox = globalCtx->colCtx.stat.colHeader->waterBoxes;
|
||||
WaterBox* waterBox = globalCtx->colCtx.colHeader->waterBoxes;
|
||||
|
||||
waterBox[2].ySurface = waterLevel;
|
||||
waterBox[3].ySurface = waterLevel;
|
||||
|
|
|
@ -21,7 +21,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, GlobalContext* globalCtx);
|
|||
void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this);
|
||||
void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_060063B8;
|
||||
extern CollisionHeader D_060063B8;
|
||||
extern Gfx D_060056B0[];
|
||||
|
||||
const ActorInit Bg_Mori_Kaitenkabe_InitVars = {
|
||||
|
@ -52,15 +52,14 @@ void BgMoriKaitenkabe_CrossProduct(Vec3f* dest, Vec3f* v1, Vec3f* v2) {
|
|||
void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriKaitenkabe* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
// Forest Temple object 【Rotating Wall (arg_data: 0x% 04x)】 appears
|
||||
osSyncPrintf("◯◯◯森の神殿オブジェクト【回転壁(arg_data : 0x%04x)】出現 \n", this->dyna.actor.params);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_060063B8, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060063B8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);
|
||||
if (this->moriTexObjIndex < 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
@ -75,7 +74,7 @@ void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMoriKaitenkabe* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgMoriKaitenkabe_WaitForMoriTex(BgMoriKaitenkabe* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -26,7 +26,7 @@ void BgMoriRakkatenjo_Rest(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
|
|||
void BgMoriRakkatenjo_SetupRise(BgMoriRakkatenjo* this);
|
||||
void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_060087AC;
|
||||
extern CollisionHeader D_060087AC;
|
||||
extern Gfx D_06007690[];
|
||||
|
||||
static s16 sCamSetting = 0;
|
||||
|
@ -52,9 +52,9 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriRakkatenjo* this = THIS;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_PLAYER);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
// Forest Temple obj. Falling Ceiling
|
||||
osSyncPrintf("森の神殿 obj. 落下天井 (home posY %f)\n", this->dyna.actor.initPosRot.pos.y);
|
||||
if ((fabsf(1991.0f - this->dyna.actor.initPosRot.pos.x) > 0.001f) ||
|
||||
|
@ -75,9 +75,8 @@ void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_Alloc(&D_060087AC, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
CollisionHeader_GetVirtual(&D_060087AC, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
BgMoriRakkatenjo_SetupWaitForMoriTex(this);
|
||||
sCamSetting = 0;
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
BgMoriRakkatenjo* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
s32 BgMoriRakkatenjo_IsLinkUnder(BgMoriRakkatenjo* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -34,7 +34,7 @@ extern Gfx D_060079E0[];
|
|||
extern Gfx D_06006830[];
|
||||
extern Gfx D_06006D60[];
|
||||
extern Gfx D_06007230[];
|
||||
extern ColHeader D_06007860;
|
||||
extern CollisionHeader D_06007860;
|
||||
|
||||
const ActorInit Bg_Po_Event_InitVars = {
|
||||
ACTOR_BG_PO_EVENT,
|
||||
|
@ -139,13 +139,12 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, GlobalContext* globalCtx) {
|
|||
static s16 blockPosX[] = { 2149, 1969, 1909 };
|
||||
static s16 blockPosZ[] = { -1410, -1350, -1530 };
|
||||
Actor* newBlock;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 bgId;
|
||||
|
||||
this->dyna.actor.flags |= 0x30;
|
||||
DynaPolyInfo_Alloc(&D_06007860, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
CollisionHeader_GetVirtual(&D_06007860, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if ((this->type == 0) && (this->index != 3)) {
|
||||
newBlock = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_PO_EVENT,
|
||||
blockPosX[this->index], this->dyna.actor.posRot.pos.y, blockPosZ[this->index], 0,
|
||||
|
@ -170,8 +169,8 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
this->dyna.actor.posRot.pos.y = 833.0f;
|
||||
this->dyna.actor.groundY = func_8003C9A4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor,
|
||||
&this->dyna.actor.posRot.pos);
|
||||
this->dyna.actor.groundY = BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &bgId,
|
||||
&this->dyna.actor, &this->dyna.actor.posRot.pos);
|
||||
this->actionFunc = BgPoEvent_BlockWait;
|
||||
}
|
||||
|
||||
|
@ -197,7 +196,7 @@ void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgPoEvent_InitPaintings(this, globalCtx);
|
||||
}
|
||||
} else {
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params)) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
|
@ -213,7 +212,7 @@ void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->type >= 2) {
|
||||
Collider_DestroyTris(globalCtx, &this->collider);
|
||||
} else {
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if ((this->type == 1) && (gSaveContext.timer1Value > 0)) {
|
||||
gSaveContext.timer1State = 0xA;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ const ActorInit Bg_Pushbox_InitVars = {
|
|||
};
|
||||
|
||||
extern Gfx D_06000000[];
|
||||
extern UNK_TYPE D_06000350;
|
||||
extern CollisionHeader D_06000350;
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP),
|
||||
|
@ -43,13 +43,13 @@ void BgPushbox_SetupAction(BgPushbox* this, BgPushboxActionFunc actionFunc) {
|
|||
void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgPushbox* this = THIS;
|
||||
s32 pad;
|
||||
u32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000350, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000350, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
|
||||
BgPushbox_SetupAction(this, func_808A8BAC);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgPushbox* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -53,14 +53,14 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
static u32 D_808A9508 = 0;
|
||||
BgRelayObjects* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
this->switchFlag = thisx->params & 0x3F;
|
||||
thisx->params = (thisx->params >> 8) & 0xFF;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 3);
|
||||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
if (thisx->params == WINDMILL_ROTATING_GEAR) {
|
||||
DynaPolyInfo_Alloc(&D_060025FC, &sp24);
|
||||
CollisionHeader_GetVirtual(&D_060025FC, &colHeader);
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
thisx->posRot.rot.y = 0x400;
|
||||
} else {
|
||||
|
@ -77,7 +77,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808A939C;
|
||||
}
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_060003C4, &sp24);
|
||||
CollisionHeader_GetVirtual(&D_060003C4, &colHeader);
|
||||
if (thisx->room == 0) {
|
||||
this->unk_169 = this->switchFlag - 0x33;
|
||||
} else {
|
||||
|
@ -107,13 +107,13 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
D_808A9508 |= 1;
|
||||
}
|
||||
}
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp24);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
|
||||
void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgRelayObjects* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
gSaveContext.eventChkInf[6] &= ~0x20;
|
||||
}
|
||||
|
|
|
@ -34,26 +34,26 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000AF0;
|
||||
extern UNK_TYPE D_06000908;
|
||||
extern CollisionHeader D_06000AF0;
|
||||
extern CollisionHeader D_06000908;
|
||||
extern Gfx D_06000980[];
|
||||
extern Gfx D_06000440[];
|
||||
|
||||
void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot00Break* this = THIS;
|
||||
s32 pad;
|
||||
u32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->actor, 0);
|
||||
DynaPolyActor_Init(&this->actor, DPM_UNK);
|
||||
|
||||
if (this->actor.params == 1) {
|
||||
DynaPolyInfo_Alloc(&D_06000AF0, &local_c);
|
||||
CollisionHeader_GetVirtual(&D_06000AF0, &colHeader);
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_06000908, &local_c);
|
||||
CollisionHeader_GetVirtual(&D_06000908, &colHeader);
|
||||
}
|
||||
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, local_c);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -63,7 +63,7 @@ void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot00Break_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot00Break* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void BgSpot00Break_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -9,7 +9,7 @@ struct BgSpot00Break;
|
|||
|
||||
typedef struct BgSpot00Break {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ u32 dynaPolyId;
|
||||
/* 0x014C */ s32 bgId;
|
||||
/* 0x0150 */ char unk_150[0x14];
|
||||
} BgSpot00Break; // size = 0x0164
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ const ActorInit Bg_Spot01_Idohashira_InitVars = {
|
|||
};
|
||||
|
||||
extern Gfx D_06000420[];
|
||||
extern UNK_TYPE D_0600075C;
|
||||
extern CollisionHeader D_0600075C;
|
||||
|
||||
void BgSpot01Idohashira_PlayBreakSfx1(BgSpot01Idohashira* this) {
|
||||
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_BOX_BREAK);
|
||||
|
@ -146,14 +146,14 @@ void func_808AAF34(BgSpot01Idohashira* this, GlobalContext* globalCtx) {
|
|||
void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot01Idohashira* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
s32 BgSpot01Idohashira_NotInCsMode(GlobalContext* globalCtx) {
|
||||
if (globalCtx->csCtx.state == 0) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
CsCmdActorAction* BgSpot01Idohashira_GetNpcAction(GlobalContext* globalCtx, s32 actionIdx) {
|
||||
|
@ -215,12 +215,12 @@ s32 func_808AB29C(BgSpot01Idohashira* this, GlobalContext* globalCtx) {
|
|||
thisPos->z = ((endZ - initPos.z) * temp_f0) + initPos.z;
|
||||
|
||||
if (temp_f0 >= 1.0f) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_808AB3E8(BgSpot01Idohashira* this) {
|
||||
|
@ -298,13 +298,13 @@ void BgSpot01Idohashira_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad[2];
|
||||
BgSpot01Idohashira* this = THIS;
|
||||
s32 localC;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
localC = 0;
|
||||
DynaPolyInfo_Alloc(&D_0600075C, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
colHeader = NULL;
|
||||
CollisionHeader_GetVirtual(&D_0600075C, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if ((gSaveContext.eventChkInf[5] & 0x10) && LINK_IS_ADULT) {
|
||||
|
|
|
@ -55,7 +55,7 @@ void func_808ABB84(BgSpot01Idomizu* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.eventChkInf[6] & 0x80) {
|
||||
this->waterHeight = -550.0f;
|
||||
}
|
||||
globalCtx->colCtx.stat.colHeader->waterBoxes[0].ySurface = this->actor.posRot.pos.y;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.posRot.pos.y;
|
||||
if (this->waterHeight < this->actor.posRot.pos.y) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
|
|
|
@ -33,7 +33,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06003C64;
|
||||
extern CollisionHeader D_06003C64;
|
||||
|
||||
void BgSpot01Idosoko_SetupAction(BgSpot01Idosoko* this, BgSpot01IdosokoActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -42,13 +42,13 @@ void BgSpot01Idosoko_SetupAction(BgSpot01Idosoko* this, BgSpot01IdosokoActionFun
|
|||
void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot01Idosoko* this = THIS;
|
||||
s32 pad;
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(thisx, 1);
|
||||
DynaPolyActor_Init(thisx, DPM_PLAYER);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_Alloc(&D_06003C64, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
CollisionHeader_GetVirtual(&D_06003C64, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (LINK_IS_CHILD) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
|
@ -59,7 +59,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot01Idosoko_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot01Idosoko* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808ABF54(BgSpot01Idosoko* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -39,8 +39,8 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
static Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 };
|
||||
|
||||
extern UNK_TYPE D_06001A38;
|
||||
extern UNK_TYPE D_06001C58;
|
||||
extern CollisionHeader D_06001A38;
|
||||
extern CollisionHeader D_06001C58;
|
||||
|
||||
void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot01Objects2* this = THIS;
|
||||
|
@ -86,28 +86,27 @@ s32 func_808AC22C(Path* pathList, Vec3f* pos, s32 path, s32 waypoint) {
|
|||
}
|
||||
|
||||
void func_808AC2BC(BgSpot01Objects2* this, GlobalContext* globalCtx) {
|
||||
s32 sp54;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 pad;
|
||||
Vec3f position;
|
||||
|
||||
sp54 = 0;
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) {
|
||||
// ---- Successful bank switching!!
|
||||
osSyncPrintf("-----バンク切り換え成功!!\n");
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objBankIndex].segment);
|
||||
|
||||
this->dyna.actor.objBankIndex = this->objBankIndex;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_PLAYER);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
|
||||
switch (this->dyna.actor.params & 7) {
|
||||
case 4: // Shooting gallery
|
||||
DynaPolyInfo_Alloc(&D_06001A38, &sp54);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp54);
|
||||
CollisionHeader_GetVirtual(&D_06001A38, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
break;
|
||||
case 3: // Shooting Gallery, spawns Carpenter Sabooro during the day
|
||||
DynaPolyInfo_Alloc(&D_06001C58, &sp54);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp54);
|
||||
CollisionHeader_GetVirtual(&D_06001C58, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
func_808AC22C(globalCtx->setupPathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_DAIKU_KAKARIKO, position.x,
|
||||
|
|
|
@ -33,7 +33,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000C98;
|
||||
extern CollisionHeader D_06000C98;
|
||||
|
||||
// These are identical vertex data for the waterfall.
|
||||
extern Vtx* D_06000800[]; // Vertex buffer 0
|
||||
|
@ -55,12 +55,12 @@ void BgSpot03Taki_ApplyOpeningAlpha(BgSpot03Taki* this, s32 bufferIndex) {
|
|||
void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot03Taki* this = THIS;
|
||||
s16 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
this->switchFlag = (this->dyna.actor.params & 0x3F);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000C98, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000C98, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->bufferIndex = 0;
|
||||
this->openingAlpha = 255.0f;
|
||||
|
@ -72,7 +72,7 @@ void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot03Taki_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot03Taki* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
|
||||
|
@ -91,7 +91,7 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
|
|||
if (this->openingAlpha > 0) {
|
||||
this->openingAlpha -= 5;
|
||||
if (this->openingAlpha <= 0.0f) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->timer = 400;
|
||||
this->state = WATERFALL_OPENED;
|
||||
this->openingAlpha = 0;
|
||||
|
@ -106,7 +106,7 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
|
|||
if (this->openingAlpha < 255.0f) {
|
||||
this->openingAlpha += 5.0f;
|
||||
if (this->openingAlpha >= 255.0f) {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->state = WATERFALL_CLOSED;
|
||||
this->openingAlpha = 255.0f;
|
||||
Flags_UnsetSwitch(globalCtx, this->switchFlag);
|
||||
|
|
|
@ -18,8 +18,8 @@ void func_808AE5A8(BgSpot05Soko* this, GlobalContext* globalCtx);
|
|||
void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx);
|
||||
void func_808AE630(BgSpot05Soko* this, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_060012C0;
|
||||
extern UNK_TYPE D_06000918;
|
||||
extern CollisionHeader D_06000918;
|
||||
extern CollisionHeader D_060012C0;
|
||||
|
||||
const ActorInit Bg_Spot05_Soko_InitVars = {
|
||||
ACTOR_BG_SPOT05_SOKO,
|
||||
|
@ -45,23 +45,23 @@ static Gfx* sDLists[] = {
|
|||
void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot05Soko* this = THIS;
|
||||
u32 pad1;
|
||||
u32 sp24;
|
||||
CollisionHeader* colHeader;
|
||||
u32 pad2;
|
||||
|
||||
sp24 = 0;
|
||||
colHeader = NULL;
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
this->switchFlag = (thisx->params >> 8) & 0xFF;
|
||||
thisx->params &= 0xFF;
|
||||
DynaPolyInfo_SetActorMove(thisx, DPM_UNK);
|
||||
DynaPolyActor_Init(thisx, DPM_UNK);
|
||||
if (thisx->params == 0) {
|
||||
DynaPolyInfo_Alloc(&D_06000918, &sp24);
|
||||
CollisionHeader_GetVirtual(&D_06000918, &colHeader);
|
||||
if (LINK_IS_ADULT) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
this->actionFunc = func_808AE5A8;
|
||||
}
|
||||
} else {
|
||||
DynaPolyInfo_Alloc(&D_060012C0, &sp24);
|
||||
CollisionHeader_GetVirtual(&D_060012C0, &colHeader);
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag) != 0) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
|
@ -69,13 +69,13 @@ void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->flags |= 0x10;
|
||||
}
|
||||
}
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp24);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
|
||||
void BgSpot05Soko_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot05Soko* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808AE5A8(BgSpot05Soko* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -32,7 +32,7 @@ const ActorInit Bg_Spot08_Bakudankabe_InitVars = {
|
|||
};
|
||||
|
||||
extern Gfx D_0500A880[];
|
||||
extern UNK_TYPE D_060039D4;
|
||||
extern CollisionHeader D_060039D4;
|
||||
extern Gfx D_06003898[];
|
||||
|
||||
static ColliderJntSphItemInit sJntSphItemsInit[] = {
|
||||
|
@ -135,23 +135,23 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) {
|
|||
void BgSpot08Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot08Bakudankabe* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
func_808B02D0(this, globalCtx);
|
||||
DynaPolyInfo_Alloc(&D_060039D4, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
CollisionHeader_GetVirtual(&D_060039D4, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
}
|
||||
|
||||
void BgSpot08Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot08Bakudankabe* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ const ActorInit Bg_Spot09_Obj_InitVars = {
|
|||
(ActorFunc)BgSpot09Obj_Draw,
|
||||
};
|
||||
|
||||
static UNK_PTR D_808B1F90[] = { NULL, gBgSpot09Col1, gBgSpot09Col2, gBgSpot09Col3, gBgSpot09Col4 };
|
||||
static CollisionHeader* D_808B1F90[] = { NULL, gBgSpot09Col1, gBgSpot09Col2, gBgSpot09Col3, gBgSpot09Col4 };
|
||||
|
||||
static s32 (*D_808B1FA4[])(BgSpot09Obj* this, GlobalContext* globalCtx) = {
|
||||
func_808B1BEC,
|
||||
|
@ -95,13 +95,13 @@ s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad[2];
|
||||
|
||||
if (D_808B1F90[thisx->params] != 0) {
|
||||
DynaPolyInfo_SetActorMove(thisx, 0);
|
||||
DynaPolyInfo_Alloc(D_808B1F90[thisx->params], &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
if (D_808B1F90[thisx->params] != NULL) {
|
||||
DynaPolyActor_Init(thisx, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(D_808B1F90[thisx->params], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ void BgSpot09Obj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgSpot09Obj* this = THIS;
|
||||
|
||||
if (thisx->params != 0) {
|
||||
DynaPolyInfo_Free(globalCtx, dynaColCtx, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, dynaColCtx, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,17 +99,16 @@ void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) {
|
|||
void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot11Bakudankabe* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
sp24 = 0;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
func_808B2180(this, globalCtx);
|
||||
DynaPolyInfo_Alloc(gBgSpot11Col, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
CollisionHeader_GetVirtual(&gBgSpot11Col, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Actor_SetScale(&this->dyna.actor, 1.0f);
|
||||
osSyncPrintf("(spot11 爆弾壁)(arg_data 0x%04x)\n", this->dyna.actor.params);
|
||||
}
|
||||
|
@ -117,7 +116,7 @@ void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot11Bakudankabe* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ static Vec3f D_808B2E34[] = {
|
|||
|
||||
extern Gfx D_06000870[];
|
||||
|
||||
void func_808B27F0(GlobalContext* globalCtx, s16 arg1) {
|
||||
WaterBox* waterBox = &globalCtx->colCtx.stat.colHeader->waterBoxes[0];
|
||||
void func_808B27F0(GlobalContext* globalCtx, s16 waterSurface) {
|
||||
WaterBox* waterBox = &globalCtx->colCtx.colHeader->waterBoxes[0];
|
||||
|
||||
waterBox->ySurface = arg1;
|
||||
waterBox->ySurface = waterSurface;
|
||||
}
|
||||
|
||||
s32 func_808B280C(GlobalContext* globalCtx) {
|
||||
|
|
|
@ -44,17 +44,17 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_06001080[];
|
||||
extern UNK_TYPE D_060011EC;
|
||||
extern CollisionHeader D_060011EC;
|
||||
|
||||
void func_808B2F90(BgSpot12Gate* this, GlobalContext* globalCtx, UNK_TYPE collision, DynaPolyMoveFlag flags) {
|
||||
void func_808B2F90(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad[2];
|
||||
|
||||
DynaPolyInfo_SetActorMove(thisx, flags);
|
||||
DynaPolyInfo_Alloc(collision, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(thisx, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_gate.c", 145,
|
||||
thisx->id, thisx->params);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void func_808B2F90(BgSpot12Gate* this, GlobalContext* globalCtx, UNK_TYPE collis
|
|||
void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot12Gate* this = THIS;
|
||||
|
||||
func_808B2F90(this, globalCtx, &D_060011EC, 0);
|
||||
func_808B2F90(this, globalCtx, &D_060011EC, DPM_UNK);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
|
@ -76,7 +76,7 @@ void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot12Gate_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot12Gate* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808B30C0(BgSpot12Gate* this) {
|
||||
|
|
|
@ -42,17 +42,17 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_06002260[];
|
||||
extern UNK_TYPE D_0600238C;
|
||||
extern CollisionHeader D_0600238C;
|
||||
|
||||
void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, UNK_TYPE collision, DynaPolyMoveFlag flags) {
|
||||
void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s32 pad[2];
|
||||
|
||||
DynaPolyInfo_SetActorMove(thisx, flags);
|
||||
DynaPolyInfo_Alloc(collision, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
DynaPolyActor_Init(thisx, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_saku.c", 140,
|
||||
thisx->id, thisx->params);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, UNK_TYPE collis
|
|||
void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot12Saku* this = THIS;
|
||||
|
||||
func_808B3420(this, globalCtx, &D_0600238C, 0);
|
||||
func_808B3420(this, globalCtx, &D_0600238C, DPM_UNK);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
func_808B3714(this);
|
||||
|
@ -73,7 +73,7 @@ void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot12Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot12Saku* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808B3550(BgSpot12Saku* this) {
|
||||
|
|
|
@ -20,7 +20,7 @@ void func_808B44CC(BgSpot15Rrbox* this, GlobalContext* globalCtx);
|
|||
|
||||
static s16 D_808B4590 = 0;
|
||||
|
||||
extern UNK_TYPE D_06000348;
|
||||
extern CollisionHeader D_06000348;
|
||||
extern Gfx D_06000180[];
|
||||
|
||||
const ActorInit Bg_Spot15_Rrbox_InitVars = {
|
||||
|
@ -52,17 +52,17 @@ static Vec3f D_808B45DC[] = {
|
|||
{ 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f },
|
||||
};
|
||||
|
||||
void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, UNK_TYPE* arg2, DynaPolyMoveFlag flags) {
|
||||
void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
|
||||
s32 pad;
|
||||
UNK_TYPE temp = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
u32 pad2;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, flags);
|
||||
DynaPolyInfo_Alloc(arg2, &temp);
|
||||
DynaPolyActor_Init(&this->dyna, flags);
|
||||
CollisionHeader_GetVirtual(collision, &colHeader);
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, temp);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
if (this->dyna.bgId == BG_ACTOR_MAX) {
|
||||
osSyncPrintf("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);
|
||||
}
|
||||
|
@ -75,11 +75,11 @@ void func_808B39E8(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3) {
|
|||
}
|
||||
|
||||
void func_808B3A34(BgSpot15Rrbox* this) {
|
||||
this->bgId = 50;
|
||||
this->bgId = BG_ACTOR_MAX;
|
||||
}
|
||||
|
||||
s32 func_808B3A40(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
||||
DynaPolyActor* dynaPolyActor = DynaPolyInfo_GetActor(&globalCtx->colCtx, this->bgId);
|
||||
DynaPolyActor* dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, this->bgId);
|
||||
|
||||
if (dynaPolyActor != NULL &&
|
||||
Math3D_Dist2DSq(dynaPolyActor->actor.posRot.pos.x, dynaPolyActor->actor.posRot.pos.z,
|
||||
|
@ -134,7 +134,7 @@ void BgSpot15Rrbox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot15Rrbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot15Rrbox* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
D_808B4590 = 0;
|
||||
}
|
||||
|
||||
|
@ -155,8 +155,8 @@ s32 func_808B3CA0(BgSpot15Rrbox* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
actorPosition.y += this->dyna.actor.pos4.y;
|
||||
actorPosition.z += this->dyna.actor.posRot.pos.z;
|
||||
|
||||
this->dyna.actor.groundY = func_8003CA64(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &this->bgId,
|
||||
&this->dyna.actor, &actorPosition, chkDist);
|
||||
this->dyna.actor.groundY = BgCheck_EntityRaycastFloor6(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &this->bgId,
|
||||
&this->dyna.actor, &actorPosition, chkDist);
|
||||
|
||||
if ((this->dyna.actor.groundY - this->dyna.actor.posRot.pos.y) >= -0.001f) {
|
||||
this->dyna.actor.posRot.pos.y = this->dyna.actor.groundY;
|
||||
|
@ -171,7 +171,7 @@ f32 func_808B3DDC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
|||
Vec3f scale;
|
||||
Actor* actor = &this->dyna.actor;
|
||||
f32 yIntersect;
|
||||
f32 returnValue = -32000.0f;
|
||||
f32 returnValue = BGCHECK_Y_MIN;
|
||||
s32 bgId;
|
||||
|
||||
func_808B3A34(this);
|
||||
|
@ -186,7 +186,7 @@ f32 func_808B3DDC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
|||
position.y += actor->pos4.y;
|
||||
position.z += actor->posRot.pos.z;
|
||||
|
||||
yIntersect = func_8003CA64(&globalCtx->colCtx, &actor->floorPoly, &bgId, actor, &position, 0);
|
||||
yIntersect = BgCheck_EntityRaycastFloor6(&globalCtx->colCtx, &actor->floorPoly, &bgId, actor, &position, 0);
|
||||
|
||||
if (returnValue < yIntersect) {
|
||||
returnValue = yIntersect;
|
||||
|
|
|
@ -17,7 +17,7 @@ typedef struct BgSpot15Rrbox {
|
|||
/* 0x0174 */ f32 unk_174;
|
||||
/* 0x0178 */ f32 unk_178;
|
||||
/* 0x017C */ f32 unk_17C;
|
||||
/* 0x0180 */ s32 bgId;
|
||||
/* 0x0180 */ s32 bgId; // Id of BgActor beneath the box
|
||||
} BgSpot15Rrbox; // size = 0x0184
|
||||
|
||||
extern const ActorInit Bg_Spot15_Rrbox_InitVars;
|
||||
|
|
|
@ -32,16 +32,16 @@ const ActorInit Bg_Spot15_Saku_InitVars = {
|
|||
};
|
||||
|
||||
extern Gfx D_060003C0[];
|
||||
extern UNK_TYPE D_060004D0;
|
||||
extern CollisionHeader D_060004D0;
|
||||
|
||||
void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot15Saku* this = THIS;
|
||||
s32 pad[2];
|
||||
s32 local_c = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(thisx, 0);
|
||||
DynaPolyInfo_Alloc(&D_060004D0, &local_c);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
|
||||
DynaPolyActor_Init(thisx, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_060004D0, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
thisx->scale.x = 0.1f;
|
||||
thisx->scale.y = 0.1f;
|
||||
thisx->scale.z = 0.1f;
|
||||
|
@ -57,7 +57,7 @@ void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot15Saku* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808B4930(BgSpot15Saku* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -35,7 +35,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000A38;
|
||||
extern CollisionHeader D_06000A38;
|
||||
extern Gfx D_060008A0[];
|
||||
extern Gfx D_06000960[];
|
||||
extern Gfx D_0500A880[];
|
||||
|
@ -98,21 +98,21 @@ void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) {
|
|||
void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot17Bakudankabe* this = THIS;
|
||||
s32 pad;
|
||||
s32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, 0);
|
||||
DynaPolyActor_Init(&this->dyna.actor, DPM_UNK);
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
DynaPolyInfo_Alloc(&D_06000A38, &sp24);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
|
||||
CollisionHeader_GetVirtual(&D_06000A38, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
}
|
||||
|
||||
void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot17Bakudankabe* this = THIS;
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -23,7 +23,7 @@ void func_808B7D50(BgSpot18Basket* this, GlobalContext* globalCtx);
|
|||
void func_808B7FC0(BgSpot18Basket* this, GlobalContext* globalCtx);
|
||||
void func_808B81A0(BgSpot18Basket* this, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_06002154;
|
||||
extern CollisionHeader D_06002154;
|
||||
extern Gfx D_060018B0[];
|
||||
|
||||
const ActorInit Bg_Spot18_Basket_InitVars = {
|
||||
|
@ -114,13 +114,13 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Basket* this = THIS;
|
||||
Actor* actor = &this->dyna.actor;
|
||||
ColHeader* colHeader = NULL;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK3);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK3);
|
||||
func_808B7710(this, globalCtx);
|
||||
DynaPolyInfo_Alloc(&D_06002154, &colHeader);
|
||||
CollisionHeader_GetVirtual(&D_06002154, &colHeader);
|
||||
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, actor, colHeader);
|
||||
|
||||
Actor_ProcessInitChain(actor, sInitChain);
|
||||
ActorShape_Init(&actor->shape, 0.0f, ActorShadow_DrawFunc_Circle, 15.0f);
|
||||
|
@ -148,7 +148,7 @@ void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot18Basket_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Basket* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
Collider_DestroyJntSph(globalCtx, &this->colliderJntSph);
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ void func_808B7BCC(BgSpot18Basket* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.posRot.pos.z, this->dyna.actor.posRot.pos.x) < SQ(32.0f)) {
|
||||
func_800800F8(globalCtx, 4210, 240, this, 0);
|
||||
func_808B7D38(this);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ void func_808B7FC0(BgSpot18Basket* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.shape.rot.y = arrayValue;
|
||||
|
||||
func_808B818C(this);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,8 +413,8 @@ void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->unk_216++;
|
||||
this->actionFunc(this, globalCtx);
|
||||
this->dyna.actor.groundY = func_8003C9A4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &temp, &this->dyna.actor,
|
||||
&this->dyna.actor.posRot);
|
||||
this->dyna.actor.groundY = BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->dyna.actor.floorPoly, &temp,
|
||||
&this->dyna.actor, &this->dyna.actor.posRot);
|
||||
if (this->actionFunc != func_808B7AFC) {
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph);
|
||||
if (this->actionFunc != func_808B7B6C) {
|
||||
|
|
|
@ -34,24 +34,24 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06000368;
|
||||
extern CollisionHeader D_06000368;
|
||||
extern Gfx D_06000150[];
|
||||
|
||||
void BgSpot18Futa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Futa* this = THIS;
|
||||
s32 pad;
|
||||
u32 sp1C = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->actor, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000368, &sp1C);
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, sp1C);
|
||||
DynaPolyActor_Init(&this->actor, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000368, &colHeader);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
}
|
||||
|
||||
void BgSpot18Futa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Futa* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void BgSpot18Futa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -8,7 +8,7 @@ struct BgSpot18Futa;
|
|||
|
||||
typedef struct BgSpot18Futa {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ u32 dynaPolyId;
|
||||
/* 0x014C */ s32 bgId;
|
||||
/* 0x0150 */ u32 unk_150[0x5];
|
||||
} BgSpot18Futa; // size = 0x0154
|
||||
|
||||
|
|
|
@ -49,9 +49,12 @@ static f32 D_808B90F4[] = {
|
|||
0.1f,
|
||||
};
|
||||
|
||||
static UNK_TYPE D_808B90FC[] = {
|
||||
0x06002FE4,
|
||||
0x0600261C,
|
||||
extern CollisionHeader D_06002FE4;
|
||||
extern CollisionHeader D_0600261C;
|
||||
|
||||
static CollisionHeader* D_808B90FC[] = {
|
||||
&D_06002FE4,
|
||||
&D_0600261C,
|
||||
};
|
||||
|
||||
static u32 D_808B9104[] = {
|
||||
|
@ -83,9 +86,12 @@ static BgSpot18ObjInitFunc D_808B913C[] = {
|
|||
func_808B8C90,
|
||||
};
|
||||
|
||||
static Gfx* sDlists[] = {
|
||||
0x06002BC0,
|
||||
0x06002370,
|
||||
extern Gfx D_06002BC0[];
|
||||
extern Gfx D_06002370[];
|
||||
|
||||
static Gfx(*sDlists[]) = {
|
||||
D_06002BC0,
|
||||
D_06002370,
|
||||
};
|
||||
|
||||
s32 func_808B8910(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
||||
|
@ -126,11 +132,11 @@ s32 func_808B8A5C(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_808B8A98(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
||||
s32 pad[2];
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna.actor, 0);
|
||||
DynaPolyInfo_Alloc(D_808B90FC[this->dyna.actor.params & 0xF], &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
DynaPolyActor_Init(&this->dyna.actor, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(D_808B90FC[this->dyna.actor.params & 0xF], &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -195,7 +201,7 @@ void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Obj* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808B8DC0(BgSpot18Obj* this) {
|
||||
|
|
|
@ -38,15 +38,15 @@ static InitChainEntry sInitChain[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_06000420[];
|
||||
extern UNK_TYPE D_06000534;
|
||||
extern CollisionHeader D_06000534;
|
||||
|
||||
void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgSpot18Shutter* this = THIS;
|
||||
s32 param = (this->dyna.actor.params >> 8) & 1;
|
||||
s32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
if (param == 0) {
|
||||
|
@ -75,14 +75,14 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
DynaPolyInfo_Alloc(&D_06000534, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC);
|
||||
CollisionHeader_GetVirtual(&D_06000534, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
}
|
||||
|
||||
void BgSpot18Shutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot18Shutter* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808B95AC(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -53,7 +53,7 @@ static f32 D_808BD9C4[] = {
|
|||
};
|
||||
|
||||
extern Gfx D_060009D0[];
|
||||
extern UNK_TYPE D_06000E94;
|
||||
extern CollisionHeader D_06000E94;
|
||||
|
||||
void BgTreemouth_SetupAction(BgTreemouth* this, BgTreemouthActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -62,12 +62,12 @@ void BgTreemouth_SetupAction(BgTreemouth* this, BgTreemouthActionFunc actionFunc
|
|||
void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgTreemouth* this = THIS;
|
||||
u32 localC = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, 0);
|
||||
DynaPolyInfo_Alloc(&D_06000E94, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06000E94, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
|
||||
Actor_SetHeight(thisx, 50.0f);
|
||||
|
||||
|
@ -87,7 +87,7 @@ void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgTreemouth* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_808BC65C(BgTreemouth* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -27,7 +27,7 @@ const ActorInit Bg_Umajump_InitVars = {
|
|||
(ActorFunc)BgUmaJump_Draw,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06001438;
|
||||
extern CollisionHeader D_06001438;
|
||||
extern Gfx D_06001220[];
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
|
@ -37,12 +37,12 @@ static InitChainEntry sInitChain[] = {
|
|||
void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgUmaJump* this = THIS;
|
||||
s32 pad;
|
||||
u32 sp24 = 0;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
DynaPolyInfo_SetActorMove(&this->actor, DPM_UNK);
|
||||
DynaPolyInfo_Alloc(&D_06001438, &sp24);
|
||||
this->dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, sp24);
|
||||
DynaPolyActor_Init(&this->actor, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&D_06001438, &colHeader);
|
||||
this->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->actor, colHeader);
|
||||
|
||||
if (this->actor.params == 1) {
|
||||
if ((!Flags_GetEventChkInf(0x18)) && (DREG(1) == 0)) {
|
||||
|
@ -56,7 +56,7 @@ void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgUmaJump_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgUmaJump* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->bgId);
|
||||
}
|
||||
|
||||
void BgUmaJump_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue