Commit Graph
205 Commits
Author SHA1 Message Date
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
Gleb Mazovetskiy da7567f06e InitPlrGfx: Only alloc enough for the class
Previously, the allocation size was the maximum size over all the classes.

RAM usage per player:

* Before: 2.2 MiB (any class)
* After:
  * Warrior: 2.0 MiB
  * Rogue: 1.5 MiB
  * Sorcerer: 1.6 MiB
  * Monk: 1.7 MiB

We now also only allocate memory in multi-player as needed.

This means the game will only use as much RAM for player graphics
as there are players currently in the game.

Less RAM is used for each player because class is now taken into account.
2021-04-07 06:52:07 +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
Anders Jenbo 81934158c9 💚 Add missing headers 2021-04-04 06:02:16 +02:00
Anders Jenbo 97716c26ec 🐛 Update xp bar when gaining xp 2021-04-04 05:57:59 +02:00
Anders Jenbo bba73ea20f ✨ Handle mixed item origins in multiplayer 2021-04-01 14:52:44 +02:00
Anders Jenbo ca2c2ba5e7 🚨 Handle a bunch of warnings from CLang 2021-03-29 06:26:31 +02:00
Anders Jenbo fbd86cd3c5 🎨 Mark noreturn functions as such 2021-03-26 02:24:32 +01:00
Anders Jenbo a69a76941e ♻️ Clean up InitCutscene 2021-03-24 21:50:19 +01:00
Anders Jenbo 8f09cc3034 [diablo] 🐛 Correct spelling of Sorcerer
Fixes #1074
2021-03-21 12:18:10 +01:00
Anders Jenbo 17803d5923 ♻️ Apply proper types to PlayerStruct 2021-03-14 15:38:23 +01:00
Andi 7368778cb2 Remove items dropping before entering level (#1010) 2021-03-06 10:57:29 +01:00
Anders Jenbo c71efb5960 ✅ Better assertions on item generation tests
[Diablo/Hellfire] Also clear PkItemStruct when calling PackItem() to
avoid garbage data ending up in the saves.
2021-03-03 09:30:09 +01:00
Anders Jenbo f87bc0ca8b Clea up some duplicate item code 2021-02-27 23:04:06 +01:00
pionere f5c1079d6f eliminate unused code 2021-02-19 22:04:11 +01:00
pionere d5a0fa8e85 get rid of a few warnings 2021-02-19 22:04:11 +01:00
qndel ab9911064f unify checks for single and multiplayer 2021-02-18 22:32:01 +01:00
qndel c0f5749728 Fix RNG diverging during level generation depending on the code path
The consequences has mostly mitigated after wards, but this will make things make more sens when analysing the state of the code.
2021-02-01 06:44:16 +01:00
Anders Jenbo 9c0bc202c8 Fix additional wrong checks for monsters lights 2021-01-31 08:36:06 +01:00
Anders Jenbo 247d7497ce Unify item sync code 2021-01-26 03:14:40 +01:00
Anders Jenbo 3d93478a6c Some additional clean up 2021-01-25 01:21:18 +01:00
Anders Jenbo c3b4b5193f Unify a chunk of Hellfire code 2021-01-18 03:25:52 +01:00
Anders Jenbo dcb8bc8c2c Unify majority of netcode 2021-01-13 18:09:56 +01:00
Anders Jenbo 6786ebbd1a Merge branch 'master' of github.com:diasurgical/devilution 2021-01-11 19:28:45 +01:00
Anders Jenbo 869c490715 [hellfire] NetSendCmdGItem 2021-01-11 11:09:24 +01:00
Anders Jenbo 64be0eb0db Make error message more informative 2021-01-10 23:41:28 +01:00
Anders Jenbo 8c261d0966 Merge remaning clean Hellfire code paths 2021-01-09 19:04:31 +01:00
Anders Jenbo 61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00
qndel 7f7ae623df Goe (#2163)
* proper random_ comparisons
* proper mienemy comparisons
* add mienemy/micaster enum
* GOE enum
2020-12-04 19:16:58 +01:00
Anders Jenbo 38dbcf7641 Format source 2020-12-02 00:52:38 +01:00
qndel 0947ede2fe Cleanup11 (#2156) 2020-11-12 15:11:07 +01:00
qndel 6ade48e855 msg.cpp cleanup 2020-11-10 23:48:09 +01:00
Anders Jenbo 4ae75753c8 Merge branch 'master' of github.com:diasurgical/devilution 2020-11-09 01:24:02 +01:00
qndel 0bd8b2b664 2 functions 2020-11-08 00:26:18 +01:00
qndel 6e2873c3fb msg.cpp functions bin exact 2020-11-07 23:41:28 +01:00
SourceCodeDeleted e5c2744b83 [hellfire] NetSendCmdGItem2 binexact (#2148)
* [hellfire] NetSendCmdGItem2 binexact
2020-11-07 21:36:37 +01:00
Anders Jenbo 75a14114bb Reorder msg.cpp 2020-11-04 05:17:31 +01:00
Anders Jenbo e90f84dd03 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-22 22:14:49 +02:00
qndel 1b18927bf2 fix multi quest bug 2020-10-22 19:42:09 +02:00
qndel e31a7bc22e enums and cleanups 2020-10-22 18:55:26 +02:00
qndel fb81425ac6 some magic numbers cleanup 2020-10-22 18:54:22 +02:00
qndel aa9a938665 DeltaAddItem 2020-10-22 18:53:44 +02:00
qndel 51ca45e0d6 On_SPELLXYD cleanup (#2130) 2020-10-22 17:24:40 +02:00
qndel 4fa00f9079 DeltaImportData bin exact and cleanup 2020-10-22 17:22:18 +02:00
qndel 2d6f5d09b8 delta_get_item cleanup 2020-10-22 17:19:11 +02:00
qndel 7dde42c89e On_SBSPELL cleanup 2020-10-22 15:25:00 +02:00