wait states!
[gbajam21] / src / main.c
1 #include <math.h>
2 #include "gbaregs.h"
3 #include "intr.h"
4 #include "debug.h"
5 #include "game.h"
6
7 #include "AAS.h"
8 #include "data.h"
9
10 #define RGB15(r, g, b) \
11         (((uint16_t)(r) & 0x1f) | \
12          (((uint16_t)(g) & 0x1f) << 5) | \
13          (((uint16_t)(b) & 0x1f) << 10))
14
15 int main(void)
16 {
17         intr_init();
18
19         REG_WAITCNT = WAITCNT_PREFETCH | WAITCNT_ROM_2_1;
20
21 #ifndef NOSOUND
22         interrupt(INTR_TIMER1, AAS_Timer1InterruptHandler);
23         AAS_SetConfig(AAS_CONFIG_MIX_24KHZ, AAS_CONFIG_CHANS_8, AAS_CONFIG_SPATIAL_STEREO, AAS_CONFIG_DYNAMIC_ON);
24         unmask(INTR_TIMER1);
25         intr_enable();
26
27         AAS_MOD_Play(AAS_DATA_MOD_popcorn);
28 #else
29         intr_enable();
30 #endif
31
32         gamescr();
33
34         for(;;);
35         return 0;
36 }