Kp
24497fa085
Use enum class for bmread mode selector
2020-10-07 03:59:14 +00:00
Kp
c482d01be5
Move some fvi types to namespaces
2020-10-01 03:25:27 +00:00
Kp
b136994551
Move valptridx<segment> to dcx
...
segment is now dcx, so move the valptridx wrapper.
2020-10-01 03:25:27 +00:00
Kp
e6126b800f
Reorder endlevel definitions to split by dcx/dsx
2020-10-01 03:25:27 +00:00
Kp
e068c685f4
Make scores_menu inherit from window
2020-09-21 03:18:12 +00:00
Kp
08701ca190
Store kmatrix_result in a uint8_t size enum
2020-09-21 03:18:12 +00:00
Kp
3ee3ac7b7a
Delete multi_do_death
...
It is not needed. Deathmatch players never lose their keys, so there is
no need to reapply them.
2020-09-11 03:08:02 +00:00
Kp
6a9444e5d6
Move some multiplayer functions into namespaces
2020-09-11 03:08:02 +00:00
Kp
61f186bc18
Use enum class for texture1_value
2020-09-11 03:08:02 +00:00
Kp
39cb42b878
Push partial_range construction to newmenu callers
...
In some cases, callers know the length of the range and can apply better
checks than the called code.
2020-09-11 03:08:02 +00:00
Kp
7de81a7293
Move Afterburner_charge to dsx
2020-09-11 03:08:02 +00:00
Kp
18282d5b66
Move some menu code into namespaces
2020-09-11 03:08:02 +00:00
Kp
0f2c1cdd45
Make game window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
b79eff0e5c
Deduplicate fades[]
...
Two identical copies were defined in different places. Use the global
one for both consumers.
2020-08-28 00:18:45 +00:00
Kp
cdca112f0a
Pass LevelUniqueAutomapState to automap_clear_visited
2020-08-28 00:18:45 +00:00
Kp
ef8c0e7527
Make kmatrix window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
97315725fa
Move get_multi_endlevel_poll2 into dsx
2020-08-28 00:18:45 +00:00
Kp
53f75c3c72
Use enum class for kmatrix network flag
2020-08-28 00:18:45 +00:00
Kp
5b45fd3bae
Add compile-time check that zip() will not exceed static sizes
...
This is necessarily incomplete since it can only check ranges that have
a compile-time static size. However, it catches some simple mistakes,
and imposes no runtime cost, so it is still useful.
2020-08-28 00:18:45 +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
da66b1d9b8
Move d1_tmap_num_unique to piggy.cpp
...
It is only used in one file. Move it there and make it static.
2020-08-24 01:31:28 +00:00
Kp
ab44115aa4
Move N_robot_joints to d_level_shared_robot_joint_state
2020-08-24 01:31:28 +00:00
Kp
c96671f763
Move Pof_names to d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00
Kp
dca3c6cdca
Move savegame POF names to stack
...
They are only used while loading a savegame file. There is no need for
them to be global.
2020-08-24 01:31:28 +00:00
Kp
636978db4b
Move Marker_model_num to d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00
Kp
9c3fc7523c
Make extra_bitmap_num static
...
Modify read_extra_bitmap_d1_pig to take the bitmap-to-write as a
parameter, instead of computing it from extra_bitmap_num.
2020-08-24 01:31:28 +00:00
Kp
faf37e3c14
Always allocate D2-sized sound array
...
This makes other code simpler, and the extra elements will simply be
ignored in D1.
2020-08-24 01:31:28 +00:00
Kp
514c63efad
Expose both MAX_SOUNDS in both games
2020-08-24 01:31:28 +00:00
Kp
dd035a8f2f
Move some piggy code into namespace dsx
2020-08-24 01:31:28 +00:00
Kp
b29f19da51
Use enum class for GameBitmapOffset
...
Values in GameBitmapOffset are only intended for use indexing within the
game's PIG file. Give them a specific type to reflect that.
2020-08-24 01:31:28 +00:00
Kp
8a1bc7f318
Move Exit_models_loaded into d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00
Kp
0eaabdb2fb
Move N_polygon_models into d_level_shared_polygon_model_state
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
2e398c02c7
Convert uses of vmsegptr_t to shared_segment& where possible
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
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
Kp
1c42f69ff2
Use enum class for object_signature_t
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
4ef247e494
Use enum class for collision_result values
2020-08-06 03:47:56 +00:00
Kp
9b90a790f9
Add forward-declaration header for enumerated_array
2020-08-06 03:47:56 +00:00
Kp
111b655b09
Remove GM_GAME_OVER
...
Various sites assign GM_GAME_OVER to Game_mode, but no sites test for
it. Its only value would be to clear out other flags, but that can be
done by clearing Game_mode.
2020-08-06 03:47:56 +00:00
Kp
8d3f47d646
Fix hoard orb handling on player death
...
Descent tracked hoard orbs by borrowing the player's proximity bomb
slot. Commit 829e95b6f8
moved proximity
bomb tracking to its own slot, but failed to update the player
death/deres logic accordingly. This caused multiple inconsistencies
when a player was killed in hoard mode:
- The killed player saw the orb drop as expected.
- The killed player _also_ kept the orb in inventory after respawn,
because the counter was not reset.
- Other players saw no orb drop.
Fix the inappropriate retention by resetting the orb count in
init_player_stats_new_ship. Fix the inappropriate failure to drop by
adding a new unconditional field to the player death/deres message. In
hoard games, use it to pass the orb count. In other games, ignore it.
Fixes: 829e95b6f8
("Separate hoard/proximity tracking")
Reported-by: snytek <https://github.com/dxx-rebirth/dxx-rebirth/issues/526 >
2020-08-01 18:29:01 +00:00
Kp
ec6a78c481
Use enum class for marker index types
2020-07-22 03:11:18 +00:00
Kp
d738f6c21e
Change enum side_type
to enum class side_type
2020-07-16 02:31:04 +00:00
Kp
8d2ee6f14d
Replace enumerate helper function with class template argument deduction
2020-07-16 02:31:04 +00:00
Kp
daf06acfbe
Replace zip helper function with class template argument deduction
2020-07-16 02:31:04 +00:00