Commit graph

77 commits

Author SHA1 Message Date
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
Kp 84e5cee376 Propagate for variables in similar/misc/args.cpp 2014-09-26 02:42:12 +00:00
Kp 5571cf75ef Ignore -udp_myport requests for reserved port 2014-09-17 02:16:33 +00:00
Kp e8f4b20d1d Use special type for PHYSFSX_fgets 2014-09-07 20:07:20 +00:00
Kp 07176ece8b Add Valgrind poison stubs 2014-09-07 19:39:18 +00:00
Kp b29f2ef7bd Replace hashtable with std::map 2014-08-02 00:46:56 +00:00
Kp bd1c6d8c5d Reduce header includes of physfsx.h 2014-07-22 23:48:23 +00:00
Kp 36685d3938 Fix off-by-one bugs in bmread workaround 2014-07-02 02:29:35 +00:00
Kp deb700950f Work around bmread use of uninitialized memory
bmread copies from a stale pointer into a local buffer.  If the stale
pointer points to null bytes, this is stupid but harmless.  If the stale
pointer points to a large run of non-null bytes, this crashes the game.
Modify PHYSFSX_fgets to clear the unused portion of the return buffer to
work around this bmread bug.  Otherwise using shareware data crashes the
game at startup.
2014-06-28 23:30:46 +00:00
Kp ecce4c6745 Ignore INI lines that start with ; 2014-06-22 21:56:41 +00:00
Kp b3c953375c Read lines in blocks 2014-06-22 21:56:03 +00:00
zico c96aece6d2 Removed PARALLAX banner from source files that were not released by PARALLAX; most importantly C source code translated from Assembler and args.cpp which was rewritten from scratch 2014-06-12 10:41:03 +02:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp facb6a3598 Add console prints of PhysFS search path changes 2013-12-28 18:16:19 +00:00
Kp 7fb4c6307f Add debug option -no-grab to prevent window grabbing 2013-12-22 20:56:55 +00:00
Kp cb4fd7c1b4 Compact known file extension storage 2013-12-13 03:58:01 +00:00
Kp 4dfceab50b Factor out file extension filtering 2013-12-13 03:51:14 +00:00
Kp 322c61ef01 Remove use of heap-based splitword 2013-12-08 21:43:53 +00:00
Kp dd6a89221b Move demo file mount paths onto PHYSFSX_removeArchiveContent stack 2013-12-08 18:26:20 +00:00
Kp 11dc06b462 Move file search paths onto PHYSFSX_removeArchiveContent stack 2013-12-08 18:26:20 +00:00
Kp 04fb0c721c Move demo file mount paths onto PHYSFSX_addArchiveContent stack 2013-12-08 18:26:20 +00:00
Kp 0b99c6abf6 Move file search paths onto PHYSFSX_addArchiveContent stack 2013-12-08 18:26:20 +00:00
Kp 75c229c6bf Normalize con_printf newline usage 2013-12-07 21:13:37 +00:00