Commit graph

996 commits

Author SHA1 Message Date
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
Kp 6285878c4c Add color_palette_index type alias, to note palette-related uint8_t 2020-07-16 02:31:04 +00:00
Kp 665713f315 Remove static inline declarations from fwd-partial_range.h
A declaration is useful if it declares an external function.  A static
inline declaration, if not followed by the definition later in the same
translation unit, will not be useful.  Remove such declarations, and
rely on using the definition as a declaration for those files that
actually call partial_range() or similar functions.
2020-06-10 02:25:32 +00:00
Kp 3114874713 Delegate PCX loading to SDL_image
This adds a new dependency, but most systems likely already have
SDL_image installed.  Use of SDL_image can be disabled, but this is
discouraged, because various in-game interfaces assume the use of the
original background.

The old implementation automatically corrected for filename case.  The
new implementation expects that the supplied filename can be passed to
PYHSFS_openRead as-is.  All known uses in-game have been corrected to
satisfy this requirement.  If the new stricter match requirement becomes
a problem, a variant of PHYSFSRWOPS_openRead that adjusts filename case
could be created for use here.

- Update install instructions
- Update ebuild
- Update Arch PKGBUILD
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 8839f538e0 Refer to <array> directly, not through "compiler-array.h" 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 95ebb67ad0 Add release note about savegame format change
zicodxx reported in issue #449 that savegames created in a new build,
then loaded in an older one, may behave incorrectly in the old build.
This cannot be fixed in the new build without reverting the logic change
which caused it.  Support for old builds has always been best effort, so
this will not be fixed.  Add a release note about it.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/449>
2020-04-26 17:26:23 +00:00
Kp b396445efa Require support for std::index_sequence, std::make_index_sequence
The minimum supported compiler versions now provide a depth-efficient
implementation of std::make_index_sequence, which removes the last
reason to carry a private implementation.  In the case of clang, it
appears to have a special compiler intrinsic used to implement its
std::make_index_sequence.

Switch to the compiler-provided version for both gcc and clang.
2020-04-26 17:26:23 +00:00
Kp 5fa8c06914 Add experimental support for autosaves
Set autosave interval to 10 minutes, unless specified in the player's
configuration file.  Players can change the autosave to 0 minutes to
disable it.
2020-04-19 20:47:07 +00:00
Kp 7478eab4c9 Remove references to DXX forum
The forum vanished several months ago and now points to a server with a
bad certificate.  Stop directing people to that hostname.
2020-03-25 02:31:10 +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
Conn O'Griofa 452d58a0b5 Update Raspberry Pi Mesa build for Buster & Pi 4B
The new Raspberry Pi 4B revision has a minimum requirement of Raspbian
buster, and uses the Mesa V3D driver by default; in fact, the legacy
Broadcom drivers are no longer compatible with its VideoCore VC6 chip, so
building against Mesa is mandatory for this Pi revision.

Unfortunately, the Debian buster version of the Mesa packages
have intentionally dropped the GLESv1 headers, making building of GLESv1
software impractical (even though the VC4/V3D driver can still run GLESv1
applications).

The OpenGL driver in conjunction with SDL2* runs at full
speed on Raspberry Pi 3B & 4B, so it makes sense to modify the "mesa"
build to this configuration in light of these facts.

* SDL2 is highly desirable due to the availability of the KMSDRM driver, which is
the only way to run dxx-rebirth outside of X (we can no longer use
the dispmanx/rpi driver of SDL1).
2019-09-17 13:45:11 +01:00
Kp e7275f8a8c Align capitalization of Data directory in instructions with the code
Commit e6169f17f9 switched from searching `Data/` to searching
`data/`.  For users on case-insensitive filesystems, this is a no-op and
the instructions that reference the `Data` directory continue to work.
For users on case-sensitive filesystems, the change broke accessing the
data directory, and caused the instructions to mislead.  Given the age
of the commit, fixing the capitalization now will likely cause more
problems than it solves.  Instead, fix the capitalization of the
instructions, so that users who follow the documentation get a working
setup.

Reported-by: krux02 <https://github.com/dxx-rebirth/dxx-rebirth/issues/447>
Fixes: e6169f17f9 ("Add 'Data' subdir as a searchpath, so D2X will find descent.pig and to simplify a lot of file opening/checking/closing code")
2019-08-25 17:06:34 +00:00
Kp 519edb9e16 Move Control_center_destroyed to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
Kp 03214c0e6f Fix original game bug that meant to reset camera flag, but did not 2019-08-06 02:59:40 +00:00
Kp 445a734779 buddy_message_ignore_time: respect guidebot cage
Commit dc79bb8e4a intended to clean up processing guidebot messages,
but accidentally allowed the guidebot to report certain status messages
before its cage was opened.  Normal missions still do not report these
messages, but some custom levels do.

Reported-by: ziplantil <https://github.com/dxx-rebirth/dxx-rebirth/issues/438>
Fixes: dc79bb8e4a ("Remove hack for bypassing buddy time restriction")
2019-07-28 21:09:07 +00:00