JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MainGameRendererPadKnt.h
Go to the documentation of this file.
1
21
22#import <CoreGraphics/CoreGraphics.h>
23#import <Foundation/Foundation.h>
24#import <UIKit/UIKit.h>
25
26#import "MainGameRenderer.h"
27
28@class AVAudioPlayer;
29@class EffectBgKnit;
30@class RendererConf;
31@class Texture2D;
32@class UpperBGKnit;
33
34NS_ASSUME_NONNULL_BEGIN
35
40@protected
41 unsigned int frame;
42 unsigned int subStateChangeFrame;
43 unsigned int startMarkFrame;
46 unsigned int effFrame;
47 unsigned int effSlot;
48 int markerDir[kMainGameGridPanelCount];
49 CGRect musicBarRect;
50}
51
52#pragma mark - Lifecycle
53
60- (instancetype)init;
61
66- (void)dealloc;
67
68#pragma mark - Textures
69
79- (void)loadTexure:(nullable RendererConf *)conf
80 artwork:(nullable UIImage *)artwork
81 index:(nullable UIImage *)index;
82
89- (void)loadResultTex:(short)rank;
90
95- (void)releaseTexture;
96
97#pragma mark - State
98
105- (void)setState:(unsigned int)state;
106
107#pragma mark - Play lifecycle
108
113- (void)startPlay;
114
119- (void)endResult;
120
126- (void)replaySelect;
127
132- (void)replayEnd;
133
139- (double)durationOfReadyGo;
140
141#pragma mark - Layout
142
148- (double)buttonAreaOffset;
149
155- (double)gameAreaOffset;
156
157#pragma mark - Buttons
158
163@property(nonatomic, readonly) unsigned int endButtonID;
164
169@property(nonatomic, readonly) unsigned int evaluateButtonID;
170
175@property(nonatomic, readonly) unsigned int goodJobButtonID;
176
181@property(nonatomic, readonly) CGPoint goodJobPosition;
182
187@property(nonatomic, readonly) unsigned int twitterSendButtonID;
188
193@property(nonatomic, readonly) CGPoint twitterBtnPosition;
194
199@property(nonatomic, readonly) unsigned int storeMoveButtonID;
200
205@property(nonatomic, readonly) CGPoint storeMoveBtnPosition;
206
207#pragma mark - Drawing
208
213- (void)draw;
214
222- (void)drawDebugText:(nullable const char *)text pos:(CGPoint)pos alpha:(float)alpha;
223
229- (CGRect)getMusicBarRect;
230
241- (void)drawClip:(int)clip
242 drawPosition:(CGPoint)drawPosition
243 drawArea:(CGRect)drawArea
244 alpha:(float)alpha;
245
252- (void)renderStartMark:(float)alpha;
253
258- (void)renderMarker;
259
265- (void)renderBG;
266
272- (void)renderShutter:(BOOL)animate;
273
280- (void)renderCombo:(unsigned int)combo alpha:(float)alpha;
281
289- (void)renderUpdatedScore:(unsigned int)score atPoint:(CGPoint)point alpha:(double)alpha;
290
298- (void)renderScore:(unsigned int)score atPoint:(CGPoint)point alpha:(double)alpha;
299
308- (void)renderPartnerScore:(unsigned int)score
309 atPoint:(CGPoint)point
310 scale:(double)scale
311 alpha:(double)alpha;
312
320- (void)renderMusicBar:(CGPoint)pos timeline:(BOOL)timeline alpha:(double)alpha;
321
330- (void)renderTuneInfo:(CGPoint)pos artworkSize:(double)artworkSize alpha:(double)alpha;
331
338- (void)renderUpperBG:(BOOL)isResult;
339
345- (void)renderUpper;
346
351- (void)renderButtons;
352
358- (void)renderPreStart;
359
364- (void)renderReadyGo;
365
372- (void)renderFullcombo:(int)animFrame isResult:(BOOL)isResult;
373
378- (void)renderFinish;
379
386- (BOOL)renderExcellent:(unsigned int)animFrame;
387
393- (void)renderRating:(unsigned int)animFrame;
394
401- (BOOL)renderCleared:(unsigned int)animFrame;
402
409- (BOOL)renderFailed:(unsigned int)animFrame;
410
416- (void)renderResult;
417
418#pragma mark - Textures
419
424@property(nonatomic, strong, nullable) Texture2D *texReady0;
425
430@property(nonatomic, strong, nullable) Texture2D *texReady1;
431
436@property(nonatomic, strong, nullable) Texture2D *texFront;
437
442@property(nonatomic, strong, nullable) Texture2D *texMarker;
443
448@property(nonatomic, strong, nullable) Texture2D *texHoldMarker;
449
454@property(nonatomic, strong, nullable) Texture2D *texCombo;
455
460@property(nonatomic, strong, nullable) Texture2D *texResult;
461
466@property(nonatomic, strong, nullable) Texture2D *texResultBg;
467
472@property(nonatomic, strong, nullable) Texture2D *texBeatBg;
473
478@property(nonatomic, strong, nullable) Texture2D *texDebugFont;
479
484@property(nonatomic, strong, nullable) AVAudioPlayer *sePlayerGo;
485
490@property(nonatomic, strong, nullable) NSMutableArray<Texture2D *> *texWaveAr;
491
496@property(nonatomic, strong, nullable) UpperBGKnit *upperBgKnt;
497
502@property(nonatomic, strong, nullable) EffectBgKnit *effectBgKnt;
503
508@property(nonatomic, strong, nullable) NSMutableArray<EffectBgKnit *> *arrayBgEff;
509
510@end
511
512NS_ASSUME_NONNULL_END
513
514// code: language=Objective-C
515// kate: hl Objective-C;
516// vim: set ft=objc :
The base gameplay renderer and driver for a single play session.
A single animated decoration on the knit background.
Definition EffectBgKnit.h:25
The knit-theme pad in-game renderer.
Definition MainGameRendererPadKnt.h:39
Texture2D * texCombo
The combo-number atlas texture.
Definition MainGameRendererPadKnt.h:454
NSMutableArray< EffectBgKnit * > * arrayBgEff
The live knit background effect sprites.
Definition MainGameRendererPadKnt.h:508
unsigned int frame
The frames elapsed in the current render state.
Definition MainGameRendererPadKnt.h:41
float lastHakuPhase
The beat phase as of the previous frame.
Definition MainGameRendererPadKnt.h:44
CGRect musicBarRect
The result-screen music-bar rectangle.
Definition MainGameRendererPadKnt.h:49
UpperBGKnit * upperBgKnt
The knit upper-background wave decoration.
Definition MainGameRendererPadKnt.h:496
Texture2D * texMarker
The marker atlas texture.
Definition MainGameRendererPadKnt.h:442
unsigned int subStateChangeFrame
The frame the interactive sub-state last changed on.
Definition MainGameRendererPadKnt.h:42
Texture2D * texResultBg
The result-screen background atlas texture.
Definition MainGameRendererPadKnt.h:466
unsigned int effFrame
The knit-effect scheduling frame counter.
Definition MainGameRendererPadKnt.h:46
unsigned int effSlot
The next knit-effect table slot to spawn.
Definition MainGameRendererPadKnt.h:47
Texture2D * texHoldMarker
The hold-marker atlas texture.
Definition MainGameRendererPadKnt.h:448
Texture2D * texResult
The result-screen atlas texture.
Definition MainGameRendererPadKnt.h:460
Texture2D * texReady1
The second ready/go atlas texture.
Definition MainGameRendererPadKnt.h:430
Texture2D * texReady0
The first ready/go atlas texture.
Definition MainGameRendererPadKnt.h:424
unsigned int startMarkFrame
The start-mark animation frame counter.
Definition MainGameRendererPadKnt.h:43
NSMutableArray< Texture2D * > * texWaveAr
The six knit wave-layer atlas textures.
Definition MainGameRendererPadKnt.h:490
Texture2D * texFront
The front atlas texture: the field, buttons, and lines.
Definition MainGameRendererPadKnt.h:436
int markerDir[kMainGameGridPanelCount]
The random-mode marker direction per panel.
Definition MainGameRendererPadKnt.h:48
float bounceEnergy
The accumulated knit-bounce energy.
Definition MainGameRendererPadKnt.h:45
Texture2D * texDebugFont
The debug-font glyph sheet.
Definition MainGameRendererPadKnt.h:478
Texture2D * texBeatBg
The knit beat-background atlas texture.
Definition MainGameRendererPadKnt.h:472
AVAudioPlayer * sePlayerGo
The pre-loaded "GO" voice player, prepared on entry to the ready-go state.
Definition MainGameRendererPadKnt.h:484
EffectBgKnit * effectBgKnt
A knit background effect sprite.
Definition MainGameRendererPadKnt.h:502
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
A four-line knit wave drawn across the upper background.
Definition UpperBGKnit.h:26