RhythmGame 1.4.3
Loading...
Searching...
No Matches
Lr2SkinRuntimeTypes.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <QList>
6#include <QSet>
7#include <QString>
8#include <QVariant>
9#include <QVariantList>
10#include <QVector>
11
12namespace lr2skin::runtime {
13
23
32
33struct Dst {
34 bool valid = false;
35 int time = 0;
36 int x = 0;
37 int y = 0;
38 int w = 0;
39 int h = 0;
40 int acc = 0;
41 int a = 255;
42 int r = 255;
43 int g = 255;
44 int b = 255;
45 int blend = 0;
46 int filter = 0;
47 int angle = 0;
48 int center = 0;
49 int sortId = 0;
50 int loop = 0;
51 int timer = 0;
52 int op1 = 0;
53 int op2 = 0;
54 int op3 = 0;
55 int op4 = 0;
56 QVector<int> offsets;
57};
58
59struct Source {
60 bool valid = false;
61 int num = 0;
62 int st = 0;
63 int x = 0;
64 int y = 0;
65 int w = 0;
66 int h = 0;
67 int divX = 1;
68 int divY = 1;
69 int cycle = 0;
70 int timer = 0;
72 bool button = false;
73 int buttonId = 0;
74 bool onMouse = false;
75 bool mouseCursor = false;
76 bool slider = false;
78 int sliderRange = 0;
79 int sliderType = 0;
81 bool sliderRefNumber = false;
82 bool imageSet = false;
83 int side = 0;
84 bool nowCombo = false;
85 bool hasKind = false;
86 int kind = 0;
87 int graphType = 0;
88 int titleType = -1;
89 int align = 0;
90 int font = 0;
91 int edit = 0;
92 int panel = 0;
93 QString fontPath;
94 QString fontFamily;
95 int fontSize = 0;
97 int fontType = 0;
98 bool bitmapFont = false;
99 bool readme = false;
100 int readmeId = 0;
102 int specialType = 0;
103 bool bga = false;
104 bool bgaNoBase = false;
105 bool bgaNoLayer = false;
106 bool bgaNoPoor = false;
107 QString debugLabel;
108 QString path;
109};
110
112
114 bool canUseStaticState = false;
115 bool usesActiveOptions = false;
116 bool usesDynamicTimer = false;
117 bool loopsContinuously = false;
119 int firstTimer = 0;
120 int firstSortId = 0;
121};
122
123QVariantList readVariantList(const QVariant& value);
124QVector<int> readOffsets(const QVariant& value);
125bool readDst(const QVariant& value, Dst& dst);
126QVector<Dst> readDsts(const QVariantList& dsts);
127QVector<Dst> readDsts(const QVariant& dsts);
128bool readSource(const QVariant& value, Source& source);
129bool readState(const QVariant& value, State& state);
130
131DstAnalysis analyzeDsts(const QVector<Dst>& dsts);
132int animationLimitFor(const QVector<Dst>& dsts);
133QSet<int> activeOptionSet(const QVariant& activeOptions);
134QSet<int> activeOptionSet(const QList<int>& activeOptions);
135QVariantList activeOptionsForDsts(const Dst& firstDst, const QVariant& activeOptions);
136bool allOpsMatch(const Dst& dst, const QSet<int>& activeOptions);
137qreal timerValue(const QVariant& timers, int timerIdx);
138
139State currentState(const QVector<Dst>& dsts,
140 int globalTime,
141 qreal timerFire,
142 const QSet<int>& activeOptions);
143State copyDstAsState(const Dst& dst, const Dst& controlDst);
144bool sameState(const State& lhs, const State& rhs);
145qreal applyAccel(qreal progress, int accType);
146
149bool sourceTreeCyclesContinuously(const QVariant& value);
150bool sourceTreeUsesChartAsset(const QVariant& value);
155bool isSelectBarElement(int type, const Source& source);
156qreal selectBarElementLayer(int type, const Source& source);
157int staticNoteElementSortId(const QVariantList& noteDsts);
158int firstSortId(const QVariantList& dsts);
159int firstSortId(const QVariant& dsts);
160SpriteStateOverrideKind spriteStateOverrideKind(const QString& screenKey,
161 bool gameplayScreen,
162 const Source& source);
163
164State translatedSliderState(State state, qreal position, int range, int direction);
165State sliderTrackState(const Source& source, const State& baseState);
167 const State& track,
168 qreal pointerX,
169 qreal pointerY);
170bool rectContains(const QVariant& state, qreal skinX, qreal skinY);
171
172} // namespace lr2skin::runtime
ReplaySource source
Definition BeatorajaReplayImporter.cpp:71
Type type
Definition BmsNotesData.cpp:33
double value
Definition BmsNotesData.cpp:35
QMap< int, QVariantList > noteDsts
Definition Lr2SkinParser.cpp:130
std::set< int > activeOptions
Definition Lr2SkinParser.cpp:143
Definition Lr2TimelineStateValue.h:8
Definition Lr2SkinRuntimeTypes.cpp:327
ClockMode
Definition Lr2SkinRuntimeTypes.h:14
@ SelectSourceClock
Definition Lr2SkinRuntimeTypes.h:17
@ SelectInfoClock
Definition Lr2SkinRuntimeTypes.h:21
@ BarClock
Definition Lr2SkinRuntimeTypes.h:18
@ RenderClock
Definition Lr2SkinRuntimeTypes.h:16
@ ManualClock
Definition Lr2SkinRuntimeTypes.h:15
@ SelectLiveClock
Definition Lr2SkinRuntimeTypes.h:20
@ GlobalClock
Definition Lr2SkinRuntimeTypes.h:19
State copyDstAsState(const Dst &dst, const Dst &controlDst)
Definition Lr2SkinRuntimeTypes.cpp:1074
QVariantList activeOptionsForDsts(const Dst &firstDst, const QVariant &activeOptions)
Definition Lr2SkinRuntimeTypes.cpp:904
qreal selectBarElementLayer(int type, const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1230
QVariantList readVariantList(const QVariant &value)
Definition Lr2SkinRuntimeTypes.cpp:329
bool sourceUsesChartAsset(const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1142
bool sourceTreeUsesChartAsset(const QVariant &value)
Definition Lr2SkinRuntimeTypes.cpp:1150
bool sourceUsesDynamicTimer(const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1165
State translatedSliderState(State state, qreal position, int range, int direction)
Definition Lr2SkinRuntimeTypes.cpp:1315
int animationLimitFor(const QVector< Dst > &dsts)
Definition Lr2SkinRuntimeTypes.cpp:820
State sliderTrackState(const Source &source, const State &baseState)
Definition Lr2SkinRuntimeTypes.cpp:1341
bool allOpsMatch(const Dst &dst, const QSet< int > &activeOptions)
Definition Lr2SkinRuntimeTypes.cpp:942
bool rectContains(const QVariant &state, qreal skinX, qreal skinY)
Definition Lr2SkinRuntimeTypes.cpp:1416
bool sourceTreeCyclesContinuously(const QVariant &value)
Definition Lr2SkinRuntimeTypes.cpp:1146
int staticNoteElementSortId(const QVariantList &noteDsts)
Definition Lr2SkinRuntimeTypes.cpp:1264
SpriteStateOverrideKind
Definition Lr2SkinRuntimeTypes.h:24
@ NoSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:25
@ GenericSliderSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:30
@ SelectScrollSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:26
@ GameplayLaneCoverSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:28
@ GameplayProgressSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:27
@ NumberRefSpriteStateOverride
Definition Lr2SkinRuntimeTypes.h:29
QSet< int > activeOptionSet(const QVariant &activeOptions)
Definition Lr2SkinRuntimeTypes.cpp:844
int gameplayNumberDependencyMask(const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1169
SpriteStateOverrideKind spriteStateOverrideKind(const QString &screenKey, bool gameplayScreen, const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1289
int chartAssetSourceType(const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1154
QVector< Dst > readDsts(const QVariantList &dsts)
Definition Lr2SkinRuntimeTypes.cpp:507
qreal timerValue(const QVariant &timers, int timerIdx)
Definition Lr2SkinRuntimeTypes.cpp:954
bool sourceCyclesContinuously(const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1136
qreal sliderPositionFromPointer(const Source &source, const State &track, qreal pointerX, qreal pointerY)
Definition Lr2SkinRuntimeTypes.cpp:1370
bool readDst(const QVariant &value, Dst &dst)
Definition Lr2SkinRuntimeTypes.cpp:389
bool elementTypeUsesGameplayHitEvents(int type)
Definition Lr2SkinRuntimeTypes.cpp:1219
bool readState(const QVariant &value, State &state)
Definition Lr2SkinRuntimeTypes.cpp:764
bool readSource(const QVariant &value, Source &source)
Definition Lr2SkinRuntimeTypes.cpp:523
int firstSortId(const QVariantList &dsts)
Definition Lr2SkinRuntimeTypes.cpp:1277
State currentState(const QVector< Dst > &dsts, int globalTime, qreal timerFire, const QSet< int > &activeOptions)
Definition Lr2SkinRuntimeTypes.cpp:982
qreal applyAccel(qreal progress, int accType)
Definition Lr2SkinRuntimeTypes.cpp:1122
QVector< int > readOffsets(const QVariant &value)
Definition Lr2SkinRuntimeTypes.cpp:353
bool sameState(const State &lhs, const State &rhs)
Definition Lr2SkinRuntimeTypes.cpp:1097
DstAnalysis analyzeDsts(const QVector< Dst > &dsts)
Definition Lr2SkinRuntimeTypes.cpp:794
bool isSelectBarElement(int type, const Source &source)
Definition Lr2SkinRuntimeTypes.cpp:1223
Definition Lr2SkinRuntimeTypes.h:113
int firstTimer
Definition Lr2SkinRuntimeTypes.h:119
bool loopsContinuously
Definition Lr2SkinRuntimeTypes.h:117
bool usesDynamicTimer
Definition Lr2SkinRuntimeTypes.h:116
int firstSortId
Definition Lr2SkinRuntimeTypes.h:120
bool canUseStaticState
Definition Lr2SkinRuntimeTypes.h:114
bool usesActiveOptions
Definition Lr2SkinRuntimeTypes.h:115
int scratchRotationSide
Definition Lr2SkinRuntimeTypes.h:118
Definition Lr2SkinRuntimeTypes.h:33
bool valid
Definition Lr2SkinRuntimeTypes.h:34
int y
Definition Lr2SkinRuntimeTypes.h:37
int b
Definition Lr2SkinRuntimeTypes.h:44
int x
Definition Lr2SkinRuntimeTypes.h:36
int w
Definition Lr2SkinRuntimeTypes.h:38
int blend
Definition Lr2SkinRuntimeTypes.h:45
int a
Definition Lr2SkinRuntimeTypes.h:41
int loop
Definition Lr2SkinRuntimeTypes.h:50
int angle
Definition Lr2SkinRuntimeTypes.h:47
int g
Definition Lr2SkinRuntimeTypes.h:43
int op3
Definition Lr2SkinRuntimeTypes.h:54
int sortId
Definition Lr2SkinRuntimeTypes.h:49
int time
Definition Lr2SkinRuntimeTypes.h:35
int op4
Definition Lr2SkinRuntimeTypes.h:55
int filter
Definition Lr2SkinRuntimeTypes.h:46
int h
Definition Lr2SkinRuntimeTypes.h:39
int r
Definition Lr2SkinRuntimeTypes.h:42
int timer
Definition Lr2SkinRuntimeTypes.h:51
int center
Definition Lr2SkinRuntimeTypes.h:48
int acc
Definition Lr2SkinRuntimeTypes.h:40
QVector< int > offsets
Definition Lr2SkinRuntimeTypes.h:56
int op2
Definition Lr2SkinRuntimeTypes.h:53
int op1
Definition Lr2SkinRuntimeTypes.h:52
Definition Lr2SkinRuntimeTypes.h:59
bool sliderRefNumber
Definition Lr2SkinRuntimeTypes.h:81
QString fontFamily
Definition Lr2SkinRuntimeTypes.h:94
int fontSize
Definition Lr2SkinRuntimeTypes.h:95
int kind
Definition Lr2SkinRuntimeTypes.h:86
int specialType
Definition Lr2SkinRuntimeTypes.h:102
bool bgaNoLayer
Definition Lr2SkinRuntimeTypes.h:105
int divY
Definition Lr2SkinRuntimeTypes.h:68
int titleType
Definition Lr2SkinRuntimeTypes.h:88
bool nowCombo
Definition Lr2SkinRuntimeTypes.h:84
int w
Definition Lr2SkinRuntimeTypes.h:65
int cycle
Definition Lr2SkinRuntimeTypes.h:69
bool bgaNoPoor
Definition Lr2SkinRuntimeTypes.h:106
int sliderDirection
Definition Lr2SkinRuntimeTypes.h:77
int readmeId
Definition Lr2SkinRuntimeTypes.h:100
bool bitmapFont
Definition Lr2SkinRuntimeTypes.h:98
int sliderRange
Definition Lr2SkinRuntimeTypes.h:78
bool slider
Definition Lr2SkinRuntimeTypes.h:76
QString fontPath
Definition Lr2SkinRuntimeTypes.h:93
int divX
Definition Lr2SkinRuntimeTypes.h:67
bool onMouse
Definition Lr2SkinRuntimeTypes.h:74
int timer
Definition Lr2SkinRuntimeTypes.h:70
QString debugLabel
Definition Lr2SkinRuntimeTypes.h:107
bool button
Definition Lr2SkinRuntimeTypes.h:72
QString path
Definition Lr2SkinRuntimeTypes.h:108
int fontType
Definition Lr2SkinRuntimeTypes.h:97
int resultChartType
Definition Lr2SkinRuntimeTypes.h:71
int graphType
Definition Lr2SkinRuntimeTypes.h:87
int st
Definition Lr2SkinRuntimeTypes.h:62
int sliderDisabled
Definition Lr2SkinRuntimeTypes.h:80
int buttonId
Definition Lr2SkinRuntimeTypes.h:73
bool hasKind
Definition Lr2SkinRuntimeTypes.h:85
int y
Definition Lr2SkinRuntimeTypes.h:64
bool mouseCursor
Definition Lr2SkinRuntimeTypes.h:75
int edit
Definition Lr2SkinRuntimeTypes.h:91
bool bga
Definition Lr2SkinRuntimeTypes.h:103
int align
Definition Lr2SkinRuntimeTypes.h:89
bool imageSet
Definition Lr2SkinRuntimeTypes.h:82
int font
Definition Lr2SkinRuntimeTypes.h:90
bool valid
Definition Lr2SkinRuntimeTypes.h:60
int side
Definition Lr2SkinRuntimeTypes.h:83
int panel
Definition Lr2SkinRuntimeTypes.h:92
int readmeLineSpacing
Definition Lr2SkinRuntimeTypes.h:101
int num
Definition Lr2SkinRuntimeTypes.h:61
bool bgaNoBase
Definition Lr2SkinRuntimeTypes.h:104
int sliderType
Definition Lr2SkinRuntimeTypes.h:79
int h
Definition Lr2SkinRuntimeTypes.h:66
bool readme
Definition Lr2SkinRuntimeTypes.h:99
int fontThickness
Definition Lr2SkinRuntimeTypes.h:96
int x
Definition Lr2SkinRuntimeTypes.h:63