From 7e360ed3caa51dd4e5aa0ced6aaea26d552e2682 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Wed, 18 Oct 2023 23:29:27 -0400 Subject: c_m2d match, add JUT_ASSERT_FLOAT --- src/SSystem/SComponent/c_m2d.cpp | 4 ++-- src/d/d_bg_s_acch.cpp | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/SSystem/SComponent/c_m2d.cpp b/src/SSystem/SComponent/c_m2d.cpp index f3fe3a90..2009fd56 100644 --- a/src/SSystem/SComponent/c_m2d.cpp +++ b/src/SSystem/SComponent/c_m2d.cpp @@ -17,7 +17,7 @@ void cM2d_CrossCirLin(cM2dGCir& circle, f32 x0, f32 y0, f32 x1, f32 y1, f32* pDs f32 c = (fVar1 * fVar1 + fVar15 * fVar15) - (circle.GetR() * circle.GetR()); f32 t; - JUT_ASSERT(0x47, c < 0.0f); + JUT_ASSERT_FLOAT(0x47, c < 0.0f); if (cM3d_IsZero(dVar13)) { if (!cM3d_IsZero(dVar14)) { @@ -48,7 +48,7 @@ void cM2d_CrossCirLin(cM2dGCir& circle, f32 x0, f32 y0, f32 x1, f32 y1, f32* pDs *pDstX = x0; *pDstY = y0; } else { - JUT_ASSERT(0x89, t >= 0.0f); + JUT_ASSERT_FLOAT(0x89, t >= 0.0f); *pDstX = x0 + (t * x1); *pDstY = y0 + (t * y1); } diff --git a/src/d/d_bg_s_acch.cpp b/src/d/d_bg_s_acch.cpp index b805379d..b08d56b3 100644 --- a/src/d/d_bg_s_acch.cpp +++ b/src/d/d_bg_s_acch.cpp @@ -208,17 +208,8 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) { SetWaterIn(); } - // JUT_ASSERT's (COND) == 0 check screws up the codegen here. Using !(COND) instead fixes it. - // JUT_ASSERT(718, m_wtr.GetHeight() >= ground.y); - // JUT_ASSERT(719, m_wtr.GetHeight() <= top); - if (!(m_wtr.GetHeight() >= ground.y)) { - JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, 718, "m_wtr.GetHeight() >= ground.y"); - OSPanic(__FILE__, 718, "Halt"); - } - if (!(m_wtr.GetHeight() <= top)) { - JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, 719, "m_wtr.GetHeight() <= top"); - OSPanic(__FILE__, 719, "Halt"); - } + JUT_ASSERT_FLOAT(718, m_wtr.GetHeight() >= ground.y); + JUT_ASSERT_FLOAT(719, m_wtr.GetHeight() <= top); } } } -- cgit v1.2.3