|
JubeatPlus 3.9.11
|
The knit-theme pad in-game renderer. More...
#include <MainGameRendererPadKnt.h>


Instance Methods | |
| (instancetype) | - init |
| Initialises the knit pad renderer: chains to the superclass, then builds the empty effect-sprite array, the knit upper-background decoration, and its wave geometry. | |
| (void) | - dealloc |
| Releases the session textures, then chains to the superclass deallocation. | |
| (void) | - loadTexure:artwork:index: |
| Loads the knit pad session atlases: the debug font, the six wave layers, the beat background, the ready/go textures, the front, marker, hold-marker and combo atlases, and the tune-info blits. | |
| (void) | - loadResultTex: |
| Loads the result-screen atlas and result-background atlas, sets the result clip rect, and blits the per-rank end-mark graphic. | |
| (void) | - releaseTexture |
| Releases every knit session texture. | |
| (void) | - setState: |
| Sets the render state, resetting per-state counters and, in the ready-go and result states, preparing the go voice player and result BGM. | |
| (void) | - startPlay |
| Begins playback: moves to state 3 and clears the go voice player. | |
| (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, reloads the start mark, and fades the good-job overlay out. | |
| (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, in points. | |
| (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. | |
| (CGRect) | - getMusicBarRect |
| The rectangle of the result-screen music bar. | |
| (void) | - drawClip:drawPosition:drawArea:alpha: |
Draws a clipped sprite: appends a quad drawing sprite clip into drawArea , clipped to drawPosition , skipping the draw entirely when nothing is visible. | |
| (void) | - renderStartMark: |
Draws the start-mark intro: each first-marker panel's clipped frame glyphs and its centre glyph, animating in and advancing startMarkFrame . | |
| (void) | - renderMarker |
| Draws the 4x4 marker grid, the hold markers, and the first-marker highlight. | |
| (void) | - renderBG |
| Draws the knit beat background, schedules and advances the knit burst effects, and draws the active effect sprites. | |
| (void) | - renderShutter: |
| Draws the beat-background shutter bars, tweening the shutter-open amount. | |
| (void) | - renderCombo:alpha: |
| Draws the combo counter and its cut-in burst. | |
| (void) | - renderUpdatedScore:atPoint:alpha: |
| Draws the score digits animating up from a previous value (the new-record score). | |
| (void) | - renderScore:atPoint:alpha: |
| Draws the running score, tweening the shown value toward the target. | |
| (void) | - renderPartnerScore:atPoint:scale:alpha: |
| Draws the partner's score row during a session play. | |
| (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, the tune name, and the difficulty and level. | |
| (void) | - renderUpperBG: |
| Advances and draws the knit upper background: triggers a wave rise under each held button, then renders the wave layers. | |
| (void) | - renderUpper |
| Draws the upper region: the tune-info panel, the music bar, the score, and the partner score. | |
| (void) | - renderButtons |
| Draws the 4x4 on-screen button grid, lighting pressed buttons. | |
| (void) | - renderPreStart |
| Draws the pre-start intro: the background, upper region, tune info, score, music bar, and buttons cued in over frames. | |
| (void) | - renderReadyGo |
| Draws the ready/go countdown. | |
| (void) | - renderFullcombo:isResult: |
| Draws the full-combo flourish. | |
| (void) | - renderFinish |
| Draws the finish banner and, once done, loads the result texture off-thread. | |
| (BOOL) | - renderExcellent: |
| Draws the excellent (perfect-score) result flourish. | |
| (void) | - renderRating: |
| Draws the rank rating graphic. | |
| (BOOL) | - renderCleared: |
| Draws the cleared result graphic. | |
| (BOOL) | - renderFailed: |
| Draws the failed result graphic. | |
| (void) | - renderResult |
| Draws the result screen: the flourish, the score, the rating, the new-record banner, and the action marks. | |
| Instance Methods inherited from MainGameRenderer | |
| (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 interactive 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 accumulated knit-bounce energy. | |
| unsigned int | effFrame |
| The knit-effect scheduling frame counter. | |
| unsigned int | effSlot |
| The next knit-effect table slot to spawn. | |
| int | markerDir [kMainGameGridPanelCount] |
| The random-mode marker direction per panel. | |
| CGRect | musicBarRect |
| The result-screen music-bar rectangle. | |
| 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 * | texReady0 |
| The first ready/go atlas texture. | |
| Texture2D * | texReady1 |
| The second ready/go atlas texture. | |
| Texture2D * | texFront |
| The front atlas texture: the field, buttons, and lines. | |
| Texture2D * | texMarker |
| The marker atlas texture. | |
| Texture2D * | texHoldMarker |
| The hold-marker atlas texture. | |
| Texture2D * | texCombo |
| The combo-number atlas texture. | |
| Texture2D * | texResult |
| The result-screen atlas texture. | |
| Texture2D * | texResultBg |
| The result-screen background atlas texture. | |
| Texture2D * | texBeatBg |
| The knit beat-background atlas texture. | |
| Texture2D * | texDebugFont |
| The debug-font glyph sheet. | |
| AVAudioPlayer * | sePlayerGo |
| The pre-loaded "GO" voice player, prepared on entry to the ready-go state. | |
| NSMutableArray< Texture2D * > * | texWaveAr |
| The six knit wave-layer atlas textures. | |
| UpperBGKnit * | upperBgKnt |
| The knit upper-background wave decoration. | |
| EffectBgKnit * | effectBgKnt |
| A knit background effect sprite. | |
| NSMutableArray< EffectBgKnit * > * | arrayBgEff |
| The live knit background effect sprites. | |
| 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 pad in-game renderer.
| - (double) buttonAreaOffset |
The vertical offset of the button area, in points.
Always zero for the knit pad.
Reimplemented from MainGameRenderer.
| - (void) dealloc |
Releases the session textures, then chains to the superclass deallocation.
| - (void) draw |
Draws one frame, dispatching on the render state and flushing every atlas.
Reimplemented from MainGameRenderer.
| - (void) drawClip: | (int) | clip | |
| drawPosition: | (CGPoint) | drawPosition | |
| drawArea: | (CGRect) | drawArea | |
| alpha: | (float) | alpha |
Draws a clipped sprite: appends a quad drawing sprite clip into drawArea , clipped to drawPosition , skipping the draw entirely when nothing is visible.
| clip | The sprite index. |
| drawPosition | The clip window's top-left corner. |
| drawArea | The destination rectangle before clipping. |
| alpha | The opacity. |
| - (void) drawDebugText: | (nullable const char *) | text | |
| pos: | (CGPoint) | pos | |
| alpha: | (float) | alpha |
Draws debug text glyph-by-glyph from the debug-font sheet.
| text | The C string to draw. |
| pos | The top-left position to draw it at. |
| alpha | The opacity. |
Reimplemented from MainGameRenderer.
| - (double) durationOfReadyGo |
The ready-go countdown duration, in seconds.
Reimplemented from MainGameRenderer.
| - (void) endResult |
Ends the result screen: in the result state sets the finished sub-state.
Reimplemented from MainGameRenderer.
| - (double) gameAreaOffset |
The vertical offset of the game area, in points.
Reimplemented from MainGameRenderer.
| - (CGRect) getMusicBarRect |
The rectangle of the result-screen music bar.
Reimplemented from MainGameRenderer.
| - (instancetype) init |
Initialises the knit pad renderer: chains to the superclass, then builds the empty effect-sprite array, the knit upper-background decoration, and its wave geometry.
nil. Reimplemented from MainGameRenderer.
| - (void) loadResultTex: | (short) | rank |
Loads the result-screen atlas and result-background atlas, sets the result clip rect, and blits the per-rank end-mark graphic.
| rank | The score rank tier; ranks 0..7 select a per-rank end-mark resource. |
| - (void) loadTexure: | (nullable RendererConf *) | conf | |
| artwork: | (nullable UIImage *) | artwork | |
| index: | (nullable UIImage *) | index |
Loads the knit pad session atlases: the debug font, the six wave layers, the beat background, the ready/go textures, the front, marker, hold-marker and combo atlases, and the tune-info blits.
The selector spelling loadTexure: (a missing "t") is the binary's.
| conf | The renderer configuration describing the tune, difficulty, and marker. |
| artwork | The jacket artwork image. |
| index | An additional texture image the renderer composites in. |
Reimplemented from MainGameRenderer.
| - (void) releaseTexture |
| - (void) renderBG |
Draws the knit beat background, schedules and advances the knit burst effects, and draws the active effect sprites.
| - (void) renderButtons |
Draws the 4x4 on-screen button grid, lighting pressed buttons.
| - (BOOL) renderCleared: | (unsigned int) | animFrame |
Draws the cleared result graphic.
| animFrame | The animation frame counter. |
| - (void) renderCombo: | (unsigned int) | combo | |
| alpha: | (float) | alpha |
Draws the combo counter and its cut-in burst.
| combo | The current combo count. |
| alpha | The opacity. |
| - (BOOL) renderExcellent: | (unsigned int) | animFrame |
Draws the excellent (perfect-score) result flourish.
| animFrame | The animation frame counter. |
| - (BOOL) renderFailed: | (unsigned int) | animFrame |
Draws the failed result graphic.
| animFrame | The animation frame counter. |
| - (void) renderFinish |
Draws the finish banner and, once done, loads the result texture off-thread.
| - (void) renderFullcombo: | (int) | animFrame | |
| isResult: | (BOOL) | isResult |
Draws the full-combo flourish.
| animFrame | The animation frame counter. |
| isResult | Whether the flourish is drawn on the result screen (which offsets the frame). |
| - (void) renderMarker |
Draws the 4x4 marker grid, the hold markers, and the first-marker highlight.
| - (void) renderMusicBar: | (CGPoint) | pos | |
| timeline: | (BOOL) | timeline | |
| alpha: | (double) | alpha |
Draws the result-screen music bar and its per-note markers.
| pos | The bar's top-left corner. |
| timeline | Whether the play head is drawn. |
| alpha | The opacity. |
| - (void) renderPartnerScore: | (unsigned int) | score | |
| atPoint: | (CGPoint) | point | |
| scale: | (double) | scale | |
| alpha: | (double) | alpha |
Draws the partner's score row during a session play.
| score | The partner's score. |
| point | The top-left anchor. |
| scale | The horizontal scale. |
| alpha | The opacity. |
| - (void) renderPreStart |
Draws the pre-start intro: the background, upper region, tune info, score, music bar, and buttons cued in over frames.
| - (void) renderRating: | (unsigned int) | animFrame |
Draws the rank rating graphic.
| animFrame | The animation frame counter. |
| - (void) renderReadyGo |
Draws the ready/go countdown.
| - (void) renderResult |
Draws the result screen: the flourish, the score, the rating, the new-record banner, and the action marks.
| - (void) renderScore: | (unsigned int) | score | |
| atPoint: | (CGPoint) | point | |
| alpha: | (double) | alpha |
Draws the running score, tweening the shown value toward the target.
| score | The player's score. |
| point | The top-left anchor. |
| alpha | The opacity. |
| - (void) renderShutter: | (BOOL) | animate |
Draws the beat-background shutter bars, tweening the shutter-open amount.
| animate | Whether the shutter-open amount is advanced this frame. |
| - (void) renderStartMark: | (float) | alpha |
Draws the start-mark intro: each first-marker panel's clipped frame glyphs and its centre glyph, animating in and advancing startMarkFrame .
| alpha | The overall opacity multiplier. |
| - (void) renderTuneInfo: | (CGPoint) | pos | |
| artworkSize: | (double) | artworkSize | |
| alpha: | (double) | alpha |
Draws the tune-info panel: the jacket artwork, the tune name, and the difficulty and level.
| pos | The panel's top-left corner. |
| artworkSize | The jacket artwork edge length. |
| alpha | The opacity. |
| - (void) renderUpdatedScore: | (unsigned int) | score | |
| atPoint: | (CGPoint) | point | |
| alpha: | (double) | alpha |
Draws the score digits animating up from a previous value (the new-record score).
| score | The target score. |
| point | The top-left anchor. |
| alpha | The opacity. |
| - (void) renderUpper |
Draws the upper region: the tune-info panel, the music bar, the score, and the partner score.
| - (void) renderUpperBG: | (BOOL) | isResult |
Advances and draws the knit upper background: triggers a wave rise under each held button, then renders the wave layers.
| isResult | Whether a result is being shown. |
| - (void) replayEnd |
Ends a replay, clearing the replay-playing flag.
Reimplemented from MainGameRenderer.
| - (void) replaySelect |
Selects a replay: for a downloaded custom tune with music, arms the replay, reloads the start mark, and fades the good-job overlay out.
Reimplemented from MainGameRenderer.
| - (void) setState: | (unsigned int) | state |
Sets the render state, resetting per-state counters and, in the ready-go and result states, preparing the go voice player and result BGM.
| state | The high-level render state. |
| - (void) startPlay |
Begins playback: moves to state 3 and clears the go voice player.
Reimplemented from MainGameRenderer.
|
readwritenonatomicstrong |
The live knit background effect sprites.
|
readwritenonatomicstrong |
A knit background effect sprite.
|
readnonatomicassign |
The button identifier for the end action.
|
readnonatomicassign |
The button identifier for the evaluate action.
|
readnonatomicassign |
The button identifier for the good-job action.
|
readnonatomicassign |
The centre position of the good-job overlay, derived from goodJobButtonID .
|
readwritenonatomicstrong |
The pre-loaded "GO" voice player, prepared on entry to the ready-go state.
|
readnonatomicassign |
The position of the store-move button, derived from storeMoveButtonID .
|
readnonatomicassign |
The button identifier for the store-move action.
|
readwritenonatomicstrong |
The knit beat-background atlas texture.
|
readwritenonatomicstrong |
The combo-number atlas texture.
|
readwritenonatomicstrong |
The debug-font glyph sheet.
|
readwritenonatomicstrong |
The front atlas texture: the field, buttons, and lines.
|
readwritenonatomicstrong |
The hold-marker atlas texture.
|
readwritenonatomicstrong |
The marker atlas texture.
|
readwritenonatomicstrong |
The first ready/go atlas texture.
|
readwritenonatomicstrong |
The second ready/go atlas texture.
|
readwritenonatomicstrong |
The result-screen atlas texture.
|
readwritenonatomicstrong |
The result-screen background atlas texture.
|
readwritenonatomicstrong |
The six knit wave-layer atlas textures.
|
readnonatomicassign |
The position of the tweet-send button, derived from twitterSendButtonID .
|
readnonatomicassign |
The button identifier for the tweet-send action.
|
readwritenonatomicstrong |
The knit upper-background wave decoration.