merge NoteFieldPlus back down
This commit is contained in:
@@ -97,6 +97,9 @@ void NoteField::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixe
|
|||||||
this->CopyAll( pNoteData );
|
this->CopyAll( pNoteData );
|
||||||
ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer );
|
ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer );
|
||||||
|
|
||||||
|
m_GrayArrowRow.Load( pn, m_fYReverseOffsetPixels );
|
||||||
|
m_GhostArrowRow.Load( pn, m_fYReverseOffsetPixels );
|
||||||
|
|
||||||
CacheAllUsedNoteSkins();
|
CacheAllUsedNoteSkins();
|
||||||
RefreshBeatToNoteSkin();
|
RefreshBeatToNoteSkin();
|
||||||
}
|
}
|
||||||
@@ -142,6 +145,8 @@ void NoteField::Update( float fDeltaTime )
|
|||||||
ActorFrame::Update( fDeltaTime );
|
ActorFrame::Update( fDeltaTime );
|
||||||
|
|
||||||
m_rectMarkerBar.Update( fDeltaTime );
|
m_rectMarkerBar.Update( fDeltaTime );
|
||||||
|
m_GrayArrowRow.Update( fDeltaTime );
|
||||||
|
m_GhostArrowRow.Update( fDeltaTime );
|
||||||
|
|
||||||
if( m_fPercentFadeToFail >= 0 )
|
if( m_fPercentFadeToFail >= 0 )
|
||||||
m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/1.5f, 1 ); // take 1.5 seconds to totally fade
|
m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/1.5f, 1 ); // take 1.5 seconds to totally fade
|
||||||
@@ -354,6 +359,8 @@ void NoteField::DrawPrimitives()
|
|||||||
/* This should be filled in on the first update. */
|
/* This should be filled in on the first update. */
|
||||||
ASSERT( !m_BeatToNoteDisplays.empty() );
|
ASSERT( !m_BeatToNoteDisplays.empty() );
|
||||||
|
|
||||||
|
m_GrayArrowRow.Draw();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Adjust draw range depending on some effects
|
// Adjust draw range depending on some effects
|
||||||
//
|
//
|
||||||
@@ -567,6 +574,7 @@ void NoteField::DrawPrimitives()
|
|||||||
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
|
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_GhostArrowRow.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteField::RemoveTapNoteRow( int iIndex )
|
void NoteField::RemoveTapNoteRow( int iIndex )
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#include "NoteDataWithScoring.h"
|
#include "NoteDataWithScoring.h"
|
||||||
#include "NoteDisplay.h"
|
#include "NoteDisplay.h"
|
||||||
#include "ArrowBackdrop.h"
|
#include "ArrowBackdrop.h"
|
||||||
|
#include "GrayArrowRow.h"
|
||||||
|
#include "GhostArrowRow.h"
|
||||||
|
|
||||||
class Song;
|
class Song;
|
||||||
|
|
||||||
@@ -45,6 +47,12 @@ public:
|
|||||||
void CacheAllUsedNoteSkins();
|
void CacheAllUsedNoteSkins();
|
||||||
void CacheNoteSkin( CString skin );
|
void CacheNoteSkin( CString skin );
|
||||||
|
|
||||||
|
void Step( int iCol ) { m_GrayArrowRow.Step( iCol ); }
|
||||||
|
void UpdateBars( int iCol ) { m_GrayArrowRow.UpdateBars( iCol ); }
|
||||||
|
void DidTapNote( int iCol, TapNoteScore score, bool bBright ) { m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
||||||
|
void DidHoldNote( int iCol ) { m_GhostArrowRow.DidHoldNote( iCol ); }
|
||||||
|
void DidTapMine( int iCol, TapNoteScore score ) { m_GhostArrowRow.DidTapMine( iCol, score ); }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void DrawBeatBar( const float fBeat );
|
void DrawBeatBar( const float fBeat );
|
||||||
@@ -79,6 +87,9 @@ protected:
|
|||||||
void SearchForBeat( NDMap::iterator &cur, NDMap::iterator &next, float Beat );
|
void SearchForBeat( NDMap::iterator &cur, NDMap::iterator &next, float Beat );
|
||||||
NDMap m_BeatToNoteDisplays;
|
NDMap m_BeatToNoteDisplays;
|
||||||
|
|
||||||
|
GrayArrowRow m_GrayArrowRow;
|
||||||
|
GhostArrowRow m_GhostArrowRow;
|
||||||
|
|
||||||
// used in MODE_EDIT
|
// used in MODE_EDIT
|
||||||
Sprite m_sprBars; // 4 frames: Measure, 4th, 8th, 16th
|
Sprite m_sprBars; // 4 frames: Measure, 4th, 8th, 16th
|
||||||
BitmapText m_textMeasureNumber;
|
BitmapText m_textMeasureNumber;
|
||||||
|
|||||||
@@ -10,63 +10,3 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NoteFieldPlus.h"
|
|
||||||
#include "GameState.h"
|
|
||||||
#include "NoteFieldPositioning.h"
|
|
||||||
#include "NoteSkinManager.h"
|
|
||||||
#include "ArrowEffects.h"
|
|
||||||
|
|
||||||
|
|
||||||
NoteFieldPlus::NoteFieldPlus()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw, float fYReverseOffset )
|
|
||||||
{
|
|
||||||
NoteField::Load( pNoteData, pn, iFirstPixelToDraw, iLastPixelToDraw, fYReverseOffset );
|
|
||||||
|
|
||||||
m_GrayArrowRow.Load( pn, fYReverseOffset );
|
|
||||||
m_GhostArrowRow.Load( pn, fYReverseOffset );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::Update( float fDelta )
|
|
||||||
{
|
|
||||||
NoteField::Update( fDelta );
|
|
||||||
|
|
||||||
m_GrayArrowRow.Update( fDelta );
|
|
||||||
m_GhostArrowRow.Update( fDelta );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::DrawPrimitives()
|
|
||||||
{
|
|
||||||
m_GrayArrowRow.Draw();
|
|
||||||
|
|
||||||
NoteField::DrawPrimitives();
|
|
||||||
|
|
||||||
m_GhostArrowRow.Draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::Step( int iCol )
|
|
||||||
{
|
|
||||||
m_GrayArrowRow.Step( iCol );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::UpdateBars( int iCol )
|
|
||||||
{
|
|
||||||
m_GrayArrowRow.UpdateBars( iCol );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::DidTapNote( int iCol, TapNoteScore score, bool bBright )
|
|
||||||
{
|
|
||||||
m_GhostArrowRow.DidTapNote( iCol, score, bBright );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::DidHoldNote( int iCol )
|
|
||||||
{
|
|
||||||
m_GhostArrowRow.DidHoldNote( iCol );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldPlus::DidTapMine( int iCol, TapNoteScore score )
|
|
||||||
{
|
|
||||||
m_GhostArrowRow.DidTapMine( iCol, score );
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,28 +13,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "NoteField.h"
|
#include "NoteField.h"
|
||||||
#include "GrayArrowRow.h"
|
|
||||||
#include "GhostArrowRow.h"
|
|
||||||
|
|
||||||
|
|
||||||
class NoteFieldPlus : public NoteField
|
class NoteFieldPlus : public NoteField
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NoteFieldPlus();
|
|
||||||
|
|
||||||
virtual void Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw, float fYReverseOffset );
|
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
|
||||||
virtual void DrawPrimitives();
|
|
||||||
|
|
||||||
void Step( int iCol );
|
|
||||||
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
|
|
||||||
void DidTapMine( int iCol, TapNoteScore score );
|
|
||||||
void DidHoldNote( int iCol );
|
|
||||||
void UpdateBars( int iCol );
|
|
||||||
protected:
|
protected:
|
||||||
GrayArrowRow m_GrayArrowRow;
|
|
||||||
GhostArrowRow m_GhostArrowRow;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -278,10 +278,6 @@ ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
|||||||
m_SnapDisplay.Load( PLAYER_1 );
|
m_SnapDisplay.Load( PLAYER_1 );
|
||||||
m_SnapDisplay.SetZoom( 0.5f );
|
m_SnapDisplay.SetZoom( 0.5f );
|
||||||
|
|
||||||
m_GrayArrowRowEdit.SetXY( EDIT_X, PLAYER_Y );
|
|
||||||
m_GrayArrowRowEdit.Load( PLAYER_1, PLAYER_HEIGHT*2 );
|
|
||||||
m_GrayArrowRowEdit.SetZoom( 0.5f );
|
|
||||||
|
|
||||||
m_NoteFieldEdit.SetXY( EDIT_X, PLAYER_Y );
|
m_NoteFieldEdit.SetXY( EDIT_X, PLAYER_Y );
|
||||||
m_NoteFieldEdit.SetZoom( 0.5f );
|
m_NoteFieldEdit.SetZoom( 0.5f );
|
||||||
m_NoteFieldEdit.Load( ¬eData, PLAYER_1, -240, 800, PLAYER_HEIGHT*2 );
|
m_NoteFieldEdit.Load( ¬eData, PLAYER_1, -240, 800, PLAYER_HEIGHT*2 );
|
||||||
@@ -289,10 +285,6 @@ ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
|||||||
m_rectRecordBack.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
m_rectRecordBack.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0) );
|
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0) );
|
||||||
|
|
||||||
m_GrayArrowRowRecord.SetXY( EDIT_X, PLAYER_Y_STANDARD );
|
|
||||||
m_GrayArrowRowRecord.Load( PLAYER_1, PLAYER_HEIGHT*2 );
|
|
||||||
m_GrayArrowRowRecord.SetZoom( 1.0f );
|
|
||||||
|
|
||||||
m_NoteFieldRecord.SetXY( EDIT_X, PLAYER_Y );
|
m_NoteFieldRecord.SetXY( EDIT_X, PLAYER_Y );
|
||||||
m_NoteFieldRecord.SetZoom( 1.0f );
|
m_NoteFieldRecord.SetZoom( 1.0f );
|
||||||
m_NoteFieldRecord.Load( ¬eData, PLAYER_1, -150, 350, 350 );
|
m_NoteFieldRecord.Load( ¬eData, PLAYER_1, -150, 350, 350 );
|
||||||
@@ -450,7 +442,6 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
|
|
||||||
m_BGAnimation.Update( fDeltaTime );
|
m_BGAnimation.Update( fDeltaTime );
|
||||||
m_SnapDisplay.Update( fDeltaTime );
|
m_SnapDisplay.Update( fDeltaTime );
|
||||||
m_GrayArrowRowEdit.Update( fDeltaTime );
|
|
||||||
m_NoteFieldEdit.Update( fDeltaTime );
|
m_NoteFieldEdit.Update( fDeltaTime );
|
||||||
m_In.Update( fDeltaTime );
|
m_In.Update( fDeltaTime );
|
||||||
m_Out.Update( fDeltaTime );
|
m_Out.Update( fDeltaTime );
|
||||||
@@ -462,10 +453,7 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
m_rectRecordBack.Update( fDeltaTime );
|
m_rectRecordBack.Update( fDeltaTime );
|
||||||
|
|
||||||
if( m_EditMode == MODE_RECORDING )
|
if( m_EditMode == MODE_RECORDING )
|
||||||
{
|
|
||||||
m_GrayArrowRowRecord.Update( fDeltaTime );
|
|
||||||
m_NoteFieldRecord.Update( fDeltaTime );
|
m_NoteFieldRecord.Update( fDeltaTime );
|
||||||
}
|
|
||||||
|
|
||||||
if( m_EditMode == MODE_PLAYING )
|
if( m_EditMode == MODE_PLAYING )
|
||||||
{
|
{
|
||||||
@@ -568,7 +556,6 @@ void ScreenEdit::DrawPrimitives()
|
|||||||
m_sprInfo.Draw();
|
m_sprInfo.Draw();
|
||||||
m_textInfo.Draw();
|
m_textInfo.Draw();
|
||||||
m_SnapDisplay.Draw();
|
m_SnapDisplay.Draw();
|
||||||
m_GrayArrowRowEdit.Draw();
|
|
||||||
|
|
||||||
// HACK: Make NoteFieldEdit draw using the trailing beat
|
// HACK: Make NoteFieldEdit draw using the trailing beat
|
||||||
float fSongBeat = GAMESTATE->m_fSongBeat; // save song beat
|
float fSongBeat = GAMESTATE->m_fSongBeat; // save song beat
|
||||||
@@ -582,7 +569,6 @@ void ScreenEdit::DrawPrimitives()
|
|||||||
break;
|
break;
|
||||||
case MODE_RECORDING:
|
case MODE_RECORDING:
|
||||||
m_BGAnimation.Draw();
|
m_BGAnimation.Draw();
|
||||||
m_GrayArrowRowRecord.Draw();
|
|
||||||
m_NoteFieldRecord.Draw();
|
m_NoteFieldRecord.Draw();
|
||||||
break;
|
break;
|
||||||
case MODE_PLAYING:
|
case MODE_PLAYING:
|
||||||
@@ -1129,7 +1115,7 @@ void ScreenEdit::InputRecord( const DeviceInput& DeviceI, const InputEventType t
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
m_NoteFieldRecord.SetTapNote(iCol, iRow, TAP_TAP);
|
m_NoteFieldRecord.SetTapNote(iCol, iRow, TAP_TAP);
|
||||||
m_GrayArrowRowRecord.Step( iCol );
|
m_NoteFieldRecord.Step( iCol );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IET_SLOW_REPEAT:
|
case IET_SLOW_REPEAT:
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
#include "BGAnimation.h"
|
#include "BGAnimation.h"
|
||||||
#include "SnapDisplay.h"
|
#include "SnapDisplay.h"
|
||||||
#include "GrayArrowRow.h"
|
|
||||||
|
|
||||||
|
|
||||||
const int NUM_ACTION_MENU_ITEMS = 23;
|
const int NUM_ACTION_MENU_ITEMS = 23;
|
||||||
@@ -59,7 +58,6 @@ protected:
|
|||||||
|
|
||||||
NoteField m_NoteFieldEdit;
|
NoteField m_NoteFieldEdit;
|
||||||
SnapDisplay m_SnapDisplay;
|
SnapDisplay m_SnapDisplay;
|
||||||
GrayArrowRow m_GrayArrowRowEdit;
|
|
||||||
|
|
||||||
Sprite m_sprHelp;
|
Sprite m_sprHelp;
|
||||||
BitmapText m_textHelp;
|
BitmapText m_textHelp;
|
||||||
@@ -85,7 +83,6 @@ protected:
|
|||||||
// for MODE_RECORD
|
// for MODE_RECORD
|
||||||
|
|
||||||
NoteField m_NoteFieldRecord;
|
NoteField m_NoteFieldRecord;
|
||||||
GrayArrowRow m_GrayArrowRowRecord;
|
|
||||||
|
|
||||||
// for MODE_PLAY
|
// for MODE_PLAY
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user