Commit graph

2356 commits

Author SHA1 Message Date
Kp e39b609553 Factor out calls to draw_weapon_info_sub 2016-01-09 16:38:15 +00:00
Kp dd877f52c2 Remove unused weapon defines 2016-01-09 16:38:15 +00:00
Kp 25feb65a6f Remove unnecessary pointer subtraction in laser.cpp
`parent` can be compared to `Viewer` without converting `Viewer` to an
index.
2016-01-09 16:38:14 +00:00
Kp fd64d3284c Cache ConsoleObject in move_player_2_segment 2016-01-09 16:38:14 +00:00
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp 9ceedc96a8 Propagate valptridx requirement up 2016-01-09 16:38:14 +00:00
Kp cefc79f869 Construct find_point_seg segptridx explicitly 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 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 1f91897f5d Move some game symbols to namespaces 2016-01-09 16:38:12 +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 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 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 d7890e37cb Skip copying segment normals in render_side 2016-01-03 20:21:35 +00:00
Kp 2e8900ab73 Remove unused lcnt_save,scnt_save 2016-01-03 20:21:35 +00:00
Kp 3428ea6392 Remove Show_only_curside
Show_only_curside was locked to 0 in EDITOR builds, but only EDITOR
builds could render the current side.
2016-01-03 20:21:35 +00:00
Kp c57db299ba Make first_terminal_seg local 2016-01-03 20:21:34 +00:00
Kp 823ff63126 Move MplTrackerAddr to CArg 2015-12-24 04:01:29 +00:00