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

The abstract base renderer for a play session. More...

#include <MainGameRenderer.h>

Inheritance diagram for MainGameRenderer:
Collaboration diagram for MainGameRenderer:

Instance Methods

(instancetype) - init
 Initialises the renderer, clearing its texture-change, good-job image, and score-backup state.
(void) - loadTexure:artwork:index:
 Loads the textures for a play session.
(void) - releaseTexture
 Releases the session textures.
(double) - durationOfReadyGo
 The ready-go countdown duration, in seconds.
(void) - startPlay
 Notifies the renderer that play has started.
(void) - endResult
 Notifies the renderer that the result screen should begin.
(double) - buttonAreaOffset
 The vertical offset of the button area, in points.
(double) - gameAreaOffset
 The vertical offset of the game area, in points.
(void) - draw
 Draws one frame.
(void) - drawDebugText:pos:alpha:
 Draws debug text at a point.
(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.
(void) - replaySelect
 Notifies the renderer that a replay was selected.
(void) - replayEnd
 Notifies the renderer that a replay ended.

Protected Attributes

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

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 abstract base renderer for a play session.

Method Documentation

◆ backupScoreData

- (void) backupScoreData

Snapshots the sequence's current score into replayBackupScore for replay, and marks the score backed up.

Ghidra address:
0xf810

◆ buttonAreaOffset

- (double) buttonAreaOffset

The vertical offset of the button area, in points.

The base returns 0.

Returns
The button-area offset.
Ghidra address:
0xf7d4
Ghidra address:
0xf7d4

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, and MainGameRendererPadRpl.

◆ draw

- (void) draw

Draws one frame.

The base implementation does nothing; subclasses render the play field.

Ghidra address:
0xf7e4
Ghidra address:
0xf7e4

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ drawDebugText:pos:alpha:

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

Draws debug text at a point.

The base implementation does nothing.

Parameters
textThe C string to draw.
posThe position to draw it at.
alphaThe opacity.
Ghidra address:
0xf7e8

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ durationOfReadyGo

- (double) durationOfReadyGo

The ready-go countdown duration, in seconds.

The base returns 0.

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

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ endResult

- (void) endResult

Notifies the renderer that the result screen should begin.

The base does nothing.

Ghidra address:
0xf7d0
Ghidra address:
0xf7d0

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ gameAreaOffset

- (double) gameAreaOffset

The vertical offset of the game area, in points.

The base returns 0.

Returns
The game-area offset.
Ghidra address:
0xf7dc
Ghidra address:
0xf7dc

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, and MainGameRendererPadRpl.

◆ getMusicBarRect

- (CGRect) getMusicBarRect

The rectangle of the result-screen music bar.

The base returns CGRectZero .

Returns
The music-bar rectangle.
Ghidra address:
0xf7fc
Ghidra address:
0xf7fc

Reimplemented in MainGameRendererPadKnt.

◆ init

- (instancetype) init

Initialises the renderer, clearing its texture-change, good-job image, and score-backup state.

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

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ loadTexure:artwork:index:

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

Loads the textures for a play session.

The base implementation does nothing; each concrete subclass loads the idiom- and theme-appropriate textures.

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

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ releaseTexture

- (void) releaseTexture

Releases the session textures.

The base implementation does nothing.

Ghidra address:
0xf718
Ghidra address:
0xf718

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ replayEnd

- (void) replayEnd

Notifies the renderer that a replay ended.

The base implementation does nothing.

Ghidra address:
0xf880
Ghidra address:
0xf880

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ replaySelect

- (void) replaySelect

Notifies the renderer that a replay was selected.

The base implementation does nothing.

Ghidra address:
0xf87c
Ghidra address:
0xf87c

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

◆ startPlay

- (void) startPlay

Notifies the renderer that play has started.

The base implementation does nothing.

Ghidra address:
0xf7cc
Ghidra address:
0xf7cc

Reimplemented in MainGameRendererPad, MainGameRendererPadKnt, MainGameRendererPadRpl, MainGameRendererPhone, MainGameRendererPhoneKnt, and MainGameRendererPhoneRpl.

Property Documentation

◆ btnDown

- (int) btnDown
readwritenonatomicassign

The currently held-down button bitmask.

Ghidra address:
0xf948 (getter), 0xf958 (setter)

◆ btnPress

- (int) btnPress
readwritenonatomicassign

The currently pressed button bitmask.

Ghidra address:
0xf928 (getter), 0xf938 (setter)

◆ buttonMarginForScreen40

- (int) buttonMarginForScreen40
readnonatomicassign

The default button margin used by the 480-point-tall phone layout.

Ghidra address:
0xf7ec

◆ eaglView

- (EAGLView*) eaglView
readwritenonatomicstrong

The GL view this renderer draws into.

Ghidra address:
0xfa0c (getter), 0xfa1c (setter)

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

The base returns 0.

Ghidra address:
0xf76c
Ghidra address:
0xf76c

◆ evaluateButtonID

- (unsigned int) evaluateButtonID
readnonatomicassign

The button identifier for the evaluate action.

The base returns 0.

Ghidra address:
0xf774
Ghidra address:
0xf774

◆ ghostPress

- (int) ghostPress
readwritenonatomicassign

The ghost-play button bitmask.

Ghidra address:
0xfa30 (getter), 0xfa40 (setter)

◆ goodJobAlphaMax

- (float) goodJobAlphaMax
readwritenonatomicassign

The peak opacity of the good-job overlay.

Ghidra address:
0xfa70 (getter), 0xfa80 (setter)

◆ goodJobButtonID

- (unsigned int) goodJobButtonID
readnonatomicassign

The button identifier for the good-job action.

The base returns 0.

Ghidra address:
0xf77c
Ghidra address:
0xf77c

◆ goodJobImage

- (UIImageView*) goodJobImage
readwritenonatomicunsafe_unretained

The good-job overlay image view.

Stored without ownership, matching the binary.

Ghidra address:
0xfa50 (getter), 0xfa60 (setter)

◆ goodJobPosition

- (CGPoint) goodJobPosition
readnonatomicassign

The position of the good-job overlay.

The base returns CGPointZero .

Ghidra address:
0xf784
Ghidra address:
0xf784

◆ hasMusic

- (BOOL) hasMusic
readwritenonatomicassign

Whether the session has music.

Ghidra address:
0xfb30 (getter), 0xfb40 (setter)

◆ isConnected

- (BOOL) isConnected
readwritenonatomicassign

Whether the session partner is connected.

Ghidra address:
0xfab0 (getter), 0xfac0 (setter)

◆ isCustom

- (BOOL) isCustom
readwritenonatomicassign

Whether this is a custom (edit) sequence.

Ghidra address:
0xfad0 (getter), 0xfae0 (setter)

◆ isDownload

- (BOOL) isDownload
readwritenonatomicassign

Whether the tune was downloaded.

Ghidra address:
0xfaf0 (getter), 0xfb00 (setter)

◆ isEndState

- (BOOL) isEndState
readnonatomicassign

Whether the session has reached its end sub-state.

Ghidra address:
0xf748

◆ isNewRecord

- (BOOL) isNewRecord
readwritenonatomicassign

Whether the session set a new record.

Ghidra address:
0xf8e8 (getter), 0xf8f8 (setter)

◆ isSession

- (BOOL) isSession
readwritenonatomicassign

Whether this is a session (versus) play.

Ghidra address:
0xfa90 (getter), 0xfaa0 (setter)

◆ isTextureChange

- (BOOL) isTextureChange
readwritenonatomicassign

Whether a texture change is pending.

Ghidra address:
0xfb10 (getter), 0xfb20 (setter)

◆ partnerFinalBonus

- (unsigned int) partnerFinalBonus
readwritenonatomicassign

The partner's final bonus.

Ghidra address:
0xf9a8 (getter), 0xf9b8 (setter)

◆ partnerFinished

- (BOOL) partnerFinished
readwritenonatomicassign

Whether the session partner has finished.

Ghidra address:
0xf968 (getter), 0xf978 (setter)

◆ partnerFullcombo

- (BOOL) partnerFullcombo
readwritenonatomicassign

Whether the partner achieved a full combo.

Ghidra address:
0xf9c8 (getter), 0xf9d8 (setter)

◆ partnerScore

- (unsigned int) partnerScore
readwritenonatomicassign

The partner's current score.

Ghidra address:
0xf988 (getter), 0xf998 (setter)

◆ rendererConf

- (RendererConf*) rendererConf
readwritenonatomicstrong

The renderer configuration for the current session.

Ghidra address:
0xf884 (getter), 0xf894 (setter)

◆ replayBackupScore

- (ScoreData) replayBackupScore
readnonatomicassign

The score snapshot captured for replay by -backupScoreData .

Ghidra address:
0xfb90

◆ replayPlaying

- (BOOL) replayPlaying
readwritenonatomicassign

Whether a replay is playing.

Ghidra address:
0xfb50 (getter), 0xfb60 (setter)

◆ scoreBackup

- (BOOL) scoreBackup
readwritenonatomicassign

Whether the score has been backed up for replay.

Ghidra address:
0xfb70 (getter), 0xfb80 (setter)

◆ scoreRecord

- (unsigned int) scoreRecord
readwritenonatomicassign

The previous best score record for this tune.

Ghidra address:
0xf908 (getter), 0xf918 (setter)

◆ sequence

- (Sequence*) sequence
readwritenonatomicstrong

The note sequence being played.

Ghidra address:
0xf9e8 (getter), 0xf9f8 (setter)

◆ showCombo

- (BOOL) showCombo
readwritenonatomicassign

Whether the combo counter is shown.

Ghidra address:
0xf8c8 (getter), 0xf8d8 (setter)

◆ state

- (unsigned int) state
readwritenonatomicassign

The high-level render state.

Setting it also resets subState to 0.

Ghidra address:
0xf71c (getter), 0xf72c (setter)

◆ storeMoveBtnPosition

- (CGPoint) storeMoveBtnPosition
readnonatomicassign

The position of the store-move button.

The base returns CGPointZero .

Ghidra address:
0xf7b4
Ghidra address:
0xf7b4

◆ storeMoveButtonID

- (unsigned int) storeMoveButtonID
readnonatomicassign

The button identifier for the store-move action.

The base returns 0.

Ghidra address:
0xf7ac
Ghidra address:
0xf7ac

◆ subState

- (unsigned int) subState
readwritenonatomicassign

The render sub-state within the current state .

Ghidra address:
0xf8a8 (getter), 0xf8b8 (setter)

◆ twitterBtnPosition

- (CGPoint) twitterBtnPosition
readnonatomicassign

The position of the tweet-send button.

The base returns CGPointZero .

Ghidra address:
0xf79c
Ghidra address:
0xf79c

◆ twitterSendButtonID

- (unsigned int) twitterSendButtonID
readnonatomicassign

The button identifier for the tweet-send action.

The base returns 0.

Ghidra address:
0xf794
Ghidra address:
0xf794

◆ upperBgHeight40

- (int) upperBgHeight40
readnonatomicassign

The default upper-background height used by the 480-point-tall phone layout.

Ghidra address:
0xf7f4

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