Commit graph

287 commits

Author SHA1 Message Date
Andi
7368778cb2
Remove items dropping before entering level (#1010) 2021-03-06 10:57:29 +01:00
Juliano Leal Goncalves
5862451e3b Autoequip all items on pickup
Extend behavior of weapons to all items types except for Monk, which will still not auto-equip weapons.
2021-03-06 10:34:56 +01:00
Gleb Mazovetskiy
9ca1fd8996 Migrate CelBlitOutline to CelBlitOutlineTo 2021-03-06 09:55:14 +01:00
Gleb Mazovetskiy
242341c0b3 Migrate CelClippedDraw to CelClippedDrawTo 2021-03-06 09:55:14 +01:00
Gleb Mazovetskiy
2f68e8e74e Migrate CelDrawLightRed to CelDrawLightRedTo 2021-03-06 09:55:14 +01:00
Gleb Mazovetskiy
88bf59f355 Migrate CelClippedBlitLightTrans to CelClippedBlitLightTransTo 2021-03-06 09:55:14 +01:00
Gleb Mazovetskiy
b43325028f Migrate CelDraw to CelDrawTo 2021-03-06 09:55:14 +01:00
Juliano Leal Goncalves
37466890e0 ♻️ Extract 'ItemStruct.isEmpty()' function 2021-03-05 03:52:11 +01:00
Gleb Mazovetskiy
d55a1c8a7d
Pass CelOutputBuffer to game text printing (#1095)
* Pass CelOutputBuffer to game text printing
* DrawHalfTransparentRectTo: minor cleanup
2021-03-03 18:20:24 +01:00
Anders Jenbo
ee3cbdc6ee 🐛 Clear item before reusing it in all cases
This will undoubtly also fix some issues with original items contaning
garbage data that could lead to morphing
2021-03-03 01:43:24 +01:00
Anders Jenbo
a85ffabc25 Fix Monk inventory in release versions of the game
Fixes #1081
2021-03-01 10:47:56 +01:00
Gleb Mazovetskiy
0a6640397b Fix two-handed weapons in inventory
Fixes #1070
Follow-up to #964
2021-03-01 01:35:05 +01:00
Juliano Leal Goncalves
68f31ef0f6 🐛 Block buying "red" consumables with full inventory 2021-02-28 02:22:33 +01:00
Juliano Leal Goncalves
3de338e5b6 ♻️ Pass item referece on SpecialAutoPlace
This simplifies and decouples the logic for determining the size of the
item from ambient variables and makes the function easier to use.
2021-02-28 02:22:33 +01:00
Anders Jenbo
f87bc0ca8b Clea up some duplicate item code 2021-02-27 23:04:06 +01:00
Gleb Mazovetskiy
8283f85e24 Engine: Functions to render to any buffer
Refactor the rendering functions to allow rendering to any output
buffer.

New functions that accept a buffer have the `To` suffix.

The functions that render to the global buffer now always accept
coordinates.
2021-02-27 17:49:39 +01:00
Anders Jenbo
70ca20b59f Clean up Hellfire special cases 2021-02-25 05:50:24 +01:00
Anders Jenbo
60d3e9ceb1 Clean up rendering 2021-02-19 03:05:12 +01:00
Anders Jenbo
772d51c126 [diablo] Fill gold stacks before creating new ones
Before if you had a stack of 4990 and picked up 12 gold you would end up
with one of 4990 and one of 12. Now you will have one of 5000 and one of
2.
2021-02-19 02:56:53 +01:00
qndel
ab9911064f unify checks for single and multiplayer 2021-02-18 22:32:01 +01:00
Anders Jenbo
7d39c4c9d1 Remove checks for duplicate items
- We fixed the normal way of duplicating items.
- Legit items can be seen as duplicates in some instances.
- It doesn't fix the issue since the player has to drop both for it to
trigger.
2021-02-18 21:11:46 +01:00
Anders Jenbo
c08a10e44b Unify calculation of gold icon 2021-02-18 20:52:07 +01:00
pionere
78f1cae1e3 fixed memory corruption when using an item 2021-02-17 19:48:51 +01:00
Juliano Goncalves
a6eb92c185 Remove item persistence from 'inv.SpecialAutoPlace'
The 'saveFlag' argument used for persisting the changes into the
inventory is never leveraged on this function: all existing consumers
provide 'FALSE'. It was probably a copy-paste leftover from the
standard 'AutoPlace'.
2021-02-17 19:12:51 +01:00
galaxyhaxz
fcb7873d06 Fix quest items from previous games breaking dungeon 2021-02-02 16:32:33 +01:00
Anders Jenbo
247d7497ce Unify item sync code 2021-01-26 03:14:40 +01:00
Anders Jenbo
9894bffc95 Unify another chunk of Hellfire code 2021-01-23 03:34:03 +01:00
Anders Jenbo
c3b4b5193f Unify a chunk of Hellfire code 2021-01-18 03:25:52 +01:00
Anders Jenbo
00e3ff08ae Unify majorty of monster.cpp 2021-01-17 03:55:23 +01:00
Anders Jenbo
f9aacc8704 Merge branch 'master' of github.com:diasurgical/devilution 2021-01-09 19:36:09 +01:00
Anders Jenbo
8c261d0966 Merge remaning clean Hellfire code paths 2021-01-09 19:04:31 +01:00
Anders Jenbo
ba484f5a7e Deduplicate GoldAutoPlace 2021-01-09 16:48:32 +01:00
Anders Jenbo
01590d3757 Merge a section of the Hellfire item and quest code 2021-01-07 02:29:06 +01:00
Anders Jenbo
e609e170d0 Merge a large chunk of Hellfire the code paths 2021-01-06 08:07:20 +01:00
Anders Jenbo
a2a3729491 Enable loading hellfire games form main menu 2021-01-02 07:40:05 +01:00
Anders Jenbo
d20eddf48e Unifcy a chunk of Hellfire's code pathts 2020-12-28 01:11:25 +01:00
Anders Jenbo
61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00
Anders Jenbo
a8857130b5 [hellfire] CheckInvPaste 2020-12-11 09:15:07 +01:00
Juliano Goncalves
56a2bde9eb Remove duplicated readied spell validation
The logic is already performed inside 'CalcPlrScrolls', which is
called in both places.
2020-12-04 19:29:23 +01:00
Juliano Goncalves
00f3b753ee Extract valid readied spell logic 2020-12-04 19:29:23 +01:00
Juliano Goncalves
c2ed83eb5e Ensure consistent types for '_pScrlSpells' and '_pISpells' operations 2020-12-04 19:29:23 +01:00
qndel
c4c2e0420c
spell defines and macros (#2162) 2020-12-04 19:18:22 +01:00
Anders Jenbo
38dbcf7641 Format source 2020-12-02 00:52:38 +01:00
qndel
a2dc735f6b some cleanup 2020-11-23 17:04:50 +01:00
qndel
73dce4fa39 minor cleanup 2020-11-12 15:13:01 +01:00
Anders Jenbo
d4976f70ac Merge branch 'master' of github.com:diasurgical/devilution 2020-11-09 06:36:10 +01:00
Anders Jenbo
5b48394689 WIP CheckInvPaste 2020-11-09 01:57:38 +01:00
Anders Jenbo
72e2637061 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c Fix all "no-write-strings" warnings 2020-10-25 15:37:51 +01:00
Anders Jenbo
e073422ce7 Unify executable for Spawn and Retail
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.

This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
2020-10-20 19:42:01 +02:00