Commit graph

2725 commits

Author SHA1 Message Date
Kp 21057db809 Move DbgSafelog, DbgVerbose to CArg 2015-10-18 21:01:21 +00:00
Kp b0541daf19 Remove dead code in D1 demo fixup 2015-10-18 21:01:21 +00:00
Kp 682b845b9d Reorder gameseg distance tests 2015-10-18 21:01:20 +00:00
Kp 54e12654bb Factor out side_pokes_out 2015-10-18 21:01:20 +00:00
Kp f5abe5bc5e Combine gameseg vm_dist_to_plane calls 2015-10-18 21:01:20 +00:00
Kp 6f94cc933c Fold create_abs_vertex_lists into create_all_vertnum_lists 2015-10-18 21:01:20 +00:00
Kp af2d8f7deb Factor out create_vert*_lists switch 2015-10-18 21:01:20 +00:00
Kp 228dd75260 Switch Side_to_verts to unsigned 2015-10-18 21:01:20 +00:00
Kp ed668b611f Record start time in demo 2015-10-18 21:01:20 +00:00
Kp 1f63bfeee5 Reduce lifetime of returned get_seg_masks result 2015-10-18 21:01:19 +00:00
Kp 4163510b09 Move compare_func into render_compare_context_t 2015-10-18 21:01:19 +00:00
Kp c172d2c4c4 Omit OBJ_PLAYER from window.rendered_robots
The only user of rendered_robots filters for type OBJ_ROBOT.
2015-10-18 21:01:19 +00:00
Kp 6d714520ee Skip rendering Viewer sooner
Move the skip-Viewer check from render_object up to build_object_lists
so that, instead of skipping the viewer, the viewer is not scheduled
to be rendered.
2015-10-18 21:01:19 +00:00
Kp f4f451606b Pass vobjptridx_t to compute_light_emission 2015-10-18 21:01:19 +00:00
Kp ae338abdc7 Make compute_seg_dynamic_light static 2015-10-18 21:01:19 +00:00
Kp c5f6878f72 Use bitset for set_dynamic_light vertex visit tracking 2015-10-18 21:01:19 +00:00
Kp 6259e80206 Remove useless Omega blob light hack
The code immediately overwrites the computed value with a standard
value.  Optimizing compilers deleted the `light_intensity=0` store as
dead.  Delete the entire block to save a d_rand call.
2015-10-18 21:01:19 +00:00
Kp c0d45ab0d4 Compact compute_light_emission OBJ_FIREBALL path 2015-10-18 21:01:19 +00:00
Kp 7b28dc7110 Remove PHYSFSX_getRealPath assert(*stdPath!='/')
If the user configures the jukebox to play music from outside the
virtual directory, then stdPath can be absolute.
2015-10-18 21:01:19 +00:00
Kp 5d79694584 Cache rotate_list global references 2015-10-18 21:01:18 +00:00
Kp faf698703e Make rotate_list result anonymous 2015-10-18 21:01:18 +00:00
Kp d767f7cd5e Pass vcsegptridx to render_face 2015-10-18 21:01:18 +00:00
Kp 309426e024 Use enum class for descent_version 2015-10-18 21:01:18 +00:00
Kp f46a2802aa Simplify object_nearby_aux return 2015-10-18 21:01:18 +00:00
Kp 533f1cb3bb Qualify references to primary weapons 2015-10-18 21:01:18 +00:00
Kp 7da64d3782 Add new autoselect-while-firing mode: "when firing stops"
Mako88 reports that some users want not to autoselect while firing, but
do not notice when a new weapon is added to the HUD, and end up never
activating a preferred weapon.  Add a new autoselect mode that remembers
what would be selected and switches to it once the player ceases firing.

Changes since Mako88's proposed version:
- Use `enum class` for autoselection mode and a radio button to
  represent the decision of Immediate/Never/Delayed.
- Handle delayed autoselect for vulcan ammo.
- Set Delayed_primary == Primary_weapon to indicate no change is needed,
  rather than Delayed_primary==-1.  This lets some paths use
  Delayed_primary without checking for a magic value.
- Likewise Delayed_secondary / Secondary_weapon.
- Update Delayed_primary/Delayed_secondary when changing active
  primary/secondary weapon, so that a player who changes weapons while
  firing will automatically clear any deferred change.

Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/97>
Based-on-patch-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/147>
2015-10-18 18:11:57 +00:00
Kp 03b57abff0 Add $D*X_REBIRTH_HOME and $REBIRTH_HOME to override default path
Previously, Rebirth on __unix__ always set the write directory to
"~/.d*x-rebirth" (or "~/Library/Preferences/D*X Rebirth/" on Mac).  Add
$D*X_REBIRTH_HOME and $REBIRTH_HOME to override it.  If
$D*X_REBIRTH_HOME is set, use that.  If not, then try $REBIRTH_HOME.  If
that is also unset, then use the hardcoded default.
2015-10-18 00:34:00 +00:00
Kp 5f29170702 Move valptridx error reporting out of main header 2015-10-13 02:43:25 +00:00
Kp 8f656c40db Use range_for for validate_path 2015-10-13 02:43:24 +00:00
John Ackerman a606caa2b4 Improve .ini files and help message output 2015-10-11 22:21:00 +00:00
Kp a0919bf345 Add support for -add-missions-dir 2015-10-11 22:21:00 +00:00
Kp 02754f9ada Reduce PHYSFSX_getRealPath length checks 2015-10-11 22:21:00 +00:00
Kp a37bae4b4f Track output size for PHYSFSX_getRealPath 2015-10-11 22:21:00 +00:00
Kp ddf1ded74c Simplify add_missions_to_list 2015-10-11 22:21:00 +00:00
Kp ad8c64d7ff Remove unnecessary extension strip in promote 2015-10-11 22:21:00 +00:00
Kp 61f6c81f74 Use std::replace for rewriting count to wide 1s 2015-10-10 03:44:14 +00:00
Kp 4585faa461 Cache reference to secondary_ammo 2015-10-10 03:44:14 +00:00
Kp 36c52f7437 Reduce pointer->int->pointer conversions for thief 2015-10-10 03:44:14 +00:00
Kp 48b7416433 Factor out gauge width string 2015-10-09 02:46:11 +00:00
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 ffd6c113ae Move fwdwall.h -> fwd-wall.h for consistency 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 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