JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MainGameRendererPhoneRpl Class Reference

The phone Ripples-theme in-game renderer. More...

#include <MainGameRendererPhoneRpl.h>

Inheritance diagram for MainGameRendererPhoneRpl:
Collaboration diagram for MainGameRendererPhoneRpl:

Instance Methods

(instancetype) - init
 Initialises the renderer, caching the phone-retina and four-inch-aspect device flags and building the background and upper-background ripple pools.
(void) - dealloc
 Releases the session textures, then chains to the superclass deallocation.
(void) - loadTexure:artwork:index:
 Loads the phone Ripples-theme session atlases: the two ready textures, front, combo, marker, hold-marker, and debug-font textures, blits the difficulty, level, and start/end marks into the front atlas, and builds the hold-marker sub-renderer and the upper-background ripple pool.
(void) - loadResultTex:
 Loads the rating (rank judgement) graphic for a rank tier into the front atlas.
(void) - releaseTexture
 Releases the front, ready, and debug-font session textures.
(void) - setState:
 Sets the render state, resetting per-state counters and, in the ready-go state, loading the "GO" voice player, and in the result state starting the result BGM.
(void) - startPlay
 Begins playback: moves to the play state and clears the "GO" voice player.
(void) - endResult
 Ends the result screen: in the result state sets the finished sub-state.
(void) - replaySelect
 Selects a replay: for a downloaded custom tune with music, arms the replay and fades the good-job overlay out.
(void) - replayEnd
 Ends a replay, clearing the replay-playing flag.
(double) - durationOfReadyGo
 The ready-go countdown duration, in seconds.
(void) - renderStartMark:
 Draws the start-mark intro animation over the first-marker panels.
(void) - renderMarker
 Draws the 4x4 marker grid, the marker hit frames, and the hold markers, then the start mark once the first marker approaches.
(void) - renderBG
 Draws the rippling background: the base plate, the drifting background ripples, and (in a beat frame) a spawn of a new ripple driven by the tension tier.
(void) - renderShutter:
 Draws the two scrolling shutter bars and their caps, optionally driving the shutter-open amount from the tension and beat.
(void) - renderCombo:alpha:
 Draws the combo counter and its cut-in burst.
(void) - renderUpdatedScore:atPoint:alpha:
 Draws the score digits animating up from a previous value into a growing record banner.
(void) - renderScore:atPoint:alpha:
 Draws the running score, its label, and the six-figure rollup.
(void) - renderPartnerScore:atPoint:scale:alpha:
 Draws the partner's score, at 0.7 scale, half-alpha when disconnected.
(void) - renderMusicBar:timeline:alpha:
 Draws the music bar and its per-note markers.
(void) - renderTuneInfo:artworkSize:alpha:
 Draws the tune-info panel: the jacket artwork, the tune name, the difficulty word, and the level word.
(void) - renderUpperBG:
 Draws the upper background: the tiled upper plate, and (when told to) the beam wipe, and steps and renders the upper-background ripple pool.
(void) - renderUpper
 Draws the upper region: the tune-info panel, the music bar, the score, and the partner score.
(void) - renderButtons
 Draws the 4x4 on-screen button grid, lighting pressed buttons, with the four-inch phone's letterbox filler bands.
(void) - renderPreStart
 Draws the pre-start intro: the field, shutter, upper region, and buttons cued in over frames.
(void) - renderReadyGo
 Draws the ready/go countdown.
(void) - renderFullcombo:
 Draws the full-combo flourish over the grid corners and the corner glyphs.
(void) - renderFinish
 Draws the finish banner: the full-combo flourish when a full combo, and advances the finish sub-state (loading the result graphics in the background).
(BOOL) - renderExcellent:
 Draws the excellent flourish, its beam, its ring of chips, and the "EXCELLENT" wipe.
(void) - renderRating:
 Draws the rank rating (judgement) graphic, sliding and scaling in.
(BOOL) - renderCleared:
 Draws the cleared result graphic and its rating.
(BOOL) - renderFailed:
 Draws the failed result graphic and its rating.
