Commit graph

1858 commits

Author SHA1 Message Date
Kp fcaacaebde Factor out valptridx test for *_none 2015-06-13 22:42:15 +00:00
Kp 8358dfcd0b Support biased pointers to help memory debuggers 2015-06-13 22:42:15 +00:00
Kp d5b5846657 Fix serial *_type -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 5124c510f8 Fix serial endian_access -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 06c363fb19 Fix UI_GADGET -fno-inline build
Fixes: 95e3ac1e5b ("Use integral_constant for UI kind")
2015-06-11 03:06:58 +00:00
Kp 64ee9e0047 Improve memdebug d_strdup trace 2015-06-11 03:06:58 +00:00
John Ackerman fe71a94d53 Implement Nonlinear Joystick Settings
[Kp: fix whitespace; squash fixes into main]
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/84>
2015-06-11 01:41:26 +00:00
Kp 7c436f1fbb Merge pull #39 into unification/master
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/39>
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88712761>
Acked-by: zico <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88907523>
2015-06-07 16:21:37 +00:00
Kp 0e80080b7b Fix -Wvla error in cmd_execute 2015-06-07 16:20:48 +00:00
Kp b77db2f638 Use RAIIdmem for cmd_queue_t command_line 2015-06-07 16:20:47 +00:00
Kp 3cab20a501 Move cmd local classes into anonymous namespace 2015-06-07 16:20:47 +00:00
Kp 9a451a9168 Pass cvar_registervariable cvar by & 2015-06-07 16:20:47 +00:00
Kp 4c778ed26b Add const to cmd prototype 2015-06-07 16:20:47 +00:00
Kp 23349f06e1 Use std::forward_list for cmd_queue 2015-06-07 16:20:47 +00:00
Kp 6bc96bd72b Remove unaliased entries from map 2015-06-07 16:20:47 +00:00
Kp e33b037b83 Use RAIIdmem for cmd_alias_t value 2015-06-07 16:20:47 +00:00
Kp 3dec5551ca Use std::map for cmd_alias_list 2015-06-07 16:20:47 +00:00
Kp 948a4fc184 Use std::map for cmd_list 2015-06-07 16:20:47 +00:00
Kp 1afa132c18 Simplify cli gr_string call 2015-06-07 16:20:47 +00:00
Kp ddb521c5e7 Use std::map for cvar_list 2015-06-07 16:20:46 +00:00
Kp 2be3ce1f01 Use std::string for cvar string 2015-06-07 16:20:46 +00:00
Kp ff452dbded Move CLI code to common
None of it depends on D1 vs D2.
2015-06-07 16:20:46 +00:00
Kp 1115114e3d Remove unnecessary old-style const stripping cast
This cast was necessary only because cvar_set_cvar was not properly
const.
2015-06-07 16:20:46 +00:00
Kp 204b7d7cb7 Remove dangerous const-removing constructor
Fortunately, this constructor was unnecessary.  If it had ever been
used, later code could d_free() read-only storage.
2015-06-07 16:20:46 +00:00
Kp 3718678576 Reduce cvar.h includes 2015-06-07 16:20:46 +00:00
Kp 3b54c50230 Use std::bitset for laser hitobj mask 2015-06-06 18:03:45 +00:00
Kp f7de7d132a Add initial support for minimum_size 2015-06-05 02:34:40 +00:00
Kp a8bb0ad07d Use integral_constant for serial constants 2015-06-05 02:34:40 +00:00
Kp 39b705b352 Use integral_constant for grant masks 2015-06-05 02:34:40 +00:00
Kp a918692a23 Preprocess out EDITOR-only vm_vec_ang_2_matrix
Remove vm_vec_ang_2_matrix from non-EDITOR builds so that
sincos_2_matrix has only one caller, allowing compiler to implicitly
inline it.
2015-06-02 03:03:32 +00:00
Kp 0f6a82963a Inline fix_sincos in vm_extract_angles_matrix 2015-06-02 03:03:32 +00:00
Kp 0141e9ed78 Remove redundant fix_sincos calls
The result is immediately overwritten.  Skip computing it.
2015-06-02 03:03:32 +00:00
Kp b207aa6900 Shorten vm_angles_2_matrix 2015-06-02 03:03:31 +00:00
Kp 33204bac5c Make Break_on_object static 2015-06-02 03:03:31 +00:00
Kp bb5fd12ffe Pass vcobjptr to object_intersects_wall 2015-06-02 03:03:31 +00:00
zico 2bfe21183e Changing homing turn times to 30 FPS base again by user request 2015-06-01 15:27:34 +02:00
zico b04282e791 Using one global yet independent timeer for homing missiles similar to d_tick instead of having one in each missile object. Also decreased HOMING_TURNING_TIME to 25 FPS base 2015-05-30 18:29:41 +02:00
zico 7ba3d1317b Isolated all of the homing code into time-depending condition determined by track_turn_time and added track_turn_tick to make target re-discovery dependent on the individual missile tracking instead of global d_tick_count 2015-05-28 15:22:40 +02:00
Kp b6a9b2a853 Pass vsegptridx to wall_toggle 2015-05-28 03:08:40 +00:00
Kp 850853326c Pass vsegptridx to gate_in_robot 2015-05-28 03:08:39 +00:00
Kp 5cc38ea06c Pass vcsegptridx to digi_link_sound_to_pos 2015-05-28 03:08:39 +00:00
Kp babfa9d8e7 Construct d_event_mousebutton 2015-05-28 03:08:39 +00:00
Kp 692038f284 Cache modifier keys 2015-05-28 03:08:38 +00:00
Kp 25186ca984 Remove write-only keyd_last_released 2015-05-28 03:08:38 +00:00
Kp badad2ef33 Remove write-only keyd_last_pressed 2015-05-28 03:08:38 +00:00
Kp abfd8e4d83 Split mouse_toggle_cursor 2015-05-28 03:08:38 +00:00
Kp 73300a285d Merge "change u_int*_t to C99 standard uint*_t"
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/67>
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/67#issuecomment-104806115>
2015-05-23 17:36:29 +00:00
zico 1f6ae58f52 Added HANDS_OFF_PERIOD define for multibot to make sure code will not break if MAX_ROBOTS_CONTROLLED changes 2015-05-23 18:18:20 +02:00
Kp 2f00efdcc6 Fix gcc-4.6 weapon build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 9d213b5282 ("Wrap player_has_weapon return type")
2015-05-22 03:33:20 +00:00
Kp ef1abd87e8 Fix gcc-4.6 digi build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: ae8b99ae7d ("Use RAIIdigi_sound for briefing printing_channel")
2015-05-22 03:33:20 +00:00
Kp 63cea8bb23 Fix gcc-4.6 ui build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 95e3ac1e5b ("Use integral_constant for UI kind")
2015-05-22 03:33:19 +00:00
Kp 0fc7b1898c Fix gcc-4.6 serial build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 9595aec2fb ("Use integral_constant for endian constants")
2015-05-22 03:33:19 +00:00
Kp cc2a5e9790 Use gr_free_bitmap_data for Orb_icons 2015-05-22 03:33:19 +00:00
Bradley Bell bdacd2f7d7 change u_int*_t to C99 standard uint*_t 2015-05-18 17:12:53 -07:00
Kp c53b734abb Compute slide segments early
Store slide flag in segment to save one byte per segment.
2015-05-17 20:37:59 +00:00
Kp 265ad59e9c Remove set_default_handler
standard_handler is the only handler.  Use it directly.
2015-05-14 02:23:13 +00:00
Kp e50b0d479e Inline event_mouse_get_delta 2015-05-14 02:23:13 +00:00
Kp 2a8b79f868 Inline event_mouse_get_button 2015-05-14 02:23:13 +00:00
Kp 0ece005dfa Use screen_mode for screen resolution 2015-05-14 02:23:13 +00:00
Kp 2d9af1e348 Propagate gr_init argument 2015-05-14 02:23:13 +00:00
Kp cb873563c8 Move reticle menu to macro 2015-05-14 02:23:13 +00:00
Kp ac3b1d6aa3 Switch do_cockpit_window_view to vobjptr_t
Only the wake_up_rendered_objects hack needed a vobjptridx_t.  Switch to
vobjptr_t.
2015-05-13 03:20:28 +00:00
Kp 5810faf33d Make Ai_last_missile_camera object* 2015-05-13 03:20:28 +00:00
Kp 38e8967fba Split event_toggle_focus 2015-05-09 17:39:03 +00:00
Kp f248006df5 Remove unused mouse_get_btns 2015-05-09 17:39:03 +00:00
Kp 044ef0773a Shorten partial_range error reporting 2015-05-09 17:39:02 +00:00
Kp f92e890f50 Improve valptridx exception reporting 2015-05-09 17:39:02 +00:00
Kp 29f239d6b1 Raise PHYSFSX_exists bool check to caller
All callers use a constant value, so raise the check into the caller to
let the optimizer delete the unnecessary branch.
2015-05-09 17:39:02 +00:00
Kp 371838c74e Use unique_ptr to manage GLsync fence 2015-05-09 17:39:01 +00:00
Kp 5a2c11c7ad Precompute OGL sync wait_timeout milliseconds 2015-05-09 17:39:01 +00:00
Kp 2e2c17669c Shorten timer_delay 2015-05-09 17:39:01 +00:00
Kp b1992b5e59 Shorten timer_delay2 2015-05-09 17:39:01 +00:00
Kp ed86b53395 Make Muzzle_queue_index static 2015-05-09 17:39:01 +00:00
Kp 1cdc43d71a Split object_create_egg 2015-05-09 17:39:01 +00:00
Kp f5b02ce6a0 Remove write-only ai_static D1 follow_path_start_seg 2015-05-09 17:39:01 +00:00
Kp 7dae02fbb4 Remove write-only ai_static D1 follow_path_end_seg 2015-05-09 17:39:00 +00:00
Kp 3b59a71e11 Remove unused D1 last_see_time 2015-05-09 17:39:00 +00:00
Kp 83baf4dfe8 Remove unused D1 last_attack_time 2015-05-09 17:39:00 +00:00
Kp 9a4f7a32bf Pass vcsegptr to fuelcen_give_fuel 2015-05-09 17:39:00 +00:00
Kp 6dccb811b7 Pass unsigned x/y to gr_pixel 2015-05-09 17:39:00 +00:00
Kp cf87ebe54d Remove write-only grs_bitmap::bm_handle 2015-05-09 17:38:59 +00:00
Kp b124b3d75f Shorten Hline/Vline 2015-05-09 17:38:59 +00:00
Kp a51a7110e8 Pass vobjptridx_t to multi_send_position 2015-05-09 17:38:59 +00:00
Kp b5eae4c809 Split create_smart_children 2015-05-09 17:38:58 +00:00
Kp 08a42a68ff Pass vcobjptridx to laser_are_related 2015-05-09 17:38:58 +00:00
Kp ae8ee3651a Enable vcvalptr(P*) 2015-05-09 17:38:58 +00:00
Kp bdee338e34 Preserve array size for ui_get_filename 2015-05-09 17:38:58 +00:00
Kp 649993982f Enable tail call optimization in menubar_close 2015-05-09 17:38:58 +00:00
Kp 36ce989db6 Refactor get_next_segment 2015-05-09 17:38:58 +00:00
Kp fc4b686d9d Store PHYSFS_list element count in list when needed 2015-05-09 17:38:57 +00:00
Kp 68834fb929 Expand render_mine window_rendered_data helper inline 2015-05-05 03:20:42 +00:00
Kp 1d08cb6058 Fix file_get*list nullptr without constructor inheritance 2015-05-05 03:20:42 +00:00
Kp 9dc22b1ee6 Expand DXX_CXX11_EXPLICIT_DELETE
Various functions use the non-macro form, so support for =delete is
already mandatory.  Remove the remnants of support for compilers which
lack =delete and replace it with a hard stop when the compiler rejects
declaring explicitly deleted functions.
2015-05-01 02:18:33 +00:00
Kp 9f01dcf0db Use signed multiplier in fix_sincos
Fixes: a5b83d19de ("Simplify fix_sin/fix_cos calls")
2015-04-30 03:32:27 +00:00
Kp 6431b9d821 Include <cstdint> for maths.h 2015-04-30 03:32:26 +00:00
Kp a5b83d19de Simplify fix_sin/fix_cos calls 2015-04-29 03:35:09 +00:00
Kp e30e0ebb94 Shorten vm_vec_copy_scale 2015-04-29 03:35:09 +00:00
Kp bfd434fb15 Switch object_signature_t forward declaration to class
Although struct and class are interchangeable in this context, clang
whines when the program mixes them.  Use 'class' consistently to silence
this warning.

