Made formatting for help text more consistent and prettier; Somewhat changed the code for help text so we can use variables in the help text. For example: If we change MAXIMUM_FPS, it will automatically be displayed in the help text without manual editing needed

This commit is contained in:
zicodxx 2011-07-01 01:00:59 +02:00
parent 8a6839e8a1
commit a973da9432
5 changed files with 122 additions and 99 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog D2X-Rebirth Changelog
20110701
--------
d2x.ini, main/inferno.c, main/net_udp.h, misc/args.c: Made formatting for help text more consistent and prettier; Somewhat changed the code for help text so we can use variables in the help text. For example: If we change MAXIMUM_FPS, it will automatically be displayed in the help text without manual editing needed
20110630 20110630
-------- --------
editor/group.c, editor/ksegsize.c, editor/meddraw.c, editor/segment.c, editor/seguvs.c, include/editor/editor.h, main/automap.c, main/fireball.c, main/gamecntl.c, main/gameseg.c, main/gameseg.h, main/lighting.c, main/render.c, main/render.h, main/segment.h: changed variables and pointer carrying vertex indexes from short to int to handle levels with over 900 segments properly editor/group.c, editor/ksegsize.c, editor/meddraw.c, editor/segment.c, editor/seguvs.c, include/editor/editor.h, main/automap.c, main/fireball.c, main/gamecntl.c, main/gameseg.c, main/gameseg.h, main/lighting.c, main/render.c, main/render.h, main/segment.h: changed variables and pointer carrying vertex indexes from short to int to handle levels with over 900 segments properly

88
d2x.ini
View file

