|
JubeatPlus 3.9.11
|
The phone-idiom concrete in-game renderer. More...
#include <MainGameRendererPhone.h>


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 . | |
The phone-idiom concrete in-game renderer.
| - (void) draw |
Draws the whole play frame, dispatching on the state to the render methods and flushing every texture atlas.
Reimplemented from MainGameRenderer.
| - (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.
| text | The C string to draw. |
| pos | The starting position. |
| alpha | The opacity. |
Reimplemented from MainGameRenderer.
| - (double) durationOfReadyGo |
The ready-go countdown duration, in seconds.
Reimplemented from MainGameRenderer.
| - (void) endResult |
Marks the session finished when it is in the result state (5).
Reimplemented from MainGameRenderer.
| - (instancetype) init |
Initialises the renderer, caching the phone-retina and four-inch-aspect device flags.
nil. Reimplemented from MainGameRenderer.
| - (void) loadRatingTex: | (short) | rank |
Rebuilds the result-screen rating atlas for a rank.
| rank | The tune's rank, selecting the rating resource. |
| - (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.
| conf | The renderer configuration. |
| artwork | The jacket artwork image. |
| index | An additional index image composited into the front atlas. |
Reimplemented from MainGameRenderer.
| - (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.
Reimplemented from MainGameRenderer.
| - (void) renderBG |
Draws the play-field background: the tension shutter, the combo burst animation, and the shutter halves that slide with the beat.
| - (void) renderBonus: | (unsigned int) | bonus | |
| atPoint: | (CGPoint) | point | |
| alpha: | (double) | alpha |
Draws the final-bonus digits at a point.
| bonus | The bonus value. |
| point | The digits' origin. |
| alpha | The opacity. |
| - (void) renderButtons: | (double) | offset |
Draws the 4x4 button grid, highlighting pressed panels.
| offset | The grid's vertical offset, in points. |
| - (void) renderCircle: | (CGPoint) | center | |
| size: | (double) | size | |
| alpha: | (double) | alpha |
Draws a soft circle of the given size at a point.
| center | The circle's centre. |
| size | The circle's diameter, in points. |
| alpha | The opacity. |
| - (BOOL) renderCleared: | (unsigned int) | rank | |
| centerY: | (double) | centerY |
Draws the cleared-screen animation for a rank.
| rank | The tune's rank. |
| centerY | The animation's vertical centre. |
| - (void) renderCombo: | (unsigned int) | combo |
Draws the combo number and its burst and cut-in animations.
| combo | The current combo count. |
| - (BOOL) renderFailed: | (unsigned int) | rank | |
| centerY: | (double) | centerY |
Draws the failed-screen animation for a rank.
| rank | The tune's rank. |
| centerY | The animation's vertical centre. |
| - (void) renderFinish |
Draws the finish transition.
| - (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) 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.
| position | The bar's origin. |
| timeline | Whether to draw the timeline cursor. |
| alpha | The opacity. |
| - (void) renderPreStart |
Draws the pre-start intro.
| - (void) renderReadyGo |
Draws the ready/go countdown, playing the ready and go sounds on their frames.
| - (void) renderResult |
Draws the result screen: the cleared or failed animation, the score, bonus, records, and the action buttons.
| - (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.
| score | The player's score. |
| partnerScore | The partner's score. |
| point | The score block's origin. |
| scaleH | The horizontal scale. |
| alpha | The opacity. |
| - (void) renderStartMark |
Draws the start-mark banner.
| - (void) renderTuneInfo: | (CGPoint) | position | |
| artworkSize: | (double) | artworkSize | |
| alpha: | (double) | alpha |
Draws the tune information block: jacket, title, difficulty word, and level.
| position | The block's origin. |
| artworkSize | The jacket's square size. |
| alpha | The opacity. |
| - (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.
| score | The target score. |
| point | The digits' origin. |
| alpha | Unused. The binary clobbers d2 with the first -spriteAtIndex: return and never reads this argument; it is kept so the selector matches the binary. |
| scale | The per-digit scale. |
| boardY | The score board's vertical position. |
| - (void) renderUpper |
Draws the upper region: the tune information, the live music bar, and the score.
| - (void) renderUpperBG: | (double) | y |
Draws the upper background band, and on the four-inch phone the tiled filler above and below it.
| y | The band's bottom edge, in points. |
| - (void) replayEnd |
Notifies the renderer that a replay ended, clearing the replay-playing flag.
Reimplemented from MainGameRenderer.
| - (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.
Reimplemented from MainGameRenderer.
| - (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.
| state | The state to enter. |
| - (void) startPlay |
Clears the ready texture and enters the playing state (3).
Reimplemented from MainGameRenderer.
|
readnonatomicassign |
The vertical offset of the button area, in points.
Non-zero only during the result state's opening slide.
|
readnonatomicassign |
The button identifier for the end action.
Returns 11 for the phone.
|
readnonatomicassign |
The button identifier for the evaluate action.
Returns 10 for the phone.
|
readnonatomicassign |
The vertical offset of the game area, in points.
Pushed down on the four-inch phone.
|
readnonatomicassign |
The button identifier for the good-job action.
Returns 9 for the phone.
|
readnonatomicassign |
The position of the good-job overlay, derived from goodJobButtonID .
|
readnonatomicassign |
The position of the store-move button, derived from storeMoveButtonID .
|
readnonatomicassign |
The button identifier for the store-move action.
Returns 10 for the phone.
|
readnonatomicassign |
The position of the tweet-send button, derived from twitterSendButtonID .
|
readnonatomicassign |
The button identifier for the tweet-send action.
Returns 10 for the phone.