Commit graph

161 commits

Author SHA1 Message Date
Kp 7c8c2b5aa4 Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER
Rename symbol USE_TRACKER to DXX_USE_TRACKER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_TRACKER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_TRACKER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_TRACKER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp ddf888cd72 Move USE_SDLMIXER to dxxsconf.h; rename to DXX_USE_SDLMIXER
Rename symbol USE_SDLMIXER to DXX_USE_SDLMIXER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct and
inferno.cpp were manual.

git grep -l USE_SDLMIXER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_SDLMIXER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_SDLMIXER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
zico 8e097e79f0 Fixed byte offset in string for SDL_DISABLE_LOCK_KEYS, putting the 1 in place of the 0 instead on the terminator. 2016-09-05 11:31:22 +02:00
zico 6c6a32ba92 Added patch by user 'beware' to remove dark edges around textures and added command-line/INI option to disable this patch if desired (nostalgia). Fixed misleading indentation in ogl.cpp along the way. 2016-08-29 17:07:30 +02:00
Kp a09dce6ead Remove char[N] overload for PHYSFSX_getRealPath 2016-08-06 19:55:25 +00:00
Kp b0821cff55 Fix inverted sense of -use_players_dir
Fixes: 4d483ca88f ("Simplify use of SysUsePlayersDir")
2016-07-22 02:25:17 +00:00
Kp 4d483ca88f Simplify use of SysUsePlayersDir 2016-07-21 01:43:22 +00:00
Kp 231223895d Rewrite simple pointer casts from C style to reinterpret_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\*\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp 7fdce88558 Add parentheses around target of simple casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets.  It also works only on commonly used standard types.

	(int) a->b;	// changed
	(int) a[b];	// not changed

s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
Kp b31446340c Rewrite cast of (ubyte*) to standard type uint8_t
s/(\s*ubyte\s*\*\s*)/(uint8_t *)/g
2016-06-05 01:04:25 +00:00
Kp 0bba26fde5 Move ini.pop_back() into ReadIniArgs
Both callers of ReadIniArgs need the string removed afterward.  Prior to
8fb9a0f, only the parser for `-ini` needed the string removed.  The
caller for the automatic ini file ended and destroyed the container.  As
of 8fb9a0f, the container persists.  Leaving the string in the container
causes a bad error message if the command line is rejected.

It is bad form to have ReadIniArgs pop, but the caller push.  However,
the two callers use different signatures for emplace_back(), so unifying
the push would require calling a suboptimal emplace_back.  Choose the
lesser evil of unbalanced push/pop.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/198>
2016-05-31 00:42:56 +00:00
BuildTools 1de5f510ef Only break on spaes and tabs 2016-05-12 08:15:26 -05:00
BuildTools 8fb9a05f7d Break arguments on any whitespace. Also allow commandline arguments to
override ini arguments. Fixes #180.
2016-05-10 10:54:57 -05:00
Kp 195c589e3f Move file-local classes into anonymous namespace 2016-03-04 04:12:35 +00:00
Kp 217357711f Move some argument processing to dcx 2016-03-02 02:52:44 +00:00
Kp ff67afd440 Propagate partial_range up into PHYSFSX_findFiles family 2016-01-29 04:05:47 +00:00
Kp 92625ff2d0 Fix clang build of CGameArg
clang is confused by the use of a class named dcx.  Move the declaration
into a namespace{} block to avoid this.
2016-01-29 04:05:47 +00:00
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp 823ff63126 Move MplTrackerAddr to CArg 2015-12-24 04:01:29 +00:00
Kp 0b87ff267f Move MplTrackerPort to CArg 2015-12-24 04:01:29 +00:00
Kp 3f9f1f2b49 Move MplUdpMyPort to CArg 2015-12-24 04:01:29 +00:00
Kp 56e77d4fec Move MplUdpHostPort to CArg 2015-12-24 04:01:28 +00:00
Kp 0fb84b883f Move DbgAltTex to CArg 2015-12-24 04:01:28 +00:00
Kp b0e0f48058 Move DbgTexMap to CArg 2015-12-24 04:01:28 +00:00
Kp a91ef00a86 Move DbgNoCompressPigBitmap to CArg 2015-12-24 04:01:28 +00:00
Kp 834258fffa Move DbgNoDoubleBuffer to CArg 2015-12-24 04:01:28 +00:00
Kp 048615f95e Move DbgRenderStats to CArg 2015-12-24 04:01:28 +00:00
Kp 45a287f44b Move DbgNoRun to CArg 2015-12-24 04:01:28 +00:00
Kp ee98ef18f3 Move DbgSdlASyncBlit to CArg 2015-12-24 04:01:28 +00:00
Kp 94616f5e1c Move DbgSdlHWSurface to CArg 2015-12-24 04:01:27 +00:00
Kp 4f14be6056 Move MplUdpHostAddr to CArg 2015-12-24 04:01:27 +00:00
Kp 2c3f64478d Move OglSyncWait to CArg 2015-12-24 04:01:27 +00:00
Kp 9ec7e766cf Move OglSyncMethod to CArg 2015-12-24 04:01:27 +00:00
Kp d7c694b126 Move OglFixedFont to CArg 2015-12-24 04:01:27 +00:00
Kp 679e0adf3d Move SysAutoDemo to CArg 2015-12-24 04:01:27 +00:00
Kp cbd2cd7c54 Move SysNoTitles to CArg 2015-12-24 04:01:27 +00:00
Kp 948fa32f9c Move SysNoBorders to CArg 2015-12-24 04:01:27 +00:00
Kp 4ac7055928 Move SysWindow to CArg 2015-12-24 04:01:27 +00:00
Kp 2629b5b3d9 Move SysAutoRecordDemo to CArg 2015-12-24 04:01:27 +00:00
Kp 93f3162a41 Move SysLowMem to CArg 2015-12-24 04:01:26 +00:00
Kp 2b4447f927 Move SysUsePlayersDir to CArg 2015-12-24 04:01:26 +00:00
Kp 2cea05d0a7 Move SysRecordDemoNameTemplate to CArg 2015-12-24 04:01:26 +00:00
Kp 63cd2dbb6b Move SysPilot to CArg 2015-12-24 04:01:26 +00:00
Kp 584e2ce408 Move SysHogDir to CArg 2015-12-24 04:01:26 +00:00
Kp 9f1abe1910 Move SndNoMusic to CArg 2015-12-24 04:01:26 +00:00
Kp bb3a386b47 Move GfxSkipHiresFNT to CArg 2015-12-24 04:01:26 +00:00
Kp 23bb4c5826 Move SysNoNiceFPS to CArg 2015-12-24 04:01:26 +00:00
Kp 28ee4c1804 Move DbgUseOldTextureMerge to CArg 2015-12-18 04:08:24 +00:00
Kp 900bebe799 Move DbgGlRGBA2Ok to CArg 2015-12-18 04:08:24 +00:00
Kp fa17246b7b Move DbgGlLuminance4Alpha4Ok to CArg 2015-12-18 04:08:24 +00:00