@ -1,61 +1,61 @@
System Options: System Options:
;-nonicefps Don't free CPU-cycles ;-nonicefps Don't free CPU-cycles
;-maxfps <n> Set maximum framerate (1-200) ;-maxfps <n> Set maximum framerate to <n> (default: 1000, availble: 1-1000)
;-hogdir <s> set shared data directory to <dir> ;-hogdir <s> set shared data directory to <s>
;-nohogdir don't try to use shared data directory ;-nohogdir don't try to use shared data directory
;-use_players_dir put player files and saved games in Players subdirectory ;-use_players_dir put player files and saved games in Players subdirectory
;-lowmem Lowers animation detail for better performance with low memory ;-lowmem Lowers animation detail for better performance with low memory
;-pilot <s> Select this pilot automatically ;-pilot <s> Select pilot <s> automatically
;-autodemo Start in demo mode ;-autodemo Start in demo mode
;-window Run the game in a window ;-window Run the game in a window
;-nomovies Don't play movies ;-noborders Do not show borders in window mode
;-noborders Do not show borders in window mode ;-nomovies Don't play movies
Controls: Controls:
;-nomouse Deactivate mouse ;-nomouse Deactivate mouse
;-nojoystick Deactivate joystick ;-nojoystick Deactivate joystick
;-nostickykeys Make CapsLock and NumLock non-sticky so they can be used as normal keys ;-nostickykeys Make CapsLock and NumLock non-sticky
Sound: Sound:
;-nosound Disables sound output ;-nosound Disables sound output
;-nomusic Disables music output ;-nomusic Disables music output
;-sound11k Use 11KHz sounds ;-sound11k Use 11KHz sounds
;-nosdlmixer Disable Sound output via SDL_mixer ;-nosdlmixer Disable Sound output via SDL_mixer
Graphics: Graphics:
;-lowresfont Force to use LowRes fonts ;-lowresfont Force to use LowRes fonts
;-lowresgraphics Force to use LowRes graphics ;-lowresgraphics Force to use LowRes graphics
;-lowresmovies Play low resolution movies if available (for slow machines) ;-lowresmovies Play low resolution movies if available (for slow machines)
;-gl_fixedfont Do not scale fonts to current resolution ;-gl_fixedfont Do not scale fonts to current resolution
Multiplayer: Multiplayer:
;-ipxnetwork <n> Use IPX network number <n> ;-ipxnetwork <n> Use IPX network number <n>
;-udp_hostaddr <n> When manually joining a game use default IP Address <n> to connect to ;-udp_hostaddr <s> Use IP address/Hostname <s> for manual game joining (default: localhost)
;-udp_hostport <n> When manually joining a game use default UDP Port <n> to connect to ;-udp_hostport <n> Use UDP port <n> for manual game joining (default: 42424)
;-udp_myport <n> When hosting/joining a game use default UDP Port <n> to send packets from ;-udp_myport <n> Set my own UDP port to <n> (default: 42424)
;-tracker_hostaddr <n> Address of Tracker server to register/query games to/from (default: dxxtracker.reenigne.net) ;-tracker_hostaddr <n> Address of Tracker server to register/query games to/from (default: dxxtracker.reenigne.net)
;-tracker_hostport <n> Port of Tracker server to register/query games to/from (default: 42420) ;-tracker_hostport <n> Port of Tracker server to register/query games to/from (default: 42420)
Debug (use only if you know what you're doing): Debug (use only if you know what you're doing):
;-debug Enable very verbose output ;-debug Enable very verbose output
;-verbose Shows initialization steps for tech support ;-verbose Shows initialization steps for tech support
;-norun Bail out after initialization ;-norun Bail out after initialization
;-renderstats Enable renderstats info by default ;-renderstats Enable renderstats info by default
;-text <s> Specify alternate .tex file ;-text <s> Specify alternate .tex file
;-tmap <s> Select texmapper to use (c,fp,quad,i386) ;-tmap <s> Select texmapper <s> to use (default: c, available: c, fp, quad, i386)
;-showmeminfo Show memory statistics ;-showmeminfo Show memory statistics
;-nodoublebuffer Disable Doublebuffering ;-nodoublebuffer Disable Doublebuffering
;-bigpig Use uncompressed RLE bitmaps ;-bigpig Use uncompressed RLE bitmaps
;-16bpp Use 16Bpp instead of 32Bpp ;-16bpp Use 16Bpp instead of 32Bpp
;-gl_oldtexmerge Use old texmerge, uses more ram, but _might_ be a bit faster ;-gl_oldtexmerge Use old texmerge, uses more ram, but might be faster
;-gl_intensity4_ok <n> Override DbgGlIntensity4Ok - Default: 1 ;-gl_intensity4_ok <n> Override DbgGlIntensity4Ok (default: 1)
;-gl_luminance4_alpha4_ok <n> Override DbgGlLuminance4Alpha4Ok - Default: 1 ;-gl_luminance4_alpha4_ok <n> Override DbgGlLuminance4Alpha4Ok (default: 1)
;-gl_rgba2_ok <n> Override DbgGlRGBA2Ok - Default: 1 ;-gl_rgba2_ok <n> Override DbgGlRGBA2Ok (default: 1)
;-gl_readpixels_ok <n> Override DbgGlReadPixelsOk - Default: 1 ;-gl_readpixels_ok <n> Override DbgGlReadPixelsOk (default: 1)
;-gl_gettexlevelparam_ok <n> Override DbgGlGetTexLevelParamOk - Default: 1 ;-gl_gettexlevelparam_ok <n> Override DbgGlGetTexLevelParamOk (default: 1)

View file

