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

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

#include <MainGameRendererPhoneKnt.h>

Inheritance diagram for MainGameRendererPhoneKnt:
Collaboration diagram for MainGameRendererPhoneKnt:

Instance Methods

(instancetype) - init
 Initialises the renderer, caching the device flags and building the knit background.
(void) - loadTexure:artwork:index:
 Loads every play-session texture for the knit theme.
(void) - loadResultTex:
 Rebuilds the result-screen rating atlas for a rank.
(void) - releaseTexture
 Releases the play-session textures the knit renderer owns.
(void) - setState:
 Sets the high-level render state, loading the result textures and BGM on the result state and resetting the per-frame counters.
(void) - startPlay
 Clears the ready textures and enters the playing state.
(void) - endResult
 Marks the session finished when it is in the result state.
(double) - durationOfReadyGo
 The ready-go countdown duration, in seconds.
(void) - drawClip:drawPosition:drawArea:alpha:
 Draws one clipped sprite region: a sprite index at a position within a clip area, at an opacity.
(void) - renderStartMark:
 Draws the start-mark banner over the first-marker panels.
(void) - renderMarker
 Draws the note markers over the sixteen-panel grid, delegating the hold markers.
(void) - renderBG
 Draws the knit play-field background and its effect sprites.
(void) - renderShutter:
 Draws the beat shutter over the play field.
(void) - renderCombo:alpha:
 Draws the combo number and its burst and cut-in animations.
(void) - renderUpdatedScore:atPoint:alpha:
 Draws the score digits tweening up towards a target.
(void) - renderScore:atPoint:alpha:
 Draws the player score at a point.
(void) - renderPartnerScore:atPoint:scale:alpha:
 Draws the partner score at a point, with a horizontal scale and alpha.
(void) - renderMusicBar:timeline:alpha:
 Draws the difficulty music bar and its optional timeline cursor.
(void) - renderTuneInfo:artworkSize:alpha:
 Draws the tune information block: jacket, title, difficulty word, and level.
(void) - renderUpperBG:
 Draws the knit upper background band.
(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) - renderReadyGo
 Draws the ready/go countdown, playing the ready and go sounds on their frames.
(void) - renderFullcombo:isResult:
 Draws the full-combo celebration banner and word.
(void) - renderFinish
 Draws the finish transition.
(BOOL) - renderExcellent:
 Draws the excellent celebration animation for a frame.
(void) - renderRating:
 Draws the result-screen rating chips for a frame.
(BOOL) - renderCleared:
 Draws the cleared-screen animation for a frame.
(BOOL) - renderFailed:
 Draws the failed-screen animation for a frame.
(void) - renderResult
 Draws the result screen.
(void) - draw
 Draws the whole play frame, dispatching on the state and flushing every texture atlas.
(void) - drawDebugText:pos:alpha:
 Draws a run of debug text from the debug-font atlas.
(void) - replayEnd
 Notifies the renderer that a replay ended, clearing the replay-playing flag.
(void) - replaySelect
 Reacts to a replay selection.
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.
unsigned int startMarkFrame
 The start-mark animation frame counter.
float lastHakuPhase
 The beat phase as of the previous frame.
float bounceEnergy
 The smoothed knit-background bounce energy.
unsigned int effFrame
 The background-effect spawn frame counter.
unsigned int effSlot
 The next background-effect slot to spawn.
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 .
Texture2D * texReady0
 The first ready-countdown atlas.
Texture2D * texReady1
 The second ready-countdown atlas.
Texture2D * texResult
 The result-screen atlas.
Texture2D * texResultBg
 The result-screen background atlas.
Texture2D * texBeatBg
 The beat-background atlas.
Texture2D * texDebugFont
 The debug-font atlas.
AVAudioPlayer * sePlayerGo
 The "GO" countdown sound player.
NSMutableArray< Texture2D * > * texWaveAr
 The knit-wave texture layers.
UpperBGKnit * upperBgKnt
 The knit upper-background decoration.
EffectBgKnit * effectBgKnt
 The current knit background effect sprite.
