Jump to content

Sprite set file: Difference between revisions

Line 65: Line 65:
{
{
   spriteset_sprite* sprites = (u8*)spriteset + spriteset->offsetToSprites;
   spriteset_sprite* sprites = (u8*)spriteset + spriteset->offsetToSprites;
   spriteset_obj* objs = (u8*)spriteset + spriteset->offsetToOBJs;
   u8* objs = (u8*)spriteset + spriteset->offsetToOBJs;
   spriteset_tile* tiles = (u8*)spriteset + spriteset->offsetToTiles;
   spriteset_tile* tiles = (u8*)spriteset + spriteset->offsetToTiles;


Line 72: Line 72:


   for (int objIndex=0; objIndex < sprite->objCount; objIndex++) {
   for (int objIndex=0; objIndex < sprite->objCount; objIndex++) {
     spriteset_obj* obj = &objs[sprite->objStart + objIndex];
     spriteset_obj* obj = objs + sprite->objStart;
     // do something with obj
     // do something with obj