projects
/
gbajam21
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tunnel rotation with lower-res scaled-up tunnel
[gbajam21]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
8f122b5
..
e1c3af0
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-3,32
+3,49
@@
#include "intr.h"
#include "debug.h"
#include "game.h"
#include "intr.h"
#include "debug.h"
#include "game.h"
-
-#include "AAS.h"
#include "data.h"
#include "data.h"
+#include "maxmod.h"
-#define RGB15(r, g, b) \
- (((uint16_t)(r) & 0x1f) | \
- (((uint16_t)(g) & 0x1f) << 5) | \
- (((uint16_t)(b) & 0x1f) << 10))
+static void vblank(void);
+static void nopfunc(void);
int main(void)
{
intr_init();
int main(void)
{
intr_init();
-#ifndef NOSOUND
- interrupt(INTR_TIMER1, AAS_Timer1InterruptHandler);
- AAS_SetConfig(AAS_CONFIG_MIX_24KHZ, AAS_CONFIG_CHANS_8, AAS_CONFIG_SPATIAL_STEREO, AAS_CONFIG_DYNAMIC_ON);
- unmask(INTR_TIMER1);
- intr_enable();
+ REG_WAITCNT = WAITCNT_PREFETCH | WAITCNT_ROM_2_1;
- AAS_MOD_Play(AAS_DATA_MOD_popcorn);
-#else
- intr_enable();
+#ifndef NOSOUND
+ mmInitDefault(sound_data, 8);
+ mmStart(MOD_POPCORN, MM_PLAY_LOOP);
#endif
#endif
+ screen_vblank = nopfunc;
+
+ intr_disable();
+ interrupt(INTR_VBLANK, vblank);
+ REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
+ unmask(INTR_VBLANK);
+
+ intr_enable();
gamescr();
for(;;);
return 0;
}
gamescr();
for(;;);
return 0;
}
+
+static void vblank(void)
+{
+ vblperf_count++;
+
+ screen_vblank();
+
+#ifndef NOSOUND
+ mmVBlank();
+ mmFrame();
+#endif
+}
+
+static void nopfunc(void)
+{
+}