JubeatPlus 3.9.11
Loading...
Searching...
No Matches
combo_display.h File Reference

The combo-number display maths helpers used by MainGameRenderer(Pad)::renderCombo_. More...

#include <CoreGraphics/CGGeometry.h>
Include dependency graph for combo_display.h:

Go to the source code of this file.

Functions

float GetComboScaleByCount (unsigned int dwStep, unsigned int dwDigitCount)
 Looks up the combo-number scale factor for an animation step and digit count.
float GetComboScaleByDigit (unsigned int dwStep, unsigned int dwDigitCount, int nDigitIndex)
 Looks up the combo-number scale factor for one digit position.
int GetComboDigitOffset (int nValue, unsigned int dwDigitCount, int nDigitIndex)
 Returns the pixel offset applied to one combo digit, or 0 when it does not apply.
float GetComboFadeFactor (unsigned int dwStep)
 Computes the combo fade factor for an animation step: a linear ramp from 0.3 to 0.0.
float GetComboScaleFactor (unsigned int dwStep)
 Computes the combo scale factor for an animation step: a linear ramp from 1.0 to 1.16.
int GetComboAnimFrameCount (unsigned int dwAnimGroup)
 Returns the number of animation frames defined for a combo animation group.
float GetComboAnimScale (unsigned int dwAnimGroup, int nFrameIndex)
 Returns the per-frame combo burst scale for one of the five animation groups.
CGPoint GetComboAnimPosition (unsigned int dwAnimGroup, int nFrameIndex)
 Returns the screen position for one frame of a combo animation group.
float EvalComboAnimCurve (float flTime, unsigned int dwAnimGroup, int nFrameIndex)
 Evaluates a piecewise-linear combo animation curve at flTime.
float EvalComboScaleCurve (float flTime, unsigned int dwCurveIndex)
 Evaluates a four-keyframe piecewise-linear scale curve at flTime.

Detailed Description

The combo-number display maths helpers used by MainGameRenderer(Pad)::renderCombo_.

Reconstructed from Ghidra program Jubeat (image base 0x100000000); all

Ghidra address:
values are offsets relative to that image base. These are free functions: none takes an object receiver, and the binary carries no RTTI, embedded source path, or owning class for them. They read a set of shared read-only tables in __const that describe how a combo number's digits scale and shift, how the combo burst animation scales and moves per frame, and the easing curves those animations follow. The basename is inferred because the shipped binary embeds no __FILE__ path.

Function Documentation

◆ EvalComboAnimCurve()

float EvalComboAnimCurve ( float flTime,
unsigned int dwAnimGroup,
int nFrameIndex )

Evaluates a piecewise-linear combo animation curve at flTime.

Each frame owns up to four keyframes; a keyframe with a negative x terminates the list, which is how a curve uses fewer than four slots. The result is the keyframe y when x matches flTime exactly, a linear interpolation between the bracketing keyframes otherwise, and 0.0f when flTime falls before the first keyframe or past the last.

Parameters
flTimeThe curve input, compared against the keyframe x values.
dwAnimGroupThe curve table selector; valid 0..4.
nFrameIndexThe frame's curve within the group.
Returns
The interpolated value, or 0.0f on any reject path.
Ghidra address:
0x1de54

◆ EvalComboScaleCurve()

float EvalComboScaleCurve ( float flTime,
unsigned int dwCurveIndex )

Evaluates a four-keyframe piecewise-linear scale curve at flTime.

Unlike EvalComboAnimCurve there is no negative-x sentinel: all four keyframe slots are always live, and the function is indexed by a single curve selector rather than a group and frame.

Parameters
flTimeThe curve input, compared against the keyframe x values.
dwCurveIndexThe curve selector; valid 0..4.
Returns
The interpolated value, or 0.0f on any reject path.
Ghidra address:
0x1dff0

◆ GetComboAnimFrameCount()

int GetComboAnimFrameCount ( unsigned int dwAnimGroup)

Returns the number of animation frames defined for a combo animation group.

