Anders Jenbo
4f8b5e2f5f
🎨 Correct style of true comparisons
5 years ago
Anders Jenbo
36ebd857ad
🎨 Correct style of false comparisons
5 years ago
Anders Jenbo
20186e0370
🎨 Replace TRUE/FALSE with true/false
...
fix
Fix
fix
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Anders Jenbo
4ee84aea1a
♻️ Change BOOLEAN to bool
...
fixup BOOLEAN
5 years ago
FluffyQuack
9c850a1ab0
🐮 Removed redundant init of gameplay variables from config.
5 years ago
qndel
b845f2d8f2
small griswold cleanup ( #1440 )
5 years ago
Gleb Mazovetskiy
461da3cda0
Optimize ItemStruct sizeof: 360 -> 296
...
Can likely be optimized further
5 years ago
Gleb Mazovetskiy
ec4da72f9e
Optimize TownerStruct
...
1. Remove unused fields.
2. Optimize used fields for size.
3. Rename `_tVar1` to `_tTalkingToPlayer`.
5 years ago
Gleb Mazovetskiy
cafa956bf3
Reduce sizes of THEME_LOC (20->10) and ThemeStruct
5 years ago
Gleb Mazovetskiy
29b5526064
dMonster array: int -> int16_t
5 years ago
Anders Jenbo
6fcca51ec6
🐛 Fix loading missiles
5 years ago
Gleb Mazovetskiy
cc75b7a948
loadsave: Fix off-by-one in RemoveEmptyLevelItems
...
Refs #1367
5 years ago
Anders Jenbo
779e6cf950
♻️ Apply more enums
5 years ago
Geoffroy Warin
b54df1af38
add an ini option to configure gamepad deadzone
5 years ago
qndel
7a9aaed4b4
proper heroitems size
5 years ago
Gleb Mazovetskiy
7fd79c5c40
SaveLoad/Helper: Rename member fields
5 years ago
Gleb Mazovetskiy
642472cce8
pfile: extract pfile_get_password()
5 years ago
Anders Jenbo
b1ffdca0a3
♻️ make better use of enums
5 years ago
Anders Jenbo
af96de4038
♻️ Move a large part of enums to there respective headers
5 years ago
Anders Jenbo
ebc27082e7
🔥 remove unused parts of init_test_access
5 years ago
Gleb Mazovetskiy
6a3ae9e35b
Optimize MonsterData layout: sizeof 160 -> 80
5 years ago
Gleb Mazovetskiy
a6c353ddc7
Specify more enum storage types
5 years ago
Gleb Mazovetskiy
b22265277d
Optimize ItemDataStruct layout: sizeof 96 -> 48
...
Also specifies enum storage types
5 years ago
Gleb Mazovetskiy
1326df189a
Optimize layout of MissileData: sizeof 40 -> 32
5 years ago
Gleb Mazovetskiy
ff5d0c8512
Optimize layout of MisFileData: sizeof 341 -> 240
5 years ago
Gleb Mazovetskiy
14a21010a4
Simplify LoadMissileGfx
...
Animation frames are always loaded and free together, there is no need
to check each one.
5 years ago
Juliano Leal Goncalves
30cd12c000
♻️ Eliminate global 'MaxStats' variable
5 years ago
Juliano Leal Goncalves
25db7743dd
♻️ Reuse 'player.GetMaximumAttributeValue' for max stats
5 years ago
Juliano Leal Goncalves
1c1cf41eae
🔥 Remove unnecessary cursor-related logic in StoreAutoPlace
5 years ago
Juliano Leal Goncalves
b9e19fe84f
♻️ Simplify adding items to inventory by reusing 'AutoPlaceItemInInventory'
5 years ago
Juliano Leal Goncalves
da18b0f97b
♻️ Reuse 'AutoPlaceItemInInventory' inside 'StoreAutoPlace'
5 years ago
Juliano Leal Goncalves
bb61dfc68b
♻️ Reuse 'AutoPlaceItemInBelt' inside 'StoreAutoPlace'
5 years ago
Juliano Leal Goncalves
0b8a35f4b0
🔥 Remove now useless 'SpecialAutoPlace' function
5 years ago
Juliano Leal Goncalves
cae4461c39
♻️ Reuse existing functions in place of 'SpecialAutoPlace'
5 years ago
Juliano Leal Goncalves
7430109f7e
💡 Add proper comments to 'AutoPlaceItemInInventorySlot'
5 years ago
Juliano Leal Goncalves
1bc44bc969
🎨 Rename 'AutoPlaceItemInInventorySlot' arguments for readability/consistency
5 years ago
Juliano Leal Goncalves
462acd9422
♻️ Replace 'BOOL' macro with 'bool' type on 'AutoPlaceItemInInventorySlot'
5 years ago
Juliano Leal Goncalves
1c15e244b2
🚚 Rename 'AutoPlace' to 'AutoPlaceItemInInventorySlot'
5 years ago
Juliano Leal Goncalves
e33ea53086
♻️ Pass ItemStruct on inv AutoGetItem function
5 years ago
Juliano Leal Goncalves
3b015085de
♻️ Pass ItemStruct on item RespawnItem function
5 years ago
Juliano Leal Goncalves
b5a89578f0
♻️ Pass ItemStruct on inv InvGetItem function
5 years ago
Juliano Leal Goncalves
01606ea4df
♻️ Pass ItemStruct on inv CleanupItems function
5 years ago
Juliano Leal Goncalves
8e22f3a056
♻️ Pass ItemStruct on inv AutoPlace function
5 years ago
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.
5 years ago
Gleb Mazovetskiy
01574de6a8
Simplify InitPlrGfx
...
It was tracking each type of graphics individually but they're always
initialized together.
5 years ago
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Gleb Mazovetskiy
87dcbcb6d7
Save 1.5 MiB RAM in-game by freeing more DiabloUI art
5 years ago