1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 17:00:19 +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:
petrie911 2021-01-17 20:13:36 -06:00 committed by GitHub
parent f786f958bb
commit 02994f5339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
487 changed files with 14371 additions and 4713 deletions

View file

@ -30,9 +30,23 @@ const ActorInit En_Boom_InitVars = {
};
static ColliderQuadInit sQuadInit = {
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x08, COLSHAPE_QUAD },
{ 0x02, { 0x00000010, 0x00, 0x01 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x05, 0x00, 0x00 },
{ 0 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_PLAYER,
AC_NONE,
OC1_NONE,
OC2_TYPE_PLAYER,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK2,
{ 0x00000010, 0x00, 0x01 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
static InitChainEntry sInitChain[] = {
@ -142,8 +156,8 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
func_8002F974(this, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
// If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up
collided = this->collider.base.atFlags & 0x2;
collided = !!collided;
collided = this->collider.base.atFlags & AT_HIT;
collided = !!(collided);
if (collided) {
if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) {
this->grabbed = this->collider.base.at;
@ -179,8 +193,8 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
}
} else {
collided = this->collider.base.atFlags & 0x2;
collided = !!collided;
collided = (this->collider.base.atFlags & AT_HIT);
collided = (!!(collided));
if (collided) {
// Copy the position from the prevous frame to the boomerang to start the bounce back.
Math_Vec3f_Copy(&this->actor.posRot.pos, &this->actor.pos4);
@ -198,7 +212,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
hitActor->id == ACTOR_BG_BDAN_OBJECTS && hitActor->params == 0)) {
collided = false;
} else {
func_80062D60(globalCtx, &hitPoint);
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &hitPoint);
}
}
}