My turn to merge.
This commit is contained in:
@@ -13,6 +13,10 @@ _____________________________________________________________________________
|
||||
sm-ssc v1.2.2 | 201102??
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
20110218
|
||||
--------
|
||||
* [WheelBase] Added SetOpenSection Lua binding [AJ]
|
||||
|
||||
20110217
|
||||
--------
|
||||
* Allowed refreshing of Fonts again. [AJ]
|
||||
|
||||
@@ -1048,11 +1048,6 @@ bool MusicWheel::Select() // return true if this selection ends the screen
|
||||
case TYPE_PORTAL:
|
||||
break;
|
||||
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();
|
||||
ChangeSort( GAMESTATE->m_PreferredSortOrder );
|
||||
m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName;
|
||||
|
||||
@@ -190,14 +190,12 @@ void ScreenNetEvaluation::UpdateStats()
|
||||
if( THEME->GetMetricB(m_sName,"ShowScoreArea") )
|
||||
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 )
|
||||
{
|
||||
m_DifficultyIcon[m_pActivePlayer].SetPlayer( m_pActivePlayer );
|
||||
m_DifficultyIcon[m_pActivePlayer].SetFromDifficulty( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty );
|
||||
}
|
||||
*/
|
||||
|
||||
for( int j=0; j<NETNUMTAPSCORES; ++j )
|
||||
{
|
||||
|
||||
+23
-28
@@ -16,7 +16,6 @@
|
||||
#include "ThemeMetric.h"
|
||||
#include "ScreenDimensions.h"
|
||||
|
||||
|
||||
const int MAX_WHEEL_SOUND_SPEED = 15;
|
||||
AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN
|
||||
|
||||
@@ -41,15 +40,15 @@ void WheelBase::Load( RString sType )
|
||||
m_iSwitchesLeftInSpinDown = 0;
|
||||
m_Moving = 0;
|
||||
|
||||
SWITCH_SECONDS .Load(sType,"SwitchSeconds");
|
||||
LOCKED_INITIAL_VELOCITY .Load(sType,"LockedInitialVelocity");
|
||||
SCROLL_BAR_HEIGHT .Load(sType,"ScrollBarHeight");
|
||||
SWITCH_SECONDS.Load(sType,"SwitchSeconds");
|
||||
LOCKED_INITIAL_VELOCITY.Load(sType,"LockedInitialVelocity");
|
||||
SCROLL_BAR_HEIGHT.Load(sType,"ScrollBarHeight");
|
||||
m_exprItemTransformFunction.SetFromReference( THEME->GetMetricR(sType,"ItemTransformFunction") );
|
||||
NUM_WHEEL_ITEMS_TO_DRAW .Load(sType,"NumWheelItems");
|
||||
WHEEL_ITEM_LOCKED_COLOR .Load(sType,"WheelItemLockedColor");
|
||||
NUM_WHEEL_ITEMS_TO_DRAW.Load(sType,"NumWheelItems");
|
||||
WHEEL_ITEM_LOCKED_COLOR.Load(sType,"WheelItemLockedColor");
|
||||
|
||||
m_soundChangeMusic.Load( THEME->GetPathS(sType,"change"), true );
|
||||
m_soundLocked.Load( THEME->GetPathS(sType,"locked"), true );
|
||||
m_soundChangeMusic.Load(THEME->GetPathS(sType,"change"), true);
|
||||
m_soundLocked.Load(THEME->GetPathS(sType,"locked"), true);
|
||||
|
||||
WheelItemBase *pTempl = MakeItem();
|
||||
ActorUtil::LoadAllCommands( *pTempl, m_sName );
|
||||
@@ -88,7 +87,7 @@ void WheelBase::BeginScreen()
|
||||
|
||||
void WheelBase::SetItemPosition( Actor &item, float fPosOffsetsFromMiddle )
|
||||
{
|
||||
/* Don't supply and item index or num items. The number of items can be so
|
||||
/* Don't supply and item index or num items. The number of items can be so
|
||||
* large that transforms that depend on such large numbers are likely to break. */
|
||||
int iItemIndex = 0; // dummy
|
||||
int iNumItems = 1; // dummy
|
||||
@@ -161,8 +160,8 @@ void WheelBase::Update( float fDeltaTime )
|
||||
pDisplay->m_colorLocked = RageColor(0,0,0,0);
|
||||
}
|
||||
|
||||
//Moved to CommonUpdateProcedure, seems to work fine
|
||||
//Revert if it happens to break something
|
||||
// Moved to CommonUpdateProcedure, seems to work fine. Revert if it happens
|
||||
// to break something.
|
||||
UpdateScrollbar();
|
||||
|
||||
if( m_Moving )
|
||||
@@ -178,9 +177,8 @@ void WheelBase::Update( float fDeltaTime )
|
||||
|
||||
if( m_WheelState == STATE_LOCKED )
|
||||
{
|
||||
/* Do this in at most .1 sec chunks, so we don't get weird if we
|
||||
* stop for some reason (and so it behaves the same when being
|
||||
* single stepped). */
|
||||
/* Do this in at most .1 sec chunks, so we don't get weird if we stop
|
||||
* for some reason (and so it behaves the same when being single stepped). */
|
||||
float fTime = fDeltaTime;
|
||||
while( fTime > 0 )
|
||||
{
|
||||
@@ -207,13 +205,12 @@ void WheelBase::Update( float fDeltaTime )
|
||||
|
||||
if( IsMoving() )
|
||||
{
|
||||
/* We're automatically moving. Move linearly, and don't clamp
|
||||
* to the selection. */
|
||||
// We're automatically moving. Move linearly, and don't clamp to the selection.
|
||||
float fSpinSpeed = m_SpinSpeed*m_Moving;
|
||||
m_fPositionOffsetFromSelection -= fSpinSpeed*fDeltaTime;
|
||||
|
||||
/* Make sure that we don't go further than 1 away, in case the
|
||||
* speed is very high or we miss a lot of frames. */
|
||||
/* Make sure that we don't go further than 1 away, in case the speed is
|
||||
* very high or we miss a lot of frames. */
|
||||
m_fPositionOffsetFromSelection = clamp(m_fPositionOffsetFromSelection, -1.0f, 1.0f);
|
||||
|
||||
// If it passed the selection, move again.
|
||||
@@ -285,10 +282,10 @@ bool WheelBase::Select() // return true if this selection can end the screen
|
||||
case TYPE_SECTION:
|
||||
{
|
||||
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
|
||||
if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded
|
||||
SetOpenSection( "" ); // collapse it
|
||||
else // already collapsed
|
||||
SetOpenSection( sThisItemSectionName ); // expand it
|
||||
if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded
|
||||
SetOpenSection( "" ); // collapse it
|
||||
else // already collapsed
|
||||
SetOpenSection( sThisItemSectionName ); // expand it
|
||||
|
||||
m_soundExpand.Play();
|
||||
}
|
||||
@@ -375,7 +372,7 @@ void WheelBase::Move(int n)
|
||||
m_TimeBeforeMovingBegins = 1/4.0f;
|
||||
m_SpinSpeed = float(PREFSMAN->m_iMusicWheelSwitchSpeed);
|
||||
m_Moving = n;
|
||||
|
||||
|
||||
if( m_Moving )
|
||||
ChangeMusic(m_Moving);
|
||||
}
|
||||
@@ -525,22 +522,20 @@ public:
|
||||
}
|
||||
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 SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; }
|
||||
// evil shit
|
||||
//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 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; }
|
||||
//static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; }
|
||||
|
||||
LunaWheelBase()
|
||||
{
|
||||
ADD_METHOD( GetWheelItem );
|
||||
ADD_METHOD( IsSettled );
|
||||
ADD_METHOD( IsLocked );
|
||||
ADD_METHOD( SetOpenSection );
|
||||
// evil shit
|
||||
//ADD_METHOD( Move );
|
||||
//ADD_METHOD( ChangeMusic );
|
||||
//ADD_METHOD( ChangeMusicUnlessLocked );
|
||||
//ADD_METHOD( SetOpenSection );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ enum WheelItemDataType
|
||||
TYPE_RANDOM,
|
||||
TYPE_PORTAL,
|
||||
TYPE_COURSE,
|
||||
TYPE_SORT
|
||||
TYPE_SORT/*,
|
||||
TYPE_CUSTOM*/
|
||||
};
|
||||
|
||||
struct WheelItemBaseData
|
||||
|
||||
Reference in New Issue
Block a user