Parameters
dwAnimGroupThe animation group index; valid 0..4.
Returns
The frame count, or 0 when the group index is out of range.
Ghidra address:
0x1dcbc

◆ GetComboAnimPosition()

CGPoint GetComboAnimPosition ( unsigned int dwAnimGroup,
int nFrameIndex )

Returns the screen position for one frame of a combo animation group.

The table stores packed signed 16-bit x/y pairs that are sign-extended and converted to the CGPoint doubles, so a negative coordinate is meaningful.

Parameters
dwAnimGroupThe animation group selector; valid 0..4.
nFrameIndexThe frame within the group; negative is rejected and the upper bound is the group's frame count.
Returns
The frame's position, or CGPointZero for any out-of-range input.
Ghidra address:
0x1dd80

◆ GetComboAnimScale()

float GetComboAnimScale ( unsigned int dwAnimGroup,
int nFrameIndex )

Returns the per-frame combo burst scale for one of the five animation groups.

Parameters
dwAnimGroupThe animation group selector; valid 0..4.
nFrameIndexThe frame within the group; negative is rejected and the upper bound is the group's frame count.
Returns
The scale for that frame, or 0.0f when either index is out of range.
Ghidra address:
0x1dcdc

◆ GetComboDigitOffset()

int GetComboDigitOffset ( int nValue,
unsigned int dwDigitCount,
int nDigitIndex )

Returns the pixel offset applied to one combo digit, or 0 when it does not apply.

The two non-zero results are -40 (when nValue matches the slot one past the digit) and -20 (when it matches the digit's own slot); every other case, and any out-of-range count or index, yields 0.

Parameters
nValueThe position being tested against the digit slot.
dwDigitCountThe number of combo digits; valid 1..4.
nDigitIndexThe 0-based digit position.
Returns
0, -20, or -40.
Ghidra address:
0x1dc18

◆ GetComboFadeFactor()

float GetComboFadeFactor ( unsigned int dwStep)

Computes the combo fade factor for an animation step: a linear ramp from 0.3 to 0.0.

Steps 0..2 hold at 0.3; steps 3..8 ramp down by 0.05 each to 0.0; steps above 8 return 0.0.

Parameters
dwStepThe animation step.
Returns
The fade factor.
Ghidra address:
0x1dc54

◆ GetComboScaleByCount()

float GetComboScaleByCount ( unsigned int dwStep,
unsigned int dwDigitCount )

Looks up the combo-number scale factor for an animation step and digit count.

Both inputs saturate rather than wrap: a step above 10 reuses column 10, and a count above 4 reuses row 3. A count of 0 short-circuits to 0.0f.

Parameters
dwStepThe animation or decay step, clamped to 0..10.
dwDigitCountThe number of combo digits, clamped to 1..4; 0 returns 0.0f.
Returns
The scale factor, or 0.0f when dwDigitCount is 0.
Ghidra address:
0x1db98

◆ GetComboScaleByDigit()

float GetComboScaleByDigit ( unsigned int dwStep,
unsigned int dwDigitCount,
int nDigitIndex )

Looks up the combo-number scale factor for one digit position.

The row counts digits from the right: row = count - index - 1, so index 0 maps to the highest row. The step saturates to 0..10, but an out-of-range count or index is rejected with 0.0f rather than clamped.

Parameters
dwStepThe animation or decay step, clamped to 0..10.
dwDigitCountThe number of combo digits; valid 1..4.
nDigitIndexThe 0-based digit position.
Returns
The scale factor, or 0.0f when either index is out of range.
Ghidra address:
0x1dbd4

◆ GetComboScaleFactor()

float GetComboScaleFactor ( unsigned int dwStep)

Computes the combo scale factor for an animation step: a linear ramp from 1.0 to 1.16.

The step saturates at 8, so any step at or above 8 returns 1.16.

Parameters
dwStepThe animation step, saturated to 0..8.
Returns
The scale factor.
Ghidra address:
0x1dc94