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:
parent
76002c1775
commit
9424a5be86
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
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
|
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
|
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
|
||||||
|
|
|
@ -174,7 +174,7 @@ void credits_show(char *credits_filename)
|
||||||
y += ROW_SPACING;
|
y += ROW_SPACING;
|
||||||
}
|
}
|
||||||
|
|
||||||
timer_delay2(25);
|
timer_delay(F1_0/25);
|
||||||
|
|
||||||
//see if redbook song needs to be restarted
|
//see if redbook song needs to be restarted
|
||||||
songs_check_redbook_repeat();
|
songs_check_redbook_repeat();
|
||||||
|
|
|
@ -293,10 +293,9 @@ int main(int argc,char *argv[])
|
||||||
if (cfile_init("d1xrdata.zip", 0))
|
if (cfile_init("d1xrdata.zip", 0))
|
||||||
con_printf(CON_NORMAL, "Added d1xrdata.zip for additional content\n");
|
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)
|
if (SDL_Init(SDL_INIT_VIDEO)<0)
|
||||||
Error("SDL library initialisation failed: %s.",SDL_GetError());
|
Error("SDL library initialisation failed: %s.",SDL_GetError());
|
||||||
atexit(SDL_Quit);
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
freopen( "CON", "w", stdout );
|
freopen( "CON", "w", stdout );
|
||||||
|
@ -455,7 +454,9 @@ int main(int argc,char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
error_init(NULL, NULL); // clear error func (won't have newmenu stuff loaded)
|
error_init(NULL, NULL); // clear error func (won't have newmenu stuff loaded)
|
||||||
|
newmenu_close();
|
||||||
piggy_close();
|
piggy_close();
|
||||||
|
SDL_Quit();
|
||||||
|
|
||||||
return(0); //presumably successful exit
|
return(0); //presumably successful exit
|
||||||
}
|
}
|
||||||
|
|
28
main/menu.c
28
main/menu.c
|
@ -329,35 +329,31 @@ void do_option ( int select)
|
||||||
|
|
||||||
#ifdef NETWORK
|
#ifdef NETWORK
|
||||||
case MENU_START_IPX_NETGAME:
|
case MENU_START_IPX_NETGAME:
|
||||||
case MENU_JOIN_IPX_NETGAME:
|
NetDrvSet(NETPROTO_IPX);
|
||||||
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();
|
network_start_game();
|
||||||
}
|
break;
|
||||||
else // MENU_JOIN_*_NETGAME
|
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();
|
network_join_game();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Browse the available UDP/IP games by contacting tracker...
|
// Browse the available UDP/IP games by contacting tracker...
|
||||||
case MENU_BROWSE_UDP_NETGAME:
|
case MENU_BROWSE_UDP_NETGAME:
|
||||||
{
|
{
|
||||||
// Initialize UDP/IP network subsystem for this platform...
|
// Initialize UDP/IP network subsystem for this platform...
|
||||||
NetDrvSet(NETPROTO_UDP);
|
NetDrvSet(NETPROTO_UDP);
|
||||||
|
|
||||||
// Invoke the browse UDP/IP network game GUI...
|
// Invoke the browse UDP/IP network game GUI...
|
||||||
TrackerBrowseMenu();
|
TrackerBrowseMenu();
|
||||||
|
|
||||||
// Done...
|
// Done...
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MENU_START_UDP_NETGAME:
|
case MENU_START_UDP_NETGAME:
|
||||||
NetDrvSet(NETPROTO_UDP);
|
NetDrvSet(NETPROTO_UDP);
|
||||||
network_start_game();
|
network_start_game();
|
||||||
|
|
|
@ -112,7 +112,6 @@ void nm_draw_background1(char * filename)
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
{
|
{
|
||||||
if (nm_background1.bm_data == NULL) {
|
if (nm_background1.bm_data == NULL) {
|
||||||
atexit( newmenu_close );
|
|
||||||
gr_init_bitmap_data (&nm_background1);
|
gr_init_bitmap_data (&nm_background1);
|
||||||
pcx_error = pcx_read_bitmap( filename, &nm_background1, BM_LINEAR, gr_palette );
|
pcx_error = pcx_read_bitmap( filename, &nm_background1, BM_LINEAR, gr_palette );
|
||||||
Assert(pcx_error == PCX_ERROR_NONE);
|
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;
|
int pcx_error;
|
||||||
ubyte background_palette[768];
|
ubyte background_palette[768];
|
||||||
atexit( newmenu_close );
|
|
||||||
gr_init_bitmap_data (&nm_background);
|
gr_init_bitmap_data (&nm_background);
|
||||||
pcx_error = pcx_read_bitmap(MENU_BACKGROUND_BITMAP,&nm_background,BM_LINEAR,background_palette);
|
pcx_error = pcx_read_bitmap(MENU_BACKGROUND_BITMAP,&nm_background,BM_LINEAR,background_palette);
|
||||||
Assert(pcx_error == PCX_ERROR_NONE);
|
Assert(pcx_error == PCX_ERROR_NONE);
|
||||||
|
|
Loading…
Reference in a new issue