Files
itgmania212121/stepmania/src/GameDef.h
T

63 lines
2.5 KiB
C++
Raw Normal View History

#ifndef GAMEDEF_H
#define GAMEDEF_H
2002-04-16 17:31:00 +00:00
/*
-----------------------------------------------------------------------------
Class: GameDef
Desc: Holds information about a particular style of a game (e.g. "single", "double").
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 "GameInput.h"
#include "MenuInput.h"
#include "GameConstantsAndTypes.h"
2002-04-16 17:31:00 +00:00
const int MAX_STYLES_PER_GAME = 10;
2002-05-27 08:23:27 +00:00
//
// PrimaryMenuButton and SecondaryMenuButton are used to support using DeviceInputs that only
// navigate the menus.
//
// A button being a primary menu button means that this GameButton will generate a the
// corresponding MenuInput.
// A button being a primary menu button means that this GameButton will generate a the
// corresponding MenuInput IF AND ONLY IF the GameButton corresponding to the pimary input
// is not mapped.
//
// Example 1: A user is using a an arcade DDR machine as their controllre. This machine has
// MenuLeft, MenuStart, and MenuRight buttons on the cabinet, so they should be used to navigate menus.
// The user will map these DeviceInputs to the GameButtons "MenuLeft (optional)", "MenuStart", and
// "MenuRight (optional)".
//
2002-12-17 21:14:45 +00:00
// Example 2: A user is using PlayStation DDR soft pads to play. His controller doesn't have dedicated
// DeviceInputs for MenuLeft and MenuRight. The user maps Up, Down, Left, and Right as normal.
// Since the Left and Right GameButtons have the flag FLAG_SECONDARY_MENU_*, they will function as
// MenuLeft and MenuRight as long as "MenuLeft (optional)" and "MenuRight (optional)" are not mapped.
//
2002-04-16 17:31:00 +00:00
2002-04-28 20:42:32 +00:00
class StyleDef;
2002-04-16 17:31:00 +00:00
2002-04-28 20:42:32 +00:00
class GameDef
2002-04-16 17:31:00 +00:00
{
public:
2002-05-27 08:23:27 +00:00
char m_szName[60];
char m_szDescription[60];
int m_iNumControllers;
int m_iButtonsPerController;
char m_szButtonNames[MAX_GAME_BUTTONS][60]; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare"
char m_szSecondaryFunction[MAX_GAME_BUTTONS][60]; // displayed on the mapping screen
GameButton m_DedicatedMenuButton[NUM_MENU_BUTTONS];
GameButton m_SecondaryMenuButton[NUM_MENU_BUTTONS];
int m_iDefaultKeyboardKey[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; // default keyboard keys only have an effect the current game is this game
2002-04-16 17:31:00 +00:00
2002-12-17 21:14:45 +00:00
GameButton ButtonNameToIndex( const CString &sButtonName );
2002-08-22 23:36:03 +00:00
MenuInput GameInputToMenuInput( GameInput GameI ) const;
void MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const;
2002-04-16 17:31:00 +00:00
};
#endif