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

The phone-idiom concrete in-game renderer. More...

#include <MainGameRendererPhone.h>

Inheritance diagram for MainGameRendererPhone:
Collaboration diagram for MainGameRendererPhone:

Instance Methods

(instancetype) - init
 Initialises the renderer, caching the phone-retina and four-inch-aspect device flags.
(void) - loadTexure:artwork:index:
 Loads every play-session texture: the debug font, the ready atlas, the front atlas (with the difficulty, music-bar, and level words, the note markers unzipped from the marker archive, the jacket artwork, the index image, and an optional partner-name label), the hold-marker atlas (and its HoldMarkerRender ), and the combo atlas.
(void) - loadRatingTex:
 Rebuilds the result-screen rating atlas for a rank.
(void) - releaseTexture
 Releases the debug-font, front, ready, rating, and three cleared-screen textures.
(void) - setState:
 Sets the high-level render state.
(void) - startPlay
 Clears the ready texture and enters the playing state (3).
(void) - endResult
 Marks the session finished when it is in the result state (5).
(double) - durationOfReadyGo
 The ready-go countdown duration, in seconds.
(void) - renderMarker
 Draws the note markers over the sixteen-panel grid, spinning random-direction markers, drawing the lead-in fade, and delegating the hold markers to HoldMarkerRender .
(void) - renderBG
 Draws the play-field background: the tension shutter, the combo burst animation, and the shutter halves that slide with the beat.
(void) - renderCombo:
 Draws the combo number and its burst and cut-in animations.
(void) - renderUpdatedScore:atPoint:alpha:scale:boardY:
 Draws the score digits tweening up towards a target, with a board and per-digit scale.
(void) - renderScore:partnerScore:atPoint:scaleH:alpha:
 Draws the player and partner scores at a point, with a horizontal scale and alpha.
(void) - renderBonus:atPoint:alpha:
 Draws the final-bonus digits at a point.
(void) - renderMusicBar:timeline:alpha:
 Draws the difficulty music bar: the leading difficulty chip, one chip per bar cell, and the optional timeline cursor.
(void) - renderTuneInfo:artworkSize:alpha:
 Draws the tune information block: jacket, title, difficulty word, and level.
(void) - renderUpperBG:
 Draws the upper background band, and on the four-inch phone the tiled filler above and below it.
(void) - renderUpper
 Draws the upper region: the tune information, the live music bar, and the score.
(void) - renderButtons:
 Draws the 4x4 button grid, highlighting pressed panels.
(void) - renderPreStart
 Draws the pre-start intro.
(void) - renderCircle:size:alpha:
 Draws a soft circle of the given size at a point.
(void) - renderReadyGo
 Draws the ready/go countdown, playing the ready and go sounds on their frames.
(void) - renderStartMark
 Draws the start-mark banner.
(void) - renderFinish
 Draws the finish transition.
(BOOL) - renderCleared:centerY:
 Draws the cleared-screen animation for a rank.
(BOOL) - renderFailed:centerY:
 Draws the failed-screen animation for a rank.
(void) - renderResult
 Draws the result screen: the cleared or failed animation, the score, bonus, records, and the action buttons.
(void) - draw
 Draws the whole play frame, dispatching on the state to the render methods and flushing every texture atlas.
(void) - drawDebugText:pos:alpha:
 Draws a run of debug text from the debug-font atlas, advancing per glyph and wrapping on newlines.
(void) - replayEnd
 Notifies the renderer that a replay ended, clearing the replay-playing flag.
(void) - replaySelect
 Reacts to a replay selection: on a downloaded custom tune with music, swaps the front atlas's sprite 8 to the replay chip and fades the good-job overlay out.
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 per-state frame counter, advanced each draw.
unsigned int subStateChangeFrame
 The frame the sub-state last changed on.
Texture2D * texFront
 The front atlas: chips, buttons, tune info, marks.
Texture2D * texMarker
 The note-marker atlas, unzipped from the archive.
Texture2D * texHoldMarker
 The hold-marker atlas.
Texture2D * texCombo
 The combo-number and background atlas.
Texture2D * texReady
 The ready/go countdown atlas.
Texture2D * texRating
 The result-screen rating atlas.
Texture2D * texClear0
 The first cleared-screen atlas.
Texture2D * texClear1
 The second cleared-screen atlas.
Texture2D * texClear2
 The third cleared-screen atlas.
Texture2D * texDebugFont
 The debug-font atlas.
int markerDir [kMainGameGridPanelCount]
 Per-panel marker spin direction.
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 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 .
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-idiom concrete in-game renderer.

Method Documentation

◆ draw

- (void) draw

Draws the whole play frame, dispatching on the state to the render methods and flushing every texture atlas.

Ghidra address:
0x110fdc

Reimplemented from MainGameRenderer.

◆ drawDebugText:pos:alpha:

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

Draws a run of debug text from the debug-font atlas, advancing per glyph and wrapping on newlines.

Parameters
textThe C string to draw.
posThe starting position.
alphaThe opacity.
Ghidra address:
0x1113f0