NSMutableArray< EffectBgKnit * > * arrayBgEff
 The active knit background effect sprites.
Texture2D * texHoldMarker
 The hold-marker atlas.
Texture2D * texFront
 The front atlas: chips, buttons, tune info, marks.
Texture2D * texMarker
 The note-marker atlas.
Texture2D * texCombo
 The combo-number and background atlas.
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 knit-theme phone-idiom concrete in-game renderer.

Method Documentation

◆ draw

- (void) draw

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

Ghidra address:
0x193214

Reimplemented from MainGameRenderer.

◆ drawClip:drawPosition:drawArea:alpha:

- (void) drawClip: (int) clip
drawPosition: (CGPoint) drawPosition
drawArea: (CGRect) drawArea
alpha: (float) alpha 

Draws one clipped sprite region: a sprite index at a position within a clip area, at an opacity.

Parameters
clipThe sprite index.
drawPositionThe draw position.
drawAreaThe clip rectangle.
alphaThe opacity.
Ghidra address:
0x18c1a0
Ghidra address:
0x18c1a0

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

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

Reimplemented from MainGameRenderer.

◆ durationOfReadyGo

- (double) durationOfReadyGo

The ready-go countdown duration, in seconds.

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

Reimplemented from MainGameRenderer.

◆ endResult

- (void) endResult

Marks the session finished when it is in the result state.

Ghidra address:
0x18c154

Reimplemented from MainGameRenderer.

◆ init

- (instancetype) init

Initialises the renderer, caching the device flags and building the knit background.

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

Reimplemented from MainGameRenderer.

◆ loadResultTex:

- (void) loadResultTex: (short) rank

Rebuilds the result-screen rating atlas for a rank.

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

◆ loadTexure:artwork:index:

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

Loads every play-session texture for the knit theme.

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

Reimplemented from MainGameRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases the play-session textures the knit renderer owns.

Ghidra address:
0x18bce8

Reimplemented from MainGameRenderer.

◆ renderBG

- (void) renderBG

Draws the knit play-field background and its effect sprites.

Ghidra address:
0x18caf0

◆ renderButtons

- (void) renderButtons

Draws the 4x4 button grid, highlighting pressed panels.

Ghidra address:
0x18ef18

◆ renderCleared:

- (BOOL) renderCleared: (unsigned int) animFrame

Draws the cleared-screen animation for a frame.

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

◆ renderCombo:alpha:

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

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

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

◆ renderExcellent:

- (BOOL) renderExcellent: (unsigned int) animFrame

Draws the excellent celebration animation for a frame.

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

◆ renderFailed:

- (BOOL) renderFailed: (unsigned int) animFrame

Draws the failed-screen animation for a frame.

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

◆ renderFinish

- (void) renderFinish

Draws the finish transition.

Ghidra address:
0x190340
Ghidra address:
0x19052c
Ghidra address:
0x190614

◆ renderFullcombo:isResult:

- (void) renderFullcombo: (int) animFrame
isResult: (BOOL) isResult 

Draws the full-combo celebration banner and word.

Parameters
animFrameThe animation frame; the result-screen path adds 150 to it.
isResultWhether the banner is being shown on the result screen.
Ghidra address:
0x18fc64
Ghidra address:
0x18fc64

◆ renderMarker

- (void) renderMarker

Draws the note markers over the sixteen-panel grid, delegating the hold markers.

Ghidra address:
0x18c74c

◆ renderMusicBar:timeline:alpha:

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

Draws the difficulty music bar and its optional timeline cursor.

Parameters
posThe bar's origin.
timelineWhether to draw the timeline cursor.
alphaThe opacity.
Ghidra address:
0x18e34c
Ghidra address:
0x18e34c
Ghidra address:
0x2935a0

◆ renderPartnerScore:atPoint:scale:alpha:

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

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

Parameters
scoreThe partner's score.
pointThe partner score block's origin.
scaleThe horizontal scale.
alphaThe opacity.
Ghidra address:
0x18dfb8
Ghidra address:
0x18dfb8

