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


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 . | |
The knit-theme phone-idiom concrete in-game renderer.
| - (void) draw |
Draws the whole play frame, dispatching on the state and flushing every texture atlas.
Reimplemented from MainGameRenderer.
| - (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.
| clip | The sprite index. |
| drawPosition | The draw position. |
| drawArea | The clip rectangle. |
| alpha | The opacity. |
| - (void) drawDebugText: | (nullable const char *) | text | |
| pos: | (CGPoint) | pos | |
| alpha: | (float) | alpha |
Draws a run of debug text from the debug-font atlas.
| 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.
Reimplemented from MainGameRenderer.
| - (instancetype) init |
Initialises the renderer, caching the device flags and building the knit background.
nil. Reimplemented from MainGameRenderer.
| - (void) loadResultTex: | (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 for the knit theme.
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 play-session textures the knit renderer owns.
Reimplemented from MainGameRenderer.
| - (void) renderBG |
Draws the knit play-field background and its effect sprites.
| - (void) renderButtons |
Draws the 4x4 button grid, highlighting pressed panels.
| - (BOOL) renderCleared: | (unsigned int) | animFrame |
Draws the cleared-screen animation for a frame.
| animFrame | The animation frame. |
| - (void) renderCombo: | (unsigned int) | combo | |
| alpha: | (float) | alpha |
Draws the combo number and its burst and cut-in animations.
| combo | The current combo count. |
| alpha | The opacity. |
| - (BOOL) renderExcellent: | (unsigned int) | animFrame |
Draws the excellent celebration animation for a frame.
| animFrame | The animation frame. |
| - (BOOL) renderFailed: | (unsigned int) | animFrame |
Draws the failed-screen animation for a frame.
| animFrame | The animation frame. |
| - (void) renderFinish |
Draws the finish transition.
| - (void) renderFullcombo: | (int) | animFrame | |
| isResult: | (BOOL) | isResult |
Draws the full-combo celebration banner and word.
| animFrame | The animation frame; the result-screen path adds 150 to it. |
| isResult | Whether the banner is being shown on the result screen. |
| - (void) renderMarker |
Draws the note markers over the sixteen-panel grid, delegating the hold markers.
| - (void) renderMusicBar: | (CGPoint) | pos | |
| timeline: | (BOOL) | timeline | |
| alpha: | (double) | alpha |
Draws the difficulty music bar and its optional timeline cursor.
| pos | The bar's origin. |
| timeline | Whether to draw the timeline cursor. |
| alpha | The opacity. |
| - (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.
| score | The partner's score. |
| point | The partner score block's origin. |
| scale | The horizontal scale. |
| alpha | The opacity. |
| - (void) renderPreStart |
Draws the pre-start intro.
| - (void) renderRating: | (unsigned int) | animFrame |
Draws the result-screen rating chips for a frame.
| animFrame | The animation frame. |
| - (void) renderReadyGo |
Draws the ready/go countdown, playing the ready and go sounds on their frames.
| - (void) renderResult |
Draws the result screen.
| - (void) renderScore: | (unsigned int) | score | |
| atPoint: | (CGPoint) | point | |
| alpha: | (double) | alpha |
Draws the player score at a point.
| score | The player's score. |
| point | The score block's origin. |
| alpha | The opacity. |
| - (void) renderShutter: | (BOOL) | drive |
Draws the beat shutter over the play field.
| drive | Whether the shutter is opened. |
| - (void) renderStartMark: | (float) | alpha |
Draws the start-mark banner over the first-marker panels.
| alpha | The opacity. |
| - (void) renderTuneInfo: | (CGPoint) | point | |
| artworkSize: | (double) | artworkSize | |
| alpha: | (double) | alpha |
Draws the tune information block: jacket, title, difficulty word, and level.
| point | The block's origin. |
| artworkSize | The jacket's square size. |
| alpha | The opacity. |
| - (void) renderUpdatedScore: | (unsigned int) | score | |
| atPoint: | (CGPoint) | point | |
| alpha: | (double) | alpha |
Draws the score digits tweening up towards a target.
| score | The target score. |
| point | The digits' origin. |
| alpha | The opacity. |
| - (void) renderUpper |
Draws the upper region: the tune information, the live music bar, and the score.
| - (void) renderUpperBG: | (BOOL) | isResult |
Draws the knit upper background band.
| isResult | Whether a result screen is being shown. |
| - (void) replayEnd |
Notifies the renderer that a replay ended, clearing the replay-playing flag.
Reimplemented from MainGameRenderer.
| - (void) replaySelect |
Reacts to a replay selection.
Reimplemented from MainGameRenderer.
| - (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.
| state | The state to enter. |
| - (void) startPlay |
Clears the ready textures and enters the playing state.
Reimplemented from MainGameRenderer.
|
readwritenonatomicstrong |
The active knit background effect sprites.
|
readnonatomicassign |
The vertical offset of the button area, in points.
Always zero for the knit phone.
|
readwritenonatomicstrong |
The current knit background effect sprite.
|
readnonatomicassign |
The button identifier for the end action.
Returns 15 for the knit phone.
|
readnonatomicassign |
The button identifier for the evaluate action.
Returns 14 for the knit 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 13 for the knit phone.
|
readnonatomicassign |
The position of the good-job overlay, derived from goodJobButtonID .
|
readwritenonatomicstrong |
The "GO" countdown sound player.
|
readnonatomicassign |
The position of the store-move button, derived from storeMoveButtonID .
|
readnonatomicassign |
The button identifier for the store-move action.
Returns 14 for the knit phone.
|
readwritenonatomicstrong |
The beat-background atlas.
|
readwritenonatomicstrong |
The combo-number and background atlas.
|
readwritenonatomicstrong |
The debug-font atlas.
|
readwritenonatomicstrong |
The front atlas: chips, buttons, tune info, marks.
|
readwritenonatomicstrong |
The hold-marker atlas.
|
readwritenonatomicstrong |
The note-marker atlas.
|
readwritenonatomicstrong |
The first ready-countdown atlas.
|
readwritenonatomicstrong |
The second ready-countdown atlas.
|
readwritenonatomicstrong |
The result-screen atlas.
|
readwritenonatomicstrong |
The result-screen background atlas.
|
readwritenonatomicstrong |
The knit-wave texture layers.
|
readnonatomicassign |
The position of the tweet-send button, derived from twitterSendButtonID .
|
readnonatomicassign |
The button identifier for the tweet-send action.
Returns 14 for the knit phone.
|
readwritenonatomicstrong |
The knit upper-background decoration.