(void) - renderResult
 Draws the result screen: the cleared/failed/excellent graphic, the score, the rating, the new-record banner, and the action marks.
(void) - draw
 Draws one frame, dispatching on the render state and flushing every atlas.
(void) - drawDebugText:pos:alpha:
 Draws debug text glyph-by-glyph from the debug-font sheet.
Instance Methods inherited from MainGameRenderer
(double) - buttonAreaOffset
 The vertical offset of the button area, in points.
(double) - gameAreaOffset
 The vertical offset of the game area, in points.
(CGRect) - getMusicBarRect
 The rectangle of the result-screen music bar.
(void) - backupScoreData
 Snapshots the sequence's current score into replayBackupScore for replay, and marks the score backed up.

Protected Attributes

BOOL isRetina
 Cached phone-retina flag, sampled once at init.
BOOL is4Inch
 Cached four-inch-aspect flag, sampled once at init.
unsigned int frame
 The frames elapsed in the current render state.
unsigned int subStateChangeFrame
 The frame the sub-state last changed on.
unsigned int startMarkFrame
 The start-mark animation frame counter.
float lastHakuPhase
 The beat phase as of the last background update.
float bounceEnergy
 The accumulated button-press bounce energy.
int markerDir [kMainGameGridPanelCount]
 The random-mode marker direction per panel.
Protected Attributes inherited from MainGameRenderer
float shutterOpen
 The shutter-open animation progress.
unsigned int lastCombo
 The combo count as of the last frame.
unsigned int comboEffectFrame
 The combo burst animation frame.
unsigned int comboCutFrame
 The combo cut-in animation frame.
unsigned int scoreDisplay
 The score currently shown, tweened up.
unsigned int partnerScoreDisplay
 The partner's shown score, tweened up.
int markerState [kMainGameGridPanelCount]
 Per-panel marker animation state.
MainGameHoldState holdState [kMainGameGridPanelCount]
 Per-panel hold-marker state.
HoldMarkerRender * holdMarkerRender
 The hold-marker sub-renderer.
unsigned int _state
 The high-level render state.

Properties

double buttonAreaOffset
 The vertical offset of the button area, in points.
double gameAreaOffset
 The vertical offset of the game area, in points.
unsigned int endButtonID
 The button identifier for the end action.
unsigned int evaluateButtonID
 The button identifier for the evaluate action.
unsigned int goodJobButtonID
 The button identifier for the good-job action.
CGPoint goodJobPosition
 The centre position of the good-job overlay, derived from goodJobButtonID .
unsigned int twitterSendButtonID
 The button identifier for the tweet-send action.
CGPoint twitterBtnPosition
 The position of the tweet-send button, derived from twitterSendButtonID .
unsigned int storeMoveButtonID
 The button identifier for the store-move action.
CGPoint storeMoveBtnPosition
 The position of the store-move button, derived from storeMoveButtonID .
Texture2D * texReady0
 The first ready/go atlas texture: the "READY" disc and letters.
Texture2D * texReady1
 The second ready/go atlas texture: the "GO" chips.
Texture2D * texFront
 The front atlas texture: the field, buttons, tune-info, score glyphs, and result graphics.
Texture2D * texMarker
 The marker atlas texture.
Texture2D * texHoldMarker
 The hold-marker atlas texture.
Texture2D * texCombo
 The combo-number and background atlas texture.
Texture2D * texDebugFont
 The debug-font glyph sheet.
AVAudioPlayer * sePlayerGo
 The "GO" voice audio player, loaded lazily in the ready-go state.
NSMutableArray * arrayBgRip
 The background ripple pool.
NSMutableArray * arrayUpperBgRip
 The upper-background drifting-sprite ripple pool.
Properties inherited from MainGameRenderer
RendererConf * rendererConf
 The renderer configuration for the current session.
unsigned int state
 The high-level render state.
unsigned int subState
 The render sub-state within the current state .
BOOL showCombo
 Whether the combo counter is shown.
BOOL isNewRecord
 Whether the session set a new record.
unsigned int scoreRecord
 The previous best score record for this tune.
int btnPress
 The currently pressed button bitmask.
int btnDown
 The currently held-down button bitmask.
