Commit graph

11578 commits

Author SHA1 Message Date
Kreeblah 0e735f2197
Added more status messages 2021-12-11 15:59:20 -08:00
Kreeblah 2c5e299140
Fixed message location 2021-12-11 15:56:59 -08:00
Kreeblah 4786427f79
Added signing/notarization script 2021-12-11 15:55:34 -08:00
Kreeblah 91232cbb01
First pass for code signing and notarization for Macs 2021-11-08 23:27:27 -08:00
Kp f99ba91998 Pass user $PATH to Command() for dylibbundler
On some systems, such as the Apple M1 (ARM-based Macs),
dylibbundler is in $PATH, but not in a directory found by the limited
path that SCons uses for Command() invocations.  This causes the SConf
test to succeed (because it uses the full $PATH), but the Command() to
fail (because it uses a reduced path).  Fix this by using the user's
$PATH, if defined, for this Command() invocation.

Along the way, rework tool_bundle.py to use SCons' Node() objects in
place of direct path manipulation.  This lets SCons produce better error
messages in some cases.

Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/610>
2021-11-08 01:53:05 +00:00
Kreeblah 9a14d734bb Added message for library bundling step 2021-11-06 21:28:36 +00:00
Kreeblah 13d3af3123 Made dylibbundler an optional step 2021-11-06 21:28:36 +00:00
Kp 4ac9845f07 Fix clang build of fuelcen.cpp
clang treats names introduced by structured bindings specially, and
refuses to capture them for a lambda, even when it should be capturing
an rvalue reference.  gcc accepts this capture.

Switch to initializing a lambda local variable from the structured
binding in the outer scope, which works with both compilers.

Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/609>
2021-11-04 03:24:43 +00:00
Kp d604518563 Change SConf tests not to generate consecutive underscores 2021-11-04 03:24:43 +00:00
Kp 92990222a2 Use structured bindings in mission parsing 2021-11-01 03:37:20 +00:00
Kp b0103a1950 Allow non-developers to start on any level 2021-11-01 03:37:20 +00:00
Kp 1ca482d587 Factor out clamping AI times during save
Also, fix a bug that time_player_sound_attacked was clamped, stored, and
then immediately overwritten with an unclamped value.
2021-11-01 03:37:20 +00:00
Kp 2fbddf7a5a Use enum class for tmapinfo_flags 2021-11-01 03:37:20 +00:00
Kp 795b0e9111 Use enum class for station_number 2021-11-01 03:37:20 +00:00
Kp d463b4beba Use enumerate when traversing Station 2021-11-01 03:37:20 +00:00
Kp 3e02f99bcd Use enum class for materialization_center_number 2021-11-01 03:37:20 +00:00
Kp 0389955d7d Fix logic in write_matcen_text
write_matcen_text had a comment warning that its iteration logic was
bogus.  Rework the logic to try to walk the right structures.
2021-11-01 03:37:20 +00:00
Kp eea806bcc9 Pass underlying index_type through zip()
If std::common_type<range::index_type>... finds a common index_type
among all the zipped ranges, pass that common type through as
zip<...>::index_type.  Otherwise, set zip<...>::index_type to void.

