mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 07:20: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:
parent
f786f958bb
commit
02994f5339
487 changed files with 14371 additions and 4713 deletions
|
@ -53,27 +53,66 @@ const ActorInit En_Wallmas_InitVars = {
|
|||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_UNK0, 0x00, 0x09, 0x39, 0x10, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{
|
||||
COLTYPE_HIT0,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 30, 40, 0, { 0 } },
|
||||
};
|
||||
|
||||
static CollisionCheckInfoInit sColChkInfoInit = {
|
||||
0x04,
|
||||
0x001E,
|
||||
0x0028,
|
||||
0x96,
|
||||
};
|
||||
static CollisionCheckInfoInit sColChkInfoInit = { 4, 30, 40, 150 };
|
||||
|
||||
static DamageTable sDamageTable = {
|
||||
0x10, 0x02, 0x01, 0x02, 0x10, 0x02, 0x02, 0x10, 0x01, 0x02, 0x04, 0x24, 0x02, 0x44, 0x04, 0x02,
|
||||
0x02, 0x24, 0x00, 0x44, 0x00, 0x00, 0x01, 0x04, 0x02, 0x02, 0x08, 0x04, 0x00, 0x00, 0x04, 0x00,
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x1),
|
||||
/* Deku stick */ DMG_ENTRY(2, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(1, 0x0),
|
||||
/* Explosive */ DMG_ENTRY(2, 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0x1),
|
||||
/* Normal arrow */ DMG_ENTRY(2, 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(2, 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(0, 0x1),
|
||||
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
|
||||
/* Master sword */ DMG_ENTRY(2, 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(4, 0x2),
|
||||
/* Ice arrow */ DMG_ENTRY(2, 0x0),
|
||||
/* Light arrow */ DMG_ENTRY(4, 0x4),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(4, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(2, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(2, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(4, 0x2),
|
||||
/* Ice magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Light magic */ DMG_ENTRY(4, 0x4),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(4, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(2, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(8, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(4, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(4, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 0x30, 1),
|
||||
ICHAIN_F32(unk_4C, 0x157C, 1),
|
||||
ICHAIN_F32_DIV1000(gravity, 0xFA24, 0),
|
||||
ICHAIN_F32_DIV1000(gravity, -1500, 0),
|
||||
};
|
||||
|
||||
extern AnimationHeader D_06000EA4;
|
||||
|
@ -97,7 +136,7 @@ void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
|
||||
func_80061ED4(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
this->switchFlag = (u8)(thisx->params >> 0x8);
|
||||
thisx->params = thisx->params & 0xFF;
|
||||
|
||||
|
@ -193,7 +232,7 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
|
|||
|
||||
void EnWallmas_SetupTakeDamage(EnWallmas* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000590, -3.0f);
|
||||
if ((this->collider.body.acHitItem->toucher.flags & 0x1F824) != 0) {
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x0001F824) {
|
||||
this->actor.posRot.rot.y = this->collider.base.ac->posRot.rot.y;
|
||||
} else {
|
||||
this->actor.posRot.rot.y = func_8002DA78(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
|
@ -474,9 +513,9 @@ void EnWallmas_Stun(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnWallmas_ColUpdate(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
if ((this->collider.base.acFlags & 2) != 0) {
|
||||
this->collider.base.acFlags &= ~2;
|
||||
func_80035650(&this->actor, &this->collider.body, 1);
|
||||
if ((this->collider.base.acFlags & AC_HIT) != 0) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
func_80035650(&this->actor, &this->collider.info, 1);
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
func_80032C7C(globalCtx, &this->actor);
|
||||
|
@ -529,12 +568,12 @@ void EnWallmas_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((this->actionFunc != EnWallmas_Die) && (this->actionFunc != EnWallmas_Drop)) {
|
||||
Collider_CylinderUpdate(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
||||
if ((this->actionFunc != EnWallmas_TakeDamage) && (this->actor.bgCheckFlags & 1) != 0 &&
|
||||
(this->actor.freezeTimer == 0)) {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue