Added in BeginnerHelper's step sensing ability, and so it will allow a flashing animation when an arrow is to be hit, ala DDR Extreme
This commit is contained in:
@@ -211,18 +211,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
|
|
||||||
m_bZeroDeltaOnNextUpdate = false;
|
m_bZeroDeltaOnNextUpdate = false;
|
||||||
|
|
||||||
// If this is beginner mode, show the helper
|
const bool bExtra = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2();
|
||||||
/* !! Working on this.. having probs loading the BG sequences -- Miryokuteki */
|
|
||||||
|
|
||||||
//this->AddChild( &m_bhDancer );
|
|
||||||
//m_bhDancer.Load( THEME->GetPathToG( "select difficulty ex picture easy") );
|
|
||||||
//m_bhDancer.SetXY( -100,-100 ); //<-- causing entire screen to offset!
|
|
||||||
//m_bhDancer.SetDiffuse( RageColor(1,1,1,1) );
|
|
||||||
//m_bhDancer.SetEffectGlowShift( 0.5f );
|
|
||||||
//m_bhDancer.BeginDraw();
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
// init old offset in case offset changes in song
|
// init old offset in case offset changes in song
|
||||||
if( GAMESTATE->IsCourseMode() )
|
if( GAMESTATE->IsCourseMode() )
|
||||||
g_fOldOffset = -1000;
|
g_fOldOffset = -1000;
|
||||||
@@ -231,9 +220,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const bool bExtra = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2();
|
|
||||||
|
|
||||||
|
|
||||||
m_Background.SetDiffuse( RageColor(0.4f,0.4f,0.4f,1) );
|
m_Background.SetDiffuse( RageColor(0.4f,0.4f,0.4f,1) );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
@@ -792,13 +778,34 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath() );
|
m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath() );
|
||||||
|
|
||||||
/* Set up song-specific graphics. */
|
/* Set up song-specific graphics. */
|
||||||
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
|
||||||
|
|
||||||
|
|
||||||
|
if( PREFSMAN->m_bShowBeginnerHelper )
|
||||||
|
{
|
||||||
|
// Beginner steps are always the same on both players.. Just get the # of 1 player that's using the Beginner steps, and go on.
|
||||||
|
for( int pb=0; pb<NUM_PLAYERS; pb++ )
|
||||||
|
if( GAMESTATE->IsPlayerEnabled(pb) && GAMESTATE->m_PreferredDifficulty[pb] )
|
||||||
|
m_iPOB = pb;
|
||||||
|
|
||||||
|
m_Background.Unload(); // BeginnerHelper has it's own BG control.
|
||||||
|
m_Background.StopAnimating();
|
||||||
|
|
||||||
|
//m_BeginnerHelper.m_bEnabled = true; // Not yet implemented
|
||||||
|
m_BeginnerHelper.Initialize( 2 ); // Init for doubles
|
||||||
|
m_BeginnerHelper.SetX( CENTER_X );
|
||||||
|
m_BeginnerHelper.SetY( CENTER_Y );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
||||||
|
}
|
||||||
|
|
||||||
m_Background.SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) );
|
m_Background.SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) );
|
||||||
m_Background.BeginTweening( 2 );
|
m_Background.BeginTweening( 2 );
|
||||||
m_Background.SetDiffuse( RageColor(1,1,1,1) );
|
m_Background.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
m_fTimeLeftBeforeDancingComment = GAMESTATE->m_pCurSong->m_fFirstBeat + SECONDS_BETWEEN_COMMENTS;
|
m_fTimeLeftBeforeDancingComment = GAMESTATE->m_pCurSong->m_fFirstBeat + SECONDS_BETWEEN_COMMENTS;
|
||||||
|
|
||||||
|
|
||||||
@@ -979,9 +986,34 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
||||||
|
|
||||||
int pn;
|
int pn;
|
||||||
|
m_BeginnerHelper.Update(fDeltaTime*GAMESTATE->m_fCurBPS);
|
||||||
|
|
||||||
switch( m_DancingState )
|
switch( m_DancingState )
|
||||||
{
|
{
|
||||||
case STATE_DANCING:
|
case STATE_DANCING:
|
||||||
|
// Check to see what we animate on this one
|
||||||
|
if( PREFSMAN->m_bShowBeginnerHelper )
|
||||||
|
{
|
||||||
|
int iStep = 0;
|
||||||
|
if((m_Player[m_iPOB].IsThereATapAtRow( BeatToNoteRowNotRounded((GAMESTATE->m_fSongBeat+0.45f)))))
|
||||||
|
{
|
||||||
|
for( int k=0; k<m_Player[m_iPOB].GetNumTracks(); k++ )
|
||||||
|
if( m_Player[m_iPOB].GetTapNote(k, BeatToNoteRowNotRounded((GAMESTATE->m_fSongBeat+0.45f)) ) == TAP_TAP )
|
||||||
|
{
|
||||||
|
switch(k)
|
||||||
|
{
|
||||||
|
case 0: iStep += 6; break;
|
||||||
|
case 1: iStep += 3; break;
|
||||||
|
case 2: iStep += 8; break;
|
||||||
|
case 3: iStep += 4; break;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
m_BeginnerHelper.Step( iStep );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// -------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update living players' alive time
|
// Update living players' alive time
|
||||||
//
|
//
|
||||||
@@ -1153,12 +1185,16 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( GAMESTATE->m_SongOptions.m_bAssistTick && IsTimeToPlayTicks())
|
if( GAMESTATE->m_SongOptions.m_bAssistTick && IsTimeToPlayTicks())
|
||||||
|
{
|
||||||
m_soundAssistTick.Play();
|
m_soundAssistTick.Play();
|
||||||
|
m_BeginnerHelper.FlashOnce();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScreenGameplay::DrawPrimitives()
|
void ScreenGameplay::DrawPrimitives()
|
||||||
{
|
{
|
||||||
|
m_BeginnerHelper.DrawPrimitives();
|
||||||
Screen::DrawPrimitives();
|
Screen::DrawPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,10 @@
|
|||||||
#include "DifficultyIcon.h"
|
#include "DifficultyIcon.h"
|
||||||
#include "BPMDisplay.h"
|
#include "BPMDisplay.h"
|
||||||
class Inventory;
|
class Inventory;
|
||||||
//#include "BeginnerHelper.h" // uncomment once it's checked in
|
#include "BeginnerHelper.h"
|
||||||
#include "LyricDisplay.h"
|
#include "LyricDisplay.h"
|
||||||
#include "TimingAssist.h"
|
#include "TimingAssist.h"
|
||||||
|
#include "Character.h"
|
||||||
|
|
||||||
// messages sent by Combo
|
// messages sent by Combo
|
||||||
const ScreenMessage SM_PlayToasty = ScreenMessage(SM_User+104);
|
const ScreenMessage SM_PlayToasty = ScreenMessage(SM_User+104);
|
||||||
@@ -64,9 +65,6 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//BeginnerHelper m_bhDancer; // The model for training
|
|
||||||
Sprite m_bhDancer;
|
|
||||||
|
|
||||||
void TweenOnScreen();
|
void TweenOnScreen();
|
||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
|
|
||||||
@@ -186,6 +184,9 @@ protected:
|
|||||||
|
|
||||||
RageSound m_soundAssistTick;
|
RageSound m_soundAssistTick;
|
||||||
RageSound m_soundMusic;
|
RageSound m_soundMusic;
|
||||||
|
|
||||||
|
BeginnerHelper m_BeginnerHelper;
|
||||||
|
int m_iPOB; // Number of any player on Beginner.. Used for step-sensing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user