Kp
97c8a7a081
Remove macro wrapper around nm_messagebox
...
Construct the nm_messagebox_tie directly, without use of a macro. This
produces simpler compiler error messages when nm_messagebox is called
incorrectly.
2023-01-14 19:05:37 +00:00
Kp
2790c5b14a
Use run_blocking_newmenu for newdemo save-as dialog
2023-01-14 19:05:37 +00:00
Kp
43470c09bd
Use run_blocking_newmenu for newdemo error dialog
2023-01-14 19:05:37 +00:00
Kp
0fd5ea2972
Inline PHYSFSX_fseek(..., SEEK_SET)
...
When using SEEK_SET, the call passed through to PhysFS after truncating
the offset. Call PhysFS directly in this case, bypassing the wrapper.
2022-12-18 23:10:39 +00:00
Kp
4257391a47
Use enum class for polygon_model_index
2022-12-18 18:32:14 +00:00
Kp
7fc6879555
Fix various Win32 build failures due to ambiguous operator[]()
...
gcc reports:
```
ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second
```
Fix the ambiguity by using an unsigned integer constant.
2022-10-23 23:00:24 +00:00
Kp
0ebcc64ac5
Test whether change_filename_extension succeeded before using its output
2022-10-09 23:15:20 +00:00
Kp
a9142bb65a
Use std::span for change_filename_extension arguments
2022-10-09 23:15:20 +00:00
Kp
6de5587a06
Pass std::span to nd_read_string
2022-09-24 17:47:53 +00:00
Kp
ceef174418
Cache strlen call result
2022-09-24 17:47:52 +00:00
Kp
dc674eafe8
Replace various uses of std::enable_if with C++20 requires()
...
Compiler error messages are generally better when reporting a misuse
that fails a requires() versus reporting a misuse that fails a
std::enable_if. In some cases, this also makes the code clearer, and
avoids the need for dummy template parameters as a place to invoke
std::enable_if.
2022-07-30 17:42:59 +00:00
Kp
851edbbd3c
Use enum class for player connected status
2022-07-16 15:26:12 +00:00
Kp
e25b476de7
Use enum for segnum_t
...
Add checked conversions for sites which load from external integers.
2022-07-02 18:10:45 +00:00
Kp
86a32dd0ff
Change enum sidenum_t
to enum class sidenum_t
2022-06-05 17:44:52 +00:00
Kp
68268e9a1f
Use sidenum_t in more places
2022-02-19 14:52:17 +00:00
Kp
8be306efa7
Use enum class for cockpit_mode_t
2022-02-12 18:57:12 +00:00
Kp
636e1b6d5e
Use enumerated_array for unique_side::uvls
2022-01-15 20:39:10 +00:00
Kp
4a6a4c4646
Use enumerated_array for unique_segment::sides
2022-01-15 20:39:10 +00:00
Kp
1c57e1032d
Use enumerated_array for shared_segment::sides
2022-01-15 20:39:10 +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
12a0f8e8e0
Use enum class for wall_state
2021-11-01 03:37:19 +00:00
Kp
76e2f2c6d9
Use enum class for wall_flags
2021-11-01 03:37:19 +00:00
Kp
3d878ce04d
Expand macro Last_level
2021-11-01 03:37:19 +00:00
Kp
e36c4a17ab
Expand macro Last_secret_level
2021-11-01 03:37:19 +00:00
Kp
49dee72766
Preserve type of vm_vec_mag return value
...
Defer converting to `fix` until necessary.
2021-09-19 10:53:48 +00:00
Kp
2b718da343
Use enum class for Game_mode, Newdemo_game_mode
2021-09-12 16:20:52 +00:00
Kp
56c98f5345
Improve error reporting for PHYSFSX_openWriteBuffered
...
Return the PHYSFS error code on failure, so that callers can report why
the open failed.
2021-07-25 23:00:56 +00:00
Kp
1c13d3c8d3
Improve error reporting for PHYSFSX_openReadBuffered
...
Return the PHYSFS error code on failure, so that callers can report why
the open failed.
2021-07-25 23:00:56 +00:00
Kp
e0008cceb3
Use enum class for sound angle parameter
2021-06-28 03:37:51 +00:00
Kp
6cf6c62550
Convert some uses of nm_messagebox_str to run_blocking_newmenu
...
The latter more clearly shows that the code flow will not proceed past
this point while the menu is open. This conversion sets the stage for
later changes to make these menus asynchronous.
2021-06-28 03:37:49 +00:00
Kp
1936b771e1
Construct nm_item_input in place
2021-06-28 03:37:49 +00:00
Kp
b5460a0a48
Construct nm_item_text in place
2021-06-28 03:37:49 +00:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
f1cfbaa982
Use enum class for cockpit_3d_view
2021-01-25 00:45:07 +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
834f009dd7
Use enum class for wallnum_t
2020-12-26 21:17:29 +00:00
Kp
9f8fbb1a77
Remove newdemo_strip_frames
...
The sole user is based on newdemo_do2, which is being retired. This
feature was only available in developer builds.
2020-12-20 20:39:07 +00:00
Kp
c68dddd372
Move various definitions into namespaces
2020-12-19 16:13:26 +00:00
Kp
200952c3d9
Add type-specific tag wrappers for newmenu calls
...
Make the compiler check that title, subtitle, and filename are passed in
the right places.
2020-12-19 16:13:26 +00:00
Kp
d309c141e7
Switch non-format uses of nm_messagebox to nm_messagebox_str
2020-10-22 02:26:16 +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
8e81726ac5
Use enum class for laser_level
...
Remove stored_laser_level, which existed primarily to enforce type
separate. `enum class` can do that without the need for a separate
class type.
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
37bd70369d
Access unique_segment::objects directly
...
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
2020-08-10 03:45:13 +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
637efae03a
Use enum class for gauges window indexing
2020-08-10 03:45:13 +00:00