Etterna 0.74.4
Loading...
Searching...
No Matches
Style.h
1
4#ifndef STYLE_H
5#define STYLE_H
6
7#include "Etterna/Models/Misc/GameConstantsAndTypes.h"
8#include "Etterna/Models/Misc/GameInput.h"
9#include "Etterna/Models/Misc/NoteTypes.h"
10#include "Etterna/Models/Misc/PlayerNumber.h"
11
13const int MAX_COLS_PER_PLAYER = MAX_NOTE_TRACKS;
15static const int Column_Invalid = -1;
16
17class NoteData;
18struct Game;
19struct lua_State;
20
21class Style
22{
23 public:
32
38 const char* m_szName;
39
45 StepsType m_StepsType;
46
48 StyleType m_StyleType;
49
58 {
59 int track;
60 float fXOffset;
62 const char* pzName;
64 };
65
67 ColumnInfo m_ColumnInfo[MAX_COLS_PER_PLAYER];
68
69 /* This maps from game inputs to columns. More than one button may map to a
70 * single column. */
71 enum
72 {
73 NO_MAPPING = -1,
74 END_MAPPING = -2
75 };
77 int m_iInputColumn[NUM_GameController][NUM_GameButton];
78 int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
79
80 void StyleInputToGameInput(int iCol,
81 std::vector<GameInput>& ret) const;
88 [[nodiscard]] auto GameInputToColumn(const GameInput& GameI) const -> int;
89 [[nodiscard]] auto ColToButtonName(int iCol) const -> std::string;
90
91 [[nodiscard]] auto GetUsesCenteredArrows() const -> bool;
92 void GetTransformedNoteDataForStyle(PlayerNumber pn,
93 const NoteData& original,
94 NoteData& noteDataOut) const;
95 void GetMinAndMaxColX(PlayerNumber pn,
96 float& fMixXOut,
97 float& fMaxXOut) const;
98 [[nodiscard]] auto GetWidth(PlayerNumber pn) const -> float;
99
100 // Lua
101 void PushSelf(lua_State* L);
102};
103
104#endif
Holds data about the notes that the player is supposed to hit.
Definition NoteData.h:43
Definition Style.h:22
StepsType m_StepsType
Steps format used for each player.
Definition Style.h:45
bool m_bUsedForEdit
Can this style be used for making edits?
Definition Style.h:27
bool m_bUsedForDemonstration
Can this style be used in a demonstration?
Definition Style.h:29
const char * m_szName
The name of the style.
Definition Style.h:38
bool m_bUsedForGameplay
Can this style be used for gameplay purposes?
Definition Style.h:25
bool m_bUsedForHowToPlay
Can this style be used to explain how to play the game?
Definition Style.h:31
auto GameInputToColumn(const GameInput &GameI) const -> int
Retrieve the column based on the game input.
Definition Style.cpp:97
ColumnInfo m_ColumnInfo[MAX_COLS_PER_PLAYER]
Map each players' colun to a track in the NoteData.
Definition Style.h:67
int m_iColsPerPlayer
The number of total tracks/columns this style expects.
Definition Style.h:55
StyleType m_StyleType
Style format used for each player.
Definition Style.h:48
int m_iInputColumn[NUM_GameController][NUM_GameButton]
Map each input to a column, or GameButton_Invalid.
Definition Style.h:77
An input event specific to an InputScheme defined by a logical controller and button.
Definition GameInput.h:191
Holds information about a particular style of a game (e.g. "single", "double").
Definition Game.h:33
Some general column infromation.
Definition Style.h:58
float fXOffset
Definition Style.h:60
const char * pzName
Definition Style.h:62
int track
Definition Style.h:59