Commit graph

4026 commits

Author SHA1 Message Date
Kp 7ccd537362 Fix build break from 30f9233
Commit 30f9233b36 introduced a test for
Game_Mode, which does not exist, rather than Game_mode, which does
exist.  However, the test for game mode is unnecessary.  Objects of type
OBJ_NONE are always in segment_none and no object of any other type
should be in segment_none.  Use that fact to test obj->type instead of
obj->segnum during multiplayer object clobber, so that multiplayer can
overwrite unallocated objects without accessing any undefined fields and
without making object::segnum a defined field.

Fixes: 30f9233b36 ("Reverted 2e6aa0f081 and partially reverted 7064fcccba to still allow segnum and signature init for multiplayer games, keeping consistency during object sync.")
2016-11-06 17:12:03 +00:00
Kp e231fb7d3a Restructure object linkage checks
Move the main part of obj_link into obj_link_unchecked.  Implement
obj_link as sanity check assertions followed by a call to
obj_link_unchecked.  Remove caller-side writes that were present solely
to bypass the assertions, since the assertions can now be bypassed by
calling obj_link_unchecked directly.
2016-11-06 17:12:03 +00:00
Chris Taylor 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
Kp 46b1ea8fd5 Give full Omega_charge when omega cannon is granted 2016-11-05 21:22:44 +00:00
Kp 5f6d60bb7c Fix menu.cpp build when max_joysticks=0
menu.cpp always needs SDL.h, but included it only as a side effect of
joy.h including SDL.h.  joy.h only includes SDL.h when max_joysticks!=0.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/258>
2016-11-05 21:22:43 +00:00
derhass 551570d29b Unify OpenGL extension handling between OpenGL and OpenGL ES code paths.
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.

Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.

This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
2016-11-03 21:59:11 +01:00
Kp a0cd8360bc Request v4-mapped v6 addresses instead of native v4 addresses 2016-11-02 03:58:25 +00:00
zico 730879d733 Updated handling of data sent by tracker. Added support for handling ACKs from tracker and Hole punching between game clients via tracker. Changed udp_dns_filladdr to not perform DNS lookup if requested which is used for broadcasts and IPs sent by tracker. Added text display on NETGAMES menu to indicating if a connection is in progress. Fixed issue allowing to select an invalid game on NETGAMES list. Upon cancelling a forming netgame, made sure tracke runregister packet is sent. Added function to verify tracker address to make sure incoming packets originate from expected trtacker address (and port). Slightly improved handling game data from tracker to be less prone to crash if receiving unexpected data. 2016-11-02 04:20:41 +01:00
zico 8bd3eaad4c Fixed misleading indentations. 2016-10-31 11:36:48 +01:00
zico 78ad83a134 Fixed compile-time errors when using use_udp=0. Still some warnings but it builds. 2016-10-31 11:21:59 +01:00
Chris Taylor 9511f65a90 Declare some local window_event_result vars later (clarity) 2016-10-31 14:58:34 +08:00
Chris Taylor 21e41b15a9 Use listbox_subfunction_t template for listbox_callback member (for convenience of possible future modification) 2016-10-31 14:35:29 +08:00
Kp 52667fae6c Merge branch derhass/patches/ogles-warning-cleanup
derhass reports that OpenGL ES builds warn for unused parameter
`texanis`.  This parameter controls a feature that is not available in
current Rebirth OpenGL ES builds.  Cast the parameter to void to silence
the warning.  Long term, the code ought to be changed to advise the user
when their platform lacks this feature.  In the short term, merge this
fix so that the build will succeed.

https://github.com/dxx-rebirth/dxx-rebirth/pull/256
2016-10-30 18:30:48 +00:00
Kp c73fd378c2 Merge branch derhass/patches/ogles-cast-cleanup
derhass reports that some OpenGL ES code was missed during the
conversion from old-style casts to C++ casts.  Merge the fixes for those
sites.

