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

Draws and animates the result screen's item-chance sequence. More...

#include <ResultItemChance.h>

Inheritance diagram for ResultItemChance:
Collaboration diagram for ResultItemChance:

Instance Methods

(void) - loadTexure
 Builds the sprite sheet and resets the particle state.
(void) - releaseTexture
 Drops the sprite sheet.
(void) - setInfo:itemNum:size:center:scale:
 Configures the sequence for one item award and seeds its particle field.
(BOOL) - draw
 Advances and renders one frame of the sequence.
(BOOL) - enableSkip
 Whether the sequence may be skipped.
(void) - renderEffectParts:posX:posY:alpha:
 Draws one particle sprite at a point with an alpha.
(void) - renderEffectParts:posX:posY:color:
 Draws one particle sprite at a point tinted by a colour.
(void) - renderEffect
 Renders the thirty-two-particle burst for the current frame.
(void) - restartAnimation
 Re-seeds the particle field and restarts the animation.

Properties

id aDelegate
 The delegate notified about the animation.
EAGLView * eaglView
 The rendering surface.

Detailed Description

Draws and animates the result screen's item-chance sequence.

Method Documentation

◆ draw

- (BOOL) draw

Advances and renders one frame of the sequence.

Fades the background frame in over its first eight frames, then runs the particle burst, plays the award sound effect once, and stages the item icon, the "get" board, and the number board as the frame counter passes their cue points. Advances the frame counter and reports completion.

Returns
YES once the animation has run past its final frame (frame counter above 0x31).
Ghidra address:
0x13a2a0
Ghidra address:
0x13a2a0

◆ enableSkip

- (BOOL) enableSkip

Whether the sequence may be skipped.

Returns
YES once the frame counter has passed 0x32.
Ghidra address:
0x13a698
Ghidra address:
0x13a698

◆ loadTexure

- (void) loadTexure

Builds the sprite sheet and resets the particle state.

Allocates the Texture2D, decrypts the bundled item_chance_tex.tex atlas into it with the texture cipher key, loads the sprite rectangles from item_chance_tex.plist , clears the frame counter and the four particle-visibility quad-words, and reads the effect size from sprite 8.

Ghidra address:
0x139cac
Ghidra address:
0x139cac

◆ releaseTexture

- (void) releaseTexture

Drops the sprite sheet.

Ghidra address:
0x139e7c

◆ renderEffect

- (void) renderEffect

Renders the thirty-two-particle burst for the current frame.

Each live particle eases along its stored direction with a double sin -shaped envelope, fading in over the first fifth of its life and out over the rest, and ages by one frame.

Ghidra address:
0x13a734
Ghidra address:
0x13a734

◆ renderEffectParts:posX:posY:alpha:

- (void) renderEffectParts: (int) type
posX: (int) posX
posY: (int) posY
alpha: (float) alpha 

Draws one particle sprite at a point with an alpha.

Parameters
typeThe particle type; the sprite index is type + 8 .
posXThe x centre, already offset by screenCenter .
posYThe y centre.
alphaThe opacity.
Ghidra address:
0x13a6b0
Ghidra address:
0x13a6b0

◆ renderEffectParts:posX:posY:color:

- (void) renderEffectParts: (int) type
posX: (int) posX
posY: (int) posY
color: (nullable id) color 

Draws one particle sprite at a point tinted by a colour.

Unused by the current renderEffect , which always calls the alpha overload; kept because the binary carries it. It stretches the sprite into a fixed 64x64 rect (the inRect: overload) and tints it.

Parameters
typeThe particle type; the sprite index is type + 8 .
posXThe x centre.
posYThe y centre.
colorThe tint colour.
Ghidra address:
0x13a6fc

◆ restartAnimation

- (void) restartAnimation

Re-seeds the particle field and restarts the animation.

Differs from the seeding in setInfo: : particle types run 0..2 rather than 0..8, the spread is measured from effectSize rather than from an absolute offset, and displayScale is not re-applied. Resets the frame counter to zero.

Ghidra address:
0x13a918
Ghidra address:
0x13a918

◆ setInfo:itemNum:size:center:scale:

- (void) setInfo: (int) itemType
itemNum: (int) itemNum
size: (CGSize) size
center: (CGPoint) center
scale: (float) scale 

Configures the sequence for one item award and seeds its particle field.

The scale argument is inverted into displayScale (the reciprocal), and the centre and size are pre-multiplied by that reciprocal so later drawing works in the unscaled sprite space. The thirty-two particles are seeded with random type, direction, lifetime, and colour. The item icon is loaded from chance_item_0<itemType> ; when more than one is awarded, the "x" glyph and the decimal digits of itemNum are loaded from item_chance_num_<digit> into the trailing sprites.

Parameters
itemTypeSelects the item icon (loaded as chance_item_0d ).
itemNumHow many were awarded; drives the digit sprites.
sizeThe on-screen size, in scaled points.
centerThe on-screen centre, in scaled points.
scaleThe result screen's scale; stored inverted.
Ghidra address:
0x139e94
Ghidra address:
0x139e94

Property Documentation

◆ aDelegate

- (id) aDelegate
readwritenonatomicweak

The delegate notified about the animation.

Weakly held (W in the metadata).

◆ eaglView

- (EAGLView*) eaglView
readwritenonatomicstrong

The rendering surface.

Strongly held (& in the metadata).


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