Commit graph

100 commits

Author SHA1 Message Date
Kp e33f7f751b Move SysShowCmdHelp to CGameArg
Both games support SysShowCmdHelp.  Move it to the common structure.
2015-11-24 04:05:35 +00:00
Kp d4511b3128 Move SysNoHogDir to CGameArg
Both games support SysNoHogDir.  Move it to the common structure.
2015-11-24 04:05:35 +00:00
Kp 9981dc622e Move SysMissionDir to CGameArg
Both games support SysMissionDir.  Move it to the common structure.
2015-11-24 04:05:35 +00:00
Kp 64dee5d52a Move SysMaxFPS to CGameArg
Both games support SysMaxFPS.  Move it to the common structure.
2015-11-24 04:05:35 +00:00
Kp 5def3b0733 Fix Valgrind warning in PHYSFSX init 2015-10-24 03:13:11 +00:00
Kp 21057db809 Move DbgSafelog, DbgVerbose to CArg 2015-10-18 21:01:21 +00:00
Kp 7b28dc7110 Remove PHYSFSX_getRealPath assert(*stdPath!='/')
If the user configures the jukebox to play music from outside the
virtual directory, then stdPath can be absolute.
2015-10-18 21:01:19 +00:00
Kp 03b57abff0 Add $D*X_REBIRTH_HOME and $REBIRTH_HOME to override default path
Previously, Rebirth on __unix__ always set the write directory to
"~/.d*x-rebirth" (or "~/Library/Preferences/D*X Rebirth/" on Mac).  Add
$D*X_REBIRTH_HOME and $REBIRTH_HOME to override it.  If
$D*X_REBIRTH_HOME is set, use that.  If not, then try $REBIRTH_HOME.  If
that is also unset, then use the hardcoded default.
2015-10-18 00:34:00 +00:00
Kp a0919bf345 Add support for -add-missions-dir 2015-10-11 22:21:00 +00:00
Kp 02754f9ada Reduce PHYSFSX_getRealPath length checks 2015-10-11 22:21:00 +00:00
Kp a37bae4b4f Track output size for PHYSFSX_getRealPath 2015-10-11 22:21:00 +00:00
Kp 927618e650 Remove useless PHYSFS_eof tests
Each test triggers a system seek call.  EOF will be signalled by
PHYSFSX_fgets returning nullptr.
2015-10-09 02:46:11 +00:00
Kp a4826a2f75 Defer PHYSFS_tell in PHYSFSX_fgets 2015-10-09 02:46:11 +00:00
Kp 29f79f0a6b Enable -notitles for Descent 2 2015-10-09 02:46:09 +00:00
Kp da4d1e0670 Remove bool SysNoHogDir on non-unix 2015-09-22 02:28:38 +00:00
Kp 80f47ec7d9 Cache PHYSFS writedir/separator 2015-09-22 02:28:38 +00:00
Kp 204b608fa6 Normalize MACH&&APPLE vs APPLE&&MACH 2015-09-13 20:23:05 +00:00
Kp be3ab3bd81 Use range_for in PHYSFSX_checkMatchingExtension 2015-08-14 03:02:04 +00:00
Kp fa9f2e626d Move DbgShowMemInfo to CArg
Members of Arg are not visible to common code, so common/mem/mem.cpp
broke during the -Wodr cleanup.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/114>
Fixes: 6bd93e466f ("Guard args.h for LTO -Wodr")
2015-08-11 03:05:55 +00:00
Kp a58e8f87a0 Move similar/misc/hash.cpp -> common/misc/hash.cpp 2015-07-18 21:01:56 +00:00
Kp 6bd93e466f Guard args.h for LTO -Wodr 2015-07-18 21:01:56 +00:00
Kp 4c200342dd Use range_for for PHYSFS archive types 2015-07-18 21:01:55 +00:00
Kp 968cdbecf4 Add non-aborting UserError for user-caused fatal errors 2015-06-16 03:15:40 +00:00
Kp 29f239d6b1 Raise PHYSFSX_exists bool check to caller
All callers use a constant value, so raise the check into the caller to
let the optimizer delete the unnecessary branch.
2015-05-09 17:39:02 +00:00
Kp fc4b686d9d Store PHYSFS_list element count in list when needed 2015-05-09 17:38:57 +00:00
Kp c3925353fd Use null_sentinel_iterator for PHYSFS_list_t 2015-04-26 20:15:51 +00:00
Kp 143c536c77 Use PHYSFS_list_t for more functions 2015-04-26 20:15:50 +00:00
Kp 84c638ed64 Move PHYSFS_list_t to separate header 2015-04-19 04:18:49 +00:00
derhass 639b569496 Merge branch 'unification/master' into unification/syncgl_v2
Conflicts:
	similar/arch/ogl/gr.cpp
	similar/misc/args.cpp
