Kp
2b718da343
Use enum class for Game_mode, Newdemo_game_mode
2021-09-12 16:20:52 +00:00
Kp
c99b67e359
Switch callers to unchecked_partial_range(range) where possible
...
Use unchecked_partial_range(range) instead of
unchecked_partial_range(iterator), since the range form can preserve the
underlying index_type.
2021-09-04 12:17:14 +00:00
Kp
4c34875c84
Remove unused subfunction_handler
...
Previous commits eliminated all uses of it. Remove the unused stubs.
2021-06-28 03:37:50 +00:00
Kp
53cd92727e
Move marker_delete_are_you_sure_menu select handling to event_handler
2021-06-28 03:37:49 +00:00
Kp
2a504ee03e
Construct nm_item_menu 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
04c1d8cc57
Move marker deletion are-you-sure to a non-blocking window
2020-12-27 22:03:09 +00:00
Kp
2ded2b2d0c
Make kmatrix background optional
...
Previously, if the background failed to load, the kmatrix window was
immediately aborted. Change the logic so that a failure to load uses a
blank black background, but still shows the kmatrix window.
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
fd9e65554f
Switch automap_find_edge to use std::hash
2020-12-26 21:17:29 +00:00
Kp
479884288c
Always delegate to window_create for send_creation_events
2020-12-20 20:39:07 +00:00
Kp
b1b2300c7d
Use enum class for wall_key
2020-12-19 16:13:26 +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
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
dd5f31a19c
Fix SDL-only build of automap.cpp
...
`const auto &&` deduces a type that is always const, which breaks the
SDL-only build. Use cg3s_point explicitly, so that the type is const
for OpenGL and mutable for SDL-only.
Fixes: ec6a78c481
("Use enum class for marker index types")
2020-11-30 05:12:00 +00:00
Kp
d309c141e7
Switch non-format uses of nm_messagebox to nm_messagebox_str
2020-10-22 02:26:16 +00:00
Kp
ceaea3ec22
Move automap initialization to NSDMI where possible
...
Some members are initialized with literal values. Move those to an
NSDMI so that all constructor invocations will set them.
2020-10-22 02:26:16 +00:00
Kp
ae657007fe
Remove send_creation_events parameter
...
It is always nullptr.
2020-10-22 02:26:16 +00:00
Kp
6d50470286
Improve packing of automap structure
...
Shrink fields that only ever hold byte sized values.
2020-10-12 03:28:26 +00:00
Kp
ffb653c0b8
Pass control_info & to various functions
...
Switch from a direct global reference to passing control_info& as a
parameter.
2020-10-12 03:28:26 +00:00
Kp
b3c3066a38
Fix no-joystick build
...
When joystick support is not present, `event_joystick_get_button` is not
declared in joy.h.
Fixes: c24864b180
("make menus controllable with joystick")
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
cc5506544a
Make automap window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
7e72dfd75c
Move some automap logic to dcx
2020-08-28 00:18:45 +00:00
Kp
bc660bcfcd
Pass automap by reference
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
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
021c86d4dd
Remove unnecessary variable in InitMarkerInput
...
This was a leftover from an earlier prototype. gcc-7 warns about it,
but gcc-8 and later silently allow it. Remove it to fix the gcc-7
build, since it is not needed.
Reported-by: Kieltux <https://github.com/dxx-rebirth/dxx-rebirth/issues/531 >
Fixes: ec6a78c481
("Use enum class for marker index types")
2020-08-06 03:47:56 +00:00
Kp
ec6a78c481
Use enum class for marker index types
2020-07-22 03:11:18 +00:00
Kp
0a1f2ad55e
Tighten type for trigger action values
2020-07-05 23:34:32 +00:00
Kp
b08620292d
Fix input handling in automap
...
The automap code keeps a mostly-private secondary copy of control_info.
The change to reset control_info before the event loop reset the main
copy of control_info for the automap, not the copy that the automap
actually used. Fix this by passing the desired control_info to relevant
functions instead of always using the global variable Controls.
Fixes: c621a970c6
("Reset kconfig counters once, before the event loop")
2020-05-28 03:21:22 +00:00
Kp
c621a970c6
Reset kconfig counters once, before the event loop
2020-05-27 03:07:17 +00:00
Kp
16ae2e7b8e
Correct case of map PCX files
2020-05-17 23:35:26 +00:00
Kp
a4f2edfaa9
Move LevelSharedVertexState into d_level_shared_segment_state
2020-05-17 23:35:25 +00:00
Kp
db7b4b3f88
Refer to <memory> directly, not through "compiler-make_unique.h"
2020-05-02 21:18:43 +00:00
Kp
cc38cdf4b8
Qualify uses of std::make_unique
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
714c13b3c1
Move WallAnims into d_game_shared_state
2020-04-04 19:30:22 +00:00
Kp
c9b1b5b1ec
Use susegment for WALL_IS_DOORWAY
2019-12-27 02:02:23 +00:00
Kp
30091902af
Simplify valptridx types where possible
...
Switch valptridx::ptr to a reference type.
Switch valptridx::ptridx to a reference type or to ::ptr.
Fix up uses of operator-> accordingly.
2019-12-22 05:34:08 +00:00
Kp
c3265f6b90
Convert segment &
to susegment
where possible
2019-12-22 05:34:08 +00:00
Kp
28d9358b00
Expand local aliases to their target variables
...
This makes the code easier to read, at the price of a bit of churn.
2019-12-16 01:56:59 +00:00
Kp
6d0cd8513e
Recompute automap subcanvas on window size change
...
The subcanvas is positioned based on the dimensions of the containing
window, so it must be repositioned if the outer window is resized.
Reported-by: vLKp <https://github.com/dxx-rebirth/dxx-rebirth/issues/394 >
Fixes: f491059ed7
("Enable building with SDL2")
2019-08-18 20:37:29 +00:00
Kp
d0a9d8db98
Move Control_center_present to d_level_unique_control_center_state
...
This could be a shared variable instead, since it cannot be directly
influenced by gameplay. However, it is influenced by the game mode, and
keeping shared variables that are mode-specific would be more complexity
for very little savings.
2019-08-15 01:34:22 +00:00
Kp
de77d2412b
Move Automap_visited to d_level_unique_automap_state
2019-08-06 02:59:40 +00:00
Kp
597cb41717
Downgrade PCX failures from Error to CON_URGENT
...
There is no need to kill the program due to a missing or malformed PCX file.
2019-07-07 22:00:02 +00:00
Kp
f1878254df
Simplify automap drawing of other players
2019-06-27 03:26:20 +00:00
Kp
063bf29225
Enable -Wimplicit-fallthrough=5; fix resulting breaks
...
This enables using -Wimplicit-fallthrough with ccache+distcc, which
strip the fallthrough comments, but do not strip the attribute
annotationns.
2019-04-04 04:29:03 +00:00