Commit graph

30 commits

Author SHA1 Message Date
Dmitry Grigoryev fbd05a1592 optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
Kp ffb653c0b8 Pass control_info & to various functions
Switch from a direct global reference to passing control_info& as a
parameter.
2020-10-12 03:28:26 +00:00
Kp 038c6aef4d Move d_level_unique_object_state to a separate header
This is required to untangle the cross-inclusion of object.h and
morph.h.
2020-08-10 03:45:14 +00:00
Kp 7ad8d8c28b Rename object::movement_type to movement_source
gcc and clang disagree about how to disambiguate when an identifier is
both a typename and a member.  Avoid the disagreement by renaming the
member.
2020-08-10 03:45:13 +00:00
Kp 5245b1c4a3 Rename object::control_type to control_source
gcc and clang disagree about how to disambiguate when an identifier is
both a typename and a member.  Avoid the disagreement by renaming the
member.

Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/532>
2020-08-10 03:45:13 +00:00
Kp 38cddb0289 Use enum class for object movement_type 2020-08-10 03:45:13 +00:00
Kp 9e2543ecbf Use enum class for object control_type 2020-08-06 03:47:56 +00:00
Kp c93e7f44c3 Move object::last_pos to LevelUniqueObjectState
Only the console player's last position needs to be remembered across
frames.  Copy the console player's position out before processsing
object movement.  For all other objects, retain a temporary for use by
the position recovery code.
2019-12-22 05:34:08 +00:00
Kp 1008ab397e Move Objects to d_level_unique_object_state 2019-03-03 00:31:08 +00:00
Kp e9c9943470 Pass context to update_object_seg 2018-10-08 03:58:48 +00:00
Kp 289e984e10 Reduce scope of function-local constants 2018-07-22 04:46:19 +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 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp ed55763603 Remove unused symbols 2015-12-04 03:36:31 +00:00
Kp 673a711461 Remove vm_angles_2_matrix return value 2015-02-05 03:03:51 +00:00
Kp fbac119095 Propagate use of objptridx_t 2014-12-23 04:20:27 +00:00
Kp df6b4bd783 Add vm_vec_rotate that returns result 2014-11-04 01:31:22 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 3743882fa4 Use vm_matrix_x_matrix 2 arg form where viable 2014-10-01 02:28:42 +00:00
Kp 83ccb15459 Pass vm_matrix_x_matrix arg by & 2014-10-01 02:28:42 +00:00
Kp 5af79382a5 Pass vm_vec_rotate arg by & 2014-10-01 02:28:42 +00:00
Kp d238b4a562 Pass vm_angles_2_matrix arg by & 2014-10-01 02:28:42 +00:00
Kp 0b2636d535 Pass vm_vec_add2 arguments by & 2014-09-28 21:43:00 +00:00
Kp 74925e9b45 Pass vm_vec_scale dest by & 2014-09-28 21:11:05 +00:00
Kp 69968349cb Pass vm_transpose_matrix m by & 2014-09-28 21:11:04 +00:00
Kp f12273746f Pass vm_vec_zero v by & 2014-09-28 21:11:04 +00:00
Kp b95759aecc Propagate use of objptridx 2014-08-23 23:53:56 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp eb575861b8 Move similar/main/slew.c -> similar/main/slew.cpp 2012-11-11 22:12:51 +00:00
Renamed from similar/main/slew.c (Browse further)