Commit Graph
356 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 95946e3a7c 🧹 Cleanup unused variables (#1584)
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
2021-04-18 18:15:47 +02:00
Juliano Leal Goncalves 0df491eeac 🐛 Ensure picked up items on the ground are removed 2021-04-16 06:44:05 +02:00
qndel d8444ed695 Clean DrawInvBelt + outline colors
* fix right hand items
2021-04-16 02:17:28 +02:00
Anders Jenbo 997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
FluffyQuack 051ac249db 🐮 Fixed a legacy bug causing network desync if a player tries to swap sword+shield with a two-handed weapon without sufficient inventory space. 2021-04-16 00:35:21 +02:00
qndel edda16cb47 DrawInv cleanup (#1306) 2021-04-15 21:02:42 +02:00
FluffyQuack 7c5646a475 Rewrote two identical code snippets in inv.cpp into one function. (#1528) 2021-04-14 16:40:08 +02:00
FluffyQuack 8365998b49 🐮 Slightly altered RemoveInvItem() so a mostly identical code snippet could be replaced with a call to that function. Also added some documentation to the function. 2021-04-14 07:46:54 +02:00
Anders Jenbo 177373d674 Merge branch '1.2' 2021-04-13 04:35:24 +02:00
Juliano Leal Goncalves 8cf972e843 ♻️ Move 'HeroClass::ClassCount' to external tracking template
This eliminates the problem where the compiler complains we are not handling all enumeration values by moving the "hack" counting member into somewhere else external to the enum.
2021-04-12 20:55:33 +02:00
Juliano Leal Goncalves 28ad9d43c5 🎨 Rename 'plr_class' enum to 'HeroClass'
Members were renamed as well for readability.
2021-04-12 20:00:53 +02:00
Juliano Leal Goncalves 7d95bfed39 ♻️ Convert 'plr_class' to a scoped enumeration 2021-04-12 20:00:53 +02:00
Austin Wagner 1b5b8e3ef1 Fix manual gold stacking when max is modified
Affects dragging and dropping gold in inventory and gaining gold via
purchases when the Auric Amulet is equipped
2021-04-12 17:56:03 +02:00
Anders Jenbo eb45544f84 🐛 Fix gold pickup still working the old way in Diablo 2021-04-12 17:28:32 +02:00
Austin Wagner c46d31c993 Fix manual gold stacking when max is modified
Affects dragging and dropping gold in inventory and gaining gold via
purchases when the Auric Amulet is equipped
2021-04-12 10:41:11 +02:00
Anders Jenbo 61244c4d93 ♻️ Rearange and apply more enums 2021-04-10 05:24:01 +02:00
Anders Jenbo 4f8b5e2f5f 🎨 Correct style of true comparisons 2021-04-09 15:13:02 +02:00
Anders Jenbo 20186e0370 🎨 Replace TRUE/FALSE with true/false
fix


Fix


fix
2021-04-09 15:13:02 +02:00
Anders Jenbo 93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Anders Jenbo af96de4038 ♻️ Move a large part of enums to there respective headers 2021-04-08 19:20:55 +02:00
Juliano Leal Goncalves b9e19fe84f ♻️ Simplify adding items to inventory by reusing 'AutoPlaceItemInInventory' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves da18b0f97b ♻️ Reuse 'AutoPlaceItemInInventory' inside 'StoreAutoPlace' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 0b8a35f4b0 🔥 Remove now useless 'SpecialAutoPlace' function 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves cae4461c39 ♻️ Reuse existing functions in place of 'SpecialAutoPlace' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 7430109f7e 💡 Add proper comments to 'AutoPlaceItemInInventorySlot' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 1bc44bc969 🎨 Rename 'AutoPlaceItemInInventorySlot' arguments for readability/consistency 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 462acd9422 ♻️ Replace 'BOOL' macro with 'bool' type on 'AutoPlaceItemInInventorySlot' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 1c15e244b2 🚚 Rename 'AutoPlace' to 'AutoPlaceItemInInventorySlot' 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves e33ea53086 ♻️ Pass ItemStruct on inv AutoGetItem function 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 3b015085de ♻️ Pass ItemStruct on item RespawnItem function 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves b5a89578f0 ♻️ Pass ItemStruct on inv InvGetItem function 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 01606ea4df ♻️ Pass ItemStruct on inv CleanupItems function 2021-04-07 18:34:02 +02:00
Juliano Leal Goncalves 8e22f3a056 ♻️ Pass ItemStruct on inv AutoPlace function 2021-04-07 18:34:02 +02:00
Anders Jenbo 433edc63ea ♻️ Consistently use pragma once to guard the headers 2021-04-06 15:21:25 +02:00
Anders Jenbo bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo 630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Juliano Leal Goncalves 9021f8daa5 ♻️ Pluralize global 'item' array variable 2021-04-06 11:45:28 +02:00
Juliano Leal Goncalves bcf63dfc1a 🐛 Allow shift+click to equip weapons on monk 2021-04-04 04:47:25 +02:00
FluffyQuack c0f57f3020 🐮 Draw outline for color in index 0 for inventory icons. (#1318) 2021-04-03 03:39:44 +02:00
Anders Jenbo bba73ea20f ✨ Handle mixed item origins in multiplayer 2021-04-01 14:52:44 +02:00
Anders Jenbo c659afa9d6 🐛 [hellfire] Fix "0 gold" sometimes spawning on the corner stone 2021-03-30 05:05:52 +02:00
Anders Jenbo ca2c2ba5e7 🚨 Handle a bunch of warnings from CLang 2021-03-29 06:26:31 +02:00
Anders Jenbo bb7d0368d0 🐛 Correctly initialize empty objects 2021-03-29 02:19:01 +02:00
Anders Jenbo 2362ff82f7 ✨ Add black text color 2021-03-27 23:04:19 +01:00
Juliano Leal Goncalves 800dbce066 ♻️ Move options-related structs to new 'options.h' file 2021-03-27 03:26:44 +01:00
Anders Jenbo 38fdf34c14 💄 Apply code style 2021-03-20 20:39:28 +01:00
Anders Jenbo 1d537e0a93 🚨 Add missing cases to most switches 2021-03-20 20:39:28 +01:00
Gleb Mazovetskiy 70d1d633bd Get rid of SCREEN_X / SCREEN_Y
GlobalOutputBuffer() now returns a clipped subregion
2021-03-17 23:37:58 +01:00
Gleb Mazovetskiy cd59a1c323 Completely replace gpBuffer with CelOutputBuffer
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.

We now have access to SDL surface manipulation functions.

`gpBuffer` and `gpBufEnd` are completely gone 🧹

This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
2021-03-13 05:13:26 +01:00
Gleb Mazovetskiy 764781e111 Migrate InvDrawSlotBack away from gpBuffer 2021-03-13 02:26:11 +01:00