Commit graph

968 commits

Author SHA1 Message Date
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
Kp 41f4e84261 Move Stolen_item_index into d_thief_unique_state 2019-07-16 04:00:50 +00:00
Kp a2560cdfb5 Move Stolen_items into d_thief_unique_state 2019-07-16 04:00:50 +00:00
Kp 1eaaff3016 Move Difficulty_level to GameUniqueState 2019-06-27 03:26:20 +00:00
Kp cfb481c74a Add experimental support for guidebot in multiplayer
This was requested by a user in early 2018.  However, the proposed
prototype was susceptible to various forms of desynchronization, and was
unsuitable for merging.  No further revisions were proposed, and the
feature languished.  This commit enables the guidebot in cooperative
games and addresses the known synchronization problems, as well as some
other bugs that were uncovered during light testing.  This is classified
as an experimental feature because it has not been heavily tested in
complicated games.

Requested-by: cfeuersaenger <https://github.com/dxx-rebirth/dxx-rebirth/issues/364>
2019-06-27 03:26:20 +00:00
Kp af166735cc Use enum class for player visibility 2019-06-20 04:02:27 +00:00
Kp 6772bac84e Remove per-game README files; prefer the unified README 2019-05-26 22:07:45 +00:00
Kp bfcff2cefe Fix crash loading guidebot with unreachable goal
Remove use of object_guidebot_cannot_reach and instead track the
reachability of the object as a separate flag.  This allows the game to
remember when an object was found, but unreachable.  Previously, it
would store only that some unreachable object was found.  Now, it stores
the index of the unreachable object.  This extra information is not used
yet.

Reported-by: Dainslaif <https://github.com/dxx-rebirth/dxx-rebirth/issues/421>
Fixes: c3cead4319 ("Move Escort_goal_index to d_unique_buddy_state")
2019-05-26 00:44:37 +00:00
Chris 44212ed77b Changed default tracker host address from dxxtracker.hopto.org to tracker.dxx-rebirth.com as requested by A Future Pilot 2019-05-17 15:36:58 +02:00
Kp 175fc1f650 Fix gcc-9 -Wstringop-truncation in gamepal.cpp 2019-05-11 20:18:29 +00:00
Kp 2243cd7f58 Use xrange for loops with zero start and constant numerical end
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*\(!=\|<\)\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\4u))/
2019-05-04 18:27:36 +00:00
Kp 15ac8a5ac6 Add utility xrange for range-based loops with precomputed bounds
Utility xrange, inspired by the Python2 feature of the same name,
provides an object that returns successive values from [start, end).  It
is useful when the end index is known in advance, and is particularly
helpful when that index is expensive to recompute.
2019-05-04 18:27:36 +00:00
Kp 4d8d244bb9 Move spreadfire,helix orientation to player_info 2019-05-04 18:27:36 +00:00
Kp 3e25804026 Use NSDMI wherever possible 2019-04-28 00:53:40 +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
Kp 5dc630b58f Move Last_buddy_message_time to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp 5da35845d9 Move Buddy_last_player_path_created to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp 5b503c22a6 Move Escort_last_path_created to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp bc62ae694b Move Last_come_back_message_time to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp 7e61451792 Move Last_time_buddy_gave_hint to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp 7577a3e408 Move Escort_special_goal to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp d46fd99425 Move Buddy_last_missile_time to d_unique_buddy_state 2019-03-03 00:31:09 +00:00
Kp b1e19ac667 Move Buddy_last_seen_player to d_unique_buddy_state 2019-03-03 00:31:08 +00:00
Kp bd1cce0cc3 Move Buddy_sorry_time to d_unique_buddy_state 2019-03-03 00:31:08 +00:00
Kp 9e3c5ec272 Move Last_buddy_key to d_unique_buddy_state 2019-03-03 00:31:08 +00:00
Kp b34e7bae24 Move Buddy_gave_hint_count to d_unique_buddy_state
Fix original bug that buddy was limited to 5 hints per program run, not
5 per boss as it probably should have been.

Due to savegame format limitations, this still is not right.  Reloading
the game should restore Buddy_gave_hint_count to its value at save time,
but will not.
2019-03-03 00:31:08 +00:00
Kp 58d59da9d2 Move Escort_goal_object to d_unique_buddy_state 2019-03-03 00:31:08 +00:00
Kp 926afe73d5 Move Looking_for_marker to d_unique_buddy_state 2019-03-03 00:31:08 +00:00
Kp ace3313dc3 Move Buddy_messages_suppressed to d_unique_buddy_state 2019-03-03 00:31:08 +00:00