https://github.com/dxx-rebirth/dxx-rebirth/pull/255
2016-10-30 17:32:01 +00:00
zico 155e054f68 Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2016-10-30 03:18:39 +01:00
zico 3db9a8d999 Fixed ping display on HUD (no idea why it was multiplied by 44 - probably copy/paste mistake) 2016-10-30 03:18:15 +01:00
derhass b144badb11 fix old-style casts in the DXX_USE_OGLES code paths 2016-10-29 23:58:28 +00:00
derhass 1c756316cb fix a -Wunused-parameter warning in the DXX_USE_OGLES code path
The `texanis` parameter is not used in OpenGL ES, but in desktop GL.
2016-10-29 23:57:03 +00:00
Kp 8a2e15e20a Add message for when user disables full map cheat 2016-10-29 23:16:18 +00:00
Kp b75a2e4a68 Pass object &to obj_create_copy 2016-10-29 23:16:18 +00:00
Kp d8d7980a00 Simplify load_mine_data_compiled fuelcen iteration 2016-10-29 23:16:18 +00:00
Kp 5a69c09ec2 Move fuelcen_activate special assignment up
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.
2016-10-29 23:16:17 +00:00
Kp 65f9fd54f8 Use vcsegptr for build_object_lists 2016-10-29 23:16:17 +00:00
Kp e95db4c269 Fold move_away_from_player switch cases 2016-10-29 23:16:17 +00:00
Kp 33bba1fa61 Map boss-gated robots across players 2016-10-29 23:16:16 +00:00
Kp 2b9a86abe3 Factor out buddy hints about invulnerable boss 2016-10-29 23:16:16 +00:00
Kp 57196e8f9f Look up robot type in multi_send_boss_create_robot 2016-10-29 23:16:16 +00:00
Kp c45e441ecd Move map_objnum... into multi_send_boss_create_robot
Whenever a robot is sent to peers, it needs to be added to the local
mapping also.  Move the one use so far into multi_send_boss_create_robot
to simplify maintenance.
2016-10-29 23:16:16 +00:00
Kp c4cfe54010 Return literal object_none on object_none error path
gcc generates better code for:

	if (variable == magic_constant)
		return magic_constant;

than it does for:

	if (variable == magic_constant)
	    return variable;

