Function MapSprite

From Uzebox Wiki
Revision as of 22:12, 27 February 2009 by Uze (talk | contribs)
Jump to navigation Jump to search
Prototype

void MapSprite(unsigned char startSprite, const char *map);

Description

Convenience function that use a map to draw big sprites (composed of multiple 8x8 sprites). It assigns map indexes to sprites indexes and re-positions the sprites to tile them using the width and height specified in the map.

Parameters
  • startSprite: The first sprite index from which to apply the map.
  • map: A regular map that contains sprites tile indexes.
Returns

Void

Video Modes

2,3

Since

V1

Example:

#include "my_sprites_tiles_data.inc";
const char my_sprite_map[] PROGMEM={2,2, 3,8, 4,1};
...
SetSpritesTileTable(my_sprites_tile_data);
MapSprite(3,my_sprite_map);