8 static const struct menuent {
18 static uint16_t *bgpix;
19 static int bgwidth, bgheight;
23 if(!(bgpix = img_load_pixels("data/menbg640.png", &bgwidth, &bgheight, IMG_FMT_RGB565))) {
24 fprintf(stderr, "failed to load menu bg image\n");
30 void menu_cleanup(void)
32 img_free_pixels(bgpix);
38 key_event = menu_keyb;
49 static uint16_t blurbuf[2][16384];
52 const struct menuent *ent = menuent + cur;
54 y = ent->y - ent->height / 2;
55 offs = y * ent->len + ent->x;
56 blit(blurbuf[0], ent->len, bgpix + offs, ent->len, ent->height, bgwidth);
58 //blur_grey_horiz(blurbuf[1], blurbuf[0], ent->len, ent->height, 5, 0x100);
59 for(i=0; i<ent->height; i++) {
60 for(j=0; j<ent->len; j++) {
61 blurbuf[1][i * ent->len + j] = 0xff;//~blurbuf[0][i * ent->len + j];
68 blit(fb_pixels + offs, fb_width, blurbuf[1], ent->len, ent->height, ent->len);
71 void menu_keyb(int key, int pressed)