even though the two have the same result.  Switch to the form which
generates slightly better code.
2016-10-29 23:16:15 +00:00
Kp 3081e69536 Pass grs_main_bitmap to gr_init_bitmap_alloc 2016-10-29 23:16:15 +00:00
Kp 19fd79d8ae Shrink cockpit_decode_alpha::cockpitbuf 2016-10-29 23:16:15 +00:00
Kp 499d0fbe6c Remove excess Players elements
This was present in the Descent 2 source release with no explanation and
no apparent purpose.  Its presence complicates various loops, so remove
it.
2016-10-29 23:16:14 +00:00
Chris Taylor 7ac820248c Use new event_process_all() for event loops that check for window_event_result::deleted (which is most of them) 2016-10-29 20:06:01 +08:00
Chris Taylor a62ca93498 Use a tracking variable for newmenu_do2 (and simpler) polling loop
Add 'track' method to dcx::window, which takes a bool and will set it to 'false' when the window closes. Use for newmenu_do2 and simpler newmenu_do's, since there's the possibility of another window without its own polling loop opening on top - meaning window_event_result::deleted would be returned for that window, not the one we're polling on.
2016-10-28 16:49:53 +08:00
Chris Taylor 54dbe586ee Check for window_event_result::deleted for do_briefing_screens polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:45:40 +08:00
Chris Taylor f1548e075e Check for window_event_result::deleted for show_title_screen polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:40:50 +08:00
Chris Taylor 49ce8dbb99 Check for window_event_result::deleted for gamebitmaps_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:30:58 +08:00
Chris Taylor 731777476f Check for window_event_result::deleted for polygon_models_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:29:14 +08:00
Chris Taylor b2513ab9a0 Check for window_event_result::deleted for kmatrix_view polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:27:45 +08:00
Chris Taylor 7f7047063a Check for window_event_result::deleted for credits polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:23:36 +08:00
Kp 4faca3012c Pass player_info to do_cloak_invul_secret_stuff 2016-10-28 03:39:42 +00:00
Kp adaa596672 Cache player object in DoEndLevelScoreGlitz 2016-10-28 03:39:42 +00:00
Kp d5d4517712 Pass player object to init_ammo_and_energy 2016-10-28 03:39:42 +00:00
Kp df8f93d63e Cache player object in FinalCheats 2016-10-28 03:39:41 +00:00
Kp c8dda073ca Pass player object to transfer_energy_to_shield 2016-10-28 03:39:41 +00:00
Kp 98839d1af6 Pass player position to automap_apply_input 2016-10-28 03:39:41 +00:00
Kp 65b649bc75 Pass player_info to ai_do_actual_firing_stuff 2016-10-28 03:39:41 +00:00
Kp ca8fa9c3b6 Pass player_info to ai_move_relative_to_player 2016-10-28 03:39:41 +00:00
Kp c31424dd3b Pass player_info to do_invulnerable_stuff 2016-10-28 03:39:41 +00:00
Kp c8801f73ad Fold piggy_new_pigfile calls to gr_remap_bitmap_good 2016-10-28 03:39:40 +00:00
Kp 1c5718ba11 Fold read_extra_bitmap_iff call to gr_remap_bitmap_good 2016-10-28 03:39:40 +00:00
Kp 902e242194 Remove redundant store in kconfig_read_controls
Adjust the value as a local, then write it back when finished.
2016-10-28 03:39:40 +00:00
Chris Taylor e44013ebcf Kill window_exists call in show_menus
Hidden windows don't receive events, so the only way to close is outside its handler, which there should be no cases of here. The function window_exists could return a false positive if a new window was created with the same pointer value as a deleted one. Will later disable window_exists function.
2016-10-28 08:58:47 +08:00
Chris Taylor c351588bba Remove use of window_exists in newmenu_handler
Replace with a disabled check for window_event_result::deleted, which will be enabled when all newmenu subfunctions return a window_event_result. There are currently no instances of a subfunction closing the window itself (which is preferred).
2016-10-28 08:22:36 +08:00
Chris Taylor bd3078b672 Make wall_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on. Also remove the 'likely' branch prediction macro from close_wall_window because close_wall_window will only be called outside of the wall dialog's handler (to open a different dialog or close the editor).
2016-10-27 18:07:57 +08:00
Chris Taylor fd3e60be54 Make object_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:52:50 +08:00
Chris Taylor acc595ba16 Make robot_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:51:00 +08:00
Chris Taylor 5322ce4a0f Make editor_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:48:23 +08:00
Chris Taylor dc7a288539 Make trigger_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:34:41 +08:00
Chris Taylor 06632e73e8 Make centers_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:15:31 +08:00
Chris Taylor 2d587de8dc Make call_default_handler return a window_event_result
Make call_default_handler return a window_event_result to inform the event system in future, particularly if a window was closed.
2016-10-27 16:36:24 +08:00
Chris Taylor 48e9061960 Make the listbox handlers return a window_event_result
Make the listbox handlers and all sub-handlers (when_selected callbacks) return a window_event_result. Makes code more readable and removes one use of window_close, making it easier to inform event system if a window closes in future.
2016-10-27 15:22:41 +08:00
Chris Taylor 2613545712 Return window_event_result::deleted if Game_wind closed
Return window_event_result::deleted if Game_wind was closed somewhere in response to an event handled by game_handler, so in future the event code can use that instead of window_exists to avoid tripping up.
2016-10-27 12:24:02 +08:00
Kp 8b62870245 Fix clang build of udp_tracker_reqgames
gcc permits strlen("") in a constexpr context, but clang prohibits it.
Kreator reports that this broke the OS X build.  Use sizeof(), which
produces approximately the same result and works in both compilers.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/251>
Fixes: 63ca86698e ("Added communication for tracker written by A Future Pilot")
2016-10-26 01:58:05 +00:00
Kp c21e1e22e0 Refactor write_key_text
Kreator reports that clang warns that `i` may be uninitialized in
write_key_text.  This is a valid warning, but gcc does not generate it.
Refactor write_key_text to eliminate the warning and simplify the code.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/252>
Fixes: 20776fcfbc ("Use range_for/vcwallptr for write_key_text")
2016-10-26 01:58:04 +00:00
Kp 791af89351 Use return type auto-deduction in socket call wrappers 2016-10-25 01:44:35 +00:00
Kp a3aa3da3d5 Switch socket_array_dispatch_t to match only array<uint8_t, N> 2016-10-25 01:44:35 +00:00
Kp 692dfffe58 Use array<> for net_udp_noloss_validate_mdata buf 2016-10-25 01:44:35 +00:00
Kp d7087cc59d Convert net_udp_send_pdata to array<> 2016-10-23 20:33:14 +00:00
Kp f14cbd1c00 Use minimal size buffer for net_udp_send_endlevel_packet guest buffer 2016-10-23 20:33:14 +00:00
Kp 4b539c0545 Use minimal size buffer for net_udp_send_endlevel_packet host buffer 2016-10-23 20:33:14 +00:00
Kp ffa53eb3c4 Page in textures before caching them
Some custom levels attempt to use texture overrides that reference
textures that are not yet paged in.  It is not legal to access the data
of a paged-out texture, but ogl_loadbmtexture_f attempted to access it
anyway, causing a crash.  Page in the texture before calling
ogl_loadbmtexture_f.  Old versions of the engine would have cached
garbage data when this happened.

Reported-by: kreator <https://github.com/dxx-rebirth/dxx-rebirth/issues/228>
Fixes: 3c20c24ac0 ("Disable piggy_bitmap_page_out_all")
2016-10-23 20:33:14 +00:00
Kp 49ff176e12 Protect RAIIsocket::s 2016-10-23 20:33:14 +00:00
Kp a0d614e6b0 Use clamp_symmetric_value in kconfig_read_controls
Avoid open-coding the test.
2016-10-21 02:16:48 +00:00
Kp a8a41aa2ff Move git version into Python class 2016-10-21 02:16:47 +00:00
Kp ddc16dac8b Use range_for in multi_check_for_killgoal_winner 2016-10-21 02:16:47 +00:00
Kp 5c872830a1 Remove unused message MULTI_KILL 2016-10-21 02:16:47 +00:00
Kp cca7fc7848 Revert high-score cool_saying size
Mako88 reports that e335cdacb3 broke
reading historical high score files.

