From d77d1cc43cd82b1a7bb9a6ed5ed45666bd998d83 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 25 Feb 2003 08:07:56 +0000 Subject: [PATCH] Little() now removes HoldNotes that don't start on a beat --- stepmania/Themes/default/metrics.ini | 2 +- stepmania/src/Combo.cpp | 4 +++- stepmania/src/GrayArrow.cpp | 14 ++++++-------- stepmania/src/NoteData.cpp | 18 ++++++------------ stepmania/src/StepMania.RC | 8 ++++---- stepmania/stepmania.nsi | 2 +- 6 files changed, 21 insertions(+), 27 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 9d8f9919f2..4967e5e5b6 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -719,7 +719,7 @@ ExtraColor=0.6,0.0,0.0,1 // dark red [GrayArrow] StepZoom=0.75 -StepSeconds=0.2 +StepSeconds=0.13 [CodeDetector] Easier1=Up,Up diff --git a/stepmania/src/Combo.cpp b/stepmania/src/Combo.cpp index 4faf782eba..088e30d5b9 100644 --- a/stepmania/src/Combo.cpp +++ b/stepmania/src/Combo.cpp @@ -160,7 +160,9 @@ void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow, Inventory* pIn case TNS_MISS: { // end combo - bool bItemAcquired = pInventory->OnComboBroken( m_PlayerNumber, m_iCurCombo ); + bool bItemAcquired = false; + if( pInventory ) + bItemAcquired = pInventory->OnComboBroken( m_PlayerNumber, m_iCurCombo ); if( !bItemAcquired && m_iCurCombo>50 ) // don't play "combo stopped" if we got an item SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 ); diff --git a/stepmania/src/GrayArrow.cpp b/stepmania/src/GrayArrow.cpp index 2f9ea6fba5..865f3fea71 100644 --- a/stepmania/src/GrayArrow.cpp +++ b/stepmania/src/GrayArrow.cpp @@ -19,16 +19,14 @@ #include "RageLog.h" -#define STEP_SECONDS THEME->GetMetricF("GrayArrow","StepSeconds") -#define STEP_ZOOM THEME->GetMetricF("GrayArrow","StepZoom") - -float g_fStepSeconds, g_fStepZoom; +CachedThemeMetric GR_STEP_SECONDS ("GrayArrow","StepSeconds"); +CachedThemeMetric GR_STEP_ZOOM ("GrayArrow","StepZoom"); GrayArrow::GrayArrow() { - g_fStepSeconds = STEP_SECONDS; - g_fStepZoom = STEP_ZOOM; + GR_STEP_SECONDS.Refresh(); + GR_STEP_ZOOM.Refresh(); StopAnimating(); } @@ -72,8 +70,8 @@ void GrayArrow::Update( float fDeltaTime ) void GrayArrow::Step() { - SetZoom( g_fStepZoom ); + SetZoom( GR_STEP_ZOOM ); StopTweening(); - BeginTweening( g_fStepSeconds ); + BeginTweening( GR_STEP_SECONDS ); SetTweenZoom( 1 ); } diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 11ae14d752..51d75d326c 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -994,19 +994,13 @@ void NoteDataUtil::Little(NoteData &in) { // filter out all non-quarter notes int max_row = in.GetLastRow(); - for( int i=0; i<=max_row; i++ ) - { - if( i%ROWS_PER_BEAT != 0 ) - { - // filter out all non-quarter notes - for( int c=0; c=0; i-- ) + if( fmodf(in.GetHoldNote(i).fStartBeat,1) != 0 ) // doesn't start on a beat + in.RemoveHoldNote( i ); } void NoteDataUtil::Wide( NoteData &in ) diff --git a/stepmania/src/StepMania.RC b/stepmania/src/StepMania.RC index 8fef905491..3a84ab5872 100644 --- a/stepmania/src/StepMania.RC +++ b/stepmania/src/StepMania.RC @@ -117,15 +117,15 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION CAPTION "StepMania Error" FONT 8, "MS Sans Serif" BEGIN + DEFPUSHBUTTON "Close",IDOK,265,215,60,15 EDITTEXT IDC_EDIT_ERROR,5,80,320,130,ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP - DEFPUSHBUTTON "Close",IDOK,265,215,60,15 + PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,8,215,74,15 + PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,90,215,76,15 + PUSHBUTTON "Restart StepMania",IDC_BUTTON_RESTART,175,215,80,15 CONTROL 129,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38 LTEXT "Sorry! An error has occurred while running StepMania.\r\n\r\nSpecific details about the error may be listeted in the box below:", IDC_STATIC,7,46,298,28 - PUSHBUTTON "Restart StepMania",IDC_BUTTON_RESTART,175,215,80,15 - PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,90,215,76,15 - PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,8,215,74,15 END IDD_LOADING_DIALOG DIALOG DISCARDABLE 0, 0, 312, 82 diff --git a/stepmania/stepmania.nsi b/stepmania/stepmania.nsi index 42ab35bc55..d63a47ae0e 100644 --- a/stepmania/stepmania.nsi +++ b/stepmania/stepmania.nsi @@ -19,7 +19,7 @@ !define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}" Name "${PRODUCT_NAME}" -OutFile "StepMania-CVS-20030223.exe" +OutFile "StepMania-CVS-20030224.exe" ;OutFile "StepMania301.exe" ; Some default compiler settings (uncomment and change at will):