Commit graph

2630 commits

Author SHA1 Message Date
Kp 51b06f6cdc Move Fusion_charge to player_info
This eliminates some ugly hacks regarding remotely generated fusion
shots.
2016-12-10 17:51:09 +00:00
Kp 117e205ff0 Fold spreadfire calls to Laser_player_fire_spread 2016-12-10 17:51:09 +00:00
Kp 4cec1910e2 Propagate scores_maybe_add_player argument 2016-12-10 17:51:08 +00:00
Kp 1f434f98ad Use valptridx for ActiveDoors 2016-12-10 17:51:08 +00:00
Kp 65b05638cc Switch MAX_REACTORS from #define to constexpr 2016-12-10 17:51:08 +00:00
Kp 62a4f001ea Define valptridx factories of non-const types as mutable
Previously:

	constexpr vTYPEptr{};
	constexpr vcTYPEptr{};

Now:

	__attribute_unused static vTYPEptr{};
	constexpr vcTYPEptr{};	// unchanged from above

This is necessary for future work.  It should have no user observable
effects for now.
2016-12-10 17:51:08 +00:00
Kp 53bf638c2c Cache valptridx success check
Use a compound statement to cache the success condition as a local
boolean, then reference the local in the macro expansions.  This should
hint to the optimizer that this is always the same expression, which
should encourage it not to repeat the test in the generated code.

Actual results vary.  x86_64-pc-linux-gnu-g++-5.4.0 generates code that
is bigger, but uses fewer instructions.
2016-12-10 17:51:07 +00:00
Kp 9a45534ccc Require support for reference qualified methods 2016-12-10 17:51:07 +00:00
Kp 73c70566a0 Derive vptr factory from ptr factory 2016-12-10 17:51:07 +00:00
Kp 6c85086a43 Pass vcsegptridx to multi_send_light_specific 2016-12-10 17:51:07 +00:00
Kp 515476f02b Propagate constant third parameter of call_object_create_egg 2016-12-05 00:26:11 +00:00
Kp 19528a85d0 Fix various check_header_includes=1 failures 2016-12-05 00:26:11 +00:00
Kp 0fb59c225c Move add_points_to_score into namespace dsx 2016-12-05 00:26:10 +00:00
Kp e0f6077afa Pass vcsegidx to render_mine 2016-12-05 00:26:10 +00:00
Kp d7ea84aa36 Pass vcsegidx to multi_send_boss_teleport 2016-12-05 00:26:10 +00:00
Kp 31f330c0ff Pass vcsegidx to multi_send_door_open_specific 2016-12-05 00:26:10 +00:00
Kp fe44705d2d Pass vcsegidx to multi_send_effect_blowup 2016-12-05 00:26:10 +00:00
Kp 6bffe9949e Pass vcsegidx to multi_send_create_powerup 2016-12-05 00:26:09 +00:00
Kp 82b068bf9c Pass vsegidx to multi_send_door_open 2016-12-05 00:26:09 +00:00
Kp b5be5f2099 Pass vcwallptridx to multi_send_hostage_door_status
Avoid recomputing the wall pointer that the caller already had.
2016-12-05 00:26:09 +00:00
Kp 3fc128607c Pass vsegidx_t to disable_flicker 2016-12-05 00:26:09 +00:00
Kp c035f5e93f Pass segidx_t to create_path_points 2016-12-05 00:26:09 +00:00
Kp c60d93326c Propagate constant third parameter of create_n_segment_path_to_door 2016-12-05 00:26:08 +00:00
Kp b696d8cf22 Pass segidx_t to create_n_segment_path 2016-12-05 00:26:08 +00:00
Kp d8a1428f13 Pass segidx_t to init_ai_object 2016-12-05 00:26:08 +00:00
zico ffb68756e3 Changed handling of scrape_player_on_wall(), preventing it to occur multiple times per frame. 2016-12-02 13:37:08 +01:00
Kp f8cc32a4af Merge pull #272 into master 2016-11-26 22:51:49 +00:00
Kp 6153fc6f8d Recharge omega cannon on entering new level 2016-11-26 22:51:49 +00:00
Kp 6226e5fbbf Remove obsolete operator-(wall *, array<wall, N> &) 2016-11-26 22:51:49 +00:00
Kp 329ff67718 Raise D1 MAX_DOORS to match D2 2016-11-26 22:51:49 +00:00
Kp ac5ccf0c08 Pass active_door &to wall_close_door_num 2016-11-26 22:51:48 +00:00
Kp 1acee2d4f4 Remove unused wall_close_door 2016-11-26 22:51:48 +00:00
Kp 64ac7028e6 Pass active_door &to do_door_{open,close} 2016-11-26 22:51:47 +00:00
Kp a129a0d570 Add ID for robot earthshaker secondary missile
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/273>
2016-11-26 22:51:47 +00:00
Chris Taylor bf6eb99d7a When switching to the editor in a game, use a proper saved game
This preserves virtually all game information, including active fire. The saved game 'gamesave.sge' can also be loaded with File->Restore Game State. The level can still be saved as usual (but it warns the user if there's an unsaved game state). This functionality may be useful for testing (or cheating! ;) )
2016-11-21 15:22:11 +08:00
Chris Taylor 2995cb628c Never set Current_level_num to 0
This will be required when proper game state editing is implemented. Also remove hacks that check Current_level_num == 0.
2016-11-21 15:22:11 +08:00
Kp 0c219e596e Use enum for object movement type 2016-11-20 23:12:00 +00:00
Kp 4497812674 Use enum for object type 2016-11-20 23:12:00 +00:00
Kp a70d1ac646 Pass player_info &to omega_charge_frame 2016-11-19 18:09:26 +00:00
Kp 85338cba5e Fix memory corruption starting multiplayer game
Various points in the game code call `hide_menus()`, then later use
`show_menus()` to reverse the effect.  If the forcibly hidden window is
deleted before `show_menus()` is called, the attempt to show it would
write to freed memory.  Add a hook to forget those windows when they are
deleted, so that `show_menus()` does not try to make them visible later.
2016-11-19 18:09:26 +00:00
Kp dc881ec12d Merge pull #266 into master 2016-11-19 18:09:26 +00:00
Kp cb1410dd95 Use valptridx for CloakingWalls 2016-11-19 17:24:54 +00:00
Kp 223a9dfd56 Pass grs_bitmap &to piggy_register_bitmap 2016-11-19 17:24:53 +00:00
Kp 47de4e2906 Pass grs_bitmap &to swap_0_255 2016-11-19 17:24:52 +00:00
Kp 2dd4b574c7 Use virtual function to dispatch window events 2016-11-19 17:24:52 +00:00
Kp 61c11ec4d4 Use d_enumerate for SDL joystick loops 2016-11-19 17:24:52 +00:00
Kp 716b320c34 Use utility d_enumerate for do_cloak_stuff 2016-11-19 17:24:52 +00:00
Kp 53edbee901 Propagate constant texmerge_init argument 2016-11-19 17:24:52 +00:00
Kp 6db96d1a6d Fix file.cpp -Wunused-but-set-variable
Commit 1c8ad24 removed all reads of `wind`, but did not remove its
assignment or declaration.  This breaks the build with gcc due to
-Wunused-but-set-variable.

Fixes: 1c8ad24da3 ("Check for window_event_result::deleted for ui_get_filename polling loop")
2016-11-19 17:24:51 +00:00
Kp 98afafb80f Fix gadget.cpp -Wunused-but-set-variable
Commit 917f079 removed all reads of `wind`, but did not remove its
assignment or declaration.  This breaks the build with gcc due to
-Wunused-but-set-variable.

Fixes: 917f079f02 ("Check for window_event_result::deleted in ui_dialog_do_gadgets")
2016-11-19 17:24:51 +00:00