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

A four-line knit wave drawn across the upper background. More...

#include <UpperBGKnit.h>

Inheritance diagram for UpperBGKnit:
Collaboration diagram for UpperBGKnit:

Instance Methods

(instancetype) - init
 Builds the empty decoration.
(void) - initBg:waveBottom:waveTop:pulseHeight:isPad:
 Sets up the geometry, palette, and precomputed wave tables.
(void) - pulseUpdate:isResult:
 Advances the plug-in pulse tables and eases the baseline towards its target.
(void) - renderUpperBg:tension:isResult:
 Draws the four wave lines and the background fill into the given layers.
(void) - riseUp:riseColumn:
 Triggers a rise pulse in every column at one row.
(void) - commitBg:
 Commits all six drawing layers, from front to back.
(void) - setDeg:
 Sets the tilt angle applied to the waves.
(void) - addAccelerated:
 Sets the acceleration amount.
(void) - plugWave:
 Starts or extends a plug-in wave pulse when the value crosses the threshold.

Detailed Description

A four-line knit wave drawn across the upper background.

Method Documentation

◆ addAccelerated:

- (void) addAccelerated: (float) accelerated

Sets the acceleration amount.

Parameters
acceleratedThe acceleration.
Ghidra address:
0x194efc
Ghidra address:
0x194efc

◆ commitBg:

- (void) commitBg: (NSArray<Texture2D *> *) layers

Commits all six drawing layers, from front to back.

Parameters
layersThe six Texture2D drawing layers, indexed 0 to 5.
Ghidra address:
0x194d94
Ghidra address:
0x194d94

◆ init

- (instancetype) init

Builds the empty decoration.

Returns
The initialised object.
Ghidra address:
0x193e38
Ghidra address:
0x193e38

◆ initBg:waveBottom:waveTop:pulseHeight:isPad:

- (void) initBg: (CGRect) bg
waveBottom: (float) waveBottom
waveTop: (float) waveTop
pulseHeight: (float) pulseHeight
isPad: (BOOL) isPad 

Sets up the geometry, palette, and precomputed wave tables.

Fetches the base, line, and wave colours from the shared KnitColorManager, records the draw area (widened by two points), and fills the four wave tables and the pulse table. Whether the waves are drawn as rectangles or sine curves comes from JubeatAppDelegate.isRectangleWave .

Parameters
bgThe rectangle the knit is drawn into.
waveBottomThe baseline the waves sit on.
waveTopThe height above the baseline the waves rise to.
pulseHeightThe wave amplitude.
isPadWhether the device is an iPad, which doubles the scroll speed.
Ghidra address:
0x193e70
Ghidra address:
0x193e70

◆ plugWave:

- (void) plugWave: (float) value

Starts or extends a plug-in wave pulse when the value crosses the threshold.

Parameters
valueThe plug amount; a pulse starts only at or above pi/16 .
Ghidra address:
0x194f0c
Ghidra address:
0x194f0c

◆ pulseUpdate:isResult:

- (void) pulseUpdate: (int) tension
isResult: (BOOL) isResult 

Advances the plug-in pulse tables and eases the baseline towards its target.

Clears the accumulated pulse buffer and rebuilds it from every active rise, decaying each rise's timer. Then moves wavePosY towards pushWaveHeight : gently while playing, or with a fixed approach factor while showing a result.

Parameters
tensionThe current tension, which biases the resting baseline while playing.
isResultWhether a result is being shown, which selects the faster approach.
Ghidra address:
0x1943b0
Ghidra address:
0x1943b0

◆ renderUpperBg:tension:isResult:

- (void) renderUpperBg: (NSArray<Texture2D *> *) layers
tension: (int) tension
isResult: (BOOL) isResult 

Draws the four wave lines and the background fill into the given layers.

Parameters
layersThe six Texture2D drawing layers, indexed 0 to 5.
tensionThe current tension, forwarded to -pulseUpdate:isResult: .
isResultWhether a result is being shown, forwarded to -pulseUpdate:isResult: .
Ghidra address:
0x19467c
Ghidra address:
0x19467c

◆ riseUp:riseColumn:

- (void) riseUp: (int) row
riseColumn: (int) riseColumn 

Triggers a rise pulse in every column at one row.

The first argument only selects the column whose existing pulse is tested; when that cell is clear the pulse is started in all four columns at row riseColumn .

Parameters
rowThe column tested before starting the pulse.
riseColumnThe row the pulse is started at, across all columns.
Ghidra address:
0x194d38
Ghidra address:
0x194d38

◆ setDeg:

- (void) setDeg: (float) deg

Sets the tilt angle applied to the waves.

Parameters
degThe tilt, in the units the wave maths expects.
Ghidra address:
0x194eec
Ghidra address:
0x194eec

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