X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fintroscr.c;h=170cab4618a0ecf4bfd629aa234e05172b4345c1;hb=d54a3962dcb42f9921be75cf3754525ecef2bab6;hp=4d0db195f77aaec4aa0201b924f0acc045bea329;hpb=713d33d0c193f880d665dc6f4e62eac9549b747e;p=eradicate diff --git a/src/introscr.c b/src/introscr.c index 4d0db19..170cab4 100644 --- a/src/introscr.c +++ b/src/introscr.c @@ -13,7 +13,7 @@ static long start_time; int intro_init(void) { - if(!(logo = img_load_pixels("data/msglogo.jpg", &logo_width, &logo_height, IMG_FMT_RGB24))) { + if(!(logo = img_load_pixels("data/msglogo.jpg", &logo_width, &logo_height, IMG_FMT_BGRA32))) { fprintf(stderr, "failed to load logo image\n"); return -1; } @@ -37,13 +37,12 @@ void intro_stop(void) { } +void fade_image(void *dest, void *src, uint16_t fade); + void intro_draw(void) { - int i, j; long tm; uint16_t fade; - unsigned char *src = logo; - uint16_t *dest = fb_pixels; tm = time_msec - start_time; if(tm < FADE_DUR) { @@ -54,19 +53,28 @@ void intro_draw(void) fade = 256 - (tm - 2 * FADE_DUR) * 256 / FADE_DUR; } else { fade = 0; - //menu_start(); + menu_start(); + return; } - for(i=0; i