◆ renderPreStart

- (void) renderPreStart

Draws the pre-start intro.

Ghidra address:
0x18f0e0

◆ renderRating:

- (void) renderRating: (unsigned int) animFrame

Draws the result-screen rating chips for a frame.

Parameters
animFrameThe animation frame.
Ghidra address:
0x19134c
Ghidra address:
0x19134c

◆ renderReadyGo

- (void) renderReadyGo

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

Ghidra address:
0x18f3d4
Ghidra address:
0x2938e4

◆ renderResult

- (void) renderResult

Draws the result screen.

Ghidra address:
0x1924f8
Ghidra address:
0x19310c
Ghidra address:
0x193160
Ghidra address:
0x193164
Ghidra address:
0x1931b8
Ghidra address:
0x1931bc
Ghidra address:
0x193210

◆ renderScore:atPoint:alpha:

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

Draws the player score at a point.

Parameters
scoreThe player's score.
pointThe score block's origin.
alphaThe opacity.
Ghidra address:
0x18dbc8
Ghidra address:
0x18dbc8

◆ renderShutter:

- (void) renderShutter: (BOOL) drive

Draws the beat shutter over the play field.

Parameters
driveWhether the shutter is opened.
Ghidra address:
0x18d194
Ghidra address:
0x18d194

◆ renderStartMark:

- (void) renderStartMark: (float) alpha

Draws the start-mark banner over the first-marker panels.

Parameters
alphaThe opacity.
Ghidra address:
0x18c3a4
Ghidra address:
0x18c3a4

◆ renderTuneInfo:artworkSize:alpha:

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

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

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

◆ renderUpdatedScore:atPoint:alpha:

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

Draws the score digits tweening up towards a target.

Parameters
scoreThe target score.
pointThe digits' origin.
alphaThe opacity.
Ghidra address:
0x18d92c
Ghidra address:
0x18d92c

◆ renderUpper

- (void) renderUpper

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

Ghidra address:
0x18ec9c

◆ renderUpperBG:

- (void) renderUpperBG: (BOOL) isResult

Draws the knit upper background band.

Parameters
isResultWhether a result screen is being shown.
Ghidra address:
0x18eb04
Ghidra address:
0x18eb04

◆ replayEnd

- (void) replayEnd

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

Ghidra address:
0x193854

Reimplemented from MainGameRenderer.

◆ replaySelect

- (void) replaySelect

Reacts to a replay selection.

Ghidra address:
0x193864
Ghidra address:
0x193a88
Ghidra address:
0x193ad4

Reimplemented from MainGameRenderer.

◆ setState:

- (void) setState: (unsigned int) state

Sets the high-level render state, loading the result textures and BGM on the result state and resetting the per-frame counters.

Every path resets the frame counter and chains up.

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

◆ startPlay

- (void) startPlay

Clears the ready textures and enters the playing state.

Ghidra address:
0x18c118

Reimplemented from MainGameRenderer.

Property Documentation

◆ arrayBgEff

- (NSMutableArray<EffectBgKnit *>*) arrayBgEff
readwritenonatomicstrong

The active knit background effect sprites.

Ghidra address:
0x193c40 (getter), 0x193c50 (setter)

◆ buttonAreaOffset

- (double) buttonAreaOffset
readnonatomicassign

The vertical offset of the button area, in points.

Always zero for the knit phone.

Ghidra address:
0x1922a8
Ghidra address:
0x1922a8

◆ effectBgKnt

- (EffectBgKnit*) effectBgKnt
readwritenonatomicstrong

The current knit background effect sprite.

Ghidra address:
0x193c1c (getter), 0x193c2c (setter)

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Returns 15 for the knit phone.

Ghidra address:
0x1922f0
Ghidra address:
0x1922f0

◆ evaluateButtonID

- (unsigned int) evaluateButtonID
readnonatomicassign

The button identifier for the evaluate action.

Returns 14 for the knit phone.

Ghidra address:
0x1922f8
Ghidra address:
0x1922f8

