const safety

This commit is contained in:
Glenn Maynard
2002-08-22 22:59:19 +00:00
parent 9881034aae
commit 1fa18136f5
5 changed files with 11 additions and 10 deletions
+3 -2
View File
@@ -544,6 +544,7 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
break; break;
case NOTES_TYPE_PUMP_SINGLE: case NOTES_TYPE_PUMP_SINGLE:
case NOTES_TYPE_PUMP_DOUBLE: case NOTES_TYPE_PUMP_DOUBLE:
case NOTES_TYPE_PUMP_COUPLE:
iTakeFromTrack[0] = 1; iTakeFromTrack[0] = 1;
iTakeFromTrack[1] = 3; iTakeFromTrack[1] = 3;
iTakeFromTrack[2] = 2; 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
Init(); Init();
@@ -791,7 +792,7 @@ void NoteData::LoadTransformed( NoteData* pOriginal, int iNewNumTracks, int iNew
for( i=0; i<pOriginal->m_iNumHoldNotes; i++ ) 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 ) if( hn.m_iTrack == iOriginalTrack )
{ {
hn.m_iTrack = t; hn.m_iTrack = t;
+1 -1
View File
@@ -88,7 +88,7 @@ public:
float GetChaosRadarValue( float fSongSeconds ); float GetChaosRadarValue( float fSongSeconds );
// Transformations // Transformations
void LoadTransformed( NoteData* pOriginal, int iNewNumTracks, int iNewToOriginalTrack[] ); void LoadTransformed( const NoteData* pOriginal, int iNewNumTracks, const int iNewToOriginalTrack[] );
void CropToLeftSide(); void CropToLeftSide();
void CropToRightSide(); void CropToRightSide();
+1 -1
View File
@@ -55,7 +55,7 @@ void NoteField::Load( NoteData* pNoteData, PlayerNumber pn, int iPixelsToDrawBeh
for( int i=0; i<MAX_HOLD_NOTES; i++ ) for( int i=0; i<MAX_HOLD_NOTES; i++ )
m_bIsHoldingHoldNote[i] = false; m_bIsHoldingHoldNote[i] = false;
StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
this->CopyAll( pNoteData ); this->CopyAll( pNoteData );
+3 -3
View File
@@ -18,7 +18,7 @@
#include "GameState.h" #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]; int iNewToOriginalTrack[MAX_COLS_PER_PLAYER];
for( int col=0; col<m_iColsPerPlayer; col++ ) 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; GameController c = m_ColumnInfo[StyleI.player][StyleI.col].controller;
GameButton b = m_ColumnInfo[StyleI.player][StyleI.col].button; GameButton b = m_ColumnInfo[StyleI.player][StyleI.col].button;
return GameInput( c, b ); return GameInput( c, b );
}; };
StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI ) StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI ) const
{ {
StyleInput SI; StyleInput SI;
+3 -3
View File
@@ -60,9 +60,9 @@ public:
ColumnInfo m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; // maps each players' column to a track in the NoteData 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]; int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
GameInput StyleInputToGameInput( const StyleInput StyleI ); GameInput StyleInputToGameInput( const StyleInput StyleI ) const;
StyleInput GameInputToStyleInput( const GameInput &GameI ); StyleInput GameInputToStyleInput( const GameInput &GameI ) const;
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut ); void GetTransformedNoteDataForStyle( PlayerNumber p, const NoteData* pOriginal, NoteData* pNoteDataOut );
}; };