Commit graph

173 commits

Author SHA1 Message Date
Kp 01e1b28d71 Replace useless printf with puts 2017-12-05 05:29:55 +00:00
Kp 3fbc710ec5 Move various SDL-only scanline functions to !DXX_USE_OGL
The OGL build compiles, but does not use, various scanline functions.
Move these to be built only for the SDL build.
2017-11-01 02:01:20 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp a815541ef5 Fix check_header_includes=1 poison.h 2017-02-19 19:33:36 +00:00
Kp 171e87a1e7 Fix failure to unmap custom hogs 2016-12-17 18:39:18 +00:00
zico 78ad83a134 Fixed compile-time errors when using use_udp=0. Still some warnings but it builds. 2016-10-31 11:21:59 +01:00
Kp c006d068d8 Restructure PHYSFSX read helpers into template function 2016-10-17 03:49:31 +00:00
Kp 2d8928958d Fix some use_udp=0 build breaks
The build is still broken for use_udp=0.
2016-10-08 23:24:22 +00:00
Kp f24e9f836c Rename MAX_JOYSTICKS to DXX_MAX_JOYSTICKS
Rename symbol MAX_JOYSTICKS to DXX_MAX_JOYSTICKS to show that it is a DXX
symbol, not one inherited from a library.

git grep -lzw MAX_JOYSTICKS -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_JOYSTICKS\>/DXX_&/g'
2016-09-25 04:52:48 +00:00
Kp 62b58e9890 Move OGL to dxxsconf.h; rename to DXX_USE_OGL
Rename symbol OGL to DXX_USE_OGL 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 -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR 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 -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp 435aa5a020 Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP
Rename symbol USE_UDP to DXX_USE_UDP 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_UDP -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(USE_UDP\)$/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(USE_UDP\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
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