#include <gb/gb.h>
#include "files/sprites.c"
#define SPRT1 0
#define SPRT1_MASK1 0
#define SPRT1_MASK2 1
#define SPRT1_POSX 100
#define SPRT1_POSY 100
#define SPRT2 2
#define SPRITESIZE 8
struct sprite16x16
{
UBYTE spriteid_0;
UBYTE spriteid_1;
UBYTE spriteid_2;
UBYTE spriteid_3;
};
struct sprite16x16 sprite2;
void main()
{
//One 8x8 sprite x two masks = 2
set_sprite_data(SPRT1, 2, sprite1_tiles);
set_sprite_tile(SPRT1, SPRT1_MASK1);
move_sprite(SPRT1, SPRT1_POSX, SPRT1_POSY);
//One 16x16 sprite x 1 mask = 4
set_sprite_data(SPRT2, 4, sprite2_tiles);
//set each 8x8 sprite in OAM
set_sprite_tile(SPRT2, SPRT2);
set_sprite_tile(SPRT2+1, SPRT2+1);
set_sprite_tile(SPRT2+2, SPRT2+2);
set_sprite_tile(SPRT2+3, SPRT2+3);
//Tell sprite where the 8x8 sub-sprites are
sprite2.spriteid_0=2;
sprite2.spriteid_1=3;
sprite2.spriteid_2=4;
sprite2.spriteid_3=5;
//Move sprite
move_sprite(sprite2.spriteid_0, 50, 50);
move_sprite(sprite2.spriteid_1, 50 + SPRITESIZE, 50);
move_sprite(sprite2.spriteid_2, 50, 50 + SPRITESIZE);
move_sprite(sprite2.spriteid_3, 50 + SPRITESIZE, 50 + SPRITESIZE);
SHOW_SPRITES;
}