Commit graph

2826 commits

Author SHA1 Message Date
kreatordxx b39cdac1fd Add include directive for <locale>
Add include directive for <locale>, fixing four compiler errors on Apple Clang.
2016-09-13 19:34:32 +08:00
Kp f11235147a Work around clang crash bug
clang crashes with a segmentation fault if asked to implicitly convert
1u to std::size_t in partial_range inline chain.  Add a conversion
outside the inline chain, which seems to avoid the bug.
2016-09-11 18:49:17 +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 8e3a07f99d Remove laser.cpp inclusion of unused header reverse.h 2016-09-11 18:49:14 +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 1e34dae94d Switch Win32 net_udp socket broadcast to C++ cast 2016-09-04 19:10:43 +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 976e4206c0 Switch multi.cpp to C++ casts 2016-09-04 00:02:52 +00:00
Kp 67bf0ea1b5 Switch newdemo.cpp to C++ casts 2016-09-04 00:02:51 +00:00
Kp 89eff29df5 Switch netmisc_calc_checksum to reinterpret_cast 2016-09-04 00:02:51 +00:00
Kp c285637cc9 Reduce scope of convert_ilbm_to_pbm rowptr 2016-09-04 00:02:51 +00:00
Kp 9a06543781 Switch terrain.cpp light cast to static_cast 2016-09-04 00:02:51 +00:00
Kp 12ee279800 Switch fireball.cpp timer cast to static_cast 2016-09-04 00:02:51 +00:00
Kp a61370ddca Check segment index in do_ambient_sounds 2016-09-04 00:02:50 +00:00
Kp 00ebdcec4a Cache Segment subscript operation in materialization handling 2016-09-04 00:02:50 +00:00
Kp ec27044f3a Check segment index in game_setup recovery code 2016-09-04 00:02:50 +00:00
Kp a4e01c3bfc Use none_of in do_controlcen_frame search of segment children
This makes the purpose of the code clearer.
2016-09-04 00:02:50 +00:00
Kp 25a1dbe70c Cache temporaries in check_segment_connections type rewrite 2016-09-03 17:30:18 +00:00
Kp 2df93a7e88 Use range_for to iterate choose_drop_segment controlcen check 2016-09-03 17:30:18 +00:00
Kp 0104f4f938 Fix invalid access on very short exit tunnels 2016-09-03 17:30:18 +00:00
zico 8907a2bee4 Updated INSTALL.txt, README.txt, RELEASE-NOTES.txt, d1x.ini, d2x.ini for upcoming release. Updated Debian build to not include obsolete patch (it may still be broken, needs to be verified). Fixed small parsing typo in inferno.cpp help output. 2016-08-30 13:15:55 +02:00
zico b2cad09c26 Added new texture filtering options based on patch of user 'beware' 2016-08-29 20:53:10 +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
zico ff331732ba Re-enabled timer_delay2 for general menu handlers and adjusted them to sleep according to set FPS and not sleep at all for Multiplayer since calc_frame_time() is active in that case. Modified sleeping towards 1ms in calc_frame_time() to allow for more precise target FPS and be able to relay packets in multiplayer with less delay. 2016-08-29 16:04:46 +02:00
Kp 1402a21946 Reintroduce D1 title song bug
In past releases, D1X-Rebirth played the title song even when the user
specified `-notitles`.  Commit 29f79f0a6b
("Enable -notitles for Descent 2") fixed this.  Unfortunately, despite
being called SONG_TITLE, users believe this to be main menu music, not
title screen music.  This belief is reinforced by other code sites that
play the title song on returning to the main menu.  Reintroduce the bug
by moving the call above the test for `-notitles`.  This restores the
semantics that users expect.
2016-08-28 22:41:49 +00:00
Kp c484c55153 Expand get_local_player_invulnerable_time
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-08-28 22:41:49 +00:00
Kp 4e556efa1b Extend newdemo cloak_time hack to cover invulnerable_time
Descent demos do not record the time remaining on cloak/invulnerability,
so the demo system tries to fake it by forcing any cloaked player to
have a time remaining of 50%.  Extend that hack to do the same for
invulnerability.  The local player needs that hack.  Remote players do
not need it, but the logic is simpler with it in the loop than with a
special case for just the local player.
2016-08-28 22:41:49 +00:00
Kp 335f24ac31 Move Primary_weapon to player_info 2016-08-28 22:41:49 +00:00
Kp bfcf851f5f Remove default argument for get_mapped_weapon_index
Pass the weapon explicitly.
2016-08-28 22:41:48 +00:00
Kp 4af4f00d4b Fix weapon_id_type mismatch in do_laser_firing_player
Per comment, MK meant for this test to match the Helix cannon, but the
implementation was wrong.  Primary weapon indexes cannot be compared to
weapon ID types.  The two use different number spaces.  Using proper
enum types for each causes the compiler to report this mistake.  Fix the
test.
2016-08-28 22:41:48 +00:00