Reported-by: btb <91d31b1952 (commitcomment-10903195)>
Fixes: 91d31b1952 ("Wrap object signature in subtype")
2015-04-26 20:15:57 +00:00
Kp 0d564814f5 Convert Primary_weapon to primary_weapon_index_t 2015-04-26 20:15:57 +00:00
Kp 67e5e8c6c1 Remove unused gr_make_blend_table 2015-04-26 20:15:57 +00:00
Kp ace2235ad8 Remove unused gr_make_cthru_table 2015-04-26 20:15:57 +00:00
Kp 8d849b2b39 Wrap laser level in class
Move enum laser_level_t to weapon.h for the new class.
2015-04-26 20:15:56 +00:00
Kp 6792c1bc4b Enable -Wunused-parameter 2015-04-26 20:15:56 +00:00
Kp cca163fc30 Split select_weapon 2015-04-26 20:15:52 +00:00
Kp f789e29b41 Simplify check_to_use_primary 2015-04-26 20:15:52 +00:00
Kp 610f603ebf Pass weapon_name to select_weapon 2015-04-26 20:15:52 +00:00
Kp 10b9206a9b Split do_weapon_select 2015-04-26 20:15:51 +00:00
Kp 4d046c5336 Split auto_select_weapon 2015-04-26 20:15:51 +00:00
Kp 8e5a63700b Use enum class for ai_mode 2015-04-26 20:15:51 +00:00
Kp f15ec9c86a Use enum for AIM constants 2015-04-26 20:15:51 +00:00
Kp e883d7c872 Use enum class for AIB constants 2015-04-26 20:15:51 +00:00
Kp c3925353fd Use null_sentinel_iterator for PHYSFS_list_t 2015-04-26 20:15:51 +00:00
Kp 143c536c77 Use PHYSFS_list_t for more functions 2015-04-26 20:15:50 +00:00
Kp 44adc83ca4 Use std::remove_if in file_get*list 2015-04-26 20:15:50 +00:00
Kp f00ec13c0f Use std::move_backward for file_getdirlist 2015-04-26 20:15:50 +00:00
Kp fd6ac87c25 Fix trigger_none checks 2015-04-26 20:15:50 +00:00
Kp 5d0a640449 Always inline PHYSFS check functions
The checking is done at compile time, so force them inline to ensure
the optimizer recognizes constants.
2015-04-26 20:15:50 +00:00
Bradley Bell a63ec5bd7c Merge branch 'unification/master' into command-line 2015-04-25 12:27:16 -07:00
Kp 23364a5862 Remove warn_unused_result from vm_vec_normalize
Some callers want the side effect of normalizing the argument and do not
need the magnitude.  Per report from btb, the warning broke the OS X
build.

