2004-06-28 07:26:00 +00:00
|
|
|
/* Style - A data structure that holds the definition for one of a Game's styles. */
|
2004-05-31 21:35:31 +00:00
|
|
|
|
2004-06-28 07:26:00 +00:00
|
|
|
#ifndef STYLE_H
|
|
|
|
|
#define STYLE_H
|
2002-02-24 01:43:11 +00:00
|
|
|
|
2002-04-16 17:31:00 +00:00
|
|
|
#include "StyleInput.h"
|
|
|
|
|
#include "GameInput.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;
|
2004-07-25 17:07:32 +00:00
|
|
|
class Game;
|
2002-03-19 07:09:49 +00:00
|
|
|
|
2004-06-28 07:26:00 +00:00
|
|
|
class Style
|
2002-02-24 01:43:11 +00:00
|
|
|
{
|
2002-04-01 02:04:43 +00:00
|
|
|
public:
|
2004-07-25 17:07:32 +00:00
|
|
|
const Game* m_pGame; // Which Game is this Style used with?
|
2004-07-25 04:27:20 +00:00
|
|
|
bool m_bUsedForGameplay; // Can be used only for gameplay?
|
|
|
|
|
bool m_bUsedForEdit; // Can be used for editing?
|
|
|
|
|
bool m_bUsedForDemonstration; // Can be used for demonstration?
|
|
|
|
|
bool m_bUsedForHowToPlay; // Can be used for HowToPlay?
|
2002-08-24 04:26:28 +00:00
|
|
|
|
|
|
|
|
/* The name of the style. (This is currently unused.) */
|
2004-07-25 04:27:20 +00:00
|
|
|
const char *m_szName;
|
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
|
|
|
|
|
|
|
|
StyleType m_StyleType;
|
2004-11-07 05:49:06 +00:00
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
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
|
|
|
|
|
float fXOffset; // x position of the column relative to player center
|
2004-12-03 22:36:29 +00:00
|
|
|
const char *pzName; // name of this column, or NULL to use the name of a button mapped to it
|
2002-04-28 20:42:32 +00:00
|
|
|
};
|
2004-12-03 21:47:57 +00:00
|
|
|
|
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
|
2004-12-03 21:47:57 +00:00
|
|
|
|
|
|
|
|
/* This maps from game inputs to columns. More than one button may map to a
|
|
|
|
|
* single column. */
|
|
|
|
|
enum { NO_MAPPING = -1, END_MAPPING = -2 };
|
|
|
|
|
int m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; // maps each input to a column, or GAME_BUTTON_INVALID
|
2002-04-28 20:42:32 +00:00
|
|
|
int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
2004-06-27 06:52:49 +00:00
|
|
|
bool m_bNeedsZoomOutWith2Players;
|
|
|
|
|
bool m_bCanUseBeginnerHelper;
|
2005-10-02 20:17:19 +00:00
|
|
|
bool m_bLockDifficulties; // used in couple Styles
|
2002-04-16 17:31:00 +00:00
|
|
|
|
2004-05-31 22:03:01 +00:00
|
|
|
GameInput StyleInputToGameInput( const StyleInput& StyleI ) const;
|
2002-08-22 22:59:19 +00:00
|
|
|
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;
|
|
|
|
|
|
2004-10-23 17:43:49 +00:00
|
|
|
void GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& original, NoteData& noteDataOut ) const;
|
2002-09-06 08:56:28 +00:00
|
|
|
|
2004-07-12 02:19:24 +00:00
|
|
|
bool MatchesStepsType( StepsType type ) const;
|
2003-02-19 07:59:00 +00:00
|
|
|
|
|
|
|
|
void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const;
|
2002-02-24 01:43:11 +00:00
|
|
|
};
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|
2004-05-31 21:35:31 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2002 Chris Danford
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|