From aabad79e4673506d5f57c5f6f05941ccf502e416 Mon Sep 17 00:00:00 2001 From: thecozies <79979276+thecozies@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:54:03 -0500 Subject: [PATCH] removed denorm col tri in wdw (#631) --- levels/wdw/areas/1/collision.inc.c | 5 +++-- src/engine/surface_load.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/levels/wdw/areas/1/collision.inc.c b/levels/wdw/areas/1/collision.inc.c index b4901bc7..36b06e9c 100644 --- a/levels/wdw/areas/1/collision.inc.c +++ b/levels/wdw/areas/1/collision.inc.c @@ -508,7 +508,7 @@ const Collision wdw_seg7_area_1_collision[] = { COL_VERTEX(-3839, 1300, 1249), COL_VERTEX(3103, 1428, 3681), COL_VERTEX(3681, 1428, 3681), - COL_TRI_INIT(SURFACE_DEFAULT, 583), + COL_TRI_INIT(SURFACE_DEFAULT, 582), COL_TRI(161, 193, 194), COL_TRI(165, 195, 193), COL_TRI(165, 193, 161), @@ -784,7 +784,8 @@ const Collision wdw_seg7_area_1_collision[] = { COL_TRI(288, 320, 445), COL_TRI(288, 59, 62), COL_TRI(286, 320, 288), - COL_TRI(190, 189, 192), + // HackerSM64: denorm removed + // COL_TRI(190, 189, 192), COL_TRI(289, 188, 190), COL_TRI(290, 291, 451), COL_TRI(291, 447, 144), diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index b148f058..8f2e31a6 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -14,6 +14,7 @@ #include "game/object_list_processor.h" #include "surface_load.h" #include "game/puppyprint.h" +#include "game/debug.h" #include "config.h" @@ -273,6 +274,7 @@ static struct Surface *read_surface_data(TerrainData *vertexData, TerrainData ** f32 mag = (sqr(n[0]) + sqr(n[1]) + sqr(n[2])); // This will never need to be run for custom levels because Fast64 does this step before exporting. + // assert(mag >= NEAR_ZERO, "Denorm tri was found."); #ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS if (mag < NEAR_ZERO) { return NULL;