another merge
This commit is contained in:
+2
-2
@@ -390,8 +390,8 @@ static const Style g_Style_Dance_ThreePanel =
|
||||
},
|
||||
{ // m_iInputColumn[NUM_GameController][NUM_GameButton]
|
||||
// 4 3 5
|
||||
{ Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, 1, 0, 2, Style::END_MAPPING },
|
||||
{ Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, 1, 0, 2, Style::END_MAPPING }
|
||||
{ 0, 2, Style::NO_MAPPING, 1, 0, 2, Style::END_MAPPING },
|
||||
{ 0, 2, Style::NO_MAPPING, 1, 0, 2, Style::END_MAPPING }
|
||||
},
|
||||
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
0,1,2
|
||||
|
||||
@@ -2205,6 +2205,7 @@ public:
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set( NULL ); }
|
||||
else { Steps *pS = Luna<Steps>::check(L,2); p->m_pCurSteps[pn].Set( pS ); }
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), p->m_pCurSteps[pn]->m_StepsType ));
|
||||
|
||||
// Why Broadcast again? This is double-broadcasting. -Chris
|
||||
MESSAGEMAN->Broadcast( (MessageID)(Message_CurrentStepsP1Changed+pn) );
|
||||
|
||||
@@ -325,6 +325,21 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
out.m_sBackgroundFile = sParams[1];
|
||||
}
|
||||
|
||||
else if( sValueName=="JACKET" )
|
||||
{
|
||||
out.m_sJacketFile = sParams[1];
|
||||
}
|
||||
|
||||
else if( sValueName=="CDIMAGE" )
|
||||
{
|
||||
out.m_sCDFile = sParams[1];
|
||||
}
|
||||
|
||||
else if( sValueName=="DISCIMAGE" )
|
||||
{
|
||||
out.m_sDiscFile = sParams[1];
|
||||
}
|
||||
|
||||
else if( sValueName=="LYRICSPATH" )
|
||||
{
|
||||
out.m_sLyricsFile = sParams[1];
|
||||
|
||||
@@ -222,6 +222,9 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
||||
f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) );
|
||||
f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#BACKGROUND:%s;", SmEscape(out.m_sBackgroundFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#JACKET:%s;", SmEscape(out.m_sJacketFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#CDIMAGE:%s;", SmEscape(out.m_sCDFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#DISCIMAGE:%s;", SmEscape(out.m_sDiscFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#LYRICSPATH:%s;", SmEscape(out.m_sLyricsFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#CDTITLE:%s;", SmEscape(out.m_sCDTitleFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#MUSIC:%s;", SmEscape(out.m_sMusicFile).c_str() ) );
|
||||
|
||||
@@ -23,7 +23,6 @@ PercentageDisplay::PercentageDisplay()
|
||||
m_LastMax = -1;
|
||||
m_iDancePointsDigits = 0;
|
||||
m_bUseRemainder = false;
|
||||
m_bApplyScoreDisplayOptions = false;
|
||||
m_bAutoRefresh = false;
|
||||
m_FormatPercentScore.SetFromExpression( "FormatPercentScore" );
|
||||
}
|
||||
@@ -31,7 +30,6 @@ PercentageDisplay::PercentageDisplay()
|
||||
void PercentageDisplay::LoadFromNode( const XNode* pNode )
|
||||
{
|
||||
pNode->GetAttrValue( "DancePointsDigits", m_iDancePointsDigits );
|
||||
pNode->GetAttrValue( "ApplyScoreDisplayOptions", m_bApplyScoreDisplayOptions );
|
||||
pNode->GetAttrValue( "AutoRefresh", m_bAutoRefresh );
|
||||
{
|
||||
Lua *L = LUA->Get();
|
||||
@@ -76,9 +74,11 @@ void PercentageDisplay::Load( const PlayerState *pPlayerState, const PlayerStage
|
||||
|
||||
m_iDancePointsDigits = THEME->GetMetricI( sMetricsGroup, "DancePointsDigits" );
|
||||
m_bUseRemainder = THEME->GetMetricB( sMetricsGroup, "PercentUseRemainder" );
|
||||
m_bApplyScoreDisplayOptions = THEME->GetMetricB( sMetricsGroup, "ApplyScoreDisplayOptions" );
|
||||
m_FormatPercentScore = THEME->GetMetricR( sMetricsGroup, "Format" );
|
||||
|
||||
|
||||
m_sPercentFormat = THEME->GetMetric( sMetricsGroup, "PercentFormat" );
|
||||
m_sRemainderFormat = THEME->GetMetric( sMetricsGroup, "RemainderFormat" );
|
||||
|
||||
if( m_FormatPercentScore.IsNil() )
|
||||
{
|
||||
LOG->Trace( "Format is nil in [%s]. Defaulting to 'FormatPercentScore'.", sMetricsGroup.c_str() );
|
||||
@@ -145,8 +145,8 @@ void PercentageDisplay::Refresh()
|
||||
{
|
||||
int iPercentWhole = int(fPercentDancePoints*100);
|
||||
int iPercentRemainder = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 );
|
||||
sNumToDisplay = ssprintf( "%2d", iPercentWhole );
|
||||
m_textPercentRemainder.SetText( ssprintf(".%01d%%", iPercentRemainder) );
|
||||
sNumToDisplay = ssprintf( m_sPercentFormat, iPercentWhole );
|
||||
m_textPercentRemainder.SetText( ssprintf(m_sRemainderFormat, iPercentRemainder) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,7 +159,7 @@ void PercentageDisplay::Refresh()
|
||||
LOG->Warn( "Error running FormatPercentScore: %s", sError.c_str() );
|
||||
LuaHelpers::Pop( L, sNumToDisplay );
|
||||
LUA->Release(L);
|
||||
|
||||
|
||||
// HACK: Use the last frame in the numbers texture as '-'
|
||||
sNumToDisplay.Replace('-','x');
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ public:
|
||||
private:
|
||||
int m_iDancePointsDigits;
|
||||
bool m_bUseRemainder;
|
||||
bool m_bApplyScoreDisplayOptions;
|
||||
|
||||
void Refresh();
|
||||
const PlayerState *m_pPlayerState;
|
||||
@@ -38,6 +37,8 @@ private:
|
||||
int m_LastMax;
|
||||
BitmapText m_textPercent;
|
||||
BitmapText m_textPercentRemainder;
|
||||
RString m_sPercentFormat;
|
||||
RString m_sRemainderFormat;
|
||||
|
||||
LuaReference m_FormatPercentScore;
|
||||
};
|
||||
|
||||
@@ -662,12 +662,10 @@ int ScoreKeeperNormal::GetPossibleDancePoints( const RadarValues& radars )
|
||||
* W2 will be used instead. */
|
||||
|
||||
int NumTaps = int(radars[RadarCategory_TapsAndHolds]);
|
||||
int NumLifts = int(radars[RadarCategory_Lifts]);
|
||||
int NumHolds = int(radars[RadarCategory_Holds]);
|
||||
int NumRolls = int(radars[RadarCategory_Rolls]);
|
||||
return
|
||||
NumTaps*TapNoteScoreToDancePoints(TNS_W1, false) +
|
||||
NumLifts*TapNoteScoreToDancePoints(TNS_W1, false) +
|
||||
NumHolds*HoldNoteScoreToDancePoints(HNS_Held, false) +
|
||||
NumRolls*HoldNoteScoreToDancePoints(HNS_Held, false);
|
||||
}
|
||||
@@ -688,12 +686,10 @@ int ScoreKeeperNormal::GetPossibleGradePoints( const RadarValues& radars )
|
||||
* W2 will be used instead. */
|
||||
|
||||
int NumTaps = int(radars[RadarCategory_TapsAndHolds]);
|
||||
int NumLifts = int(radars[RadarCategory_Lifts]);
|
||||
int NumHolds = int(radars[RadarCategory_Holds]);
|
||||
int NumRolls = int(radars[RadarCategory_Rolls]);
|
||||
return
|
||||
NumTaps*TapNoteScoreToGradePoints(TNS_W1, false) +
|
||||
NumLifts*TapNoteScoreToGradePoints(TNS_W1, false) +
|
||||
NumHolds*HoldNoteScoreToGradePoints(HNS_Held, false) +
|
||||
NumRolls*HoldNoteScoreToGradePoints(HNS_Held, false);
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ void ScreenHowToPlay::Init()
|
||||
Steps *pSteps = SongUtil::GetStepsByDescription( &m_Song, pStyle->m_StepsType, "" );
|
||||
ASSERT_M( pSteps != NULL, ssprintf("No playable steps of StepsType '%s' for ScreenHowToPlay", StringConversion::ToString(pStyle->m_StepsType).c_str()) );
|
||||
|
||||
pSteps->m_Timing.TidyUpData();
|
||||
NoteData tempNoteData;
|
||||
pSteps->GetNoteData( tempNoteData );
|
||||
pStyle->GetTransformedNoteDataForStyle( PLAYER_1, tempNoteData, m_NoteData );
|
||||
|
||||
@@ -230,6 +230,9 @@ static bool IsAxis( const DeviceInput& DeviceI )
|
||||
|
||||
void ScreenMapControllers::Input( const InputEventPlus &input )
|
||||
{
|
||||
if( m_fLockInputSecs > 0 )
|
||||
return;
|
||||
|
||||
if( input.type != IET_FIRST_PRESS && input.type != IET_REPEAT )
|
||||
return; // ignore
|
||||
if( IsTransitioning() )
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath );
|
||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
||||
|
||||
/** @brief The version of the .ssc file format. */
|
||||
const static float STEPFILE_VERSION_NUMBER = 0.80f;
|
||||
const static float STEPFILE_VERSION_NUMBER = 0.81f;
|
||||
|
||||
/** @brief How many edits for this song can each profile have? */
|
||||
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
||||
|
||||
@@ -409,6 +409,11 @@ void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
|
||||
CFRelease( dataPath );
|
||||
CFRelease( dataUrl );
|
||||
}
|
||||
}
|
||||
|
||||
void ArchHooks::MountUserFilesystems( const RString &sDirOfExecutable )
|
||||
{
|
||||
char dir[PATH_MAX];
|
||||
|
||||
// /Save -> ~/Library/Preferences/PRODUCT_ID
|
||||
PathForFolderType( dir, kPreferencesFolderType );
|
||||
@@ -435,11 +440,6 @@ void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
|
||||
FILEMAN->Mount( "dir", ssprintf("%s/" PRODUCT_ID, dir), "/Desktop" );
|
||||
}
|
||||
|
||||
void ArchHooks::MountUserFilesystems( const RString &sDirOfExecutable )
|
||||
{
|
||||
// XXX: Fix me.
|
||||
}
|
||||
|
||||
static inline int GetIntValue( CFTypeRef r )
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -269,18 +269,6 @@ void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
|
||||
* (Deprecated; use rootfs.) */
|
||||
FILEMAN->Mount( "dir", "/proc", "/proc" );
|
||||
#endif
|
||||
|
||||
/* Next: path to write general mutable user data.
|
||||
* Lowercase the PRODUCT_ID; dotfiles and directories are almost always lowercase.
|
||||
*/
|
||||
const char *szHome = getenv( "HOME" );
|
||||
RString sProductId = PRODUCT_ID;
|
||||
sProductId.MakeLower();
|
||||
RString sUserDataPath = ssprintf( "%s/.%s", szHome? szHome:".", "stepmania5" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Cache", "/Cache" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Logs", "/Logs" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Save", "/Save" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Screenshots", "/Screenshots" );
|
||||
|
||||
RString Root;
|
||||
struct stat st;
|
||||
@@ -298,7 +286,15 @@ void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
|
||||
|
||||
void ArchHooks::MountUserFilesystems( const RString &sDirOfExecutable )
|
||||
{
|
||||
// XXX: Fix me.
|
||||
/* Path to write general mutable user data when not Portable
|
||||
* Lowercase the PRODUCT_ID; dotfiles and directories are almost always lowercase.
|
||||
*/
|
||||
const char *szHome = getenv( "HOME" );
|
||||
RString sUserDataPath = ssprintf( "%s/.%s", szHome? szHome:".", "stepmania-5.0" ); //call an ambulance!
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Cache", "/Cache" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Logs", "/Logs" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Save", "/Save" );
|
||||
FILEMAN->Mount( "dir", sUserDataPath + "/Screenshots", "/Screenshots" );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user