Code analysis shows that the size of the high score file must match the
size of struct all_scores, but this was not enforced anywhere.  Commit
e335cdacb3 changed the size of struct
all_scores.  Restore it to its previous size, and add a static_assert to
break the build if anyone tries to change it again.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/241>
Fixes: e335cdacb3 ("Reverted 81d7db279b and rather removed the terminator byte from string length in nm_set_item_input(). This also fixes possible 9 character length for pilot callsigns. Had to fix up COOL_SAYING_LEN as it was not considering the termintor but considering the original D2 source, this was a mess to begin with (def = 50, text string = 60, input field len = 45). Made score saying 50 characters as this seems to be the maximum witdth without overlapping.")
2016-10-20 02:11:39 +00:00
Kp 8341c88300 Move move_towards_vector division into helper
Mako88 reports that 2a19da88d4 changed
robot movement.  That commit reordered the operations in a way that
tends to truncate small values prematurely.  Restore the original order
of operations.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/247>
Fixes: 2a19da88d4 ("Pass object_base &to move_towards_vector")
2016-10-20 02:11:39 +00:00
Kp d955eda96f Fix fullscreen checkbox handling
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/224>
Fixes: 7128141c55 ("Use enum for newmenu item type")
2016-10-18 02:26:30 +00:00
Kp 27d0a79acd Factor out reporting errors caused by bad levels 2016-10-17 03:49:32 +00:00
Kp c006d068d8 Restructure PHYSFSX read helpers into template function 2016-10-17 03:49:31 +00:00
Kp 779738fa80 Add special handling for multi_do_reappear get_ghost_id
multi_do_reappear is overloaded to be used both on ghosts and on live
players.  This causes a diagnostic because the *_id checks expect
exactly one type: either test for ghost or test for player, but not test
for and accept both.  Open code the type check to support both.
2016-10-15 21:17:02 +00:00
Kp e4e74fe09c Pass vcsegptridx to pae_aux 2016-10-15 21:17:02 +00:00
Kp 2d54a0c57d Fix infinite recursion when newmenu_scroll has only one valid item 2016-10-15 17:51:47 +00:00
Kp aae5279bfd Initialize Stuck_objects for D1 2016-10-15 00:53:22 +00:00
Kp f46b5a0210 Pass player_info to hud_show_cloak_invuln 2016-10-15 00:53:22 +00:00
Kp 2d4936b6ef Pass player_info to hud_show_keys 2016-10-15 00:53:22 +00:00
Kp bf11f9f63f Pass player_info to hud_get_primary_weapon_fontcolor 2016-10-15 00:53:21 +00:00
Kp 1a3939469b Pass player_info to hud_show_weapons 2016-10-15 00:53:21 +00:00
Kp 11754d6163 Pass player_info to hud_show_afterburner 2016-10-15 00:53:21 +00:00
Kp 3a52fe0952 Pass player_info to hud_show_energy 2016-10-15 00:53:21 +00:00
Kp 6a885069b0 Remove spurious resets of player::net_killed_total 2016-10-15 00:53:21 +00:00
Kp 01f2932824 Pass grs_canvas &to window_create 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 ea1312beb3 Use trigger_none instead of literal -1 in load_game_data 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 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 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 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
Chris Taylor bc1c9ebd97 Merge branch 'unification/master' into allow_dialog_subclass
Conflicts:
	common/arch/sdl/window.cpp - Remove unused EVENT_WINDOW_CLOSED and w_callback local var
	common/ui/dialog.cpp - Remove unused EVENT_WINDOW_CLOSED
2016-10-10 14:40:11 +08:00
Kp 1af65071d7 Remove unused EVENT_WINDOW_CLOSED
Every callee that recognized EVENT_WINDOW_CLOSED did so only to
explicitly ignore it.  Remove the code to send it and all sites that
ignored it.
2016-10-10 00:25:15 +00:00
Kp b02375bfbd Rename WORDS_NEED_ALIGNMENT to DXX_WORDS_NEED_ALIGNMENT
Rename symbol WORDS_NEED_ALIGNMENT to DXX_WORDS_NEED_ALIGNMENT to show that it is a DXX
symbol, not one inherited from a library.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl WORDS_NEED_ALIGNMENT -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(WORDS_NEED_ALIGNMENT\)\>/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(WORDS_NEED_ALIGNMENT\))/#\1if \2DXX_\3/' -e 's/^\s*#ifndef \(WORDS_NEED_ALIGNMENT\)\>/#if !DXX_\1/'
2016-10-09 17:35:03 +00:00
Kp 3cc73ee69d Fix similar/3d/interp.cpp useless+old-style casts in DXX_WORDS_BIGENDIAN path 2016-10-09 17:35:02 +00:00
Kp 8ebe98df6b Fix test for DXX_USE_UDP, DXX_USE_TRACKER
Fixes: 435aa5a020 ("Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP")
Fixes: 7c8c2b5aa4 ("Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER")
2016-10-08 23:24:22 +00:00
Kp 2d8928958d Fix some use_udp=0 build breaks
The build is still broken for use_udp=0.
2016-10-08 23:24:22 +00:00
Kp 65de22e4be Replace Int3 with con_printf(CON_URGENT) when loading bogus trigger 2016-10-08 23:24:22 +00:00
Kp af09257e2d Blank out most of object_rw when saving OBJ_NONE objects 2016-10-08 23:24:21 +00:00
Kp 5114b8f8b6 Fix object corruption loading save game
Saved games dump robot ai_local state for all objects, regardless of
whether the object is a robot.  Loading a game restored all ai_local
values, regardless of whether the object was a robot on restore.  This
caused memory corruption in objects that were not robots when the
`ctype.`_T_ for that object was large enough to overlap
`ctype.ai_info.ail`.

