From f04f103136454d4b0da132579284f670ea7b2c32 Mon Sep 17 00:00:00 2001 From: jonschz Date: Fri, 24 Jan 2025 14:11:41 +0100 Subject: [PATCH] Cleanup --- LEGO1/lego/legoomni/src/worlds/historybook.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/LEGO1/lego/legoomni/src/worlds/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp index 02bb542112..cfb2fa1778 100644 --- a/LEGO1/lego/legoomni/src/worlds/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -129,11 +129,10 @@ void HistoryBook::ReadyWorld() } for (MxS32 scoreState = 0, scoreboxX = 1; scoreState < 5; scoreState++, scoreboxX += 5) { - for (MxS32 scoreBoxColumn = 0, scoreboxY = 1; scoreBoxColumn < 5; scoreBoxColumn++, scoreboxY += 5) { MxU8 color = score->m_scores[scoreState][scoreBoxColumn]; - if (color) { + if (color > 0) { for (MxS32 lax = 0; lax < 4; lax++) { #ifdef BETA10 memset(m_scores[i]->GetBitmapStart(scoreboxX, scoreboxY + lax), scoreColors[color - 1], 4); @@ -142,7 +141,11 @@ void HistoryBook::ReadyWorld() memset(NULL, scoreColors[color - 1], 4); } else { - memset(m_scores[i]->GetBitmap()->GetStart(scoreboxX, lax + scoreboxY), scoreColors[color - 1], 4); + memset( + m_scores[i]->GetBitmap()->GetStart(scoreboxX, lax + scoreboxY), + scoreColors[color - 1], + 4 + ); } #endif } @@ -153,11 +156,13 @@ void HistoryBook::ReadyWorld() m_scores[i]->Enable(TRUE); m_scores[i]->SetTickleState(MxPresenter::e_repeating); m_scores[i]->SetPosition(scoreX + 0xa1, scoreY); + #ifdef BETA10 - for (MxS16 j = 0; score->m_name.m_letters[j] != -1; j++, scoreX += 0x17) { + for (MxS16 j = 0; score->m_name.m_letters[j] != -1; j++, scoreX += 0x17) #else - for (MxS16 j = 0; j < (MxS16) sizeOfArray(m_name[0]) && score->m_name.m_letters[j] != -1; j++, scoreX += 0x17) { + for (MxS16 j = 0; j < (MxS16) sizeOfArray(m_name[0]) && score->m_name.m_letters[j] != -1; j++, scoreX += 0x17) #endif + { m_name[i][j] = m_alphabet[score->m_name.m_letters[j]]->Clone(); assert(m_name[i][j]);