Kp
e1aac6949a
Replace __attribute_warn_unused_result with C++17 [[nodiscard]]
...
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:51 +00:00
Kp
2dd497c96b
Switch find_seg_side to use std::optional instead of a magic value
2021-06-28 03:37:50 +00:00
Kp
0c2f95e2cd
Remove write-only member window_rendered_data::rear_view
2021-06-28 03:37:50 +00:00
Dave Milici
ab7924e129
Relocate viewport/transform adjustments inside ogl_stereo_frame() call.
...
Note since ogl_stereo_frame() is only ever called once per ogl_start_frame()..
ogl_end_frame() instance, only the active stereo eye view needs to be handled.
Implies that separate left/right viewport/transform caches are redundant.
2021-03-15 14:01:53 -07:00
Dave Milici
8c8b7419b6
Improved conditionals for stereo vs non-stereo modes.
...
Hot-key handling for cycling thru stereo modes & parallax adjustments.
Simplified stereo adjustments for left/right eye separation & offsets.
Not quite compatible yet with Bob Akka stereo method from Descent 1.5.
Function key assignments different (F5..F8) due to pre-empted hot-keys.
ALT+SHIFT+F5: decrease eye separation (VR_eye_width)
ALT+SHIFT+F6: increase eye separation (VR_eye_width)
SHIFT+F5: decrease image shift (VR_eye_offset)
SHIFT+F6: increase image shift (VR_eye_offset)
ALT|SHIFT+F7: reset eye separation + image shift
ALT|SHIFT+F8: cycle thru half-width + half-height formats
Note for compiling dxx-rebirth snapshot on MacOSX:
export CXXFLAGS=-Wno-uninitialized
scons macos_add_frameworks=False
2021-03-11 12:32:01 -08:00
Dave Milici
bb903a1d80
Support stereo viewport rendering in half-height & half-width formats.
...
Enable stereo mode when launched via -gl_stereo option.
GL_STEREO quad buffering may not be available unless OGL layer
supports stereo pixel format descriptors.
Half-height viewport rendering for above/below format.
Half-width viewport rendering for side/by/side formats.
HUD & cockpit elements disabled when stereo views active.
2021-03-11 12:32:01 -08:00
Dave Milici
4169183342
Initial stereo rendering test in side-by-side format.
...
OGL layer used for rendering surfaces, so using left/right viewports absent stereo quad buffers.
Using legacy Descent +/- eye offset method for left/right stereo perspective rendering passes.
2021-03-11 12:32:01 -08:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
fc63029833
Move more symbols into namespaces
2020-12-26 21:17:29 +00:00
Kp
faa4d2ce34
Use enum class for vertnum_t
2020-12-26 21:17:29 +00:00
Kp
47c33cbd55
Use enum class for WALL_IS_DOORWAY_FLAG
...
This reduces the size of the debug information substantially.
2020-12-19 16:13:26 +00:00
Kp
64d50d624a
Fix SDL-only build break on texture handling
...
Commit 6d3dce4e16
and commit
61f186bc18
tightened type checking for
texture values, and fixed all affected sites in the OpenGL build. The
SDL-only build had additional code paths that were not noticed or fixed.
This commit fixes those paths.
2020-11-30 05:12:00 +00:00
Kp
61f186bc18
Use enum class for texture1_value
2020-09-11 03:08:02 +00:00
Kp
6d3dce4e16
Use enum class for tmap_num2
...
Define separate enum values for rotation data in both the high bits,
where it is usually kept, and the low bits, where it is sometimes used
for math or comparisons.
Define an enum value to represent the composite of the index and the
rotation, since the composite is not suitable for use as an array
subscript. Add helper functions to extract the component pieces.
2020-08-24 01:31:28 +00:00
Kp
de4efc4f46
Qualify more uses of shared_segment members
2020-08-24 01:31:28 +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
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
9e2543ecbf
Use enum class for object control_type
2020-08-06 03:47:56 +00:00
Kp
d738f6c21e
Change enum side_type
to enum class side_type
2020-07-16 02:31:04 +00:00
Kp
34a5d3797d
Use enum class for gr_blend
2020-07-16 02:31:04 +00:00
Kp
a4f2edfaa9
Move LevelSharedVertexState into d_level_shared_segment_state
2020-05-17 23:35:25 +00:00
Kp
3170b11997
Modernize typedefs for std::array types
...
Use `using x = y;` instead of `typedef y x;`.
2020-05-02 21:18:42 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
9cee93abb1
Require support for C++14 std::exchange
2020-05-02 21:18:42 +00:00
Kp
b396445efa
Require support for std::index_sequence, std::make_index_sequence
...
The minimum supported compiler versions now provide a depth-efficient
implementation of std::make_index_sequence, which removes the last
reason to carry a private implementation. In the case of clang, it
appears to have a special compiler intrinsic used to implement its
std::make_index_sequence.
Switch to the compiler-provided version for both gcc and clang.
2020-04-26 17:26:23 +00:00
Kp
c9b1b5b1ec
Use susegment for WALL_IS_DOORWAY
2019-12-27 02:02:23 +00:00
Kp
519edb9e16
Move Control_center_destroyed to d_level_unique_control_center_state
2019-08-15 01:34:22 +00:00
Christian Beckhäuser
38fabd7c49
Fixed two issues with game's transparency effects feature (which I introduced when implementing it): First, Superprox mines dropped by enemies were made undesirably transparent since they have their own ID not considered by is_proximity_bomb_or_smart_mine(). Second, only some force field textures in D2X had transparency effects since the game has two different textures for force fields - eclip num 78 and 93 - but only the former was defined and used in is_alphablend_eclip()
2019-08-08 11:57:52 +02:00
Kp
f0faac66d4
Move Seismic_tremor_magnitude to d_level_unique_seismic_state
2019-08-06 02:59:41 +00:00
Kp
de77d2412b
Move Automap_visited to d_level_unique_automap_state
2019-08-06 02:59:40 +00:00
Kp
fcd2ce1b47
Fix SDL-only build of render.cpp
2019-07-07 22:00:02 +00:00
Kp
1eaaff3016
Move Difficulty_level to GameUniqueState
2019-06-27 03:26:20 +00:00
Kp
eb39a8087e
Use xrange for render loops
2019-05-04 18:27:37 +00:00
Kp
cc248602fd
Track headlights in d_level_unique_light_state
2019-04-13 18:00:07 +00:00
Kp
1008ab397e
Move Objects to d_level_unique_object_state
2019-03-03 00:31:08 +00:00
Kp
1f18db3c39
Move TmapInfo to d_level_unique_tmap_info_state
2018-12-30 00:43:59 +00:00
Kp
4c7555216a
Move Dynamic_light into LevelUniqueLightState
2018-12-30 00:43:58 +00:00
Kp
9be3c8e2e8
Move Walls into d_level_unique_wall_state
2018-12-30 00:43:58 +00:00
Kp
25baa1fbba
Remove visited2
...
It is debug-only, and has never triggered.
2018-12-30 00:43:58 +00:00
Kp
1a5844e218
Move Vertices out of global scope
2018-12-30 00:43:57 +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
045afc2c56
Prefer const shared_segment &
over vcsegptr_t
2018-12-30 00:43:57 +00:00
Kp
d550cfe680
Remove struct side
2018-12-13 02:31:38 +00:00
Kp
706a704c6d
Move unique_side to unique_segment
2018-12-13 02:31:38 +00:00
Kp
3b168b38fd
Make Viewer
const object *
...
Viewing should not change anything.
2018-09-25 03:44:09 +00:00
Kp
f7ad4d9b1a
Pass segments to find_point_seg
2018-09-19 02:13:30 +00:00
Kp
30a83eec41
Eliminate some uses of valptridx::operator->
2018-06-24 05:06:15 +00:00
Kp
0fd7e0e4ce
Pass context arrays to WALL_IS_DOORWAY
2018-06-24 05:06:15 +00:00
Kp
3408e3a0cd
Switch to shared_segment arguments where possible
2018-06-24 05:06:15 +00:00