diff --git a/src/dialogs.c b/src/dialogs.c index cb537fc..ca523ff 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -192,7 +192,7 @@ void store_vram_part(int x, int y, int w, int h) { #ifdef FXCG50 if(image_valid(vram_part)) image_free(vram_part); image_sub(image_create_vram(), x, y, w, h, &vram_part_reference); - vram_part = image_create(w, h, IMAGE_RGB565); + vram_part = image_alloc(w, h, IMAGE_RGB565); if(vram_part){ image_copy(&vram_part_reference, vram_part, true); } @@ -211,13 +211,13 @@ void restore_vram_part(int x, int y) { int _choice_call_before_end(Game *game) { int i, key; /* Make a little animation because we looove little animations ;) */ - store_vram_part(0, (BOX_HEIGHT+1)*PXSIZE, - DWIDTH, (CHOICE_BOX_HEIGHT+1)*PXSIZE); + store_vram_part(0, BOX_HEIGHT*PXSIZE, + DWIDTH, (CHOICE_BOX_HEIGHT+2)*PXSIZE); for(i=0;i0;i--){ - restore_vram_part(0, (BOX_HEIGHT+1)*PXSIZE); + restore_vram_part(0, BOX_HEIGHT*PXSIZE); drect(0, BOX_HEIGHT*PXSIZE, i*(DWIDTH/8), (BOX_HEIGHT+CHOICE_BOX_HEIGHT)*PXSIZE, C_WHITE); - drect(i*(DWIDTH/8), BOX_HEIGHT*PXSIZE, i*(DWIDTH/8)+PXSIZE, - (BOX_HEIGHT+CHOICE_BOX_HEIGHT)*PXSIZE, C_BLACK); + drect(i*(DWIDTH/8), BOX_HEIGHT*PXSIZE, i*(DWIDTH/8)+PXSIZE-1, + (BOX_HEIGHT+CHOICE_BOX_HEIGHT+1)*PXSIZE, C_BLACK); drect(0, (BOX_HEIGHT+CHOICE_BOX_HEIGHT)*PXSIZE+1, i*(DWIDTH/8), (BOX_HEIGHT+CHOICE_BOX_HEIGHT+1)*PXSIZE, C_BLACK); blit(); @@ -274,7 +274,7 @@ int _choice_call_before_end(Game *game) { game->frame_duration = 0; } #ifdef FXCG50 - if(image_valid(vram_part)) image_free(vram_part); + if(vram_part) image_free(vram_part); #else // Really need to code this! #endif