Commit graph

7994 commits

Author SHA1 Message Date
Kp 6489c64598 Use type_traits to manage valptridx const 2016-01-09 16:38:13 +00:00
Kp cefc79f869 Construct find_point_seg segptridx explicitly 2016-01-09 16:38:13 +00:00
Kp d6359d0eb7 Use template for object rotation functions 2016-01-09 16:38:13 +00:00
Kp 988df1cc42 Factor out marker index number 2016-01-09 16:38:13 +00:00
Kp a32d9f01a1 Remove return value truncation in find_object_seg 2016-01-09 16:38:13 +00:00
Kp 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp d17b12da31 Remove default argument for basic_ptr(index,array &) 2016-01-09 16:38:12 +00:00
Kp 1cef946a90 Remove default argument for basic_idx(index,array &) 2016-01-09 16:38:12 +00:00
Kp 8a30fc656b Factor out editor special segment drawing 2016-01-09 16:38:12 +00:00
Kp 7064fcccba Skip setting segnum/signature of non-objects 2016-01-09 16:38:12 +00:00
Kp 96898bab0a Block direct changes to Highest_segment_index
Route updates through helper functions.
2016-01-09 16:38:12 +00:00
Kp f48eddeece Block direct changes to Highest_object_index
Route updates through helper functions.
2016-01-09 16:38:12 +00:00
Kp 1cd77754ee Remove write-only Highest_ever_object_index 2016-01-09 16:38:12 +00:00
Kp 5a94f8bf4f Fix check_header_includes build 2016-01-09 16:38:12 +00:00
Kp 1f91897f5d Move some game symbols to namespaces 2016-01-09 16:38:12 +00:00
Kp 568f165c28 Shrink sincos_table
For all valid i, sincos_table[i] == sincos_table[i % 256].  Remove
elements [256:] and modify callers to truncate the index.
2016-01-09 16:38:11 +00:00
Kp 0a68a6439e Use ={} to clear rle cache 2016-01-09 16:38:11 +00:00
Kp 8dc0f3bd37 Remove unnecessary newmenu_free_background 2016-01-09 16:38:11 +00:00
Kp fe1c0ee59b Remove unnecessary free_text
The text is stored in a global unique_ptr, so running global destructors
will free the text.
2016-01-09 16:38:11 +00:00
Kp 100af92d3f Remove unnecessary error_init(NULL) 2016-01-09 16:38:11 +00:00
Kp 7cc8920736 Pass new_wall_type to do_change_walls
Each caller knows the trigger type, so pass new_wall_type from the
caller instead of recomputing it inside do_change_walls.
2016-01-09 16:38:11 +00:00
Kp c2c95e7b4b Factor out trigger segment loop 2016-01-09 16:38:11 +00:00
Kp 0635dbf108 Pass trigger & 2016-01-09 16:38:11 +00:00
Kp e24f84298f Skip rescan walls for force fields
Record force fields in the on/off path instead of scanning the array
again.
2016-01-09 16:38:11 +00:00
Kp 3aefd0bf2f Defer change_segment_light multiply
If light_intensity is zero, skip the multiplication.
2016-01-09 16:38:11 +00:00
Kp 4770d3a35e Factor out wall_illusion_* common logic 2016-01-09 16:38:10 +00:00
Kp 16c754f3a2 Split key_toggle_repeat paths at compile time
Every caller passes a literal truth value.  Split the implementation by
the truth value.  This saves loading the value before the call and
testing it inside the call.
2016-01-09 16:38:10 +00:00
Kp 23d6735f7a Use .reset() for free_endlevel_data bm 2016-01-09 16:38:10 +00:00
Kp 31360adb9c Combine command line help printf calls 2016-01-09 16:38:10 +00:00
Kp 68a31121ee Use menu macros for sound menu 2016-01-09 16:38:10 +00:00
Kp 410b09a330 Expand macro Player_exploded 2016-01-09 16:38:10 +00:00
Kp 7c8b36ec1d Use automatic cleanup of GL client state 2016-01-09 16:38:10 +00:00
Kp 47190be8e9 Fold Player_exploded into Player_dead_state 2016-01-09 16:38:10 +00:00
Kp 608cfdbf07 Combine Mission::enhanced with Mission::descent_version 2016-01-09 16:38:09 +00:00
Kp 0c0dff9def Fix fvi sqrt
A previous optimization restructured the code in a way that lost the
>>16 normally applied to the product of two fix values.

Fixes: 707b69220d ("Skip sqrt,square in check_vector_to_sphere_1")
2016-01-03 20:21:36 +00:00
Kp 0a2ef79242 Remove close_fds=True from StaticSubprocess
Per the documentation, on Linux, the default is true.  On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/173>
Fixes: bb3f414128 ("Cache scons subprocess calls")
2016-01-03 20:21:36 +00:00
Kp e3e77f8724 Remove sprintf from automap.cpp 2016-01-03 20:21:36 +00:00
Kp 3acfdcd00a Remove sprintf from game.cpp 2016-01-03 20:21:36 +00:00
Kp b2882fd48f Remove sprintf from gamerend.cpp 2016-01-03 20:21:36 +00:00
Kp e222a13495 Remove sprintf from gameseq.cpp 2016-01-03 20:21:36 +00:00
Kp 0d15877010 Remove sprintf from gauges.cpp 2016-01-03 20:21:36 +00:00
Kp 421fd8a11c Remove sprintf from newmenu.cpp 2016-01-03 20:21:36 +00:00
Kp 842756630f Remove sprintf from piggy.cpp 2016-01-03 20:21:36 +00:00
Kp 4afe97fd71 Remove sprintf from piggy_is_substitutable_bitmap 2016-01-03 20:21:36 +00:00
Kp fd85e3cfc0 Remove sprintf from scores.cpp 2016-01-03 20:21:35 +00:00
Kp 24e902d4cf Simplify find_connect_side 2016-01-03 20:21:35 +00:00
Kp 5ba5910e7a Use symbolic side_none for testing find_connect_side result 2016-01-03 20:21:35 +00:00
Kp 2ef83ad002 Remove redundant segptr computation 2016-01-03 20:21:35 +00:00
Kp 34df375032 Cache remove_trigger wall_num 2016-01-03 20:21:35 +00:00
Kp ba17de4cd5 Add -Wuninitialized to default warning options 2016-01-03 20:21:35 +00:00