Updated source to compile with libgba-20060720.

This commit is contained in:
Truls Alexander Tangstad 2007-03-09 15:04:07 +00:00
parent c49e177fa6
commit 94627af503

View File

@ -38,7 +38,7 @@ unsigned int frame;
void VblankInterrupt()
{
frame += 1;
ScanKeys();
scanKeys();
}
class Smoke {
@ -168,10 +168,10 @@ int main(void)
OBJAFFINE *const oa_buffer = (OBJAFFINE*)oe_buffer;
// Set up the interrupt handlers
InitInterrupt();
SetInterrupt( IE_VBL, VblankInterrupt);
irqInit();
irqSet( IRQ_VBLANK, VblankInterrupt);
// Enable Vblank Interrupt to allow VblankIntrWait
EnableInterrupt(IE_VBL);
irqEnable(IRQ_VBLANK);
// Allow Interrupts
REG_IME = 1;
// screen mode, background and objects to display
@ -194,29 +194,29 @@ int main(void)
Smoke smoke(NUMSMOKES, &oe_buffer[2], smoke_index);
while (1) {
if (KeysHeld() & KEY_RIGHT) {
if (keysHeld() & KEY_RIGHT) {
red.rotate(-8);
} else if (KeysHeld() & KEY_LEFT) {
} else if (keysHeld() & KEY_LEFT) {
red.rotate(8);
}
if (KeysHeld() & KEY_A) {
if (keysHeld() & KEY_A) {
blue.rotate(-8);
} else if (KeysHeld() & KEY_B) {
} else if (keysHeld() & KEY_B) {
blue.rotate(8);
}
if (KeysHeld() & KEY_L) {
if (keysHeld() & KEY_L) {
red.speedup();
}
if (KeysHeld() & KEY_R) {
if (keysHeld() & KEY_R) {
blue.speedup();
}
if (!(KeysHeld() & KEY_L)) {
if (!(keysHeld() & KEY_L)) {
red.slowdown();
}
if (!(KeysHeld() & KEY_R)) {
if (!(keysHeld() & KEY_R)) {
blue.slowdown();
}