extern char snesfont, snespal;
scoMemory scoretst, scoretst1;
char sz[128];
int main(void)
{
scoretst.scohi = 18;
scoretst.scolo = 900;
sprintf(sz, "score hi %04x score lo %04x", (u16)scoretst.scohi, (u16)scoretst.scolo);
sprintf(sz, "score hi %04x score lo %04x", (u16)scoretst.scohi, (u16)scoretst.scolo);
sprintf(sz, "score hi %04x score lo %04x", (u16)scoretst.scohi, (u16)scoretst.scolo);
scoretst.scohi = 18;
scoretst.scolo = 900;
scoretst1.scohi = 17;
scoretst1.scolo = 900;
if (
scoreCmp(&scoretst, &scoretst1) == 0)
else if (
scoreCmp(&scoretst, &scoretst1) == 0xFF)
else if (
scoreCmp(&scoretst, &scoretst1) == 1)
scoretst1.scohi = 18;
scoretst1.scolo = 901;
if (
scoreCmp(&scoretst, &scoretst1) == 0)
else if (
scoreCmp(&scoretst, &scoretst1) == -1)
else if (
scoreCmp(&scoretst, &scoretst1) == 1)
scoretst1.scohi = 19;
scoretst1.scolo = 900;
if (
scoreCmp(&scoretst, &scoretst) == 0)
else if (
scoreCmp(&scoretst, &scoretst1) == -1)
else if (
scoreCmp(&scoretst, &scoretst1) == 1)
while (1)
{
}
return 0;
}
void bgSetGfxPtr(u8 bgNumber, u16 address)
Definition of each background address.
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void bgSetMapPtr(u8 bgNumber, u16 address, u8 mapSize)
Change Background Map address.
void consoleSetTextVramAdr(u16 vramfont)
Change text graphics address (4K aligned)
void consoleInitText(u8 palnum, u8 palsize, u8 *tilfont, u8 *palfont)
Initialize the Text System.
void consoleInit(void)
Initialize console.
void consoleDrawText(u16 x, u16 y, char *fmt,...)
Output formatted string on a screen (tiles mode)
void consoleSetTextOffset(u16 offsetfont)
Change text Background map address for display (must be BG address)
void consoleSetTextVramBGAdr(u16 offsetfont)
Change text Background map address for display (must be BG address)
void WaitForVBlank(void)
Wait for vblank interrupt
void scoreClear(scoMemory *source)
clear a score memory
void scoreAdd(scoMemory *source, u16 value)
add a value to a score memory
u8 scoreCmp(scoMemory *source, scoMemory *dest)
compare a score memory to another score memory
the master include file for snes applications.
void setBrightness(u8 level)
sets the screens brightness.
void setMode(u8 mode, u8 size)
Set the SNES hardware to operate in new display mode.