diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 77b3fddc8..129fb440e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/main/credits.c b/main/credits.c index 190d38e8b..31ab31f05 100644 --- a/main/credits.c +++ b/main/credits.c @@ -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(); diff --git a/main/inferno.c b/main/inferno.c index 33d2a03b2..5bd928add 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -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 } diff --git a/main/menu.c b/main/menu.c index afb09362e..850b387ea 100644 --- a/main/menu.c +++ b/main/menu.c @@ -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(); diff --git a/main/newmenu.c b/main/newmenu.c index 60a5311bc..91eb11363 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -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);