Commit graph

61 commits

Author SHA1 Message Date
Kp 1f5e9808e5 Pass std::span to rotate_list 2023-02-04 19:21:25 +00:00
Kp fbe3bbd0fa Use enum sidenum_t in more places 2022-01-09 15:25:42 +00:00
Kp 6cdc181218 Use enum class for segment_relative_vertnum 2022-01-09 15:25:42 +00:00
Kp 932419ff17 Combine Two_sides_to_edge, Edge_between_sides
These track the same data, but were static and defined separately.
Delete Edge_between_sides and redirect uses to Two_sides_to_edge.
2022-01-09 15:25:42 +00:00
Kp 211f4ea274 Use window_rendered_data constructor to initialize time 2021-09-12 16:20:52 +00:00
Kp 2afe2f428f Remove write-only member window_rendered_data::viewer 2021-09-12 16:20:52 +00:00
Kp 40c22d0663 Move render_frame helper inline
Most call sites had the correct lifetime already, and those that did not
can easily gain it with an extra block scope.
2021-08-26 03:13:45 +00:00
Kp 0c2f95e2cd Remove write-only member window_rendered_data::rear_view 2021-06-28 03:37:50 +00:00
Kp faa4d2ce34 Use enum class for vertnum_t 2020-12-26 21:17:29 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp f0faac66d4 Move Seismic_tremor_magnitude to d_level_unique_seismic_state 2019-08-06 02:59:41 +00:00
Kp cc248602fd Track headlights in d_level_unique_light_state 2019-04-13 18:00:07 +00:00
Kp 5873ccb71e Pass vcvertptr as context 2018-12-30 00:43:57 +00:00
Kp f87c503618 Move Viewer_eye to local scope 2018-12-30 00:43:57 +00:00
Kp 3b168b38fd Make Viewer const object *
Viewing should not change anything.
2018-09-25 03:44:09 +00:00
Kp 5d4d3347e6 Remove unused found_poly 2017-11-01 02:01:20 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +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 7410ad343c Pass canvas to render_mine 2017-03-10 01:22:28 +00:00
Kp 8542940b24 Pass canvas to render_frame 2017-03-10 01:22:27 +00:00
Kp 0f00cf51b0 Make segment vertices unsigned 2017-02-19 19:33:37 +00:00
Kp f4fffeea49 Make more render state const when possible
Make Render_zoom const in builds where there are no statements that can
change it.

Use vcseg, not vseg, for some segment accesses.
2017-01-15 00:03:12 +00:00
Kp 012238ba14 Fold segnum.h into fwd-segment.h 2016-12-24 18:12:17 +00:00
Kp e0f6077afa Pass vcsegidx to render_mine 2016-12-05 00:26:10 +00:00
Kp 62b58e9890 Move OGL to dxxsconf.h; rename to DXX_USE_OGL
Rename symbol OGL to DXX_USE_OGL 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 -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +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 ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp c636dc4b98 Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp 3428ea6392 Remove Show_only_curside
Show_only_curside was locked to 0 in EDITOR builds, but only EDITOR
builds could render the current side.
2016-01-03 20:21:35 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp 26e948d5f1 Uninline namespace dsx 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 bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp 2196008178 Move fwdobject.h -> fwd-object.h for consistency 2015-10-10 03:44:14 +00:00
Kp b626ca67e7 Combine game-specific preprocessor blocks
Change:

	#ifdef D1
	x;
	#endif

	...

	#ifdef D1
	y;
	#endif

to:

	#ifdef D1
	x;
	y;
	#endif
	...
2015-09-19 23:04:35 +00:00
Kp 68834fb929 Expand render_mine window_rendered_data helper inline 2015-05-05 03:20:42 +00:00
Kp eedfaab822 Remove OGL Max_linear_depth 2015-04-22 02:44:29 +00:00
Kp 3ad422a4be Include <vector> in render.h
Some systems include <vector> as a side effect from other headers.  OS X
Yosemite is not such a system.

Reported by kreatordxx: https://github.com/dxx-rebirth/dxx-rebirth/issues/29
2015-01-11 18:10:40 +00:00
Kp 9ffd958d3d Create window_rendered_data locally 2014-12-18 04:12:38 +00:00
Kp adbff232c5 Split seg/obj vars of find_seg_side_face 2014-12-13 17:47:01 +00:00
Kp 0b086b1b0d Optimize rendering
- Make Max_linear_depth_objects const
- Skip setup of object rendering if no objects to render
- Defer setting globals until after conditional confirms a segment will
  render
2014-12-13 17:18:07 +00:00
Kp 7c98dea8be Pass render_frame arg by & 2014-12-13 04:11:21 +00:00
Kp b79e432a3e Pass render_mine arg by & 2014-12-13 04:11:16 +00:00
Kp e027c821c9 Pass update_rendered_data arg by & 2014-12-13 04:11:04 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 3412bf4b3a Make rotate_list input const 2014-10-26 03:24:09 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp 01638a7eb0 Move N_render_segs into render_state_t 2014-09-07 23:56:37 +00:00