BOOL partnerFinished
 Whether the session partner has finished.
unsigned int partnerScore
 The partner's current score.
unsigned int partnerFinalBonus
 The partner's final bonus.
BOOL partnerFullcombo
 Whether the partner achieved a full combo.
Sequence * sequence
 The note sequence being played.
EAGLView * eaglView
 The GL view this renderer draws into.
int ghostPress
 The ghost-play button bitmask.
UIImageView * goodJobImage
 The good-job overlay image view.
float goodJobAlphaMax
 The peak opacity of the good-job overlay.
BOOL isSession
 Whether this is a session (versus) play.
BOOL isConnected
 Whether the session partner is connected.
BOOL isCustom
 Whether this is a custom (edit) sequence.
BOOL isDownload
 Whether the tune was downloaded.
BOOL isTextureChange
 Whether a texture change is pending.
BOOL hasMusic
 Whether the session has music.
BOOL replayPlaying
 Whether a replay is playing.
BOOL scoreBackup
 Whether the score has been backed up for replay.
BOOL isEndState
 Whether the session has reached its end sub-state.
unsigned int endButtonID
 The button identifier for the end action.
unsigned int evaluateButtonID
 The button identifier for the evaluate action.
unsigned int goodJobButtonID
 The button identifier for the good-job action.
CGPoint goodJobPosition
 The position of the good-job overlay.
int buttonMarginForScreen40
 The default button margin used by the 480-point-tall phone layout.
int upperBgHeight40
 The default upper-background height used by the 480-point-tall phone layout.
unsigned int twitterSendButtonID
 The button identifier for the tweet-send action.
CGPoint twitterBtnPosition
 The position of the tweet-send button.
unsigned int storeMoveButtonID
 The button identifier for the store-move action.
CGPoint storeMoveBtnPosition
 The position of the store-move button.
ScoreData replayBackupScore
 The score snapshot captured for replay by -backupScoreData .

Detailed Description

The phone Ripples-theme in-game renderer.

Method Documentation

◆ dealloc

- (void) dealloc

Releases the session textures, then chains to the superclass deallocation.

Ghidra address:
0x151f94

◆ draw

- (void) draw

Draws one frame, dispatching on the render state and flushing every atlas.

Ghidra address:
0x151a58

Reimplemented from MainGameRenderer.

◆ drawDebugText:pos:alpha:

- (void) drawDebugText: (nullable const char *) text
pos: (CGPoint) pos
alpha: (float) alpha 

Draws debug text glyph-by-glyph from the debug-font sheet.

Parameters
textThe C string to draw.
posThe top-left position to draw it at.
alphaThe opacity.
Ghidra address:
0x151e2c

Reimplemented from MainGameRenderer.

◆ durationOfReadyGo

- (double) durationOfReadyGo

The ready-go countdown duration, in seconds.

Returns
The countdown duration, in seconds.
Ghidra address:
0x14d70c
Ghidra address:
0x14d70c
Ghidra address:
0x292a08

Reimplemented from MainGameRenderer.

◆ endResult

- (void) endResult

Ends the result screen: in the result state sets the finished sub-state.

Ghidra address:
0x149a64

Reimplemented from MainGameRenderer.

◆ init

- (instancetype) init

Initialises the renderer, caching the phone-retina and four-inch-aspect device flags and building the background and upper-background ripple pools.

Returns
The initialised renderer, or nil.
Ghidra address:
0x147758
Ghidra address:
0x147758

Reimplemented from MainGameRenderer.

◆ loadResultTex:

- (void) loadResultTex: (short) rank

Loads the rating (rank judgement) graphic for a rank tier into the front atlas.

Parameters
rankThe score rank tier, 0..7; ranks below 8 select a per-rank judgement resource.
Ghidra address:
0x149464
Ghidra address:
0x149464

◆ loadTexure:artwork:index:

- (void) loadTexure: (nullable RendererConf *) conf
artwork: (nullable UIImage *) artwork
index: (nullable UIImage *) index 

