Commit graph

7545 commits

Author SHA1 Message Date
Kp a47c6e599d Shrink menu_bit_wrapper_t when B is empty 2015-10-09 02:46:11 +00:00
Kp 927618e650 Remove useless PHYSFS_eof tests
Each test triggers a system seek call.  EOF will be signalled by
PHYSFSX_fgets returning nullptr.
2015-10-09 02:46:11 +00:00
Kp a4826a2f75 Defer PHYSFS_tell in PHYSFSX_fgets 2015-10-09 02:46:11 +00:00
Kp 1ecbeb6bf9 Remove redundant use of PHYSFSX_exists 2015-10-09 02:46:11 +00:00
Kp 61fe046ba2 Reuse show_first_found_title_screen for Descent 1
This avoids an Error call if none of the titles are available.
2015-10-09 02:46:11 +00:00
Kp 1d99084026 Use UserError when main hog is missing
Error traps to the debugger and then aborts, which is not appropriate
for a user setup error.
2015-10-09 02:46:11 +00:00
Kp 5fc3e44bee Simplify setup of linked ham 2015-10-09 02:46:11 +00:00
Kp dd0f5cb83f Move fwdvalptridx.h -> fwd-valptridx.h for consistency 2015-10-09 02:46:11 +00:00
Kp ffd6c113ae Move fwdwall.h -> fwd-wall.h for consistency 2015-10-09 02:46:10 +00:00
Kp 743f2df80f Add fwd-window.h with forward declarations of window.h 2015-10-09 02:46:10 +00:00
Kp 78de0ac119 Add fwd-event.h with forward declarations of event.h 2015-10-09 02:46:10 +00:00
Kp e8a4a25639 Use template alias for window_subfunction_t 2015-10-09 02:46:10 +00:00
Kp cb5c0186b3 Remove obsolete PHYSFSX_check_read/PHYSFSX_check_write overloads 2015-10-09 02:46:10 +00:00
Kp a71e886fce Add scons option to skip pch optimization
Add option to compute indirect includes even when not necessary, since
indirect includes influence the inclusion count shown in the comments.
Enabling this option makes SCons work harder for the same output binary.
It should only be used by developers who want to see precise file
inclusion counts.
2015-10-09 02:46:10 +00:00
Kp 72400b1a4c Remove unused read_player_dxx return value 2015-10-09 02:46:10 +00:00
Kp bca143d87d Only include ogl_init.h in OpenGL builds 2015-10-09 02:46:10 +00:00
Kp 8032aee461 Enable ammo-based auto-select for Gauss
Autoselect from pick_up_vulcan_ammo only ever armed the Vulcan cannon,
even if the user has and prefers a Gauss cannon.  This is probably an
oversight from when D2 weapons were added.  Rework the pickup logic in
D2 so that the more desirable of Vulcan or Gauss is picked.
2015-10-09 02:46:10 +00:00
Kp 29f79f0a6b Enable -notitles for Descent 2 2015-10-09 02:46:09 +00:00
Kp b36d95dccd Use generate_n to initialize font chars 2015-10-09 02:46:09 +00:00
Kp 71bde6f35f Use range_for for properties_read_cmp 2015-10-09 02:46:09 +00:00
Kp 8d2d69d663 Always run mini-autoselect for bombs
Autoselect events are gated on the player having none of the item prior
to this pickup, so making the mini-autoselect more aggressive should not
cause unwanted switches.

