Commit graph

48 commits

Author SHA1 Message Date
Kp 6b5bf5a549 Always check for valid cside for wall1
Previously, if the wall0 test failed, the short-circuit effect of
boolean AND allowed the code to skip initializing wall1, even when cside
and its wall_num should have caused wall1 to be non-NULL.  Swap the
order of the tests so that the short-circuit only skips statements that
have no side effects.

Fixes: 0635dbf108 ("Pass trigger &")
2016-04-05 01:10:18 +00:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp b57f08c798 Use partial_const_range 2016-02-12 04:02:28 +00:00
Kp c5f4daa11b Remove write-only trigger field time 2016-02-06 22:12:55 +00:00
Kp 72d2844070 Use enum for trigger flags 2016-02-06 22:12:54 +00:00
Kp 74dfa29d31 Convert most Trigger references to valptridx 2016-02-06 22:12:54 +00:00
Kp 4f0cbcffa9 Use valptridx array type for Triggers 2016-02-06 22:12:53 +00:00
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp 7cc8920736 Pass new_wall_type to do_change_walls
Each caller knows the trigger type, so pass new_wall_type from the
caller instead of recomputing it inside do_change_walls.
2016-01-09 16:38:11 +00:00
Kp c2c95e7b4b Factor out trigger segment loop 2016-01-09 16:38:11 +00:00
Kp 0635dbf108 Pass trigger & 2016-01-09 16:38:11 +00:00
Kp e24f84298f Skip rescan walls for force fields
Record force fields in the on/off path instead of scanning the array
again.
2016-01-09 16:38:11 +00:00
Kp 5ba5910e7a Use symbolic side_none for testing find_connect_side result 2016-01-03 20:21:35 +00:00
Kp 2b51578ba6 Use enum class for Player_dead_state (formerly Player_is_dead) 2015-12-15 04:09:35 +00:00
Kp ed55763603 Remove unused symbols 2015-12-04 03:36:31 +00:00
Kp 82d0c2ed96 Make some implicit uses of ptridx construction explicit 2015-11-19 03:23:34 +00:00
Kp 44c4eb9dc3 Combine exception paths 2015-11-08 18:55:51 +00:00
Kp ea5b7a08c1 Use macro get_local_player_energy for local player's energy 2015-10-30 02:52:55 +00:00
Kp 3ffd207e44 Use macro get_local_player_shields for local player's shields 2015-10-30 02:52:55 +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 bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp 012b65a37c Pass vcobjptridx to check_trigger 2015-07-12 01:04:22 +00:00
Kp b31f5f8946 Use valptr for switch.cpp 2015-07-12 01:04:21 +00:00
Kp fd6ac87c25 Fix trigger_none checks 2015-04-26 20:15:50 +00:00
Kp c338862ad6 Reduce gauges.h includes 2015-04-19 04:18:51 +00:00
Kp c5f6a115ec Add <stdexcept> for files that throw std::runtime_error 2015-03-22 04:16:49 +00:00
Kp 78cdb70959 Use partial_range on Triggers 2014-12-08 04:19:26 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 2c349136cc Avoid slicing into segnum_t local 2014-11-20 03:00:36 +00:00
Kp 8a89eff0bb Pass compute_center_point_on_side vector by & 2014-10-30 03:32:27 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 9dea4b4d88 Pass sound vms_vector arg by & 2014-10-26 21:33:50 +00:00
Kp 9eda412dff Use symbolic constant wall_none 2014-09-21 23:05:14 +00:00
Kp d312248d45 Return int_fast32_t from find_connect_side 2014-09-06 04:06:18 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp ec7eab42d6 Change print_trigger_message to avoid -Wstring-plus-int 2014-07-16 03:22:43 +00:00
Matt Vandermeulen 28f307eb85 Fixes #5 - Byteswap header renamed to byteutil, plus sed magic
[Kp: switch to #pragma for byteutil.h]
2014-07-03 02:03:08 +00:00
Kp b3dc2a1bc0 Move D1X trigger read out of line 2014-06-21 23:56:27 +00:00
Kp 2d26de003a Read trigger structures carefully 2014-06-20 02:59:53 +00:00
Kp be8c9d5d2d Split out trigger_write
Conditional trigger_write is hard to read.
2014-06-20 02:59:53 +00:00
Kp 8cc3e2c9e9 Use array<> for Triggers 2014-06-20 02:59:53 +00:00
Kp fa77105084 Simplify D2X trigger upgrade code 2014-06-20 02:59:53 +00:00
Kp 20164b0639 Use symbolic constants for trigger types 2014-06-08 00:05:33 +00:00
Kp 6f84624f4c Remove write-only D1X trigger field type 2014-06-08 00:05:32 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 3908215e73 Add type checking to nm_messagebox format string 2013-12-15 21:54:17 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp ea1566b247 Move similar/main/switch.c -> similar/main/switch.cpp 2012-11-11 22:12:51 +00:00
Renamed from similar/main/switch.c (Browse further)