[splittiming] new EffectModes (not available from Lua yet), clarified error message
This commit is contained in:
@@ -68,6 +68,12 @@ void Actor::SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBe
|
|||||||
g_fCurrentBGMBeatNoOffset = fBeatNoOffset;
|
g_fCurrentBGMBeatNoOffset = fBeatNoOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Actor::SetPlayerBGMBeat( PlayerNumber pn, float fBeat, float fBeatNoOffset )
|
||||||
|
{
|
||||||
|
g_vfCurrentBGMBeatPlayer[pn] = fBeat;
|
||||||
|
g_vfCurrentBGMBeatPlayerNoOffset[pn] = fBeatNoOffset;
|
||||||
|
}
|
||||||
|
|
||||||
void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
||||||
{
|
{
|
||||||
ASSERT( iLightNumber < NUM_CabinetLight );
|
ASSERT( iLightNumber < NUM_CabinetLight );
|
||||||
@@ -676,6 +682,16 @@ void Actor::UpdateInternal( float fDeltaTime )
|
|||||||
m_fSecsIntoEffect = g_fCurrentBGMBeat;
|
m_fSecsIntoEffect = g_fCurrentBGMBeat;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CLOCK_BGM_BEAT_PLAYER1:
|
||||||
|
m_fEffectDelta = g_vfCurrentBGMBeat[PlayerNumber_P1] - m_fSecsIntoEffect;
|
||||||
|
m_fSecsIntoEffect = g_vfCurrentBGMBeat[PlayerNumber_P1];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CLOCK_BGM_BEAT_PLAYER2:
|
||||||
|
m_fEffectDelta = g_vfCurrentBGMBeat[PlayerNumber_P2] - m_fSecsIntoEffect;
|
||||||
|
m_fSecsIntoEffect = g_vfCurrentBGMBeat[PlayerNumber_P2];
|
||||||
|
break;
|
||||||
|
|
||||||
case CLOCK_BGM_TIME:
|
case CLOCK_BGM_TIME:
|
||||||
m_fEffectDelta = g_fCurrentBGMTime - m_fSecsIntoEffect;
|
m_fEffectDelta = g_fCurrentBGMTime - m_fSecsIntoEffect;
|
||||||
m_fSecsIntoEffect = g_fCurrentBGMTime;
|
m_fSecsIntoEffect = g_fCurrentBGMTime;
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ public:
|
|||||||
virtual void LoadFromNode( const XNode* pNode );
|
virtual void LoadFromNode( const XNode* pNode );
|
||||||
|
|
||||||
static void SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBeatNoOffset );
|
static void SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBeatNoOffset );
|
||||||
|
static void SetPlayerBGMBeat( PlayerNumber pn, float fBeat, float fBeatNoOffset );
|
||||||
static void SetBGMLight( int iLightNumber, float fCabinetLights );
|
static void SetBGMLight( int iLightNumber, float fCabinetLights );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,6 +132,8 @@ public:
|
|||||||
CLOCK_BGM_BEAT,
|
CLOCK_BGM_BEAT,
|
||||||
CLOCK_BGM_TIME_NO_OFFSET,
|
CLOCK_BGM_TIME_NO_OFFSET,
|
||||||
CLOCK_BGM_BEAT_NO_OFFSET,
|
CLOCK_BGM_BEAT_NO_OFFSET,
|
||||||
|
CLOCK_BGM_BEAT_PLAYER1,
|
||||||
|
CLOCK_BGM_BEAT_PLAYER2,
|
||||||
CLOCK_LIGHT_1 = 1000,
|
CLOCK_LIGHT_1 = 1000,
|
||||||
CLOCK_LIGHT_LAST = 1100,
|
CLOCK_LIGHT_LAST = 1100,
|
||||||
NUM_CLOCKS
|
NUM_CLOCKS
|
||||||
@@ -713,6 +716,7 @@ protected:
|
|||||||
// global state
|
// global state
|
||||||
static float g_fCurrentBGMTime, g_fCurrentBGMBeat;
|
static float g_fCurrentBGMTime, g_fCurrentBGMBeat;
|
||||||
static float g_fCurrentBGMTimeNoOffset, g_fCurrentBGMBeatNoOffset;
|
static float g_fCurrentBGMTimeNoOffset, g_fCurrentBGMBeatNoOffset;
|
||||||
|
static vector<float> g_vfCurrentBGMBeatPlayer, g_vfCurrentBGMBeatPlayerNoOffset;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// commands
|
// commands
|
||||||
|
|||||||
@@ -949,7 +949,9 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
|||||||
if( bUpdatePlayers )
|
if( bUpdatePlayers )
|
||||||
FOREACH_EnabledPlayer( pn )
|
FOREACH_EnabledPlayer( pn )
|
||||||
if( m_pCurSteps[pn] )
|
if( m_pCurSteps[pn] )
|
||||||
|
{
|
||||||
m_pPlayerState[pn]->m_Position.UpdateSongPosition( fPositionSeconds, m_pCurSteps[pn]->m_Timing, timestamp );
|
m_pPlayerState[pn]->m_Position.UpdateSongPosition( fPositionSeconds, m_pCurSteps[pn]->m_Timing, timestamp );
|
||||||
|
Actor::SetPlayerBGMBeat( pn, m_pPlayerState[pn]->m_Position.m_fSongBeatVisible, m_pPlayerState[pn]->m_Position.m_fSongBeatNoOffset );
|
||||||
|
|
||||||
Actor::SetBGMTime( GAMESTATE->m_Position.m_fMusicSecondsVisible, GAMESTATE->m_Position.m_fSongBeatVisible, fPositionSeconds, GAMESTATE->m_Position.m_fSongBeatNoOffset );
|
Actor::SetBGMTime( GAMESTATE->m_Position.m_fMusicSecondsVisible, GAMESTATE->m_Position.m_fSongBeatVisible, fPositionSeconds, GAMESTATE->m_Position.m_fSongBeatNoOffset );
|
||||||
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ void SongPosition::UpdateSongPosition( float fPositionSeconds, const TimingData
|
|||||||
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_fWarpDestination );
|
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_fWarpDestination );
|
||||||
|
|
||||||
// "Crash reason : -243478.890625 -48695.773438"
|
// "Crash reason : -243478.890625 -48695.773438"
|
||||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds is less than -2000!", m_fSongBeat, fPositionSeconds) );
|
||||||
|
|
||||||
m_fMusicSeconds = fPositionSeconds;
|
m_fMusicSeconds = fPositionSeconds;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user