Files
itgmania212121/stepmania/src/GrayArrowRow.cpp
T

72 lines
1.6 KiB
C++
Raw Normal View History

2003-02-16 04:01:45 +00:00
#include "global.h"
2002-04-16 17:31:00 +00:00
/*
-----------------------------------------------------------------------------
Class: GrayArrowRow
Desc: See header.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-04-16 17:31:00 +00:00
Chris Danford
-----------------------------------------------------------------------------
*/
#include "GrayArrowRow.h"
#include "RageUtil.h"
2002-05-01 19:14:55 +00:00
#include "GameConstantsAndTypes.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2002-04-16 17:31:00 +00:00
#include "ArrowEffects.h"
2002-07-23 01:41:40 +00:00
#include "GameState.h"
#include "PrefsManager.h"
2003-04-02 21:58:27 +00:00
#include "NoteFieldPositioning.h"
2002-04-16 17:31:00 +00:00
GrayArrowRow::GrayArrowRow()
{
m_iNumCols = 0;
}
2002-07-28 20:28:37 +00:00
void GrayArrowRow::Load( PlayerNumber pn )
2002-04-16 17:31:00 +00:00
{
2002-07-28 20:28:37 +00:00
m_PlayerNumber = pn;
2002-04-16 17:31:00 +00:00
2002-08-22 22:59:54 +00:00
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
2002-04-16 17:31:00 +00:00
2002-04-28 20:42:32 +00:00
m_iNumCols = pStyleDef->m_iColsPerPlayer;
2002-04-16 17:31:00 +00:00
for( int c=0; c<m_iNumCols; c++ )
2003-09-15 08:26:31 +00:00
m_GrayArrow[c].Load( GAMESTATE->m_PlayerOptions[pn].m_sNoteSkin, m_PlayerNumber, c );
2002-04-16 17:31:00 +00:00
}
2002-07-28 20:28:37 +00:00
void GrayArrowRow::Update( float fDeltaTime )
2002-04-16 17:31:00 +00:00
{
for( int c=0; c<m_iNumCols; c++ )
{
m_GrayArrow[c].Update( fDeltaTime );
m_GrayArrow[c].SetDiffuse( RageColor(1,1,1,1 - GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fDark) );
2002-04-16 17:31:00 +00:00
}
}
2002-05-19 01:59:48 +00:00
void GrayArrowRow::DrawPrimitives()
2002-04-16 17:31:00 +00:00
{
for( int c=0; c<m_iNumCols; c++ )
{
g_NoteFieldMode[m_PlayerNumber].BeginDrawTrack(c);
2003-04-02 21:58:27 +00:00
2002-04-16 17:31:00 +00:00
// set arrow X
float fX = ArrowGetXPos( m_PlayerNumber, c, 0 );
2002-04-16 17:31:00 +00:00
m_GrayArrow[c].SetX( fX );
2003-07-12 20:10:48 +00:00
float fZ = ArrowGetZPos( m_PlayerNumber, c, 0 );
m_GrayArrow[c].SetZ( fZ );
2002-04-16 17:31:00 +00:00
m_GrayArrow[c].Draw();
2003-04-02 21:58:27 +00:00
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
2002-04-16 17:31:00 +00:00
}
}
void GrayArrowRow::Step( int iCol )
{
ASSERT( iCol >= 0 && iCol < m_iNumCols );
m_GrayArrow[iCol].Step();
}