My turn to merge.

This commit is contained in:
Jason Felds
2011-02-18 15:10:29 -05:00
5 changed files with 30 additions and 37 deletions
+4
View File
@@ -13,6 +13,10 @@ _____________________________________________________________________________
sm-ssc v1.2.2 | 201102?? sm-ssc v1.2.2 | 201102??
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
20110218
--------
* [WheelBase] Added SetOpenSection Lua binding [AJ]
20110217 20110217
-------- --------
* Allowed refreshing of Fonts again. [AJ] * Allowed refreshing of Fonts again. [AJ]
-5
View File
@@ -1048,11 +1048,6 @@ bool MusicWheel::Select() // return true if this selection ends the screen
case TYPE_PORTAL: case TYPE_PORTAL:
break; break;
case TYPE_SORT: case TYPE_SORT:
/*
LOG->Trace("New sort order selected: %s - %s",
GetCurWheelItemData(m_iSelection)->m_sLabel.c_str(),
SortOrderToString(GetCurWheelItemData(m_iSelection)->m_pAction->m_SortOrder).c_str() );
*/
GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers(); GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers();
ChangeSort( GAMESTATE->m_PreferredSortOrder ); ChangeSort( GAMESTATE->m_PreferredSortOrder );
m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName; m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName;
+1 -3
View File
@@ -190,14 +190,12 @@ void ScreenNetEvaluation::UpdateStats()
if( THEME->GetMetricB(m_sName,"ShowScoreArea") ) if( THEME->GetMetricB(m_sName,"ShowScoreArea") )
m_textScore[m_pActivePlayer].SetTargetNumber( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].score ); m_textScore[m_pActivePlayer].SetTargetNumber( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].score );
//Values greater than 6 will cause a crash //Values greater than 6 will cause a crash/*
/*
if( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty < 6 ) if( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty < 6 )
{ {
m_DifficultyIcon[m_pActivePlayer].SetPlayer( m_pActivePlayer ); m_DifficultyIcon[m_pActivePlayer].SetPlayer( m_pActivePlayer );
m_DifficultyIcon[m_pActivePlayer].SetFromDifficulty( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty ); m_DifficultyIcon[m_pActivePlayer].SetFromDifficulty( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty );
} }
*/
for( int j=0; j<NETNUMTAPSCORES; ++j ) for( int j=0; j<NETNUMTAPSCORES; ++j )
{ {
+10 -15
View File
@@ -16,7 +16,6 @@
#include "ThemeMetric.h" #include "ThemeMetric.h"
#include "ScreenDimensions.h" #include "ScreenDimensions.h"
const int MAX_WHEEL_SOUND_SPEED = 15; const int MAX_WHEEL_SOUND_SPEED = 15;
AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN
@@ -161,8 +160,8 @@ void WheelBase::Update( float fDeltaTime )
pDisplay->m_colorLocked = RageColor(0,0,0,0); pDisplay->m_colorLocked = RageColor(0,0,0,0);
} }
//Moved to CommonUpdateProcedure, seems to work fine // Moved to CommonUpdateProcedure, seems to work fine. Revert if it happens
//Revert if it happens to break something // to break something.
UpdateScrollbar(); UpdateScrollbar();
if( m_Moving ) if( m_Moving )
@@ -178,9 +177,8 @@ void WheelBase::Update( float fDeltaTime )
if( m_WheelState == STATE_LOCKED ) if( m_WheelState == STATE_LOCKED )
{ {
/* Do this in at most .1 sec chunks, so we don't get weird if we /* Do this in at most .1 sec chunks, so we don't get weird if we stop
* stop for some reason (and so it behaves the same when being * for some reason (and so it behaves the same when being single stepped). */
* single stepped). */
float fTime = fDeltaTime; float fTime = fDeltaTime;
while( fTime > 0 ) while( fTime > 0 )
{ {
@@ -207,13 +205,12 @@ void WheelBase::Update( float fDeltaTime )
if( IsMoving() ) if( IsMoving() )
{ {
/* We're automatically moving. Move linearly, and don't clamp // We're automatically moving. Move linearly, and don't clamp to the selection.
* to the selection. */
float fSpinSpeed = m_SpinSpeed*m_Moving; float fSpinSpeed = m_SpinSpeed*m_Moving;
m_fPositionOffsetFromSelection -= fSpinSpeed*fDeltaTime; m_fPositionOffsetFromSelection -= fSpinSpeed*fDeltaTime;
/* Make sure that we don't go further than 1 away, in case the /* Make sure that we don't go further than 1 away, in case the speed is
* speed is very high or we miss a lot of frames. */ * very high or we miss a lot of frames. */
m_fPositionOffsetFromSelection = clamp(m_fPositionOffsetFromSelection, -1.0f, 1.0f); m_fPositionOffsetFromSelection = clamp(m_fPositionOffsetFromSelection, -1.0f, 1.0f);
// If it passed the selection, move again. // If it passed the selection, move again.
@@ -525,22 +522,20 @@ public:
} }
static int IsSettled( T* p, lua_State *L ){ lua_pushboolean( L, p->IsSettled() ); return 1; } static int IsSettled( T* p, lua_State *L ){ lua_pushboolean( L, p->IsSettled() ); return 1; }
static int IsLocked( T* p, lua_State *L ){ lua_pushboolean( L, p->WheelIsLocked() ); return 1; } static int IsLocked( T* p, lua_State *L ){ lua_pushboolean( L, p->WheelIsLocked() ); return 1; }
static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; }
// evil shit // evil shit
//static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; } //static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; }
//static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusic( IArg(1) ); return 0; } //static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; }
//static int ChangeMusicUnlessLocked( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; }
//static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; }
LunaWheelBase() LunaWheelBase()
{ {
ADD_METHOD( GetWheelItem ); ADD_METHOD( GetWheelItem );
ADD_METHOD( IsSettled ); ADD_METHOD( IsSettled );
ADD_METHOD( IsLocked ); ADD_METHOD( IsLocked );
ADD_METHOD( SetOpenSection );
// evil shit // evil shit
//ADD_METHOD( Move ); //ADD_METHOD( Move );
//ADD_METHOD( ChangeMusic ); //ADD_METHOD( ChangeMusic );
//ADD_METHOD( ChangeMusicUnlessLocked );
//ADD_METHOD( SetOpenSection );
} }
}; };
+2 -1
View File
@@ -20,7 +20,8 @@ enum WheelItemDataType
TYPE_RANDOM, TYPE_RANDOM,
TYPE_PORTAL, TYPE_PORTAL,
TYPE_COURSE, TYPE_COURSE,
TYPE_SORT TYPE_SORT/*,
TYPE_CUSTOM*/
}; };
struct WheelItemBaseData struct WheelItemBaseData