mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 20:35:13 +00:00
Minor Misc Cleanup 3 (#1502)
* more misc cleanup * remove z64 conflicts * undo ISVDbg
This commit is contained in:
parent
54638f9768
commit
0ce0313342
27 changed files with 155 additions and 151 deletions
|
@ -2880,21 +2880,25 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
|
|||
if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) &&
|
||||
(BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) {
|
||||
s32 pi;
|
||||
|
||||
for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->numPolygons; pi++) {
|
||||
CollisionPoly* poly = &dyna->polyList[pi];
|
||||
s16 normalY = poly->normal.y;
|
||||
|
||||
if (normalY > COLPOLY_SNORMAL(0.5f)) {
|
||||
s16 polyIndex = pi;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyIndex);
|
||||
} else if (normalY < COLPOLY_SNORMAL(-0.8f)) {
|
||||
if (!(dyna->bgActorFlags[bgId] & BGACTOR_CEILING_COLLISION_DISABLED)) {
|
||||
s16 polyIndex = pi;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling,
|
||||
&polyIndex);
|
||||
}
|
||||
} else {
|
||||
s16 polyIndex = pi;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.wall, &polyIndex);
|
||||
}
|
||||
}
|
||||
|
@ -2914,6 +2918,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
|
|||
for (i = 0; i < pbgdata->numVertices; i++) {
|
||||
Vec3f vtx;
|
||||
Vec3f vtxT; // Vtx after mtx transform
|
||||
|
||||
Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&mtx, &vtx, &vtxT);
|
||||
BgCheck_Vec3fToVec3s(&dyna->vtxList[*vtxStartIndex + i], &vtxT);
|
||||
|
@ -2936,7 +2941,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
|
|||
sphere->center.x = newCenterPoint.x;
|
||||
sphere->center.y = newCenterPoint.y;
|
||||
sphere->center.z = newCenterPoint.z;
|
||||
newRadiusSq = -100.0f;
|
||||
newRadiusSq = -SQ(10.0f);
|
||||
|
||||
for (i = 0; i < pbgdata->numVertices; i++) {
|
||||
f32 radiusSq;
|
||||
|
@ -2989,12 +2994,15 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
|
|||
newPoly->dist = -DOTXYZ(newNormal, dVtxList[(u32)COLPOLY_VTX_INDEX(newPoly->flags_vIA)]);
|
||||
if (newNormal.y > 0.5f) {
|
||||
s16 polyId = *polyStartIndex + i;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyId);
|
||||
} else if (newNormal.y < -0.8f) {
|
||||
s16 polyId = *polyStartIndex + i;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling, &polyId);
|
||||
} else {
|
||||
s16 polyId = *polyStartIndex + i;
|
||||
|
||||
DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.wall, &polyId);
|
||||
}
|
||||
}
|
||||
|
@ -3013,7 +3021,7 @@ void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna,
|
|||
dynaActor = DynaPoly_GetActor(&play->colCtx, i);
|
||||
if (dynaActor != NULL && &dynaActor->actor == actor) {
|
||||
DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue