extern char patterns, patterns_end;
extern char palette, palette_end;
extern char map, map_end;
extern char spr32g, spr32g_end, spr32p;
extern char spr16g, spr16g_end, spr16p;
extern char spr8g, spr8g_end, spr8p;
u8 i;
#define SPRNUMBER 64
int main(void)
{
bgInitTileSet(0, &patterns, &palette, 0, (&patterns_end - &patterns), (&palette_end - &palette), BG_16COLORS, 0x4000);
for (i = 0; i < SPRNUMBER; i++)
{
if (i < 8)
{
}
else
{
}
}
while (1)
{
for (i = 0; i < SPRNUMBER; i++)
{
{
}
else if ((
rand() & 5) == 5)
{
}
else if ((
rand() & 8) == 8)
{
}
else if ((
rand() & 3) == 3)
{
}
{
}
if (i < 8)
{
}
else
{
}
}
}
return 0;
}
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void bgInitMapSet(u8 bgNumber, u8 *mapSource, u16 mapSize, u8 sizeMode, u16 address)
Initializes a Map Set and loads it into SNES VRAM.
void bgInitTileSet(u8 bgNumber, u8 *tileSource, u8 *tilePalette, u8 paletteEntry, u16 tileSize, u16 paletteSize, u16 colorMode, u16 address)
Initializes a Tile Set and Loads the Tile GFX into VRAM.
u16 rand(void)
return a randomized number
void consoleInit(void)
Initialize console.
void WaitForVBlank(void)
Wait for vblank interrupt
the master include file for snes applications.
#define OBJ_SIZE16_L32
default OAM size 16x16 (SM) and 32x32 (LG) pix for OBJSEL register
Definition: sprite.h:42
t_sprites oambuffer[128]
Sprite Table (from no$sns help file) Contains data for 128 OBJs. OAM Size is 512+32 Bytes....
void oamVramQueueUpdate(void)
Update VRAM graphics for sprites 32x32, 16x16 and 8x8 (can but call in Vblank if needed).
void oamInitDynamicSpriteEndFrame(void)
Must be call at the end of the frame, initialize the dynamic sprite engine for the next frame.
void oamInitDynamicSprite(u16 gfxsp0adr, u16 gfxsp1adr, u16 oamsp0init, u16 oamsp1init, u8 oamsize)
initialize the dynamic sprite engine with each sprite size entries
void oamDynamic16Draw(u16 id)
Add a 16x16 sprite on screen. oambuffer[id] needs to be populate before.
void oamDynamic32Draw(u16 id)
Add a 32x32 sprite on screen. oambuffer[id] needs to be populate before.
u16 oamframeid
4 frame index in graphic file of the sprite
Definition: sprite.h:62
s16 oamx
0 x position on the screen
Definition: sprite.h:60
u8 * oamgraphics
8..11 pointer to graphic file
Definition: sprite.h:65
s16 oamy
2 y position on the screen
Definition: sprite.h:61
u8 oamattribute
6 sprite attribute value (vhoopppc v : vertical flip h: horizontal flip o: priority bits p: palette n...
Definition: sprite.h:63
u8 oamrefresh
7 =1 if we need to load graphics from graphic file
Definition: sprite.h:64
void setScreenOn(void)
Put screen On.
#define setPalette(palette, paletteEntry, paletteSize)
Change a palette in CGRAM.
Definition: video.h:388
void setMode(u8 mode, u8 size)
Set the SNES hardware to operate in new display mode.