#include "dialogs.h" #include #include #define BOX_HEIGHT (F_HEIGHT/PXSIZE+8) void showtext(Game *game, bopti_image_t *face, char *text) { unsigned int i; for(i=0;iframe_duration < 20) sleep(); game->frame_duration = 0; } /* We should start to drawint the text on the x axis at BOX_HEIGHT to avoid * drawing on the face. */ /* Show a little message that showing text in dialogs is not implemented * yet. */ dtext(BOX_HEIGHT*PXSIZE, 1, C_BLACK, "Dialogs not implemented"); dtext(BOX_HEIGHT*PXSIZE, 8, C_BLACK, "Press any key"); dupdate(); getkey(); for(i=0;i0;i--){ draw(game); drect(0, 0, DWIDTH, i*PXSIZE, C_WHITE); drect(0, i*PXSIZE, DWIDTH, (i+1)*PXSIZE, C_BLACK); dsubimage(4*PXSIZE, 2*PXSIZE, face, 0, 0, F_WIDTH, (i-8)*PXSIZE, DIMAGE_NONE); dupdate(); while(game->frame_duration < 20) sleep(); game->frame_duration = 0; } }