2002-11-16 08:07:38 +00:00
|
|
|
#ifndef STYLEDEF_H
|
|
|
|
|
#define STYLEDEF_H
|
2002-02-24 01:43:11 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-04-16 17:31:00 +00:00
|
|
|
Class: StyleDef
|
2002-02-24 01:43:11 +00:00
|
|
|
|
2002-04-16 17:31:00 +00:00
|
|
|
Desc: A data structure that holds the definition for one of a Game's styles.
|
|
|
|
|
Styles define a set of columns for each player, and information about those
|
|
|
|
|
columns, like what Instruments are used play those columns and what track
|
|
|
|
|
to use to populate the column's notes.
|
2002-04-28 20:42:32 +00:00
|
|
|
A "track" is the term used to descibe a particular vertical sting of note
|
|
|
|
|
in NoteData.
|
|
|
|
|
A "column" is the term used to describe the vertical string of notes that
|
|
|
|
|
a player sees on the screen while they're playing. Column notes are
|
|
|
|
|
picked from a track, but columns and tracks don't have a 1-to-1
|
|
|
|
|
correspondance. For example, dance-versus has 8 columns but only 4 tracks
|
|
|
|
|
because two players place from the same set of 4 tracks.
|
2002-02-24 01:43:11 +00:00
|
|
|
|
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
|
2002-02-24 01:43:11 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
2002-04-16 17:31:00 +00:00
|
|
|
#include "StyleInput.h"
|
|
|
|
|
#include "GameInput.h"
|
2002-08-13 23:26:46 +00:00
|
|
|
#include "Game.h"
|
2002-12-17 21:49:14 +00:00
|
|
|
#include "NoteTypes.h"
|
2003-02-26 00:20:00 +00:00
|
|
|
#include "PlayerNumber.h"
|
|
|
|
|
#include "GameConstantsAndTypes.h"
|
2002-02-24 01:43:11 +00:00
|
|
|
|
|
|
|
|
|
2002-04-28 20:42:32 +00:00
|
|
|
const int MAX_COLS_PER_PLAYER = MAX_NOTE_TRACKS;
|
2002-02-24 01:43:11 +00:00
|
|
|
|
2002-12-17 21:42:09 +00:00
|
|
|
class NoteData;
|
2002-03-19 07:09:49 +00:00
|
|
|
|
2002-04-28 20:42:32 +00:00
|
|
|
class StyleDef
|
2002-02-24 01:43:11 +00:00
|
|
|
{
|
2002-04-01 02:04:43 +00:00
|
|
|
public:
|
2002-08-17 06:44:04 +00:00
|
|
|
Game m_Game; // Which Game is this Style used with?
|
|
|
|
|
bool m_bUsedForGameplay; // Can be used only for gameplay?
|
|
|
|
|
bool m_bUsedForEdit; // Can be used for editing?
|
2002-08-24 04:26:28 +00:00
|
|
|
|
|
|
|
|
/* The name of the style. (This is currently unused.) */
|
|
|
|
|
char m_szName[60];
|
2002-09-06 08:56:28 +00:00
|
|
|
|
2003-08-03 00:13:55 +00:00
|
|
|
/* Steps format used for each player. For example, "dance versus" reads
|
|
|
|
|
* the Steps with the tag "dance-single". */
|
2003-08-07 06:36:34 +00:00
|
|
|
StepsType m_StepsType;
|
2002-09-06 08:56:28 +00:00
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
enum StyleType
|
|
|
|
|
{
|
2002-08-13 23:26:46 +00:00
|
|
|
ONE_PLAYER_ONE_CREDIT, // e.g. single
|
|
|
|
|
TWO_PLAYERS_TWO_CREDITS, // e.g. versus
|
|
|
|
|
ONE_PLAYER_TWO_CREDITS, // e.g. double
|
2002-05-27 08:23:27 +00:00
|
|
|
};
|
2002-09-06 08:56:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
StyleType m_StyleType;
|
2002-05-27 08:23:27 +00:00
|
|
|
int m_iCenterX[NUM_PLAYERS]; // center of the player
|
|
|
|
|
int m_iColsPerPlayer; // number of total tracks this style expects (e.g. 4 for versus, but 8 for double)
|
2002-04-28 20:42:32 +00:00
|
|
|
struct ColumnInfo
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
int track; // take note data from this track
|
|
|
|
|
GameController controller; // use this instrument to hit a note on this track
|
|
|
|
|
GameButton button; // use this button to hit a note on this track
|
|
|
|
|
float fXOffset; // x position of the column relative to player center
|
2002-04-28 20:42:32 +00:00
|
|
|
};
|
|
|
|
|
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];
|
2002-04-16 17:31:00 +00:00
|
|
|
|
2002-08-22 22:59:19 +00:00
|
|
|
GameInput StyleInputToGameInput( const StyleInput StyleI ) const;
|
|
|
|
|
StyleInput GameInputToStyleInput( const GameInput &GameI ) const;
|
2002-04-01 02:04:43 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void GetTransformedNoteDataForStyle( PlayerNumber pn, NoteData* pOriginal, NoteData* pNoteDataOut ) const;
|
2002-09-06 08:56:28 +00:00
|
|
|
|
2003-08-07 06:16:17 +00:00
|
|
|
bool MatchesNotesType( StepsType type ) const;
|
2003-02-19 07:59:00 +00:00
|
|
|
|
|
|
|
|
void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const;
|
2003-09-23 03:55:18 +00:00
|
|
|
|
|
|
|
|
int NumSidesJoinedToPlay() const;
|
2002-02-24 01:43:11 +00:00
|
|
|
};
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|