Etterna 0.74.4
Loading...
Searching...
No Matches
Game.h
1#ifndef GAMEDEF_H
2#define GAMEDEF_H
3
4#include "GameConstantsAndTypes.h"
5#include "Etterna/Singletons/InputMapper.h"
6
7struct lua_State;
8class Style;
9
10// PrimaryMenuButton and SecondaryMenuButton are used to support using
11// DeviceInputs that only navigate the menus.
12
13// A button being a primary menu button means that this GameButton will generate
14// a the corresponding MenuInput IF AND ONLY IF the GameButton corresponding to
15// the pimary input is not mapped.
16
17// Example 1: A user is using an arcade machine as their controller. Most
18// machines have MenuLeft, MenuStart, and MenuRight buttons on the cabinet, so
19// they should be used to navigate menus. The user will map these DeviceInputs
20// to the GameButtons "MenuLeft (optional)", "MenuStart", and "MenuRight
21// (optional)".
22
23// Example 2: A user is using PlayStation dance pads to play. These controllers
24// don't have dedicated DeviceInputs for MenuLeft and MenuRight. The user maps
25// Up, Down, Left, and Right as normal. Since the Left and Right GameButtons
26// have the flag FLAG_SECONDARY_MENU_*, they will function as MenuLeft and
27// MenuRight as long as "MenuLeft (optional)" and "MenuRight (optional)" are not
28// mapped.
29
32struct Game
33{
34 const char* m_szName;
35 const Style* const* m_apStyles;
36
40 bool m_bTickHolds;
41 bool m_PlayersHaveSeparateStyles;
42
43 InputScheme m_InputScheme;
44
46 {
47 GameButtonType m_gbt;
48 };
54 [[nodiscard]] auto GetPerButtonInfo(GameButton gb) const
55 -> const PerButtonInfo*;
56
57 [[nodiscard]] auto MapTapNoteScore(TapNoteScore tns) const -> TapNoteScore;
58 TapNoteScore m_mapW1To;
59 TapNoteScore m_mapW2To;
60 TapNoteScore m_mapW3To;
61 TapNoteScore m_mapW4To;
62 TapNoteScore m_mapW5To;
63 [[nodiscard]] auto GetMapJudgmentTo(TapNoteScore tns) const -> TapNoteScore;
64
65 // Lua
66 void PushSelf(lua_State* L);
67};
68
69#endif
Definition InputMapper.h:156
Definition Style.h:22
Definition Game.h:46
Holds information about a particular style of a game (e.g. "single", "double").
Definition Game.h:33
bool m_bCountNotesSeparately
Do we count multiple notes in a row as separate notes, or as one note?
Definition Game.h:39
PerButtonInfo m_PerButtonInfo[NUM_GameButton]
Data for each Game-specific GameButton.
Definition Game.h:53