Fix this by loading the ai_local into a junk buffer when the object is
not a robot.  It would be better to skip over the bogus ai_local
entirely, but the structure of ai_local_read_swap makes that difficult.
Use the easy fix for now.
2016-10-08 23:24:21 +00:00
Kp 03dbc96103 Switch DXX_HAVE_POISON to 0/1 instead of undef/defined 2016-10-08 23:24:21 +00:00
Kp 1d09ca32ad Remove spurious 'u' after DXX_PRI_size_type uses 2016-10-08 18:02:34 +00:00
Kp d6f48dbd91 Prevent crash when level specifies invalid wall number
Kreator reports that "Pyramids of Luxoran" crashes due to a valptridx
sanity check.  The level incorrectly attempts to open a wall on a
segment/side which has no wall.

Add an error check and a con_printf suggesting that the level author
needs to fix the invalid trigger.
2016-10-08 18:02:34 +00:00
Kp 31d2b5cfb2 Use correct get_*_id function for collide_robot_and_weapon 2016-10-07 02:08:56 +00:00
Kp 635b3f54e3 Downgrade matcen diagnostic from exception to con_printf(CON_URGENT)
Kreator reports that a level from back when Descent was new fails the
test for bogus matcen triggers.  This level cannot be played when that
test throws an exception, so downgrade the exception to a CON_URGENT
message.  This will hopefully deter level authors from creating any new
levels with this problem, but will allow users to play existing levels.
2016-10-06 02:08:07 +00:00
Chris Taylor db665d8c33 Allow dcx::UI_DIALOG struct to be subclassed - step 2
Allow dcx::UI_DIALOG struct to be subclassed step 2. Make all the UI_DIALOG handlers return a window_event_result like everyone else.
2016-10-04 15:58:20 +08:00
Chris Taylor 60ac1eaad3 Replace delete dcx::window kludge with a better solution
Replace delete dcx::window kludge with a better solution: instead of requiring every handler to delete the window, add a window_event_result::deleted, which gets returned if the window was deleted by the handler, so window_close knows not to attempt to delete it again.
2016-10-04 14:05:44 +08:00
Chris Taylor d4b85de49b Remove redundant checks for nullptr before deleting dcx::window instances in response to feedback. 2016-10-03 11:21:11 +08:00
kreatordxx b87fcad332 Merge pull request #230 from dxx-rebirth/allow_window_subclasses_2
Allow window subclasses
2016-10-03 10:36:26 +08:00
Kp ec19a6947f Move more symbols to namespace dsx 2016-10-02 19:35:34 +00:00
Kp 53bec35f34 Use range_for for player_ship_read 2016-10-02 19:35:34 +00:00
Kp 3024bb8bbe Pass object_base &to create_player_appearance_effect 2016-10-02 19:35:34 +00:00
Kp a468e2612b Factor out gr_set_attributes SDL_GL_SetAttribute calls 2016-10-02 19:35:34 +00:00
Kp 0abb7278da Move FPSIndicator to CCfg 2016-10-02 19:35:33 +00:00
Kp 797554f80a Move Multisample to CCfg 2016-10-02 19:35:33 +00:00
Chris Taylor 87617e8ac9 Allow dcx::window struct to be subclassed - step 3
Allow dcx::window struct to be subclassed step 3. This step adds the window destructor and both requires and implements the window to be deleted by the event handler/client in all cases.
2016-10-02 17:49:19 +08:00
Kp 968746c0e8 Pass secondary_weapon_index_t to player_has_secondary_weapon 2016-10-02 00:34:49 +00:00
Kp 603159ec4b Pass secondary_weapon_index_t to do_secondary_weapon_select 2016-10-02 00:34:49 +00:00
Kp b8f58309f0 Reuse computed filename for screenshot 2016-10-02 00:34:49 +00:00
Kp 2289ed473d Unify computing write_bmp output size requirement 2016-10-02 00:34:49 +00:00
Kp b2f744f1f8 Remove unnecessary diminish_palette in pcx_write_bitmap
The variable is never read after that diminish_palette call, whether in
pcx_write_bitmap or in its sole caller.
2016-10-02 00:34:49 +00:00
Kp e11ac102a6 Cache bitmap properties in pcx_write_bitmap 2016-10-02 00:34:49 +00:00
Kp 815a26f32d Expand and cache various uses of get_local_plrobj() 2016-10-02 00:34:48 +00:00
Kp 6c7e64d871 Fold ai_do_actual_firing_stuff calls to ready_to_fire_weapon1 2016-10-02 00:34:48 +00:00
Kp 95988a343c Pass player object to recompute_automap_segment_visibility 2016-10-02 00:34:48 +00:00
Kp 0d5d191671 Pass player object to DropMarker 2016-10-02 00:34:48 +00:00
Kp 67e10d532b Pass player powerup_flags to init_ai_frame 2016-10-02 00:34:48 +00:00
Kp 13f751364d Pass player powerup_flags to make_nearby_robot_snipe 2016-10-02 00:34:48 +00:00
Kp dc7c718b66 Pass player powerup_flags to create_bfs_list 2016-10-02 00:34:47 +00:00
Kp 1dcacefc9c Pass player object to check_trigger 2016-10-02 00:34:47 +00:00
Kp 171e303adb Pass player object to check_trigger_sub 2016-10-02 00:34:47 +00:00
Kp 84e596e1b4 Pass player_info to player_has_powerup 2016-10-02 00:34:47 +00:00
Kp 69b84e418d Pass player_info to pick_up_energy 2016-10-02 00:34:47 +00:00
Kp 0b01bad915 Pass player_info to pick_up_primary_or_energy 2016-10-02 00:34:47 +00:00
Kp 038a6e3261 Pass player powerup_flags to wall_hit_process 2016-10-02 00:34:46 +00:00
Kp 3f27b6daac Pass player_info to CyclePrimary 2016-10-02 00:34:46 +00:00
Kp 2c37514235 Pass player_info to CycleSecondary 2016-10-02 00:34:46 +00:00
Kp 36213d9b50 Pass player_info to select_secondary_weapon 2016-10-02 00:34:46 +00:00
Kp e3c3e39045 Pass player_info to do_primary_weapon_select 2016-10-02 00:34:46 +00:00
Kp fe1cd6a165 Pass player_info to maybe_autoselect_primary_weapon 2016-10-02 00:34:46 +00:00
Kp 8219df8db9 Pass player_info to pick_up_secondary 2016-10-02 00:34:45 +00:00
Kp c94cec40d0 Pass player_info to pick_up_primary 2016-10-02 00:34:45 +00:00
Kp 2bd5b80451 Pass player_info to check_to_use_primary_super_laser 2016-10-02 00:34:45 +00:00
Kp 86a4942883 Pass player_info to do_secondary_weapon_select 2016-10-02 00:34:45 +00:00
Kp 888415f086 Pass player_info to reject_unusable_secondary_weapon_select 2016-10-02 00:34:45 +00:00
Kp dfc2584c39 Pass player_info to reject_unusable_primary_weapon_select 2016-10-02 00:34:45 +00:00
Kp 9800f856e7 Pass player_info to select_primary_weapon 2016-10-02 00:34:45 +00:00
Kp 11551abe5c Pass player_info to non-static pick_up_vulcan_ammo 2016-10-02 00:34:44 +00:00
Kp 44579c7dc8 Pass player_info to static pick_up_vulcan_ammo 2016-10-02 00:34:44 +00:00
Kp 96651095e3 Pass player_info to DropCurrentWeapon, DropSecondaryWeapon 2016-10-02 00:34:44 +00:00
Kp b78474edc6 Pass player_info to player_has_secondary_weapon 2016-10-02 00:34:44 +00:00
Kp ad3a29a7eb Pass player_info to cycle_primary_state 2016-10-02 00:34:44 +00:00
Kp 83dd51d79b Pass player_info to player_has_primary_weapon 2016-10-02 00:34:43 +00:00
Kp c483deb646 Change Parallax negative energy hack to avoid modifying energy
This will allow players to see when their energy goes negative, which
might prompt someone to report it with steps to reproduce.
2016-10-02 00:34:43 +00:00
Kp ab89513454 Pass player_info to auto_select_primary_weapon 2016-10-02 00:34:43 +00:00
Kp 1be7344d56 Pass player_info to auto_select_secondary_weapon 2016-10-02 00:34:43 +00:00
Kp 00ccd3f6f6 Move Delayed_secondary into Secondary_weapon 2016-10-02 00:34:43 +00:00
Kp e6b44ffef1 Pass player_info to delayed_autoselect 2016-10-02 00:34:43 +00:00
Kp f148eee01a Pass player powerup_flags to PLAYER_MAX_AMMO 2016-10-02 00:34:42 +00:00
Kp 04eeda8486 Pass local player to skip_create_egg_powerup 2016-10-02 00:34:42 +00:00
Kp e9eaf53c8a Pass player powerup_flags to ai_door_is_openable 2016-10-02 00:34:42 +00:00
Kp 89cec10270 Pass player powerup_flags to compute_vis_and_vec 2016-10-02 00:34:42 +00:00
Kp 5e30489943 Pass player powerup_flags to do_firing_stuff 2016-10-02 00:34:42 +00:00
Kp cae992db5b Factor out move_around_player multiplications 2016-10-02 00:34:42 +00:00
Kp c029d47825 Pass player powerup_flags to move_around_player 2016-10-02 00:34:41 +00:00
Kp bb65d3ce97 Pass player powerup_flags to ai_fire_laser_at_player 2016-10-02 00:34:41 +00:00
Kp 8cfa1508b6 Pass player powerup_flags to escort_set_goal_object 2016-10-02 00:34:41 +00:00
Kp 147af3d4f5 Use array<> for pick_connected_segment arrays 2016-10-02 00:34:41 +00:00
Kp e6e00debba Pass only segidx to pick_connected_segment
A full object is not necessary.
2016-10-02 00:34:41 +00:00
Kp a62cc369ab Expand get_local_player_shields
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp fe99fe232b Expand get_local_player_vulcan_ammo
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp ce65735c04 Expand get_local_player_flags
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp 1b321ac0c6 Expand get_local_player_secondary_ammo
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp b422db5500 Expand get_local_player_cloak_time
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:39 +00:00
Kp 194d258e59 Condense buddy key check 2016-10-02 00:34:39 +00:00
Kp f3865db4cb Use implicit range of vtrgptr 2016-10-02 00:34:39 +00:00
Kp 1ab55f7551 Cast maybe_select_weapon_by_type input to weapon enum
All callers provide a value which must be a valid weapon number.  Cast
the result to a weapon enum so that called helpers can be converted to
expect an enum.
2016-10-02 00:34:39 +00:00
Kp 437d1717d8 Combine automap add_one_edge flags 2016-09-30 01:49:57 +00:00
Kp cd4e5441ba Rename WORDS_BIGENDIAN to DXX_WORDS_BIGENDIAN
Rename symbol WORDS_BIGENDIAN to DXX_WORDS_BIGENDIAN to show that it is a DXX
symbol, not one inherited from a library.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl WORDS_BIGENDIAN -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(WORDS_BIGENDIAN\)\>/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(WORDS_BIGENDIAN\))/#\1if \2DXX_\3/' -e 's/^\s*#ifndef \(WORDS_BIGENDIAN\)\>/#if !DXX_\1/'
2016-09-30 01:49:57 +00:00
Kp 6efd304118 Merge branch 'button_pointers' into master 2016-09-28 02:09:25 +00:00
Kp 8d25cf4162 Define newmenu_item::*_specific_type::nm_type
The *_specific_type structures have a static member `nm_type`.  In -O0
builds, an out-of-line definition of this member is required, but was
not present.  In -O2 builds, the optimizer happened to remove all
references to the out-of-line definition, so the link succeeded despite
not having a definition.  Add that definition.
2016-09-28 01:56:12 +00:00
Chris Taylor dd1a6cc7b9 Save more unique_ptr's to UI_GADGET_BUTTON's
Save unique_ptr's to UI_GADGET_BUTTON's in similar/editor/med.cpp and similar/editor/medwall.cpp. Fixes compile errors and resolves a crash when attempting to access both dialogs' gadgets (input event processing is the first attempt).
2016-09-27 15:11:50 +08:00
Kp 10f4f87a36 Fix _g3_draw_poly declaration/definition inconsistency
_g3_draw_poly uses type cg3s_point which is const in OGL and non-const
in SDL.  gcc-6 with LTO reports a One Definition Rule violation for this
mismatch:

    typedef const int cint;
    void f(cint *);
    void f(const int *) {}