Loads the phone Ripples-theme session atlases: the two ready textures, front, combo, marker, hold-marker, and debug-font textures, blits the difficulty, level, and start/end marks into the front atlas, and builds the hold-marker sub-renderer and the upper-background ripple pool.

The selector spelling loadTexure: (a missing "t") is the binary's own.

Parameters
confThe renderer configuration describing the tune, difficulty, and marker.
artworkThe jacket artwork image.
indexAn additional texture image the renderer composites in.
Ghidra address:
0x1478a4

Reimplemented from MainGameRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases the front, ready, and debug-font session textures.

Ghidra address:
0x1496a0

Reimplemented from MainGameRenderer.

◆ renderBG

- (void) renderBG

Draws the rippling background: the base plate, the drifting background ripples, and (in a beat frame) a spawn of a new ripple driven by the tension tier.

Ghidra address:
0x14a3ac

◆ renderButtons

- (void) renderButtons

Draws the 4x4 on-screen button grid, lighting pressed buttons, with the four-inch phone's letterbox filler bands.

Ghidra address:
0x14d12c

◆ renderCleared:

- (BOOL) renderCleared: (unsigned int) animFrame

Draws the cleared result graphic and its rating.

Parameters
animFrameThe animation frame counter.
Returns
Whether the animation is still running.
Ghidra address:
0x150348
Ghidra address:
0x150348

◆ renderCombo:alpha:

- (void) renderCombo: (unsigned int) combo
alpha: (float) alpha 

Draws the combo counter and its cut-in burst.

Parameters
comboThe current combo count.
alphaThe opacity.
Ghidra address:
0x14affc
Ghidra address:
0x14affc

◆ renderExcellent:

- (BOOL) renderExcellent: (unsigned int) animFrame

Draws the excellent flourish, its beam, its ring of chips, and the "EXCELLENT" wipe.

Parameters
animFrameThe animation frame counter.
Returns
Whether the animation has finished.
Ghidra address:
0x14f0e8
Ghidra address:
0x14f0e8

◆ renderFailed:

- (BOOL) renderFailed: (unsigned int) animFrame

Draws the failed result graphic and its rating.

Parameters
animFrameThe animation frame counter.
Returns
Whether the animation is still running.
Ghidra address:
0x1507cc
Ghidra address:
0x1507cc

◆ renderFinish

- (void) renderFinish

Draws the finish banner: the full-combo flourish when a full combo, and advances the finish sub-state (loading the result graphics in the background).

Ghidra address:
0x14ed9c
Ghidra address:
0x14efa0
Ghidra address:
0x14f088

◆ renderFullcombo:

- (void) renderFullcombo: (int) animFrame

Draws the full-combo flourish over the grid corners and the corner glyphs.

Parameters
animFrameThe animation frame counter.
Ghidra address:
0x14e254
Ghidra address:
0x14e254

◆ renderMarker

- (void) renderMarker

Draws the 4x4 marker grid, the marker hit frames, and the hold markers, then the start mark once the first marker approaches.

Ghidra address:
0x14a008

◆ renderMusicBar:timeline:alpha:

- (void) renderMusicBar: (CGPoint) pos
timeline: (BOOL) timeline
alpha: (double) alpha 

Draws the music bar and its per-note markers.

Parameters
posThe bar's top-left corner.
timelineWhether the play head is drawn.
alphaThe opacity.
Ghidra address:
0x14bf14
Ghidra address:
0x14bf14

◆ renderPartnerScore:atPoint:scale:alpha:

- (void) renderPartnerScore: (unsigned int) score
atPoint: (CGPoint) point
scale: (double) scale
alpha: (double) alpha 

Draws the partner's score, at 0.7 scale, half-alpha when disconnected.

Parameters
scoreThe partner's score.
pointThe top-left anchor.
scaleThe horizontal scale.
alphaThe opacity.
Ghidra address:
0x14bbe8
Ghidra address:
0x14bbe8

◆ renderPreStart

- (void) renderPreStart

Draws the pre-start intro: the field, shutter, upper region, and buttons cued in over frames.

Ghidra address:
0x14d420

◆ renderRating:

- (void) renderRating: (unsigned int) animFrame

Draws the rank rating (judgement) graphic, sliding and scaling in.

