Commit graph

1792 commits

Author SHA1 Message Date
Kp 73fdd59225 Require exact type for valptridx factory 2015-07-13 01:09:36 +00:00
Kp 745de17c41 Use T::index_type for highest_valid 2015-07-13 01:09:36 +00:00
Kp 012b65a37c Pass vcobjptridx to check_trigger 2015-07-12 01:04:22 +00:00
Kp 13bcdcf0ca Use valptr for fireball.cpp 2015-07-12 01:04:19 +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 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 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 8b7c5c3e2b Rewrite valptridx
Move decisions out to policy classes.  Provide trivial copy
construction/assignment.  Simplify checking for unsafe conversions.
2015-07-09 03:12:45 +00:00
Kp 658102a868 Improve static_assert test
Previously, SConstruct tested whether static_assert worked with trivial
constant expressions.  Extend the test to more complicated expressions
like the ones used in the program.

Replace the typedef based approach with an inline enum to avoid warnings
about unused local typedefs.

Allow use with compilers that lack working static_assert or that cannot
accept complicated expressions.  Add a non-checking definition that uses
the input parameter.  This prevents warnings when types or constants are
used only for the static_assert.
2015-07-09 03:12:45 +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 fe360b18e3 Implement secluded spawns 2015-07-04 21:01:18 +00:00
Kp c03fe30fc2 Move similar/arch/sdl/timer.cpp -> common/arch/sdl/timer.cpp 2015-07-04 21:01:17 +00:00
Kp d73e5a24c3 Reduce scope of ifdef(D1||D2) 2015-07-04 21:01:17 +00:00
Kp f42a3fe241 Improve Cfg locality 2015-07-04 21:01:17 +00:00
Kp 06b453d617 Enable D1 weapon drops 2015-07-02 02:37:55 +00:00
zico cd27af9e41 Made MULTI_POSITION and MULTI_ROBOT_POSITION use quaternion packets to increase precision of powerup drops, robot movement and their firing; Also decreased priority of the first iteration of MULTI_POSITION from 2 to 1 as the first packet does not need to be protected but just serves as a convinient excuse to flush the multi data buffer 2015-06-28 19:20:46 +02:00
Kp 0c106b67f2 Make convert_raw_joy_axis static 2015-06-23 03:04:47 +00:00
Kp 24b88c28c7 Fix cmd queue append 2015-06-21 22:30:28 +00:00
Kp 29aa820dc0 Only respawn when the player presses fire
Only respawn when the player presses a fire key/button (primary,
secondary, or flare).  Only clear primary, second, flare, and bomb when
respawning.  This allows dead players to use the automap or change their
camera views.

This is a necessary step to flushing only the firing inputs on respawn,
as requested by Mako88 in
<https://github.com/dxx-rebirth/dxx-rebirth/issues/104>.  Currently,
inputs are flushed again by the activation of the game window, so
respawn still flushes all inputs.

	#1  0x00005555555cee19 in game_flush_inputs () at similar/main/game.cpp:374
	#2  game_handler (event=...) at similar/main/game.cpp:1114
	#3  0x0000555555576113 in window_send_event (wind=..., event=...) at common/arch/sdl/window.cpp:208
	#4  0x000055555557627b in WINDOW_SEND_EVENT (file=0x5555556dc126 "common/arch/sdl/window.cpp", e=0x5555556dc141 "EVENT_WINDOW_ACTIVATED", line=179, event=..., w=...) at common/include/window.h:111
	#5  window_set_visible (w=..., visible=visible@entry=1) at common/arch/sdl/window.cpp:179
	#6  0x00005555555e90f5 in window_set_visible (visible=1, wind=<optimized out>) at common/include/window.h:90
	#7  DoPlayerDead () at similar/main/gameseq.cpp:1479
	#8  0x000055555563ed65 in dead_player_frame () at similar/main/object.cpp:1486
	#9  0x00005555555cf4df in GameProcessFrame () at similar/main/game.cpp:1329
	#10 game_handler (event=...) at similar/main/game.cpp:1157
2015-06-20 16:16:43 +00:00
Kp 968cdbecf4 Add non-aborting UserError for user-caused fatal errors 2015-06-16 03:15:40 +00:00
Kp c72a3a9b11 Make Stuck_objects static 2015-06-13 22:42:21 +00:00
Kp 3905f1a668 Enable -Wcast-qual 2015-06-13 22:42:21 +00:00
Kp 1dc0e24f30 Propagate swap_bytes argument for create_shortpos
In every case but one, create_shortpos was called with a constant flag
equal to words_bigendian.  The demo system called it with a constant 0.
Split create_shortpos into create_shortpos_little and
create_shortpos_native.  Use create_shortpos_native for the demo system,
and create_shortpos_little everywhere else.
2015-06-13 22:42:21 +00:00
Kp ce72014e2e Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN 2015-06-13 22:42:21 +00:00
Kp 5573ed6bea Cache font scale X float 2015-06-13 22:42:20 +00:00
Kp 49854c08dd Change FSPACX/FSPACY macros to inline functions 2015-06-13 22:42:20 +00:00
Kp 302e344979 Warn when UI_GADGET_* are immediately freed 2015-06-13 22:42:19 +00:00
Kp 9ecb8d8601 Use fwdvalptridx instead of inline forward declarations 2015-06-13 22:42:16 +00:00
Kp 286753d210 Fix valptridx operator& definition 2015-06-13 22:42:15 +00:00
Kp 9125ae32cd Make objnum unsigned 2015-06-13 22:42:15 +00:00
Kp 00c1429ebf Use enum for Escort_special_goal 2015-06-13 22:42:15 +00:00
Kp 148c0f44c8 Convert segnum_t to uint16_t 2015-06-13 22:42:15 +00:00
Kp fcaacaebde Factor out valptridx test for *_none 2015-06-13 22:42:15 +00:00
Kp 8358dfcd0b Support biased pointers to help memory debuggers 2015-06-13 22:42:15 +00:00
Kp d5b5846657 Fix serial *_type -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 5124c510f8 Fix serial endian_access -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 06c363fb19 Fix UI_GADGET -fno-inline build
Fixes: 95e3ac1e5b ("Use integral_constant for UI kind")
2015-06-11 03:06:58 +00:00
Kp 64ee9e0047 Improve memdebug d_strdup trace 2015-06-11 03:06:58 +00:00
John Ackerman fe71a94d53 Implement Nonlinear Joystick Settings
[Kp: fix whitespace; squash fixes into main]
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/84>
2015-06-11 01:41:26 +00:00
Kp 7c436f1fbb Merge pull #39 into unification/master
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/39>
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88712761>
Acked-by: zico <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88907523>
2015-06-07 16:21:37 +00:00
Kp 0e80080b7b Fix -Wvla error in cmd_execute 2015-06-07 16:20:48 +00:00
Kp b77db2f638 Use RAIIdmem for cmd_queue_t command_line 2015-06-07 16:20:47 +00:00
Kp 3cab20a501 Move cmd local classes into anonymous namespace 2015-06-07 16:20:47 +00:00
Kp 9a451a9168 Pass cvar_registervariable cvar by & 2015-06-07 16:20:47 +00:00
Kp 4c778ed26b Add const to cmd prototype 2015-06-07 16:20:47 +00:00
Kp 23349f06e1 Use std::forward_list for cmd_queue 2015-06-07 16:20:47 +00:00
Kp 6bc96bd72b Remove unaliased entries from map 2015-06-07 16:20:47 +00:00
Kp e33b037b83 Use RAIIdmem for cmd_alias_t value 2015-06-07 16:20:47 +00:00