no message

This commit is contained in:
Chris Danford
2002-03-09 06:19:40 +00:00
parent 57ed77bf1a
commit 876b28d5db
8 changed files with 60 additions and 35 deletions
+17 -8
View File
@@ -206,7 +206,7 @@ void Actor::Update( float fDeltaTime )
void Actor::BeginTweening( float time, TweenType tt )
{
StopTweening();
StopTweening(); // cancel current tweens
BeginTweeningQueued( time, tt );
}
@@ -214,16 +214,25 @@ void Actor::BeginTweeningQueued( float time, TweenType tt )
{
ASSERT( time > 0 );
// add a new TweenState to the tail, and initialize it
m_QueuedTweens.Add( TweenState() );
TweenState &TS = m_QueuedTweens[m_QueuedTweens.GetSize()-1];
// set our tween starting and ending values to the current position
TS.m_end_pos = m_pos;
TS.m_end_scale = m_scale;
TS.m_end_rotation = m_rotation;
for(int i=0; i<4; i++) TS.m_end_colorDiffuse[i] = m_colorDiffuse[i];
TS.m_end_colorAdd = m_colorAdd;
if( m_QueuedTweens.GetSize() >= 2 ) // if there was already a TS on the stack
{
// initialize the new TS from the last TS in the list
TS = m_QueuedTweens[m_QueuedTweens.GetSize()-2];
}
else
{
// This new TS is the only TS.
// Set our tween starting and ending values to the current position.
TS.m_end_pos = m_pos;
TS.m_end_scale = m_scale;
TS.m_end_rotation = m_rotation;
for(int i=0; i<4; i++) TS.m_end_colorDiffuse[i] = m_colorDiffuse[i];
TS.m_end_colorAdd = m_colorAdd;
}
TS.m_TweenType = tt;
TS.m_fTweenTime = time;
+3 -15
View File
@@ -54,10 +54,6 @@ Player::Player()
this->AddActor( &m_Combo );
this->AddActor( &m_LifeMeter );
this->AddActor( &m_Score );
// assist
m_soundAssistTick.Load( THEME->GetPathTo(SOUND_ASSIST) );
}
@@ -249,11 +245,6 @@ void Player::RenderPrimitives()
m_Score.Draw();
}
void Player::CrossedIndex( int iIndex )
{
}
bool Player::IsThereANoteAtIndex( int iIndex )
@@ -268,13 +259,10 @@ void Player::HandlePlayerStep( float fSongBeat, TapStep player_step, float fMaxB
{
//RageLog( "Player::HandlePlayerStep()" );
// update gray arrows
int iColumnNum = m_Style.TapStepToColumnNumber( player_step );
// For single player and two player, iColumnNum will be 4/5 or 8/9/10/11 for
// up-left and up-right hits. Seemed this was the simplest way to ignore them in game.
if (iColumnNum >= m_Style.m_iNumColumns)
return;
if( iColumnNum == -1 ) // if this TapStep is not used in the current Style
return; // ignore the step
m_GrayArrows.Step( iColumnNum );
CheckForCompleteStep( fSongBeat, player_step, fMaxBeatDiff );
-2
View File
@@ -82,8 +82,6 @@ protected:
LifeMeterPills m_LifeMeter;
ScoreDisplayRollingWithFrame m_Score;
SoundSet m_soundAssistTick;
};
+25 -1
View File
@@ -22,6 +22,7 @@ LPRageSound SOUND = NULL;
RageSound::RageSound( HWND hWnd )
{
RageLog( "RageSound::RageSound()" );
// save the HWND
if( !hWnd )
RageError( "RageSound called with NULL hWnd." );
@@ -30,7 +31,7 @@ RageSound::RageSound( HWND hWnd )
if( BASS_GetVersion() != MAKELONG(1,3) )
RageError( "BASS version 1.3 DLL could not be loaded. Verify that Bass.dll exists in the program directory.");
if( !BASS_Init( -1, 44100, BASS_DEVICE_LEAVEVOL, m_hWndApp ) )
if( !BASS_Init( -1, 44100, BASS_DEVICE_LEAVEVOL|BASS_DEVICE_LATENCY, m_hWndApp ) )
{
RageError(
"There was an error while initializing your sound card.\n\n"
@@ -42,6 +43,29 @@ RageSound::RageSound( HWND hWnd )
}
BASS_Start();
ZeroMemory( &m_info, sizeof(m_info) );
m_info.size = sizeof(m_info);
BASS_GetInfo( &m_info );
RageLog(
"Sound card info:\n"
" - play latency is %u ms\n"
" - total device hardware memory is %u bytes\n"
" - free device hardware memory is %u bytes\n"
" - number of free sample slots in the hardware is %u\n"
" - number of free 3D sample slots in the hardware is %u\n"
" - min sample rate supported by the hardware is %u\n"
" - max sample rate supported by the hardware is %u",
m_info.latency,
m_info.hwsize,
m_info.hwfree,
m_info.freesam,
m_info.free3d,
m_info.minrate,
m_info.maxrate
);
}
RageSound::~RageSound()
+2 -1
View File
@@ -25,10 +25,11 @@ public:
RageSound( HWND hWnd );
~RageSound();
float GetPlayLatency() { return m_info.latency / 1000.0f; };
private:
HWND m_hWndApp; // this is set on GRAPHICS_Create()
BASS_INFO m_info;
};
+3 -6
View File
@@ -26,16 +26,13 @@ struct Style
int TapStepToColumnNumber( TapStep tap_step )
{
//for (int i=0; i<m_iNumColumns; i++)
for( int i=0; i<MAX_NUM_COLUMNS; i++ )
// Switched to MAX_NUM_COLUMNS so up-left and up-right don't cause ASSERT(false)
// Player.HandelPlayerStep will ignore up-left and up-right if it needs.
for (int i=0; i<m_iNumColumns; i++)
{
if( m_ColumnToTapStep[i] == tap_step )
return i;
}
ASSERT( false );
return -1;
return -1; // the TapStep is not used in this style
};
};
+5 -1
View File
@@ -26,7 +26,6 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
case GRAPHIC_TITLE_MENU_BACKGROUND: sAssetPath = "Graphics\\title menu background"; break;
case GRAPHIC_SELECT_STYLE_BACKGROUND: sAssetPath = "Graphics\\select style background"; break;
case GRAPHIC_SELECT_MUSIC_BACKGROUND: sAssetPath = "Graphics\\select music background"; break;
case GRAPHIC_OPTIONS_BACKGROUND: sAssetPath = "Graphics\\options background"; break;
case GRAPHIC_RESULT_BACKGROUND: sAssetPath = "Graphics\\result background"; break;
case GRAPHIC_SELECT_STYLE_TOP_EDGE: sAssetPath = "Graphics\\select style top edge"; break;
case GRAPHIC_SELECT_MUSIC_TOP_EDGE: sAssetPath = "Graphics\\select music top edge"; break;
@@ -75,6 +74,11 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
case GRAPHIC_ARROWS_RIGHT: sAssetPath = "Graphics\\arrows right 1x4"; break;
case GRAPHIC_EDIT_BACKGROUND: sAssetPath = "Graphics\\edit background"; break;
case GRAPHIC_EDIT_SNAP_INDICATOR: sAssetPath = "Graphics\\edit snap indicator"; break;
case GRAPHIC_GAME_OPTIONS_BACKGROUND: sAssetPath = "Graphics\\game options background"; break;
case GRAPHIC_PLAYER_OPTIONS_BACKGROUND: sAssetPath = "Graphics\\player options background"; break;
case GRAPHIC_MUSIC_OPTIONS_BACKGROUND: sAssetPath = "Graphics\\music options background"; break;
case GRAPHIC_SYNCHRONIZE_BACKGROUND: sAssetPath = "Graphics\\synchronize background"; break;
case GRAPHIC_SYNCHRONIZE_TOP_EDGE: sAssetPath = "Graphics\\synchronize top edge"; break;
case SOUND_FAILED: sAssetPath = "Sounds\\failed"; break;
case SOUND_ASSIST: sAssetPath = "Sounds\\Assist"; break;
+5 -1
View File
@@ -21,7 +21,6 @@ enum ThemeElement {
GRAPHIC_TITLE_MENU_BACKGROUND,
GRAPHIC_SELECT_STYLE_BACKGROUND,
GRAPHIC_SELECT_MUSIC_BACKGROUND,
GRAPHIC_OPTIONS_BACKGROUND,
GRAPHIC_RESULT_BACKGROUND,
GRAPHIC_SELECT_STYLE_TOP_EDGE,
GRAPHIC_SELECT_MUSIC_TOP_EDGE,
@@ -70,6 +69,11 @@ enum ThemeElement {
GRAPHIC_ARROWS_RIGHT,
GRAPHIC_EDIT_BACKGROUND,
GRAPHIC_EDIT_SNAP_INDICATOR,
GRAPHIC_GAME_OPTIONS_BACKGROUND,
GRAPHIC_PLAYER_OPTIONS_BACKGROUND,
GRAPHIC_MUSIC_OPTIONS_BACKGROUND,
GRAPHIC_SYNCHRONIZE_BACKGROUND,
GRAPHIC_SYNCHRONIZE_TOP_EDGE,
SOUND_FAILED,
SOUND_ASSIST,