Commit graph

5990 commits

Author SHA1 Message Date
Kp 80aa48efb4 Pass digi_*_start_sound soundobj as sound_object* 2014-12-14 05:22:59 +00:00
Kp 657e7da49e Rework digi dispatch
Build function tables at compile time.  If !SDLMIXER, compile out the
pointer indirections.  If SDLMIXER && PIE, keep function pointers in
read-only memory.
2014-12-13 17:47:16 +00:00
Kp 9ea8c8d7f1 Mark digi variables static 2014-12-13 17:47:10 +00:00
Kp a622aecd58 Pass vcobjptridx_t to digi_ functions 2014-12-13 17:47:06 +00:00
Kp adbff232c5 Split seg/obj vars of find_seg_side_face 2014-12-13 17:47:01 +00:00
Kp 2c2b6c67d2 Use array<> for g3ds_tmap::verts 2014-12-13 17:46:55 +00:00
Kp 3f52e3426a Skip unnecessary segment rendering phases
Make object rendering traverse only the subrange of segments with
objects.

Make alpha rendering traverse only the subrange of segments with alpha
blended textures.
2014-12-13 17:19:28 +00:00
Kp 0b086b1b0d Optimize rendering
- Make Max_linear_depth_objects const
- Skip setup of object rendering if no objects to render
- Defer setting globals until after conditional confirms a segment will
  render
2014-12-13 17:18:07 +00:00
Kp 84e3721ef0 Use partial_range for render list 2014-12-13 16:57:09 +00:00
Kp 69bc81681a Move render_windows to per_segment_state_t::render_window 2014-12-13 16:54:16 +00:00
Kp 6b56a3020a Fix crash playing credits with poison enabled 2014-12-13 04:11:41 +00:00
Kp 7c98dea8be Pass render_frame arg by & 2014-12-13 04:11:21 +00:00
Kp b79e432a3e Pass render_mine arg by & 2014-12-13 04:11:16 +00:00
Kp 032332343d Pass do_render_object arg by & 2014-12-13 04:11:12 +00:00
Kp 4bcf451745 Pass wake_up_rendered_objects arg by & 2014-12-13 04:11:07 +00:00
Kp e027c821c9 Pass update_rendered_data arg by & 2014-12-13 04:11:04 +00:00
Kp 6e24954a97 Mark warn_printf static 2014-12-13 04:10:58 +00:00
Kp c6043419e9 Use std::abort in Error
Error is called for fatal errors.  Use std::abort to get a core dump.
2014-12-11 02:38:19 +00:00
Kp 1a204f61d8 Use range_for for SoundSlots 2014-12-11 02:36:01 +00:00
Kp 7b234da185 Make digi_max_channels const 2014-12-11 02:35:55 +00:00
Kp 664e8abaac Fix !SDLMIXER build
Fixes: bd1c6d8c5d
2014-12-11 02:35:03 +00:00
Kp 307ad30433 Remove unused digi_*_is_sound_playing 2014-12-11 02:34:54 +00:00
Kp 53366488ac Remove unused digi_set_volume 2014-12-11 02:34:38 +00:00
Kp 6d2b707c3e Move debug-only digi functions into !RELEASE 2014-12-11 02:34:32 +00:00
Kp 4d17f4e208 Remove unused r/g/b members of g3ds_vertex 2014-12-11 02:34:20 +00:00
Kp f91a378f6e Remove write-only per2_flag 2014-12-11 02:34:13 +00:00
Kp 489c4e00a3 Store temporary rect locally 2014-12-11 02:33:55 +00:00
Kp cc60f765b3 Cache render lookups 2014-12-11 02:33:50 +00:00
Kp 5f6a54875c Make pkg-config errors non-fatal
Later configure tests will abort if the package is not found some other
way.
2014-12-11 02:32:28 +00:00
Kp a2703177b9 Move Error Int3 to after printing the message 2014-12-09 01:10:24 +00:00
Kp 84011e55d2 Use partial_range when searching HighestLevels 2014-12-08 04:49:20 +00:00
Kp 78cdb70959 Use partial_range on Triggers 2014-12-08 04:19:26 +00:00
Kp 7c24f6896f Stop briefing search on dot or null
Mission names are passed in without an extension.  Short mission names
read beyond the end of the buffer, causing AddressSanitizer to kill the
program.

Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/issues/20
2014-12-08 03:54:11 +00:00
Kp cf9675c505 Fix uninitialized variable in render reprocess 2014-12-08 01:02:08 +00:00
Kp bd6b9489c1 Fix off-by-one end causing memory corruption 2014-12-08 00:41:03 +00:00
Kp d5dcfd24bc Merge commit 'Re-enable debug breaks' into unification/master
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/18
2014-12-07 23:56:01 +00:00
Kp 33c118f999 Enable Int3 as d_debugbreak
Change Int3 from a no-op to a platform-specific trap to debugger.

Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/18
2014-12-07 23:43:51 +00:00
Bradley Bell 5d6e6dc2e4 check for GM_MULTI before trying to do network jobs 2014-12-06 22:14:22 -08:00
Bradley Bell ebb77544aa reenable Int3 debugging 2014-12-06 22:14:19 -08:00
Kp 6798c8410b Refactor callsign_t constants 2014-12-07 00:53:15 +00:00
Kp 0c8191db94 Fix player clear range 2014-12-07 00:49:18 +00:00
Kp a0727f4f84 Throw on net_udp_read_sync_packet failure
Callers expect sane Player_num, but on failure, it is invalid.
Returning a failure status causes net_udp_level_sync to fault using
Players[Player_num].connected, so throw an exception instead.
2014-12-07 00:00:22 +00:00
Kp 2b627f0158 Pass net_udp buffers as const 2014-12-06 23:59:34 +00:00
Kp 9d700aab08 Make kill_matrix uint16_t, not short 2014-12-06 23:30:55 +00:00
Kp 1b924c5dd3 Truncate pilot name at null 2014-12-06 23:13:38 +00:00
Kp 73b0a016a8 Fix loading robots-?.mvl
Rework movie loading to fix loading built-in robot movies.  The previous
code always ignored loading the last entry in the movie array, which was
blank until 18f6919b33.  The last entry
was unused after d38a3d1362, so it was
removed, which caused the code to skip the robots entry.

Commit d38a3d1362 broke unloading add-on
movies by removing the strcpy which saved their name.  Add code to save
the name to extra_robot_movie_mission and call it when switching
missions.

Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/17
2014-12-06 17:56:56 +00:00
Kp cfe0f89dae Use array<> for team_kills 2014-12-06 04:52:53 +00:00
Kp a55028d5b4 Fix crash on UDP initialization 2014-12-06 02:16:28 +00:00
Kp 7338bb2402 Extend in-game esc menu with options and saving 2014-12-06 01:38:30 +00:00
Kp e216b709d4 Use pkg-config on Darwin if available 2014-12-05 04:11:37 +00:00