From c2265a1e228f22fc9851c9f9200aac3679cb247b Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Wed, 17 Apr 2024 09:02:36 -0400 Subject: [PATCH] Revert "Remove explicit truth tests" This reverts commit d169349bd61294e3cf4d645ac59244b48fb95867. --- LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp | 2 +- LEGO1/lego/sources/misc/legocontainer.cpp | 2 +- LEGO1/lego/sources/roi/legolod.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index 3274e997..8f88d5d5 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -66,7 +66,7 @@ MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxP m_event.SetKey(p_param.GetKey()); if (p_param.GetType() == c_notificationButtonUp) { - if (m_unk0x10) { + if (m_unk0x10 == TRUE) { m_unk0x10 = FALSE; return TRUE; } diff --git a/LEGO1/lego/sources/misc/legocontainer.cpp b/LEGO1/lego/sources/misc/legocontainer.cpp index 272ebd4d..0238794c 100644 --- a/LEGO1/lego/sources/misc/legocontainer.cpp +++ b/LEGO1/lego/sources/misc/legocontainer.cpp @@ -125,7 +125,7 @@ void LegoTextureContainer::EraseFromList(LegoTextureInfo* p_textureInfo) if ((*it).first == p_textureInfo) { (*it).second = FALSE; - if (p_textureInfo->m_texture->Release()) { + if (p_textureInfo->m_texture->Release() == TRUE) { delete p_textureInfo; m_list.erase(it); } diff --git a/LEGO1/lego/sources/roi/legolod.cpp b/LEGO1/lego/sources/roi/legolod.cpp index 8bfb7a3f..e9997907 100644 --- a/LEGO1/lego/sources/roi/legolod.cpp +++ b/LEGO1/lego/sources/roi/legolod.cpp @@ -367,7 +367,7 @@ LegoResult LegoLOD::GetTexture(LegoTextureInfo*& p_textureInfo) { for (LegoU32 i = m_unk0x1c; i < m_numMeshes; i++) { if (m_melems[i].m_unk0x04) { - if (LegoTextureInfo::GetGroupTexture(m_melems[i].m_tglMesh, p_textureInfo)) { + if (LegoTextureInfo::GetGroupTexture(m_melems[i].m_tglMesh, p_textureInfo) == TRUE) { return SUCCESS; } }