For credits and briefings moved all code happened in EVENT_IDLE to EVENT_WINDOW_DRAW since a jitterish Joystick could slow down text rendering

This commit is contained in:
zicodxx 2011-02-14 23:52:28 +01:00
parent c1e4e9c3d7
commit 7481e1c0fc
3 changed files with 12 additions and 13 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20110214
--------
d1x.ini, include/args.h, main/ai.c, main/ai.h, main/automap.c, main/cntrlcen.c, main/collide.c, main/config.c, main/config.h, main/fvi.c, main/game.c, main/game.h, main/gamecntl.c, main/gamerend.c, main/gameseq.c, main/gameseq.h, main/gauges.c, main/inferno.c, main/kconfig.c, main/laser.c, main/menu.c, main/multi.c, main/net_ipx.c, main/net_udp.c, main/physics.c, main/player.h, main/render.c, main/state.c, main/titles.c, main/titles.h, misc/args.c: Moved all these unsorted global cheat variables to a handy structure; Simplified reading of the cheats without trying to make it complicated so no one finds them (everyone can get the source); Removed one or two cheats which carry more garbage than they are worth; Added replacement for the bittersweet cheat; Made FPS Counter an option of Graphics menu
main/credits.c, main/titles.c: For credits and briefings moved all code happened in EVENT_IDLE to EVENT_WINDOW_DRAW since a jitterish Joystick could slow down text rendering
20110212
--------

View file

@ -83,6 +83,14 @@ int credits_handler(window *wind, d_event *event, credits *cr)
break;
case EVENT_IDLE:
if (cr->done>NUM_LINES)
{
window_close(wind);
return 0;
}
break;
case EVENT_WINDOW_DRAW:
timer_delay(F1_0/17);
if (cr->row == 0)
@ -115,14 +123,6 @@ int credits_handler(window *wind, d_event *event, credits *cr)
}
}
if (cr->done>NUM_LINES)
{
window_close(wind);
return 0;
}
break;
case EVENT_WINDOW_DRAW:
y = cr->first_line_offset - cr->row;
show_fullscr(&cr->backdrop);
for (j=0; j<NUM_LINES; j++ ) {

View file

@ -1058,7 +1058,9 @@ int briefing_handler(window *wind, d_event *event, briefing *br)
break;
}
case EVENT_IDLE:
case EVENT_WINDOW_DRAW:
gr_set_current_canvas(NULL);
timer_delay2(50);
if (!(br->new_screen || br->new_page))
@ -1069,10 +1071,6 @@ int briefing_handler(window *wind, d_event *event, briefing *br)
break;
}
check_text_pos(br);
break;
case EVENT_WINDOW_DRAW:
gr_set_current_canvas(NULL);
if (br->background.bm_data)
show_fullscr(&br->background);