diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 4c66657a84..0933a7168b 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,15 @@ _____________________________________________________________________________ sm-ssc v1.2 | 201012xx -------------------------------------------------------------------------------- +20101219 +-------- +* [WheelNotifyIcon] add BlinkPlayersBest metric. [freem] +* [GameCommand] Add GetScreen, GetSteps, GetCourse, GetTrail, and GetCharacter + Lua bindings. [freem] +* [StreamDisplay] Remove UseThreePartMethod. +* [Style] Add ColumnsPerPlayer and NeedsZoomOutWith2Players bindings. [freem] +* [Profile] Add GetLastUsedHighScoreName Lua binding. [freem] + 20101218 -------- * [MusicWheelItem] Add OverPart. [freem] diff --git a/NoteSkins/pump/newextra/Center Hold Body Active 6x1.png b/NoteSkins/pump/newextra/Center Hold Body Active 6x1.png new file mode 100644 index 0000000000..eb24db9647 Binary files /dev/null and b/NoteSkins/pump/newextra/Center Hold Body Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/Center Hold BottomCap Active 6x1.png b/NoteSkins/pump/newextra/Center Hold BottomCap Active 6x1.png new file mode 100644 index 0000000000..445f925bd9 Binary files /dev/null and b/NoteSkins/pump/newextra/Center Hold BottomCap Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/Center Outline Receptor.png b/NoteSkins/pump/newextra/Center Outline Receptor.png new file mode 100644 index 0000000000..08a7502e0c Binary files /dev/null and b/NoteSkins/pump/newextra/Center Outline Receptor.png differ diff --git a/NoteSkins/pump/newextra/Center Ready Receptor 1x3.png b/NoteSkins/pump/newextra/Center Ready Receptor 1x3.png new file mode 100644 index 0000000000..3e91998f09 Binary files /dev/null and b/NoteSkins/pump/newextra/Center Ready Receptor 1x3.png differ diff --git a/NoteSkins/pump/newextra/Center Tap Note 3x2.png b/NoteSkins/pump/newextra/Center Tap Note 3x2.png new file mode 100644 index 0000000000..bbcacc5c7a Binary files /dev/null and b/NoteSkins/pump/newextra/Center Tap Note 3x2.png differ diff --git a/NoteSkins/pump/newextra/DownLeft Hold Body Active 6x1.png b/NoteSkins/pump/newextra/DownLeft Hold Body Active 6x1.png new file mode 100644 index 0000000000..8dedef4018 Binary files /dev/null and b/NoteSkins/pump/newextra/DownLeft Hold Body Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/DownLeft Hold BottomCap Active 6x1.png b/NoteSkins/pump/newextra/DownLeft Hold BottomCap Active 6x1.png new file mode 100644 index 0000000000..7e6f92964a Binary files /dev/null and b/NoteSkins/pump/newextra/DownLeft Hold BottomCap Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/DownLeft Ready Receptor 1x3.png b/NoteSkins/pump/newextra/DownLeft Ready Receptor 1x3.png new file mode 100644 index 0000000000..7d18c4c459 Binary files /dev/null and b/NoteSkins/pump/newextra/DownLeft Ready Receptor 1x3.png differ diff --git a/NoteSkins/pump/newextra/DownLeft Tap Note 3x2.png b/NoteSkins/pump/newextra/DownLeft Tap Note 3x2.png new file mode 100644 index 0000000000..7e2981d5b8 Binary files /dev/null and b/NoteSkins/pump/newextra/DownLeft Tap Note 3x2.png differ diff --git a/NoteSkins/pump/newextra/DownRight Hold Body Active 6x1.png b/NoteSkins/pump/newextra/DownRight Hold Body Active 6x1.png new file mode 100644 index 0000000000..49a9b643f3 Binary files /dev/null and b/NoteSkins/pump/newextra/DownRight Hold Body Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/DownRight Hold BottomCap Active 6x1.png b/NoteSkins/pump/newextra/DownRight Hold BottomCap Active 6x1.png new file mode 100644 index 0000000000..534f6cc4e4 Binary files /dev/null and b/NoteSkins/pump/newextra/DownRight Hold BottomCap Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/UpLeft Hold Body Active 6x1.png b/NoteSkins/pump/newextra/UpLeft Hold Body Active 6x1.png new file mode 100644 index 0000000000..18a8e62344 Binary files /dev/null and b/NoteSkins/pump/newextra/UpLeft Hold Body Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/UpLeft Hold BottomCap Active 6x1.png b/NoteSkins/pump/newextra/UpLeft Hold BottomCap Active 6x1.png new file mode 100644 index 0000000000..eb094a1fdb Binary files /dev/null and b/NoteSkins/pump/newextra/UpLeft Hold BottomCap Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/UpLeft Ready Receptor 1x3.png b/NoteSkins/pump/newextra/UpLeft Ready Receptor 1x3.png new file mode 100644 index 0000000000..655a95024c Binary files /dev/null and b/NoteSkins/pump/newextra/UpLeft Ready Receptor 1x3.png differ diff --git a/NoteSkins/pump/newextra/UpLeft Tap Note 3x2.png b/NoteSkins/pump/newextra/UpLeft Tap Note 3x2.png new file mode 100644 index 0000000000..115bd460d3 Binary files /dev/null and b/NoteSkins/pump/newextra/UpLeft Tap Note 3x2.png differ diff --git a/NoteSkins/pump/newextra/UpRight Hold Body Active 6x1.png b/NoteSkins/pump/newextra/UpRight Hold Body Active 6x1.png new file mode 100644 index 0000000000..d2485b0d15 Binary files /dev/null and b/NoteSkins/pump/newextra/UpRight Hold Body Active 6x1.png differ diff --git a/NoteSkins/pump/newextra/UpRight Hold BottomCap Active 6x1.png b/NoteSkins/pump/newextra/UpRight Hold BottomCap Active 6x1.png new file mode 100644 index 0000000000..dc0a392887 Binary files /dev/null and b/NoteSkins/pump/newextra/UpRight Hold BottomCap Active 6x1.png differ diff --git a/Themes/_fallback/Scripts/02 Actor.lua b/Themes/_fallback/Scripts/02 Actor.lua index 5d0af89602..7144c89b0b 100644 --- a/Themes/_fallback/Scripts/02 Actor.lua +++ b/Themes/_fallback/Scripts/02 Actor.lua @@ -133,6 +133,17 @@ function Actor:Center() self:y(SCREEN_CENTER_Y) end +function Actor:bezier(...) + local a = {...} + local b = {} + local c = 0 + assert((a == 10 or a == 6), "bad number of arguments for Actor:bezier()") + for i=3,c do + b[#b+1] = a[i] + end + a[1]:tween(a[2], "TweenMode_Bezier", b) +end + -- (c) 2006 Glenn Maynard -- All rights reserved. -- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 87ccb3e72c..4790d8cbc7 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1187,6 +1187,7 @@ AfterSetCommand=%TextBannerAfterSet [WheelNotifyIcon] ShowTraining=false +BlinkPlayersBest=true # 04 # [Screen] @@ -3381,60 +3382,60 @@ Row6Y=SCREEN_CENTER_Y+80 Row7Y=SCREEN_CENTER_Y+120 Label1X=SCREEN_CENTER_X-250 -Label1Y=THEME:GetMetric("EditMode","Row1Y") +Label1Y=THEME:GetMetric("EditMenu","Row1Y") Label1OnCommand=shadowlength,1;zoom,0.75 Label1OffCommand= Label2X=SCREEN_CENTER_X-250 -Label2Y=THEME:GetMetric("EditMode","Row2Y") +Label2Y=THEME:GetMetric("EditMenu","Row2Y") Label2OnCommand=shadowlength,1;zoom,0.75 Label2OffCommand= Label3X=SCREEN_CENTER_X-250 -Label3Y=THEME:GetMetric("EditMode","Row3Y") +Label3Y=THEME:GetMetric("EditMenu","Row3Y") Label3OnCommand=shadowlength,1;zoom,0.75 Label3OffCommand= Label4X=SCREEN_CENTER_X-250 -Label4Y=THEME:GetMetric("EditMode","Row4Y") +Label4Y=THEME:GetMetric("EditMenu","Row4Y") Label4OnCommand=shadowlength,1;zoom,0.75 Label4OffCommand= Label5X=SCREEN_CENTER_X-250 -Label5Y=THEME:GetMetric("EditMode","Row5Y") +Label5Y=THEME:GetMetric("EditMenu","Row5Y") Label5OnCommand=shadowlength,1;zoom,0.75 Label5OffCommand= Label6X=SCREEN_CENTER_X-250 -Label6Y=THEME:GetMetric("EditMode","Row6Y") +Label6Y=THEME:GetMetric("EditMenu","Row6Y") Label6OnCommand=shadowlength,1;zoom,0.75 Label6OffCommand= Label7X=SCREEN_CENTER_X-250 -Label7Y=THEME:GetMetric("EditMode","Row7Y") +Label7Y=THEME:GetMetric("EditMenu","Row7Y") Label7OnCommand=shadowlength,1;zoom,0.75 Label7OffCommand= Value1X=SCREEN_CENTER_X -Value1Y=THEME:GetMetric("EditMode","Row1Y") +Value1Y=THEME:GetMetric("EditMenu","Row1Y") Value1OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value1OffCommand= Value2X=SCREEN_CENTER_X+60 -Value2Y=THEME:GetMetric("EditMode","Row2Y") +Value2Y=THEME:GetMetric("EditMenu","Row2Y") Value2OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value2OffCommand= Value3X=SCREEN_CENTER_X+60 -Value3Y=THEME:GetMetric("EditMode","Row3Y") +Value3Y=THEME:GetMetric("EditMenu","Row3Y") Value3OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value3OffCommand= Value4X=SCREEN_CENTER_X -Value4Y=THEME:GetMetric("EditMode","Row4Y") +Value4Y=THEME:GetMetric("EditMenu","Row4Y") Value4OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value4OffCommand= Value5X=SCREEN_CENTER_X+60 -Value5Y=THEME:GetMetric("EditMode","Row5Y") +Value5Y=THEME:GetMetric("EditMenu","Row5Y") Value5OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value5OffCommand= Value6X=SCREEN_CENTER_X -Value6Y=THEME:GetMetric("EditMode","Row6Y") +Value6Y=THEME:GetMetric("EditMenu","Row6Y") Value6OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value6OffCommand= Value7X=SCREEN_CENTER_X+60 -Value7Y=THEME:GetMetric("EditMode","Row7Y") +Value7Y=THEME:GetMetric("EditMenu","Row7Y") Value7OnCommand=shadowlength,1;zoom,0.75;maxwidth,SCREEN_CENTER_X*0.65 Value7OffCommand= diff --git a/src/CourseContentsList.cpp b/src/CourseContentsList.cpp index 0c73ab5053..98dfa1d61f 100644 --- a/src/CourseContentsList.cpp +++ b/src/CourseContentsList.cpp @@ -42,10 +42,6 @@ void CourseContentsList::SetFromGameState() { RemoveAllChildren(); - // FIXME: Is there a better way to handle when players don't have - // the same number of TrailEntries? - // They have to have the same number, and of the same songs, or gameplay - // isn't going to line up. if( GAMESTATE->m_MasterPlayerNumber == PlayerNumber_Invalid ) return; const Trail *pMasterTrail = GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber]; diff --git a/src/DateTime.cpp b/src/DateTime.cpp index 3ad458b1d3..02eb91f636 100644 --- a/src/DateTime.cpp +++ b/src/DateTime.cpp @@ -73,9 +73,7 @@ void DateTime::StripTime() tm_sec = 0; } -// // Common SQL/XML format: "YYYY-MM-DD HH:MM:SS" -// RString DateTime::GetString() const { RString s = ssprintf( "%d-%02d-%02d", diff --git a/src/DifficultyList.cpp b/src/DifficultyList.cpp index 87eb1a2268..1b3a4cff11 100644 --- a/src/DifficultyList.cpp +++ b/src/DifficultyList.cpp @@ -78,6 +78,7 @@ void StepsDisplayList::LoadFromNode( const XNode* pNode ) for( unsigned m = 0; m < m_Lines.size(); ++m ) { + // todo: Row1, Row2? also m_sName+"Row" -aj m_Lines[m].m_Meter.SetName( "Row" ); m_Lines[m].m_Meter.Load( "StepsDisplayListRow", NULL ); this->AddChild( &m_Lines[m].m_Meter ); diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index dc474abed7..b6717b8fb6 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -852,6 +852,8 @@ bool GameCommand::IsZero() const // lua start #include "LuaBinding.h" #include "Game.h" +#include "Steps.h" +#include "Character.h" class LunaGameCommand: public Luna { @@ -861,8 +863,13 @@ public: static int GetIndex( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iIndex ); return 1; } static int GetMultiPlayer( T* p, lua_State *L ) { lua_pushnumber(L, p->m_MultiPlayer); return 1; } static int GetStyle( T* p, lua_State *L ) { if(p->m_pStyle==NULL) lua_pushnil(L); else {Style *pStyle = (Style*)p->m_pStyle; pStyle->PushSelf(L);} return 1; } + static int GetScreen( T* p, lua_State *L ) { lua_pushstring(L, p->m_sScreen ); return 1; } static int GetProfileID( T* p, lua_State *L ) { lua_pushstring(L, p->m_sProfileID ); return 1; } static int GetSong( T* p, lua_State *L ) { if(p->m_pSong==NULL) lua_pushnil(L); else p->m_pSong->PushSelf(L); return 1; } + static int GetSteps( T* p, lua_State *L ) { if(p->m_pSteps==NULL) lua_pushnil(L); else p->m_pSteps->PushSelf(L); return 1; } + static int GetCourse( T* p, lua_State *L ) { if(p->m_pCourse==NULL) lua_pushnil(L); else p->m_pCourse->PushSelf(L); return 1; } + static int GetTrail( T* p, lua_State *L ) { if(p->m_pTrail==NULL) lua_pushnil(L); else p->m_pTrail->PushSelf(L); return 1; } + static int GetCharacter( T* p, lua_State *L ) { if(p->m_pCharacter==NULL) lua_pushnil(L); else p->m_pCharacter->PushSelf(L); return 1; } static int GetSongGroup( T* p, lua_State *L ) { lua_pushstring(L, p->m_sSongGroup ); return 1; } static int GetUrl( T* p, lua_State *L ) { lua_pushstring(L, p->m_sUrl ); return 1; } @@ -873,9 +880,18 @@ public: ADD_METHOD( GetIndex ); ADD_METHOD( GetMultiPlayer ); ADD_METHOD( GetStyle ); + //ADD_METHOD( GetDifficulty ); + //ADD_METHOD( GetCourseDifficulty ); + ADD_METHOD( GetScreen ); + //ADD_METHOD( GetPlayMode ); ADD_METHOD( GetProfileID ); ADD_METHOD( GetSong ); + ADD_METHOD( GetSteps ); + ADD_METHOD( GetCourse ); + ADD_METHOD( GetTrail ); + ADD_METHOD( GetCharacter ); ADD_METHOD( GetSongGroup ); + //ADD_METHOD( GetSortOrder ); ADD_METHOD( GetUrl ); } }; diff --git a/src/GameState.cpp b/src/GameState.cpp index 8194bbbeed..3e8bff889c 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -1965,7 +1965,7 @@ bool GameState::ChangePreferredDifficulty( PlayerNumber pn, int dir ) } /* The user may be set to prefer a difficulty that isn't always shown; typically, - * Difficulty_Edit. Return the closest shown difficulty <= m_PreferredDifficulty. */ + * Difficulty_Edit. Return the closest shown difficulty <= m_PreferredDifficulty. */ Difficulty GameState::GetClosestShownDifficulty( PlayerNumber pn ) const { const vector &v = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(); diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 59ab865cfa..2544efafad 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -63,7 +63,7 @@ void GrooveRadar::TweenOnScreen() { m_sprRadarLabels[c].SetX( LABEL_OFFSET_X(c) ); m_sprRadarLabels[c].PlayCommand( "PreDelayOn" ); - m_sprRadarLabels[c].BeginTweening( LABEL_ON_DELAY*c ); // sleep + m_sprRadarLabels[c].BeginTweening( LABEL_ON_DELAY*c ); // sleep m_sprRadarLabels[c].PlayCommand( "PostDelayOn" ); } @@ -83,9 +83,8 @@ void GrooveRadar::TweenOffScreen() { m_sprRadarLabels[c].StopTweening(); m_sprRadarLabels[c].BeginTweening( 0.2f ); - /* Make sure we undo glow. We do this at the end of TweenIn, - * but we might tween off before we complete tweening in, and - * the glow can remain. */ + /* Make sure we undo glow. We do this at the end of TweenIn, but we might + * tween off before we complete tweening in, and the glow can remain. */ m_sprRadarLabels[c].SetGlow( RageColor(1,1,1,0) ); m_sprRadarLabels[c].SetDiffuse( RageColor(1,1,1,0) ); } @@ -108,7 +107,7 @@ void GrooveRadar::SetFromRadarValues( PlayerNumber pn, const RadarValues &rv ) m_GrooveRadarValueMap[pn].SetFromSteps( rv ); } -void GrooveRadar::SetFromSteps( PlayerNumber pn, Steps* pSteps ) // NULL means no Song +void GrooveRadar::SetFromSteps( PlayerNumber pn, Steps* pSteps ) // NULL means no Song { if( pSteps == NULL ) { @@ -120,7 +119,6 @@ void GrooveRadar::SetFromSteps( PlayerNumber pn, Steps* pSteps ) // NULL means n m_GrooveRadarValueMap[pn].SetFromSteps( rv ); } - GrooveRadar::GrooveRadarValueMap::GrooveRadarValueMap() { m_bValuesVisible = false; @@ -146,7 +144,7 @@ void GrooveRadar::GrooveRadarValueMap::SetFromSteps( const RadarValues &rv ) const float fValueCurrent = m_fValuesOld[c] * (1-m_PercentTowardNew) + m_fValuesNew[c] * m_PercentTowardNew; m_fValuesOld[c] = fValueCurrent; m_fValuesNew[c] = rv[c]; - } + } if( !m_bValuesVisible ) // the values WERE invisible m_PercentTowardNew = 1; diff --git a/src/Player.cpp b/src/Player.cpp index 60a480258b..c473e9ef68 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2488,6 +2488,10 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds ) if( !NeedsTapJudging(tn) ) continue; + // warp hackery + if( iter.Row() >= GAMESTATE->m_iWarpBeginRow && iter.Row() <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) ) + continue; + if( tn.type == TapNote::mine ) { tn.result.tns = TNS_AvoidMine; @@ -2524,15 +2528,15 @@ void Player::UpdateJudgedRows() { int iRow = iter.Row(); + // if row is within a warp section, ignore it. -aj + if( iRow >= GAMESTATE->m_iWarpBeginRow && + iRow <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) ) + continue; + if( iLastSeenRow != iRow ) { iLastSeenRow = iRow; - // if row is within a warp section, ignore it. -aj - if( iRow >= GAMESTATE->m_iWarpBeginRow && - iRow <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) ) - continue; - // crossed a nonempty row if( !NoteDataWithScoring::IsRowCompletelyJudged(m_NoteData, iRow) ) { @@ -2985,6 +2989,11 @@ void Player::HandleHoldCheckpoint( int iRow, int iNumHoldsHeldThisRow, int iNumH bNoCheating = false; #endif + // more warp hackery. -aj + if( iRow >= (unsigned)GAMESTATE->m_iWarpBeginRow && + iRow <= (unsigned)(GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) ) + return; + // don't accumulate combo if AutoPlay is on. if( bNoCheating && m_pPlayerState->m_PlayerController == PC_AUTOPLAY ) return; diff --git a/src/Profile.cpp b/src/Profile.cpp index 35c52c7377..4f20cc7e5e 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -1939,6 +1939,7 @@ class LunaProfile: public Luna { public: static int GetDisplayName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sDisplayName ); return 1; } + static int GetLastUsedHighScoreName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sLastUsedHighScoreName ); return 1; } static int GetHighScoreList( T* p, lua_State *L ) { if( LuaBinding::CheckLuaObjectType(L, 1, "Song") ) @@ -2035,6 +2036,7 @@ public: LunaProfile() { ADD_METHOD( GetDisplayName ); + ADD_METHOD( GetLastUsedHighScoreName ); ADD_METHOD( GetHighScoreList ); ADD_METHOD( GetCharacter ); ADD_METHOD( SetCharacter ); diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index cab97d0523..65db1110c7 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -674,9 +674,7 @@ void ProfileManager::IncrementStepsPlayCount( const Song* pSong, const Steps* pS GetMachineProfile()->IncrementStepsPlayCount( pSong, pSteps ); } -// // Course stats -// void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut ) { HighScore hs = hs_; @@ -686,7 +684,7 @@ void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, iMachineIndexOut = -1; // In event mode, set the score's name immediately to the Profile's last - // used name. If no profile last used name exists, use "EVNT". + // used name. If no profile last used name exists, use "EVNT". if( GAMESTATE->IsEventMode() ) { Profile* pProfile = GetProfile(pn); @@ -700,10 +698,7 @@ void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, hs.SetName( RANKING_TO_FILL_IN_MARKER[pn] ); } - - // // save high score - // if( IsPersistentProfile(pn) ) GetProfile(pn)->AddCourseHighScore( pCourse, pTrail, hs, iPersonalIndexOut ); if( hs.GetPercentDP() >= PREFSMAN->m_fMinPercentageForMachineCourseHighScore ) @@ -724,10 +719,7 @@ void ProfileManager::IncrementCoursePlayCount( const Course* pCourse, const Trai GetMachineProfile()->IncrementCoursePlayCount( pCourse, pTrail ); } - -// // Category stats -// void ProfileManager::AddCategoryScore( StepsType st, RankingCategory rc, PlayerNumber pn, const HighScore &hs_, int &iPersonalIndexOut, int &iMachineIndexOut ) { HighScore hs = hs_; @@ -804,7 +796,6 @@ int ProfileManager::GetNumLocalProfiles() const return g_vLocalProfile.size(); } - // lua start #include "LuaBinding.h" @@ -828,7 +819,6 @@ public: static int GetLocalProfileIDFromIndex( T* p, lua_State *L ) { lua_pushstring(L, p->GetLocalProfileIDFromIndex(IArg(1)) ); return 1; } static int GetLocalProfileIndexFromID( T* p, lua_State *L ) { lua_pushnumber(L, p->GetLocalProfileIndexFromID(SArg(1)) ); return 1; } static int GetNumLocalProfiles( T* p, lua_State *L ) { lua_pushnumber(L, p->GetNumLocalProfiles() ); return 1; } - //static int GetProfileDirectoryForPlayer( T* p, lua_State *L ) { lua_pushstring(L, m_sProfileDir[Enum::Check(L, 1)] ) return 1; } static int GetProfileDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetProfileDir(Enum::Check(L, 1)) ); return 1; } static int IsSongNew( T* p, lua_State *L ) { lua_pushboolean(L, p->IsSongNew(Luna::check(L,1)) ); return 1; } @@ -843,8 +833,7 @@ public: ADD_METHOD( GetLocalProfileIDFromIndex ); ADD_METHOD( GetLocalProfileIndexFromID ); ADD_METHOD( GetNumLocalProfiles ); - //ADD_METHOD( GetProfileDirectoryForPlayer ); // uses PlayerNumber - ADD_METHOD( GetProfileDir ); // uses ProfileSlot + ADD_METHOD( GetProfileDir ); ADD_METHOD( IsSongNew ); } }; diff --git a/src/StreamDisplay.cpp b/src/StreamDisplay.cpp index 2828693944..185028e209 100644 --- a/src/StreamDisplay.cpp +++ b/src/StreamDisplay.cpp @@ -20,7 +20,6 @@ StreamDisplay::StreamDisplay() m_fVelocity = 0; m_fPassingAlpha = 0; m_fHotAlpha = 0; - m_fThreePartWidth = 0; m_bAlwaysBounce = false; } @@ -33,13 +32,8 @@ void StreamDisplay::Load( const RString &_sMetricsGroup ) float fTextureCoordScaleX = THEME->GetMetricF(sMetricsGroup,"TextureCoordScaleX"); int iNumPills = THEME->GetMetricF(sMetricsGroup,"NumPills"); - m_bUsingThreePart = THEME->GetMetricB(sMetricsGroup,"UseThreePartMethod"); m_bAlwaysBounce = THEME->GetMetricB(sMetricsGroup,"AlwaysBounceNormalBar"); - // three part method only uses 3 pills - if(iNumPills != 3) - m_bUsingThreePart = false; - FOREACH_ENUM( StreamType, st ) { ASSERT( m_vpSprPill[st].empty() ); @@ -48,35 +42,15 @@ void StreamDisplay::Load( const RString &_sMetricsGroup ) { Sprite *pSpr = new Sprite; - if( m_bUsingThreePart ) - { - pSpr->Load( THEME->GetPathG( sMetricsGroup, ssprintf("%s part%d",StreamTypeToString(st).c_str(),i) ) ); - - if(pSpr->GetNumStates() > 1) - { - pSpr->SetAllStateDelays( THEME->GetMetricF( sMetricsGroup, ssprintf("%spart%ddelay",StreamTypeToString(st).c_str(),i) ) ); - } - } - else - pSpr->Load( THEME->GetPathG( sMetricsGroup, StreamTypeToString(st) ) ); + pSpr->Load( THEME->GetPathG( sMetricsGroup, StreamTypeToString(st) ) ); m_vpSprPill[st].push_back( pSpr ); - if( !m_bUsingThreePart ) - { - m_transformPill.TransformItemDirect( *pSpr, -1, i, iNumPills ); - float f = 1 / fTextureCoordScaleX; - pSpr->SetCustomTextureRect( RectF(f*i,0,f*(i+1),1) ); - } + m_transformPill.TransformItemDirect( *pSpr, -1, i, iNumPills ); + float f = 1 / fTextureCoordScaleX; + pSpr->SetCustomTextureRect( RectF(f*i,0,f*(i+1),1) ); this->AddChild( pSpr ); } - - if( m_bUsingThreePart ) - { - m_fThreePartWidth = THEME->GetMetricF( sMetricsGroup, "ThreePartWidth" ); - // first element positioned depending on metric width specified - m_vpSprPill[st][0]->AddX( -(m_fThreePartWidth/2 + m_vpSprPill[st][0]->GetZoomedWidth()/2) ); - } } } @@ -131,28 +105,9 @@ void StreamDisplay::Update( float fDeltaSecs ) // XXX scale by current song speed - if( !m_bUsingThreePart ) // usual lifebar - { - pSpr->SetCropRight( 1.0f - fPercentFilledThisPill ); - pSpr->SetTexCoordVelocity( -1, 0 ); - } - else // using the three-part method - { + pSpr->SetCropRight( 1.0f - fPercentFilledThisPill ); + pSpr->SetTexCoordVelocity( -1, 0 ); - if( i==1 ) // middle pill - { - float fMiddleWidth = m_fThreePartWidth * m_fTrailingPercent; - pSpr->ZoomToWidth( fMiddleWidth ); - - float fMiddleX = m_vpSprPill[st][0]->GetX() + ( fMiddleWidth/2 ) + ( m_vpSprPill[st][0]->GetZoomedWidth()/2 ); - pSpr->SetX( fMiddleX ); - } - else if( i!=0 ) // last pill - { - float fEndX = m_vpSprPill[st][1]->GetX() + ( m_vpSprPill[st][1]->GetZoomedWidth()/2 ) + ( pSpr->GetZoomedWidth()/2 ); - pSpr->SetX( fEndX ); - } - } // Optimization: Don't draw pills that are covered up switch( st ) { diff --git a/src/StreamDisplay.h b/src/StreamDisplay.h index a9e124de9b..11c178ece4 100644 --- a/src/StreamDisplay.h +++ b/src/StreamDisplay.h @@ -15,7 +15,6 @@ enum StreamType NUM_StreamType, }; - class StreamDisplay : public ActorFrame { public: @@ -43,9 +42,6 @@ private: float m_fPassingAlpha; float m_fHotAlpha; - bool m_bUsingThreePart; - - float m_fThreePartWidth; bool m_bAlwaysBounce; }; diff --git a/src/Style.cpp b/src/Style.cpp index e034c2e63f..b8a41a8dbd 100644 --- a/src/Style.cpp +++ b/src/Style.cpp @@ -120,12 +120,16 @@ public: static int GetName( T* p, lua_State *L ) { LuaHelpers::Push( L, (RString) p->m_szName ); return 1; } DEFINE_METHOD( GetStyleType, m_StyleType ) DEFINE_METHOD( GetStepsType, m_StepsType ) + DEFINE_METHOD( ColumnsPerPlayer, m_iColsPerPlayer ) + DEFINE_METHOD( NeedsZoomOutWith2Players, m_bNeedsZoomOutWith2Players ) LunaStyle() { ADD_METHOD( GetName ); ADD_METHOD( GetStyleType ); ADD_METHOD( GetStepsType ); + ADD_METHOD( ColumnsPerPlayer ); + ADD_METHOD( NeedsZoomOutWith2Players ); } }; diff --git a/src/Style.h b/src/Style.h index 05e2c3b913..dbec066973 100644 --- a/src/Style.h +++ b/src/Style.h @@ -19,15 +19,15 @@ struct lua_State; class Style { public: - bool m_bUsedForGameplay; // Can be used only for gameplay? - bool m_bUsedForEdit; // Can be used for editing? - bool m_bUsedForDemonstration; // Can be used for demonstration? - bool m_bUsedForHowToPlay; // Can be used for HowToPlay? + bool m_bUsedForGameplay; // Can be used only for gameplay? + bool m_bUsedForEdit; // Can be used for editing? + bool m_bUsedForDemonstration; // Can be used for demonstration? + bool m_bUsedForHowToPlay; // Can be used for HowToPlay? - /* The name of the style. (This is currently unused.) */ + // The name of the style. (This is currently unused.) const char * m_szName; - /* Steps format used for each player. For example, "dance versus" reads + /* Steps format used for each player. For example, "dance versus" reads * the Steps with the tag "dance-single". */ StepsType m_StepsType; @@ -36,21 +36,21 @@ public: int m_iColsPerPlayer; // number of total tracks this style expects (e.g. 4 for versus, but 8 for double) struct ColumnInfo { - int track; // take note data from this track - float fXOffset; // x position of the column relative to player center - const char *pzName; // name of this column, or NULL to use the name of a button mapped to it + int track; // take note data from this track + float fXOffset; // x position of the column relative to player center + const char *pzName; // name of this column, or NULL to use the name of a button mapped to it }; ColumnInfo m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; // maps each players' column to a track in the NoteData - /* This maps from game inputs to columns. More than one button may map to a + /* This maps from game inputs to columns. More than one button may map to a * single column. */ enum { NO_MAPPING = -1, END_MAPPING = -2 }; int m_iInputColumn[NUM_GameController][NUM_GameButton]; // maps each input to a column, or GameButton_Invalid int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; - bool m_bNeedsZoomOutWith2Players; - bool m_bCanUseBeginnerHelper; - bool m_bLockDifficulties; // used in couple Styles + bool m_bNeedsZoomOutWith2Players; + bool m_bCanUseBeginnerHelper; + bool m_bLockDifficulties; // used in couple Styles GameInput StyleInputToGameInput( int iCol, PlayerNumber pn ) const; // Returns Column_Invalid if the input is an invalid column, such as UL corner in 4 pad mode diff --git a/src/WheelNotifyIcon.cpp b/src/WheelNotifyIcon.cpp index 73b8cde395..ee1c0047f4 100644 --- a/src/WheelNotifyIcon.cpp +++ b/src/WheelNotifyIcon.cpp @@ -13,6 +13,7 @@ */ static ThemeMetric SHOW_TRAINING ("WheelNotifyIcon","ShowTraining"); +static ThemeMetric BLINK_BEST_ICON ("WheelNotifyIcon","BlinkPlayersBest"); WheelNotifyIcon::WheelNotifyIcon() { @@ -49,15 +50,16 @@ void WheelNotifyIcon::SetFlags( Flags flags ) m_vIconsToShow.push_back( training ); - // HACK: Make players best blink if it's the only icon - // TODO: metric this. use m_bPlayersBestHack as variable name, lol -aj - if( m_vIconsToShow.size() == 1 ) + // If BLINK_BEST_ICON, make player's best icon blink if it's the only icon. + if( m_vIconsToShow.size() == 1 && BLINK_BEST_ICON ) { if( m_vIconsToShow[0] >= best1 && m_vIconsToShow[0] <= best3 ) m_vIconsToShow.push_back( empty ); } - m_vIconsToShow.resize( min(m_vIconsToShow.size(),2u) ); // crop to most important 2 + // crop to most important 2 + // todo: Let themer handle this? -aj + m_vIconsToShow.resize( min(m_vIconsToShow.size(),2u) ); // Broadcast Set message so items can react. (futures) -aj //Message msg("Set");