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
|
@ -46,22 +46,50 @@ const ActorInit Mir_Ray_InitVars = {
|
|||
u8 D_80B8E670 = 0;
|
||||
|
||||
static ColliderQuadInit sQuadInit = {
|
||||
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x00, COLSHAPE_QUAD },
|
||||
{ 0x00, { 0x00200000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_ON | AT_TYPE_PLAYER,
|
||||
AC_NONE,
|
||||
OC1_NONE,
|
||||
OC2_NONE,
|
||||
COLSHAPE_QUAD,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00200000, 0x00, 0x00 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_NONE,
|
||||
OCELEM_NONE,
|
||||
},
|
||||
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
|
||||
};
|
||||
|
||||
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
|
||||
{
|
||||
{ 0x00, { 0x00200000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00200000, 0x00, 0x00 },
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_NONE,
|
||||
OCELEM_NONE,
|
||||
},
|
||||
{ 0, { { 0, 0, 0 }, 50 }, 100 },
|
||||
},
|
||||
};
|
||||
|
||||
static ColliderJntSphInit sJntSphInit = {
|
||||
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x00, COLSHAPE_JNTSPH },
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_ON | AT_TYPE_PLAYER,
|
||||
AC_NONE,
|
||||
OC1_NONE,
|
||||
OC2_NONE,
|
||||
COLSHAPE_JNTSPH,
|
||||
},
|
||||
1,
|
||||
sJntSphItemsInit,
|
||||
sJntSphElementsInit,
|
||||
};
|
||||
|
||||
static MirRayDataEntry sMirRayData[] = {
|
||||
|
@ -89,16 +117,15 @@ extern Gfx D_06000C50[];
|
|||
|
||||
void MirRay_SetupCollider(MirRay* this) {
|
||||
Vec3f colliderOffset;
|
||||
MirRayDataEntry* dataEntry;
|
||||
MirRayDataEntry* dataEntry = &sMirRayData[this->actor.params];
|
||||
|
||||
dataEntry = &sMirRayData[this->actor.params];
|
||||
colliderOffset.x = (this->poolPt.x - this->sourcePt.x) * dataEntry->unk_10;
|
||||
colliderOffset.y = (this->poolPt.y - this->sourcePt.y) * dataEntry->unk_10;
|
||||
colliderOffset.z = (this->poolPt.z - this->sourcePt.z) * dataEntry->unk_10;
|
||||
this->colliderSph.list->dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x;
|
||||
this->colliderSph.list->dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y;
|
||||
this->colliderSph.list->dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z;
|
||||
this->colliderSph.list->dim.worldSphere.radius = dataEntry->unk_14 * this->colliderSph.list->dim.scale;
|
||||
this->colliderSph.elements[0].dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x;
|
||||
this->colliderSph.elements[0].dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y;
|
||||
this->colliderSph.elements[0].dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z;
|
||||
this->colliderSph.elements[0].dim.worldSphere.radius = dataEntry->unk_14 * this->colliderSph.elements->dim.scale;
|
||||
}
|
||||
|
||||
// Set up a light point between source point and reflection point. Reflection point is the pool point (for windows) or
|
||||
|
@ -381,7 +408,7 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe
|
|||
vecC.y = vecD.y + (shieldMtx->xy * 300.0f);
|
||||
vecC.z = vecD.z + (shieldMtx->xz * 300.0f);
|
||||
|
||||
func_80062734(&this->shieldRay, &vecA, &vecB, &vecC, &vecD);
|
||||
Collider_SetQuadVertices(&this->shieldRay, &vecA, &vecB, &vecC, &vecD);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
currentReflection = &reflection[i];
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef struct {
|
|||
typedef struct MirRay {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderJntSph colliderSph;
|
||||
/* 0x016C */ ColliderJntSphItem colliderSphItem;
|
||||
/* 0x016C */ ColliderJntSphElement colliderSphItem;
|
||||
/* 0x01AC */ ColliderQuad shieldRay;
|
||||
/* 0x022C */ f32 reflectIntensity; // Reflection occurs if it is positive, brightness depends on it
|
||||
/* 0x0230 */ Vec3f shieldCorners[6];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue