JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MainGameRendererPhoneRpl.h
Go to the documentation of this file.
1
28
29#import <CoreGraphics/CoreGraphics.h>
30#import <Foundation/Foundation.h>
31#import <UIKit/UIKit.h>
32
33#import "MainGameRenderer.h"
34
35@class AVAudioPlayer;
36@class RendererConf;
37@class Texture2D;
38
39NS_ASSUME_NONNULL_BEGIN
40
45@protected
46 BOOL isRetina;
47 BOOL is4Inch;
48 unsigned int frame;
49 unsigned int subStateChangeFrame;
50 unsigned int startMarkFrame;
53 int markerDir[kMainGameGridPanelCount];
54}
55
56#pragma mark - Lifecycle
57
64- (instancetype)init;
65
70- (void)dealloc;
71
72#pragma mark - Textures
73
85- (void)loadTexure:(nullable RendererConf *)conf
86 artwork:(nullable UIImage *)artwork
87 index:(nullable UIImage *)index;
88
94- (void)loadResultTex:(short)rank;
95
100- (void)releaseTexture;
101
102#pragma mark - State
103
110- (void)setState:(unsigned int)state;
111
112#pragma mark - Play lifecycle
113
118- (void)startPlay;
119
124- (void)endResult;
125
131- (void)replaySelect;
132
137- (void)replayEnd;
138
144- (double)durationOfReadyGo;
145
146#pragma mark - Layout
147
153@property(nonatomic, readonly) double buttonAreaOffset;
154
159@property(nonatomic, readonly) double gameAreaOffset;
160
161#pragma mark - Buttons
162
167@property(nonatomic, readonly) unsigned int endButtonID;
168
173@property(nonatomic, readonly) unsigned int evaluateButtonID;
174
179@property(nonatomic, readonly) unsigned int goodJobButtonID;
180
185@property(nonatomic, readonly) CGPoint goodJobPosition;
186
191@property(nonatomic, readonly) unsigned int twitterSendButtonID;
192
197@property(nonatomic, readonly) CGPoint twitterBtnPosition;
198
203@property(nonatomic, readonly) unsigned int storeMoveButtonID;
204
209@property(nonatomic, readonly) CGPoint storeMoveBtnPosition;
210
211#pragma mark - Drawing
212
218- (void)renderStartMark:(float)alpha;
219
225- (void)renderMarker;
226
232- (void)renderBG;
233
240- (void)renderShutter:(BOOL)drive;
241
248- (void)renderCombo:(unsigned int)combo alpha:(float)alpha;
249
257- (void)renderUpdatedScore:(unsigned int)score atPoint:(CGPoint)point alpha:(double)alpha;
258
266- (void)renderScore:(unsigned int)score atPoint:(CGPoint)point alpha:(double)alpha;
267
276- (void)renderPartnerScore:(unsigned int)score
277 atPoint:(CGPoint)point
278 scale:(double)scale
279 alpha:(double)alpha;
280
288- (void)renderMusicBar:(CGPoint)pos timeline:(BOOL)timeline alpha:(double)alpha;
289
298- (void)renderTuneInfo:(CGPoint)pos artworkSize:(double)artworkSize alpha:(double)alpha;
299
306- (void)renderUpperBG:(BOOL)wipe;
307
313- (void)renderUpper;
314
320- (void)renderButtons;
321
327- (void)renderPreStart;
328
333- (void)renderReadyGo;
334
340- (void)renderFullcombo:(int)animFrame;
341
347- (void)renderFinish;
348
355- (BOOL)renderExcellent:(unsigned int)animFrame;
356
362- (void)renderRating:(unsigned int)animFrame;
363
370- (BOOL)renderCleared:(unsigned int)animFrame;
371
378- (BOOL)renderFailed:(unsigned int)animFrame;
379
385- (void)renderResult;
386
391- (void)draw;
392
400- (void)drawDebugText:(nullable const char *)text pos:(CGPoint)pos alpha:(float)alpha;
401
402#pragma mark - Textures
403
408@property(nonatomic, strong, nullable) Texture2D *texReady0;
409
414@property(nonatomic, strong, nullable) Texture2D *texReady1;
415
420@property(nonatomic, strong, nullable) Texture2D *texFront;
421
426@property(nonatomic, strong, nullable) Texture2D *texMarker;
427
432@property(nonatomic, strong, nullable) Texture2D *texHoldMarker;
433
438@property(nonatomic, strong, nullable) Texture2D *texCombo;
439
444@property(nonatomic, strong, nullable) Texture2D *texDebugFont;
445
450@property(nonatomic, strong, nullable) AVAudioPlayer *sePlayerGo;
451
456@property(nonatomic, strong, nullable) NSMutableArray *arrayBgRip;
457
462@property(nonatomic, strong, nullable) NSMutableArray *arrayUpperBgRip;
463
464@end
465
466NS_ASSUME_NONNULL_END
467
468// code: language=Objective-C
469// kate: hl Objective-C;
470// vim: set ft=objc :
The base gameplay renderer and driver for a single play session.
The phone Ripples-theme in-game renderer.
Definition MainGameRendererPhoneRpl.h:44
Texture2D * texDebugFont
The debug-font glyph sheet.
Definition MainGameRendererPhoneRpl.h:444
Texture2D * texReady1
The second ready/go atlas texture: the "GO" chips.
Definition MainGameRendererPhoneRpl.h:414
NSMutableArray * arrayUpperBgRip
The upper-background drifting-sprite ripple pool.
Definition MainGameRendererPhoneRpl.h:462
Texture2D * texMarker
The marker atlas texture.
Definition MainGameRendererPhoneRpl.h:426
unsigned int startMarkFrame
The start-mark animation frame counter.
Definition MainGameRendererPhoneRpl.h:50
unsigned int subStateChangeFrame
The frame the sub-state last changed on.
Definition MainGameRendererPhoneRpl.h:49
unsigned int frame
The frames elapsed in the current render state.
Definition MainGameRendererPhoneRpl.h:48
Texture2D * texReady0
The first ready/go atlas texture: the "READY" disc and letters.
Definition MainGameRendererPhoneRpl.h:408
float lastHakuPhase
The beat phase as of the last background update.
Definition MainGameRendererPhoneRpl.h:51
NSMutableArray * arrayBgRip
The background ripple pool.
Definition MainGameRendererPhoneRpl.h:456
BOOL is4Inch
Cached four-inch-aspect flag, sampled once at init.
Definition MainGameRendererPhoneRpl.h:47
AVAudioPlayer * sePlayerGo
The "GO" voice audio player, loaded lazily in the ready-go state.
Definition MainGameRendererPhoneRpl.h:450
Texture2D * texCombo
The combo-number and background atlas texture.
Definition MainGameRendererPhoneRpl.h:438
Texture2D * texHoldMarker
The hold-marker atlas texture.
Definition MainGameRendererPhoneRpl.h:432
BOOL isRetina
Cached phone-retina flag, sampled once at init.
Definition MainGameRendererPhoneRpl.h:46
int markerDir[kMainGameGridPanelCount]
The random-mode marker direction per panel.
Definition MainGameRendererPhoneRpl.h:53
Texture2D * texFront
The front atlas texture: the field, buttons, tune-info, score glyphs, and result graphics.
Definition MainGameRendererPhoneRpl.h:420
float bounceEnergy
The accumulated button-press bounce energy.
Definition MainGameRendererPhoneRpl.h:52
The abstract base renderer for a play session.
Definition MainGameRenderer.h:73
The marker, sound, and display settings the gameplay renderer draws a play session with.
Definition RendererConf.h:23
A texture that can draw any of the sprites packed into it.
Definition Texture2D.h:40