X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fgba%2Fmain.c;h=4ade40476c0edeb4a0e5bb03fd61dc2bc6df267b;hb=fb23aa4804a46173f817eb83b4823b7263ef0ed9;hp=a520cafa0b7b0ed4abf585606e63836a6959b728;hpb=d489941c3101412810a6f355e35e027c7d51b350;p=gbajam22 diff --git a/src/gba/main.c b/src/gba/main.c index a520caf..4ade404 100644 --- a/src/gba/main.c +++ b/src/gba/main.c @@ -4,6 +4,10 @@ #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); @@ -32,14 +36,20 @@ int main(void) REG_DISPSTAT |= DISPSTAT_IEN_VBLANK; unmask(INTR_VBLANK); + load_scores(); + gba_colors = scores[10].score & 1; + + xgl_init(); + 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(;;) { @@ -53,6 +63,7 @@ static void vblank(void) { vblperf_count++; + keyb_vblank(); curscr->vblank(); #ifndef NOSOUND