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/'
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/'
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.
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.
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))
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.
<=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.