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

The pad edit-mode note renderer. More...

#include <EditNoteRendererPad.h>

Inheritance diagram for EditNoteRendererPad:
Collaboration diagram for EditNoteRendererPad:

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.

Detailed Description

The pad edit-mode note renderer.

Method Documentation

◆ buttonAreaOffset

- (double) buttonAreaOffset

The vertical offset of the button area.

This override returns 0.

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

Reimplemented from EditNoteRenderer.

◆ dealloc

- (void) dealloc

Deletes the atlas textures, then chains to the superclass deallocation.

Ghidra address:
0x20e8a8

◆ dot2sector:

- (int) dot2sector: (int) dot

Converts a dot count to a sector count: dot * dotBySec .

Parameters
dotThe dot count.
Returns
The sector count.
Ghidra address:
0x20caec
Ghidra address:
0x20caec

Reimplemented from EditNoteRenderer.

◆ draw

- (void) draw

Draws one frame, dispatching on the render state and flushing both atlases.

Ghidra address:
0x20e4dc

Reimplemented from EditNoteRenderer.

◆ drawClip:drawPosition:drawArea:alpha:

- (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 .

Parameters
clipThe sprite index.
drawPositionThe top-left corner to draw at.
drawAreaThe clip rectangle the sprite is trimmed to.
alphaThe opacity multiplier.
Ghidra address:
0x20c194
Ghidra address:
0x20c194

◆ drawDebugText:pos:alpha:

- (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.

Parameters
textThe C string to draw.
posThe top-left position to draw it at.
alphaThe opacity, multiplied by baseAlpha .
Ghidra address:
0x20e728

Reimplemented from EditNoteRenderer.

◆ endResult

- (void) endResult

Ends the result screen: in state 5 sets the finished sub-state.

Ghidra address:
0x20c114

Reimplemented from EditNoteRenderer.

◆ getAreaSelectEnd

- (CGRect) getAreaSelectEnd

The rectangle of the area-selection end handle.

Returns
The selection-end rectangle.
Ghidra address:
0x20cc28
Ghidra address:
0x20cc28
Ghidra address:
0x294410 (y), 0x28f2c8 (size)

Reimplemented from EditNoteRenderer.

◆ getAreaSelectStart

- (CGRect) getAreaSelectStart

The rectangle of the area-selection start handle.

Returns
The selection-start rectangle.
Ghidra address:
0x20cba8
Ghidra address:
0x20cba8
Ghidra address:
0x294410 (y), 0x28f2c8 (size)

Reimplemented from EditNoteRenderer.

◆ getTimeLineRect

- (CGRect) getTimeLineRect

The rectangle of the edit timeline scrubber.

Returns
The timeline rectangle, {84, 208, 600, 43} .
Ghidra address:
0x20e8f8
Ghidra address:
0x20e8f8
Ghidra address:
0x292e58 (x), 0x2929f0 (y), 0x291c30 (width), 0x291de0 (height)

Reimplemented from EditNoteRenderer.

◆ init

- (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.

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

Reimplemented from EditNoteRenderer.

◆ loadTexure:artwork:index:

- (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.

Parameters
confThe edit renderer configuration.
artworkThe jacket artwork image.
indexAn additional texture image.
Ghidra address:
0x20b2b4

Reimplemented from EditNoteRenderer.

◆ pos2sector:

- (int) pos2sector: (int) pos

Converts a horizontal position to a sector: currentSector + (pos - 100) * dotBySec .

Parameters
posThe position, in points.
Returns
The sector.
Ghidra address:
0x20cb08
Ghidra address:
0x20cb08

Reimplemented from EditNoteRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases the debug-font, front, and chip atlas textures.

Ghidra address:
0x20bd90

Reimplemented from EditNoteRenderer.

◆ renderBaseLine:lineType:alpha:

- (void) renderBaseLine: (float) posX
lineType: (int) lineType
alpha: (float) alpha 

Draws one horizontal grid line of the given kind at a position.

Parameters
posXThe line's horizontal position.
lineTypeThe line kind, 0..4.
alphaThe opacity.
Ghidra address:
0x20ce30
Ghidra address:
0x20ce30
Ghidra address:
0x28f5f0 (78)
Ghidra address:
0x292488 (76)

◆ renderBG

- (void) renderBG

Draws the beat-pulsing background layers and the four side rails.

Ghidra address:
0x20c550
Ghidra address:
0x28f750 (x=128), 0x292470 (y=384), 0x292550 (768), 0x292abc (1/512), 0x291d80 (anchor.y=640)
Ghidra address:
0x28e030 (256), 0x28fa00 (192), 0x292460 (768), 0x292470 (384), 0x291d88 (576)
Ghidra address:
0x294408 (535)

◆ renderButtonLight:atPoint:

- (void) renderButtonLight: (int) lightType
atPoint: (CGPoint) point 

Draws one button-light sprite at a point.

Parameters
lightTypeThe light sprite index.
pointThe point to draw it at.
Ghidra address:
0x20e08c
Ghidra address:
0x20e08c

◆ renderButtons

- (void) renderButtons

Draws the 4x4 button grid, lighting pressed enabled buttons.

Ghidra address:
0x20e0ec

◆ renderFinish

- (void) renderFinish

Draws the finish effect.

This override is empty.

Ghidra address:
0x20e414
Ghidra address:
0x20e414

◆ renderFullcombo:isResult:

- (void) renderFullcombo: (int) combo
isResult: (BOOL) isResult 

Draws the full-combo effect.

This override is empty.

Parameters
comboThe combo count.
isResultWhether the result screen is showing.
Ghidra address:
0x20e410
Ghidra address:
0x20e410

◆ renderMarker

- (void) renderMarker

Draws the per-panel markers of the 4x4 grid and their conflict lights.

Ghidra address:
0x20c378

◆ renderMeasureNum:posX:alpha:

- (void) renderMeasureNum: (int) measure
posX: (float) posX
alpha: (float) alpha 

Draws a measure number to the left of a position, as its decimal digits.

Parameters
measureThe measure number; -1 and 0 draw dedicated glyphs.
posXThe horizontal anchor.
alphaThe opacity.
Ghidra address:
0x20cf2c
Ghidra address:
0x20cf2c
Ghidra address:
0x291bd0 (180)

◆ renderMusicBar:timeline:alpha:

- (void) renderMusicBar: (CGPoint) pos
timeline: (BOOL) timeline
alpha: (double) alpha 

Draws the timeline scrubber: the bar, its 120 note markers, and the play head.

Parameters
posThe scrubber's top-left corner.
timelineWhether the play head is drawn.
alphaThe opacity, multiplied by baseAlpha .
Ghidra address:
0x20c814
Ghidra address:
0x20c814
Ghidra address:
0x292488 (76-point inset)
Ghidra address:
0x291c3c (600), 0x28fa28 (74), 0x28f6b0 (197)

◆ renderNoteChip:keyIndex:uniType:alpha:

- (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.

Parameters
posXThe chip's horizontal position, in sectors.
keyIndexThe 0..15 panel index selecting the chip's row and column.
uniTypeThe chip variant; 1 selects the transposed texture orientation.
alphaThe opacity.
Ghidra address:
0x20cca8
Ghidra address:
0x20cca8
Ghidra address:
0x28e0b0 (g_flComboFadeBase, 0.3)

◆ renderPastLine:

- (void) renderPastLine: (float) alpha

Draws the paste-preview line and its parts when a start but no end sector is selected.

Parameters
alphaThe opacity.
Ghidra address:
0x20d3d8
Ghidra address:
0x20d3d8

◆ renderPreStart

- (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.

Ghidra address:
0x20e234
Ghidra address:
0x292ae4 (38), 0x28f438 (160)
Ghidra address:
0x2929f0 (208)

◆ renderSelectArea:

- (void) renderSelectArea: (float) alpha

Draws the current area selection: its fill, its two boundary lines, and its two handles.

Parameters
alphaThe opacity.
Ghidra address:
0x20d1b4
Ghidra address:
0x20d1b4
Ghidra address:
0x28f3b8 (0.6), 0x28f3f8 (80), 0x28f908 (96)
Ghidra address:
0x291cf8 (178)

◆ renderSequenceChip:

- (void) renderSequenceChip: (float) alpha

Draws the visible run of the sequence: the field grid, the on-screen events, and lines.

Parameters
alphaThe opacity.
Ghidra address:
0x20d838
Ghidra address:
0x20d838
Ghidra address:
0x2934a4 (-100)
Ghidra address:
0x28f5f0 (78), 0x28e038 (176)

◆ renderSequenceParts:event:basePos:uniType:alpha:

- (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.

Parameters
indexThe event's index in event .
eventThe sequence event table.
basePosThe base position offset, in sectors.
uniTypeThe chip variant for note events.
alphaThe opacity.
Ghidra address:
0x20d560
Ghidra address:
0x20d560

◆ renderShutter:

- (void) renderShutter: (BOOL) open

Draws the shutter overlay.

This override is empty.

Parameters
openWhether the shutter is open.
Ghidra address:
0x20c810
Ghidra address:
0x20c810

◆ renderTuneInfo:artworkSize:alpha:

- (void) renderTuneInfo: (CGPoint) pos
artworkSize: (double) artworkSize
alpha: (double) alpha 

Draws the tune information panel.

This override is empty.

Parameters
posThe panel position.
artworkSizeThe jacket artwork size.
alphaThe opacity.
Ghidra address:
0x20de50
Ghidra address:
0x20de50

◆ renderUpper

- (void) renderUpper

Draws the upper region: the timeline (with play head when playing) and the sequence.

Ghidra address:
0x20e020
Ghidra address:
0x2929f0 (208)

◆ renderUpperBG:

- (void) renderUpperBG: (float) alpha

Draws the upper background frame, its divider, and the clap indicator.

Parameters
alphaThe opacity.
Ghidra address:
0x20de54
Ghidra address:
0x20de54
Ghidra address:
0x28f5f0 (78)
Ghidra address:
0x291cf8 (178)
Ghidra address:
0x294418 (306)

◆ resetCurrentTime

- (void) resetCurrentTime

Snaps the metronome clap sector to the current cursor sector.

Ghidra address:
0x20c160

Reimplemented from EditNoteRenderer.

◆ saveBaseScale

- (void) saveBaseScale

Saves the current grid zoom as the base zoom.

Ghidra address:
0x20e4c0

Reimplemented from EditNoteRenderer.

◆ sector2pos:

- (int) sector2pos: (int) sector

Converts a sector to a horizontal position: (sector - currentSector) / dotBySec + 100 .

Parameters
sectorThe sector.
Returns
The position, in points.
Ghidra address:
0x20cb54
Ghidra address:
0x20cb54

Reimplemented from EditNoteRenderer.

◆ setDbs:

- (void) setDbs: (float) dbs

Sets the decibel scale, updating the grid zoom and conflict marker.

Parameters
dbsThe decibel scale; the grid zoom is baseScale/dbs clamped to 0.2..1.0.
Ghidra address:
0x20e428
Ghidra address:
0x20e428

Reimplemented from EditNoteRenderer.

◆ setState:

- (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.

Parameters
stateThe high-level render state.
Ghidra address:
0x20bde0
Ghidra address:
0x20bde0

◆ startPlay

- (void) startPlay

Begins playback: moves to state 3 and clears the "go" cue player.

Ghidra address:
0x20c0d8

Reimplemented from EditNoteRenderer.

Property Documentation

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Ghidra address:
0x20e420

◆ sePlayerGo

- (AVAudioPlayer*) sePlayerGo
readwritenonatomicstrong

The "go" cue audio player.

Ghidra address:
0x20e988 (getter), 0x20e998 (setter)

◆ texChip

- (Texture2D*) texChip
readwritenonatomicstrong

The chip atlas texture: the note chips.

Ghidra address:
0x20e940 (getter), 0x20e950 (setter)

◆ texDebugFont

- (Texture2D*) texDebugFont
readwritenonatomicstrong

The debug-font glyph sheet.

Ghidra address:
0x20e964 (getter), 0x20e974 (setter)

◆ texFront

- (Texture2D*) texFront
readwritenonatomicstrong

The front atlas texture: the field, markers, buttons, lines, and digits.

Ghidra address:
0x20e91c (getter), 0x20e92c (setter)

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