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

@ -49,13 +49,26 @@ const ActorInit En_Nwc_InitVars = {
(ActorFunc)EnNwc_Draw,
};
static ColliderJntSphItemInit sJntSphElementInit = {
{ 0x01, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
static ColliderJntSphElementInit sJntSphElementInit = {
{
ELEMTYPE_UNK1,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 10 }, 100 },
};
static ColliderJntSphInit_Set3 sJntSphInit = {
{ COLTYPE_UNK3, 0x00, 0x09, 0x39, COLSHAPE_JNTSPH },
static ColliderJntSphInitType1 sJntSphInit = {
{
COLTYPE_HIT3,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
COLSHAPE_JNTSPH,
},
16,
NULL,
};
@ -105,7 +118,7 @@ void EnNwc_ChickFall(EnNwcChick* chick, EnNwc* this, GlobalContext* globalCtx) {
void EnNwc_UpdateChicks(EnNwc* this, GlobalContext* globalCtx) {
static EnNwcChickFunc chickActionFuncs[] = { EnNwc_ChickNoop, EnNwc_ChickFall };
EnNwcChick* chick = this->chicks;
ColliderJntSphItem* element = this->collider.list;
ColliderJntSphElement* element = this->collider.elements;
Vec3f prevChickPos;
s32 i;
f32 test;
@ -198,18 +211,18 @@ void EnNwc_DrawChicks(EnNwc* this, GlobalContext* globalCtx) {
void EnNwc_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnNwc* this = THIS;
ColliderJntSphItemInit elementInits[16];
ColliderJntSphItemInit* element;
ColliderJntSphElementInit elementInits[16];
ColliderJntSphElementInit* element;
EnNwcChick* chick;
s32 i;
element = sJntSphInit.list = elementInits;
element = sJntSphInit.elements = elementInits;
for (i = 0; i < 16; i++, element++) {
*element = sJntSphElementInit;
}
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph_Set3(globalCtx, &this->collider, &this->actor, &sJntSphInit);
Collider_SetJntSphAllocType1(globalCtx, &this->collider, &this->actor, &sJntSphInit);
this->count = 16;
chick = this->chicks;
for (i = 0; i < this->count; i++, chick++) {