1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 22:30:15 +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

@ -42,9 +42,22 @@ const ActorInit En_Gm_InitVars = {
NULL,
};
static ColliderCylinderInit_Set3 sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x00, 0x39, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
static ColliderCylinderInitType1 sCylinderInit = {
{
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 100, 120, 0, { 0, 0, 0 } },
};
@ -101,10 +114,10 @@ void func_80A3D838(EnGm* this, GlobalContext* globalCtx) {
0.0f);
this->actor.draw = EnGm_Draw;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &sCylinderInit);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 35.0f);
Actor_SetScale(&this->actor, 0.05f);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->eyeTexIndex = 0;
this->blinkTimer = 20;
this->actor.textId = 0x3049;
@ -167,8 +180,8 @@ void func_80A3DB04(EnGm* this, GlobalContext* globalCtx) {
this->actionFunc = func_80A3DC44;
} else if (func_8002F194(&this->actor, globalCtx)) {
this->actionFunc = func_80A3DBF4;
} else if ((this->collider.base.maskA & 2) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) {
this->collider.base.acFlags &= ~2;
} else if ((this->collider.base.ocFlags1 & OC1_HIT) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) {
this->collider.base.acFlags &= ~AC_HIT;
func_8002F2CC(&this->actor, globalCtx, 415.0f);
}
}
@ -207,8 +220,8 @@ void func_80A3DC44(EnGm* this, GlobalContext* globalCtx) {
this->actionFunc = EnGm_ProcessChoiceIndex;
}
if ((this->collider.base.maskA & 2) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) {
this->collider.base.acFlags &= ~2;
if ((this->collider.base.ocFlags1 & OC1_HIT) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) {
this->collider.base.acFlags &= ~AC_HIT;
func_8002F2CC(&this->actor, globalCtx, 415.0f);
}
}