mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 17:30:25 +00:00
Document Collision_Check (#468)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * some decomp * still playing around with this * rename functions * ZAP again * ZAP again * the renaming begins * more renaming. hopefully didn't break anything * change all the things * this and then merge * and done * one little thing * small docs, small rename * changed mind on cylinder and quad elements * something * more stuff * more docs * more adjustments * Fixed some types * more fixes * all sorts of cleanup * now with flags * match! * names and such * update tools * damage tables * ColChkInfo * one more thing * formatting * more formatting * anime merge * some stuff * damage table * again * changes * .s * changes * oc2 type * a couple things * format * un-name magic arrows, not enough proof yet * fix damage table script and remove old one * EnAObj * changes Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
f786f958bb
commit
02994f5339
487 changed files with 14371 additions and 4713 deletions
|
@ -35,22 +35,50 @@ const ActorInit En_Bombf_InitVars = {
|
|||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_UNK10, 0x00, 0x29, 0x39, 0x20, COLSHAPE_CYLINDER },
|
||||
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0x0003F828, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER | AC_TYPE_OTHER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_2,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0x0003F828, 0x00, 0x00 },
|
||||
TOUCH_NONE,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 9, 18, 10, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
|
||||
{
|
||||
{ 0x00, { 0x00000008, 0x00, 0x08 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000008, 0x00, 0x08 },
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NONE,
|
||||
BUMP_NONE,
|
||||
OCELEM_NONE,
|
||||
},
|
||||
{ 0, { { 0, 0, 0 }, 0 }, 100 },
|
||||
},
|
||||
};
|
||||
|
||||
static ColliderJntSphInit sJntSphInit = {
|
||||
{ COLTYPE_UNK10, 0x39, 0x00, 0x00, 0x00, COLSHAPE_JNTSPH },
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_ON | AT_TYPE_ALL,
|
||||
AC_NONE,
|
||||
OC1_NONE,
|
||||
OC2_NONE,
|
||||
COLSHAPE_JNTSPH,
|
||||
},
|
||||
1,
|
||||
sJntSphItemsInit,
|
||||
sJntSphElementsInit,
|
||||
};
|
||||
|
||||
extern Gfx D_06000340[];
|
||||
|
@ -97,7 +125,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->flags &= ~1;
|
||||
EnBombf_SetupAction(this, EnBombf_Move);
|
||||
} else {
|
||||
thisx->colChkInfo.mass = 0xFF;
|
||||
thisx->colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->bumpOn = true;
|
||||
this->flowerBombScale = 1.0f;
|
||||
EnBombf_SetupGrowBomb(this, thisx->params);
|
||||
|
@ -131,7 +159,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
|
|||
(EnBombf*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BOMBF, this->actor.posRot.pos.x,
|
||||
this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 0);
|
||||
if (bombFlower != NULL) {
|
||||
func_8002F5C4(&this->actor, bombFlower, globalCtx);
|
||||
func_8002F5C4(&this->actor, &bombFlower->actor, globalCtx);
|
||||
this->timer = 180;
|
||||
this->flowerBombScale = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_PL_PULL_UP_ROCK);
|
||||
|
@ -143,8 +171,8 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) {
|
|||
this->actor.parent = NULL;
|
||||
player->stateFlags1 &= ~0x800;
|
||||
}
|
||||
} else if (this->bombCollider.base.acFlags & 2) {
|
||||
this->bombCollider.base.acFlags &= ~2;
|
||||
} else if (this->bombCollider.base.acFlags & AC_HIT) {
|
||||
this->bombCollider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if (this->bombCollider.base.ac->type != ACTORTYPE_BOSS) {
|
||||
bombFlower =
|
||||
|
@ -239,13 +267,14 @@ void EnBombf_WaitForRelease(EnBombf* this, GlobalContext* globalCtx) {
|
|||
void EnBombf_Explode(EnBombf* this, GlobalContext* globalCtx) {
|
||||
Player* player;
|
||||
|
||||
if (this->explosionCollider.list->dim.modelSphere.radius == 0) {
|
||||
if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) {
|
||||
this->actor.flags |= 0x20;
|
||||
func_800AA000(this->actor.xzDistToLink, 0xFF, 0x14, 0x96);
|
||||
}
|
||||
|
||||
this->explosionCollider.list->dim.modelSphere.radius += 8;
|
||||
this->explosionCollider.list->dim.worldSphere.radius = this->explosionCollider.list->dim.modelSphere.radius;
|
||||
this->explosionCollider.elements[0].dim.modelSphere.radius += 8;
|
||||
this->explosionCollider.elements[0].dim.worldSphere.radius =
|
||||
this->explosionCollider.elements[0].dim.modelSphere.radius;
|
||||
|
||||
if (this->actor.params == BOMBFLOWER_EXPLOSION) {
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->explosionCollider.base);
|
||||
|
@ -342,8 +371,8 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->bgCheckFlags &= ~8;
|
||||
}
|
||||
|
||||
if ((this->bombCollider.base.acFlags & 2) ||
|
||||
((this->bombCollider.base.maskA & 2) && (this->bombCollider.base.oc->type == ACTORTYPE_ENEMY))) {
|
||||
if ((this->bombCollider.base.acFlags & AC_HIT) ||
|
||||
((this->bombCollider.base.ocFlags1 & OC1_HIT) && (this->bombCollider.base.oc->type == ACTORTYPE_ENEMY))) {
|
||||
this->unk_200 = 1;
|
||||
this->timer = 0;
|
||||
} else {
|
||||
|
@ -416,7 +445,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (thisx->params <= BOMBFLOWER_BODY) {
|
||||
|
||||
Collider_CylinderUpdate(thisx, &this->bombCollider);
|
||||
Collider_UpdateCylinder(thisx, &this->bombCollider);
|
||||
|
||||
if ((this->flowerBombScale >= 1.0f) && (this->bumpOn)) {
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bombCollider.base);
|
||||
|
@ -482,7 +511,7 @@ void EnBombf_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SEGMENTED_TO_VIRTUAL(EnBombf_NewMtxDList(globalCtx->state.gfxCtx, globalCtx)));
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06000408);
|
||||
} else {
|
||||
func_800628A4(0, &this->explosionCollider);
|
||||
Collider_UpdateSpheres(0, &this->explosionCollider);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bombf.c", 1063);
|
||||
|
|
|
@ -12,7 +12,7 @@ typedef struct EnBombf {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderCylinder bombCollider;
|
||||
/* 0x0198 */ ColliderJntSph explosionCollider;
|
||||
/* 0x01B8 */ ColliderJntSphItem explosionColliderItems[1];
|
||||
/* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1];
|
||||
/* 0x01F8 */ s16 timer;
|
||||
/* 0x01FC */ EnBombfActionFunc actionFunc;
|
||||
/* 0x0200 */ s32 unk_200;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue