Commit graph

7343 commits

Author SHA1 Message Date
Kp 4afae87883 Remove -Wcast-align from default compiler options
Per issue from MattWatt, gcc for Raspberry Pi warns about alignment
issues.

Per issue from kreator, clang warns about alignment issues on OS X.
However, it does not warn on x86_64-pc-linux-gnu.

GCC only warns when compiling for a target architecture that requires
alignment, so it does not warn for i686-pc-linux-gnu or
x86_64-pc-linux-gnu.

Using this warning would be nice, but since it only triggers on
architectures not maintained by active developers, it causes more
trouble than it may solve.

Alignment sensitive users will have to get by with software fixups until
an active developer begins targeting alignment sensitive hardware.

Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119>
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/120>
2015-09-19 23:04:36 +00:00
Kp 37aac31d0c Switch i2f/f2i to inline functions 2015-09-19 23:04:36 +00:00
Kp fcab519693 Remove extern for vms_vector_swap
It is only used in the interpreter.
2015-09-19 23:04:36 +00:00
Kp f1021de448 Add SDL_NumJoysticks() to SDL library test
Some builds of SDL lack joystick support.  Rebirth requires joystick
support in SDL, even if the user never connects a joystick.  Add a call
to SDL_NumJoysticks during the SDL test so that systems without SDL
joystick support fail the "usable library SDL" test.
2015-09-19 23:04:36 +00:00
Kp 7673bba50d Factor out special handling of super laser 2015-09-19 23:04:36 +00:00
Kp ae5fc1b74b Remove wrapper Cxx11Compile
All compilation is now at least C++11.
2015-09-19 23:04:36 +00:00
Kp 348c656311 Explicitly require C++11 support 2015-09-19 23:04:36 +00:00
Kp 6c49f5b95d Disable ccache/distcc during SConf 2015-09-19 23:04:36 +00:00
Kp d18835bcf9 Invert sense of {} messages
Prefer to always have 'yes' for good results and 'no' for bad results.
2015-09-19 23:04:35 +00:00
Kp b626ca67e7 Combine game-specific preprocessor blocks
Change:

	#ifdef D1
	x;
	#endif

	...

	#ifdef D1
	y;
	#endif

to:

	#ifdef D1
	x;
	y;
	#endif
	...
2015-09-19 23:04:35 +00:00
Kp 22a7d121f5 Restructure compiler preferred option tests 2015-09-19 23:04:35 +00:00
Kp 61044df4f7 Use string formatting consistently 2015-09-19 23:04:35 +00:00
Kp 155cd3c928 Remove literal snprintf 2015-09-19 23:04:35 +00:00
Kp 451325c89b Improve lazy object setup 2015-09-19 23:04:35 +00:00
Kp 54928db871 Cache os.environ.get 2015-09-19 23:04:35 +00:00
Kp 8f7ed1f5ee Remove unused program_specific_objects 2015-09-19 23:04:35 +00:00
Kp 7821af1303 Move axis values into individual joysticks
SDL2 allows joysticks to come and go.  This conflicts with the unified
virtual joystick.
2015-09-19 23:04:35 +00:00
Kp 21be29e0d4 Optimize out button_last_state
This shrinks struct Joystick and makes joy_hat_handler much shorter.
2015-09-19 23:04:34 +00:00
Kp 69e3762933 Return joystick axis values by reference 2015-09-19 23:04:34 +00:00
Kp 38dc303bf8 Simplify joy_flush 2015-09-19 23:04:34 +00:00
zico 41983dc051 Reworked Advanced Netgame Menu to fit on all possible resolutions and added tracker address to seperate line as newmenu does not really like \n (yet) 2015-09-17 13:55:19 +02:00
Kp 2f927c68f9 Improve support for using exact_type with valptridx 2015-09-15 02:48:04 +00:00
Kp 1cdd4ac2ce Pass object & to [gs]et_*_id 2015-09-15 02:48:04 +00:00
Kp be62f446f1 Use range_for for clear_stuck_objects 2015-09-15 02:48:03 +00:00
Kp ff8aab4694 Move guided missile logic to helper function
Fix original bug that tested wrong field for guided missile signature
check.
2015-09-15 02:48:03 +00:00
Kp 3823f0f414 Fix spelling errors in help text
keymoard -> keyboard
immedaitely -> immediately
2015-09-13 21:02:19 +00:00
Kp 8185991062 Ignore excess joysticks 2015-09-13 21:02:19 +00:00
Kp 4df9a4b0f0 Use declval for serial class_type 2015-09-13 21:02:19 +00:00
Kp cd0b3965a4 Use little endian for control center triggers 2015-09-13 21:02:19 +00:00
Kp 888cfddabd Combine gauges left/right window boxes 2015-09-13 21:02:19 +00:00
Kp b1c112d121 Fix -Og -Wuninitialized warning in gr_internal_string_clipped_template 2015-09-13 21:02:19 +00:00
Kp fc5611dc77 Fix -Og -Wuninitialized warning in gr_internal_string0_template 2015-09-13 21:02:19 +00:00
Kp 83f77fbc48 Use fill_n to store runs of cockpitbuf TRANSPARENCY_COLOR 2015-09-13 21:02:19 +00:00
Kp d954cdf279 Look up configure test docstring at record time 2015-09-13 21:02:19 +00:00
Kp 198b8295c4 Force sconf.log verbose for LINKCOMSTR 2015-09-13 21:02:19 +00:00
Kp c4a8432081 Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
The cast provokes a warning on systems that require alignment, so remove
it.  memcpy takes const void* input, so the cast is unnecessary.

Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119>
2015-09-13 21:02:19 +00:00
Kp f2d9ffe48d Rewrite PCH generation 2015-09-13 20:23:05 +00:00
Kp 204b608fa6 Normalize MACH&&APPLE vs APPLE&&MACH 2015-09-13 20:23:05 +00:00
Kp 0ec66ef673 Use collections.defaultdict for successful_flags 2015-09-13 20:23:05 +00:00
zico e0785251c4 Reset homing_object_dist along with d_homer_tick_step instead of every frame to make sure lock indicator is visible in frames where homers wait for a new chance to turn; Also moved call of calc_d_tick() to calc_frame_time() - shouldn't be nested in calc_d_homer_tick() 2015-09-10 14:11:30 +02:00
zico cbaac96324 Fixed (hacked) homing missiles fired by bots that would not track players if player with lowest objnum is dead 2015-09-10 13:19:34 +02:00
zico 6ba89b5abd If sending robot fire of a non-controlled robot, send fire packet immediately (as the comment suggests); also reformatted robot fire send/do functions to improve readability a bit 2015-09-10 13:05:10 +02:00
Kp fb5ae4e0bc Fix various header freestanding issues 2015-09-09 03:27:52 +00:00
Kp bdbd56c024 Use C++ <cinclude> style 2015-09-09 03:27:52 +00:00
Kp 433fc96505 Avoid redefining LazyObjectConstructor.__strip_extension 2015-09-09 03:27:52 +00:00
zico 4a562bf098 Added multi_send_theif_frame() function to update thief bot more frequently (by PPS) and even if it is not controlled by a player to counter discrepancies caused by client side AI movement of the bot 2015-09-03 15:13:56 +02:00
zico 51049794ce Break screenshot numbering on 9999 instead of 99999 due to formatting of the string (it's still enough) 2015-09-01 19:06:14 +02:00
zico dcd91636d8 Do not duplicate objects for latecoming players as they will get dups from the host 2015-09-01 19:00:33 +02:00
zico 1aeb8505ee Rearranged some calls of start_time() and stop_time() (+ limited usage to single functions) to make sure time_paused does not go out of balance 2015-08-30 14:04:59 +02:00
zico 818017398d Added a little failsafe to screenshot function to make sure the game will not cause an endless loop if savenum ever rolls over 2015-08-30 12:47:47 +02:00