Commit Graph
731 Commits
Author SHA1 Message Date
DakkJaniels dad46e1905 Item special effect enum (#4129) 2022-04-19 15:44:46 +02:00
Gleb Mazovetskiy a66ca44695 Zero-based frame indexing
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy ade8aba822 Fix some more warnings 2022-04-14 01:26:29 +02:00
staphen 32311d4835 Fix Diablo's HP 2022-04-06 01:37:48 +02:00
obligaron 7d1e2d738e Ensure Reflect + Thorn don't kill a monster twice (#4318) 2022-04-03 10:27:08 +02:00
Anders Jenbo 55a0b71b1c Only spawn loot once 2022-03-20 11:12:08 +01:00
Anders Jenbo 1409e604f5 Reduce string conversions 2022-03-20 11:04:15 +01:00
Anders Jenbo 718c46e7fe Remove use of tempstr 2022-03-19 06:03:19 +01:00
obligaron e0ef3a2307 Init monster TRN after monster load 2022-03-09 20:23:49 +01:00
Gleb Mazovetskiy 7fede6c4cb Clean up owned/unowned CelSprite ambiguity
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.

This clarifies ownership and makes the code cleaner in a number of
places.

Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
DakkJaniels 7bc19ee91a add enum for the spell flags. Adjust code to use them. 2022-03-06 02:09:19 +01:00
qndel d3995736b9 fix spawning unique monsters 2022-02-23 22:37:12 +01:00
qndel 9ba64ad08b TRN rewrite + bugfix (#4056)
* working new TRN system
* apply TRNs to all unique missiles
2022-02-20 14:28:51 +01:00
Gleb Mazovetskiy 48ff656dc0 Load monster graphics into a single buffer
Follow-up to a5e1fa5bbe, which loaded
the missiles into a single buffer.
2022-02-17 22:02:41 +00:00
DakkJaniels 0790416781 Unique Monster Variable Rename (#4060)
* fix variable name to reflect what it is modifying (unique monster custom to hit, not custom hit points)
* align UniqueMonstersData table
2022-02-14 13:38:31 +01:00
staphen 30a9595020 Fix Hork Demon and Nakrul drops in multiplayer 2022-02-04 18:44:26 +01:00
ephphatha 32d397eb2a Add max_size checks when adding missiles to allow for limited size containers
This doesn't handle failed allocations (e.g. if the platform runs out of memory) but makes it easier to use a fixed size container on limited memory devices.
2022-01-23 05:02:57 +01:00
obligaron 234a053863 Change Missiles Array to std::list 2022-01-20 23:12:48 +01:00
SoundChaser83andStephen C. Wills b52724a15e Fix monster damage potentially being off by 63/64th
Monster damage values from melee/missile hits could potentially add or subtract up to 63/64ths of damage over and above a monster's usual damage range

Co-authored-by: Stephen C. Wills <[email protected]>
2022-01-09 02:29:08 +01:00
staphen bd0470994a Initialize golems before objects 2021-12-12 19:16:59 +01:00
obligaron f2f764ed68 Fix Knockback checks wrong position when a monster is moving 2021-12-12 00:02:05 +01:00
obligaron f58a42ca97 Check that monsters aren't placed in doors 2021-12-12 00:01:01 +01:00
Anders Jenbo ffae6d805b Clean up check for borken monster position in DirOK 2021-12-11 04:55:24 +01:00
obligaron ff5de056fa Add all (boolean) Game Settings to Settingsmenu (#3616) 2021-11-26 23:43:46 +01:00
qndel 7b82c52da9 add _mai_id enums in comment 2021-11-24 12:51:56 +01:00
Gleb Mazovetskiy 3aa8149d3e PrintMonstHistory: Fix string manipulation
The code previously assumed that there is an ASCII separator after each
resistance type.

Different languages may use something else entirely. Relaxes the
assumption to any single code point to avoid producing malformed
UTF-8.
2021-11-14 07:35:10 +00:00
qndel 1110927057 make berserked monsters fight each other 2021-11-10 20:43:22 +01:00
Andrew James 796e2813cf Use scoped enums for DungeonFlags/BFLAG (#3135) 2021-11-07 03:11:16 +01:00
Gleb Mazovetskiy 3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Anders Jenbo 160c0fc2e4 Fix OOB when monsters attack monsters 2021-10-26 19:17:12 +02:00
qndel e567953bc9 Sharing automap exploration in multiplayer 2021-10-25 02:58:41 +02:00
qndel 0ccdf940f7 fix bounds checks (#3237) 2021-10-24 17:20:04 +02:00
Anders Jenbo 0e3c1321fb 🐛 Fix scavenger groups getting stuck 2021-10-21 23:55:02 +02:00
Thomas ChristliebandJuliano Leal Goncalves e5f5c4ef0c Make variable a const reference
Co-authored-by: Juliano Leal Goncalves <[email protected]>
2021-10-14 01:34:02 +02:00
ThomasChr b473a33496 remove light source when killing a berserk monster 2021-10-14 01:34:02 +02:00
Anders Jenbo aa90229821 🐛 Make monsters follow the leader 2021-10-13 16:59:57 +02:00
qndel f8cda02456 apply bounds check function 2021-10-12 01:18:28 +02:00
qndel 2d81357069 fix anvil monsters placement (#3035) 2021-10-05 20:00:38 +02:00
Anders Jenbo 2708b16c05 Validate CMD_SYNCDATA (#2968) 2021-09-30 15:38:10 +02:00
Anders Jenbo 671fdbd125 Implement contextural translation (pgettext)
Fixes #2369
Fixes #2790
2021-09-20 04:18:35 +02:00
obligaron 0acaec710c Remove -m debug command line 2021-09-17 21:05:31 +02:00
obligaron 74a1810576 Remove most uses of BFLAG_MONSTLR 2021-09-17 21:03:41 +02:00
obligaron e62aaa562f Fix missiles don't hit horizontal walking players/monsters 2021-09-17 21:03:41 +02:00
qndel a5ea763567 fix saves bricked by spawn command 2021-09-17 08:46:11 +02:00
staphen 60492ef954 Add proper graphics for gamepad 2021-09-16 19:25:31 +02:00
Siddharth singh chouhan ba161f623e Move documentation from implementations to declarations. (#2858) 2021-09-13 15:45:38 +02:00
Juliano Leal Goncalves 379a27b64a ♻️ Convert 'ItemType' enum to enum class
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
ephphatha 8e155e011f Rename helpers on Monster to match AnimationInfo 2021-09-12 02:27:47 +02:00
ephphathaandAnders Jenbo b12de6fe12 Use scoped enum for Direction
Identified and removed an instance of Direction being used as an argument for a bool parameter

Removed a single-use temporary variable being cast from sprite frame to direction to size_t

Co-authored-by: Anders Jenbo <[email protected]>

Fix alignment of WalkSettings array
2021-09-12 02:27:47 +02:00
Anders Jenbo cd79f0204d 🚨 Fix compiler warnings 2021-09-12 01:37:28 +02:00