Reimplemented from MainGameRenderer.

◆ durationOfReadyGo

- (double) durationOfReadyGo

The ready-go countdown duration, in seconds.

Returns
The countdown duration.
Ghidra address:
0x10e798
Ghidra address:
0x10e798

Reimplemented from MainGameRenderer.

◆ endResult

- (void) endResult

Marks the session finished when it is in the result state (5).

Ghidra address:
0x10bd34

Reimplemented from MainGameRenderer.

◆ init

- (instancetype) init

Initialises the renderer, caching the phone-retina and four-inch-aspect device flags.

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

Reimplemented from MainGameRenderer.

◆ loadRatingTex:

- (void) loadRatingTex: (short) rank

Rebuilds the result-screen rating atlas for a rank.

Parameters
rankThe tune's rank, selecting the rating resource.
Ghidra address:
0x10b680
Ghidra address:
0x10b680

◆ loadTexure:artwork:index:

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

Loads every play-session texture: the debug font, the ready atlas, the front atlas (with the difficulty, music-bar, and level words, the note markers unzipped from the marker archive, the jacket artwork, the index image, and an optional partner-name label), the hold-marker atlas (and its HoldMarkerRender ), and the combo atlas.

The selector spelling loadTexure: is the binary's own.

Parameters
confThe renderer configuration.
artworkThe jacket artwork image.
indexAn additional index image composited into the front atlas.
Ghidra address:
0x10a490

Reimplemented from MainGameRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases the debug-font, front, ready, rating, and three cleared-screen textures.

It does not release the marker, hold-marker, or combo textures, matching the binary.

Ghidra address:
0x10b8e8
Ghidra address:
0x10b8e8

Reimplemented from MainGameRenderer.

◆ renderBG

- (void) renderBG

Draws the play-field background: the tension shutter, the combo burst animation, and the shutter halves that slide with the beat.

Ghidra address:
0x10c17c

◆ renderBonus:atPoint:alpha:

- (void) renderBonus: (unsigned int) bonus
atPoint: (CGPoint) point
alpha: (double) alpha 

Draws the final-bonus digits at a point.

Parameters
bonusThe bonus value.
pointThe digits' origin.
alphaThe opacity.
Ghidra address:
0x10d418
Ghidra address:
0x10d418

◆ renderButtons:

- (void) renderButtons: (double) offset

Draws the 4x4 button grid, highlighting pressed panels.

Parameters
offsetThe grid's vertical offset, in points.
Ghidra address:
0x10de28
Ghidra address:
0x10de28

◆ renderCircle:size:alpha:

- (void) renderCircle: (CGPoint) center
size: (double) size
alpha: (double) alpha 

Draws a soft circle of the given size at a point.

Parameters
centerThe circle's centre.
sizeThe circle's diameter, in points.
alphaThe opacity.
Ghidra address:
0x10e69c
Ghidra address:
0x10e69c

◆ renderCleared:centerY:

- (BOOL) renderCleared: (unsigned int) rank
centerY: (double) centerY 

Draws the cleared-screen animation for a rank.

Parameters
rankThe tune's rank.
centerYThe animation's vertical centre.
Returns
Whether the animation is still running.
Ghidra address:
0x10f4e4
Ghidra address:
0x10f4e4

◆ renderCombo:

- (void) renderCombo: (unsigned int) combo

Draws the combo number and its burst and cut-in animations.

Parameters
comboThe current combo count.
Ghidra address:
0x10c78c
Ghidra address:
0x10c78c

◆ renderFailed:centerY:

- (BOOL) renderFailed: (unsigned int) rank
centerY: (double) centerY 

Draws the failed-screen animation for a rank.

Parameters
rankThe tune's rank.
centerYThe animation's vertical centre.
Returns
Whether the animation is still running.
Ghidra address:
0x10f82c
Ghidra address:
0x10f82c

◆ renderFinish

- (void) renderFinish

Draws the finish transition.

Ghidra address:
0x10f13c

◆ renderMarker

- (void) renderMarker

Draws the note markers over the sixteen-panel grid, spinning random-direction markers, drawing the lead-in fade, and delegating the hold markers to HoldMarkerRender .

Ghidra address:
0x10bd80

◆ renderMusicBar:timeline:alpha:

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

Draws the difficulty music bar: the leading difficulty chip, one chip per bar cell, and the optional timeline cursor.

Parameters
positionThe bar's origin.
timelineWhether to draw the timeline cursor.
alphaThe opacity.
Ghidra address:
0x10d578
Ghidra address:
0x10d578

◆ renderPreStart

- (void) renderPreStart

Draws the pre-start intro.

Ghidra address:
0x10e340

◆ renderReadyGo

- (void) renderReadyGo

Draws the ready/go countdown, playing the ready and go sounds on their frames.

Ghidra address:
0x10e7a4

◆ renderResult

- (void) renderResult

Draws the result screen: the cleared or failed animation, the score, bonus, records, and the action buttons.