2015-03-23 20:18:17 +01:00
Kp 7bf49fe551 Fix clang -Wmissing-braces warnings 2015-03-22 18:49:21 +00:00
Kp 08f6ad4bc7 Enable nested INI files 2015-03-22 18:49:21 +00:00
Kp 098bd2a9df Move exception std::string 2015-03-22 18:49:21 +00:00
Kp 9ddea5f570 Reduce lifetime of Args 2015-03-22 18:49:20 +00:00
derhass 2cd73b6dfe Import the syncgl patch based on 0.58.1 into unification code base
I also changed the command line arguments a bit, gl_syncmethod and
gl_sycnwait are used now. Furthermore, I added the ew mode AUTO. This is
a conservative mode and the default for now: if GL_ARB_sync is available,
use the FENCE_SLEEP mode, otherwise, disable it completely.

Conflicts:
	include/args.h
	misc/args.c
	similar/arch/ogl/gr.cpp
2015-03-22 18:17:11 +01:00
Kp 07869d9dba Add automatic demo recording
Various users want automatic demo recording.  Add new command line options:
	-auto-record-demo	start recording on level entry
	-record-demo-format	set demo name automatically

For -record-demo-format, specify a template containing any mix of strftime
insertions, variable insertions, and literal text.  As a special case, specify
"." to use the builtin template "%Y%m%d.%H%M%S-$p-$m".  Most users should use
".".  Supported variables:
	$p	name of pilot recording the demo
	$m	name of msn/mn2 file played

Suggested by jeffersoncarpenter in https://github.com/dxx-rebirth/dxx-rebirth/pull/33, but implemented by vLKp.
2015-02-28 19:36:02 +00:00
Kp 03576a28c2 Pass PHYSFSX_* file extensions as counted array 2015-02-14 22:48:28 +00:00
Kp 91cc111295 Provide SndDisableSdlMixer=true if !USE_SDLMIXER
Accept -nosdlmixer as a no-op in !USE_SDLMIXER builds.
2015-02-08 17:43:29 +00:00
Kp 4c8f3a47b5 Convert frequently used casts to C++ casts 2015-02-05 03:03:49 +00:00
Kp d2f0bdc867 Exit cleanly on bad command line arguments 2015-01-28 03:42:53 +00:00
Kp 3ca442cb33 Use arg_port_number for -udp_hostport 2015-01-25 05:32:44 +00:00
Kp 9597147283 Centralize argument port number conversion 2015-01-24 19:16:35 +00:00
Kp 6bc48b7876 Add option -no-tracker to suppress tracker for one run 2015-01-24 19:16:35 +00:00
Kp 18a64e4281 Use RAII for PHYSFS_enumerateFiles result 2015-01-23 03:55:05 +00:00
Kp e8a80d32cb Refactor PHYSFSX_findFiles 2015-01-23 03:55:05 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 8c27a7d68e Require known size for PHYSFSX_fgets 2015-01-12 00:26:03 +00:00
Kp 98acd3e261 Poison PHYSFSX_fgets buffer on read failure 2015-01-12 00:26:02 +00:00
Kp 7c8c55b80c Clean PHYSFSX_fgets buffer uniformly 2014-12-20 04:36:10 +00:00
Kp 690fc5276c Propagate for variables in similar/misc/physfsx.cpp 2014-09-26 02:42:12 +00:00