Since the main autoselect is complicated, requiring the mini-autoselect
to happen only when the main autoselect is skipped makes it complicated
for players to reason about whether the mini-autoselect will happen.
2015-10-09 02:46:09 +00:00
Kp 7034b68357 Manage world time automatically where possible
For all cases where world time nests, use automatic management.  Some
sites disable time in one function and enable it elsewhere.  These are
untouched.
2015-10-09 02:46:09 +00:00
Kp 820abdad41 Fix SDL build break in clipper.h 2015-10-09 02:46:09 +00:00
Kp 8dd1f7c2cf Move texture_list_index into local scope 2015-10-09 02:46:09 +00:00
Kp 745161a2d1 Tighten alt_textures test 2015-10-09 02:46:09 +00:00
Kp 75104b80f0 Fix operand ordering for team kills
Fixes: 4a0a2b7da5 ("Use team_kills in team games")
2015-10-04 22:30:02 +00:00
Kp 9da2a938d8 Make team_kills signed
Suicides can make kill counts negative.
2015-10-03 22:15:17 +00:00
Kp 4a0a2b7da5 Use team_kills in team games 2015-10-03 22:15:17 +00:00
Kp b447adcce1 Initialize all vertices in create_abs_vertex_lists
Some compiler configurations warn that vertices[4] and vertices[5] may
be used uninitialized.  Initialize them to a bogus value so that any
actual use will trap, but the comparisons will be well defined.
2015-10-03 17:17:50 +00:00
Kp 111fc56b00 Return objptridx from maybe_drop_primary_weapon_egg 2015-10-03 17:17:50 +00:00
Kp 3d2591f1ad Remove unnecessary scores_rprintf macro 2015-10-03 17:17:50 +00:00
Kp 9df40a86cb Use uint8 for secondary ammo counts
Maximum non-cheating is 40 missiles, which fits in a signed 8 bit value.
Maximum cheating is 200 missiles, which fits in an unsigned 8 bit value.
2015-10-03 17:17:49 +00:00
Kp 9ba1369d58 Remove useless do_powerup test
Remote player shields are not tracked.  Remove the test on their value.
2015-10-03 17:17:49 +00:00
Kp 4041e3ba53 Test whether compiler can use PCHs it generates
Current gcc requires a non-PIE cc1plus for working PCH support.  If the
chosen compiler is PIE, it will succeed in building the PCH, then fail
when trying to use it.
2015-10-03 17:17:49 +00:00
Kp 9d4a55ae47 Move fvi globals into anonymous namespace 2015-10-03 17:17:49 +00:00
Kp e2c6e8449f Factor out cloak/invul timer display 2015-10-03 17:17:49 +00:00
Kp 85d9f1f3b0 Fix various issues from splitting sensitivity
Remove redundant undefine/redefine of helper macros.
Clean up loop conditional.
2015-10-03 17:17:49 +00:00
Kp aa1a1c5a6a Fix regressions from changes to advanced host menu
Non-static globals were initialized at wrong scope, leading to netgame
duplicate options being forgotten across program restart.
Netgame.DuplicatePowerups is not initialized until well after global
initialization runs.

Literal strings were copied into a local buffer.  Replace with a pointer
to the appropriate literal string.

Fixes: aa9a5df0d4 ("Rearrange Advanced Hosting Menu")
2015-10-03 17:17:49 +00:00
Kp 271c465a7c Use <algorithm> for adjust_segment_limit 2015-10-03 17:17:49 +00:00
Kp d4df692d30 Use range_for in draw_all_edges 2015-10-03 17:17:49 +00:00
Kp a6d6eceea3 Reduce indirection in automap drawingListBright 2015-10-03 17:17:48 +00:00
Kp bf52ebf4cd Skip do_weapon_n_item_stuff if Player_is_dead
Fixes: 29aa820dc0 ("Only respawn when the player presses fire")
2015-09-30 02:41:55 +00:00
derhass 85691b3784 Restore inclusion of byteutil.h in similiar/3d/interp.cpp
4a84320817b9e02f86f3ec2dd2678e3367cddcc removed lots of inclusions of
byteutil.h in various source files. However, when building with
WORDS_NEED_ALIGNMENT, interp.cpp makes use of the INTEL_SHORT and
GET_INTEL_SHORT macros defined there.

Fixes: c4a8432081  ("Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*")
2015-09-29 18:36:01 +00:00
Christian ab85c6f0e9 Merge pull request #144 from Mako88/new-menu
Rearrange Advanced Hosting Menu (by Mako88/A Future Pilot)
2015-09-29 13:41:12 +02:00
Christian b09cb8f738 Merge pull request #145 from Mako88/calibration-menu
Split Sensitivity into Separate Menus (by Mako88/A Future Pilot)
2015-09-29 13:36:58 +02:00
zico 708372a148 Included compiler-range_for.h into joy.cpp to fix compiler error of undefined range_for 2015-09-29 12:02:49 +02:00
zico a96ceb2a46 Enabled multi_do_ranking() for D1X 2015-09-29 11:58:42 +02:00
Kp 9642a4c31d Close SDL joystick handles at shutdown 2015-09-29 02:41:22 +00:00
Kp e5dff6d63f Use array<> for d_physical_joystick hat_map, button_map 2015-09-29 02:41:22 +00:00
Kp 46bbdd43af Move Joystick.n_axes, Joystick.n_buttons into local scope 2015-09-29 02:41:22 +00:00