8f122b58bcd0f27c7f67d380a24a5555d2859101
[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 #ifndef NOSOUND
20         interrupt(INTR_TIMER1, AAS_Timer1InterruptHandler);
21         AAS_SetConfig(AAS_CONFIG_MIX_24KHZ, AAS_CONFIG_CHANS_8, AAS_CONFIG_SPATIAL_STEREO, AAS_CONFIG_DYNAMIC_ON);
22         unmask(INTR_TIMER1);
23         intr_enable();
24
25         AAS_MOD_Play(AAS_DATA_MOD_popcorn);
26 #else
27         intr_enable();
28 #endif
29
30         gamescr();
31
32         for(;;);
33         return 0;
34 }