Parameters
animFrameThe animation frame counter.
Ghidra address:
0x14feb8
Ghidra address:
0x14feb8

◆ renderReadyGo

- (void) renderReadyGo

Draws the ready/go countdown.

Ghidra address:
0x14d718

◆ renderResult

- (void) renderResult

Draws the result screen: the cleared/failed/excellent graphic, the score, the rating, the new-record banner, and the action marks.

Ghidra address:
0x150d70
Ghidra address:
0x151950
Ghidra address:
0x1519a4
Ghidra address:
0x1519a8
Ghidra address:
0x1519fc
Ghidra address:
0x151a00
Ghidra address:
0x151a54

◆ renderScore:atPoint:alpha:

- (void) renderScore: (unsigned int) score
atPoint: (CGPoint) point
alpha: (double) alpha 

Draws the running score, its label, and the six-figure rollup.

Parameters
scoreThe player's score.
pointThe top-left anchor.
alphaThe opacity.
Ghidra address:
0x14b6a0
Ghidra address:
0x14b6a0

◆ renderShutter:

- (void) renderShutter: (BOOL) drive

Draws the two scrolling shutter bars and their caps, optionally driving the shutter-open amount from the tension and beat.

Parameters
driveWhether to advance the shutter-open amount this frame.
Ghidra address:
0x14aac0
Ghidra address:
0x14aac0
Ghidra address:
0x293110
Ghidra address:
0x293120
Ghidra address:
0x293160
Ghidra address:
0x293198

◆ renderStartMark:

- (void) renderStartMark: (float) alpha

Draws the start-mark intro animation over the first-marker panels.

Parameters
alphaThe overlay opacity multiplier.
Ghidra address:
0x149ab0
Ghidra address:
0x149ab0

◆ renderTuneInfo:artworkSize:alpha:

- (void) renderTuneInfo: (CGPoint) pos
artworkSize: (double) artworkSize
alpha: (double) alpha 

Draws the tune-info panel: the jacket artwork, the tune name, the difficulty word, and the level word.

Parameters
posThe panel's top-left corner.
artworkSizeThe jacket artwork edge length.
alphaThe opacity.
Ghidra address:
0x14c2e0
Ghidra address:
0x14c2e0

◆ renderUpdatedScore:atPoint:alpha:

- (void) renderUpdatedScore: (unsigned int) score
atPoint: (CGPoint) point
alpha: (double) alpha 

Draws the score digits animating up from a previous value into a growing record banner.

Parameters
scoreThe target score.
pointThe top-left anchor.
alphaThe opacity.
Ghidra address:
0x14b4c8
Ghidra address:
0x14b4c8

◆ renderUpper

- (void) renderUpper

Draws the upper region: the tune-info panel, the music bar, the score, and the partner score.

Ghidra address:
0x14ceb0

◆ renderUpperBG:

- (void) renderUpperBG: (BOOL) wipe

Draws the upper background: the tiled upper plate, and (when told to) the beam wipe, and steps and renders the upper-background ripple pool.

Parameters
wipeWhether to draw and animate the upper-band beam wipe.
Ghidra address:
0x14c5d4
Ghidra address:
0x14c5d4

◆ replayEnd

- (void) replayEnd

Ends a replay, clearing the replay-playing flag.

Ghidra address:
0x151fe4

Reimplemented from MainGameRenderer.

◆ replaySelect

- (void) replaySelect

Selects a replay: for a downloaded custom tune with music, arms the replay and fades the good-job overlay out.

Ghidra address:
0x151ff4
Ghidra address:
0x28f260
Ghidra address:
0x152218
Ghidra address:
0x152264

Reimplemented from MainGameRenderer.

◆ setState:

- (void) setState: (unsigned int) state

Sets the render state, resetting per-state counters and, in the ready-go state, loading the "GO" voice player, and in the result state starting the result BGM.

Parameters
stateThe high-level render state.
Ghidra address:
0x149704
Ghidra address:
0x149704

◆ startPlay

- (void) startPlay

Begins playback: moves to the play state and clears the "GO" voice player.

