Passing Sprites to Functions
Posted: Tue Oct 27, 2015 9:25 pm
Is there a way I can do this?
Code: Select all
u16 loadExperts(Sprite Expert1, Sprite Expert2) {
SYS_disableInts();
VDP_setPalette(PAL2, Expert1.palette->data);
VDP_setPalette(PAL3, Expert2.palette->data);
SYS_enableInts();
SPR_initSprite(&ExpertSprites[0], (SpriteDefinition)Expert1, EXPERT_POSITION_X, EXPERT_POSITION_Y, TILE_ATTR(PAL2, TRUE, FALSE, FALSE));
SPR_initSprite(&ExpertSprites[1], (SpriteDefinition)Expert2, 0, EXPERT_POSITION_Y, TILE_ATTR(PAL3, TRUE, FALSE, FALSE));
SubStageInt = 2;
return TRUE;
}