@ -95,6 +95,9 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR
#include "ui.h" #include "ui.h"
#endif #endif
#include "vers_id.h" #include "vers_id.h"
#ifdef USE_UDP
#include "net_udp.h"
#endif
//Current version number //Current version number
@ -118,83 +121,87 @@ extern void arch_init(void);
void print_commandline_help() void print_commandline_help()
{ {
printf( "\n System Options:\n\n"); printf( "\n System Options:\n\n");
printf( " -nonicefps %s\n", "Don't free CPU-cycles"); printf( " -nonicefps Don't free CPU-cycles\n");
printf( " -maxfps <n> %s\n", "Set maximum framerate (1-200)"); printf( " -maxfps <n> Set maximum framerate to <n>\n\t\t\t\t(default: %i, availble: 1-%i)\n", MAXIMUM_FPS, MAXIMUM_FPS);
printf( " -hogdir <s> %s\n", "set shared data directory to <dir>"); printf( " -hogdir <s> set shared data directory to <s>\n");
printf( " -nohogdir %s\n", "don't try to use shared data directory"); printf( " -nohogdir don't try to use shared data directory\n");
printf( " -use_players_dir %s\n", "put player files and saved games in Players subdirectory"); printf( " -use_players_dir put player files and saved games in Players subdirectory\n");
printf( " -lowmem %s\n", "Lowers animation detail for better performance with low memory"); printf( " -lowmem Lowers animation detail for better performance with\n\t\t\t\tlow memory\n");
printf( " -pilot <s> %s\n", "Select this pilot automatically"); printf( " -pilot <s> Select pilot <s> automatically\n");
printf( " -autodemo %s\n", "Start in demo mode"); printf( " -autodemo Start in demo mode\n");
printf( " -window %s\n", "Run the game in a window"); printf( " -window Run the game in a window\n");
printf( " -noborders %s\n", "Do not show borders in window mode"); printf( " -noborders Do not show borders in window mode\n");
printf( " -nomovies %s\n", "Don't play movies"); printf( " -nomovies Don't play movies\n");
printf( "\n Controls:\n\n"); printf( "\n Controls:\n\n");
printf( " -nomouse %s\n", "Deactivate mouse"); printf( " -nomouse Deactivate mouse\n");
printf( " -nojoystick %s\n", "Deactivate joystick"); printf( " -nojoystick Deactivate joystick\n");
printf( " -nostickykeys %s\n", "Make CapsLock and NumLock non-sticky so they can be used as normal keys"); printf( " -nostickykeys Make CapsLock and NumLock non-sticky\n");
printf( "\n Sound:\n\n"); printf( "\n Sound:\n\n");
printf( " -nosound %s\n", "Disables sound output"); printf( " -nosound Disables sound output\n");
printf( " -nomusic %s\n", "Disables music output"); printf( " -nomusic Disables music output\n");
printf( " -sound11k %s\n", "Use 11KHz sounds"); printf( " -sound11k Use 11KHz sounds\n");
#ifdef USE_SDLMIXER #ifdef USE_SDLMIXER
printf( " -nosdlmixer %s\n", "Disable Sound output via SDL_mixer"); printf( " -nosdlmixer Disable Sound output via SDL_mixer\n");
#endif // USE SDLMIXER #endif // USE SDLMIXER
printf( "\n Graphics:\n\n"); printf( "\n Graphics:\n\n");
printf( " -lowresfont %s\n", "Force to use LowRes fonts"); printf( " -lowresfont Force to use LowRes fonts\n");
printf( " -lowresgraphics %s\n", "Force to use LowRes graphics"); printf( " -lowresgraphics Force to use LowRes graphics\n");
printf( " -lowresmovies %s\n", "Play low resolution movies if available (for slow machines)"); printf( " -lowresmovies Play low resolution movies if available (for slow machines)\n");
#ifdef OGL #ifdef OGL
printf( " -gl_fixedfont %s\n", "Do not scale fonts to current resolution"); printf( " -gl_fixedfont Do not scale fonts to current resolution\n");
#endif // OGL #endif // OGL
#ifdef NETWORK #if defined(USE_IPX) || defined(USE_UDP)
printf( "\n Multiplayer:\n\n"); printf( "\n Multiplayer:\n\n");
printf( " -ipxnetwork <n> %s\n", "Use IPX network number <n>"); #ifdef USE_IPX
printf( " -udp_hostaddr <n> %s\n", "When manually joining a game use default IP Address <n> to connect to"); printf( " -ipxnetwork <n> Use IPX network number <n>\n");
printf( " -udp_hostport <n> %s\n", "When manually joining a game use default UDP Port <n> to connect to"); #endif
printf( " -udp_myport <n> %s\n", "When hosting/joining a game use default UDP Port <n> to send packets from"); #ifdef USE_UDP
printf( " -udp_hostaddr <s> Use IP address/Hostname <s> for manual game joining\n\t\t\t\t(default: %s)\n", UDP_MANUAL_ADDR_DEFAULT);
printf( " -udp_hostport <n> Use UDP port <n> for manual game joining (default: %i)\n", UDP_PORT_DEFAULT);
printf( " -udp_myport <n> Set my own UDP port to <n> (default: %i)\n", UDP_PORT_DEFAULT);
#ifdef USE_TRACKER #ifdef USE_TRACKER
printf( " -tracker_hostaddr <n> %s\n", "Address of Tracker server to register/query games to/from (default: dxxtracker.reenigne.net)"); printf( " -tracker_hostaddr <n> Address of Tracker server to register/query games to/from\n\t\t\t\t(default: %s)\n", TRACKER_ADDR_DEFAULT);
printf( " -tracker_hostport <n> %s\n", "Port of Tracker server to register/query games to/from (default: 42420)"); printf( " -tracker_hostport <n> Port of Tracker server to register/query games to/from\n\t\t\t\t(default: %i)\n", TRACKER_PORT_DEFAULT);
#endif // USE_TRACKER #endif // USE_TRACKER
#endif // NETWORK #endif // USE_UDP
#endif // defined(USE_IPX) || defined(USE_UDP)
#ifdef EDITOR #ifdef EDITOR
printf( "\n Editor:\n\n"); printf( "\n Editor:\n\n");
printf( " -autoload <s> %s\n", "Autoload a level in the editor"); printf( " -autoload <s> Autoload level <s> in the editor\n");
printf( " -macdata %s\n", "Read and write mac data files in editor (swap colors)"); printf( " -macdata Read and write mac data files in editor (swap colors)\n");
printf( " -hoarddata %s\n", "Make the hoard ham file from some files, then exit"); printf( " -hoarddata Make the hoard ham file from some files, then exit\n");
#endif // EDITOR #endif // EDITOR
printf( "\n Debug (use only if you know what you're doing):\n\n"); printf( "\n Debug (use only if you know what you're doing):\n\n");
printf( " -debug %s\n", "Enable very verbose output"); printf( " -debug Enable very verbose output\n");
printf( " -verbose %s\n", "Shows initialization steps for tech support"); printf( " -verbose Shows initialization steps for tech support\n");
printf( " -norun %s\n", "Bail out after initialization"); printf( " -norun Bail out after initialization\n");
printf( " -renderstats %s\n", "Enable renderstats info by default"); printf( " -renderstats Enable renderstats info by default\n");
printf( " -text <s> %s\n", "Specify alternate .tex file"); printf( " -text <s> Specify alternate .tex file\n");
printf( " -tmap <s> %s\n", "Select texmapper to use (c,fp,quad,i386)"); printf( " -tmap <s> Select texmapper <s> to use\n\t\t\t\t(default: c, available: c, fp, quad, i386)\n");
printf( " -showmeminfo %s\n", "Show memory statistics"); printf( " -showmeminfo Show memory statistics\n");
printf( " -nodoublebuffer %s\n", "Disable Doublebuffering"); printf( " -nodoublebuffer Disable Doublebuffering\n");
printf( " -bigpig %s\n", "Use uncompressed RLE bitmaps"); printf( " -bigpig Use uncompressed RLE bitmaps\n");
printf( " -16bpp %s\n", "Use 16Bpp instead of 32Bpp"); printf( " -16bpp Use 16Bpp instead of 32Bpp\n");
#ifdef OGL #ifdef OGL
printf( " -gl_oldtexmerge %s\n", "Use old texmerge, uses more ram, but _might_ be a bit faster"); printf( " -gl_oldtexmerge Use old texmerge, uses more ram, but might be faster\n");
printf( " -gl_intensity4_ok <n> %s\n", "Override DbgGlIntensity4Ok - Default: 1"); printf( " -gl_intensity4_ok <n> Override DbgGlIntensity4Ok (default: 1)\n");
printf( " -gl_luminance4_alpha4_ok <n> %s\n", "Override DbgGlLuminance4Alpha4Ok - Default: 1"); printf( " -gl_luminance4_alpha4_ok <n> Override DbgGlLuminance4Alpha4Ok (default: 1)\n");
printf( " -gl_rgba2_ok <n> %s\n", "Override DbgGlRGBA2Ok - Default: 1"); printf( " -gl_rgba2_ok <n> Override DbgGlRGBA2Ok (default: 1)\n");
printf( " -gl_readpixels_ok <n> %s\n", "Override DbgGlReadPixelsOk - Default: 1"); printf( " -gl_readpixels_ok <n> Override DbgGlReadPixelsOk (default: 1)\n");
printf( " -gl_gettexlevelparam_ok <n> %s\n", "Override DbgGlGetTexLevelParamOk - Default: 1"); printf( " -gl_gettexlevelparam_ok <n> Override DbgGlGetTexLevelParamOk (default: 1)\n");
#else #else
printf( " -hwsurface %s\n", "Use SDL HW Surface"); printf( " -hwsurface Use SDL HW Surface\n");
printf( " -asyncblit %s\n", "Use queued blits over SDL. Can speed up rendering"); printf( " -asyncblit Use queued blits over SDL. Can speed up rendering\n");
#endif // OGL #endif // OGL
printf( "\n Help:\n\n"); printf( "\n Help:\n\n");
printf( " -help, -h, -?, ? %s\n", "View this help screen"); printf( " -help, -h, -?, ? View this help screen\n");
printf( "\n\n"); printf( "\n\n");
} }

