Files
itgmania212121/stepmania/src/StyleDef.h
T

57 lines
1.3 KiB
C++
Raw Normal View History

2002-02-24 01:43:11 +00:00
/*
-----------------------------------------------------------------------------
File: StyleDef.h
2002-02-24 01:43:11 +00:00
Desc: A data structure that holds the definition of a GameMode.
Copyright (c) 2001 Chris Danford. All rights reserved.
-----------------------------------------------------------------------------
*/
#ifndef _Style_H_
#define _Style_H_
#include "Pattern.h"
2002-02-24 01:43:11 +00:00
const int MAX_NUM_COLUMNS = 12;
2002-02-24 01:43:11 +00:00
2002-04-01 02:04:43 +00:00
enum StyleElement {
GRAPHIC_NOTE_COLOR_PART,
GRAPHIC_NOTE_GRAY_PART,
GRAPHIC_RECEPTOR,
GRAPHIC_TAP_EXPLOSION_BRIGHT,
GRAPHIC_TAP_EXPLOSION_DIM,
GRAPHIC_HOLD_EXPLOSION,
2002-02-24 01:43:11 +00:00
2002-04-01 02:04:43 +00:00
NUM_STYLE_ELEMENTS // leave this at the end
};
struct StyleDef
2002-02-24 01:43:11 +00:00
{
2002-04-01 02:04:43 +00:00
public:
2002-02-24 01:43:11 +00:00
int m_iNumPlayers;
int m_iNumColumns; // will vary depending on the number panels (4,6,8,etc)
2002-04-01 02:04:43 +00:00
CString m_sColumnToNoteName[MAX_NUM_COLUMNS]; // e.g. "left", "right", "middle C", "snare"
TapNote m_ColumnToTapNote[MAX_NUM_COLUMNS]; // which TapNote does this column correspond to?
CString GetPathToGraphic( const int iColumnNumber, const StyleElement se );
2002-02-24 01:43:11 +00:00
inline int TapNoteToColumnNumber( TapNote tap_step )
2002-02-24 01:43:11 +00:00
{
2002-03-09 06:19:40 +00:00
for (int i=0; i<m_iNumColumns; i++)
2002-02-24 01:43:11 +00:00
{
if( m_ColumnToTapNote[i] == tap_step )
2002-02-24 01:43:11 +00:00
return i;
}
2002-03-09 06:19:40 +00:00
return -1; // the TapNote is not used in this StyleDef
2002-02-24 01:43:11 +00:00
};
2002-04-01 02:04:43 +00:00
protected:
CString ElementToGraphicSuffix( const StyleElement se );
2002-02-24 01:43:11 +00:00
};
#endif