From 7f19f8310af50dc11577831519d937963acacce6 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 10 Feb 2010 21:23:28 -0600 Subject: [PATCH] Okay so Glenn decided to revert some Frieza code. I'm not going to remove everything Glenn did, as there was some useful code. However, the ones I agreed with were: 75d5b63 "if a Noteskin fails to be loaded by the time the notes need to be displayed, attempt to force the default theme on and throw errors in to the log rather than crashing SM." Glenn: There was no indication in the commit of when this was actually happening; this is unnecessary logic that will do nothing but hide bugs. AJ: Based on some of the other code I've seen in the StepMania codebase, I'd say having this code in GetMetric isn't a good idea. There's an assert for checking if the noteskin isn't empty. That should suffice. e27e971 "Adds metric options to flash the lifebar when a note is hit" AJ: There are many possible ways of doing this without having to add a new metric. The most extreme example is to code your own life bar and mess with JudgmentMessageCommand. I'm not sure if StreamDisplay would respond to the message or not, but there are multiple ways of getting at the Stream. (ultralight, to be released, contains an example) --- src/LifeMeterBar.cpp | 8 -------- src/LifeMeterBar.h | 3 --- src/NoteSkinManager.cpp | 15 --------------- 3 files changed, 26 deletions(-) diff --git a/src/LifeMeterBar.cpp b/src/LifeMeterBar.cpp index aae025e737..c4e720cb9f 100644 --- a/src/LifeMeterBar.cpp +++ b/src/LifeMeterBar.cpp @@ -27,12 +27,8 @@ LifeMeterBar::LifeMeterBar() MIN_STAY_ALIVE.Load ("LifeMeterBar","MinStayAlive"); m_fLifePercentChange.Load( "LifeMeterBar", LIFE_PERCENT_CHANGE_NAME, NUM_ScoreEvent ); - FLASH_HOT_ON_NOTE_HIT.Load("LifeMeterBar","FlashHotOnNoteHit"); - MIN_SCORE_TO_FLASH.Load("LifeMeterBar","MinScoreToFlash"); - m_pPlayerState = NULL; - switch( GAMESTATE->m_SongOptions.GetStage().m_DrainType ) { case SongOptions::DRAIN_NORMAL: @@ -130,10 +126,6 @@ void LifeMeterBar::ChangeLife( TapNoteScore score ) case TNS_CheckpointMiss:fDeltaLife = m_fLifePercentChange.GetValue(SE_CheckpointMiss); break; } - if(FLASH_HOT_ON_NOTE_HIT) - if(score >= MIN_SCORE_TO_FLASH) - m_fHotAlpha = 1.0f; // flash the hot temporarily - if( IsHot() && fDeltaLife < 0 ) fDeltaLife = min( fDeltaLife, -0.10f ); // make it take a while to get back to "hot" diff --git a/src/LifeMeterBar.h b/src/LifeMeterBar.h index bdfcdad50f..acac433875 100644 --- a/src/LifeMeterBar.h +++ b/src/LifeMeterBar.h @@ -59,9 +59,6 @@ private: int m_iMissCombo; // current number of progressive W5/miss int m_iComboToRegainLife; // combo needed before lifebar starts filling up after fail - - ThemeMetric MIN_SCORE_TO_FLASH; - ThemeMetric FLASH_HOT_ON_NOTE_HIT; }; #endif diff --git a/src/NoteSkinManager.cpp b/src/NoteSkinManager.cpp index 24088c8d8f..309f558df0 100644 --- a/src/NoteSkinManager.cpp +++ b/src/NoteSkinManager.cpp @@ -242,21 +242,6 @@ void NoteSkinManager::GetAllNoteSkinNamesForGame( const Game *pGame, vectorWarn("A noteskin was not loaded before NoteSkinManager::GetMetric() so the default noteskin was forced."); - } - else - { - LOG->Warn("A noteskin was not loaded before NoteSkinManager::GetMetric() and none could be loaded."); - } - } - ASSERT( !m_sCurrentNoteSkin.empty() ); RString sNoteSkinName = m_sCurrentNoteSkin; sNoteSkinName.MakeLower();