|
JubeatPlus 3.9.11
|
The combo-number display maths helpers used by MainGameRenderer(Pad)::renderCombo_.
More...
#include <CoreGraphics/CGGeometry.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. | |
The combo-number display maths helpers used by MainGameRenderer(Pad)::renderCombo_.
Reconstructed from Ghidra program Jubeat (image base 0x100000000); all
__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. | 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.
| flTime | The curve input, compared against the keyframe x values. |
| dwAnimGroup | The curve table selector; valid 0..4. |
| nFrameIndex | The frame's curve within the group. |
| 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.
| flTime | The curve input, compared against the keyframe x values. |
| dwCurveIndex | The curve selector; valid 0..4. |
| int GetComboAnimFrameCount | ( | unsigned int | dwAnimGroup | ) |
Returns the number of animation frames defined for a combo animation group.
| dwAnimGroup | The animation group index; valid 0..4. |
| 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.
| dwAnimGroup | The animation group selector; valid 0..4. |
| nFrameIndex | The frame within the group; negative is rejected and the upper bound is the group's frame count. |
CGPointZero for any out-of-range input. | float GetComboAnimScale | ( | unsigned int | dwAnimGroup, |
| int | nFrameIndex ) |
Returns the per-frame combo burst scale for one of the five animation groups.
| dwAnimGroup | The animation group selector; valid 0..4. |
| nFrameIndex | The frame within the group; negative is rejected and the upper bound is the group's frame count. |
| 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.
| nValue | The position being tested against the digit slot. |
| dwDigitCount | The number of combo digits; valid 1..4. |
| nDigitIndex | The 0-based digit position. |
| 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.
| dwStep | The animation step. |
| 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.
| dwStep | The animation or decay step, clamped to 0..10. |
| dwDigitCount | The number of combo digits, clamped to 1..4; 0 returns 0.0f. |
dwDigitCount is 0. | 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.
| dwStep | The animation or decay step, clamped to 0..10. |
| dwDigitCount | The number of combo digits; valid 1..4. |
| nDigitIndex | The 0-based digit position. |
| 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.
| dwStep | The animation step, saturated to 0..8. |