From 7c2a647655c6059139f9fd1bfc8bddd79d298d1d Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 15 Mar 2024 19:10:19 -0400 Subject: [PATCH] code style --- LEGO1/lego/legoomni/include/hospital.h | 4 +-- LEGO1/lego/legoomni/src/worlds/hospital.cpp | 34 ++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/LEGO1/lego/legoomni/include/hospital.h b/LEGO1/lego/legoomni/include/hospital.h index 7717bf6d..b773aace 100644 --- a/LEGO1/lego/legoomni/include/hospital.h +++ b/LEGO1/lego/legoomni/include/hospital.h @@ -55,8 +55,8 @@ class Hospital : public LegoWorld { MxStillPresenter* m_unk0x110; // 0x110 MxStillPresenter* m_unk0x114; // 0x114 undefined m_unk0x118; // 0x118 - undefined4 m_unk0x11c; // 0x11c - undefined4 m_unk0x120; // 0x120 + MxLong m_unk0x11c; // 0x11c + MxLong m_unk0x120; // 0x120 undefined m_unk0x124[4]; // 0x124 undefined m_unk0x128; // 0x128 }; diff --git a/LEGO1/lego/legoomni/src/worlds/hospital.cpp b/LEGO1/lego/legoomni/src/worlds/hospital.cpp index 66ca8e83..30a92284 100644 --- a/LEGO1/lego/legoomni/src/worlds/hospital.cpp +++ b/LEGO1/lego/legoomni/src/worlds/hospital.cpp @@ -181,27 +181,27 @@ MxResult Hospital::Tickle() LegoWorld::Tickle(); return SUCCESS; } - else { - if (g_unk0x100f7918 != 0) { - g_unk0x100f7918 -= 1; + + if (g_unk0x100f7918 != 0) { + g_unk0x100f7918 -= 1; + } + + MxLong time = Timer()->GetTime(); + + if (m_unk0x118 != 0) { + if (time - m_unk0x11c > 300) { + m_unk0x11c = time; + g_unk0x100f791c = !g_unk0x100f791c; + m_unk0x110->Enable(g_unk0x100f791c); } - MxLong time = Timer()->GetTime(); - - if (m_unk0x118 != 0) { - if (300 < (MxLong) (time - m_unk0x11c)) { - m_unk0x11c = time; - g_unk0x100f791c = !g_unk0x100f791c; - m_unk0x110->Enable(g_unk0x100f791c); - } - - if (200 < (MxLong) (time - m_unk0x120)) { - m_unk0x120 = time; - g_unk0x100f7920 = !g_unk0x100f7920; - m_unk0x114->Enable(g_unk0x100f7920); - } + if (time - m_unk0x120 > 200) { + m_unk0x120 = time; + g_unk0x100f7920 = !g_unk0x100f7920; + m_unk0x114->Enable(g_unk0x100f7920); } } + return SUCCESS; }