Ghidra address:
0x10fe00
Ghidra address:
0x110ed4
Ghidra address:
0x110f28
Ghidra address:
0x110f2c
Ghidra address:
0x110f80
Ghidra address:
0x110f84
Ghidra address:
0x110fd8

◆ renderScore:partnerScore:atPoint:scaleH:alpha:

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

Draws the player and partner scores at a point, with a horizontal scale and alpha.

Parameters
scoreThe player's score.
partnerScoreThe partner's score.
pointThe score block's origin.
scaleHThe horizontal scale.
alphaThe opacity.
Ghidra address:
0x10cd38
Ghidra address:
0x10cd38

◆ renderStartMark

- (void) renderStartMark

Draws the start-mark banner.

Ghidra address:
0x10efd4

◆ renderTuneInfo:artworkSize:alpha:

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

Draws the tune information block: jacket, title, difficulty word, and level.

Parameters
positionThe block's origin.
artworkSizeThe jacket's square size.
alphaThe opacity.
Ghidra address:
0x10d8e8
Ghidra address:
0x10d8e8

◆ renderUpdatedScore:atPoint:alpha:scale:boardY:

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

Draws the score digits tweening up towards a target, with a board and per-digit scale.

Parameters
scoreThe target score.
pointThe digits' origin.
alphaUnused. The binary clobbers d2 with the first -spriteAtIndex: return and never reads this argument; it is kept so the selector matches the binary.
scaleThe per-digit scale.
boardYThe score board's vertical position.
Ghidra address:
0x10cb34
Ghidra address:
0x10cb34

◆ renderUpper

- (void) renderUpper

Draws the upper region: the tune information, the live music bar, and the score.

Ghidra address:
0x10dbf8

◆ renderUpperBG:

- (void) renderUpperBG: (double) y

Draws the upper background band, and on the four-inch phone the tiled filler above and below it.

Parameters
yThe band's bottom edge, in points.
Ghidra address:
0x10da6c
Ghidra address:
0x10da6c

◆ replayEnd

- (void) replayEnd

Notifies the renderer that a replay ended, clearing the replay-playing flag.

Ghidra address:
0x111568

Reimplemented from MainGameRenderer.

◆ replaySelect

- (void) replaySelect

Reacts to a replay selection: on a downloaded custom tune with music, swaps the front atlas's sprite 8 to the replay chip and fades the good-job overlay out.

Ghidra address:
0x111578
Ghidra address:
0x111724
Ghidra address:
0x111770

Reimplemented from MainGameRenderer.

◆ setState:

- (void) setState: (unsigned int) state

Sets the high-level render state.

Entering the result state (5) loads the rating and cleared-screen textures and starts the result BGM; the reset states (0 and 2) clear the per-frame combo and shutter counters. Every path resets the frame counter and chains up.

Parameters
stateThe state to enter.
Ghidra address:
0x10b98c
Ghidra address:
0x10b98c

◆ startPlay

- (void) startPlay

Clears the ready texture and enters the playing state (3).

Ghidra address:
0x10bcf4

Reimplemented from MainGameRenderer.

Property Documentation

◆ buttonAreaOffset

- (double) buttonAreaOffset
readnonatomicassign

The vertical offset of the button area, in points.

Non-zero only during the result state's opening slide.

Ghidra address:
0x10fb28
Ghidra address:
0x10fb28

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Returns 11 for the phone.

Ghidra address:
0x10fbd4
Ghidra address:
0x10fbd4

◆ evaluateButtonID

- (unsigned int) evaluateButtonID
readnonatomicassign

The button identifier for the evaluate action.

Returns 10 for the phone.

Ghidra address:
0x10fbdc
Ghidra address:
0x10fbdc

◆ gameAreaOffset

- (double) gameAreaOffset
readnonatomicassign

The vertical offset of the game area, in points.

Pushed down on the four-inch phone.

Ghidra address:
0x10fb94
Ghidra address:
0x10fb94

◆ goodJobButtonID

- (unsigned int) goodJobButtonID
readnonatomicassign

The button identifier for the good-job action.

Returns 9 for the phone.

Ghidra address:
0x10fbe4
Ghidra address:
0x10fbe4

◆ goodJobPosition

- (CGPoint) goodJobPosition
readnonatomicassign

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

Ghidra address:
0x10fbec

◆ storeMoveBtnPosition

- (CGPoint) storeMoveBtnPosition
readnonatomicassign

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

Ghidra address:
0x10fd54

◆ storeMoveButtonID

- (unsigned int) storeMoveButtonID
readnonatomicassign

The button identifier for the store-move action.

Returns 10 for the phone.

Ghidra address:
0x10fd4c
Ghidra address:
0x10fd4c

◆ twitterBtnPosition

- (CGPoint) twitterBtnPosition
readnonatomicassign

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

Ghidra address:
0x10fca0

◆ twitterSendButtonID

- (unsigned int) twitterSendButtonID
readnonatomicassign

The button identifier for the tweet-send action.

Returns 10 for the phone.

Ghidra address:
0x10fc98
Ghidra address:
0x10fc98

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