Kp
1843ed752c
Fix Windows build of kconfig.h
...
fbd05a1592
changed joy.h to include only fwd-event.h, but not event.h.
event.h included maths.h, which kconfig.h was relying on. Add an
inclusion of maths.h into kconfig.h to define `fix`.
Fixes: fbd05a1592
("optimize include files (include what you use)")
2021-04-04 22:01:25 +00:00
Kp
18c39192f6
Reduce use of global structures in cheat functions
2021-04-04 22:01:25 +00:00
Kp
02c99b7645
Consolidate stereo dimension math
...
Remove VR_half_width, VR_half_height. Their values are directly derived
from VR_stereo, and can be computed on demand.
2021-04-04 22:01:25 +00:00
Dave Milici
6bc0e822d2
Handle HUD overlays in separate screen rects for stereo renderings.
2021-03-17 16:30:31 -07:00
Dave Milici
f51e7b86b9
Reorganize & consolidate stereo vars per PR suggestions.
2021-03-15 11:32:10 -07:00
Dave Milici
509da82ee8
Add -gl_stereoview option for selecting stereo viewport modes.
2021-03-12 10:07:45 -08: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
Kp
1ec6fdb0b5
Add back forwarding includes
...
These are not necessary for proper compilation, but are included so that
a mismatch between the forward declaration and the definition will be
diagnosed immediately.
2021-02-20 23:46:51 +00:00
Kp
6a425bb2a7
Drop unnecessary includes
2021-02-20 23:46:51 +00:00
dimag0g
6282dd25b9
Merge fbd05a1592
into 8fdc326c2a
2021-02-16 21:30:26 -08:00
Kp
00f6436959
Zero out newmenu_item::nm_private_imenu
...
Clear the largest union member to avoid issues with uninitialized
members. A future change will refine this to construct members to
specific values.
2021-02-08 01:56:15 +00:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
6e52dc8db2
Shrink newmenu_item::right_offset
...
Its value never exceeds UINT8_MAX.
2021-02-06 17:53:53 +00:00
Kp
a4bc997be3
Pack newmenu_item more tightly
...
Move value down to eliminate one area of padding on 64-bit systems.
2021-02-06 17:53:53 +00:00
Kp
1afd0eeae2
Move NETFLAG_DOPOWERUP to netgame_info and clarify name
2021-01-25 00:45:07 +00:00
Kp
81a2d92ee9
Move ResolutionX, ResolutionY to CCfg
2021-01-25 00:45:07 +00:00
Kp
49944a3fbf
Use enum, not integral_constant, for netflag/netgrant constants
2021-01-25 00:45:07 +00:00
Kp
5d0d9dcc1a
Use primary_weapon_index_t for pick_up_primary
2021-01-25 00:45:07 +00:00
Kp
2196f6add5
Use enumerated_array for Secondary_ammo_max
2021-01-25 00:45:07 +00:00
Kp
6c63e11caa
Use enumerated_array for Secondary_weapon_to_weapon_info
2021-01-25 00:45:07 +00:00
Kp
b20fa0d77d
Use enumerated_array for Primary_weapon_to_weapon_info
2021-01-25 00:45:07 +00:00
Kp
9abf81c77a
Factor out logic for toggling between base/super weapons
2021-01-25 00:45:07 +00:00
Kp
f1cfbaa982
Use enum class for cockpit_3d_view
2021-01-25 00:45:07 +00:00
Kp
77acae6510
Use enum class for weapon_box_user
2021-01-17 22:23:23 +00:00
Kp
b70f569178
Use enum class for OGL_TEXFILT_* constants
2021-01-17 22:23:23 +00:00
Kp
1843d375f2
Use enumerated_array for Secondary_weapon_to_powerup
2021-01-17 22:23:22 +00:00
Kp
e9f590eeb1
Use enumerated_array for Primary_weapon_to_powerup
2021-01-17 22:23:22 +00:00
Kp
baa2823953
Pass player_info to which_bomb
...
Previously, rendering the preferred bomb type could also change it if
the active type was exhausted. This is undesirable, since it depends on
the user to have a HUD mode which causes the bomb type to render.
Switch to only change the active type if the user tries to drop a bomb
while the active type is unavailable. Some call sites already switch
bomb types automatically on depletion. Those sites will still do so.
2021-01-17 22:23:22 +00:00
Kp
e4f8d02380
Make screen_resolution_menu inherit from newmenu
2020-12-27 22:03:09 +00:00
Kp
ed2bc8e213
Use enum class for nm_type
2020-12-27 22:03:09 +00:00
Kp
15f9b3d43f
Enable use of some STL algorithms on zip_iterator
...
std::find_if needs common iterator traits. Add the relevant type
definitions to zip_iterator.
Also add them to d_range, to avoid errors when a range is zipped.
2020-12-27 22:03:09 +00:00
Kp
ae021b12e7
Use named Difficulty_level enum members in MENU_DIFFICULTY_TEXT
2020-12-27 22:03:09 +00:00
Kp
995e25f740
Simplify dxx_gettext when defined(USE_BUILTIN_ENGLISH_TEXT_STRINGS)
2020-12-27 22:03:09 +00:00
Kp
daf53321bf
Remove return value of new_player_config
...
It always succeeds.
2020-12-27 22:03:09 +00:00
Kp
115c38cd77
Remove kmatrix_poll2
...
After the previous commit, its only purpose is to automatically dismiss
the window after 3 seconds. Users may be surprised by this, and the
automatic dismissal has limited value. Remove it and let the user
remain at the cancel dialog until a decision is made.
2020-12-27 22:03:09 +00:00
Kp
e7629f35ee
Move newmenu_item::saved_text into the two sub-types that need it
2020-12-27 22:03:09 +00:00
Kp
e6875641c9
Move Newmenu_allowed_chars into individual newmenu_item
...
Allowed characters are more properly scoped to a specific text entry
field. Move them there to eliminate a global.
2020-12-27 22:03:09 +00:00
Kp
1f8c8e355b
Allow newmenu callers to choose whether to use a background box
...
Previously, callers chose whether to use a fullscreen background image,
and the newmenu code inferred that callers without a background image
wanted a background box, while those with a background image wanted no
box. Change newmenu_layout to take a parameter specifying the caller's
intent, so that a caller can choose to have any combination of a
background image and a background box.
2020-12-27 22:03:09 +00:00
Kp
2b9c146ff2
Convert glitz menu to inherit from newmenu
...
Add a static method to block until the menu closes, so that the glitz
menu can continue to block its caller.
2020-12-27 22:03:09 +00:00
Kp
c0601edde3
Move GammaLevel to CCfg
2020-12-27 22:03:09 +00:00
Kp
effa7435c2
Remove newmenu_listbox1
...
It is no longer used.
2020-12-27 22:03:09 +00:00
Kp
095d660c55
Inline listbox_get_window
...
It is only used once.
2020-12-26 21:17:29 +00:00
Kp
def7e03260
Move listbox callback handling to a derived class
2020-12-26 21:17:29 +00:00
Kp
f43e98764a
Move listbox to newmenu.h
2020-12-26 21:17:29 +00:00
Kp
f01c29c779
Flatten newmenu_do* hierarchy
...
There is now a single caller for newmenu_do3. Inline do3 into do2, so
that do2 calls do4. Mark do4 as static.
2020-12-26 21:17:29 +00:00
Kp
d1ff6becb4
Move listbox_layout to newmenu.h
...
Rename listbox_create_structure to listbox_layout::create_structure.
2020-12-26 21:17:29 +00:00
Kp
b9a27094eb
Pass menu_title through listbox functions
2020-12-26 21:17:29 +00:00
Kp
b63ccc63ca
Make passive_messagebox inherit from newmenu
...
passive_messagebox is only suitable when the user's selection does not
matter, so restrict to be used for cases where only one "choice" is
offered.
2020-12-26 21:17:29 +00:00
Kp
834f009dd7
Use enum class for wallnum_t
2020-12-26 21:17:29 +00:00