Reported-by: btb <5e4bd5c73f (commitcomment-10899878)>
Fixes: 5e4bd5c73f ("vm_vec_delta_ang: check for vm_vec_copy_normalize failure")
2015-04-25 16:56:25 +00:00
Bradley Bell 844aad2639 Merge branch 'unification/master' into command-line 2015-04-24 20:54:35 -07:00
Kp 6e9638531a Mark get_previous_segment static 2015-04-22 02:44:31 +00:00
Kp 08ee591e21 Fix ODR collision between ui/file browser and main/menu browser 2015-04-22 02:44:30 +00:00
Kp 3eb8f4813e Pass vcobjptr_t to apply_damage_to_controlcen 2015-04-22 02:44:30 +00:00
Kp eedfaab822 Remove OGL Max_linear_depth 2015-04-22 02:44:29 +00:00
Kp b46ecbb3e9 Add netgame parameter to duplicate powerups 2015-04-19 04:18:53 +00:00
Kp 4381b81497 Pack spawn granted items in D1 2015-04-19 04:18:53 +00:00
Kp b32298df5a Rewrite powerup cap code to centralize logic 2015-04-19 04:18:53 +00:00
Kp b88c232f9f Use powerup_type_t for *_weapon_to_powerup 2015-04-19 04:18:53 +00:00
Kp d7066c3eb9 Remove constant arguments to pick_up_ammo 2015-04-19 04:18:53 +00:00
Kp 28b4a65547 Centralize ammo rack bonus 2015-04-19 04:18:52 +00:00
Kp adbefd39c4 Minimize unnecessary fields passed to check_effect_blowup 2015-04-19 04:18:52 +00:00
Kp 864605dce2 Use stdint for titles.h 2015-04-19 04:18:52 +00:00
Kp c20cfc02cb Remove unused D1 definition of POW_FULL_MAP 2015-04-19 04:18:52 +00:00
Kp ae8a8c98ce Reduce player.h includes 2015-04-19 04:18:52 +00:00
Kp 83afd8d96f Reduce piggy.h includes 2015-04-19 04:18:52 +00:00
Kp 51ab9ff9d6 Simplify DXX guard on object.h 2015-04-19 04:18:52 +00:00
Kp 808d5c1cf2 Switch joystick_text_length to integral_constant 2015-04-19 04:18:52 +00:00
Kp cd6be09547 Reduce kconfig.h includes 2015-04-19 04:18:51 +00:00
Kp c338862ad6 Reduce gauges.h includes 2015-04-19 04:18:51 +00:00
Kp 4149ab6e5f Reduce gameseq.h includes 2015-04-19 04:18:51 +00:00
Kp 714fd36241 Reduce gamemine.h includes 2015-04-19 04:18:51 +00:00
Kp 27b6ad1630 Reduce game.h includes 2015-04-19 04:18:51 +00:00
Kp 75162a6fe9 Reduce controls.h includes 2015-04-19 04:18:51 +00:00
Kp 516b8b2397 Reduce collide.h includes 2015-04-19 04:18:51 +00:00
Kp 8c6ddf1abf Reduce cntrlcen.h includes 2015-04-19 04:18:51 +00:00
Kp 726e5737bb Reduce bm.h includes 2015-04-19 04:18:51 +00:00
Kp 8582907b91 Reduce ai.h includes 2015-04-19 04:18:51 +00:00
Kp 4e937ae239 Reduce playsave.h includes
Move non-common includes into defined(D1||D2)
2015-04-19 04:18:50 +00:00
Kp 9d213b5282 Wrap player_has_weapon return type 2015-04-19 04:18:50 +00:00
Kp 9595aec2fb Use integral_constant for endian constants 2015-04-19 04:18:50 +00:00