Small Cleanup: Using timer_delay for credits timer as timer_delay2 would respect VSync and change speed of the Credits scrolling; Cleaned that Start/Join Netgame cases up a bit; Removed the excessive use of atexit in newmenu... more to come

This commit is contained in:
zicodxx 2008-11-09 23:51:19 +00:00
parent 76002c1775
commit 9424a5be86
5 changed files with 32 additions and 33 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20081110
--------
main/credits.c, main/inferno.c, main/menu.c, main/newmenu.c: Small Cleanup: Using timer_delay for credits timer as timer_delay2 would respect VSync and change speed of the Credits scrolling; Cleaned that Start/Join Netgame cases up a bit; Removed the excessive use of atexit in newmenu... more to come
20081109
--------
include/args.h, main/inferno.c, main/gamefont.c, main/menu.c, main/game.c, main/gauges.c, main/gauges.h, misc/args.c, d1x.ini, arch/ogl/ogl.c, arch/ogl/gr.c: Always keep aspect scaling (lowest scalar of width and height) for fonts, lines, dots, spheres, reticle and non-Cockpit-/Statusbar-related HUD-elements; Moved the Cockpit alpha decoding to gauges.c and created a seperate bitmap for the alpha fields and create subbitmaps from this one - more memory but this way we do not modify the cockpit bitmap itself

View file

@ -174,7 +174,7 @@ void credits_show(char *credits_filename)
y += ROW_SPACING;
}
timer_delay2(25);
timer_delay(F1_0/25);
//see if redbook song needs to be restarted
songs_check_redbook_repeat();

View file

@ -293,10 +293,9 @@ int main(int argc,char *argv[])
if (cfile_init("d1xrdata.zip", 0))
con_printf(CON_NORMAL, "Added d1xrdata.zip for additional content\n");
// following three lines are arch-code - but do we have to move it just for that?
// following lines are arch-code - but do we have to move it just for that?
if (SDL_Init(SDL_INIT_VIDEO)<0)
Error("SDL library initialisation failed: %s.",SDL_GetError());
atexit(SDL_Quit);
#ifdef _WIN32
freopen( "CON", "w", stdout );
@ -455,7 +454,9 @@ int main(int argc,char *argv[])
#endif
error_init(NULL, NULL); // clear error func (won't have newmenu stuff loaded)
newmenu_close();
piggy_close();
SDL_Quit();
return(0); //presumably successful exit
}

View file

@ -329,35 +329,31 @@ void do_option ( int select)
#ifdef NETWORK
case MENU_START_IPX_NETGAME:
case MENU_JOIN_IPX_NETGAME:
case MENU_START_KALI_NETGAME:
case MENU_JOIN_KALI_NETGAME:
switch (select & ~0x1) {
case MENU_START_IPX_NETGAME: NetDrvSet(NETPROTO_IPX); break;
case MENU_START_KALI_NETGAME: NetDrvSet(NETPROTO_KALINIX); break;
default: Int3();
}
if ((select & 0x1) == 0) // MENU_START_*_NETGAME
{
network_start_game();
}
else // MENU_JOIN_*_NETGAME
network_join_game();
NetDrvSet(NETPROTO_IPX);
network_start_game();
break;
// Browse the available UDP/IP games by contacting tracker...
case MENU_BROWSE_UDP_NETGAME:
{
// Initialize UDP/IP network subsystem for this platform...
NetDrvSet(NETPROTO_UDP);
// Invoke the browse UDP/IP network game GUI...
TrackerBrowseMenu();
// Done...
break;
}
case MENU_JOIN_IPX_NETGAME:
NetDrvSet(NETPROTO_IPX);
network_join_game();
break;
case MENU_START_KALI_NETGAME:
NetDrvSet(NETPROTO_KALINIX);
network_start_game();
break;
case MENU_JOIN_KALI_NETGAME:
NetDrvSet(NETPROTO_KALINIX);
network_join_game();
break;
// Browse the available UDP/IP games by contacting tracker...
case MENU_BROWSE_UDP_NETGAME:
{
// Initialize UDP/IP network subsystem for this platform...
NetDrvSet(NETPROTO_UDP);
// Invoke the browse UDP/IP network game GUI...
TrackerBrowseMenu();
// Done...
break;
}
case MENU_START_UDP_NETGAME:
NetDrvSet(NETPROTO_UDP);
network_start_game();

View file

@ -112,7 +112,6 @@ void nm_draw_background1(char * filename)
if (filename != NULL)
{
if (nm_background1.bm_data == NULL) {
atexit( newmenu_close );
gr_init_bitmap_data (&nm_background1);
pcx_error = pcx_read_bitmap( filename, &nm_background1, BM_LINEAR, gr_palette );
Assert(pcx_error == PCX_ERROR_NONE);
@ -140,7 +139,6 @@ void nm_draw_background(int x1, int y1, int x2, int y2 )
{
int pcx_error;
ubyte background_palette[768];
atexit( newmenu_close );
gr_init_bitmap_data (&nm_background);
pcx_error = pcx_read_bitmap(MENU_BACKGROUND_BITMAP,&nm_background,BM_LINEAR,background_palette);
Assert(pcx_error == PCX_ERROR_NONE);