now loads couple and battle steps correctly
This commit is contained in:
@@ -215,13 +215,31 @@ void Player::SetX( float fX )
|
||||
}
|
||||
|
||||
|
||||
void Player::SetSteps( const Steps& newSteps )
|
||||
void Player::SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide, bool bLoadOnlyRightSide )
|
||||
{
|
||||
for( int i=0; i<MAX_STEP_ELEMENTS; i++ ) {
|
||||
// copy the steps
|
||||
for( int i=0; i<MAX_STEP_ELEMENTS; i++ )
|
||||
{
|
||||
m_OriginalStep[i] = newSteps.m_steps[i];
|
||||
m_LeftToStepOn[i] = newSteps.m_steps[i];
|
||||
|
||||
if( bLoadOnlyLeftSide ) {
|
||||
// mask off the pad2 steps
|
||||
m_OriginalStep[i] &= ~(STEP_PAD2_LEFT | STEP_PAD2_UPLEFT | STEP_PAD2_DOWN | STEP_PAD2_UP | STEP_PAD2_UPRIGHT | STEP_PAD2_RIGHT );
|
||||
} else if( bLoadOnlyRightSide ) {
|
||||
// replace the step making pad2's step the new pad1 step
|
||||
Step new_step = (m_OriginalStep[i]&STEP_PAD2_LEFT ? STEP_PAD1_LEFT : 0) |
|
||||
(m_OriginalStep[i]&STEP_PAD2_UPLEFT ? STEP_PAD1_UPLEFT : 0) |
|
||||
(m_OriginalStep[i]&STEP_PAD2_DOWN ? STEP_PAD1_DOWN : 0) |
|
||||
(m_OriginalStep[i]&STEP_PAD2_UP ? STEP_PAD1_UP : 0) |
|
||||
(m_OriginalStep[i]&STEP_PAD2_UPRIGHT? STEP_PAD1_UPRIGHT : 0) |
|
||||
(m_OriginalStep[i]&STEP_PAD2_RIGHT ? STEP_PAD1_RIGHT : 0);
|
||||
m_OriginalStep[i] = new_step;
|
||||
}
|
||||
|
||||
m_LeftToStepOn[i] = m_OriginalStep[i];
|
||||
m_iColorArrowFrameOffset[i] = (int)( i/(FLOAT)ELEMENTS_PER_BEAT*NUM_FRAMES_IN_COLOR_ARROW_SPRITE );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Player::Update( const float &fDeltaTime, float fSongBeat, float fMaxBeatDifference )
|
||||
|
||||
@@ -31,7 +31,7 @@ class Player
|
||||
public:
|
||||
Player();
|
||||
|
||||
void SetSteps( const Steps& newSteps );
|
||||
void SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide = false, bool bLoadOnlyRightSide = false );
|
||||
void SetX( float fX );
|
||||
void Update( const float &fDeltaTime, float fSongBeat, float fMaxBeatDifference );
|
||||
void Draw();
|
||||
|
||||
@@ -419,13 +419,10 @@ void Song::GetStepsThatMatchGameMode( GameMode gm, CArray<Steps*, Steps*&>& arra
|
||||
|
||||
void Song::GetNumFeet( GameMode gm, int& iDiffEasyOut, int& iDiffMediumOut, int& iDiffHardOut )
|
||||
{
|
||||
iDiffEasyOut = iDiffMediumOut = iDiffHardOut = -1;
|
||||
iDiffEasyOut = iDiffMediumOut = iDiffHardOut = -1; // -1 means not found
|
||||
CArray<Steps*, Steps*&> arrayMatchingSteps;
|
||||
GetStepsThatMatchGameMode( gm, arrayMatchingSteps );
|
||||
|
||||
//bool bFoundEasy, bFoundMedium, bFoundHard;
|
||||
//bFoundEasy = bFoundMedium = bFoundHard = false;
|
||||
|
||||
for( int i=0; i<arrayMatchingSteps.GetSize(); i++ )
|
||||
{
|
||||
int iNumFeet = arrayMatchingSteps[i]->m_iNumFeet;
|
||||
@@ -447,7 +444,7 @@ void Song::GetNumFeet( GameMode gm, int& iDiffEasyOut, int& iDiffMediumOut, int&
|
||||
iDiffEasyOut = iNumFeet;
|
||||
else if( iDiffHardOut < 0 && iNumFeet >= 7 )
|
||||
iDiffHardOut = iNumFeet;
|
||||
else
|
||||
else if( iDiffMediumOut < 0 )
|
||||
iDiffMediumOut = iNumFeet;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /GB /MT /W3 /GX /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
|
||||
Reference in New Issue
Block a user