projects
/
gbajam22
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
back to starting with the logo screen
[gbajam22]
/
src
/
gba
/
main.c
diff --git
a/src/gba/main.c
b/src/gba/main.c
index
8417df1
..
4ade404
100644
(file)
--- a/
src/gba/main.c
+++ b/
src/gba/main.c
@@
-4,6
+4,10
@@
#include "debug.h"
#include "game.h"
#include "maxmod.h"
#include "debug.h"
#include "game.h"
#include "maxmod.h"
+#include "input.h"
+#include "timer.h"
+#include "xgl.h"
+#include "scoredb.h"
static void vblank(void);
static void vblank(void);
@@
-32,29
+36,35
@@
int main(void)
REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
unmask(INTR_VBLANK);
REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
unmask(INTR_VBLANK);
- intr_enable();
+ load_scores();
+ gba_colors = scores[10].score & 1;
+
+ xgl_init();
if(init_screens() == -1) {
panic(get_pc(), "failed to initialize screens");
}
if(init_screens() == -1) {
panic(get_pc(), "failed to initialize screens");
}
- if(change_screen(find_screen("game")) == -1) {
- panic(get_pc(), "failed to find game screen");
+ if(change_screen(find_screen("logo")) == -1) {
+ panic(get_pc(), "failed to find starting screen");
}
}
+ reset_msec_timer();
+ intr_enable();
+
for(;;) {
curscr->frame();
}
return 0;
}
for(;;) {
curscr->frame();
}
return 0;
}
+ARM_IWRAM
static void vblank(void)
{
vblperf_count++;
static void vblank(void)
{
vblperf_count++;
- if(curscr && curscr->vblank) {
- curscr->vblank();
- }
+ keyb_vblank();
+ curscr->vblank();
#ifndef NOSOUND
mmVBlank();
#ifndef NOSOUND
mmVBlank();