Add Pump it Up's X Mode (thanks to StepNXA); this version should work with all gametypes and stepstypes.
This commit is contained in:
+35
-10
@@ -310,7 +310,7 @@ float ArrowEffects::GetYPos( const PlayerState* pPlayerState, int iCol, float fY
|
||||
// In beware's DDR Extreme-focused fork of StepMania 3.9, this value is
|
||||
// floored, making arrows show on integer Y coordinates. Supposedly it makes
|
||||
// the arrows look better, but testing needs to be done.
|
||||
// todo: make this a preference -aj
|
||||
// todo: make this a noteskin metric ("QuantizeArrowYPosition") -aj
|
||||
return f;
|
||||
//return floor(f);
|
||||
}
|
||||
@@ -377,14 +377,39 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_BEAT] * fShift;
|
||||
}
|
||||
|
||||
/*
|
||||
if( fEffects[PlayerOptions::SCROLL_X] != 0 )
|
||||
if( fEffects[PlayerOptions::EFFECT_XMODE] != 0 )
|
||||
{
|
||||
// Compare pPlayerState->m_PlayerNumber.
|
||||
// notes will go \ for p1 and / for p2.
|
||||
// pCols[iColNum] for each column.
|
||||
// based off of code by v1toko for StepNXA, except it should work on
|
||||
// any gametype now.
|
||||
switch( pStyle->m_StyleType )
|
||||
{
|
||||
case StyleType_OnePlayerTwoSides:
|
||||
case StyleType_TwoPlayersSharedSides: // fall through?
|
||||
{
|
||||
// find the middle, and split based on iColNum
|
||||
// it's unknown if this will work for routine.
|
||||
const int iMiddleColumn = floor(pStyle->m_iColsPerPlayer/2.0f);
|
||||
if( iColNum > iMiddleColumn-1 )
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_XMODE]*-(fYOffset);
|
||||
else
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_XMODE]*fYOffset;
|
||||
}
|
||||
break;
|
||||
case StyleType_OnePlayerOneSide:
|
||||
case StyleType_TwoPlayersTwoSides: // fall through
|
||||
{
|
||||
// the code was the same for both of these cases in StepNXA.
|
||||
if( pPlayerState->m_PlayerNumber == PLAYER_2 )
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_XMODE]*-(fYOffset);
|
||||
else
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_XMODE]*fYOffset;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT("What the hell kind of styletype are you passing me anyways?");
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
fPixelOffsetFromCenter += pCols[iColNum].fXOffset;
|
||||
|
||||
@@ -554,7 +579,7 @@ float ArrowGetPercentVisible( const PlayerState* pPlayerState, float fYPosWithou
|
||||
|
||||
float ArrowEffects::GetAlpha( const PlayerState* pPlayerState, int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
{
|
||||
/* Get the YPos without reverse (that is, factor in EFFECT_TIPSY). */
|
||||
// Get the YPos without reverse (that is, factor in EFFECT_TIPSY).
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos( pPlayerState, iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
|
||||
float fPercentVisible = ArrowGetPercentVisible( pPlayerState, fYPosWithoutReverse );
|
||||
@@ -576,7 +601,7 @@ float ArrowEffects::GetAlpha( const PlayerState* pPlayerState, int iCol, float f
|
||||
|
||||
float ArrowEffects::GetGlow( const PlayerState* pPlayerState, int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
{
|
||||
/* Get the YPos without reverse (that is, factor in EFFECT_TIPSY). */
|
||||
// Get the YPos without reverse (that is, factor in EFFECT_TIPSY).
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos( pPlayerState, iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
|
||||
float fPercentVisible = ArrowGetPercentVisible( pPlayerState, fYPosWithoutReverse );
|
||||
@@ -654,7 +679,7 @@ float ArrowEffects::GetFrameWidthScale( const PlayerState* pPlayerState, float f
|
||||
float fWidthEffect = pPlayerState->m_EffectHistory.GetSample( fSecond );
|
||||
if( fWidthEffect != 0 && FRAME_WIDTH_LOCK_EFFECTS_TO_OVERLAPPING )
|
||||
{
|
||||
/* Don't display effect data that happened before this hold overlapped the top. */
|
||||
// Don't display effect data that happened before this hold overlapped the top.
|
||||
float fFromEndOfOverlapped = fOverlappedTime - fSecond;
|
||||
float fTrailingPixels = FRAME_WIDTH_LOCK_EFFECTS_TWEEN_PIXELS;
|
||||
float fTrailingSeconds = fTrailingPixels / fPixelsPerSecond;
|
||||
|
||||
@@ -149,6 +149,7 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fEffects[EFFECT_TIPSY], "Tipsy" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BUMPY], "Bumpy" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BEAT], "Beat" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_XMODE], "XMode" );
|
||||
|
||||
AddPart( AddTo, m_fAppearances[APPEARANCE_HIDDEN], "Hidden" );
|
||||
AddPart( AddTo, m_fAppearances[APPEARANCE_HIDDEN_OFFSET], "HiddenOffset" );
|
||||
@@ -163,7 +164,6 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fScrolls[SCROLL_ALTERNATE], "Alternate" );
|
||||
AddPart( AddTo, m_fScrolls[SCROLL_CROSS], "Cross" );
|
||||
AddPart( AddTo, m_fScrolls[SCROLL_CENTERED], "Centered" );
|
||||
//AddPart( AddTo, m_fScrolls[SCROLL_X], "XMode" );
|
||||
|
||||
AddPart( AddTo, m_fDark, "Dark" );
|
||||
|
||||
@@ -305,7 +305,6 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sBit = asParts.back();
|
||||
|
||||
#define SET_FLOAT( opt ) { m_ ## opt = level; m_Speed ## opt = speed; }
|
||||
@@ -328,7 +327,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
SET_FLOAT( fTimeSpacing )
|
||||
m_fTimeSpacing = 1;
|
||||
}
|
||||
/* Port M-Mod's from OpenITG, starting from r537 */
|
||||
/* Port M-Mods from OpenITG, starting from r537 */
|
||||
// Midiman
|
||||
else if( sscanf( sBit, "m%f", &level ) == 1 )
|
||||
{
|
||||
@@ -355,6 +354,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "tipsy" ) SET_FLOAT( fEffects[EFFECT_TIPSY] )
|
||||
else if( sBit == "bumpy" ) SET_FLOAT( fEffects[EFFECT_BUMPY] )
|
||||
else if( sBit == "beat" ) SET_FLOAT( fEffects[EFFECT_BEAT] )
|
||||
else if( sBit == "xmode" ) SET_FLOAT( fEffects[EFFECT_XMODE] )
|
||||
else if( sBit == "hidden" ) SET_FLOAT( fAppearances[APPEARANCE_HIDDEN] )
|
||||
else if( sBit == "hiddenoffset" ) SET_FLOAT( fAppearances[APPEARANCE_HIDDEN_OFFSET] )
|
||||
else if( sBit == "sudden" ) SET_FLOAT( fAppearances[APPEARANCE_SUDDEN] )
|
||||
@@ -391,7 +391,6 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "alternate" ) SET_FLOAT( fScrolls[SCROLL_ALTERNATE] )
|
||||
else if( sBit == "cross" ) SET_FLOAT( fScrolls[SCROLL_CROSS] )
|
||||
else if( sBit == "centered" ) SET_FLOAT( fScrolls[SCROLL_CENTERED] )
|
||||
//else if( sBit == "xmode" ) SET_FLOAT( fScrolls[SCROLL_X] )
|
||||
else if( sBit == "noholds" ) m_bTransforms[TRANSFORM_NOHOLDS] = on;
|
||||
else if( sBit == "norolls" ) m_bTransforms[TRANSFORM_NOROLLS] = on;
|
||||
else if( sBit == "nomines" ) m_bTransforms[TRANSFORM_NOMINES] = on;
|
||||
@@ -611,7 +610,7 @@ float PlayerOptions::GetReversePercentForColumn( int iCol ) const
|
||||
int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer;
|
||||
|
||||
f += m_fScrolls[SCROLL_REVERSE];
|
||||
|
||||
|
||||
if( iCol >= iNumCols/2 )
|
||||
f += m_fScrolls[SCROLL_SPLIT];
|
||||
|
||||
|
||||
+1
-1
@@ -58,6 +58,7 @@ public:
|
||||
EFFECT_TIPSY,
|
||||
EFFECT_BUMPY,
|
||||
EFFECT_BEAT,
|
||||
EFFECT_XMODE,
|
||||
NUM_EFFECTS
|
||||
};
|
||||
enum Appearance {
|
||||
@@ -110,7 +111,6 @@ public:
|
||||
SCROLL_ALTERNATE,
|
||||
SCROLL_CROSS,
|
||||
SCROLL_CENTERED,
|
||||
//SCROLL_X,
|
||||
NUM_SCROLLS
|
||||
};
|
||||
enum ScoreDisplay {
|
||||
|
||||
Reference in New Issue
Block a user