View file

@ -30,6 +30,11 @@ void net_udp_send_netgame_update();
#endif #endif
#define UDP_BCAST_ADDR "255.255.255.255" #define UDP_BCAST_ADDR "255.255.255.255"
#define UDP_PORT_DEFAULT 42424 // Our default port - easy to remember: D = 4, X = 24, X = 24 #define UDP_PORT_DEFAULT 42424 // Our default port - easy to remember: D = 4, X = 24, X = 24
#define UDP_MANUAL_ADDR_DEFAULT "localhost"
#ifdef USE_TRACKER
#define TRACKER_ADDR_DEFAULT "dxxtracker.reenigne.net"
#define TRACKER_PORT_DEFAULT 42420
#endif
#define UDP_REQ_ID "D2XR" // ID string for a request packet #define UDP_REQ_ID "D2XR" // ID string for a request packet
#define UDP_MAX_NETGAMES 3000 #define UDP_MAX_NETGAMES 3000
#define UDP_NETGAMES_PPAGE 12 // Netgames on one page of Netlist #define UDP_NETGAMES_PPAGE 12 // Netgames on one page of Netlist

View file

@ -29,6 +29,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "game.h" #include "game.h"
#include "gauges.h" #include "gauges.h"
#include "console.h" #include "console.h"
#ifdef USE_UDP
#include "net_udp.h"
#endif
#define MAX_ARGS 1000 #define MAX_ARGS 1000
#define INI_FILENAME "d2x.ini" #define INI_FILENAME "d2x.ini"
@ -179,13 +182,17 @@ void ReadCmdArgs(void)
// Multiplayer Options // Multiplayer Options
#ifdef USE_IPX
GameArg.MplIpxNetwork = get_str_arg("-ipxnetwork", NULL); GameArg.MplIpxNetwork = get_str_arg("-ipxnetwork", NULL);
GameArg.MplUdpHostAddr = get_str_arg("-udp_hostaddr", "localhost"); #endif
#ifdef USE_UDP
GameArg.MplUdpHostAddr = get_str_arg("-udp_hostaddr", UDP_MANUAL_ADDR_DEFAULT);
GameArg.MplUdpHostPort = get_int_arg("-udp_hostport", 0); GameArg.MplUdpHostPort = get_int_arg("-udp_hostport", 0);
GameArg.MplUdpMyPort = get_int_arg("-udp_myport", 0); GameArg.MplUdpMyPort = get_int_arg("-udp_myport", 0);
#ifdef USE_TRACKER #ifdef USE_TRACKER
GameArg.MplTrackerAddr = get_str_arg("-tracker_hostaddr", "dxxtracker.reenigne.net"); GameArg.MplTrackerAddr = get_str_arg("-tracker_hostaddr", TRACKER_ADDR_DEFAULT);
GameArg.MplTrackerPort = get_int_arg("-tracker_hostport", 42420); GameArg.MplTrackerPort = get_int_arg("-tracker_hostport", TRACKER_PORT_DEFAULT);
#endif
#endif #endif
#ifdef EDITOR #ifdef EDITOR