|
libmsx
C library for MSX
|
SM2 (Sprite Mode 2) Animated Color Sprites. More...
Include dependency graph for sm2.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | sm2_Cel |
| Cel - The image of the sprite animation layer. More... | |
| struct | sm2_Frame |
| Frame - The frame of the sprite animation. More... | |
| struct | sm2_SpriteSheet |
| SpriteSheet - Whole animation frames and cels of a sprite sheet. More... | |
| struct | sm2_FrameTag |
| FrameTag - Definition of a range of animation frames. More... | |
| struct | sm2_Sprite |
| Sprite - Animation state of a sprite. More... | |
| struct | sm2_Frame.cel_ids |
| List of cel numbers for each layer. More... | |
| struct | sm2_SpriteSheet.frames |
| List of animation frames. More... | |
| struct | sm2_SpriteSheet.cels |
| List of whole cels. More... | |
Macros | |
| #define | sm2_Slice(T) |
| Macro for defining anonymous slice type of array. | |
| #define | SM2_SLICE(a) |
Typedefs | |
| typedef struct sm2_Cel | sm2_Cel |
| Cel - The image of the sprite animation layer. | |
| typedef struct sm2_Frame | sm2_Frame |
| Frame - The frame of the sprite animation. | |
| typedef struct sm2_SpriteSheet | sm2_SpriteSheet |
| SpriteSheet - Whole animation frames and cels of a sprite sheet. | |
| typedef struct sm2_FrameTag | sm2_FrameTag |
| FrameTag - Definition of a range of animation frames. | |
| typedef struct sm2_Sprite | sm2_Sprite |
| Sprite - Animation state of a sprite. | |
Enumerations | |
| enum | SM2_Direction { SM2_FORWARD = 0 , SM2_REVERSE = 1 , SM2_PINGPONG = 2 , SM2_PINGPONG_REVERSE = 3 } |
| Enumeration of animation direction. More... | |
Functions | |
| void | sm2_init (void) |
MSX2 Initialize SM2 module. | |
| void | sm2_init_sprite (sm2_Sprite *s, const sm2_SpriteSheet *sheet, const sm2_FrameTag *tag) |
MSX2 Construction and (re)initialization of the animated color sprite. | |
| void | sm2_update_sprite (sm2_Sprite *s) |
MSX2 Update the animation state of sprite object. | |
| void | sm2_update_sprites (sm2_Sprite ss[], size_t num) |
MSX2 Update the animation state of a series of sprite objects. | |
| void | sm2_flush (void) |
MSX2 Display the sprite cels registered in the internal buffer. | |
| void | sm2_add_sprite (const sm2_Sprite *s, int x, int y) |
MSX2 Add the cels of the current frame of the sprite object to the internal buffer. | |
| void | sm2_add_cel (const sm2_Cel *cel, int x, int y) |
MSX2 Add a sprite cel to the internal buffer. | |
| void | sm2_reserve (uint8_t n) |
MSX2 Reserves some sprite planes for direct access. | |
| uint8_t | sm2_get_reserved (void) |
MSX2 Returns the number of reserved sprite planes. | |
| void | sm2_put_sprite (uint8_t base_plane, const sm2_Sprite *s, int x, int y) |
MSX2 Display the cels of the current frame of the sprite object. | |
| void | sm2_put_cel (uint8_t base_plane, const sm2_Cel *cel, int x, int y) |
MSX2 Display the sprite cel. | |
SM2 (Sprite Mode 2) Animated Color Sprites.
Definition in file sm2.h.