JubeatPlus 3.9.11
Loading...
Searching...
No Matches
Sequence.h
Go to the documentation of this file.
1
18
19#import <Foundation/Foundation.h>
20
21#import "MainGameRenderer.h"
22
23@class KUnzip;
24
25NS_ASSUME_NONNULL_BEGIN
26
28enum {
31};
32
34enum {
37};
38
40enum {
43};
44
61
79
90typedef struct {
91 short kind; // +0x00
92 short judge; // +0x02
93 unsigned int sector; // +0x04
94 unsigned int value; // +0x08
95 short holdHeadJudge; // +0x0c
96 unsigned int holdReleaseSector; // +0x10
98
102@interface Sequence : NSObject {
103@protected
105 unsigned int numEvent;
106 unsigned int numPlayEvent;
107 unsigned int endSector;
108 char musicBar[kSequenceMusicBarByteCount];
109 unsigned int currentIndex;
110 unsigned int currentHoldIndex;
111 unsigned int judgedIndex;
112 unsigned int currentTempo;
113 unsigned int oldTempo;
114 unsigned int lastHakuSector;
115 unsigned int nextHakuSector;
116 unsigned int lastMeasureSector;
117 unsigned int nextMeasureSector;
118 short lastJudge[kSequencePanelCount];
119 unsigned int lastJudgeSector[kSequencePanelCount];
121 unsigned int replaceTable[kSequencePanelCount];
123 NSArray *playEventTable;
124 NSArray *holdEventTable;
127 unsigned short _firstMarker;
128 unsigned int _currentSector;
129 unsigned int _firstMarkerSector;
131}
132
139+ (void)getMusicBarData:(char *)raw raw:(nullable NSData *)data;
140
147+ (unsigned int)checkExistHoldMarkerFlag:(nullable KUnzip *)data;
148
155+ (BOOL)checkExistHoldMarker:(nullable NSData *)data;
156
163+ (SequenceRank)rankOfPoint:(unsigned int)point;
164
171- (instancetype)initWithData:(nullable NSData *)data;
172
180- (instancetype)initWithCustomData:(nullable NSDictionary *)data
181 tableData:(nullable NSArray *)tableData;
182
187- (void)replay;
188
193- (void)reset;
194
200- (void)seekToTime:(double)time;
201
207- (void)getMarkerState:(int *)state;
208
214- (void)getHoldMarkerState:(MainGameHoldState *)state;
215
221- (const ScoreData *)getScore;
222
228- (BOOL)isFullcombo;
229
235- (BOOL)isExcellent;
236
242- (SequenceRank)rank;
243
249- (const char *)getMusicBar;
250
256- (nullable NSArray *)getPlayEvents;
257
263- (nullable NSArray *)getHoldEvents;
264
271- (void)judge:(int)btnPress btnPress:(int)btnDown;
272
277@property(nonatomic, readonly) float hakuPhase;
278
283@property(nonatomic, readonly) float measurePhase;
284
289@property(nonatomic, readonly) float playPosition;
290
295@property(nonatomic, readonly) double currentTime;
296
301@property(nonatomic, readonly) unsigned int currentSector;
302
307@property(nonatomic, readonly) unsigned short firstMarker;
308
313@property(nonatomic, readonly) unsigned int firstMarkerSector;
314
315@end
316
317NS_ASSUME_NONNULL_END
318
319// code: language=Objective-C
320// kate: hl Objective-C;
321// vim: set ft=objc :
The base gameplay renderer and driver for a single play session.
@ kSequenceMusicBarByteCount
The length of the raw music-bar bitmap the chart carries, in bytes.
Definition Sequence.h:41
SequenceJudgeGrade
A judgement grade for a single note hit.
Definition Sequence.h:53
@ SequenceJudgeGradePoor
A poor; resets the combo and costs tension like a miss.
Definition Sequence.h:56
@ SequenceJudgeGradeMiss
A miss; resets the combo and costs tension.
Definition Sequence.h:55
@ SequenceJudgeGradeGood
A good; extends the combo.
Definition Sequence.h:57
@ SequenceJudgeGradePerfect
A perfect; extends the combo.
Definition Sequence.h:59
@ SequenceJudgeGradeGreat
A great; extends the combo.
Definition Sequence.h:58
@ SequenceJudgeGradeNone
No judgement (too early, or not yet judged).
Definition Sequence.h:54
@ kSequenceMusicBarSegmentCount
The number of segments in the result-screen music bar; each note maps to one via its sector.
Definition Sequence.h:35
SequenceRank
A score rank tier, returned by +rankOfPoint: and -rank .
Definition Sequence.h:68
@ SequenceRankTier1
500000 to 699999 points.
Definition Sequence.h:70
@ SequenceRankTier7
980000 to 999999 points.
Definition Sequence.h:76
@ SequenceRankTier5
900000 to 949999 points.
Definition Sequence.h:74
@ SequenceRankTier2
700000 to 799999 points.
Definition Sequence.h:71
@ SequenceRankTier0
Below 500000 points.
Definition Sequence.h:69
@ SequenceRankTier8
A perfect 1000000 points.
Definition Sequence.h:77
@ SequenceRankTier3
800000 to 849999 points.
Definition Sequence.h:72
@ SequenceRankTier6
950000 to 979999 points.
Definition Sequence.h:75
@ SequenceRankTier4
850000 to 899999 points.
Definition Sequence.h:73
@ kSequencePanelCount
The number of playfield panels (a 4x4 grid), sizing the per-panel judgement arrays.
Definition Sequence.h:29
Reads named entries out of one packed archive.
Definition KUnzip.h:22
The core gameplay judgement engine for a single play session.
Definition Sequence.h:102
unsigned int _firstMarkerSector
The sector of the first marker.
Definition Sequence.h:129
double _currentTime
The current play position, in seconds.
Definition Sequence.h:130
ScoreData gameScore
The live score summary.
Definition Sequence.h:120
unsigned int replaceTable[kSequencePanelCount]
The panel-remap table (random mode).
Definition Sequence.h:121
unsigned short _firstMarker
The panel bitmask of the first marker.
Definition Sequence.h:127
unsigned int numEvent
The number of events in events .
Definition Sequence.h:105
unsigned int lastMeasureSector
The sector of the last measure line.
Definition Sequence.h:116
unsigned int _currentSector
The current play position, in sectors.
Definition Sequence.h:128
NSArray * holdEventTable
Hold events, as boxed [grade, value] pairs.
Definition Sequence.h:124
unsigned int numPlayEvent
The number of judged (scoring) notes.
Definition Sequence.h:106
char musicBar[kSequenceMusicBarByteCount]
The raw music-bar bitmap from the chart.
Definition Sequence.h:108
short * replayJudgeTable
The recorded per-note tap grades, for replay.
Definition Sequence.h:125
BOOL isPerfectMode
Whether perfect-mode judging is in effect.
Definition Sequence.h:122
unsigned int nextHakuSector
The sector of the next beat (haku) line.
Definition Sequence.h:115
short lastJudge[kSequencePanelCount]
The most recent grade shown per panel.
Definition Sequence.h:118
unsigned int endSector
The chart's final sector.
Definition Sequence.h:107
unsigned int judgedIndex
The judgement cursor over events .
Definition Sequence.h:111
unsigned int currentTempo
The tempo in effect at the play position.
Definition Sequence.h:112
SequenceEvent * events
The malloc'd chart-event array.
Definition Sequence.h:104
unsigned int oldTempo
The tempo in effect before the last change.
Definition Sequence.h:113
NSArray * playEventTable
Tap events, as boxed [grade, panel] pairs.
Definition Sequence.h:123
short * replayTmpJudgeTable
The recorded per-note hold grades, for replay.
Definition Sequence.h:126
unsigned int currentIndex
The seek cursor over events .
Definition Sequence.h:109
unsigned int lastHakuSector
The sector of the last beat (haku) line.
Definition Sequence.h:114
unsigned int lastJudgeSector[kSequencePanelCount]
The sector of that grade per panel.
Definition Sequence.h:119
unsigned int nextMeasureSector
The sector of the next measure line.
Definition Sequence.h:117
unsigned int currentHoldIndex
The seek cursor over hold events.
Definition Sequence.h:110
One panel's hold-marker tracking state.
Definition MainGameRenderer.h:35
A play session's cumulative score summary.
Definition MainGameRenderer.h:50
One note event of a chart.
Definition Sequence.h:90
short judge
The tap grade, or a hold's release grade.
Definition Sequence.h:92
short holdHeadJudge
A hold's head-press grade.
Definition Sequence.h:95
unsigned int holdReleaseSector
The sector at which a hold was released.
Definition Sequence.h:96
unsigned int sector
The event's timing position, in sectors.
Definition Sequence.h:93
short kind
The event kind (1 tap, 3 measure, 4 haku, 5 tempo, 6 hold).
Definition Sequence.h:91
unsigned int value
Panel index in the low four bits, plus packed hold data.
Definition Sequence.h:94