Commit graph

904 commits

Author SHA1 Message Date
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 39b705b352 Use integral_constant for grant masks 2015-06-05 02:34:40 +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 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 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 0ece005dfa Use screen_mode for screen resolution 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 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 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 68834fb929 Expand render_mine window_rendered_data helper inline 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 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 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 fd6ac87c25 Fix trigger_none checks 2015-04-26 20:15:50 +00:00
Bradley Bell 844aad2639 Merge branch 'unification/master' into command-line 2015-04-24 20:54:35 -07: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 9751022b1b Use static_assert for player_rw size check 2015-04-19 04:18:50 +00:00
Kp 4240017193 Remove unused D1 definition of POW_HEADLIGHT 2015-04-19 04:18:49 +00:00
Kp 150e2d2686 Convert local arrays to array<> 2015-04-19 04:18:49 +00:00
Kp 32b4b8f0bb Use enum class for level save/load 2015-04-19 04:18:49 +00:00
Kp e99a9236cf Avoid redundant vsegptridx calculation in object_move_one 2015-04-11 04:01:29 +00:00
Kp efc5b071de Remove object_rw::pad, pad2
The presence of these fields breaks network compatibility between
aligned and unaligned users.  Removing these fields breaks the ability
to use aligned savegames.  Per discussion in
<fdaa09d7f9>,
this is acceptable to clean up the code.

Reported-by: derhass <http://www.dxx-rebirth.com/frm/index.php/topic,1986.msg21232.html>
Approved-by: zico <fdaa09d7f9 (commitcomment-10575014)>
2015-04-04 23:20:12 +00:00
Kp a9c81c5614 Move Weapon_is_energy to collide.cpp 2015-04-02 02:36:57 +00:00
Kp 5ae5033fed Use enum for AIB constants 2015-04-02 02:36:57 +00:00
Kp 6b6eaef226 Include polyobj.h from robot.h
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp 2f86499144 Remove do_cockpit_window_view unused parameters 2015-04-02 02:36:57 +00:00
Kp b0ec49f8e5 Remove unused file+line from get_seg_masks 2015-04-02 02:36:56 +00:00
Kp aa75a398d9 Move Wall_names to dumpmine.cpp 2015-04-02 02:36:56 +00:00
Kp ae8b99ae7d Use RAIIdigi_sound for briefing printing_channel 2015-04-02 02:36:55 +00:00
Kp 6a4c7ed78e Inline away D1 secret_restore values 2015-04-02 02:36:53 +00:00
Kp face692126 Narrow D2 previous_visibility to uint8_t 2015-04-02 02:36:53 +00:00
Kp 6757b2178b Narrow D2 rapidfire_count to uint8_t 2015-04-02 02:36:53 +00:00
Kp bb10d350f4 Narrow D2 consecutive_retries to uint8_t 2015-04-02 02:36:53 +00:00
Kp a36603826a Narrow D2 retry_count to uint8_t 2015-04-02 02:36:53 +00:00
Kp 9157e5f970 Use enum class for player_awareness_type_t 2015-04-02 02:36:53 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 66a70fd373 Prepare for global arrays to be array<> 2015-04-02 02:36:52 +00:00
Kp 6e96ff3e00 Fix ambiguous use of INTEL_SHORT/INTEL_INT 2015-04-02 02:36:52 +00:00
Kp 598a5e42a2 Allow granting items at player spawn 2015-03-28 17:18:02 +00:00
Kp da3cb31a0e Refactor powerup allow code 2015-03-28 17:18:02 +00:00
Kp b32d1c76c9 Move powerup size reset into set_powerup_id 2015-03-28 17:18:02 +00:00
Kp 12ad357b8d Move Wimp Menu to macro 2015-03-28 17:18:02 +00:00
Kp 0707664ae1 Use enum for kmatrix_view result 2015-03-24 02:07:42 +00:00
zico 8d686ab23b implemented return value for kmatrix_view() so we can properly bail out of the game loop in AdvanceLevel() 2015-03-23 03:03:22 +01:00
Kp d63be36fb3 Fix bogus trap on remote_owner check
Some call sites pass a uint8_t to objnum_remote_to_local, which is
zero-extended up to an int.  The check for owner==-1 then fails, causing
the sanity check to trap to the debugger, even though the situation is
normal and harmless.  Switch the type to int8_t to ensure that the value
is not sign/zero-extended.
2015-03-22 22:48:47 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp ce028fc843 Move Object_type_names to dumpmine 2015-03-22 18:49:21 +00:00
Kp 7840885473 Fix clang -Wparentheses-equality warnings 2015-03-22 18:49:21 +00:00
Kp 65ff319ebb Use ntstring for LastMission 2015-03-22 18:49:20 +00:00
Kp af7b08abac Convert some GameCfg flags to bool 2015-03-22 18:49:20 +00:00
Kp 3da8a85ec3 Remove constexpr on rgb_array_wrapper::operator[]
OS X clang (but not Linux clang) rejects constexpr
on rgb_array_wrapper::operator[].

Reported-by: btb <b414758505 (commitcomment-10330686)>
Fixes: b414758505 ("Add stub for player color remapping")
2015-03-21 21:11:12 +00:00
Matt Vandermeulen a59daa64c6 ಠ_ಠ 2015-03-20 17:31:22 -04:00
Kp e1ff8afc88 Use ntstring for newmenu_item saved_text 2015-03-12 02:21:21 +00:00
Kp d1b60c2324 Pass uint_fast32_t for newmenu_* items 2015-03-12 02:21:21 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp b414758505 Add stub for player color remapping 2015-03-09 03:33:07 +00:00
Kp 72a01bf56c Add indirection for player color lookup 2015-03-09 03:33:07 +00:00
Kp a84a05c701 Move graphics menu to macro 2015-03-07 17:20:41 +00:00
Kp 7349a90cc8 Remove unused multi_send_message_dialog 2015-03-03 04:36:16 +00:00
Kp 335780758b Remove unused DXX_*_INPUT argument MAX_TEXT_LEN 2015-02-28 19:36:02 +00:00
Kp 3dfac8350e Use array<> for robot_info 2015-02-28 19:36:01 +00:00
Kp a9a330bf3f Use array<> for expl_wall_list
Fixes: 125d9257be ("Use special type names for segment/object numbers")
2015-02-28 19:36:01 +00:00
Kp b940ca0510 Use array<> for bogus_data 2015-02-28 19:36:01 +00:00
Kp 8ad180c0a2 Use array<> for Reactors 2015-02-28 19:36:01 +00:00
Kp 1580a274f2 Use array<> for net_udp buffers 2015-02-28 19:36:01 +00:00
Kp a65533d477 Remove unused delta_light dummy 2015-02-28 19:36:01 +00:00
Kp 0ad02ad975 Remove unused piggy_game_bitmap_name 2015-02-28 19:36:01 +00:00
Bradley Bell 1c2746ae45 Make constructor and overloads for cvar_t 2015-02-23 23:31:41 -08:00
Bradley Bell 44dace6a49 Make cvar names const 2015-02-23 23:31:40 -08:00
Bradley Bell eaf11884e2 simplify struct declaration 2015-02-23 23:31:40 -08:00
Bradley Bell 45d31b6d57 Replace cvar.archive with flags.
Add cheat flag.
2015-02-23 20:44:20 -08:00
Bradley Bell df3ce9953f Merge branch 'unification/master' into command-line 2015-02-22 19:25:04 -08:00
Bradley Bell a838e08431 use hash for cvar list 2015-02-22 13:29:07 -08:00
zico afd70564e5 Gave client address as player_address for all UPID_SYNC packets so clients can properly discover their player number when (re)joining running games. Defined 0xcc as MULTI_PNUM_UNDEF for purpose of uninitialized Multiplayer client slots. 2015-02-22 01:41:02 +01:00
zico eef3dc03a7 Due to flexible size of game/lite info packets only check for maximum size of these packets 2015-02-21 18:21:34 +01:00
Kp f2fb31a120 Merge 'D1 emulation issues' into unification/master
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/38
2015-02-20 03:00:46 +00:00
Bradley Bell 0191bf451f miscellaneous fixes 2015-02-17 02:27:15 -08:00
Bradley Bell b14f6031f5 simplify help system 2015-02-16 13:34:13 -08:00
Kp 2c63744fd3 Use array<> for jointlist 2015-02-14 22:48:30 +00:00
Kp 68e2168377 Use array<> for bitmap_index arrays 2015-02-14 22:48:30 +00:00
Kp 40b8bc1a06 Remove unused flag ammo
spit_powerup never sets ammo
2015-02-14 22:48:30 +00:00
Kp 93e01f71fd Remove unused Player_num from MULTI_DROP_FLAG 2015-02-14 22:48:29 +00:00