Kp
ee1003f29f
Move conditionally compiled code into namespace dsx
2016-08-25 04:05:32 +00:00
Kp
e446965511
Remove unnecessary wall number check in kill_stuck_objects
...
Callers are expected to filter out invalid numbers. Even if they do
not, the only use of the number is to match entries in Stuck_objects.
An invalid match could cause a call to vobjptr() with an invalid index,
but that would be diagnosed by the valptridx checking, so no invalid
memory access will occur.
2016-07-21 01:43:22 +00:00
Kp
278c10dec0
Move flush_fcd_cache calls up from kill_stuck_objects
...
Many callers of kill_stuck_objects call it twice, once for each of two
walls. Move the flush_fcd_cache up to occur only once, rather than once
per wall.
2016-07-21 01:43:21 +00:00
Kp
82e6ab130b
Remove kill_stuck_objects() in wall_illusion_off
...
Objects cannot become stuck in illusionary walls, so there is nothing to
kill.
2016-07-21 01:43:21 +00:00
Kp
24f59cc9d0
Add stub flush_fcd_cache for D1
2016-07-21 01:43:21 +00:00
Kp
b1bdf4aa53
Unify D1/D2 remove_obsolete_stuck_objects
...
After fixing the bogus lifeleft assignment, the D2 version is equivalent
to a more thorough version of the D1 version. Delete the D1 version and
use the D2 version for both games.
2016-07-21 01:43:21 +00:00
Kp
7d926f0741
Remove bogus remove_obsolete_stuck_objects lifeleft change
...
This assignment looks bogus. If the signature saved when the object
became stuck is different from the signature of the object currently
using that slot, then remove_obsolete_stuck_objects kills the object
using that slot. Signatures are defined to change when the object slot
is freed and reused. Therefore, this statement kills the new object
that took the slot of the obsolete object. This new object may be
important, such as a spawned robot or a weapon.
2016-07-21 01:43:21 +00:00
Kp
f29630bd4a
Propagate MAX_STUCK_OBJECTS
2016-07-21 01:43:21 +00:00
Kp
a98e97505e
Fix -Wshadow warnings in do_door_close
2016-05-21 17:24:50 +00:00
Kp
30230a8137
Pass object &to blast_nearby_glass
2016-04-23 17:59:47 +00:00
Kp
a18a483114
Pass object &to bng_process_segment
2016-04-23 17:59:47 +00:00
Kp
5dae1e9080
Use range_for for kill_stuck_objects
2016-04-05 01:10:18 +00:00
Kp
cc18ad2b68
Fix some -Wshadow warnings
2016-02-12 04:02:28 +00:00
Kp
553b313099
Use vwallptr
2016-02-12 04:02:28 +00:00
Kp
08248331a9
Unify do_door_close
2016-02-06 22:12:55 +00:00
Kp
0101f98905
Use wallnum_t in more places
2016-02-06 22:12:54 +00:00
Kp
bb5d1bb7e5
Use valptridx array type for Walls
2016-02-06 22:12:54 +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
4770d3a35e
Factor out wall_illusion_* common logic
2016-01-09 16:38:10 +00:00
Kp
5ba5910e7a
Use symbolic side_none for testing find_connect_side result
2016-01-03 20:21:35 +00:00
Kp
d479819931
Use absolute_sibling to reduce global references for ptridx
2015-12-22 04:18:51 +00:00
Kp
db9fb0ed42
Move more symbols into namespace dcx/dsx
2015-12-22 04:18:50 +00:00
Kp
1adf34403e
Compile out unused wclip_write
...
Unused since 547193c591
("Compile out unused bm_write_all") disabled caller bm_write_all.
2015-12-04 03:36:31 +00:00
Kp
708dc0a7e1
Use vobjptr/vcobjptr for more Objects[] access
2015-12-03 03:26:49 +00:00
Kp
b683b4cc68
Scope weapon type
2015-12-03 03:26:49 +00:00
Kp
dad504cfef
Fix some -Wshadow warnings
2015-11-26 02:56:54 +00:00
Kp
6b353cb9ac
Move player powerup_flags to object.ctype.player_info
2015-11-07 21:55:59 +00:00
Kp
070444157e
Use type safe player flags
2015-10-30 02:52:55 +00:00
Kp
2ac6c0e72b
Factor out red/gold/blue key messages
2015-10-24 03:13:11 +00:00
Kp
1c84b7ab9c
Use enum class for wall_hit_process_t
2015-10-24 03:13:11 +00:00
Kp
be62f446f1
Use range_for for clear_stuck_objects
2015-09-15 02:48:03 +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
cf678a23ac
Pass vcsegptridx/vcsegptr to find_point_seg
2015-07-18 21:01:55 +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
e16f6bd267
Use valptr for wall.cpp
2015-07-12 01:04:21 +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
c72a3a9b11
Make Stuck_objects static
2015-06-13 22:42:21 +00:00
Kp
b6a9b2a853
Pass vsegptridx to wall_toggle
2015-05-28 03:08:40 +00:00
Kp
c0eb67a9f1
Use vsegptr in network messages
2015-05-28 03:08:39 +00:00
Kp
adbefd39c4
Minimize unnecessary fields passed to check_effect_blowup
2015-04-19 04:18:52 +00:00
Kp
b0ec49f8e5
Remove unused file+line from get_seg_masks
2015-04-02 02:36:56 +00:00
Kp
aa75a398d9
Move Wall_names to dumpmine.cpp
2015-04-02 02:36:56 +00:00
Kp
90fbebf8fd
Convert most global arrays to array<>
2015-04-02 02:36:52 +00:00
Kp
66a70fd373
Prepare for global arrays to be array<>
2015-04-02 02:36:52 +00:00
Kp
7840885473
Fix clang -Wparentheses-equality warnings
2015-03-22 18:49:21 +00:00
Kp
011689f038
Move test for opening doors back down
...
Locked doors, including the exit door, were permanently impassable in
Descent 1 because the door has state WALL_DOOR_OPENING even after it has
flags WALL_DOOR_OPENED.
Fixes: fd01d4c673
("Reorder wall_is_doorway to favor likely results")
Reported by: zicodxx @ https://github.com/dxx-rebirth/dxx-rebirth/issues/40
2015-02-15 17:24:55 +00:00