Fixed the code to work with Sly's changes

This commit is contained in:
mibi88 2023-07-13 23:49:07 +02:00
parent a743b88569
commit 6ccd93843d
2 changed files with 7 additions and 6 deletions

View file

@ -12,7 +12,7 @@ find_package(Gint 2.9 REQUIRED)
find_package(LibProf 2.4 REQUIRED)
#set the color mode either to 1b or 2b
set(COLORMODE_fx 1b)
set(COLORMODE_fx 2b)
#set the color mode either to 2b or EGA64
set(COLORMODE_cg EGA64)

View file

@ -51,7 +51,7 @@ int showtext_opt(Game *game, bopti_image_t *face, char *text,
dsubimage(4*PXSIZE, 2*PXSIZE, face, 0, 0, F_WIDTH, (i-8)*PXSIZE,
DIMAGE_NONE);
blit();
dupdate();
while(game->frame_duration < 20) sleep();
game->frame_duration = 0;
@ -85,14 +85,14 @@ int showtext_opt(Game *game, bopti_image_t *face, char *text,
/* We drew one entire screen, reset everything to draw the next one.
*/
/* Make a little animation :). */
dupdate();
blit();
while(game->frame_duration < 1000) sleep();
game->frame_duration = 0;
/* Ask the user to press EXE to continue. */
dtext(BOX_HEIGHT*PXSIZE, y, C_BLACK, "[EXE] to continue ...");
}
/* Make a little animation :). */
dupdate();
blit();
if(l>=max_lines_amount-1){
while(getkey().key != KEY_EXE) sleep();
/* Clear the screen. */
@ -110,11 +110,12 @@ int showtext_opt(Game *game, bopti_image_t *face, char *text,
if(l<max_lines_amount-1){
/* If we have not filled everthing with text at the end. */
/* Make a little animation :). */
dupdate();
blit();
while(game->frame_duration < 1000) sleep();
game->frame_duration = 0;
/* Ask the user to press EXE to continue. */
dtext(1, y, C_BLACK, "[EXE] To continue ...");
blit();
while(getkey().key != KEY_EXE) sleep();
}
if(call_before_end) return_int = call_before_end();
@ -126,7 +127,7 @@ int showtext_opt(Game *game, bopti_image_t *face, char *text,
dsubimage(4*PXSIZE, 2*PXSIZE, face, 0, 0, F_WIDTH, (i-8)*PXSIZE,
DIMAGE_NONE);
blit();
dupdate();
while(game->frame_duration < 20) sleep();
game->frame_duration = 0;