The Socrates Gameboy Advance Development Engine
The SGADE is a development library for the Nintendo Gameboy
Advance. It's free for all uses and is distributed without guarantees.
For more information visit
the SGADE page.
Files | |
| file | SoSpriteAnimation.c |
| file | SoSpriteAnimation.h |
Data Structures | |
| struct | SoSpriteAnimation |
| Sprite animation structure. More... | |
Defines | |
| #define | SoSpriteAnimationGetFrameWidth(a_This) |
| Returns width of animation frame in pixels. | |
| #define | SoSpriteAnimationGetFrameHeight(a_This) |
| Returns height of animation frame in pixels. | |
| #define | SoSpriteAnimationGetNumFrames(a_This) |
| Returns number of frames in the animation. | |
| #define | SoSpriteAnimationIs16Colors(a_This) |
| Returns true if the animation is 16 colors, false if it is 256 colors. | |
| #define | SoSpriteAnimationGetData(a_This) |
| Returns actual animation frame data (grahpics bytes). | |
Functions | |
| u32 | SoSpriteAnimationGetSize (const SoSpriteAnimation *a_This) |
| Gets the size of the entire frame set. | |
| u32 | SoSpriteAnimationGetNumIndicesPerFrame (const SoSpriteAnimation *a_This) |
| Returns the number of sprite memory indices (characters) a single frame occupies. | |
You can use the SoConverter tool to convert animations to Socrates compatible header files.
|
|
Returns actual animation frame data (grahpics bytes). The frame data is arranged in 8x8 blocks, one frame after another. You shouldn't need this function -- it is used by the SoSpriteMemManager module. |
|
|
Returns the number of sprite memory indices (characters) a single frame occupies.
This function can be used for sprite animation. If you add this number to the current sprite tile index, it will use the next tile index. You can subtract it to get the previous tile index. It is up to you to manage what tile of the tileset you are currently displaying. |
|
|
Gets the size of the entire frame set.
|