GOOC - Game Oriented Object C
GOOC - Game Oriented Object C
12.5. Fragmented Sprite Animations
12.5. Fragmented Sprite Animations
Fragmented sprite animations are sprite animations that are assembled through multiple smaller sprites, a necessity for larger sprites due to size and packing limitations. Fragmented sprite animations are type 5.
Crash 1
Crash 1
The format for a fragmented sprite animation is as follows:
#fraganim anim-name tpag-eid frag-count
anim-name is an identifier for the animation's name. tpag-eid is the EID of the texture page that contains the sprite(s). frag-count is the number of fragments (sprites) for each frame of animation.
This is then followed by a list of fragment definitions:
#frag rgb color-mode blend-mode tex-x tex-y clut-x clut-y tex-w tex-h frag-x frag-w frag-y frag-h
#frag rgb color-mode blend-mode tex-x tex-y clut-x clut-y tex-w tex-h ! flip wind frag-x frag-w frag-y frag-h
rgb, color-mode, blend-mode, tex-x, tex-y, clut-x, clut-y, tex-w, tex-h, flip, and wind are the same parameters as in sprite animations. frag-x and frag-y specify the X and Y offsets of the fragment, and frag-w and frag-h specify the width and height of the fragment, with 400 corresponding to a "normal" size. The width or height can also be zero, in which case they assume a default value.
Crash 2
Crash 2
The format for a fragmented sprite animation is as follows:
#fraganim anim-name tpag-eid frag-count
anim-name is an identifier for the animation's name. tpag-eid is the EID of the texture page that contains the sprite(s). frag-count is the number of fragments (sprites) for each frame of animation.
This is then followed by a list of fragment definitions:
#frag rgb color-mode blend-mode tex-x tex-y clut-x clut-y tex-w tex-h frag-x frag-w frag-y frag-h
rgb, color-mode, blend-mode, tex-x, tex-y, clut-x, clut-y, tex-w, and tex-h are the same parameters as in sprite animations. frag-x and frag-y specify the X and Y offsets of the fragment, and frag-w and frag-h specify the width and height of the fragment. The width or height can also be zero, in which case they assume the default value of 400, corresponding to a base unit.