#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 } } }; void init_csprite(CSprite* sprite, Sprite_ID id) { const Sprite* s; s = &sprites[id]; sprite->id = s->bitmap; sprite->rect = s->rect; }