Commit graph

7542 commits

Author SHA1 Message Date
zico 15757d552f Added STATE_MATCEN_VERSION for reading/writing matcen_info in savestates (equal to GAME_VERSION) instead of using STATE_VERSION 2015-08-27 18:55:14 +02:00
Kp fd5d7b800d Move reactor gun loop into calc_controlcen_gun_point 2015-08-26 03:15:10 +00:00
Kp d3ca71c8d0 Inline get_num_reactor_models 2015-08-26 03:15:10 +00:00
Kp 4434559e8e Write old matcen_info to D1 savegames
Fixes: 92814475a9 ("Use array<> for RobotCenters")
2015-08-26 03:15:10 +00:00
Kp 9ca2bc20c6 Use DXX_CONSTANT_TRUE for valptridx static checks 2015-08-22 20:43:04 +00:00
Kp 9ed4754009 Remove typedef valptridx<T>::array_managed_type managed_type##_array_t 2015-08-22 20:43:04 +00:00
Kp cc0e29d7a2 Blank out non-robot AI on save 2015-08-22 20:43:04 +00:00
Kp 2833e81ab4 Disallow copying vptr factories 2015-08-22 20:43:04 +00:00
Kp 80f70fbc34 Remove SConf test check_compiler_template_parentheses_warning
Test check_compiler_template_parentheses_warning probes for a bug in
gcc-4.6.  Upstream fixed the bug in gcc-4.7.  Using gcc-4.6 is no longer
supported, so remove the test for the bug.
2015-08-22 20:43:04 +00:00
Kp e6fab164ae Remove valptridx internal use of operator-(ptr,array) 2015-08-22 20:43:04 +00:00
Kp 2155c417cb Move array_managed_type into valptridx<T> 2015-08-22 20:43:04 +00:00
Kp f8008ca34f Only define object_array_t::object_array_t if VALGRIND 2015-08-22 20:43:04 +00:00
Kp 37838329a1 Add SConf hook to check result against expected value 2015-08-22 20:43:04 +00:00
Kp 946048c54b Move valptridx subtypes to individual fwd headers 2015-08-22 20:43:04 +00:00
Kp a126f72bef Remove array for basic_ptr(basic_ptr<rpolicy>,array) 2015-08-22 20:43:04 +00:00
Kp 3bf0c93067 Factor out lookup of sconf overrides 2015-08-22 20:43:03 +00:00
Kp b5bf4cf9cc Change - to _ for check_compiler_option names 2015-08-22 20:43:03 +00:00
Kp e976a823df Shorten paging_touch_robot_maker 2015-08-22 20:43:03 +00:00
Kp a606b89fe8 Make robot_flags unsigned 2015-08-22 20:43:03 +00:00
Kp 0f4d38ea6d Shorten paging_touch_robot 2015-08-22 20:43:03 +00:00
Kp 6a50a904a3 Shorten paging_touch_weapon 2015-08-22 20:43:03 +00:00
Kp 9bf8b8212d Shorten paging_touch_model 2015-08-22 20:43:03 +00:00
Kp 6265431fd9 Pass & to paging_touch_vclip 2015-08-22 20:43:03 +00:00
Kp b946011299 Remove non-GNU PIGGY_PAGE_IN
Non-GNU PIGGY_PAGE_IN uses a do {} while(0), but some callers are in a
context where do{}while() is an error.
2015-08-22 20:43:03 +00:00
Kp 423c1c3f10 Use range_for for fuelcen.cpp 2015-08-22 20:43:03 +00:00
Kp b8baddb5a2 Use uint8_t for player_awareness_type_t
Fixes: 9157e5f970 ("Use enum class for player_awareness_type_t")
2015-08-22 20:43:02 +00:00
Kp 64ff1cda89 Only restore non-alpha when alpha was used 2015-08-21 03:12:35 +00:00
Kp fcfd3d7e54 Cast valptridx size_t to unsigned long for Windows
Windows has `typedef unsigned size_t`, so %lu triggers a format warning
for Windows targets.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/116>
2015-08-19 02:42:49 +00:00
zico 30e909226f Fixed Primary weapon info position in HiRes cockpit mode; Removed redundant vulcan ammo display in Fullscreen Alt HUD #1 2015-08-18 19:17:24 +02:00
Kp 66da9c136e Cache do_explosion_sequence Robot_info lookups 2015-08-17 02:44:56 +00:00
Kp 080e052d65 Reorder fvi_sub object tests
Change to individual continue statements to reduce number of negations.
2015-08-17 02:44:56 +00:00
Kp 2eeca09ae1 Improve create_smart_children
Use accurate squared distance instead of quick non-squared distance.
Simplify target choice loop.
2015-08-17 02:44:56 +00:00
Kp 947145a194 Simplify player-got-hit sound check 2015-08-17 02:44:56 +00:00
zico fb6ea072e4 Repositioned (non Release) HUD level time output and FPS counter to fixed positions across all cockpit modes; Slight reformat for FPS counter and added FrameTime display (in ms) if -verbose is given 2015-08-16 15:37:30 +02:00
zico 57b4bd0281 Community wish: If friendly fire is disabled, also protect players from explosion damage caused by friendly players. This also protects against splash damage caused by oneself. 2015-08-16 13:25:07 +02:00
Kp be3ab3bd81 Use range_for in PHYSFSX_checkMatchingExtension 2015-08-14 03:02:04 +00:00
Kp 389cd42f47 Default verbosebuild on for non-tty outputs 2015-08-14 03:02:04 +00:00
Kp 655e7b6f72 Optimize clearing ConsoleObject anim_angles 2015-08-14 03:02:04 +00:00
Kp e5683593ef Expand ZERO_VECTOR inline 2015-08-13 03:15:53 +00:00
Kp 4f871c43fe Add compile-time check for non-overlapping vm_matrix_x_matrix 2015-08-13 03:15:52 +00:00
Kp 5922d3cf9e Update endlevel !SHORT_SEQUENCE code
This rotted long ago, but the fixes are easy.  Clean it up in case
someone wants to activate it.
2015-08-13 03:15:52 +00:00
Kp c4118ee014 Improve caching when duplicating items 2015-08-13 03:15:52 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp bc7c469ab2 Use array<> for more globals 2015-08-12 03:11:46 +00:00
Kp 41ecab004f Skip message for unknown variables when there is nothing to do
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/115>
Fixes: 870ed653b5 ("Warn about unknown scons variables")
2015-08-11 03:05:55 +00:00
Kp fa9f2e626d Move DbgShowMemInfo to CArg
Members of Arg are not visible to common code, so common/mem/mem.cpp
broke during the -Wodr cleanup.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/114>
Fixes: 6bd93e466f ("Guard args.h for LTO -Wodr")
2015-08-11 03:05:55 +00:00
Kp 0a3de25d7a Flatten valptridx ptr/idx further
Use a dummy template parameter to prevent slicing, instead of an extra
class in the inheritance chain.  This improves the generated code
slightly.
2015-08-07 03:13:51 +00:00
Kp 3458454f7e Flatten valptridx hierarchy 2015-08-06 02:57:59 +00:00
Kp b3d1c6efaa Use helper for valptridx array size checks 2015-08-06 02:57:58 +00:00
Kp 001fdfff37 Add workaround for gcc-4.8 ref qualifier quirk
In gcc-4.8, a member method with const lvalue and const rvalue methods
is ambiguous.

	$ cat t.cpp
	class A
	{
	public:
	    void a() const &;
	    void a() const &&;
	};

	A b();
	void c()
	{
	    b().a();	// fails in gcc-4.8, works in later
	}
	$ gcc-4.8 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
	t.cpp: In function 'void c()':
	t.cpp:11:8: error: call of overloaded 'a()' is ambiguous
	  b().a();
		^
	t.cpp:11:8: note: candidates are:
	t.cpp:4:7: note: void A::a() const &
	  void a() const &;
	       ^
	t.cpp:5:7: note: void A::a() const &&
	  void a() const &&;
	       ^
	$ gcc-4.9 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
	$

Fixes: bda7fef3a0 ("Use get_local_player to compute reference to local player")
2015-08-05 02:59:03 +00:00