Files
itgmania212121/stepmania/src/GrayArrowRow.cpp
T

76 lines
1.5 KiB
C++
Raw Normal View History

2002-04-16 17:31:00 +00:00
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
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-04-16 17:31:00 +00:00
#include "ThemeManager.h"
2002-04-28 20:42:32 +00:00
#include "ColorNote.h"
2002-04-16 17:31:00 +00:00
#include "ArrowEffects.h"
#include "GameManager.h"
GrayArrowRow::GrayArrowRow()
{
m_iNumCols = 0;
}
2002-05-27 08:23:27 +00:00
void GrayArrowRow::Load( PlayerNumber pn, StyleDef* pStyleDef, PlayerOptions po )
2002-04-16 17:31:00 +00:00
{
m_PlayerOptions = po;
2002-05-27 08:23:27 +00:00
GameDef* pGameDef = GAMEMAN->GetCurrentGameDef();
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++ )
{
2002-05-27 08:23:27 +00:00
m_GrayArrow[c].Load( GAMEMAN->GetPathToGraphic(pn, c, GRAPHIC_RECEPTOR) );
m_GrayArrow[c].SetX( pStyleDef->m_ColumnInfo[pn][c].fXOffset );
2002-04-16 17:31:00 +00:00
}
}
void GrayArrowRow::Update( float fDeltaTime, float fSongBeat )
{
m_fSongBeat = fSongBeat;
for( int c=0; c<m_iNumCols; c++ )
{
m_GrayArrow[c].Update( fDeltaTime );
m_GrayArrow[c].SetBeat( fSongBeat );
}
}
2002-05-19 01:59:48 +00:00
void GrayArrowRow::DrawPrimitives()
2002-04-16 17:31:00 +00:00
{
2002-07-03 21:27:26 +00:00
if( m_PlayerOptions.m_bDark )
return;
2002-04-16 17:31:00 +00:00
for( int c=0; c<m_iNumCols; c++ )
{
// set arrow X
float fX = ArrowGetXPos( m_PlayerOptions, c, 0, m_fSongBeat );
m_GrayArrow[c].SetX( fX );
m_GrayArrow[c].Draw();
}
}
void GrayArrowRow::Step( int iCol )
{
ASSERT( iCol >= 0 && iCol < m_iNumCols );
m_GrayArrow[iCol].Step();
}