◆ gameAreaOffset

- (double) gameAreaOffset
readnonatomicassign

The vertical offset of the game area, in points.

Pushed down on the four-inch phone.

Ghidra address:
0x1922b0
Ghidra address:
0x1922b0

◆ goodJobButtonID

- (unsigned int) goodJobButtonID
readnonatomicassign

The button identifier for the good-job action.

Returns 13 for the knit phone.

Ghidra address:
0x192300
Ghidra address:
0x192300

◆ goodJobPosition

- (CGPoint) goodJobPosition
readnonatomicassign

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

Ghidra address:
0x192308

◆ sePlayerGo

- (AVAudioPlayer*) sePlayerGo
readwritenonatomicstrong

The "GO" countdown sound player.

Ghidra address:
0x193bb0 (getter), 0x193bc0 (setter)

◆ storeMoveBtnPosition

- (CGPoint) storeMoveBtnPosition
readnonatomicassign

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

Ghidra address:
0x192458

◆ storeMoveButtonID

- (unsigned int) storeMoveButtonID
readnonatomicassign

The button identifier for the store-move action.

Returns 14 for the knit phone.

Ghidra address:
0x192450
Ghidra address:
0x192450

◆ texBeatBg

- (Texture2D*) texBeatBg
readwritenonatomicstrong

The beat-background atlas.

Ghidra address:
0x193b68 (getter), 0x193b78 (setter)

◆ texCombo

- (Texture2D*) texCombo
readwritenonatomicstrong

The combo-number and background atlas.

Ghidra address:
0x193cd0 (getter), 0x193ce0 (setter)

◆ texDebugFont

- (Texture2D*) texDebugFont
readwritenonatomicstrong

The debug-font atlas.

Ghidra address:
0x193b8c (getter), 0x193b9c (setter)

◆ texFront

- (Texture2D*) texFront
readwritenonatomicstrong

The front atlas: chips, buttons, tune info, marks.

Ghidra address:
0x193c88 (getter), 0x193c98 (setter)

◆ texHoldMarker

- (Texture2D*) texHoldMarker
readwritenonatomicstrong

The hold-marker atlas.

Ghidra address:
0x193c64 (getter), 0x193c74 (setter)

◆ texMarker

- (Texture2D*) texMarker
readwritenonatomicstrong

The note-marker atlas.

Ghidra address:
0x193cac (getter), 0x193cbc (setter)

◆ texReady0

- (Texture2D*) texReady0
readwritenonatomicstrong

The first ready-countdown atlas.

Ghidra address:
0x193ad8 (getter), 0x193ae8 (setter)

◆ texReady1

- (Texture2D*) texReady1
readwritenonatomicstrong

The second ready-countdown atlas.

Ghidra address:
0x193afc (getter), 0x193b0c (setter)

◆ texResult

- (Texture2D*) texResult
readwritenonatomicstrong

The result-screen atlas.

Ghidra address:
0x193b20 (getter), 0x193b30 (setter)

◆ texResultBg

- (Texture2D*) texResultBg
readwritenonatomicstrong

The result-screen background atlas.

Ghidra address:
0x193b44 (getter), 0x193b54 (setter)

◆ texWaveAr

- (NSMutableArray<Texture2D *>*) texWaveAr
readwritenonatomicstrong

The knit-wave texture layers.

Ghidra address:
0x193bd4 (getter), 0x193be4 (setter)

◆ twitterBtnPosition

- (CGPoint) twitterBtnPosition
readnonatomicassign

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

Ghidra address:
0x1923b0

◆ twitterSendButtonID

- (unsigned int) twitterSendButtonID
readnonatomicassign

The button identifier for the tweet-send action.

Returns 14 for the knit phone.

Ghidra address:
0x1923a8
Ghidra address:
0x1923a8

◆ upperBgKnt

- (UpperBGKnit*) upperBgKnt
readwritenonatomicstrong

The knit upper-background decoration.

Ghidra address:
0x193bf8 (getter), 0x193c08 (setter)

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