Commit graph

8799 commits

Author SHA1 Message Date
Kp d903a5db3b Pass powerup_flags to exists_fuelcen_in_mine 2016-10-15 00:53:20 +00:00
Kp a1b5d93740 Pass powerup_flags to escort_get_goal_segment 2016-10-15 00:53:20 +00:00
Kp e5cd034f74 Pass powerup_flags to exists_in_mine 2016-10-15 00:53:20 +00:00
Kp 03b0222896 Fold escort_set_goal_object calls to exists_in_mine 2016-10-15 00:53:20 +00:00
Kp ad35460eb0 Pass player_info to add_bonus_points_to_score 2016-10-15 00:53:20 +00:00
Kp 25f5fc231a Pass player_info to add_points_to_score 2016-10-15 00:53:19 +00:00
Kp 248dd5c309 Move player::hostages_rescued_total to player_info 2016-10-15 00:53:19 +00:00
Kp f21abc94cb Move player::hostages_on_board to player_info 2016-10-15 00:53:19 +00:00
Kp e721fc56da Move player::last_score to player_info 2016-10-15 00:53:19 +00:00
Kp ecb91955ae Move player::score to player_info 2016-10-15 00:53:19 +00:00
Kp 3dd988d1b6 Pass DXX_VERSION_SEQ only to files that use it 2016-10-15 00:53:19 +00:00
Kp 95cd7fd368 Pass SHAREPATH only to files that use it 2016-10-15 00:53:18 +00:00
Kp ea1312beb3 Use trigger_none instead of literal -1 in load_game_data 2016-10-15 00:53:18 +00:00
Kp aaca04ba1f Simplify valptridx array access restrictions 2016-10-15 00:53:18 +00:00
Kp c1d9c40931 Convert various valptridx accesses to use factory functions 2016-10-15 00:53:18 +00:00
Kp 2393b1e8c9 Use array<> in set_segment_depths 2016-10-15 00:53:18 +00:00
Kp 647991e203 Use range_for in validate_segment_all 2016-10-15 00:53:18 +00:00
Kp 599bf21b7d Remove paranoid debug-only object checks
These have never been observed to trigger.  Memory corruption prevention
is much better than it was when these were written.
2016-10-15 00:53:17 +00:00
Kp 5c83891c8f Remove incomplete wall validation in load_game_data 2016-10-15 00:53:17 +00:00
Kp a9672b7c30 Use addressof to report base address of valptridx access 2016-10-15 00:53:17 +00:00
Kp c2e6f06b86 Use std::move to compact walls 2016-10-15 00:53:17 +00:00
Kp 61a53fb875 Use range_for in ogl_cache_level_textures 2016-10-15 00:53:17 +00:00
Kp 3eceaca1b6 Cache temporaries when processing level mutation hack 2016-10-15 00:53:17 +00:00
Kp 6515308a59 Simplify loop iteration in copy_group_walls 2016-10-15 00:53:17 +00:00
Kp a80ed36f0a Use range_for/vsegptr for wall_restore_all 2016-10-15 00:53:16 +00:00
Kp 4f8f27bdf6 Use range_for/vctrgptridx for write_trigger_text 2016-10-15 00:53:16 +00:00
Kp 4597ecf1f0 Use range_for/vcwallptridx for write_wall_text 2016-10-15 00:53:16 +00:00
Kp 20776fcfbc Use range_for/vcwallptr for write_key_text 2016-10-15 00:53:16 +00:00
Kp ba77e645fa Use range_for to iterate segment checksum 2016-10-15 00:53:16 +00:00
Kp 24b97e7058 Fold fspacx/fspacy calls 2016-10-15 00:53:16 +00:00
Kp f97639204e Fold kmatrix fontcolor lookup 2016-10-15 00:53:16 +00:00
Kp e05603b0d7 Fold kconfig_draw gr_string label calls 2016-10-15 00:53:15 +00:00
Kp 94202ff782 Fold D1 draw_automap calls to gr_string 2016-10-15 00:53:15 +00:00
Kp 88c73c010a Preserve type information on font-scaled floats 2016-10-15 00:53:15 +00:00
Kp 5bc17b90d2 Use range_for in draw_subtitles 2016-10-15 00:53:15 +00:00
Kp 21f8aec44d Remove unnecessary gr_set_fontcolor in kmatrix_draw_coop_names 2016-10-15 00:53:15 +00:00
Kp 71b87bceee Factor out kmatrix_redraw_coop calls to gr_find_closest_color 2016-10-15 00:53:15 +00:00
Kp 5873889b8b Factor out common parts of add_points_to_score 2016-10-15 00:53:15 +00:00
Kp f84de25e6b Expand kmatrix_draw_coop_item inline
kmatrix_draw_coop_item computes various values that are always the same
for every iteration of the calling loop.  Expand it inline in its one
caller so that the caller can cache those values.
2016-10-15 00:53:14 +00:00
Kp 8327d85c76 Remove unused get_multi_endlevel_poll1
The only caller for get_multi_endlevel_poll1 was DoEndLevelScoreGlitz,
which only called it on an unreachable path.  That path is now gone, so
remove get_multi_endlevel_poll1.
2016-10-15 00:53:14 +00:00
Kp e4e1799b57 Propagate DoEndLevelScoreGlitz argument network
All callers pass 0.  Remove the argument and update the logic that
tested it.
2016-10-15 00:53:14 +00:00
Kp fa620d5011 Make DoEndLevelScoreGlitz static 2016-10-15 00:53:14 +00:00
Kp 863e545461 Fix D1 editor build
The UI_DIALOG subclass changes missed one UI_DIALOG handler.

Fixes: db665d8c33 ("Allow dcx::UI_DIALOG struct to be subclassed - step 2")
2016-10-15 00:53:14 +00:00
Kp 1d563a9e03 Fix memory corruption during tracker initialization
Commit 63ca866 reduced the number of elements in UDP_Socket[] from (2 +
tracker) to (2), but added a write to UDP_Socket[2], which is now out of
bounds.  Fortunately, UDP_Socket[2] is never read.  Remove the
initialization of it.

Fixes: 63ca86698e ("Added communication for tracker written by A Future Pilot")
2016-10-15 00:53:14 +00:00
Kp deeb7def6e Reuse zeroed *_rw structure during save 2016-10-13 03:14:11 +00:00
Kp 7a18f60a94 Replace nd_read_short casts with an overload for uint16_t
Casting the type of the input overrides useful compiler checks.  Remove
all such casts and add an overload for uint16_t.
2016-10-12 02:16:29 +00:00
Kp 675fff5fec Replace nd_read_byte casts with an overload for uint8_t
Casting the type of the input overrides useful compiler checks.  Remove
all such casts and add an overload for uint8_t.
2016-10-12 02:16:29 +00:00
zico 63ca86698e Added communication for tracker written by A Future Pilot 2016-10-10 18:19:56 +02:00
zico 407805be42 Restored proper scaling of Min_trackable_dot by adding new function get_scaled_min_trackable_dot(). This was previously a fixed defintion based on Descent 1's result of Min_trackable_dot's scaling if FrameTime < F1_0/16 which did not properly reflect the intended result of Descent 2 nor did it properly align to different FrameTime/HOMING_TURN_RATE settings. get_scaled_min_trackable_dot() will scale the result accordingly for whatever fixed or variable time setting is given and respecting each game's individual scaling. 2016-10-10 15:37:25 +02:00
zico 9cab9e58c6 Fixed regression from e0785251c4 making the homing indicator go haywire if built without NEWHOMER defined 2016-10-10 14:23:45 +02:00