From d248bd17e34ba09ae9bc5cfc988f950040fc84f9 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Tue, 8 Jul 2003 12:50:31 +0000 Subject: [PATCH] Fixed a bug with "points till next unlock" Implemented metrics for unlock screen (sets position and size of dance points till next unlock) --- stepmania/src/ScreenUnlock.cpp | 7 +++++-- stepmania/src/UnlockSystem.cpp | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenUnlock.cpp b/stepmania/src/ScreenUnlock.cpp index a49e7cca7d..adf9ea92f1 100644 --- a/stepmania/src/ScreenUnlock.cpp +++ b/stepmania/src/ScreenUnlock.cpp @@ -6,6 +6,9 @@ #include "RageLog.h" #include "UnlockSystem.h" + + + ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") { LOG->Trace("ScreenUnlock::ScreenUnlock()"); @@ -27,7 +30,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") }; PointsUntilNextUnlock.SetText( sDP ); - PointsUntilNextUnlock.SetZoom( 3 ); - PointsUntilNextUnlock.SetXY( 10, 370 ); + PointsUntilNextUnlock.SetZoom( THEME->GetMetricF("ScreenUnlock","DancePointsZoom") ); + PointsUntilNextUnlock.SetXY( THEME->GetMetricI("ScreenUnlock","DancePointsDisplayX"), THEME->GetMetricI("ScreenUnlock","DancePointsDisplayY") ); this->AddChild( &PointsUntilNextUnlock ); } \ No newline at end of file diff --git a/stepmania/src/UnlockSystem.cpp b/stepmania/src/UnlockSystem.cpp index 9aadb37703..4ba5dab332 100644 --- a/stepmania/src/UnlockSystem.cpp +++ b/stepmania/src/UnlockSystem.cpp @@ -287,6 +287,7 @@ float UnlockSystem::NumPointsUntilNextUnlock() fSmallestPoints = min(fSmallestPoints, m_SongEntries[a].m_fDancePointsRequired); } + if (fSmallestPoints == 400000000) return 0; // no match found return fSmallestPoints - PREFSMAN->m_fDancePointsAccumulated; }