[splittiming] screenedit now behaves (just moving around, charting process not tested)
some work need to be done on snapping and transitioning between editing and playing.
This commit is contained in:
+18
-14
@@ -1142,26 +1142,30 @@ void ScreenEdit::UpdateTextInfo()
|
|||||||
|
|
||||||
void ScreenEdit::DrawPrimitives()
|
void ScreenEdit::DrawPrimitives()
|
||||||
{
|
{
|
||||||
// HACK: Draw using the trailing beat
|
|
||||||
float fSongBeat = GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat; // save song beat
|
|
||||||
float fSongBeatNoOffset = GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatNoOffset;
|
|
||||||
float fSongBeatVisible = GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatVisible;
|
|
||||||
|
|
||||||
if( !m_pSoundMusic->IsPlaying() )
|
if( m_pSoundMusic->IsPlaying() )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = m_fTrailingBeat; // put trailing beat in effect
|
ScreenWithMenuElements::DrawPrimitives();
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatNoOffset = m_fTrailingBeat; // put trailing beat in effect
|
return;
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatVisible = m_fTrailingBeat; // put trailing beat in effect
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HACK: Draw using the trailing beat
|
||||||
|
PlayerState *pPlayerState = const_cast<PlayerState *> (m_NoteFieldEdit.GetPlayerState());
|
||||||
|
|
||||||
|
float fSongBeat = pPlayerState->m_Position.m_fSongBeat; // save song beat
|
||||||
|
float fSongBeatNoOffset = pPlayerState->m_Position.m_fSongBeatNoOffset;
|
||||||
|
float fSongBeatVisible = pPlayerState->m_Position.m_fSongBeatVisible;
|
||||||
|
|
||||||
|
pPlayerState->m_Position.m_fSongBeat = m_fTrailingBeat; // put trailing beat in effect
|
||||||
|
pPlayerState->m_Position.m_fSongBeatNoOffset = m_fTrailingBeat; // put trailing beat in effect
|
||||||
|
pPlayerState->m_Position.m_fSongBeatVisible = m_fTrailingBeat; // put trailing beat in effect
|
||||||
|
|
||||||
ScreenWithMenuElements::DrawPrimitives();
|
ScreenWithMenuElements::DrawPrimitives();
|
||||||
|
|
||||||
if( !m_pSoundMusic->IsPlaying() )
|
pPlayerState->m_Position.m_fSongBeat = fSongBeat; // restore real song beat
|
||||||
{
|
pPlayerState->m_Position.m_fSongBeatNoOffset = fSongBeatNoOffset;
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat = fSongBeat; // restore real song beat
|
pPlayerState->m_Position.m_fSongBeatVisible = fSongBeatVisible;
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatNoOffset = fSongBeatNoOffset;
|
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeatVisible = fSongBeatVisible;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenEdit::Input( const InputEventPlus &input )
|
void ScreenEdit::Input( const InputEventPlus &input )
|
||||||
|
|||||||
Reference in New Issue
Block a user