JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MainGameRenderer.h
Go to the documentation of this file.
1
16
17#import <CoreGraphics/CoreGraphics.h>
18#import <Foundation/Foundation.h>
19#import <UIKit/UIKit.h>
20
21NS_ASSUME_NONNULL_BEGIN
22
24enum {
27};
28
35typedef struct {
36 int state; // +0x00
37 unsigned int move; // +0x04
38 unsigned int currentSector; // +0x08
39 unsigned int endSector; // +0x0c
41
50typedef struct {
51 int nMiss; // +0x00
52 int nPoor; // +0x04
53 int nGood; // +0x08
54 int nGreat; // +0x0c
55 int nPerfect; // +0x10
56 int curCombo; // +0x14
57 int maxCombo; // +0x18
58 int tension; // +0x1c
59 int point; // +0x20
60 int bonusPoint; // +0x24
61 int totalPoint; // +0x28
62 char musicBarResult[30]; // +0x2c
63} ScoreData;
64
65@class RendererConf;
66@class Sequence;
67@class EAGLView;
68@class HoldMarkerRender;
69
73@interface MainGameRenderer : NSObject {
74@protected
76 unsigned int lastCombo;
77 unsigned int comboEffectFrame;
78 unsigned int comboCutFrame;
79 unsigned int scoreDisplay;
80 unsigned int partnerScoreDisplay;
81 int markerState[kMainGameGridPanelCount];
82 MainGameHoldState holdState[kMainGameGridPanelCount];
84 unsigned int _state;
85}
86
93- (instancetype)init;
94
103- (void)loadTexure:(nullable RendererConf *)conf
104 artwork:(nullable UIImage *)artwork
105 index:(nullable UIImage *)index;
106
111- (void)releaseTexture;
112
118- (double)durationOfReadyGo;
119
124- (void)startPlay;
125
130- (void)endResult;
131
137- (double)buttonAreaOffset;
138
144- (double)gameAreaOffset;
145
150- (void)draw;
151
159- (void)drawDebugText:(nullable const char *)text pos:(CGPoint)pos alpha:(float)alpha;
160
166- (CGRect)getMusicBarRect;
167
173- (void)backupScoreData;
174
179- (void)replaySelect;
180
185- (void)replayEnd;
186
191@property(nonatomic, strong, nullable) RendererConf *rendererConf;
192
197@property(nonatomic) unsigned int state;
198
203@property(nonatomic) unsigned int subState;
204
209@property(nonatomic) BOOL showCombo;
210
215@property(nonatomic) BOOL isNewRecord;
216
221@property(nonatomic) unsigned int scoreRecord;
222
227@property(nonatomic) int btnPress;
228
233@property(nonatomic) int btnDown;
234
239@property(nonatomic) BOOL partnerFinished;
240
245@property(nonatomic) unsigned int partnerScore;
246
251@property(nonatomic) unsigned int partnerFinalBonus;
252
257@property(nonatomic) BOOL partnerFullcombo;
258
263@property(nonatomic, strong, nullable) Sequence *sequence;
264
269@property(nonatomic, strong, nullable) EAGLView *eaglView;
270
275@property(nonatomic) int ghostPress;
276
281@property(nonatomic, unsafe_unretained, nullable) UIImageView *goodJobImage;
282
287@property(nonatomic) float goodJobAlphaMax;
288
293@property(nonatomic) BOOL isSession;
294
299@property(nonatomic) BOOL isConnected;
300
305@property(nonatomic) BOOL isCustom;
306
311@property(nonatomic) BOOL isDownload;
312
317@property(nonatomic) BOOL isTextureChange;
318
323@property(nonatomic) BOOL hasMusic;
324
329@property(nonatomic) BOOL replayPlaying;
330
335@property(nonatomic) BOOL scoreBackup;
336
341@property(nonatomic, readonly) BOOL isEndState;
342
347@property(nonatomic, readonly) unsigned int endButtonID;
348
353@property(nonatomic, readonly) unsigned int evaluateButtonID;
354
359@property(nonatomic, readonly) unsigned int goodJobButtonID;
360
365@property(nonatomic, readonly) CGPoint goodJobPosition;
366
371@property(nonatomic, readonly) int buttonMarginForScreen40;
372
377@property(nonatomic, readonly) int upperBgHeight40;
378
383@property(nonatomic, readonly) unsigned int twitterSendButtonID;
384
389@property(nonatomic, readonly) CGPoint twitterBtnPosition;
390
395@property(nonatomic, readonly) unsigned int storeMoveButtonID;
396
401@property(nonatomic, readonly) CGPoint storeMoveBtnPosition;
402
407@property(nonatomic, readonly) ScoreData replayBackupScore;
408
409@end
410
411NS_ASSUME_NONNULL_END
412
413// code: language=Objective-C
414// kate: hl Objective-C;
415// vim: set ft=objc :
@ kMainGameGridPanelCount
The number of panels in the game's 4x4 grid, sizing the per-panel state arrays.
Definition MainGameRenderer.h:25
The OpenGL ES 1.1 rendering view backing the game.
Definition EAGLView.h:19
Draws hold markers from a sixteen-entry panel array.
Definition HoldMarkerRender.h:41
The abstract base renderer for a play session.
Definition MainGameRenderer.h:73
unsigned int comboEffectFrame
The combo burst animation frame.
Definition MainGameRenderer.h:77
unsigned int evaluateButtonID
The button identifier for the evaluate action.
Definition MainGameRenderer.m:116
BOOL hasMusic
Whether the session has music.
Definition MainGameRenderer.h:323
unsigned int partnerFinalBonus
The partner's final bonus.
Definition MainGameRenderer.h:251
BOOL isNewRecord
Whether the session set a new record.
Definition MainGameRenderer.h:215
unsigned int comboCutFrame
The combo cut-in animation frame.
Definition MainGameRenderer.h:78
BOOL showCombo
Whether the combo counter is shown.
Definition MainGameRenderer.h:209
unsigned int subState
The render sub-state within the current state .
Definition MainGameRenderer.h:203
UIImageView * goodJobImage
The good-job overlay image view.
Definition MainGameRenderer.h:281
BOOL isEndState
Whether the session has reached its end sub-state.
Definition MainGameRenderer.m:50
BOOL partnerFullcombo
Whether the partner achieved a full combo.
Definition MainGameRenderer.h:257
EAGLView * eaglView
The GL view this renderer draws into.
Definition MainGameRenderer.h:269
float goodJobAlphaMax
The peak opacity of the good-job overlay.
Definition MainGameRenderer.h:287
ScoreData replayBackupScore
The score snapshot captured for replay by -backupScoreData .
Definition MainGameRenderer.h:407
BOOL isDownload
Whether the tune was downloaded.
Definition MainGameRenderer.h:311
BOOL isConnected
Whether the session partner is connected.
Definition MainGameRenderer.h:299
RendererConf * rendererConf
The renderer configuration for the current session.
Definition MainGameRenderer.h:191
BOOL replayPlaying
Whether a replay is playing.
Definition MainGameRenderer.h:329
CGPoint twitterBtnPosition
The position of the tweet-send button.
Definition MainGameRenderer.m:136
MainGameHoldState holdState[kMainGameGridPanelCount]
Per-panel hold-marker state.
Definition MainGameRenderer.h:82
CGPoint storeMoveBtnPosition
The position of the store-move button.
Definition MainGameRenderer.m:146
int btnDown
The currently held-down button bitmask.
Definition MainGameRenderer.h:233
BOOL isCustom
Whether this is a custom (edit) sequence.
Definition MainGameRenderer.h:305
unsigned int _state
The high-level render state.
Definition MainGameRenderer.h:84
unsigned int lastCombo
The combo count as of the last frame.
Definition MainGameRenderer.h:76
unsigned int endButtonID
The button identifier for the end action.
Definition MainGameRenderer.m:111
unsigned int storeMoveButtonID
The button identifier for the store-move action.
Definition MainGameRenderer.m:141
BOOL partnerFinished
Whether the session partner has finished.
Definition MainGameRenderer.h:239
float shutterOpen
The shutter-open animation progress.
Definition MainGameRenderer.h:75
int btnPress
The currently pressed button bitmask.
Definition MainGameRenderer.h:227
unsigned int goodJobButtonID
The button identifier for the good-job action.
Definition MainGameRenderer.m:121
int upperBgHeight40
The default upper-background height used by the 480-point-tall phone layout.
Definition MainGameRenderer.m:99
int markerState[kMainGameGridPanelCount]
Per-panel marker animation state.
Definition MainGameRenderer.h:81
unsigned int scoreDisplay
The score currently shown, tweened up.
Definition MainGameRenderer.h:79
HoldMarkerRender * holdMarkerRender
The hold-marker sub-renderer.
Definition MainGameRenderer.h:83
unsigned int state
The high-level render state.
Definition MainGameRenderer.h:197
BOOL isTextureChange
Whether a texture change is pending.
Definition MainGameRenderer.h:317
BOOL isSession
Whether this is a session (versus) play.
Definition MainGameRenderer.h:293
unsigned int scoreRecord
The previous best score record for this tune.
Definition MainGameRenderer.h:221
unsigned int partnerScore
The partner's current score.
Definition MainGameRenderer.h:245
Sequence * sequence
The note sequence being played.
Definition MainGameRenderer.h:263
unsigned int twitterSendButtonID
The button identifier for the tweet-send action.
Definition MainGameRenderer.m:131
unsigned int partnerScoreDisplay
The partner's shown score, tweened up.
Definition MainGameRenderer.h:80
BOOL scoreBackup
Whether the score has been backed up for replay.
Definition MainGameRenderer.h:335
int ghostPress
The ghost-play button bitmask.
Definition MainGameRenderer.h:275
int buttonMarginForScreen40
The default button margin used by the 480-point-tall phone layout.
Definition MainGameRenderer.m:94
CGPoint goodJobPosition
The position of the good-job overlay.
Definition MainGameRenderer.m:126
The marker, sound, and display settings the gameplay renderer draws a play session with.
Definition RendererConf.h:23
The core gameplay judgement engine for a single play session.
Definition Sequence.h:102
One panel's hold-marker tracking state.
Definition MainGameRenderer.h:35
unsigned int move
Whether and how the hold is moving.
Definition MainGameRenderer.h:37
int state
The hold's lifecycle state.
Definition MainGameRenderer.h:36
unsigned int endSector
The sector the hold terminates in.
Definition MainGameRenderer.h:39
unsigned int currentSector
The sector the hold currently occupies.
Definition MainGameRenderer.h:38
A play session's cumulative score summary.
Definition MainGameRenderer.h:50
int curCombo
The combo running at the play position.
Definition MainGameRenderer.h:56
int maxCombo
The longest combo reached.
Definition MainGameRenderer.h:57
int nGood
The number of notes judged good.
Definition MainGameRenderer.h:53
int nMiss
The number of missed notes.
Definition MainGameRenderer.h:51
int nPerfect
The number of notes judged perfect.
Definition MainGameRenderer.h:55
int tension
The tension gauge level, clamped to its maximum.
Definition MainGameRenderer.h:58
char musicBarResult[30]
The result-screen music bar's per-bar grades.
Definition MainGameRenderer.h:62
int nPoor
The number of notes judged poor.
Definition MainGameRenderer.h:52
int nGreat
The number of notes judged great.
Definition MainGameRenderer.h:54
int point
The base score from notes, nine tenths of the raw.
Definition MainGameRenderer.h:59
int totalPoint
point plus bonusPoint ; the final score.
Definition MainGameRenderer.h:61
int bonusPoint
The bonus scaled from tension .
Definition MainGameRenderer.h:60