|
JubeatPlus 3.9.11
|
The pad edit-mode note renderer. More...
#include <EditNoteRendererPad.h>


Instance Methods | |
| (instancetype) | - init |
| Initialises the pad renderer: opaque, display mode 0, clap enabled, and the grid zoom, base zoom, and pinch backup all set to 1. | |
| (void) | - dealloc |
| Deletes the atlas textures, then chains to the superclass deallocation. | |
| (void) | - loadTexure:artwork:index: |
| Loads the front and chip atlases, the debug-font sheet, and the clap sound effect. | |
| (void) | - releaseTexture |
| Releases the debug-font, front, and chip atlas textures. | |
| (void) | - setState: |
| Resets per-state animation counters and, entering state 2, lazily loads the "go" cue; on state 5 starts the result BGM. | |
| (void) | - startPlay |
| Begins playback: moves to state 3 and clears the "go" cue player. | |
| (void) | - endResult |
| Ends the result screen: in state 5 sets the finished sub-state. | |
| (void) | - resetCurrentTime |
| Snaps the metronome clap sector to the current cursor sector. | |
| (void) | - setDbs: |
| Sets the decibel scale, updating the grid zoom and conflict marker. | |
| (void) | - saveBaseScale |
| Saves the current grid zoom as the base zoom. | |
| (void) | - draw |
| Draws one frame, dispatching on the render state and flushing both atlases. | |
| (void) | - drawClip:drawPosition:drawArea:alpha: |
Draws a clipped sub-rectangle of a sprite: blits only the part of sprite clip drawn at drawPosition that lies inside drawArea , at baseAlpha times alpha . | |
| (void) | - drawDebugText:pos:alpha: |
| Draws debug text glyph-by-glyph from the debug-font sheet, then flushes it. | |
| (CGRect) | - getTimeLineRect |
| The rectangle of the edit timeline scrubber. | |
| (CGRect) | - getAreaSelectStart |
| The rectangle of the area-selection start handle. | |
| (CGRect) | - getAreaSelectEnd |
| The rectangle of the area-selection end handle. | |
| (double) | - buttonAreaOffset |
| The vertical offset of the button area. | |
| (int) | - dot2sector: |
Converts a dot count to a sector count: dot * dotBySec . | |
| (int) | - pos2sector: |
Converts a horizontal position to a sector: currentSector + (pos - 100) * dotBySec . | |
| (int) | - sector2pos: |
Converts a sector to a horizontal position: (sector - currentSector) / dotBySec + 100 . | |
| (void) | - renderBG |
| Draws the beat-pulsing background layers and the four side rails. | |
| (void) | - renderShutter: |
| Draws the shutter overlay. | |
| (void) | - renderMarker |
| Draws the per-panel markers of the 4x4 grid and their conflict lights. | |
| (void) | - renderMusicBar:timeline:alpha: |
| Draws the timeline scrubber: the bar, its 120 note markers, and the play head. | |
| (void) | - renderNoteChip:keyIndex:uniType:alpha: |
| Draws one note chip at a horizontal position from the chip atlas. | |
| (void) | - renderBaseLine:lineType:alpha: |
| Draws one horizontal grid line of the given kind at a position. | |
| (void) | - renderMeasureNum:posX:alpha: |
| Draws a measure number to the left of a position, as its decimal digits. | |
| (void) | - renderSelectArea: |
| Draws the current area selection: its fill, its two boundary lines, and its two handles. | |
| (void) | - renderPastLine: |
| Draws the paste-preview line and its parts when a start but no end sector is selected. | |
| (void) | - renderSequenceParts:event:basePos:uniType:alpha: |
| Draws one sequence event (note, measure line, bpm change, or measure) at a base position. | |
| (void) | - renderSequenceChip: |
| Draws the visible run of the sequence: the field grid, the on-screen events, and lines. | |
| (void) | - renderTuneInfo:artworkSize:alpha: |
| Draws the tune information panel. | |
| (void) | - renderUpperBG: |
| Draws the upper background frame, its divider, and the clap indicator. | |
| (void) | - renderUpper |
| Draws the upper region: the timeline (with play head when playing) and the sequence. | |
| (void) | - renderButtonLight:atPoint: |
| Draws one button-light sprite at a point. | |
| (void) | - renderButtons |
| Draws the 4x4 button grid, lighting pressed enabled buttons. | |
| (void) | - renderPreStart |
| Draws the pre-start intro: the background, upper frame, tune info, timeline, and buttons, cued in over frames, and fires the ready sound on frame 20. | |
| (void) | - renderFullcombo:isResult: |
| Draws the full-combo effect. | |
| (void) | - renderFinish |
| Draws the finish effect. | |
Protected Attributes | |
| unsigned int | frame |
| The frames elapsed in the current state. | |
| unsigned int | subStateChangeFrame |
| The frame the sub-state last changed on. | |
| unsigned int | startMarkFrame |
| The frame the start marker began animating. | |
| unsigned int | effSlot |
| The active effect slot. | |
| float | lastHakuPhase |
| The beat (haku) phase as of the last frame. | |
| float | bounceEnergy |
| The residual bounce animation energy. | |
| float | baseAlpha |
| The overall draw opacity. | |
| float | modeCnt |
| The display-mode cross-fade counter, 0..10. | |
| float | dotBySec |
| Dots per sector: the grid zoom factor. | |
| float | baseScale |
| The saved base zoom, restored on pinch end. | |
| float | pinchScaleBak |
| The zoom saved when a pinch gesture began. | |
| int | conflictDot |
| The conflict marker position, in dots. | |
| int | clapSector |
| The sector the metronome last clapped on. | |
| NSData * | clapSe |
| The metronome clap sound-effect data. | |
| Protected Attributes inherited from EditNoteRenderer | |
| 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 [kEditNoteGridPanelCount] |
| Per-panel marker animation state. | |
Properties | |
| unsigned int | endButtonID |
| The button identifier for the end action. | |
| Texture2D * | texFront |
| The front atlas texture: the field, markers, buttons, lines, and digits. | |
| Texture2D * | texChip |
| The chip atlas texture: the note chips. | |
| Texture2D * | texDebugFont |
| The debug-font glyph sheet. | |
| AVAudioPlayer * | sePlayerGo |
| The "go" cue audio player. | |
| Properties inherited from EditNoteRenderer | |
| BOOL | isEndState |
| Whether the session has reached its end sub-state. | |
| unsigned int | endButtonID |
| The button identifier for the end action. | |
| unsigned int | goodJobButtonID |
| The button identifier for the good-job action. | |
| unsigned int | levelButtonID |
| The button identifier for the level action. | |
| 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. | |
| 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. | |
| EditRendererConf * | rendererConf |
| The edit renderer configuration for the current session. | |
| EditSequence * | sequence |
| The edit note sequence being played. | |
| EAGLView * | eaglView |
| The GL view this renderer draws into. | |
| BOOL | enableBtn |
| Whether the on-screen edit buttons are enabled. | |
| int | displayMode |
| The edit display mode. | |
| int | currentSector |
| The sector currently under the edit cursor. | |
| int | divMeasure |
| The number of divisions per measure in the edit grid. | |
| int | areaStartSector |
| The first sector of the current area selection, or -1 when none is selected. | |
| int | areaEndSector |
| The last sector of the current area selection, or -1 when none is selected. | |
| BOOL | enableClap |
| Whether the metronome clap is enabled. | |
The pad edit-mode note renderer.
| - (double) buttonAreaOffset |
The vertical offset of the button area.
This override returns 0.
Reimplemented from EditNoteRenderer.
| - (void) dealloc |
Deletes the atlas textures, then chains to the superclass deallocation.
| - (int) dot2sector: | (int) | dot |
Converts a dot count to a sector count: dot * dotBySec .
| dot | The dot count. |
Reimplemented from EditNoteRenderer.
| - (void) draw |
Draws one frame, dispatching on the render state and flushing both atlases.
Reimplemented from EditNoteRenderer.
| - (void) drawClip: | (int) | clip | |
| drawPosition: | (CGPoint) | drawPosition | |
| drawArea: | (CGRect) | drawArea | |
| alpha: | (float) | alpha |
Draws a clipped sub-rectangle of a sprite: blits only the part of sprite clip drawn at drawPosition that lies inside drawArea , at baseAlpha times alpha .
| clip | The sprite index. |
| drawPosition | The top-left corner to draw at. |
| drawArea | The clip rectangle the sprite is trimmed to. |
| alpha | The opacity multiplier. |
| - (void) drawDebugText: | (nullable const char *) | text | |
| pos: | (CGPoint) | pos | |
| alpha: | (float) | alpha |
Draws debug text glyph-by-glyph from the debug-font sheet, then flushes it.
| text | The C string to draw. |
| pos | The top-left position to draw it at. |
| alpha | The opacity, multiplied by baseAlpha . |
Reimplemented from EditNoteRenderer.
| - (void) endResult |
Ends the result screen: in state 5 sets the finished sub-state.
Reimplemented from EditNoteRenderer.
| - (CGRect) getAreaSelectEnd |
The rectangle of the area-selection end handle.
Reimplemented from EditNoteRenderer.
| - (CGRect) getAreaSelectStart |
The rectangle of the area-selection start handle.
Reimplemented from EditNoteRenderer.
| - (CGRect) getTimeLineRect |
The rectangle of the edit timeline scrubber.
{84, 208, 600, 43} . Reimplemented from EditNoteRenderer.
| - (instancetype) init |
Initialises the pad renderer: opaque, display mode 0, clap enabled, and the grid zoom, base zoom, and pinch backup all set to 1.
nil. Reimplemented from EditNoteRenderer.
| - (void) loadTexure: | (nullable EditRendererConf *) | conf | |
| artwork: | (nullable UIImage *) | artwork | |
| index: | (nullable UIImage *) | index |
Loads the front and chip atlases, the debug-font sheet, and the clap sound effect.
Builds the texFront and texChip atlases from their sprite-rect plists, then blits the decrypted marker, hold, key, and background sub-images into them; clamps the configuration's difficulty to 2 and level to 10; and short-circuits when the marker, difficulty, level, and tune of conf already match the loaded configuration. The selector spelling loadTexure: (a missing "t") is the binary's own.
| conf | The edit renderer configuration. |
| artwork | The jacket artwork image. |
| index | An additional texture image. |
Reimplemented from EditNoteRenderer.
| - (int) pos2sector: | (int) | pos |
Converts a horizontal position to a sector: currentSector + (pos - 100) * dotBySec .
| pos | The position, in points. |
Reimplemented from EditNoteRenderer.
| - (void) releaseTexture |
Releases the debug-font, front, and chip atlas textures.
Reimplemented from EditNoteRenderer.
| - (void) renderBaseLine: | (float) | posX | |
| lineType: | (int) | lineType | |
| alpha: | (float) | alpha |
Draws one horizontal grid line of the given kind at a position.
| posX | The line's horizontal position. |
| lineType | The line kind, 0..4. |
| alpha | The opacity. |
| - (void) renderBG |
Draws the beat-pulsing background layers and the four side rails.
| - (void) renderButtonLight: | (int) | lightType | |
| atPoint: | (CGPoint) | point |
Draws one button-light sprite at a point.
| lightType | The light sprite index. |
| point | The point to draw it at. |
| - (void) renderButtons |
Draws the 4x4 button grid, lighting pressed enabled buttons.
| - (void) renderFinish |
Draws the finish effect.
This override is empty.
| - (void) renderFullcombo: | (int) | combo | |
| isResult: | (BOOL) | isResult |
Draws the full-combo effect.
This override is empty.
| combo | The combo count. |
| isResult | Whether the result screen is showing. |
| - (void) renderMarker |
Draws the per-panel markers of the 4x4 grid and their conflict lights.
| - (void) renderMeasureNum: | (int) | measure | |
| posX: | (float) | posX | |
| alpha: | (float) | alpha |
Draws a measure number to the left of a position, as its decimal digits.
| measure | The measure number; -1 and 0 draw dedicated glyphs. |
| posX | The horizontal anchor. |
| alpha | The opacity. |
| - (void) renderMusicBar: | (CGPoint) | pos | |
| timeline: | (BOOL) | timeline | |
| alpha: | (double) | alpha |
Draws the timeline scrubber: the bar, its 120 note markers, and the play head.
| pos | The scrubber's top-left corner. |
| timeline | Whether the play head is drawn. |
| alpha | The opacity, multiplied by baseAlpha . |
| - (void) renderNoteChip: | (float) | posX | |
| keyIndex: | (int) | keyIndex | |
| uniType: | (int) | uniType | |
| alpha: | (float) | alpha |
Draws one note chip at a horizontal position from the chip atlas.
| posX | The chip's horizontal position, in sectors. |
| keyIndex | The 0..15 panel index selecting the chip's row and column. |
| uniType | The chip variant; 1 selects the transposed texture orientation. |
| alpha | The opacity. |
| - (void) renderPastLine: | (float) | alpha |
Draws the paste-preview line and its parts when a start but no end sector is selected.
| alpha | The opacity. |
| - (void) renderPreStart |
Draws the pre-start intro: the background, upper frame, tune info, timeline, and buttons, cued in over frames, and fires the ready sound on frame 20.
| - (void) renderSelectArea: | (float) | alpha |
Draws the current area selection: its fill, its two boundary lines, and its two handles.
| alpha | The opacity. |
| - (void) renderSequenceChip: | (float) | alpha |
Draws the visible run of the sequence: the field grid, the on-screen events, and lines.
| alpha | The opacity. |
| - (void) renderSequenceParts: | (int) | index | |
| event: | (const EditSequenceEvent *) | event | |
| basePos: | (float) | basePos | |
| uniType: | (int) | uniType | |
| alpha: | (float) | alpha |
Draws one sequence event (note, measure line, bpm change, or measure) at a base position.
| index | The event's index in event . |
| event | The sequence event table. |
| basePos | The base position offset, in sectors. |
| uniType | The chip variant for note events. |
| alpha | The opacity. |
| - (void) renderShutter: | (BOOL) | open |
Draws the shutter overlay.
This override is empty.
| open | Whether the shutter is open. |
| - (void) renderTuneInfo: | (CGPoint) | pos | |
| artworkSize: | (double) | artworkSize | |
| alpha: | (double) | alpha |
Draws the tune information panel.
This override is empty.
| pos | The panel position. |
| artworkSize | The jacket artwork size. |
| alpha | The opacity. |
| - (void) renderUpper |
Draws the upper region: the timeline (with play head when playing) and the sequence.
| - (void) renderUpperBG: | (float) | alpha |
Draws the upper background frame, its divider, and the clap indicator.
| alpha | The opacity. |
| - (void) resetCurrentTime |
Snaps the metronome clap sector to the current cursor sector.
Reimplemented from EditNoteRenderer.
| - (void) saveBaseScale |
Saves the current grid zoom as the base zoom.
Reimplemented from EditNoteRenderer.
| - (int) sector2pos: | (int) | sector |
Converts a sector to a horizontal position: (sector - currentSector) / dotBySec + 100 .
| sector | The sector. |
Reimplemented from EditNoteRenderer.
| - (void) setDbs: | (float) | dbs |
Sets the decibel scale, updating the grid zoom and conflict marker.
| dbs | The decibel scale; the grid zoom is baseScale/dbs clamped to 0.2..1.0. |
Reimplemented from EditNoteRenderer.
| - (void) setState: | (unsigned int) | state |
Resets per-state animation counters and, entering state 2, lazily loads the "go" cue; on state 5 starts the result BGM.
| state | The high-level render state. |
| - (void) startPlay |
Begins playback: moves to state 3 and clears the "go" cue player.
Reimplemented from EditNoteRenderer.
|
readnonatomicassign |
The button identifier for the end action.
|
readwritenonatomicstrong |
The "go" cue audio player.
|
readwritenonatomicstrong |
The chip atlas texture: the note chips.
|
readwritenonatomicstrong |
The debug-font glyph sheet.
|
readwritenonatomicstrong |
The front atlas texture: the field, markers, buttons, lines, and digits.