Merge with default
This commit is contained in:
@@ -360,12 +360,17 @@ float DisplayBpms::GetMin() const
|
||||
}
|
||||
|
||||
float DisplayBpms::GetMax() const
|
||||
{
|
||||
return this->GetMaxWithin();
|
||||
}
|
||||
|
||||
float DisplayBpms::GetMaxWithin(float highest) const
|
||||
{
|
||||
float fMax = 0;
|
||||
FOREACH_CONST( float, vfBpms, f )
|
||||
{
|
||||
if( *f != -1 )
|
||||
fMax = max( fMax, *f );
|
||||
fMax = clamp(max( fMax, *f ), 0, highest);
|
||||
}
|
||||
return fMax;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define GAME_CONSTANTS_AND_TYPES_H
|
||||
|
||||
#include "EnumHelper.h"
|
||||
#include <float.h> // need the max for default.
|
||||
|
||||
// Note definitions
|
||||
/** @brief Define the mininum difficulty value allowed. */
|
||||
@@ -513,6 +514,13 @@ struct DisplayBpms
|
||||
* @return the maximum BPM.
|
||||
*/
|
||||
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.
|
||||
* @return Whether the BPM is constant or not.
|
||||
|
||||
@@ -201,6 +201,12 @@ ThemeMetric<int> COMBO_STOPPED_AT ( "Player", "ComboStoppedAt" );
|
||||
ThemeMetric<float> ATTACK_RUN_TIME_RANDOM ( "Player", "AttackRunTimeRandom" );
|
||||
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? */
|
||||
ThemeMetric<bool> BATTLE_RAVE_MIRROR ( "Player", "BattleRaveMirror" );
|
||||
|
||||
@@ -401,6 +407,69 @@ void Player::Init(
|
||||
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 );
|
||||
m_soundMine.SetProperty( "Pan", fBalance );
|
||||
|
||||
+43
-6
@@ -26,6 +26,7 @@ ThemeMetric<float> RANDOM_SUDDEN_CHANCE ( "PlayerOptions", "RandomSuddenChance"
|
||||
void PlayerOptions::Init()
|
||||
{
|
||||
m_bSetScrollSpeed = false;
|
||||
m_fMaxScrollBPM = 0; m_SpeedfMaxScrollBPM = 1.0f;
|
||||
m_fTimeSpacing = 0; m_SpeedfTimeSpacing = 1.0f;
|
||||
m_fScrollSpeed = 1.0f; m_SpeedfScrollSpeed = 1.0f;
|
||||
m_fScrollBPM = 200; m_SpeedfScrollBPM = 1.0f;
|
||||
@@ -60,6 +61,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
|
||||
APPROACH( fTimeSpacing );
|
||||
APPROACH( fScrollSpeed );
|
||||
APPROACH( fMaxScrollBPM );
|
||||
fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 );
|
||||
for( int i=0; i<NUM_ACCELS; i++ )
|
||||
APPROACH( fAccels[i] );
|
||||
@@ -116,6 +118,11 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
|
||||
if( !m_fTimeSpacing )
|
||||
{
|
||||
if( m_fMaxScrollBPM )
|
||||
{
|
||||
RString s = ssprintf( "m%.0f", m_fMaxScrollBPM );
|
||||
AddTo.push_back( s );
|
||||
}
|
||||
if( m_bSetScrollSpeed || m_fScrollSpeed != 1 )
|
||||
{
|
||||
/* -> 1.00 */
|
||||
@@ -332,6 +339,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
SET_FLOAT( fScrollSpeed )
|
||||
SET_FLOAT( fTimeSpacing )
|
||||
m_fTimeSpacing = 0;
|
||||
m_fMaxScrollBPM = 0;
|
||||
}
|
||||
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( fTimeSpacing )
|
||||
m_fTimeSpacing = 1;
|
||||
m_fMaxScrollBPM = 0;
|
||||
}
|
||||
/* Port M-Mods from OpenITG, starting from r537 */
|
||||
// Midiman
|
||||
// oITG's m-mods
|
||||
// XXX: will not properly tween, I don't think.
|
||||
else if( sscanf( sBit, "m%f", &level ) == 1 )
|
||||
{
|
||||
if( !isfinite(level) || level <= 0.0f )
|
||||
level = 200.0f; // Just pick some value.
|
||||
SET_FLOAT( fScrollBPM )
|
||||
SET_FLOAT( fTimeSpacing )
|
||||
m_fTimeSpacing = 1;
|
||||
level = 200.0f;
|
||||
SET_FLOAT( fMaxScrollBPM )
|
||||
m_fTimeSpacing = 0;
|
||||
}
|
||||
|
||||
else if( sBit == "clearall" ) Init();
|
||||
else if( sBit == "boost" ) SET_FLOAT( fAccels[ACCEL_BOOST] )
|
||||
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_fScrollSpeed);
|
||||
COMPARE(m_fScrollBPM);
|
||||
COMPARE(m_fMaxScrollBPM);
|
||||
COMPARE(m_fRandomSpeed);
|
||||
COMPARE(m_FailType);
|
||||
COMPARE(m_bMuteOnError);
|
||||
@@ -717,6 +727,31 @@ bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerN
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
@@ -788,6 +823,7 @@ RString PlayerOptions::GetSavedPrefsString() const
|
||||
SAVE( m_fTimeSpacing );
|
||||
SAVE( m_fScrollSpeed );
|
||||
SAVE( m_fScrollBPM );
|
||||
SAVE( m_fMaxScrollBPM );
|
||||
SAVE( m_fScrolls[SCROLL_REVERSE] );
|
||||
SAVE( m_fPerspectiveTilt );
|
||||
SAVE( m_bTransforms[TRANSFORM_NOHOLDS] );
|
||||
@@ -816,6 +852,7 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type )
|
||||
CPY( m_fTimeSpacing );
|
||||
CPY( m_fScrollSpeed );
|
||||
CPY( m_fScrollBPM );
|
||||
CPY( m_fMaxScrollBPM );
|
||||
break;
|
||||
case saved_prefs_invalid_for_course:
|
||||
break;
|
||||
|
||||
@@ -157,6 +157,7 @@ public:
|
||||
* PlayerOptions::Approach approaches. */
|
||||
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_fMaxScrollBPM, m_SpeedfMaxScrollBPM;
|
||||
float m_fScrollSpeed, m_SpeedfScrollSpeed; // used if !m_bTimeSpacing (xMods)
|
||||
float m_fScrollBPM, m_SpeedfScrollBPM; // used if m_bTimeSpacing (CMod)
|
||||
float m_fAccels[NUM_ACCELS], m_SpeedfAccels[NUM_ACCELS];
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@
|
||||
* </li></ul>
|
||||
*/
|
||||
#ifndef PRODUCT_VER_BARE
|
||||
#define PRODUCT_VER_BARE v5.0 Preview 1a
|
||||
#define PRODUCT_VER_BARE v5.0 Preview 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@
|
||||
#define PRODUCT_VER PRODUCT_XSTRINGIFY(PRODUCT_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. */
|
||||
#define REPORT_BUG_URL "http://ssc.ajworld.net/sm-ssc/bugtracker/"
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
; see ProductInfo.h for use descriptions
|
||||
!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_BITMAP "ssc"
|
||||
|
||||
|
||||
+3
-3
@@ -1242,14 +1242,14 @@ bool GetFileContents( const RString &sPath, RString &sOut, bool bOneLine )
|
||||
/* Don't warn if the file doesn't exist, but do warn if it exists and fails to open. */
|
||||
if( !IsAFile(sPath) )
|
||||
return false;
|
||||
|
||||
|
||||
RageFile file;
|
||||
if( !file.Open(sPath) )
|
||||
{
|
||||
LOG->Warn( "GetFileContents(%s): %s", sPath.c_str(), file.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
RString sData;
|
||||
int iGot;
|
||||
if( bOneLine )
|
||||
@@ -1265,7 +1265,7 @@ bool GetFileContents( const RString &sPath, RString &sOut, bool bOneLine )
|
||||
|
||||
if( bOneLine )
|
||||
StripCrnl( sData );
|
||||
|
||||
|
||||
sOut = sData;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -808,7 +808,17 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
|
||||
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
|
||||
{
|
||||
PlayerNumber pn = input.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];
|
||||
|
||||
if( m_OptionsNavigation == NAV_THREE_KEY_MENU && row.GetRowType() != OptionRow::RowType_Exit )
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories=".;"..\extern\lua-5.1\src";ffmpeg\modern_working\include;BaseClasses;..\extern\jsoncpp\include;"..\extern\glew-1.5.8\include";..\extern\pcre;"..\extern\mad-0.15.1b";..\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"
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="0"
|
||||
|
||||
+1
-6
@@ -1332,12 +1332,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
|
||||
m_LabelSegments[i].Scale( iStartIndex, length, newLength );
|
||||
|
||||
for ( unsigned i = 0; i < m_SpeedSegments.size(); i++ )
|
||||
{
|
||||
SpeedSegment &s = m_SpeedSegments[i];
|
||||
s.Scale( iStartIndex, length, newLength );
|
||||
if (s.GetUnit() == 0) // beats
|
||||
s.SetLength(s.GetLength() * fScale);
|
||||
}
|
||||
m_SpeedSegments[i].Scale( iStartIndex, length, newLength );
|
||||
|
||||
for( unsigned i = 0; i < m_FakeSegments.size(); i++ )
|
||||
m_FakeSegments[i].Scale( iStartIndex, length, newLength );
|
||||
|
||||
@@ -250,6 +250,20 @@ void SpeedSegment::SetUnit(const int 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
|
||||
{
|
||||
LTCOMPARE(GetRow());
|
||||
|
||||
@@ -681,6 +681,8 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
|
||||
* @param i the unit. */
|
||||
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.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 740 KiB |
@@ -181,8 +181,8 @@ IDI_ICON1 ICON "smzip.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 5,0,0,2
|
||||
PRODUCTVERSION 5,0,0,2
|
||||
FILEVERSION 5,0,0,3
|
||||
PRODUCTVERSION 5,0,0,3
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -199,12 +199,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "StepMania Team\nhttp://www.stepmania.com/"
|
||||
VALUE "FileDescription", "StepMania"
|
||||
VALUE "FileVersion", "5, 0, 0, 2"
|
||||
VALUE "InternalName", "sm-ssc"
|
||||
VALUE "FileVersion", "5, 0, 0, 3"
|
||||
VALUE "InternalName", "sm-ssc v1.3.1"
|
||||
VALUE "LegalCopyright", "Copyright © 2001-2011"
|
||||
VALUE "OriginalFilename", "StepMania.exe"
|
||||
VALUE "ProductName", "StepMania"
|
||||
VALUE "ProductVersion", "5, 0, 0, 2"
|
||||
VALUE "ProductVersion", "5, 0, 0, 3"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in New Issue
Block a user