1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +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 account linked to committer's email address
487 changed files with 14371 additions and 4713 deletions

View file

@ -25,8 +25,22 @@ const ActorInit Arms_Hook_InitVars = {
};
ColliderQuadInit sQuadInit = {
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x08, COLSHAPE_QUAD },
{ 0x02, { 0x00000080, 0x00, 0x01 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x05, 0x00, 0x00 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_PLAYER,
AC_NONE,
OC1_NONE,
OC2_TYPE_PLAYER,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK2,
{ 0x00000080, 0x00, 0x01 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ 0 },
};
@ -161,10 +175,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
ArmsHook_CheckForCancel(this);
if (this->timer != 0) {
if ((this->collider.base.atFlags & 2) && (this->collider.body.atHitItem->flags != 4)) {
if ((this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
if (this->collider.body.atHitItem->bumperFlags & 4) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & 0x400) == 0x400) {
func_80865044(this);
@ -278,7 +292,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
&D_801333E0, &D_801333E8);
return;
}
func_80062D60(globalCtx, &this->actor.posRot.pos);
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.posRot.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
return;