const safety
This commit is contained in:
@@ -544,6 +544,7 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
|
||||
break;
|
||||
case NOTES_TYPE_PUMP_SINGLE:
|
||||
case NOTES_TYPE_PUMP_DOUBLE:
|
||||
case NOTES_TYPE_PUMP_COUPLE:
|
||||
iTakeFromTrack[0] = 1;
|
||||
iTakeFromTrack[1] = 3;
|
||||
iTakeFromTrack[2] = 2;
|
||||
@@ -773,7 +774,7 @@ float NoteData::GetFreezeRadarValue( float fSongSeconds )
|
||||
}
|
||||
|
||||
|
||||
void NoteData::LoadTransformed( NoteData* pOriginal, int iNewNumTracks, int iNewToOriginalTrack[] )
|
||||
void NoteData::LoadTransformed( const NoteData* pOriginal, int iNewNumTracks, const int iNewToOriginalTrack[] )
|
||||
{
|
||||
// init
|
||||
Init();
|
||||
@@ -791,7 +792,7 @@ void NoteData::LoadTransformed( NoteData* pOriginal, int iNewNumTracks, int iNew
|
||||
|
||||
for( i=0; i<pOriginal->m_iNumHoldNotes; i++ )
|
||||
{
|
||||
HoldNote &hn = pOriginal->m_HoldNotes[i];
|
||||
HoldNote hn = pOriginal->m_HoldNotes[i];
|
||||
if( hn.m_iTrack == iOriginalTrack )
|
||||
{
|
||||
hn.m_iTrack = t;
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
float GetChaosRadarValue( float fSongSeconds );
|
||||
|
||||
// Transformations
|
||||
void LoadTransformed( NoteData* pOriginal, int iNewNumTracks, int iNewToOriginalTrack[] );
|
||||
void LoadTransformed( const NoteData* pOriginal, int iNewNumTracks, const int iNewToOriginalTrack[] );
|
||||
|
||||
void CropToLeftSide();
|
||||
void CropToRightSide();
|
||||
|
||||
@@ -55,7 +55,7 @@ void NoteField::Load( NoteData* pNoteData, PlayerNumber pn, int iPixelsToDrawBeh
|
||||
for( int i=0; i<MAX_HOLD_NOTES; i++ )
|
||||
m_bIsHoldingHoldNote[i] = false;
|
||||
|
||||
StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
|
||||
this->CopyAll( pNoteData );
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "GameState.h"
|
||||
|
||||
|
||||
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut )
|
||||
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, const NoteData* pOriginal, NoteData* pNoteDataOut )
|
||||
{
|
||||
int iNewToOriginalTrack[MAX_COLS_PER_PLAYER];
|
||||
for( int col=0; col<m_iColsPerPlayer; col++ )
|
||||
@@ -33,14 +33,14 @@ void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOrigin
|
||||
}
|
||||
|
||||
|
||||
GameInput StyleDef::StyleInputToGameInput( const StyleInput StyleI )
|
||||
GameInput StyleDef::StyleInputToGameInput( const StyleInput StyleI ) const
|
||||
{
|
||||
GameController c = m_ColumnInfo[StyleI.player][StyleI.col].controller;
|
||||
GameButton b = m_ColumnInfo[StyleI.player][StyleI.col].button;
|
||||
return GameInput( c, b );
|
||||
};
|
||||
|
||||
StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI )
|
||||
StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI ) const
|
||||
{
|
||||
StyleInput SI;
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ public:
|
||||
ColumnInfo m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; // maps each players' column to a track in the NoteData
|
||||
int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
|
||||
GameInput StyleInputToGameInput( const StyleInput StyleI );
|
||||
StyleInput GameInputToStyleInput( const GameInput &GameI );
|
||||
GameInput StyleInputToGameInput( const StyleInput StyleI ) const;
|
||||
StyleInput GameInputToStyleInput( const GameInput &GameI ) const;
|
||||
|
||||
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut );
|
||||
void GetTransformedNoteDataForStyle( PlayerNumber p, const NoteData* pOriginal, NoteData* pNoteDataOut );
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user