Ghidra address:
0x149a28

Reimplemented from MainGameRenderer.

Property Documentation

◆ arrayBgRip

- (NSMutableArray*) arrayBgRip
readwritenonatomicstrong

The background ripple pool.

Ghidra address:
0x152388 (getter), 0x152398 (setter)

◆ arrayUpperBgRip

- (NSMutableArray*) arrayUpperBgRip
readwritenonatomicstrong

The upper-background drifting-sprite ripple pool.

Ghidra address:
0x1523ac (getter), 0x1523bc (setter)

◆ buttonAreaOffset

- (double) buttonAreaOffset
readnonatomicassign

The vertical offset of the button area, in points.

Returns
The button-area offset, always 0 for this renderer.
Ghidra address:
0x150b20
Ghidra address:
0x150b20

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Ghidra address:
0x150b68

◆ evaluateButtonID

- (unsigned int) evaluateButtonID
readnonatomicassign

The button identifier for the evaluate action.

Ghidra address:
0x150b70

◆ gameAreaOffset

- (double) gameAreaOffset
readnonatomicassign

The vertical offset of the game area, in points.

Pushed down on the four-inch phone.

Ghidra address:
0x150b28
Ghidra address:
0x150b28
Ghidra address:
0x28f438

◆ goodJobButtonID

- (unsigned int) goodJobButtonID
readnonatomicassign

The button identifier for the good-job action.

Ghidra address:
0x150b78

◆ goodJobPosition

- (CGPoint) goodJobPosition
readnonatomicassign

The centre position of the good-job overlay, derived from goodJobButtonID .

Ghidra address:
0x150b80

◆ sePlayerGo

- (AVAudioPlayer*) sePlayerGo
readwritenonatomicstrong

The "GO" voice audio player, loaded lazily in the ready-go state.

Ghidra address:
0x152364 (getter), 0x152374 (setter)

◆ storeMoveBtnPosition

- (CGPoint) storeMoveBtnPosition
readnonatomicassign

The position of the store-move button, derived from storeMoveButtonID .

Ghidra address:
0x150cd0

◆ storeMoveButtonID

- (unsigned int) storeMoveButtonID
readnonatomicassign

The button identifier for the store-move action.

Ghidra address:
0x150cc8

◆ texCombo

- (Texture2D*) texCombo
readwritenonatomicstrong

The combo-number and background atlas texture.

Ghidra address:
0x15231c (getter), 0x15232c (setter)

◆ texDebugFont

- (Texture2D*) texDebugFont
readwritenonatomicstrong

The debug-font glyph sheet.

Ghidra address:
0x152340 (getter), 0x152350 (setter)

◆ texFront

- (Texture2D*) texFront
readwritenonatomicstrong

The front atlas texture: the field, buttons, tune-info, score glyphs, and result graphics.

Ghidra address:
0x1522b0 (getter), 0x1522c0 (setter)

◆ texHoldMarker

- (Texture2D*) texHoldMarker
readwritenonatomicstrong

The hold-marker atlas texture.

Ghidra address:
0x1522f8 (getter), 0x152308 (setter)

◆ texMarker

- (Texture2D*) texMarker
readwritenonatomicstrong

The marker atlas texture.

Ghidra address:
0x1522d4 (getter), 0x1522e4 (setter)

◆ texReady0

- (Texture2D*) texReady0
readwritenonatomicstrong

The first ready/go atlas texture: the "READY" disc and letters.

Ghidra address:
0x152268 (getter), 0x152278 (setter)

◆ texReady1

- (Texture2D*) texReady1
readwritenonatomicstrong

The second ready/go atlas texture: the "GO" chips.

Ghidra address:
0x15228c (getter), 0x15229c (setter)

◆ twitterBtnPosition

- (CGPoint) twitterBtnPosition
readnonatomicassign

The position of the tweet-send button, derived from twitterSendButtonID .

Ghidra address:
0x150c28

◆ twitterSendButtonID

- (unsigned int) twitterSendButtonID
readnonatomicassign

The button identifier for the tweet-send action.

Ghidra address:
0x150c20

The documentation for this class was generated from the following files: