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

The phone-idiom concrete edit-mode note renderer. More...

#include <EditNoteRendererPhone.h>

Inheritance diagram for EditNoteRendererPhone:
Collaboration diagram for EditNoteRendererPhone:

Instance Methods

(instancetype) - init
 Initialises the renderer, building an empty background-effect array and caching the phone-retina flag.
(void) - loadTexure:artwork:index:
 Loads every edit-session texture and sound: the debug font, the knit beat background and its two colour variants, the ready and go textures, the front atlas (with the level, start, and end marks and the note markers unzipped from the marker archive), the jacket artwork, and the index image.
(void) - releaseTexture
 Releases the debug-font, ready, front, and beat-background textures.
(void) - setState:
 Sets the high-level render state, resetting the per-frame counters and preparing the state's audio (loading the go sound for the ready state and the result BGM for the result state).
(void) - startPlay
 Enters the ready state and clears the go-sound player.
(void) - endResult
 Marks the session finished when it is in the result state.
(void) - drawClip:drawPosition:drawArea:alpha:
 Draws one clipped note chip from the front atlas, clamping the chip to the draw area.
(void) - renderMarker
 Draws the five beat-background shutter columns, top and bottom halves, sliding by the shutter-open animation.
(void) - renderShutter:
 Advances and draws the shutter animation across the five beat-background columns.
(void) - renderCombo:alpha:
 Records the combo count for the next frame.
(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.
(void) - renderUpper
 Draws the upper region: the tune information and the (optionally live) music bar.
(void) - renderButtons
 Draws the 4x4 button grid, highlighting pressed panels.
(void) - renderPreStart
 Draws the pre-start intro: shutter, sliding tune information, fading music bar, and buttons, playing the start sound and advancing the sub-state at the end of the intro.
(void) - renderReadyGo
 Draws the ready/go countdown, playing the ready and go sounds on their frames and finishing the sub-state when the countdown ends.
(void) - renderFullcombo:isResult:
 Draws the full-combo banner, sliding and squashing over the animation and playing the full-combo sounds on the result variant.
(void) - renderFinish
 Draws the finish region.
(double) - buttonAreaOffset
 The vertical offset of the button area, in points.
(void) - draw
 Draws the whole edit 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.
(CGRect) - getTimeLineRect
 The rectangle of the edit timeline, in phone points.
Instance Methods inherited from EditNoteRenderer
(void) - resetCurrentTime
 Resets the edit playback to the current time.
(void) - saveBaseScale
 Saves the base scale for the edit view.
(CGRect) - getAreaSelectStart
 The rectangle of the area-selection start handle.
(CGRect) - getAreaSelectEnd
 The rectangle of the area-selection end handle.
(int) - pos2sector:
 Converts a horizontal position to a sector index.
(int) - sector2pos:
 Converts a sector index to a horizontal position.
(int) - dot2sector:
 Converts a dot index to a sector index.
(void) - setDbs:
 Sets the decibel scale for the edit waveform display.

Protected Attributes

BOOL isRetina
 Cached phone-retina 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.
float lastHakuPhase
 The beat phase as of the last frame.
unsigned int effFrame
 The knit-effect animation frame.
unsigned int effSlot
 The next knit-effect slot to fill.
float bounceEnergy
 The residual bounce energy of the beat effect.
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 * texReady0
 The ready-countdown texture.
Texture2D * texReady1
 The go-countdown texture.
Texture2D * texFront
 The front atlas: chips, buttons, level, marks, and tune information.
Texture2D * texMarker
 The note-marker atlas, unzipped from the marker archive.
Texture2D * texBeatBg
 The knit beat-background atlas.
Texture2D * texDebugFont
 The debug-font atlas.
AVAudioPlayer * sePlayerGo
 The go-sound player, prepared lazily when the ready state is entered.
EffectBgKnit * effectBgKnt
 The current knit background effect.
NSMutableArray * arrayBgEff
 The array of active knit background effects.
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 phone-idiom concrete edit-mode note renderer.

Method Documentation

◆ buttonAreaOffset

- (double) buttonAreaOffset

The vertical offset of the button area, in points.

Returns 0 for the phone.

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

Reimplemented from EditNoteRenderer.

◆ draw

- (void) draw

Draws the whole edit frame, dispatching on the state to the render methods and flushing every texture atlas.

Ghidra address:
0x211eb4

Reimplemented from EditNoteRenderer.

◆ drawClip:drawPosition:drawArea:alpha:

- (void) drawClip: (int) drawIndex
drawPosition: (CGPoint) drawPosition
drawArea: (CGRect) drawArea
alpha: (float) alpha 

Draws one clipped note chip from the front atlas, clamping the chip to the draw area.

Parameters
drawIndexThe sprite index in the front atlas.
drawPositionThe chip's origin.
drawAreaThe clip rectangle the chip is confined to.
alphaThe opacity.
Ghidra address:
0x210234
Ghidra address:
0x210234

◆ drawDebugText:pos:alpha:

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

Parameters
textThe C string to draw.
posThe starting position.
alphaThe opacity.
Ghidra address:
0x212158

Reimplemented from EditNoteRenderer.

◆ endResult

- (void) endResult

Marks the session finished when it is in the result state.

Ghidra address:
0x2101e8

Reimplemented from EditNoteRenderer.

◆ getTimeLineRect

- (CGRect) getTimeLineRect

The rectangle of the edit timeline, in phone points.

Returns
The timeline rectangle.
Ghidra address:
0x212310
Ghidra address:
0x212310

Reimplemented from EditNoteRenderer.

◆ init

- (instancetype) init

Initialises the renderer, building an empty background-effect array and caching the phone-retina flag.

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

Reimplemented from EditNoteRenderer.

◆ loadTexure:artwork:index:

- (void) loadTexure: (nullable EditRendererConf *) conf
artwork: (nullable UIImage *) artwork
index: (nullable UIImage *) index 

Loads every edit-session texture and sound: the debug font, the knit beat background and its two colour variants, the ready and go textures, the front atlas (with the level, start, and end marks and the note markers unzipped from the marker archive), the jacket artwork, and the index image.

The selector spelling loadTexure: is the binary's own.

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

Reimplemented from EditNoteRenderer.

◆ releaseTexture

- (void) releaseTexture

Releases the debug-font, ready, front, and beat-background textures.

It does not release the note-marker texture, matching the binary.

Ghidra address:
0x20fdf4
Ghidra address:
0x20fdf4

Reimplemented from EditNoteRenderer.

◆ renderButtons

- (void) renderButtons

Draws the 4x4 button grid, highlighting pressed panels.

Ghidra address:
0x210e5c

◆ renderCombo:alpha:

- (void) renderCombo: (unsigned int) combo
alpha: (float) alpha 

Records the combo count for the next frame.

This phone override draws nothing else.

Parameters
comboThe current combo count.
alphaThe opacity.
Ghidra address:
0x210788
Ghidra address:
0x210788

◆ renderFinish

- (void) renderFinish

Draws the finish region.

This phone override does nothing.

Ghidra address:
0x211ea0
Ghidra address:
0x211ea0

◆ renderFullcombo:isResult:

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

Draws the full-combo banner, sliding and squashing over the animation and playing the full-combo sounds on the result variant.

Parameters
frameArgThe animation frame.
isResultWhether the result variant (offset by the intro length) is drawn.
Ghidra address:
0x211978
Ghidra address:
0x211978

◆ renderMarker

- (void) renderMarker

Draws the five beat-background shutter columns, top and bottom halves, sliding by the shutter-open animation.

Ghidra address:
0x210438

◆ renderMusicBar:timeline:alpha:

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

Parameters
positionThe bar's origin.
timelineWhether to draw the timeline cursor.
alphaThe opacity.
Ghidra address:
0x21079c
Ghidra address:
0x21079c

◆ renderPreStart

- (void) renderPreStart

Draws the pre-start intro: shutter, sliding tune information, fading music bar, and buttons, playing the start sound and advancing the sub-state at the end of the intro.

Ghidra address:
0x210fe8

◆ renderReadyGo

- (void) renderReadyGo

Draws the ready/go countdown, playing the ready and go sounds on their frames and finishing the sub-state when the countdown ends.

Ghidra address:
0x21114c

◆ renderShutter:

- (void) renderShutter: (BOOL) animate

Advances and draws the shutter animation across the five beat-background columns.

Parameters
animateWhether to advance the shutter-open value this frame.
Ghidra address:
0x210594
Ghidra address:
0x210594

◆ renderTuneInfo:artworkSize:alpha:

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

Draws the tune information block: jacket, title, difficulty word, and level.

Parameters
positionThe block's origin.
artworkSizeThe jacket's square size.
alphaThe opacity.
Ghidra address:
0x210b48
Ghidra address:
0x210b48

◆ renderUpper

- (void) renderUpper

Draws the upper region: the tune information and the (optionally live) music bar.

Ghidra address:
0x210de0

◆ renderUpperBG:

- (void) renderUpperBG: (BOOL) arg

Draws the upper background.

This phone override does nothing.

Parameters
argUnused.
Ghidra address:
0x210ddc
Ghidra address:
0x210ddc

◆ setState:

- (void) setState: (unsigned int) state

Sets the high-level render state, resetting the per-frame counters and preparing the state's audio (loading the go sound for the ready state and the result BGM for the result state).

Parameters
stateThe state to enter.
Ghidra address:
0x20fe6c
Ghidra address:
0x20fe6c

◆ startPlay

- (void) startPlay

Enters the ready state and clears the go-sound player.

Ghidra address:
0x2101ac

Reimplemented from EditNoteRenderer.

Property Documentation

◆ arrayBgEff

- (NSMutableArray*) arrayBgEff
readwritenonatomicstrong

The array of active knit background effects.

Ghidra address:
0x212450 (getter), 0x212460 (setter)

◆ endButtonID

- (unsigned int) endButtonID
readnonatomicassign

The button identifier for the end action.

Returns 15 for the phone.

Ghidra address:
0x211eac
Ghidra address:
0x211eac

◆ texBeatBg

- (Texture2D*) texBeatBg
readwritenonatomicstrong

The knit beat-background atlas.

Ghidra address:
0x2123c0 (getter), 0x2123d0 (setter)

◆ texReady0

- (Texture2D*) texReady0
readwritenonatomicstrong

The ready-countdown texture.

Ghidra address:
0x212330 (getter), 0x212340 (setter)

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