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

View file

@ -30,6 +30,11 @@ void net_udp_send_netgame_update();
#endif
#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_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_MAX_NETGAMES 3000
#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 "gauges.h"
#include "console.h"
#ifdef USE_UDP
#include "net_udp.h"
#endif
#define MAX_ARGS 1000
#define INI_FILENAME "d2x.ini"
@ -179,13 +182,17 @@ void ReadCmdArgs(void)
// Multiplayer Options
#ifdef USE_IPX
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.MplUdpMyPort = get_int_arg("-udp_myport", 0);
#ifdef USE_TRACKER
GameArg.MplTrackerAddr = get_str_arg("-tracker_hostaddr", "dxxtracker.reenigne.net");
GameArg.MplTrackerPort = get_int_arg("-tracker_hostport", 42420);
GameArg.MplTrackerAddr = get_str_arg("-tracker_hostaddr", TRACKER_ADDR_DEFAULT);
GameArg.MplTrackerPort = get_int_arg("-tracker_hostport", TRACKER_PORT_DEFAULT);
#endif
#endif
#ifdef EDITOR