Kp
21c530a3e2
Use enumerated_array for difficulty-level-specific arrays
2021-09-19 10:53:48 +00:00
Kp
c01a51fd8b
Remove PlayMovie special case for .MVE
...
Only one caller needed this special case. Remove the special case, and
adjust that caller to include the `.MVE` as a static suffix on its
inputs.
2021-09-19 10:53:48 +00:00
Kp
e973dc0c4c
Move small briefing members earlier in the structure
2021-09-19 10:53:48 +00:00
Kp
4d11ad18a6
Compute movie_pause_window dimensions from parent window
2021-09-19 10:53:48 +00:00
Kp
b9b7ca06b4
Compute movie window position from containing canvas
...
This generates the same result for now. If a canvas other than the
screen were used, this will do the right thing, while the prior version
would not.
2021-09-19 10:53:48 +00:00
Kp
284a55ad3a
Add 0.25 second sleep to movie pause dialog
...
Otherwise, pausing the movie puts the game into a hard CPU spin until
the pause is ended.
2021-09-19 10:53:48 +00:00
Kp
f9fa374ab4
Zero-initialize d_loaded_subtitle_state::Subtitles in debug builds
...
This provides uniform values, which will encourage the debugger to
collapse unused entries in its output.
2021-09-12 16:20:52 +00:00
Kp
2bbfc78ab9
Draw guidebot menu on escort_menu canvas
...
Previously, the guidebot menu was given the full screen dimensions and
drew on only part of them, allowing the rest of the screen to be visible
due to not repainting it. Change to make the escort_menu window the
size that the user sees.
2021-09-12 16:20:52 +00:00
Kp
21241471c6
Return string width/height from gr_get_string_size
...
Use structured bindings to capture the values on return, so that they
can be declared as `const` if they are immutable after initial
computation.
2021-09-12 16:20:52 +00:00
Kp
6dcd89d494
Try harder to pick distant segments for thief/powerup respawn
2021-09-04 12:17:14 +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
a7cbf60922
Return error code from PHYSFSRWOPS_openRead*
...
This improves error reporting for movies.
2021-07-25 23:00:56 +00:00
Kp
b814301120
Pass PhysFS error code to callers of PHYSFSX_addRelToSearchPath
...
Use PHYSFS_getLastErrorCode on the result. This allows init_movie to
report the reason a movie was unavailable.
2021-07-25 23:00:56 +00:00
Kp
c26fd86450
Keep builtin movies loaded until the end of main
...
Commit d0d7545ec1
("Unload robot movies on exit") intended to shorten
the lifetime of the loaded data, but failed to save the unique_ptr, so
the lifetime was shortened more than intended. Save the unique_ptr so
that the movies remain loaded.
Also, add a [[nodiscard]] annotation so that the compiler can warn if
this mistake is repeated.
Reported-by: Q3BFG10K <https://github.com/dxx-rebirth/dxx-rebirth/issues/599 >
Fixes: d0d7545ec1
("Unload robot movies on exit")
2021-07-25 23:00:56 +00:00
Kp
d0d7545ec1
Unload robot movies on exit
2021-06-28 03:37:49 +00:00
Kp
1dba8e40ec
Move PHYSFSX_addRelToSearchPath pathname to caller
...
Some callers will need access to the computed path. Change the callers
to pass in a buffer for this path, and have PHYSFSX_addRelToSearchPath
fill that buffer directly.
2021-06-28 03:37:49 +00:00
Kp
391a539ad2
Use enum class for PHYSFSX_addRelToSearchPath append/prepend parameter
2021-06-28 03:37:49 +00:00
Kp
73c3474f8e
Reduce uses of RAIIdmem for local variables
2021-06-28 03:37:49 +00:00
C.W. Betts
48589d0fb0
Add App Category entries to the plists.
2021-04-30 14:43:15 -06:00
dimag0g
6282dd25b9
Merge fbd05a1592
into 8fdc326c2a
2021-02-16 21:30:26 -08:00
C.W. Betts
8fdc326c2a
Add CFBundleIdentifier to the plists.
2021-02-07 19:58:12 -07:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
b70f569178
Use enum class for OGL_TEXFILT_* constants
2021-01-17 22:23:23 +00:00
Kp
3f413f15e5
Fix Descent 2 delayed crash when movies are enabled
...
Commit 479884288c
unintentionally caused the movie window to linger in
the background after a movie was played, which causes a crash when the
window is used later, because part of its state has been cleared.
Use window::track to detect its termination in the usual way, and
eliminate the special logic that tried to track the window by deferring
its deletion. This causes the window to close at the proper time,
thereby avoiding a later crash.
Fixes: 479884288c
("Always delegate to window_create for send_creation_events")
2021-01-17 22:23:23 +00:00
Kp
a682d2bacb
Simplify movie_play_status
...
Callers only ever test for whether the movie was skipped, and never
distinguish between a movie that ran to completion versus a movie that
the user interrupted. Combine these two statuses into one value, and
eliminate the logic in RunMovie that picked which of the two to return.
2021-01-17 22:23:23 +00:00
Kp
6f7b0b4743
Use enum class for PlayMovie result
2021-01-17 22:23:23 +00:00
Kp
208b18de99
Initialize movie::pMovie at construction time
2021-01-17 22:23:23 +00:00
Kp
12aed869bf
Remove indirection for movie memory management
2021-01-17 22:23:23 +00:00
Kp
062b2fb480
Remove indirection for movie file reading
2021-01-17 22:23:23 +00:00
Kp
8491c96069
Remove indirection for movie frame processing
2021-01-17 22:23:23 +00:00
Kp
6ffc86ef5f
Remove indirection for movie palette processing
...
It existed to support the freestanding mve player, which has not been
maintained in years. Even there, the support can be retained by
aligning the name of the function among the source files. mve_main.c
would need to be converted to C++ to enable full support.
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
e24d3cba9a
Simplify rename_guidebot_menu handling of EVENT_WINDOW_CLOSE
2020-12-27 22:03:09 +00:00
Kp
ba49ddd073
Remove spurious descent.cfg
...
This does not need to be in the repository, and was only ever touched by
automated bulk changes.
2020-12-27 22:03:09 +00:00
Kp
c1d6150015
Pass grs_font& to gr_set_curfont
2020-12-27 22:03:09 +00:00
Kp
479884288c
Always delegate to window_create for send_creation_events
2020-12-20 20:39:07 +00:00
Kp
9fb0406234
Make rename-guidebot menu inherit from newmenu
2020-12-20 20:39:07 +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
137fd95ae0
Reduce indirection resolving chosen menu item
...
Instead of storing a hardcoded array of identifiers, use the index in
the main array as the identifier. Split `enum MENUS` accordingly.
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
ae657007fe
Remove send_creation_events parameter
...
It is always nullptr.
2020-10-22 02:26:16 +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
955c7d9542
Make console window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
0ae9f3c193
Make movie window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
f666ab14cb
Make movie_pause_window window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
9d0a9ec783
Make escort_menu window inherit from dcx::window
2020-08-28 00:18:45 +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
ec6a78c481
Use enum class for marker index types
2020-07-22 03:11:18 +00:00