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

The pad in-game renderer. More...

#include <MainGameRendererPad.h>

Inheritance diagram for MainGameRendererPad:
Collaboration diagram for MainGameRendererPad:

Instance Methods

(instancetype) - init
 Initialises the pad renderer, chaining to the superclass.
(void) - dealloc
 Releases the session textures, then chains to the superclass deallocation.
(void) - loadTexure:artwork:index:
 Loads the pad session atlases: background, front, marker, combo, hold-marker, ready, and debug-font textures, and builds the hold-marker sub-renderer.
(void) - loadRatingTex:
 Loads the rating (rank judgement) texture for a rank tier.
(void) - releaseTexture
 Releases every session texture.
(void) - setState:
 Sets the render state, resetting per-state counters and, in the result state, loading the rating and cleared/failed textures and starting the result BGM.
(void) - startPlay
 Begins playback: clears the ready texture and moves to state 3.
(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 in.
(void) - replayEnd
 Ends a replay, clearing the replay-playing flag.
(double) - durationOfReadyGo
 The ready-go countdown duration, in seconds.
(double) - buttonAreaOffset
 The vertical offset of the button area.
(double) - gameAreaOffset
 The vertical offset of the game area, in points.
(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.
(void) - renderBG
 Draws the pulsing background, the combo-burst effect, and the shutter.
(void) - renderMarker
 Draws the 4x4 marker grid, the marker hit frames, and the hold markers.
(void) - renderMarkFrame:alpha:
 Draws one panel's marker hit frame.
(void) - renderCombo:
 Draws the combo counter and its cut-in burst.
(void) - renderUpdatedScore:atPoint:alpha:scale:boardY:
 Draws the score digits animating up from a previous value.
(void) - renderScore:partnerScore:atPoint:scaleH:alpha:
 Draws the running score and the partner's score.
(void) - renderBonus:atPoint:alpha:
 Draws the bonus number.
(void) - renderMusicBar:timeline:alpha:
 Draws the result-screen music bar and its per-note markers.
(void) - renderTuneInfo:artworkSize:alpha:
 Draws the tune-info panel: the jacket artwork and the tune name and artist.
(void) - renderUpperBG:height:
 Draws the upper background band.
(void) - renderUpper
 Draws the upper region: the tune-info panel, the music bar, and the score.
(void) - renderButtons:
 Draws the 4x4 on-screen button grid, lighting pressed buttons.
(void) - renderPreStart
 Draws the pre-start intro: the field, upper region, and buttons cued in over frames.
(void) - renderCircle:size:alpha:
 Draws a ring sprite scaled about a point.
(void) - renderReadyGo
 Draws the ready/go countdown.
(void) - renderStartMark
 Draws the start-mark intro animation.
(void) - renderFinish
 Draws the finish banner animation.
(BOOL) - renderCleared:centerY:
 Draws the cleared result graphic.
(BOOL) - renderFailed:centerY:
 Draws the failed result graphic.
(void) - renderResult
 Draws the result screen: the cleared/failed graphic, the score, the rating, and the action buttons.
Instance Methods inherited from MainGameRenderer
(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

unsigned int frame
 The frames elapsed in the current render state.
unsigned int subStateChangeFrame
 The frame the sub-state last changed on.
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

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 * texBG
 The background atlas texture.
Texture2D * texFront
 The front atlas texture: the field, buttons, and lines.
Texture2D * texMarker
 The marker atlas texture.
Texture2D * texCombo
 The combo-number atlas texture.
Texture2D * texHoldMarker
 The hold-marker atlas texture.
Texture2D * texReady
 The ready/go and start-mark atlas texture.
Texture2D * texRating
 The rank-rating (judgement) atlas texture.
Texture2D * texClear0
 The first cleared/failed result atlas texture.
Texture2D * texClear1
 The second cleared/failed result atlas texture.
Texture2D * texClear2
 The third cleared/failed result atlas texture.
Texture2D * texDebugFont
 The debug-font glyph sheet.
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 pad in-game renderer.

Method Documentation

◆ buttonAreaOffset

- (double) buttonAreaOffset

The vertical offset of the button area.

In the result state it rises over the first 20 frames.

Returns
The button-area offset, in points.
Ghidra address:
0x1085f0
Ghidra address:
0x1085f0
Ghidra address:
0x28fa00

Reimplemented from MainGameRenderer.

◆ dealloc

- (void) dealloc

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

Ghidra address:
0x109ed4

◆ draw

- (void) draw

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

Ghidra address:
0x109938
Ghidra address:
0x28f750 (y), 0x28e030 (height/offset)

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:
0x109d6c

Reimplemented from MainGameRenderer.

◆ durationOfReadyGo

- (double) durationOfReadyGo

The ready-go countdown duration, in seconds.

Returns
The countdown duration, in seconds.
Ghidra address:
0x106f6c
Ghidra address:
0x106f6c
Ghidra address:
0x2924d0

Reimplemented from MainGameRenderer.

◆ endResult

- (void) endResult

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

Ghidra address:
0x1045f0

Reimplemented from MainGameRenderer.

◆ gameAreaOffset

- (double) gameAreaOffset

The vertical offset of the game area, in points.

Returns
The game-area offset.
Ghidra address:
0x10865c
Ghidra address:
0x10865c
Ghidra address:
0x28e030

Reimplemented from MainGameRenderer.

◆ init

- (instancetype) init

Initialises the pad renderer, chaining to the superclass.

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

Reimplemented from MainGameRenderer.

◆ loadRatingTex:

- (void) loadRatingTex: (short) rank

Loads the rating (rank judgement) texture for a rank tier.

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

◆ loadTexure:artwork:index:

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

Loads the pad session atlases: background, front, marker, combo, hold-marker, ready, and debug-font textures, and builds the hold-marker sub-renderer.

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:
0x102790

Reimplemented from MainGameRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases every session texture.

Ghidra address:
0x104168

Reimplemented from MainGameRenderer.

◆ renderBG

- (void) renderBG

Draws the pulsing background, the combo-burst effect, and the shutter.

Ghidra address:
0x104bcc

◆ renderBonus:atPoint:alpha:

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

Draws the bonus number.

Parameters
bonusThe bonus points.
pointThe top-left anchor.
alphaThe opacity.
Ghidra address:
0x105e20
Ghidra address:
0x105e20

◆ renderButtons:

- (void) renderButtons: (double) offsetY

Draws the 4x4 on-screen button grid, lighting pressed buttons.

Parameters
offsetYThe vertical offset applied to the grid.
Ghidra address:
0x106804
Ghidra address:
0x106804

◆ renderCircle:size:alpha:

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

Draws a ring sprite scaled about a point.

Parameters
pointThe centre point.
sizeThe ring diameter.
alphaThe opacity.
Ghidra address:
0x106e00
Ghidra address:
0x106e00

◆ renderCleared:centerY:

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

Draws the cleared result graphic.

Parameters
animFrameThe animation frame counter.
centerYThe graphic's vertical centre.
Returns
Whether the animation is still running.
Ghidra address:
0x107e44
Ghidra address:
0x107e44
Ghidra address:
0x2925c0
Ghidra address:
0x2925f8

◆ renderCombo:

- (void) renderCombo: (unsigned int) combo

Draws the combo counter and its cut-in burst.

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

◆ renderFailed:centerY:

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

Draws the failed result graphic.

Parameters
animFrameThe animation frame counter.
centerYThe graphic's vertical centre.
Returns
Whether the animation is still running.
Ghidra address:
0x10823c
Ghidra address:
0x10823c
Ghidra address:
0x292660
Ghidra address:
0x292630
Ghidra address:
0x292690

◆ renderFinish

- (void) renderFinish

Draws the finish banner animation.

Ghidra address:
0x107a98
Ghidra address:
0x28e030, 0x2924f0, 0x291d80, 0x2924f8

◆ renderMarker

- (void) renderMarker

Draws the 4x4 marker grid, the marker hit frames, and the hold markers.

Ghidra address:
0x10478c

◆ renderMarkFrame:alpha:

- (void) renderMarkFrame: (CGPoint) point
alpha: (double) alpha 

Draws one panel's marker hit frame.

Parameters
pointThe panel's top-left corner.
alphaThe opacity.
Ghidra address:
0x10463c
Ghidra address:
0x10463c

◆ renderMusicBar:timeline:alpha:

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

Draws the result-screen music bar and its per-note markers.

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

◆ renderPreStart

- (void) renderPreStart

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

Ghidra address:
0x106b94
Ghidra address:
0x28f750 (y), 0x28e030 (height/offset), 0x28f438 (artworkSize)
Ghidra address:
0x2924c0 (x), 0x28fa48 (y)
Ghidra address:
0x2924b8 (music-bar y)

◆ renderReadyGo

- (void) renderReadyGo

Draws the ready/go countdown.

Ghidra address:
0x106f78

◆ renderResult

- (void) renderResult

Draws the result screen: the cleared/failed graphic, the score, the rating, and the action buttons.

Ghidra address:
0x108804
Ghidra address:
0x2924f0, 0x291d80, 0x2924f8
Ghidra address:
0x109830
Ghidra address:
0x109884
Ghidra address:
0x109888
Ghidra address:
0x1098dc
Ghidra address:
0x1098e0
Ghidra address:
0x109934

◆ 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 running score and the partner's score.

Parameters
scoreThe player's score.
partnerScoreThe partner's score.
pointThe top-left anchor.
scaleHThe horizontal scale.
alphaThe opacity.
Ghidra address:
0x10586c
Ghidra address:
0x10586c

◆ renderStartMark

- (void) renderStartMark

Draws the start-mark intro animation.

Ghidra address:
0x107904

◆ renderTuneInfo:artworkSize:alpha:

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

Draws the tune-info panel: the jacket artwork and the tune name and artist.

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

◆ 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 animating up from a previous value.

Parameters
scoreThe target score.
pointThe top-left anchor.
alphaThe opacity.
scaleThe horizontal scale.
boardYThe score-board vertical position.
Ghidra address:
0x1055cc
Ghidra address:
0x1055cc

◆ renderUpper

- (void) renderUpper

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

Ghidra address:
0x106678
Ghidra address:
0x28f438 (artworkSize), tune-info point {18, 25}
Ghidra address:
0x2924b8 (music-bar y)
Ghidra address:
0x2924c0 (x), 0x28fa48 (y)

◆ renderUpperBG:height:

- (void) renderUpperBG: (double) y
height: (double) height 

Draws the upper background band.

Parameters
yThe band's vertical position.
heightThe band's height.
Ghidra address:
0x1065a0
Ghidra address:
0x1065a0

◆ replayEnd

- (void) replayEnd

Ends a replay, clearing the replay-playing flag.

Ghidra address:
0x109f24

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 in.

Ghidra address:
0x109f34
Ghidra address:
0x28f260
Ghidra address:
0x10a0f0
Ghidra address:
0x10a13c

Reimplemented from MainGameRenderer.

◆ setState:

- (void) setState: (unsigned int) state

Sets the render state, resetting per-state counters and, in the result state, loading the rating and cleared/failed textures and starting the result BGM.

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

◆ startPlay

- (void) startPlay

Begins playback: clears the ready texture and moves to state 3.

Ghidra address:
0x1045b4

Reimplemented from MainGameRenderer.

Property Documentation

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Ghidra address:
0x108668

◆ evaluateButtonID

- (unsigned int) evaluateButtonID
readnonatomicassign

The button identifier for the evaluate action.

Ghidra address:
0x108670

◆ goodJobButtonID

- (unsigned int) goodJobButtonID
readnonatomicassign

The button identifier for the good-job action.

Ghidra address:
0x108678

◆ goodJobPosition

- (CGPoint) goodJobPosition
readnonatomicassign

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

Ghidra address:
0x108680
Ghidra address:
0x28fa00

◆ storeMoveBtnPosition

- (CGPoint) storeMoveBtnPosition
readnonatomicassign

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

Ghidra address:
0x108788
Ghidra address:
0x28fa00

◆ storeMoveButtonID

- (unsigned int) storeMoveButtonID
readnonatomicassign

The button identifier for the store-move action.

Ghidra address:
0x108780

◆ texBG

- (Texture2D*) texBG
readwritenonatomicstrong

The background atlas texture.

Ghidra address:
0x10a140 (getter), 0x10a150 (setter)

◆ texClear0

- (Texture2D*) texClear0
readwritenonatomicstrong

The first cleared/failed result atlas texture.

Ghidra address:
0x10a23c (getter), 0x10a24c (setter)

◆ texClear1

- (Texture2D*) texClear1
readwritenonatomicstrong

The second cleared/failed result atlas texture.

Ghidra address:
0x10a260 (getter), 0x10a270 (setter)

◆ texClear2

- (Texture2D*) texClear2
readwritenonatomicstrong

The third cleared/failed result atlas texture.

Ghidra address:
0x10a284 (getter), 0x10a294 (setter)

◆ texCombo

- (Texture2D*) texCombo
readwritenonatomicstrong

The combo-number atlas texture.

Ghidra address:
0x10a1ac (getter), 0x10a1bc (setter)

◆ texDebugFont

- (Texture2D*) texDebugFont
readwritenonatomicstrong

The debug-font glyph sheet.

Ghidra address:
0x10a2a8 (getter), 0x10a2b8 (setter)

◆ texFront

- (Texture2D*) texFront
readwritenonatomicstrong

The front atlas texture: the field, buttons, and lines.

Ghidra address:
0x10a164 (getter), 0x10a174 (setter)

◆ texHoldMarker

- (Texture2D*) texHoldMarker
readwritenonatomicstrong

The hold-marker atlas texture.

Ghidra address:
0x10a1d0 (getter), 0x10a1e0 (setter)

◆ texMarker

- (Texture2D*) texMarker
readwritenonatomicstrong

The marker atlas texture.

Ghidra address:
0x10a188 (getter), 0x10a198 (setter)

◆ texRating

- (Texture2D*) texRating
readwritenonatomicstrong

The rank-rating (judgement) atlas texture.

Ghidra address:
0x10a218 (getter), 0x10a228 (setter)

◆ texReady

- (Texture2D*) texReady
readwritenonatomicstrong

The ready/go and start-mark atlas texture.

Ghidra address:
0x10a1f4 (getter), 0x10a204 (setter)

◆ twitterBtnPosition

- (CGPoint) twitterBtnPosition
readnonatomicassign

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

Ghidra address:
0x108704
Ghidra address:
0x28fa00

◆ twitterSendButtonID

- (unsigned int) twitterSendButtonID
readnonatomicassign

The button identifier for the tweet-send action.

Ghidra address:
0x1086fc

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