This allows enumerate(zip(...))) to report a better index_type.
2021-11-01 03:37:20 +00:00
Kp 51a76f74be Move rotate_point_list inline in g3_interpreter_draw_base
This eliminates the only place that zip<>'s template parameter list is
written out in the source, which will allow later commits to change the
template parameter list.
2021-11-01 03:37:20 +00:00
Kp 6dd2776725 Use zip to traverse side uvl 2021-11-01 03:37:20 +00:00
Kp e14c54936d Reduce copying of side UVs 2021-11-01 03:37:20 +00:00
Kp 88b87d2aa1 Use enumerate to traverse MAX_VERTICES_PER_SEGMENT arrays 2021-11-01 03:37:20 +00:00
Kp e259b1c0ad Use enum class for packed edge in editor drawing 2021-11-01 03:37:20 +00:00
Kp d0c028ee2b Use enumerated_array for Two_sides_to_edge 2021-11-01 03:37:20 +00:00
Kp a655b82e7d Use zip() in place_new_segment_in_world
This produces clearer code than an xrange.
2021-11-01 03:37:20 +00:00
Kp 4d6affd74d Fix SDL-only briefing crash
Trim the bitmap's current width and height to be not more than its
parent.  Otherwise, an automatic screen resize, such as triggered when
playing the robot briefings in Descent 2, will give the window a new
smaller bm_data, but continue to use the old dimensions.  This then
causes load_briefing_screen -> gr_bitmap_scale_to -> scale_line to write
off the end of the smaller bm_data, causing memory corruption and
eventually a crash.
2021-11-01 03:37:20 +00:00
Kp 5eaa53d220 Fix SDL-only build 2021-11-01 03:37:20 +00:00
Kp 1596fad557 Change c_tmap_scanline_shaded argument to gr_fade_level 2021-11-01 03:37:20 +00:00
Kp 7ac96996d3 Change type of pixptr to const color_palette_index* 2021-11-01 03:37:20 +00:00
Kp 494ded9e04 Expand cur_tmap_ macros inline
These date to when there was a choice.  Now, there is no choice.  The
target functions are always in C.
2021-11-01 03:37:20 +00:00
Kp 29b619db99 Pass random generator to pick_random_point_in_seg 2021-11-01 03:37:20 +00:00
Kp 3da988708e Change Side_opposite value_type to sidenum_t 2021-11-01 03:37:20 +00:00
Kp 6467929025 Consolidate Side_to_verts and Side_to_verts_int
They have been the same variable since
a8c3a7f10b ("Alias Side_to_verts to
Side_to_verts_int").
2021-11-01 03:37:20 +00:00
Kp 9fc7a14777 Fix LTO build of Descent 2
enum game_mode_flags must be visible in common code, which does not
define DXX_BUILD_DESCENT_II.  To avoid One Definition Rule errors,
game_mode_flags must have the same definition in all files.
Fortunately, the DXX_BUILD_DESCENT_II definition is a superset of the
common definition, so the preprocessor guards can be replaced with
advisory comments.

Fixes: 2b718da343 ("Use enum class for Game_mode, Newdemo_game_mode")
2021-11-01 03:37:20 +00:00
Kp 0044c010ad Use structured bindings for create_abs_vertex_lists 2021-11-01 03:37:20 +00:00
Kp 6fefeadf09 Avoid storing verts_for_normal::negate_flag when not needed
Change it to be returned from get_verts_for_normal, so that callers
which do not need it can discard it.
2021-11-01 03:37:20 +00:00
Kp ba01b2bdc1 Convert some math functions to fixang
The value was always truncated internally anyway.  Move the truncation
to the call boundary, since most callers started with a fixang.
2021-11-01 03:37:20 +00:00
Kp 164727db9a Pass segment sound flags to do_ambient_sounds 2021-11-01 03:37:20 +00:00
Kp 3862edfb6c Use enum class for segment_special 2021-11-01 03:37:19 +00:00
Kp b0b53c2711 Sanitize segment special in D2 also 2021-11-01 03:37:19 +00:00
Kp 12a0f8e8e0 Use enum class for wall_state 2021-11-01 03:37:19 +00:00
Kp 76e2f2c6d9 Use enum class for wall_flags 2021-11-01 03:37:19 +00:00
Kp f64ed06a9d Use enum class for wall flag constants 2021-11-01 03:37:19 +00:00
Kp 9823c2e33c Fix blastable wall test
WALL_BLASTABLE is a property of the wall flags, not the wall state.
2021-11-01 03:37:19 +00:00
Kp a6f2db2502 Use enum class for player ranking 2021-11-01 03:37:19 +00:00
Kp 8ddfbd17e0 Use enum class for show_kill_list_mode 2021-11-01 03:37:19 +00:00
Kp d22632ac48 Use enum class for msgsend_state 2021-11-01 03:37:19 +00:00
Kp 7cb34fda0c Use enum class for network_game_type 2021-11-01 03:37:19 +00:00
Kp 87cc8f0794 Simplify clearing UDP_Socket
Remove the workaround added for issue #289 [1].  That issue covered a
miscompilation by early versions of gcc-4.9.  gcc-4.9.x is no longer
supported, so the workaround is no longer needed.

[1]: https://github.com/dxx-rebirth/dxx-rebirth/issues/289
2021-11-01 03:37:19 +00:00
Kp eb7cedc35d Expand macro Current_mission_longname 2021-11-01 03:37:19 +00:00