The code ran correctly as it was, but the fix is trivial and has no
effect on the generated code, so fix it to satisfy the compiler.
2016-09-26 00:50:09 +00:00
Kp 56e4f6b6f7 Factor out set_color_by_model_light color
Optimizing compilers tend to factor out color automatically.  Move it up
to the caller to ensure that it is computed once even if the compiler
does not optimize aggressively.
2016-09-26 00:50:09 +00:00
Kp cc2fd7071d Fold endlevel_render_mine g3_set_view_matrix call 2016-09-26 00:50:09 +00:00
Kp d0c3f03d54 Remove unnecessary nullptr test on nonnull parameter in select_file_recursive2
gcc-6 warns about this test because the caller is not permitted to pass
nullptr here, so the test is unnecessary.
2016-09-26 00:50:09 +00:00
Kp ef6f803200 Remove unnecessary nullptr test on nonnull parameter
gcc-6 warns about this test because the caller is not permitted to pass
nullptr here, so the test is unnecessary.
2016-09-26 00:50:09 +00:00
Kp bf7995ade2 Fold render call to g3_set_view_matrix
Remove support for JOHN_ZOOM.  It was present in the initial release,
but never activated.
2016-09-26 00:50:08 +00:00
Kp 4894117d70 Rename MAX_HATS_PER_JOYSTICK to DXX_MAX_HATS_PER_JOYSTICK
Rename symbol MAX_HATS_PER_JOYSTICK to DXX_MAX_HATS_PER_JOYSTICK
to show that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_HATS_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_HATS_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp 94937de128 Rename MAX_BUTTONS_PER_JOYSTICK to DXX_MAX_BUTTONS_PER_JOYSTICK
Rename symbol MAX_BUTTONS_PER_JOYSTICK to DXX_MAX_BUTTONS_PER_JOYSTICK
to show that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_BUTTONS_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_BUTTONS_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp 7d38a9f0be Rename MAX_AXES_PER_JOYSTICK to DXX_MAX_AXES_PER_JOYSTICK
Rename symbol MAX_AXES_PER_JOYSTICK to DXX_MAX_AXES_PER_JOYSTICK to show
that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_AXES_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_AXES_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp f24e9f836c Rename MAX_JOYSTICKS to DXX_MAX_JOYSTICKS
Rename symbol MAX_JOYSTICKS to DXX_MAX_JOYSTICKS to show that it is a DXX
symbol, not one inherited from a library.

