mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 14:20:11 +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
|
@ -38,17 +38,62 @@ const ActorInit En_Gs_InitVars = {
|
|||
(ActorFunc)EnGs_Draw,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit D_80A4FDA0 = {
|
||||
{ COLTYPE_UNK12, 0x00, 0x0D, 0x39, 0x20, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_HARD,
|
||||
AT_NONE,
|
||||
AC_ON | AC_HARD | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_2,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 21, 48, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static CollisionCheckInfoInit2 D_80A4FDCC = { 0, 0, 0, 0, 0xFF };
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0,
|
||||
0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(0, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(0, 0xE),
|
||||
/* Explosive */ DMG_ENTRY(0, 0xC),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0xE),
|
||||
/* Normal arrow */ DMG_ENTRY(0, 0xE),
|
||||
/* Hammer swing */ DMG_ENTRY(0, 0xD),
|
||||
/* Hookshot */ DMG_ENTRY(0, 0xE),
|
||||
/* Kokiri sword */ DMG_ENTRY(0, 0xF),
|
||||
/* Master sword */ DMG_ENTRY(0, 0xF),
|
||||
/* Giant's Knife */ DMG_ENTRY(0, 0xF),
|
||||
/* Fire arrow */ DMG_ENTRY(0, 0xB),
|
||||
/* Ice arrow */ DMG_ENTRY(0, 0xB),
|
||||
/* Light arrow */ DMG_ENTRY(0, 0xB),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0, 0xB),
|
||||
/* Ice magic */ DMG_ENTRY(0, 0xB),
|
||||
/* Light magic */ DMG_ENTRY(0, 0xB),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
|
@ -58,9 +103,9 @@ void EnGs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGs* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
Collider_InitCylinder(globalCtx, &this->unk_14C);
|
||||
Collider_SetCylinder(globalCtx, &this->unk_14C, thisx, &D_80A4FDA0);
|
||||
func_80061EFC(&thisx->colChkInfo, &D_80A4FDD8, &D_80A4FDCC);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
thisx->unk_1F = 6;
|
||||
this->unk_1D8 = thisx->posRot.pos;
|
||||
|
@ -481,9 +526,9 @@ void EnGs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (globalCtx) {};
|
||||
if (!(this->unk_19E & 0x10)) {
|
||||
if (globalCtx) {};
|
||||
if (this->unk_14C.base.acFlags & 2) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->unk_19F = 0;
|
||||
this->unk_14C.base.acFlags &= ~2;
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
switch (this->actor.colChkInfo.damageEffect) {
|
||||
case 15:
|
||||
|
@ -513,9 +558,9 @@ void EnGs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
Collider_CylinderUpdate(&this->actor, &this->unk_14C);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->unk_14C.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->unk_14C.base);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_80A4E648(this, globalCtx);
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef void (*EnGsActionFunc)(struct EnGs*, GlobalContext*);
|
|||
|
||||
typedef struct EnGs {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderCylinder unk_14C;
|
||||
/* 0x014C */ ColliderCylinder collider;
|
||||
/* 0x0198 */ EnGsActionFunc actionFunc;
|
||||
/* 0x019C */ u8 unk_19C;
|
||||
/* 0x019D */ u8 unk_19D;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue