Commit graph

2599 commits

Author SHA1 Message Date
Kp c80d12319a Use unqualified begin/end
Most call sites use unqualified begin/end and rely on using declarations
to pick an appropriate implementation.  Fix the sites that explicitly
requested std::begin/std::end.
2015-08-03 03:11:25 +00:00
Kp 49b0868230 Fix ambiguous return when constructor inheritance is missing
gcc-4.7 (and, if constructor inheritance is suppressed, later versions)
reject

	return objnum == object_none ? vcobjptr(static_cast<objnum_t>(object_first)) : objnum;

where objnum is a cobjptridx:

similar/main/digiobj.cpp: In lambda function:
similar/main/digiobj.cpp:564:85: error: operands to ?: have different types 'valptridx<object>::vcptr' and 'valptridx<object>::cptridx'
similar/main/digiobj.cpp:564:85: error: inconsistent types '<type error>' and 'valptridx<object>::vcptr' deduced for lambda return type

Fix it by removing the ternary operator and adding an appropriate
conversion cast.
2015-08-03 03:11:25 +00:00
Kp 555ff20ae9 Move render_state.h up for gcc-4.7 static_assert
In gcc-4.7, <bits/hashtable.h> uses static_assert in a way that the
preprocessor considers to have 3 arguments.  Move render_state.h up to
ensure that <bits/hashtable.h> is included before
"compiler-static_assert.h" converts static_assert into a 2 argument
macro.
2015-08-03 03:11:25 +00:00
Kp 2fb03da475 Inline multi_send_endlevel_start secret for D2 2015-08-03 03:11:25 +00:00
Kp 84bd64a14c Remove default argument for basic_ptridx(magic,array) 2015-07-29 03:05:28 +00:00
Kp 4d8ae44794 Add helper macro DXX_CONSTANT_TRUE 2015-07-29 03:05:28 +00:00
Kp a2816617fe Pass reactor& to read_model_guns 2015-07-25 23:10:48 +00:00
Kp c9dff229f1 Remove dead AI fire leading code 2015-07-25 23:10:47 +00:00
Kp 9a5654e002 Move similar/editor/autosave.cpp -> common/editor/autosave.cpp 2015-07-25 23:10:47 +00:00
Kp c942d28197 Use accessor for grs_bitmap::bm_type 2015-07-25 23:10:47 +00:00
Kp 37a830f400 Switch AI key lookup 2015-07-25 23:10:46 +00:00
Kp b8cc2f4172 Inline multi_i_am_master 2015-07-25 23:10:46 +00:00
Kp 81abf3666b Reorder hoard kill tests 2015-07-25 23:10:46 +00:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp f38e80c053 Use get_local_plrobj to compute reference to object of local player 2015-07-25 23:10:45 +00:00
Kp f00725f740 Use forward-declaration header for player.h 2015-07-25 23:10:45 +00:00
Kp 70c4cc87ab Use forward-declaration header for weapon.h 2015-07-25 23:10:45 +00:00
Kp f899aaeaca Move player callsign to player-callsign.h 2015-07-25 23:10:45 +00:00
Kp 9bfea35e4f Use forward-declaration header for gr.h 2015-07-25 23:10:45 +00:00
Kp 3b2d6f42ab Use range_for for add_stuck_object 2015-07-21 02:57:27 +00:00
Kp 644c80e632 Pass vsegptr to add_stuck_object 2015-07-21 02:57:27 +00:00
Kp 1378ec2176 Remove unused Fuelcen_refill_speed
Fixes: 0df3209fad ("Remove unused energy center capacity tracking")
2015-07-21 02:57:27 +00:00
Kp 1658e05604 Fix SDL-only build for valptridx changes
Fixes: fa8dcc9113 ("Explicitly delete basic_ptridx(pointer_type); require array")
2015-07-21 02:57:27 +00:00
Kp 61d49de324 Reduce multi_do_effect_blowup stack usage 2015-07-18 21:01:57 +00:00
Kp 8887eeb1c2 Shorten multi_do_ranking 2015-07-18 21:01:57 +00:00
Kp d4c2152009 Shorten calc_d_tick 2015-07-18 21:01:57 +00:00
Kp 9be5a4bfb6 Shorten calc_frame_time 2015-07-18 21:01:56 +00:00
Kp 82e1ea5636 Move similar/mem/mem.cpp -> common/mem/mem.cpp 2015-07-18 21:01:56 +00:00
Kp a58e8f87a0 Move similar/misc/hash.cpp -> common/misc/hash.cpp 2015-07-18 21:01:56 +00:00
Kp cfdffa184f Move similar/arch/sdl/event.cpp -> common/arch/sdl/event.cpp 2015-07-18 21:01:56 +00:00
Kp 04d9f82a50 Move similar/arch/sdl/key.cpp -> common/arch/sdl/key.cpp 2015-07-18 21:01:56 +00:00
Kp c7542fe9fc Move similar/arch/sdl/mouse.cpp -> common/arch/sdl/mouse.cpp 2015-07-18 21:01:56 +00:00
Kp d8f28a8767 Move Cfg::Grabinput to CCfg to improve code sharing 2015-07-18 21:01:56 +00:00
Kp 6bd93e466f Guard args.h for LTO -Wodr 2015-07-18 21:01:56 +00:00
Kp 921276232f Use range_for for player menu list 2015-07-18 21:01:55 +00:00
Kp 4c200342dd Use range_for for PHYSFS archive types 2015-07-18 21:01:55 +00:00
Kp cf678a23ac Pass vcsegptridx/vcsegptr to find_point_seg 2015-07-18 21:01:55 +00:00
Kp a5476c5605 Use array<> for segsize_common propagated 2015-07-18 21:01:55 +00:00
Kp 8c2ba970d3 Use vsegptr for eobject.cpp 2015-07-18 21:01:55 +00:00
Kp d3df8b8e83 Fix LTO -Wodr for cheats 2015-07-18 03:49:47 +00:00
Kp bbcdf9f7d2 Fix LTO -Wodr for GameCfg 2015-07-18 03:49:47 +00:00
Kp 1db87a6e61 Return objnum_t from get_next_object 2015-07-14 02:42:11 +00:00
Kp fa8dcc9113 Explicitly delete basic_ptridx(pointer_type); require array
Require the array argument for basic_ptridx, which is supplied
automatically when the factory is used.
2015-07-13 01:09:37 +00:00
Kp fa805558f2 Use std::swap for ExchangeMarkandCurseg 2015-07-13 01:09:37 +00:00
Kp 1adb56f16b Make draw_mine_all static 2015-07-13 01:09:36 +00:00
Kp 73fdd59225 Require exact type for valptridx factory 2015-07-13 01:09:36 +00:00
Kp 012b65a37c Pass vcobjptridx to check_trigger 2015-07-12 01:04:22 +00:00
Kp f4ab295af8 Pass vsegptridx from propagate_textures_common 2015-07-12 01:04:22 +00:00
Kp 827e7a4b99 Pass vsegptridx to ktmap pts_aux 2015-07-12 01:04:22 +00:00
Kp e16f6bd267 Use valptr for wall.cpp 2015-07-12 01:04:21 +00:00
Kp b31f5f8946 Use valptr for switch.cpp 2015-07-12 01:04:21 +00:00
Kp 0d9781d5be Use valptr for state.cpp 2015-07-12 01:04:21 +00:00
Kp 810fb3ea4f Use valptr for render.cpp 2015-07-12 01:04:21 +00:00
Kp 14bbc17bd6 Use valptr for physics.cpp 2015-07-12 01:04:21 +00:00
Kp 201a91fc3e Use valptr for object.cpp 2015-07-12 01:04:21 +00:00
Kp b7ecb17162 Use valptr for newdemo.cpp 2015-07-12 01:04:21 +00:00
Kp 78f7d1e3a6 Use valptr for net_udp.cpp 2015-07-12 01:04:21 +00:00
Kp 09f095a225 Use valptr for multibot.cpp 2015-07-12 01:04:21 +00:00
Kp 2e85ccebad Use valptr for multi.cpp 2015-07-12 01:04:21 +00:00
Kp 8ff34ce35e Use valptr for lighting.cpp 2015-07-12 01:04:20 +00:00
Kp 2b604d6193 Use valptr for laser.cpp 2015-07-12 01:04:20 +00:00
Kp 06a7bdfd87 Use valptr for gauges.cpp 2015-07-12 01:04:20 +00:00
Kp fe42d32a89 Use valptr for gameseq.cpp 2015-07-12 01:04:20 +00:00
Kp 4c53f79a89 Use valptr for gameseg.cpp 2015-07-12 01:04:20 +00:00
Kp adfc3bb5f9 Use valptr for gamesave.cpp 2015-07-12 01:04:20 +00:00
Kp 88c0510eed Use valptr for gamerend.cpp 2015-07-12 01:04:20 +00:00
Kp 33db8ec3c6 Use valptr for gamemine.cpp 2015-07-12 01:04:20 +00:00
Kp 22de35cd1a Use valptr for gamecntl.cpp 2015-07-12 01:04:20 +00:00
Kp b20f33e705 Use valptr for game.cpp 2015-07-12 01:04:19 +00:00
Kp 53b6d25eeb Use valptr for fvi.cpp 2015-07-12 01:04:19 +00:00
Kp 374145633b Use valptr for fuelcen.cpp 2015-07-12 01:04:19 +00:00
Kp 13bcdcf0ca Use valptr for fireball.cpp 2015-07-12 01:04:19 +00:00
Kp bf589a05b7 Use valptr for endlevel.cpp 2015-07-12 01:04:19 +00:00
Kp 16bf682f47 Use valptr for dumpmine.cpp 2015-07-12 01:04:19 +00:00
Kp 8bbcf497b7 Use valptr for collide.cpp 2015-07-12 01:04:19 +00:00
Kp 2aeb6e3afd Use valptr for cntrlcen.cpp 2015-07-12 01:04:19 +00:00
Kp 05fe25b3d4 Use valptr for aipath.cpp 2015-07-12 01:04:19 +00:00
Kp f81bb22cb2 Use valptr for ai.cpp 2015-07-12 01:04:19 +00:00
Kp 2c326df217 Use valptr for kgame.cpp 2015-07-12 01:04:18 +00:00
Kp 04fc19c941 Use valptr for group.cpp 2015-07-12 01:04:18 +00:00
Kp 4f99478814 Use valptr for elight.cpp 2015-07-12 01:04:18 +00:00
Kp f7c89300e4 Use valptr for curves.cpp 2015-07-12 01:04:18 +00:00
Kp fdd2356eac Use segptridx for Cursegp, Markedsegp 2015-07-12 01:04:18 +00:00
Kp aa890e5d29 Pass only valptr_t to fuelcen_delete 2015-07-12 01:04:18 +00:00
Kp 1248f9a474 Pass only vobjptr_t to obj_detach_one 2015-07-12 01:04:18 +00:00
Kp a8fadce19f Pass only vobjptr_t to obj_unlink 2015-07-12 01:04:17 +00:00
Kp e54b550c59 Pass only vobjptr_t to multi_reset_player_object 2015-07-12 01:04:17 +00:00
Kp c10e580453 Optimize check_poke
Callers care only for zero vs. non-zero.  Return (sidemask & (1 <<
side)) to skip the test and reload to constant 1.
2015-07-12 01:04:17 +00:00
Kp 8e5bf66b5f Optimize is_door_free
Skip finding the connecting side if the first side is blocked.
2015-07-12 01:04:17 +00:00
Kp f7c6462631 Pass vcobjptr_t to check_poke 2015-07-12 01:04:17 +00:00
Kp 1b6999ff4d Switch get_seg_masks from vcsegptridx_t to vcsegptr_t
The index component is not needed.
2015-07-12 01:04:17 +00:00
Kp f20892e24f Remove write-only PlayerSegment 2015-07-10 03:22:27 +00:00
Kp 0df3209fad Remove unused energy center capacity tracking 2015-07-10 03:22:26 +00:00
Kp 8eab601e44 Make digi_sync_sounds objp const 2015-07-10 03:22:26 +00:00
Kp 4a742e3fc4 Parenthesize static_assert expression
When static_assert is a macro, it must have two arguments as seen by the
preprocessor.  Add an identity mapping to the native case to enforce
this, and fix up all the sites that break with the new rule.
2015-07-09 03:12:45 +00:00
Kp 82410f4a8c Treat death by reactor as a suicide 2015-07-05 22:06:12 +00:00
Kp 3ce967ac3d Adjust kill goal progress on suicide
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/94>
2015-07-05 22:06:12 +00:00
Kp fe360b18e3 Implement secluded spawns 2015-07-04 21:01:18 +00:00
Kp d43bbd67b1 Simplify newmenu idle 2015-07-04 21:01:17 +00:00
Kp 8f46fb3ae6 Move net_udp_more_options into class 2015-07-04 21:01:17 +00:00