git grep -lzw MAX_JOYSTICKS -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_JOYSTICKS\>/DXX_&/g'
2016-09-25 04:52:48 +00:00
Kp 69eec0d71f Save some editor gadget pointers 2016-09-24 18:06:11 +00:00
Kp 62b58e9890 Move OGL to dxxsconf.h; rename to DXX_USE_OGL
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp 3544ea097d Move OGLES to dxxsconf.h; rename to DXX_USE_OGLES
Rename symbol OGLES to DXX_USE_OGLES to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -lzw OGLES -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGLES/\1 DXX_USE_OGLES/' -e 's/\(\s*#\s*if\)ndef OGLES/\1 !DXX_USE_OGLES/'
2016-09-24 18:06:11 +00:00
Kp 7a13d3f228 Include dxxsconf.h explicitly and earlier 2016-09-24 18:06:10 +00:00
zico 1e6a5ec528 Addition for 6c6a32ba92, allowing edge padding for overlaying level textures, disabling it for base textures. This isn't needed and improves visual appearence of base textures with transparency (fuelcenters, forcefields, grates, etc) when texture filtering is enabled. 2016-09-17 18:26:59 +02:00
zico 1f144f167c Addition for 6c6a32ba92, allowing edge padding for level and polymodel texturees only but disable it for sprites, fonts, hud images, etc. as those looked bad with this form of color bleeding in combination with various texture filtering mechanics. 2016-09-17 15:56:43 +02:00
Kp 8180fc34e8 Merge branch 'locale_header_directive' into unification/master
`std::use_facet` is provided by `<locale>`.  x86_64-pc-linux-gnu happens
to provide `std::use_facet` in inferno.cpp without explicitly including
`<locale>`.  kreator found that clang on OS X does not implicitly
provide `<locale>`.  `<locale>` must be included to make
`std::use_facet` available on OS X.  Although it worked without this on
Linux, it is the right thing to do everywhere.
2016-09-15 01:50:56 +00:00
Kp 0bff113335 Fix triangle rendering problem
Unlike many uses of index_sequence<N...>, this set of N... is not the
result of make_tree_index_sequence.  Some callers pass sequences with
`Nn != n` for some n, so vp is not initialized as a copy of all elements
of ovp in the same order as ovp.

Fixes: fa5475aa54 ("Remove unnecessary copy of vertex points")
2016-09-14 01:59:33 +00:00
kreatordxx b39cdac1fd Add include directive for <locale>
Add include directive for <locale>, fixing four compiler errors on Apple Clang.
2016-09-13 19:34:32 +08:00
Kp f11235147a Work around clang crash bug
clang crashes with a segmentation fault if asked to implicitly convert
1u to std::size_t in partial_range inline chain.  Add a conversion
outside the inline chain, which seems to avoid the bug.
2016-09-11 18:49:17 +00:00
Kp 72e9ed319c Rename VERSION to DXX_VERSION_STR
Rename symbol VERSION to DXX_VERSION_STR to show that it is a DXX
symbol, not one inherited from a library.
2016-09-11 18:49:16 +00:00
Kp 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp 0015b4282c Move IPv6 to dxxsconf.h; rename to DXX_USE_IPv6
Rename symbol IPv6 to DXX_USE_IPv6 to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl IPv6 -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(IPv6\)$/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(IPv6\))/#\1if \2DXX_USE_\3/'
2016-09-11 18:49:15 +00:00
Kp 435aa5a020 Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP
Rename symbol USE_UDP to DXX_USE_UDP to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_UDP -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(USE_UDP\)$/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(USE_UDP\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp 7c8c2b5aa4 Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER
Rename symbol USE_TRACKER to DXX_USE_TRACKER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_TRACKER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_TRACKER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_TRACKER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00