mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_NONE;
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
|
|
|
@ -790,7 +790,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
|||
case CS_DEST_CHAMBER_OF_SAGES_FOREST_MEDALLION:
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
|
||||
|
@ -799,14 +799,14 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
|||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
Item_Give(play, ITEM_MEDALLION_FIRE);
|
||||
gSaveContext.chamberCutsceneNum = 1;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FIRE;
|
||||
break;
|
||||
|
||||
case CS_DEST_CHAMBER_OF_SAGES_WATER_MEDALLION:
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.chamberCutsceneNum = 2;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_WATER;
|
||||
break;
|
||||
|
||||
case CS_DEST_HYRULE_FIELD_FLASHBACK:
|
||||
|
|
|
@ -1378,7 +1378,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 2266);
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (play->csCtx.state != CS_STATE_IDLE) {
|
||||
Math_SmoothStepToF(&play->envCtx.sunPos.x,
|
||||
-(Math_SinS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f, 1.0f,
|
||||
0.8f, 0.8f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue