Commit graph

8657 commits

Author SHA1 Message Date
Kp a578c48c53 Add kreator's elaborations to Mac OS X install instructions
Kreator suggested some additional guidance for OS X users who want to
compile Rebirth from source.  This commit is based strongly on his text,
with light editing from me for markdown rules and consistency with other
parts of the document.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/215>
Patch-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/files/465803/mac_tools_doc.patch.txt>
2016-09-11 18:49:16 +00:00
Kp cf0cc3b85b Remove GOG reference from INSTALL.markdown
GOG ceased selling Descent data at the end of 2015 due to licensing
issues.  Remove the reference to their game page.
2016-09-11 18:49:16 +00:00
Kp be691aba0b Move git extra version from DXXProgram to Git 2016-09-11 18:49:16 +00:00
Kp 72e9ed319c Rename VERSION to DXX_VERSION_STR
Rename symbol VERSION to DXX_VERSION_STR to show that it is a DXX
symbol, not one inherited from a library.
2016-09-11 18:49:16 +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 0015b4282c Move IPv6 to dxxsconf.h; rename to DXX_USE_IPv6
Rename symbol IPv6 to DXX_USE_IPv6 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 IPv6 -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(IPv6\)$/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(IPv6\))/#\1if \2DXX_USE_\3/'
2016-09-11 18:49:15 +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
Kp 0249358ccc Fold render_face flashing light tests 2016-09-11 18:49:15 +00:00
Kp 2952857461 Unify calculating green/blue when control_center_destroyed 2016-09-11 18:49:14 +00:00
Kp 4ed4ceece6 Cache references to array elements in render_face
Make the code easier to read by assuring the reader that each array
is always accessed at exactly one index per pass of the loop.
2016-09-11 18:49:14 +00:00
Kp 090852d6cd Defer initializing dyn_light in render_face
Cloaked faces do not require dyn_light.  Defer it to a later loop that
covers the same extents.
2016-09-11 18:49:14 +00:00
Kp 1f1be05d10 Simplify bm2 initialization in render_face 2016-09-11 18:49:14 +00:00
Kp fa5475aa54 Remove unnecessary copy of vertex points 2016-09-11 18:49:14 +00:00
Kp baa8831bce Test whether compiler handles -Wuseless-cast
clang does not understand -Wuseless-cast.  Passing -Wuseless-cast to
clang causes clang to fail the compile.  Resolve this by adding an SConf
test for -Wuseless-cast instead of adding it unconditionally.  It cannot
be put in the compiler preferred options tuple since it must be set
before the test for whether casting a ptrdiff to int is useless.
2016-09-11 18:49:14 +00:00
Kp 8e3a07f99d Remove laser.cpp inclusion of unused header reverse.h 2016-09-11 18:49:14 +00:00
Kp f8872f59a7 Expand single-use typedef in place 2016-09-11 18:49:13 +00:00
Kp 4864f533cf Pass object_base &to fly_init 2016-09-11 18:49:13 +00:00
Kp 198b068da6 Expand get_local_player_energy
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-09-11 18:49:13 +00:00
Kp 02e1babe28 Convert loadgl.h dll_GetSymbol calls to reinterpret_cast
s/(\(\w\+\))\(dll_Get.*\);/reinterpret_cast<\1>(\2);/
2016-09-09 01:35:43 +00:00
Kp 211be472b8 Convert loadgl.h DLL wrappers to C++ casts 2016-09-09 01:35:42 +00:00
Kp 8f9b9d7504 Unfold register_program comprehension
The folded form combined multiple targets into one, which is not the
desired result.

'''
unfolded
l=['gcc5,', 'mingw5,'] e='gcc5,' p=('gcc5', '')
l=['gcc5,', 'mingw5,'] e='mingw5,' p=('mingw5', '')
folded
l=['gcc5,', 'mingw5,'] e='mingw5,' p=('gcc5', '', 'mingw5', '')
'''

    import itertools
    l = ['gcc5,', 'mingw5,']
    print('unfolded')
    for e in l:
	    for p in itertools.product(*[v.split('+') for v in e.split(',')]):
		    print("l=%r e=%r p=%r" % (l, e, p))
    print('folded')
    for p in itertools.product(*[
		    v.split('+')    \
			    for e in l  \
			    for v in e.split(',')	\
	    ]):
	    print("l=%r e=%r p=%r" % (l, e, p))
2016-09-07 04:24:33 +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
Kp dee78671dc Enable -Wold-style-cast 2016-09-04 19:10:43 +00:00
Kp 3fc1441b3f Remove unused Win32 OpenGL indirections 2016-09-04 19:10:43 +00:00
Kp 6a8cc912e1 Switch hmp.cpp to use C++ casts 2016-09-04 19:10:43 +00:00
Kp 705bbff53a Remove bogus cast in Win32 MIDI get_event
Casting `&unsigned` to `(unsigned long *)` is wrong.  It happened to
work because these types are the same size on Windows and this code is
only used on Windows.  Remove the bogus cast and fix the function
prototype.
2016-09-04 19:10:43 +00:00
Kp 1e34dae94d Switch Win32 net_udp socket broadcast to C++ cast 2016-09-04 19:10:43 +00:00
Kp fcb0b4fa66 Replace SDL CD_INDRIVE with equivalent that uses C++ static_cast
<=gcc-5 with -Wold-style-cast warn when expansions of SDL macro
CD_INDRIVE produce an old style cast, even though the cast comes from a
system header.  Undefine it and define an equivalent that uses a C++
cast, so that uses do not provoke a warning.
2016-09-04 19:10:43 +00:00
Kp c7041a9b26 Use reinterpret_cast for digi magic value (void*)-1 2016-09-04 19:10:43 +00:00
Kp e06d8b33aa Reuse string_array_sort_func for file_sort_func
Both functions have the same implementation, so delete static
file_sort_func and use string_array_sort_func.
2016-09-04 19:10:43 +00:00
Kp 48dbd0333c Use static_cast for c_fp_tmap_scanline_per 2016-09-04 19:10:42 +00:00
Kp 4293227a54 Move strutil qsort comparator casts into function 2016-09-04 19:10:42 +00:00
Kp e6a082776d Fold write_key_text printf calls 2016-09-04 19:10:42 +00:00
Kp a966136424 Switch newdemo shareware workaround to C++ cast 2016-09-04 19:10:42 +00:00
Kp 39dca0999e Move aipath qsort comparator casts into function 2016-09-04 19:10:42 +00:00
Kp 11609fcdc4 Switch playsave.cpp to static_cast 2016-09-04 00:02:53 +00:00
Kp 848b99376d Switch songs.cpp to reinterpret_cast 2016-09-04 00:02:53 +00:00
Kp 2967b121b3 Switch net_udp.cpp to C++ casts 2016-09-04 00:02:53 +00:00
Kp 3308b1a554 Switch morph.cpp to reinterpret_cast 2016-09-04 00:02:53 +00:00
Kp dfef81e999 Switch laser.cpp to static_cast 2016-09-04 00:02:53 +00:00
Kp 1ca872c555 Switch seguvs.cpp to static_cast 2016-09-04 00:02:53 +00:00
Kp 53196ec990 Switch similar/arch/ogl to C++ casts 2016-09-04 00:02:53 +00:00
Kp 0e5e1a68a9 Switch interp.cpp to static_cast 2016-09-04 00:02:52 +00:00
Kp 39285423db Switch movie.cpp to reinterpret_cast 2016-09-04 00:02:52 +00:00
Kp ea153a60fa Switch libmve to C++ casts 2016-09-04 00:02:52 +00:00
Kp c5d154b6e0 Switch ignorecase.cpp to C++ static_cast 2016-09-04 00:02:52 +00:00
Kp 1a71e4a590 Remove unnecessary cast in compute_average_pixel 2016-09-04 00:02:52 +00:00
Kp 976e4206c0 Switch multi.cpp to C++ casts 2016-09-04 00:02:52 +00:00