Merge with default

This commit is contained in:
Henrik Andersson
2011-07-03 20:03:06 +02:00
27 changed files with 8068 additions and 240 deletions
+11
View File
@@ -8,6 +8,17 @@ ________________________________________________________________________________
StepMania 5.0 Preview 2 | 201107?? StepMania 5.0 Preview 2 | 201107??
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2011/07/03
----------
* [Player] Bring mMods from OpenITG over. Also, a metric was added,
"MModHighCap", to cap the speed mod if required for playing songs like
Tsuhsuixamush. Set the metric to 0 or less to remove the cap. [AJ, sharksoda,
Wolfman2000]
2011/07/02
----------
* [ScreenEdit] Fixed a crash when hitting Enter in the F1 help menu. [AJ]
2011/06/30 2011/06/30
---------- ----------
* [NotesAll] Use #FIRSTSECOND, #LASTSECOND, and #LASTSECONDHINT instead of the * [NotesAll] Use #FIRSTSECOND, #LASTSECOND, and #LASTSECONDHINT instead of the
+5
View File
@@ -4,7 +4,12 @@ DrawHoldHeadForTapsOnSameRow=0
StartDrawingHoldBodyOffsetFromHead=0 StartDrawingHoldBodyOffsetFromHead=0
StopDrawingHoldBodyOffsetFromTail=-32 StopDrawingHoldBodyOffsetFromTail=-32
TapNoteAnimationIsVivid=0
# control the vertical # control the vertical
TapNoteNoteColorTextureCoordSpacingX=0
TapNoteNoteColorTextureCoordSpacingY=0
TapNoteAdditionTextureCoordOffsetX=0 TapNoteAdditionTextureCoordOffsetX=0
TapNoteAdditionTextureCoordOffsetY=0.5 TapNoteAdditionTextureCoordOffsetY=0.5
+5
View File
@@ -4,7 +4,12 @@ DrawHoldHeadForTapsOnSameRow=0
StartDrawingHoldBodyOffsetFromHead=0 StartDrawingHoldBodyOffsetFromHead=0
StopDrawingHoldBodyOffsetFromTail=-32 StopDrawingHoldBodyOffsetFromTail=-32
TapNoteAnimationIsVivid=0
# control the vertical # control the vertical
TapNoteNoteColorTextureCoordSpacingX=0
TapNoteNoteColorTextureCoordSpacingY=0
TapNoteAdditionTextureCoordOffsetX=0 TapNoteAdditionTextureCoordOffsetX=0
TapNoteAdditionTextureCoordOffsetY=0.5 TapNoteAdditionTextureCoordOffsetY=0.5
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -68,7 +68,7 @@ local function ParseSpeedModFile(path)
return mods return mods
else else
-- error; write a fallback mod file and return it -- error; write a fallback mod file and return it
local fallbackString = "0.5x,1x,1.5x,2x,3x,4x,8x,C200,C400" local fallbackString = "0.5x,1x,1.5x,2x,3x,4x,8x,C200,C400,m550"
Trace("[CustomSpeedMods]: Could not read SpeedMods; writing fallback to "..path) Trace("[CustomSpeedMods]: Could not read SpeedMods; writing fallback to "..path)
file:Open(path, 2) file:Open(path, 2)
file:Write(fallbackString) file:Write(fallbackString)
@@ -148,6 +148,7 @@ end
local function SpeedModSort(tab) local function SpeedModSort(tab)
local xMods = {} local xMods = {}
local mMods = {}
local cMods = {} local cMods = {}
--local mMods = {} --local mMods = {}
@@ -159,10 +160,9 @@ local function SpeedModSort(tab)
if string.find(tab[i],"C%d") then if string.find(tab[i],"C%d") then
typ = cMods typ = cMods
val = string.gsub(tab[i], "C", "") val = string.gsub(tab[i], "C", "")
elseif string.find(tab[i],"M%d") then elseif string.find(tab[i],"m%d") then
Trace("[CustomSpeedMods] OpenITG's M-Mods are not supported yet in sm-ssc.") typ = mMods
--typ = mMods val = string.gsub(tab[i], "m", "")
--val = string.gsub(tab[i], "M", "")
else else
typ = xMods typ = xMods
val = string.gsub(tab[i], "x", "") val = string.gsub(tab[i], "x", "")
@@ -175,7 +175,7 @@ local function SpeedModSort(tab)
-- sort cMods -- sort cMods
cMods = AnonSort(cMods) cMods = AnonSort(cMods)
-- sort mMods -- sort mMods
--mMods = AnonSort(mMods) mMods = AnonSort(mMods)
local fin = {} local fin = {}
-- convert it back to a string since that's what it expects -- convert it back to a string since that's what it expects
for i=1,#xMods do for i=1,#xMods do
@@ -184,6 +184,9 @@ local function SpeedModSort(tab)
for i=1,#cMods do for i=1,#cMods do
table.insert(fin, "C"..cMods[i]) table.insert(fin, "C"..cMods[i])
end end
for i=1,#mMods do
table.insert(fin, "m"..mMods[i])
end
--for i=1,#mMods do table.insert(fin, "M"..mMods[i]); end; --for i=1,#mMods do table.insert(fin, "M"..mMods[i]); end;
return fin return fin
end end
+13 -18
View File
@@ -67,7 +67,7 @@ r['DDR 4thMIX'] = function(params, pss)
local capScore = 999999999; local capScore = 999999999;
local bestPoints = scoreLookupTable['TapNoteScore_W1']; local bestPoints = scoreLookupTable['TapNoteScore_W1'];
local bestCombo = bestPoints and comboBonusForThisStep or 0; local bestCombo = bestPoints and comboBonusForThisStep or 0;
pss:SeCurMaxScore(clamp(pss:GeCurMaxScore()+bestPoints+bestCombo,0,capScore)); pss:SetCurMaxScore(clamp(pss:GetCurMaxScore()+bestPoints+bestCombo,0,capScore));
local localPoints = scoreLookupTable[params.TapNoteScore]; local localPoints = scoreLookupTable[params.TapNoteScore];
local localCombo = localPoints and comboBonusForThisStep or 0; local localCombo = localPoints and comboBonusForThisStep or 0;
pss:SetScore(clamp(pss:GetScore()+localPoints+localCombo,0,capScore)); pss:SetScore(clamp(pss:GetScore()+localPoints+localCombo,0,capScore));
@@ -140,8 +140,7 @@ r['HYBRID'] = function(params, pss)
}; };
setmetatable(multLookup, ZeroIfNotFound); setmetatable(multLookup, ZeroIfNotFound);
local radarValues = GetDirectRadar(params.Player); local radarValues = GetDirectRadar(params.Player);
local totalItems = GetTotalItems(radarValues) local totalItems = GetTotalItems(radarValues);
- radarValues:GetValue('RadarCategory_Lifts');
-- 1+2+3+...+totalItems の値 -- 1+2+3+...+totalItems の値
local sTotal = (totalItems+1)*totalItems/2; local sTotal = (totalItems+1)*totalItems/2;
-- [en] Score for one song -- [en] Score for one song
@@ -201,25 +200,21 @@ r['DDR SuperNOVA 2'] = function(params, pss)
}; };
setmetatable(multLookup, ZeroIfNotFound); setmetatable(multLookup, ZeroIfNotFound);
local radarValues = GetDirectRadar(params.Player); local radarValues = GetDirectRadar(params.Player);
local numLifts = radarValues:GetCategory('RadarCategory_Lifts') local totalItems = GetTotalItems(radarValues);
local numFakes = radarValues:GetCategory('RadarCategory_Fakes')
local totalItems = GetTotalItems(radarValues) - (numLifts + numFakes);
-- handle holds -- handle holds
local maxAdd = 0 local maxAdd = 0;
if params.HoldNoteScore == 'HoldNoteScore_Held' then if params.HoldNoteScore == 'HoldNoteScore_Held' then
maxAdd = 10 maxAdd = 10;
elseif params.HoldNoteScore == 'HoldNoteScore_LetGo' then
maxAdd = 0;
else else
if params.HoldNoteScore == 'HoldNoteScore_LetGo' then maxAdd = multLookup[params.TapNoteScore];
maxAdd = 0 if params.TapNoteScore == 'TapNoteScore_W2' or 'TapNoteScore_W3' then
else -- [ja] 超最終手段
maxAdd = multLookup[params.TapNoteScore] pss:SetCurMaxScore( pss:GetCurMaxScore() + 1000000 );
if params.TapNoteScore == 'TapNoteScore_W2' or 'TapNoteScore_W3' then end;
-- [ja] 超最終手段 end;
pss:SetCurMaxScore( pss:GetCurMaxScore() + 1000000 )
end
end
end
pss:SetCurMaxScore(pss:GetCurMaxScore() + maxAdd); pss:SetCurMaxScore(pss:GetCurMaxScore() + maxAdd);
--[[ --[[
+3 -1
View File
@@ -1086,7 +1086,8 @@ CheckpointsUseTickcounts=(GAMESTATE:GetCurrentGame():GetName() == "pump")
; deprecated? ; deprecated?
CheckpointsUseTimeSignatures=false CheckpointsUseTimeSignatures=false
CheckpointsTapsSeparateJudgment=CheckpointsTapsSeparateJudgment() CheckpointsTapsSeparateJudgment=CheckpointsTapsSeparateJudgment()
CheckpointsFlashOnHold=false ; someone misunderstood me :x -Daisu
CheckpointsFlashOnHold=(GAMESTATE:GetCurrentGame():GetName() == "pump")
ImmediateHoldLetGo=ImmediateHoldLetGo() ImmediateHoldLetGo=ImmediateHoldLetGo()
RequireStepOnHoldHeads=HoldHeadStep() RequireStepOnHoldHeads=HoldHeadStep()
RequireStepOnMines=false RequireStepOnMines=false
@@ -1100,6 +1101,7 @@ ComboStoppedAt=50
AttackRunTimeRandom=6 AttackRunTimeRandom=6
AttackRunTimeMine=7 AttackRunTimeMine=7
BattleRaveMirror=true BattleRaveMirror=true
MModHighCap=600
[PlayerOptions] [PlayerOptions]
RandomSpeedChance=0.2 RandomSpeedChance=0.2
-1
View File
@@ -835,7 +835,6 @@ IconChoiceEndlessOffCommand=linear,0.1175;zoomx,0
[ScreenGameInformation] [ScreenGameInformation]
[ScreenSelectMusic] [ScreenSelectMusic]
SampleMusicPreviewMode='SampleMusicPreviewMode_LastSong'
UsePlayerSelectMenu=false UsePlayerSelectMenu=false
# OptionsMenuAvailable=(getenv(sMode) ~= Oni) # OptionsMenuAvailable=(getenv(sMode) ~= Oni)
SelectMenuAvailable=true SelectMenuAvailable=true
BIN
View File
Binary file not shown.
+12 -4
View File
@@ -295,6 +295,7 @@ Section "Main Section" SecMain
RMDir /r "$INSTDIR\NoteSkins\dance\midi" RMDir /r "$INSTDIR\NoteSkins\dance\midi"
; we may also want to remove the new ones. ; we may also want to remove the new ones.
RMDir /r "$INSTDIR\NoteSkins\dance\midi-note" RMDir /r "$INSTDIR\NoteSkins\dance\midi-note"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-note-3d"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-solo" RMDir /r "$INSTDIR\NoteSkins\dance\midi-solo"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-vivid" RMDir /r "$INSTDIR\NoteSkins\dance\midi-vivid"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-rhythm-p1" RMDir /r "$INSTDIR\NoteSkins\dance\midi-rhythm-p1"
@@ -456,6 +457,7 @@ Section "Main Section" SecMain
File "Docs\Changelog_sm5.txt" File "Docs\Changelog_sm5.txt"
File "Docs\Changelog_SSCformat.txt" File "Docs\Changelog_SSCformat.txt"
File "Docs\CommandLineArgs.txt" File "Docs\CommandLineArgs.txt"
File "Docs\CourseFormat.txt"
File /r /x CVS /x .svn "Docs\license-ext" File /r /x CVS /x .svn "Docs\license-ext"
File /r /x CVS /x .svn "Docs\Luadoc" File /r /x CVS /x .svn "Docs\Luadoc"
File /r /x CVS /x .svn "Docs\Themerdocs" File /r /x CVS /x .svn "Docs\Themerdocs"
@@ -532,14 +534,14 @@ Function ShowAutorun
IfFileExists "$R1" show_play_and_reinstall IfFileExists "$R1" show_play_and_reinstall
show_only_install: show_only_install:
GetDlgItem $1 $hwnd 1201 ; Second cutom control GetDlgItem $1 $hwnd 1201 ; Second custom control
ShowWindow $1 0 ShowWindow $1 0
GetDlgItem $1 $hwnd 1202 ; Third cutom control GetDlgItem $1 $hwnd 1202 ; Third custom control
ShowWindow $1 0 ShowWindow $1 0
Goto done Goto done
show_play_and_reinstall: show_play_and_reinstall:
GetDlgItem $1 $hwnd 1200 ; First cutom control GetDlgItem $1 $hwnd 1200 ; First custom control
ShowWindow $1 0 ShowWindow $1 0
done: done:
@@ -741,6 +743,7 @@ Section "Uninstall"
RMDir /r "$INSTDIR\NoteSkins\dance\default" RMDir /r "$INSTDIR\NoteSkins\dance\default"
RMDir /r "$INSTDIR\NoteSkins\dance\Delta" RMDir /r "$INSTDIR\NoteSkins\dance\Delta"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-note" RMDir /r "$INSTDIR\NoteSkins\dance\midi-note"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-note-3d"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-routine-p1" RMDir /r "$INSTDIR\NoteSkins\dance\midi-routine-p1"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-routine-p2" RMDir /r "$INSTDIR\NoteSkins\dance\midi-routine-p2"
RMDir /r "$INSTDIR\NoteSkins\dance\midi-solo" RMDir /r "$INSTDIR\NoteSkins\dance\midi-solo"
@@ -751,8 +754,13 @@ Section "Uninstall"
RMDir "$INSTDIR\NoteSkins\dance" RMDir "$INSTDIR\NoteSkins\dance"
RMDir /r "$INSTDIR\NoteSkins\pump\cmd" RMDir /r "$INSTDIR\NoteSkins\pump\cmd"
RMDir /r "$INSTDIR\NoteSkins\pump\cmd-routine-p1"
RMDir /r "$INSTDIR\NoteSkins\pump\cmd-routine-p2"
RMDir /r "$INSTDIR\NoteSkins\pump\complex" RMDir /r "$INSTDIR\NoteSkins\pump\complex"
RMDir /r "$INSTDIR\NoteSkins\pump\default" RMDir /r "$INSTDIR\NoteSkins\pump\default"
RMDir /r "$INSTDIR\NoteSkins\pump\frame5p"
RMDir /r "$INSTDIR\NoteSkins\pump\newextra"
RMDir /r "$INSTDIR\NoteSkins\pump\rhythm"
RMDir /r "$INSTDIR\NoteSkins\pump\simple" RMDir /r "$INSTDIR\NoteSkins\pump\simple"
RMDir "$INSTDIR\NoteSkins\pump" RMDir "$INSTDIR\NoteSkins\pump"
@@ -824,7 +832,7 @@ Section "Uninstall"
Delete "$INSTDIR\Program\zlib1.dll" Delete "$INSTDIR\Program\zlib1.dll"
RMDir "$INSTDIR\Program" RMDir "$INSTDIR\Program"
Delete "$INSTDIR\Licenses.txt" Delete "$INSTDIR\Docs\Licenses.txt"
RMDir /r "$INSTDIR\Manual" RMDir /r "$INSTDIR\Manual"
!endif !endif
+6 -1
View File
@@ -360,12 +360,17 @@ float DisplayBpms::GetMin() const
} }
float DisplayBpms::GetMax() const float DisplayBpms::GetMax() const
{
return this->GetMaxWithin();
}
float DisplayBpms::GetMaxWithin(float highest) const
{ {
float fMax = 0; float fMax = 0;
FOREACH_CONST( float, vfBpms, f ) FOREACH_CONST( float, vfBpms, f )
{ {
if( *f != -1 ) if( *f != -1 )
fMax = max( fMax, *f ); fMax = clamp(max( fMax, *f ), 0, highest);
} }
return fMax; return fMax;
} }
+8
View File
@@ -4,6 +4,7 @@
#define GAME_CONSTANTS_AND_TYPES_H #define GAME_CONSTANTS_AND_TYPES_H
#include "EnumHelper.h" #include "EnumHelper.h"
#include <float.h> // need the max for default.
// Note definitions // Note definitions
/** @brief Define the mininum difficulty value allowed. */ /** @brief Define the mininum difficulty value allowed. */
@@ -513,6 +514,13 @@ struct DisplayBpms
* @return the maximum BPM. * @return the maximum BPM.
*/ */
float GetMax() const; float GetMax() const;
/**
* @brief Retrieve the maximum BPM of the set,
* but no higher than a certain value.
* @param highest the highest BPM to use.
* @return the maximum BPM.
*/
float GetMaxWithin(float highest = FLT_MAX) const;
/** /**
* @brief Determine if the BPM is really constant. * @brief Determine if the BPM is really constant.
* @return Whether the BPM is constant or not. * @return Whether the BPM is constant or not.
+69
View File
@@ -201,6 +201,12 @@ ThemeMetric<int> COMBO_STOPPED_AT ( "Player", "ComboStoppedAt" );
ThemeMetric<float> ATTACK_RUN_TIME_RANDOM ( "Player", "AttackRunTimeRandom" ); ThemeMetric<float> ATTACK_RUN_TIME_RANDOM ( "Player", "AttackRunTimeRandom" );
ThemeMetric<float> ATTACK_RUN_TIME_MINE ( "Player", "AttackRunTimeMine" ); ThemeMetric<float> ATTACK_RUN_TIME_MINE ( "Player", "AttackRunTimeMine" );
/**
* @brief What is our highest cap for mMods?
*
* If set to 0 or less, assume the song takes over. */
ThemeMetric<float> M_MOD_HIGH_CAP("Player", "MModHighCap");
/** @brief Will battle modes have their steps mirrored or kept the same? */ /** @brief Will battle modes have their steps mirrored or kept the same? */
ThemeMetric<bool> BATTLE_RAVE_MIRROR ( "Player", "BattleRaveMirror" ); ThemeMetric<bool> BATTLE_RAVE_MIRROR ( "Player", "BattleRaveMirror" );
@@ -401,6 +407,69 @@ void Player::Init(
break; break;
} }
// calculate M-mod speed here, so we can adjust properly on a per-song basis.
// XXX: can we find a better location for this?
if( m_pPlayerState->m_PlayerOptions.GetCurrent().m_fMaxScrollBPM != 0 )
{
DisplayBpms bpms;
if( GAMESTATE->IsCourseMode() )
{
ASSERT( GAMESTATE->m_pCurTrail[pn] );
GAMESTATE->m_pCurTrail[pn]->GetDisplayBpms( bpms );
}
else
{
ASSERT( GAMESTATE->m_pCurSong );
GAMESTATE->m_pCurSong->GetDisplayBpms( bpms );
}
float fMaxBPM = 0;
/* TODO: Find a way to not go above a certain BPM range
* for getting the max BPM. Otherwise, you get songs
* like Tsuhsuixamush, M550, 0.18x speed. Even slow
* speed readers would not generally find this fun.
* -Wolfman2000
*/
// all BPMs are listed and available, so try them first.
// get the maximum listed value for the song or course.
// if the BPMs are < 0, reset and get the actual values.
if( !bpms.IsSecret() )
{
fMaxBPM = (M_MOD_HIGH_CAP > 0 ?
bpms.GetMaxWithin(M_MOD_HIGH_CAP) :
bpms.GetMax());
fMaxBPM = max( 0, fMaxBPM );
}
// we can't rely on the displayed BPMs, so manually calculate.
if( fMaxBPM == 0 )
{
float fThrowAway = 0;
if( GAMESTATE->IsCourseMode() )
{
FOREACH_CONST( TrailEntry, GAMESTATE->m_pCurTrail[pn]->m_vEntries, e )
{
float fMaxForEntry;
e->pSong->m_SongTiming.GetActualBPM( fThrowAway, fMaxForEntry );
fMaxBPM = max( fMaxForEntry, fMaxBPM );
}
}
else
{
GAMESTATE->m_pCurSong->m_SongTiming.GetActualBPM( fThrowAway, fMaxBPM );
}
}
ASSERT( fMaxBPM > 0 );
// set an X-mod equal to Mnum / fMaxBPM (e.g. M600 with 150 becomes 4x)
PO_GROUP_ASSIGN(m_pPlayerState->m_PlayerOptions, ModsLevel_Preferred, m_fScrollSpeed,
m_pPlayerState->m_PlayerOptions.GetPreferred().m_fMaxScrollBPM / fMaxBPM);
}
float fBalance = GameSoundManager::GetPlayerBalance( pn ); float fBalance = GameSoundManager::GetPlayerBalance( pn );
m_soundMine.SetProperty( "Pan", fBalance ); m_soundMine.SetProperty( "Pan", fBalance );
+43 -6
View File
@@ -26,6 +26,7 @@ ThemeMetric<float> RANDOM_SUDDEN_CHANCE ( "PlayerOptions", "RandomSuddenChance"
void PlayerOptions::Init() void PlayerOptions::Init()
{ {
m_bSetScrollSpeed = false; m_bSetScrollSpeed = false;
m_fMaxScrollBPM = 0; m_SpeedfMaxScrollBPM = 1.0f;
m_fTimeSpacing = 0; m_SpeedfTimeSpacing = 1.0f; m_fTimeSpacing = 0; m_SpeedfTimeSpacing = 1.0f;
m_fScrollSpeed = 1.0f; m_SpeedfScrollSpeed = 1.0f; m_fScrollSpeed = 1.0f; m_SpeedfScrollSpeed = 1.0f;
m_fScrollBPM = 200; m_SpeedfScrollBPM = 1.0f; m_fScrollBPM = 200; m_SpeedfScrollBPM = 1.0f;
@@ -60,6 +61,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
APPROACH( fTimeSpacing ); APPROACH( fTimeSpacing );
APPROACH( fScrollSpeed ); APPROACH( fScrollSpeed );
APPROACH( fMaxScrollBPM );
fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 ); fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 );
for( int i=0; i<NUM_ACCELS; i++ ) for( int i=0; i<NUM_ACCELS; i++ )
APPROACH( fAccels[i] ); APPROACH( fAccels[i] );
@@ -116,6 +118,11 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
if( !m_fTimeSpacing ) if( !m_fTimeSpacing )
{ {
if( m_fMaxScrollBPM )
{
RString s = ssprintf( "m%.0f", m_fMaxScrollBPM );
AddTo.push_back( s );
}
if( m_bSetScrollSpeed || m_fScrollSpeed != 1 ) if( m_bSetScrollSpeed || m_fScrollSpeed != 1 )
{ {
/* -> 1.00 */ /* -> 1.00 */
@@ -332,6 +339,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
SET_FLOAT( fScrollSpeed ) SET_FLOAT( fScrollSpeed )
SET_FLOAT( fTimeSpacing ) SET_FLOAT( fTimeSpacing )
m_fTimeSpacing = 0; m_fTimeSpacing = 0;
m_fMaxScrollBPM = 0;
} }
else if( sscanf( sBit, "c%f", &level ) == 1 ) else if( sscanf( sBit, "c%f", &level ) == 1 )
{ {
@@ -340,17 +348,18 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
SET_FLOAT( fScrollBPM ) SET_FLOAT( fScrollBPM )
SET_FLOAT( fTimeSpacing ) SET_FLOAT( fTimeSpacing )
m_fTimeSpacing = 1; m_fTimeSpacing = 1;
m_fMaxScrollBPM = 0;
} }
/* Port M-Mods from OpenITG, starting from r537 */ // oITG's m-mods
// Midiman // XXX: will not properly tween, I don't think.
else if( sscanf( sBit, "m%f", &level ) == 1 ) else if( sscanf( sBit, "m%f", &level ) == 1 )
{ {
if( !isfinite(level) || level <= 0.0f ) if( !isfinite(level) || level <= 0.0f )
level = 200.0f; // Just pick some value. level = 200.0f;
SET_FLOAT( fScrollBPM ) SET_FLOAT( fMaxScrollBPM )
SET_FLOAT( fTimeSpacing ) m_fTimeSpacing = 0;
m_fTimeSpacing = 1;
} }
else if( sBit == "clearall" ) Init(); else if( sBit == "clearall" ) Init();
else if( sBit == "boost" ) SET_FLOAT( fAccels[ACCEL_BOOST] ) else if( sBit == "boost" ) SET_FLOAT( fAccels[ACCEL_BOOST] )
else if( sBit == "brake" || sBit == "land" ) SET_FLOAT( fAccels[ACCEL_BRAKE] ) else if( sBit == "brake" || sBit == "land" ) SET_FLOAT( fAccels[ACCEL_BRAKE] )
@@ -650,6 +659,7 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
COMPARE(m_fTimeSpacing); COMPARE(m_fTimeSpacing);
COMPARE(m_fScrollSpeed); COMPARE(m_fScrollSpeed);
COMPARE(m_fScrollBPM); COMPARE(m_fScrollBPM);
COMPARE(m_fMaxScrollBPM);
COMPARE(m_fRandomSpeed); COMPARE(m_fRandomSpeed);
COMPARE(m_FailType); COMPARE(m_FailType);
COMPARE(m_bMuteOnError); COMPARE(m_bMuteOnError);
@@ -717,6 +727,31 @@ bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerN
return true; return true;
if( m_fCover ) return true; if( m_fCover ) return true;
// M-mods make songs with indefinite BPMs easier because
// they ensure that the song has a scrollable speed.
if( m_fMaxScrollBPM != 0 )
{
// BPM display is obfuscated
// if( pSong->m_DisplayBPMType == DISPLAY_BPM_RANDOM )
// return true;
DisplayBpms bpms;
if( GAMESTATE->IsCourseMode() )
{
Trail *pTrail = GAMESTATE->m_pCurCourse->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType );
pTrail->GetDisplayBpms( bpms );
}
else
{
GAMESTATE->m_pCurSong->GetDisplayBpms( bpms );
}
pSong->GetDisplayBpms( bpms );
// maximum BPM is obfuscated, so M-mods will set a playable speed.
if( bpms.GetMax() <= 0 )
return true;
}
if( m_fPlayerAutoPlay ) return true; if( m_fPlayerAutoPlay ) return true;
return false; return false;
} }
@@ -788,6 +823,7 @@ RString PlayerOptions::GetSavedPrefsString() const
SAVE( m_fTimeSpacing ); SAVE( m_fTimeSpacing );
SAVE( m_fScrollSpeed ); SAVE( m_fScrollSpeed );
SAVE( m_fScrollBPM ); SAVE( m_fScrollBPM );
SAVE( m_fMaxScrollBPM );
SAVE( m_fScrolls[SCROLL_REVERSE] ); SAVE( m_fScrolls[SCROLL_REVERSE] );
SAVE( m_fPerspectiveTilt ); SAVE( m_fPerspectiveTilt );
SAVE( m_bTransforms[TRANSFORM_NOHOLDS] ); SAVE( m_bTransforms[TRANSFORM_NOHOLDS] );
@@ -816,6 +852,7 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type )
CPY( m_fTimeSpacing ); CPY( m_fTimeSpacing );
CPY( m_fScrollSpeed ); CPY( m_fScrollSpeed );
CPY( m_fScrollBPM ); CPY( m_fScrollBPM );
CPY( m_fMaxScrollBPM );
break; break;
case saved_prefs_invalid_for_course: case saved_prefs_invalid_for_course:
break; break;
+1
View File
@@ -157,6 +157,7 @@ public:
* PlayerOptions::Approach approaches. */ * PlayerOptions::Approach approaches. */
bool m_bSetScrollSpeed; // true if the scroll speed was set by FromString bool m_bSetScrollSpeed; // true if the scroll speed was set by FromString
float m_fTimeSpacing, m_SpeedfTimeSpacing; // instead of Beat spacing (CMods, mMods) float m_fTimeSpacing, m_SpeedfTimeSpacing; // instead of Beat spacing (CMods, mMods)
float m_fMaxScrollBPM, m_SpeedfMaxScrollBPM;
float m_fScrollSpeed, m_SpeedfScrollSpeed; // used if !m_bTimeSpacing (xMods) float m_fScrollSpeed, m_SpeedfScrollSpeed; // used if !m_bTimeSpacing (xMods)
float m_fScrollBPM, m_SpeedfScrollBPM; // used if m_bTimeSpacing (CMod) float m_fScrollBPM, m_SpeedfScrollBPM; // used if m_bTimeSpacing (CMod)
float m_fAccels[NUM_ACCELS], m_SpeedfAccels[NUM_ACCELS]; float m_fAccels[NUM_ACCELS], m_SpeedfAccels[NUM_ACCELS];
+2 -2
View File
@@ -35,7 +35,7 @@
* </li></ul> * </li></ul>
*/ */
#ifndef PRODUCT_VER_BARE #ifndef PRODUCT_VER_BARE
#define PRODUCT_VER_BARE v5.0 Preview 1a #define PRODUCT_VER_BARE v5.0 Preview 2
#endif #endif
/** /**
@@ -54,7 +54,7 @@
#define PRODUCT_VER PRODUCT_XSTRINGIFY(PRODUCT_VER_BARE) #define PRODUCT_VER PRODUCT_XSTRINGIFY(PRODUCT_VER_BARE)
#define PRODUCT_ID_VER PRODUCT_XSTRINGIFY(PRODUCT_ID_VER_BARE) #define PRODUCT_ID_VER PRODUCT_XSTRINGIFY(PRODUCT_ID_VER_BARE)
#define VIDEO_TROUBLESHOOTING_URL "http://www.stepmania.com/stepmania/mediawiki.php?title=Video_Driver_Troubleshooting" #define VIDEO_TROUBLESHOOTING_URL "http://www.stepmania.com/stepmaniawiki.php?title=Video_Driver_Troubleshooting"
/** @brief The URL to report bugs on the program. */ /** @brief The URL to report bugs on the program. */
#define REPORT_BUG_URL "http://ssc.ajworld.net/sm-ssc/bugtracker/" #define REPORT_BUG_URL "http://ssc.ajworld.net/sm-ssc/bugtracker/"
+1 -1
View File
@@ -5,7 +5,7 @@
; see ProductInfo.h for use descriptions ; see ProductInfo.h for use descriptions
!define PRODUCT_ID "StepMania" !define PRODUCT_ID "StepMania"
!define PRODUCT_VER "v5.0 Preview 1a" !define PRODUCT_VER "v5.0 Preview 2"
!define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}" !define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}"
!define PRODUCT_BITMAP "ssc" !define PRODUCT_BITMAP "ssc"
+10
View File
@@ -808,7 +808,17 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input ) void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
{ {
PlayerNumber pn = input.pn; PlayerNumber pn = input.pn;
int iCurRow = m_iCurrentRow[pn]; int iCurRow = m_iCurrentRow[pn];
if( iCurRow < 0 )
{
// this shouldn't be happening, but it is, so we need to bail out. -aj
SCREENMAN->PlayStartSound();
this->BeginFadingOut();
return;
}
OptionRow &row = *m_pRows[iCurRow]; OptionRow &row = *m_pRows[iCurRow];
if( m_OptionsNavigation == NAV_THREE_KEY_MENU && row.GetRowType() != OptionRow::RowType_Exit ) if( m_OptionsNavigation == NAV_THREE_KEY_MENU && row.GetRowType() != OptionRow::RowType_Exit )
+1 -1
View File
@@ -372,7 +372,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=".;&quot;..\extern\lua-5.1\src&quot;;ffmpeg\modern_working\include;BaseClasses;..\extern\jsoncpp\include;&quot;..\extern\glew-1.5.8\include&quot;;..\extern\pcre;&quot;..\extern\mad-0.15.1b&quot;;..\extern\libpng\include;..\extern\libjpeg;..\extern\zlib;..\extern\vorbis" AdditionalIncludeDirectories=".;&quot;..\extern\lua-5.1\src&quot;;ffmpeg\modern_working\include;BaseClasses;..\extern\jsoncpp\include;&quot;..\extern\glew-1.5.8\include&quot;;..\extern\pcre;&quot;..\extern\mad-0.15.1b&quot;;..\extern\libpng\include;..\extern\libjpeg;..\extern\zlib;..\extern\vorbis"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINDOWS;RELEASE;GLEW_STATIC"
StringPooling="true" StringPooling="true"
MinimalRebuild="false" MinimalRebuild="false"
ExceptionHandling="0" ExceptionHandling="0"
+1 -6
View File
@@ -1332,12 +1332,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
m_LabelSegments[i].Scale( iStartIndex, length, newLength ); m_LabelSegments[i].Scale( iStartIndex, length, newLength );
for ( unsigned i = 0; i < m_SpeedSegments.size(); i++ ) for ( unsigned i = 0; i < m_SpeedSegments.size(); i++ )
{ m_SpeedSegments[i].Scale( iStartIndex, length, newLength );
SpeedSegment &s = m_SpeedSegments[i];
s.Scale( iStartIndex, length, newLength );
if (s.GetUnit() == 0) // beats
s.SetLength(s.GetLength() * fScale);
}
for( unsigned i = 0; i < m_FakeSegments.size(); i++ ) for( unsigned i = 0; i < m_FakeSegments.size(); i++ )
m_FakeSegments[i].Scale( iStartIndex, length, newLength ); m_FakeSegments[i].Scale( iStartIndex, length, newLength );
+14
View File
@@ -250,6 +250,20 @@ void SpeedSegment::SetUnit(const int i)
this->unit = static_cast<unsigned short>(i); this->unit = static_cast<unsigned short>(i);
} }
void SpeedSegment::Scale( int start, int length, int newLength )
{
if( GetUnit() == 0 )
{
// XXX: this function is duplicated, there should be a better way
float startBeat = GetBeat();
float endBeat = startBeat + GetLength();
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
SetLength( newEndBeat - newStartBeat );
}
TimingSegment<SpeedSegment>::Scale( start, length, newLength );
}
bool SpeedSegment::operator<( const SpeedSegment &other ) const bool SpeedSegment::operator<( const SpeedSegment &other ) const
{ {
LTCOMPARE(GetRow()); LTCOMPARE(GetRow());
+2
View File
@@ -681,6 +681,8 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
* @param i the unit. */ * @param i the unit. */
void SetUnit(const int i); void SetUnit(const int i);
void Scale( int start, int length, int newLength );
/** /**
* @brief Compares two SpeedSegments to see if one is less than the other. * @brief Compares two SpeedSegments to see if one is less than the other.
* @param other the other SpeedSegment to compare to. * @param other the other SpeedSegment to compare to.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 740 KiB

+5 -5
View File
@@ -181,8 +181,8 @@ IDI_ICON1 ICON "smzip.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,0,0,2 FILEVERSION 5,0,0,3
PRODUCTVERSION 5,0,0,2 PRODUCTVERSION 5,0,0,3
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@@ -199,12 +199,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "StepMania Team\nhttp://www.stepmania.com/" VALUE "CompanyName", "StepMania Team\nhttp://www.stepmania.com/"
VALUE "FileDescription", "StepMania" VALUE "FileDescription", "StepMania"
VALUE "FileVersion", "5, 0, 0, 2" VALUE "FileVersion", "5, 0, 0, 3"
VALUE "InternalName", "sm-ssc" VALUE "InternalName", "sm-ssc v1.3.1"
VALUE "LegalCopyright", "Copyright © 2001-2011" VALUE "LegalCopyright", "Copyright © 2001-2011"
VALUE "OriginalFilename", "StepMania.exe" VALUE "OriginalFilename", "StepMania.exe"
VALUE "ProductName", "StepMania" VALUE "ProductName", "StepMania"
VALUE "ProductVersion", "5, 0, 0, 2" VALUE "ProductVersion", "5, 0, 0, 3"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"