Commit graph

51 commits

Author SHA1 Message Date
Kp ad8fd0f871 Pass valptridx factories to obj_relink 2018-03-12 03:43:46 +00:00
Kp e2b24b37d5 Pass d_level_object_state to reset_objects 2018-03-12 03:43:46 +00:00
Kp 44bba9d2a2 Pass valptridx object factory to obj_link 2018-03-12 03:43:46 +00:00
Kp daf87ac23a Pass valptridx object factory to obj_link_unchecked 2018-03-12 03:43:46 +00:00
Kp 0db5a2104e Pass valptridx factories to obj_unlink 2018-03-12 03:43:46 +00:00
Kp d09478d88c Pass Objects to obj_attach 2018-03-12 03:43:46 +00:00
Kp 0067e33a8c Pass ObjectState to special_reset_objects 2018-03-12 03:43:46 +00:00
Kp b63633db51 Move num_objects into d_level_object_state 2018-03-12 03:43:46 +00:00
Kp 1c92b448c8 Add d_level_object_state to wrap Objects and related data 2018-03-12 03:43:46 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 47f1e1515a Move valptridx array typedef to appear earlier 2017-08-11 23:43:53 +00:00
Kp 34ee376c84 Add alternate valptridx error reporting mechanisms 2017-08-11 23:43:52 +00:00
Kp 430f7832aa Move valptridx factories into array_managed_type 2017-06-10 03:31:03 +00:00
Kp 599ac9dee0 Always qualify valptridx type/factory
Previously, valptridx used PREFIX for allow-invalid+mutable, c#PREFIX
for allow-invalid+const, v#PREFIX for require-valid+mutable, vc#PREFIX
for require-valid+const.  Convert the types, factories, and all usage
sites to specify a qualifier for all four combinations:

	im#PREFIX -> allow-invalid+mutable
	ic#PREFIX -> allow-invalid+const
	vm#PREFIX -> require-valid+mutable
	vc#PREFIX -> require-valid+const

Changes to common/include/valptridx.h and common/include/fwd-valptridx.h
are manual.  All other changes are generated by:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\(v\?\)\(\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/\1m\2/g'

for the 'm' prefix and:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\([cm]\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/i&/g'

for the 'i' prefix.
2017-06-10 03:31:02 +00:00
Kp 970ce18410 Pass canvas to render_object 2017-03-11 19:56:27 +00:00
Kp bc11b3bf85 Pass const object to draw_object_tmap_rod 2017-03-11 19:56:25 +00:00
Kp 84faf8aa73 Pass canvas to draw_object_blob 2017-03-11 19:56:24 +00:00
Kp cd8f408269 Pass canvas to draw_object_tmap_rod 2017-02-11 21:42:40 +00:00
Chris Taylor 4cc801f42f Remove calls to window_close(Game_wind) when game finished or over
Replace calls to window_close(Game_wind) with returning window_event_result::close to game handler. Applies to when DoEndGame() is called, DoGameOver() is called, aborting in the kmatrix screen (multiplayer game) during AdvanceLevel() and playing one demo frame causes playback to stop in GameProcessFrame(). Closing a window within its handler is problematic - it can result in an unstable state.
2017-01-08 21:08:50 +08:00
Kp 47eae7176d Split valptridx declarations
The declaration of valptridx_specialized_types needed to be found by
Argument Dependent Lookup, but this was inconvenient for some types.
Split the declaration of valptridx_specialized_types out from the
definition of valptridx global subtype.
2016-12-24 18:12:17 +00:00
Kp 012238ba14 Fold segnum.h into fwd-segment.h 2016-12-24 18:12:17 +00:00
Kp fe0c97ebb9 Move Player_eggs_dropped to player_info 2016-12-10 17:51:09 +00:00
Kp 515476f02b Propagate constant third parameter of call_object_create_egg 2016-12-05 00:26:11 +00:00
Kp 0c219e596e Use enum for object movement type 2016-11-20 23:12:00 +00:00
Kp 4497812674 Use enum for object type 2016-11-20 23:12:00 +00:00
Kp e231fb7d3a Restructure object linkage checks
Move the main part of obj_link into obj_link_unchecked.  Implement
obj_link as sanity check assertions followed by a call to
obj_link_unchecked.  Remove caller-side writes that were present solely
to bypass the assertions, since the assertions can now be bypassed by
calling obj_link_unchecked directly.
2016-11-06 17:12:03 +00:00
Kp b75a2e4a68 Pass object &to obj_create_copy 2016-10-29 23:16:18 +00:00
Kp 8fef6a07b4 Pass const object_base to obj_unlink 2016-07-23 04:10:43 +00:00
Kp 99bbd0cf26 Mark global constants as constexpr
s/^const \([^*]*=.*;\)/constexpr \1/
2016-07-23 04:10:42 +00:00
Kp 54258ef2ec Remove unnecessary forward declarations 2016-07-14 01:59:05 +00:00
Kp 16583d45db Pass object_base &to call_object_create_egg 2016-04-23 17:59:47 +00:00
Kp 89eb173013 Move draw_object_blob to namespace dcx 2016-04-06 03:34:14 +00:00
Kp c2905bda23 Move check_warn_object_type to namespace dcx 2016-04-06 03:34:13 +00:00
Kp 27cef20eb3 Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp 9ceedc96a8 Propagate valptridx requirement up 2016-01-09 16:38:14 +00:00
Kp a32d9f01a1 Remove return value truncation in find_object_seg 2016-01-09 16:38:13 +00:00
Kp 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp 410b09a330 Expand macro Player_exploded 2016-01-09 16:38:10 +00:00
Kp 47190be8e9 Fold Player_exploded into Player_dead_state 2016-01-09 16:38:10 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp 2b51578ba6 Use enum class for Player_dead_state (formerly Player_is_dead) 2015-12-15 04:09:35 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp e549f3451e Use inline namespace dsx for object.h 2015-12-05 22:57:25 +00:00
Kp cfc35e819d Use inline namespace dcx for common/maths 2015-12-05 22:57:24 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp db77622f0e Move array_size into valptridx_specialized_types 2015-11-26 02:56:55 +00:00
Kp 82d0c2ed96 Make some implicit uses of ptridx construction explicit 2015-11-19 03:23:34 +00:00
Kp ad8b4230df Move fwdsegment.h -> fwd-segment.h for consistency 2015-10-10 03:44:14 +00:00