Kp
1b12a3f7ef
Add parentheses around target of more complicated casts
...
C casts do not require parentheses. C++ casts require grouping around
the target. Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of some C casts.
This pass attempts to process expressions that involve parenthesized or
bracketed subexpressions, but only if those subexpressions do not
themselves contain parenthesized or bracketed subexpressions.
(int) f(1); // changed
(int) f(g()); // not changed
perl -p -i -e 's/(\(\s*((?:un)?signed|int|char|short|long|float|double|s?size_t|(?:u?int[[:digit:]]+_t))\s*\**\s*\)\s*)([&+-]?)([[:alnum:]_.]+\s*->\s*)*([[:alnum:]_.]+)((?:\s*(?:\[[^][]*\])*|(?:\([^()]*\))*))(\s*([;+>*\/^%,|&<>])|$|(\s*-\s*[^>]))/\1\(\3\4\5\6\)\7/g'
2016-06-12 03:45:37 +00:00
Kp
6fc1730770
Convert piggy cast to reinterpret_cast
2016-06-12 03:45:37 +00:00
Kp
bc30ccd216
Rewrite cast of (sbyte) to standard type int8_t
...
s/(sbyte)\s*\(\w\)/(int8_t) \1/g
2016-06-12 03:45:37 +00:00
Kp
478a48ddc1
Fix vulcan ammo object tests
...
Object numbers are unsigned short, not signed short. If anyone ever
raises the object limit high enough, testing for negative values would
blacklist valid objects.
Remove unnecessary test for objnum!=object_none. If it were none,
constructing `obj` would have failed.
2016-06-12 03:45:37 +00:00
Kp
5b437592b0
Simplify test for vulcan|gauss
2016-06-12 03:45:36 +00:00
zico
84f254e2f2
Another addendum to 3366658a5bd2b30a82949b8b301e97b324ce539d: Don't make ngii static anymore (forgot to change this).
2016-06-06 17:29:21 +02:00
zico
7684ce92e4
Added packet to notify clients about a changed vulcan ammo count in a weapon powerup in case player collects ammo but leaves the gun itself.
2016-06-06 17:26:59 +02:00
zico
416ea963c8
When building D2X, before dropping Vulcan ammo check for presence of Gauss cannon, too.
2016-06-06 15:43:38 +02:00
Kp
9283c2f0c3
Improve Error reporting on texmerge consistency failure
2016-06-05 18:45:21 +00:00
Kp
3918db41ff
Factor out common texture merge code
2016-06-05 18:45:20 +00:00
Kp
231223895d
Rewrite simple pointer casts from C style to reinterpret_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\*\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp
b282bea173
Rewrite simple integer casts from C style to static_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp
ebebda5f17
Fix piggy casts when sizeof(size_t) is not sizeof(void*)
2016-06-05 01:04:26 +00:00
Kp
7fdce88558
Add parentheses around target of simple casts
...
C casts do not require parentheses. C++ casts require grouping around
the target. Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.
This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets. It also works only on commonly used standard types.
(int) a->b; // changed
(int) a[b]; // not changed
s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
Kp
badf0f4f90
Rewrite cast of (uint*) to standard type uint32_t
...
s/(\s*uint\s*\*\s*)/(uint32_t *)/g
2016-06-05 01:04:25 +00:00
Kp
aeebffccc0
Rewrite cast of (ushort*) to standard type uint16_t
...
s/(\s*ushort\s*\*\s*)/(uint16_t *)/g
2016-06-05 01:04:25 +00:00
Kp
b31446340c
Rewrite cast of (ubyte*) to standard type uint8_t
...
s/(\s*ubyte\s*\*\s*)/(uint8_t *)/g
2016-06-05 01:04:25 +00:00
Kp
0bba26fde5
Move ini.pop_back() into ReadIniArgs
...
Both callers of ReadIniArgs need the string removed afterward. Prior to
8fb9a0f, only the parser for `-ini` needed the string removed. The
caller for the automatic ini file ended and destroyed the container. As
of 8fb9a0f, the container persists. Leaving the string in the container
causes a bad error message if the command line is rejected.
It is bad form to have ReadIniArgs pop, but the caller push. However,
the two callers use different signatures for emplace_back(), so unifying
the push would require calling a suboptimal emplace_back. Choose the
lesser evil of unbalanced push/pop.
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/198 >
2016-05-31 00:42:56 +00:00
zico
660d18c312
Check for GM_MULTI together with Netgame.InvulAppear in init_player_stats_new_ship(). Otherwise going into Singleplayer after starting a Multiplayer match with this option set can translate this effect into Singleplayer.
2016-05-30 15:00:07 +02:00
zico
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-05-30 14:54:51 +02:00
zico
1856e73ca6
Addition to 3366658a5bd2b30a82949b8b301e97b324ce539d: Changed show_netgame_info and pass netgame as reference and const; removed struct and extern; declared ngii inside show_netgame_info().
2016-05-30 13:49:06 +02:00
zico
a8ed0aaa9c
Added breaks in event.cpp to prevent unwanted events if -nomouse and/or -nojoystick is given; Added automap_apply_input() to prevent multiple inputs per frame causing multiple movement applications.
2016-05-30 13:17:42 +02:00
Kp
604778248d
Fix -Wshadow warning in get_chunks_state
...
get_chunks_state has a member named `data` and its constructor took a
parameter named `data`. This is unambiguous in the language, but causes
a warning from gcc's -Wshadow when building with WORDS_NEED_ALIGNMENT.
Rename the parameter to eliminate the warning.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/pull/196 >
2016-05-29 17:46:32 +00:00
Kp
f073e9e377
Fold nm_messagebox call in net_udp_do_join_game
2016-05-28 17:31:27 +00:00
Kp
82a8f6ebb0
Pass bm_mode to gr_init_bitmap
2016-05-28 17:31:27 +00:00
Kp
dcc56e6b39
Propagate bm_mode::linear into iff_read_bitmap
2016-05-28 17:31:27 +00:00
Kp
c00f918a8e
Propagate bm_mode::linear into bald_guy_load
2016-05-28 17:31:26 +00:00
Kp
3fb16c1d7a
Propagate bm_mode::linear into pcx_read_bitmap
2016-05-28 17:31:26 +00:00
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
a0cc2bfc7e
Pass canvas to ogl_upixelc
2016-05-28 17:31:26 +00:00
Kp
0253907a88
Factor out ogl_upixelc palette lookups
2016-05-28 17:31:26 +00:00
Kp
7d468491a1
Fix -Wshadow warnings in mission.cpp
2016-05-22 17:49:32 +00:00
Kp
e3eceb2c6e
Fix -Wshadow warnings in load_mission
2016-05-22 17:49:31 +00:00
Kp
9f76e9e97a
Fix -Wshadow warnings in init_boss_segments
2016-05-22 17:49:31 +00:00
Kp
ed330960f5
Fix -Wshadow warnings in _g3_draw_poly
2016-05-22 17:49:31 +00:00
Kp
692bede8c3
Fix -Wshadow warnings in gr_toggle_fullscreen
2016-05-22 17:49:31 +00:00
Kp
f98c47047a
Fix -Wshadow warnings in med_rotate_group
2016-05-22 17:49:31 +00:00
Kp
523b7f036b
Fix -Wshadow warnings in med_create_segment
2016-05-22 17:49:30 +00:00
Kp
688b376a90
Fix -Wshadow warnings in write_wall_text
2016-05-22 17:49:30 +00:00
Kp
0cae71b8a6
Fix -Wshadow warnings in draw_model
2016-05-22 17:49:30 +00:00
Kp
994225c188
Use array<> for dumpmine arrays
2016-05-22 17:49:30 +00:00
Kp
f0dcd47b5c
Fold determine_used_textures_level call to load_level
2016-05-22 17:49:30 +00:00
Kp
9d0c6f59a5
Remove always-zero piggy_page_flushed
...
Descent for DOS supported paging content on demand. Rebirth has no
support for paging content out, but retained piggy_page_flushed
to track whether anything had been paged out. Commit 3c20c24
("Disable
piggy_bitmap_page_out_all") removed the last site that could set
piggy_bitmap_page_out_all to a non-zero value. All remaining code
either tests it for non-zero or sets it to zero.
Remove the statements that set it to zero.
Remove assertions that the value is zero.
Remove conditional blocks that execute only when it is non-zero.
2016-05-22 17:49:30 +00:00
Kp
7e3ea961c1
Pass object_base &to draw_player
2016-05-21 17:24:51 +00:00
Kp
c61a3d5e0f
Fix -Wshadow warnings in do_ai_frame
2016-05-21 17:24:51 +00:00
Kp
439da0e74a
Fix -Wshadow warnings in set_vertex_counts
2016-05-21 17:24:51 +00:00
Kp
191da8a243
Fix -Wshadow warnings in med_delete_segment
2016-05-21 17:24:51 +00:00
Kp
96708457fc
Fix -Wshadow warnings in med_save_group
2016-05-21 17:24:51 +00:00
Kp
9fd62715c1
Fix -Wshadow warnings in med_load_group
2016-05-21 17:24:51 +00:00
Kp
4572b313b9
Fix -Wshadow warnings in draw_segment
2016-05-21 17:24:51 +00:00
Kp
1a99ddae17
Fix -Wshadow warnings in check_segment
2016-05-21 17:24:51 +00:00
Kp
0ea22e1b9e
Fix -Wshadow warnings in assign_uvs_to_side
2016-05-21 17:24:51 +00:00
Kp
dbae87a0a1
Fix -Wshadow warnings in load_game_data
2016-05-21 17:24:51 +00:00
Kp
eca671b2f8
Fix -Wshadow warnings in show_netplayerinfo
2016-05-21 17:24:51 +00:00
Kp
f87819b359
Fix -Wshadow warnings in newdemo_strip_frames
2016-05-21 17:24:51 +00:00
Kp
f2f7cb7e96
Fix -Wshadow warnings in newdemo_playback_one_frame
2016-05-21 17:24:51 +00:00
Kp
4a04d26c17
Fix -Wshadow warnings in newdemo_goto_end
2016-05-21 17:24:51 +00:00
Kp
9c4448f78c
Fix -Wshadow warnings in RAIIsocket::closesocket
2016-05-21 17:24:51 +00:00
Kp
6de7046226
Fix -Wshadow warnings in net_udp_setup_game
2016-05-21 17:24:51 +00:00
Kp
6ce7cd4ec5
Fix -Wshadow warnings in draw_player
2016-05-21 17:24:51 +00:00
Kp
ebc9d55b90
Fix -Wshadow warnings in draw_automap
2016-05-21 17:24:51 +00:00
Kp
97f38bf01d
Fix -Wshadow warnings in draw_all_edges
2016-05-21 17:24:51 +00:00
Kp
176d9c0837
Fix -Wshadow warnings in read_m3u
2016-05-21 17:24:51 +00:00
Kp
e600528b83
Fix -Wshadow warnings in centers_dialog_handler
2016-05-21 17:24:51 +00:00
Kp
c7940d12f9
Fix -Wshadow warnings in load_exit_models
2016-05-21 17:24:51 +00:00
Kp
f48247d5c7
Fix -Wshadow warnings in render_compare_context_t
2016-05-21 17:24:51 +00:00
Kp
560401e1ff
Fix -Wshadow warnings in check_face
2016-05-21 17:24:51 +00:00
Kp
213c5952d2
Fix -Wshadow warnings in mark_player_path_to_segment
2016-05-21 17:24:51 +00:00
Kp
989cbb9337
Fix -Wshadow warnings in save_hoard_data
2016-05-21 17:24:51 +00:00
Kp
79c9d19429
Fix -Wshadow warnings in init_hoard_data
2016-05-21 17:24:51 +00:00
Kp
9ab024edc4
Fix -Wshadow warnings in multi_restore_game
2016-05-21 17:24:51 +00:00
Kp
7898353a6c
Fix -Wshadow warnings in multi_disconnect_player
2016-05-21 17:24:51 +00:00
Kp
2dce0cd92d
Fix -Wshadow warnings in newmenu_create_structure
2016-05-21 17:24:51 +00:00
Kp
f3a4a6fef8
Fix -Wshadow warnings in newmenu_mouse
2016-05-21 17:24:50 +00:00
Kp
67cb366c25
Fix -Wshadow warnings in nm_string
2016-05-21 17:24:50 +00:00
Kp
4112f277ff
Remove useless setup of w
in nm_string
2016-05-21 17:24:50 +00:00
Kp
18a917a1d0
Fix -Wshadow warnings in read_model_file
2016-05-21 17:24:50 +00:00
Kp
7f721f98e2
Fix -Wshadow warnings in read_model_guns
2016-05-21 17:24:50 +00:00
Kp
a98e97505e
Fix -Wshadow warnings in do_door_close
2016-05-21 17:24:50 +00:00
Kp
5fb6619fe9
Fix -Wshadow warnings in state_save_all
2016-05-21 17:24:50 +00:00
Kp
36af30b2f6
Fix -Wshadow warnings in state_restore_all_sub
2016-05-21 17:24:50 +00:00
Kp
9b232b71a8
Fix -Wshadow warnings in state_save_all_sub
2016-05-21 17:24:50 +00:00
BuildTools
1de5f510ef
Only break on spaes and tabs
2016-05-12 08:15:26 -05:00
BuildTools
8fb9a05f7d
Break arguments on any whitespace. Also allow commandline arguments to
...
override ini arguments. Fixes #180 .
2016-05-10 10:54:57 -05:00
zico
81d7db279b
Gave input field of Netgame.game_name in net_udp_setup_game() a limit of NETGAME_NAME_LEN as Netgame.game_name.size() would return one byte more for terminator and thus allowing a 16 character game description and nulling mission_title in the process.
2016-05-10 16:16:38 +02:00
zico
1e60e7f31a
Disabled AI behavior switch to toggle AIM_CHASE_OBJECT if in AIB_STILL during a hit, fixing unwanted boss movements and hopefully not breaking anything else
2016-05-10 14:04:30 +02:00
zico
7692d19e2b
Raised default Packets Per Second to 30 and added define for the default in multi.h
2016-05-10 13:45:08 +02:00
zico
3366658a5b
Updated 'Netgame Rules & Info' screen, added option to toggle it ingame via SHIFT-PAUSE, added hint to netgame help menu
2016-05-10 13:41:13 +02:00
Kp
30230a8137
Pass object &to blast_nearby_glass
2016-04-23 17:59:47 +00:00
Kp
a18a483114
Pass object &to bng_process_segment
2016-04-23 17:59:47 +00:00
Kp
d98505354d
Pass object_base &to do_physics_sim_rot
2016-04-23 17:59:47 +00:00
Kp
bde6281e14
Pass object_base &to set_object_turnroll
2016-04-23 17:59:47 +00:00
Kp
99b7c3cf8b
Pass object_base &to do_physics_align_object
2016-04-23 17:59:47 +00:00
Kp
d31f05d89c
Pass object_base &to spin_object
2016-04-23 17:59:47 +00:00
Kp
d3653c92d8
Pass object_base &to start_player_death_sequence
2016-04-23 17:59:47 +00:00
Kp
2188542f2e
Pass object &to set_robot_location_info
2016-04-23 17:59:47 +00:00
Kp
e4d1956674
Pass object_base &to obj_detach_one
2016-04-23 17:59:47 +00:00
Kp
5e734d8f38
Pass object_base &to obj_detach_all
2016-04-23 17:59:47 +00:00
Kp
cfb08ac2cd
Pass object_base &to nd_read_shortpos
2016-04-23 17:59:47 +00:00
Kp
ae7e808a24
Factor out apply_force_damage calls to apply_damage_to_robot
2016-04-23 17:59:47 +00:00
Kp
5f51e4d683
Fix ordering of collide_player_and_controlcen arguments
2016-04-23 17:59:47 +00:00
Kp
8575f3df21
Pass object_base &to my_extract_shortpos
2016-04-23 17:59:47 +00:00
Kp
377effa46d
Pass object_base &to object_allowed_in_anarchy
2016-04-23 17:59:47 +00:00
Kp
56f1729742
Pass object_base &to multi_reset_object_texture
2016-04-23 17:59:47 +00:00
Kp
bfc6efd187
Pass object_base &to compute_headlight_light_on_object
2016-04-23 17:59:47 +00:00
Kp
2401bd60ce
Pass object_base &to homing_missile_turn_towards_velocity
2016-04-23 17:59:47 +00:00
Kp
b46ddf26e7
Pass object &to powerup_grab_cheat
2016-04-23 17:59:47 +00:00
Kp
3677e7036e
Pass object &to collide_player_and_powerup
2016-04-23 17:59:47 +00:00
Kp
752bbedc74
Pass object_base &to explode_model
2016-04-23 17:59:47 +00:00
Kp
841b493387
Pass object_base &to weapon_nearby
2016-04-23 17:59:47 +00:00
Kp
88493aace3
Pass object_base &to object_create_debris
2016-04-23 17:59:47 +00:00
Kp
e51db1c312
Pass object_base &to find_exit_side
2016-04-23 17:59:47 +00:00
Kp
b3d40ff5c4
Pass object_base &to drop_missile_1_or_4
2016-04-23 17:59:47 +00:00
Kp
4153c65f57
Pass object_base &to maybe_drop_primary_weapon_egg
2016-04-23 17:59:47 +00:00
Kp
16583d45db
Pass object_base &to call_object_create_egg
2016-04-23 17:59:47 +00:00
Kp
5682d9f7d7
Simplify boss weapon matter test
2016-04-23 17:59:47 +00:00
Kp
a6ad28c255
Pass object_base &to do_boss_weapon_collision
2016-04-23 17:59:47 +00:00
Kp
ebc0547837
Pass object_base &to boss_spew_robot
2016-04-23 17:59:47 +00:00
Kp
e2fce58d6d
Pass object_base &to collide_robot_and_controlcen
2016-04-23 17:59:47 +00:00
Kp
2fb0e77028
Simplify collide_robot_and_controlcen
...
Caller collide_two_objects swaps the inputs to ensure A.type <= B.type.
OBJ_ROBOT = 2, OBJ_CNTRLCEN = 9, so A will always be the robot and B
will always be the controlcen. Rename the parameters accordingly. Add
assert statements to check this.
2016-04-23 17:59:47 +00:00
Kp
34d2c5b8e2
Pass object_base &to collide_weapon_and_clutter
2016-04-23 17:59:47 +00:00
Kp
a1dac4c254
Pass object_base &to collide_player_and_marker
2016-04-23 17:59:47 +00:00
Kp
5907fec742
Pass object_base &to maybe_delete_object
2016-04-23 17:59:47 +00:00
Kp
a152ef009b
Pass object_base &to maybe_kill_weapon
2016-04-23 17:59:47 +00:00
Kp
7ea89fda9f
Pass object_base &to bump_one_object
2016-04-23 17:59:47 +00:00
Kp
835a9f33d9
Pass object &to collide_robot_and_wall
2016-04-23 17:59:47 +00:00
Kp
389ad4cb1b
Pass object &to calc_controlcen_gun_point
2016-04-23 17:59:47 +00:00
Kp
79edcd0c17
Pass object &to player_path_set_orient_and_vel
2016-04-23 17:59:47 +00:00
Kp
fa1e0d309c
Pass object_base &to add_awareness_event
2016-04-23 17:59:47 +00:00
Kp
49f2768a00
Pass object &to do_firing_stuff
2016-04-23 17:59:47 +00:00
Kp
2a19da88d4
Pass object_base &to move_towards_vector
2016-04-23 17:59:47 +00:00
Kp
a3c5f497f8
Pass object_base &to lead_player
2016-04-23 17:59:47 +00:00
Kp
e6887bb46b
Pass object &to ai_frame_animation
2016-04-23 17:59:47 +00:00
Kp
531725c23f
Factor out ai_frame_animation update
2016-04-23 17:59:47 +00:00
Kp
37a47a4f95
Pass object &to do_silly_animation
2016-04-23 17:59:47 +00:00
Kp
bf69d7c715
Factor out animation angle update
2016-04-23 17:59:47 +00:00
Kp
730d61a738
Pass object &to init_ai_object
2016-04-23 17:59:47 +00:00
Kp
11cf93a299
Factor out net_udp_listen read loop
2016-04-23 17:59:47 +00:00
Kp
271146e84f
Factor out net_udp_flush loop
2016-04-23 17:59:46 +00:00
Kp
fc3e488d81
Remove unnecessary write in RAIIsocket::reset
2016-04-23 17:59:46 +00:00
Kp
6d8a0bd249
Refactor ObjectMove* editor functions
...
Use a template to combine common code.
2016-04-17 00:58:45 +00:00
Kp
bc2c77ba67
Lift weapon1 check in ai_do_actual_firing_stuff
2016-04-17 00:58:44 +00:00
Kp
aad313c85d
Pass object_base &to calc_gun_point
2016-04-09 21:40:27 +00:00
Kp
cc4c07185d
Combine calls to Laser_create_new_easy
2016-04-09 21:40:27 +00:00
Kp
bce267f82f
Pass object_base &to ai_turn_randomly
2016-04-09 21:40:27 +00:00
Kp
c5f933b462
Pass object_base &to ai_turn_towards_vector
2016-04-09 21:40:27 +00:00
Kp
d3b8779cc7
Use PMF helper for lead_player
2016-04-09 21:40:27 +00:00
Kp
95edd77019
Use array<> for ai.cpp globals
2016-04-09 21:40:27 +00:00
Kp
1b65f334cc
Compact multi_do_robot_fire
2016-04-09 21:40:27 +00:00
Kp
5235f813cd
Fold ai_multi_send_robot_position calls
2016-04-06 03:34:15 +00:00
Kp
4126c6c910
Pass object &to multi_send_robot_position
2016-04-06 03:34:15 +00:00
Kp
0e085e4799
Pass thief ID to recreate_thief
2016-04-06 03:34:15 +00:00
Kp
6e0e286dc8
Pass object &to start_robot_death_sequence
2016-04-06 03:34:15 +00:00
Kp
86b7151140
Shorten ai_multi_send_robot_position
2016-04-06 03:34:14 +00:00
Kp
3828b8ec96
Simplify bump_two_objects conditional
2016-04-06 03:34:14 +00:00
Kp
0c299248d4
Pass object &to apply_damage_to_player
2016-04-06 03:34:14 +00:00
Kp
72aa4bc8fb
Pass object &to phys_apply_rot
2016-04-06 03:34:14 +00:00
Kp
bad1464dcf
Pass object_base &to physics_turn_towards_vector
2016-04-06 03:34:14 +00:00
Kp
6a1e1670cc
Pass object_base &to phys_apply_force
2016-04-06 03:34:14 +00:00
Kp
8084bc4244
Factor out key pickup
2016-04-06 03:34:14 +00:00
Kp
bb878e46ba
Factor out single-player pick_up_energy fallback
2016-04-06 03:34:14 +00:00
Kp
89eb173013
Move draw_object_blob to namespace dcx
2016-04-06 03:34:14 +00:00
Kp
c2905bda23
Move check_warn_object_type to namespace dcx
2016-04-06 03:34:13 +00:00
Kp
b5afcc4605
Combine draw_object_blob calls to g3_draw_bitmap
2016-04-06 03:34:13 +00:00
Kp
5b3a36e6b8
Remove valptridx operator-(P *, A &)
2016-04-06 03:34:13 +00:00
Kp
5dae1e9080
Use range_for for kill_stuck_objects
2016-04-05 01:10:18 +00:00
Kp
6b5bf5a549
Always check for valid cside for wall1
...
Previously, if the wall0 test failed, the short-circuit effect of
boolean AND allowed the code to skip initializing wall1, even when cside
and its wall_num should have caused wall1 to be non-NULL. Swap the
order of the tests so that the short-circuit only skips statements that
have no side effects.
Fixes: 0635dbf108
("Pass trigger &")
2016-04-05 01:10:18 +00:00
Kp
f091ffad39
Factor out ogl_draw_vertex_reticle conditional calls
2016-04-05 01:10:18 +00:00
Kp
34e608e14c
Cache kconfig fspacx/fspacy values
2016-04-02 21:26:00 +00:00
Kp
f319882e40
Factor out kc_drawinput BM_XRGB usage
2016-04-02 21:26:00 +00:00
Kp
1787a4c2c5
Fix color saturation in kconfig boxes
...
BM_XRGB doubles its inputs. 35a4736
doubled the inputs explicitly, but
passed them back to BM_XRGB, which doubled them again. Switch to a
direct call to gr_find_closest_color to skip the second double pass.
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/192 >
Fixes: 35a4736df0
("Pass color to gr_urect")
2016-04-02 21:25:59 +00:00
zico
ab89dcd366
Reworked 586ba9ff6db85b976f074589c5dd7e2d6ff40cd1: Show player ping along with player kills/scores and made it a toggle for HUD configuration so the player can enable it permanently
2016-03-30 20:09:46 +02:00
zico
649475e3bc
Removed subtraction of lifeleft for external_explosion in do_endlevel_sequence as it is already happening in object_mode_one() making the explosion animation play too fast
2016-03-30 14:31:13 +02:00
zico
586ba9ff6d
Added ability to show ping on HUD player list (to cycle via F7)
2016-03-30 13:54:21 +02:00
Kp
dd3cedff3d
Add get_ghost_id for multi_do_reappear
...
Ghosts use the same ID space as players, so reuse function get_player_id
to fetch the ID after checking.
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/182 >
Fixes: 9f26e2211e
("Warn on invalid object ID access")
2016-03-20 20:38:54 +00:00
Kp
c1503d0e0f
Widen scope of player_info preservation
2016-03-19 19:08:11 +00:00
Kp
dc70dd61a5
Move gameseq_init_network_players call into LoadLevel
...
gameseq_init_network_players updates the Players array after loading a
level. This should always be done, since players may change their
object number across levels. Move the call into LoadLevel since some
callers failed to do it.
2016-03-19 19:08:10 +00:00
Kp
daaad3b049
Factor out 3d interpreter functions
2016-03-19 19:08:10 +00:00
Kp
34417e9b7a
Simplify track_goal setup
...
Fixes: 7cce4e292d
("Fixed up non-NEWHOMER code for testing purposes")
2016-03-19 19:08:10 +00:00
Kp
27cef20eb3
Move namespace dsx handling to dsx-ns.h
2016-03-19 19:08:10 +00:00
Kp
b8f39b024a
Move DoMenu into dsx
2016-03-19 19:08:10 +00:00
Kp
fcf59268c9
Use range_for for state.cpp
2016-03-19 19:08:09 +00:00
Kp
20e72128de
Add configure test and fallback code to support ancient Windows
...
Windows 2000 has no support for getaddrinfo. Five years ago (Apr 5
2011), the addition of tracker support
(7f18afd5d7
) brought a requirement for
getaddrinfo. Recently, someone with a working Windows 2000 system
reported that Rebirth no longer starts on Windows 2000. Although such
systems should not be connected to the Internet, they may still need
name resolution on a LAN. Add a configure test to probe for getaddrinfo
support and fall back to gethostbyname if needed.
Compiling a binary that works on Windows 2000 requires one of:
* using an ancient SDK that does not declare getaddrinfo
* defining _WIN32_WINNT to exclude Windows XP support
* overriding the SConf test to force failure
Fixes: 7f18afd5d7
("Client-side implementation for Tracker support by Matt 1360 Vandermeulen including improvements in udp_dns_filladdr and IPv4/IPv6 compability; Very little adjustments by me, too including IPv6 support for Windows (untested); Actual tracker code will follow later as seperate branch when it's done")
2016-03-18 02:05:16 +00:00
Kp
8a09513934
Cache get_local_player in init_player_stats_level
2016-03-18 02:05:16 +00:00
Kp
be17cc929d
Combine count_number_of_{robots,hostages} into template
2016-03-17 03:34:24 +00:00
Kp
0f35160d55
Shorten gameseq_init_network_players
2016-03-17 03:34:23 +00:00
Kp
aaaabfeb31
Fix count of hostages lost
...
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/186 >
Fixes: c0ca1248fd
("Simplify hostage lost message")
2016-03-09 02:18:52 +00:00
Kp
4b4077bab9
Fix template/helper confusion
...
Sync non-template types to make helper a better match. Rename helper to
clarify code flow for readers.
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/183 >
Fixes: ff67afd440
("Propagate partial_range up into PHYSFSX_findFiles family")
2016-03-06 18:11:20 +00:00
Chris Taylor
e7c437f7fb
Address Clang name lookup issues: lookup descent_version_type enumerations against 'Mission' type instead of from Mission/Mission_path instances
2016-03-06 13:01:41 +08:00
Kp
06ed8865b7
Use ={} for init_all_vertices Vertex_active
2016-03-05 17:26:24 +00:00
zico
57c33695e6
Do not read pdata packets while the level isn't loaded and try not to send packets to players in these states.
2016-03-05 12:05:43 +01:00
Kp
4a5b2c0999
Remove morphing model stub glow_num support
...
Simplify the code by removing the dead path.
2016-03-04 04:12:35 +00:00
Kp
195c589e3f
Move file-local classes into anonymous namespace
2016-03-04 04:12:35 +00:00
Kp
0ff78c5475
Fix incorrect index in MultiLevelInv_Count Stolen_items loop
...
Fixes: cf512cd368
("In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function.")
2016-03-04 04:12:35 +00:00
zico
49a336b263
Reintroduced the lost HOMING_TURN_TIME division for homing missile acceleration
2016-03-03 19:39:29 +01:00
Kp
217357711f
Move some argument processing to dcx
2016-03-02 02:52:44 +00:00
zico
7cce4e292d
Fixed up non-NEWHOMER code for testing purposes
2016-02-29 16:42:49 +01:00
zico
8d69b1924b
Added a failsafe to randomized player selection in maybe_drop_net_powerup() that will prevent the loop to hang and go with Player_num instead
2016-02-29 16:31:20 +01:00
zico
cf512cd368
In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function.
2016-02-29 16:13:48 +01:00
zico
d5c11c42e4
In multi_prep_level_player() declared i as loop-local
2016-02-29 16:04:44 +01:00
zico
e47a1f3d91
Turned drop_playerobj in chrose_drop_segment() into reference
2016-02-29 15:58:36 +01:00
Kp
95ab6076a4
Move FakingInvul to player_info
...
Every player can fake invulnerability independently. In preparation for
host tracking, store FakingInvul as a player property, not a static
global.
2016-02-27 19:02:21 +00:00
Kp
788ed1bd70
Compact laser firing code
2016-02-27 19:02:21 +00:00
zico
901a554e96
New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max.
2016-02-25 14:11:08 +01:00
Kp
ea8ca1d1e2
Pass update_flicker timer as argument
...
Clang fails to compile update_flicker<0x80000000>(...); gcc handles it
properly. A template is not necessary here, so switch to passing the
value as an argument. Both compilers accept this.
Reported-by: kreatordxx <private mail>
Fixes: 5b9ccda8e8
("Simplify update_flicker")
2016-02-25 02:36:40 +00:00
zico
2e6aa0f081
Took out obj_unlink() call in net_udp_read_object_packet(). As of 7064fcccba
obj->segnum is undefined and obj_unlink() would be called for undefined objects, causing some new objects to not appear for rejoining players. Since init_objects() is called beforehand and host should not be able to send the same object twice, this whole call should be unnecessary to begin with.
2016-02-23 14:25:17 +01:00
Kp
c26a688af5
Unify tmap storage branches
2016-02-20 17:28:11 +00:00
Kp
d5a12ba5af
Cache afterburner bar temporaries
2016-02-20 17:28:11 +00:00
Kp
0bf60e5661
Hide bogus demo cloak/invul timers
...
Demo files do not record cloak/invulnerability times, so the playback
code sets a fake time of "50% elapsed" for the entire time that the
effect is active. This causes two problems in playback. The first,
which always applied, but was mostly ignored, is that the viewer does
not get the blinking warning that the effect will expire soon. The
second, which became visible with the addition of cloak/invulnerability
digital timers, is that demos always report "15" as the time remaining,
for the entire time that the effect is active. Old demos cannot be
fixed, so hide the problem by forcing the timers to be hidden when
viewing a demo.
2016-02-20 17:28:11 +00:00
Kp
c3003fbb22
Fix vulcan ammo display
...
Do not abuse `f2i` to shift an unsigned quantity. `f2i` is defined to
work on `fix`, which is `int`.
2016-02-20 17:28:11 +00:00
Kp
3c20c24ac0
Disable piggy_bitmap_page_out_all
2016-02-20 17:28:11 +00:00
zico
0215759746
Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master
2016-02-15 13:05:38 +01:00
zico
4ef50976ed
Revised a055aecee5
. Removed secondaries cap for Multiplayer but restared for Singleplayer (for gameplay/balance). Limit could be restored for Multiplayer if levels were otherwise properly repopulated (planned)
2016-02-15 13:05:17 +01:00
Kp
90de22b2a5
Fix invalid access reading demos
...
Fixes: 74dfa29d31
("Convert most Trigger references to valptridx")
2016-02-14 18:40:57 +00:00
Kp
e36abb25cb
Fix invalid access reading demos
...
Casting the address of a short to `sbyte*` invites trouble. In this
case, it allows uninitialized garbage to be used as the high bits of the
wall index.
Fixes: 553b313099
("Use vwallptr")
2016-02-14 18:40:57 +00:00
zico
081e5d5e3c
Removed rounding offset of x starting coordinate in ogl_ulinec which should hopefully unwanted horizontal offsets in Status Bar energy and afterburner gauges (without causing more problems) if Multisampling is applied
2016-02-14 13:59:02 +01:00
zico
a055aecee5
Apply count cap in maybe_drop_secondary_weapon_egg to bombs only
2016-02-14 12:49:45 +01:00
zico
ed25a5c38d
Eliminate frame dependent damage with blast weapons - as seen in DXX-Retro 532f271af26d6341563d3763d5bb2dce33de7582
2016-02-14 12:15:30 +01:00
Kp
6091b65707
Move score to screen edge for CM_FULL_SCREEN
...
The score is moved in from the edge to avoid overlapping the cockpit
graphic, but the move was applied even when no cockpit was shown.
Change it to align the score when running without the cockpit graphic.
Reported-by: roncli <https://github.com/dxx-rebirth/dxx-rebirth/issues/175 >
2016-02-12 04:02:28 +00:00
Kp
6edab5ca0a
Pass cv_font to get_centered_x
2016-02-12 04:02:28 +00:00
Kp
a92ab4079f
Cache font extent while drawing
2016-02-12 04:02:28 +00:00
Kp
85129248c9
Combine gr_internal_string0_template VideoOffset updates
2016-02-12 04:02:28 +00:00
Kp
938032e51d
Unify gauges draw paths
2016-02-12 04:02:28 +00:00
Kp
cc18ad2b68
Fix some -Wshadow warnings
2016-02-12 04:02:28 +00:00
Kp
08de1bbff0
Remove cv_color
...
It is only ever set to 0 or copied from other canvases. Set it to zero
everywhere.
2016-02-12 04:02:28 +00:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
5f073b6546
Avoid reloading cv_color in reticle drawer
2016-02-12 04:02:28 +00:00
Kp
972654c140
Pass color to draw_listed_segments
2016-02-12 04:02:28 +00:00
Kp
9d2659ab26
Pass color to draw_wall_side
2016-02-12 04:02:28 +00:00
Kp
12bd8bce35
Pass color to draw_trigger_side
2016-02-12 04:02:28 +00:00
Kp
cc8bed5b95
Pass color to draw_side_edge
2016-02-12 04:02:28 +00:00
Kp
7694fff456
Pass color to draw_seg_side
2016-02-12 04:02:28 +00:00
Kp
fd834f0924
Pass color to draw_segment
2016-02-12 04:02:28 +00:00
Kp
8066361076
Pass color to draw_player
2016-02-12 04:02:28 +00:00
Kp
68cf7939a2
Pass color to draw_line
2016-02-12 04:02:28 +00:00
Kp
d08bfc3170
Pass color to g3_draw_sphere
2016-02-12 04:02:28 +00:00
Kp
1b4b6673ee
Pass color to g3_draw_poly
2016-02-12 04:02:28 +00:00
Kp
8c24eaa721
Pass color to g3_draw_line
2016-02-12 04:02:28 +00:00
Kp
36bd39babe
Pass color to gr_line
2016-02-12 04:02:28 +00:00
Kp
3c73d44771
Pass color to gr_disk
2016-02-12 04:02:28 +00:00
Kp
ecb71ba22e
Pass color to gr_ucircle
2016-02-12 04:02:28 +00:00
Kp
edd2acc86b
Pass color to gr_box
2016-02-12 04:02:28 +00:00
Kp
de08a67321
Pass color to gr_ubox
2016-02-12 04:02:28 +00:00
Kp
23047b1165
Pass color to gr_rect
2016-02-12 04:02:28 +00:00
Kp
35a4736df0
Pass color to gr_urect
2016-02-12 04:02:28 +00:00
Kp
f235d6b12b
Pass color to gr_pixel
2016-02-12 04:02:28 +00:00
Kp
053901b62b
Pass color to gr_uline
2016-02-12 04:02:28 +00:00
Kp
0dcfa6fba5
Pass color to ogl_urect
2016-02-12 04:02:28 +00:00
Kp
228bbe999a
Unify draw_automap key color lookup
2016-02-12 04:02:28 +00:00
Kp
d2d9d2bf5a
Unify op_flatpoly color setup
2016-02-12 04:02:28 +00:00