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
|
@ -35,18 +35,26 @@ const ActorInit En_Dog_InitVars = {
|
|||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_UNK6, 0x00, 0x09, 0x39, 0x10, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{
|
||||
COLTYPE_HIT6,
|
||||
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,
|
||||
},
|
||||
{ 16, 20, 0, { 0 } },
|
||||
};
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = {
|
||||
0x00, // health
|
||||
0x0000, // unk_10
|
||||
0x0000, // unk_12
|
||||
0x0000, // unk_14
|
||||
0x32, // mass
|
||||
};
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, 50 };
|
||||
|
||||
static struct_80034EC0_Entry sAnimations[] = {
|
||||
{ 0x06001368, 1.0f, 0.0f, -1.0f, 0x00, 0.0f }, { 0x06001368, 1.0f, 0.0f, -1.0f, 0x00, -6.0f },
|
||||
|
@ -157,8 +165,8 @@ s32 EnDog_PlayAnimAndSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
s8 EnDog_CanFollow(EnDog* this, GlobalContext* globalCtx) {
|
||||
if (this->collider.base.acFlags & 2) {
|
||||
this->collider.base.acFlags &= ~2;
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -166,8 +174,8 @@ s8 EnDog_CanFollow(EnDog* this, GlobalContext* globalCtx) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (this->collider.base.maskB & 1) {
|
||||
this->collider.base.maskB &= ~1;
|
||||
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
|
||||
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
|
||||
if (gSaveContext.dogParams != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -241,7 +249,7 @@ void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
func_80061EFC(&this->actor.colChkInfo, 0, &sColChkInfoInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, 0, &sColChkInfoInit);
|
||||
Actor_SetScale(&this->actor, 0.0075f);
|
||||
this->waypoint = 0;
|
||||
this->actor.gravity = -1.0f;
|
||||
|
@ -437,8 +445,8 @@ void EnDog_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_8002E4B4(globalCtx, &this->actor, this->collider.dim.radius, this->collider.dim.height * 0.5f, 0.0f, 5);
|
||||
Actor_MoveForward(&this->actor);
|
||||
this->actionFunc(this, globalCtx);
|
||||
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);
|
||||
}
|
||||
|
||||
s32 EnDog_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue