#include "sprite.h" static const Sprite sprites[] = { /* sprite_player_bullet_left */ { asset_id_bullet, { 9, 0, 9, 14 } }, /* sprite_player_bullet_right */ { asset_id_bullet, { 0, 0, 9, 14 } }, /* sprite_player_bullet_up */ { asset_id_bullet, { 0, 14, 14, 9 } }, /* sprite_player_bullet_down */ { asset_id_bullet, { 14, 14, 14, 9 } }, /* sprite_skull_left */ { asset_id_enemy, { 16, 0, 16, 16 } }, /* sprite_skull_right */ { asset_id_enemy, { 0, 0, 16, 16 } }, /* sprite_skull_debris_1 */ { asset_id_enemy, { 32, 0, 5, 8 } }, /* sprite_skull_debris_2 */ { asset_id_enemy, { 38, 0, 6, 6 } }, /* sprite_skull_debris_3 */ { asset_id_enemy, { 32, 8, 5, 8 } }, /* sprite_skull_debris_4 */ { asset_id_enemy, { 38, 11, 5, 5 } }, /* sprite_skull_debris_5 */ { asset_id_enemy, { 44, 10, 3, 6 } }, /* sprite_enemy_bullet */ { asset_id_bullet, { 18, 0, 5, 5 } }, /* sprite_author */ { asset_id_usr, { 0, 70, 70, 10 } }, /* sprite_free */ { asset_id_usr, { 0, 80, 171, 10 } }, /* sprite_floor_tile */ { asset_id_map, { 0, 0, 16, 16 } }, /* sprite_bricks */ { asset_id_map, { 16, 0, 16, 16 } } }; void init_csprite(CSprite* sprite, Sprite_ID id) { const Sprite* s; s = &sprites[id]; sprite->id = s->bitmap; sprite->rect = s->rect; } const Sprite* get_sprite(Sprite_ID id) { return &sprites[id]; }