Gleb Mazovetskiy
0f77cc3797
Force-inline methods to improve debug build perf
...
This has little or no effect on the optimized build
but significantly improves performance of the headless debug build
`timedemo_test` on my machine goes from 3s to 2s.
3 years ago
Gleb Mazovetskiy
62e9aa0448
`MissilePosition`: Use `WorldTilePosition`
...
Reduces struct size and makes the types of coordinates more obvious.
3 years ago
ephphatha
da76e131e4
Add getter/setter for character levels to ensure _pNextExper stays synced
3 years ago
Gleb Mazovetskiy
ba4def9382
Use utils/algorithm/container.hpp in more places
3 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
e9b5ec77f9
Remove AppendStrView
3 years ago
Gleb Mazovetskiy
c19bfe87fa
Remove utils/stdcompat/algorithm.hpp
3 years ago
Gleb Mazovetskiy
62d067b653
Remove utils/stdcompat/abs.hpp
3 years ago
Gleb Mazovetskiy
74755c8be7
Remove utils/stdcompat/cstddef.hpp
3 years ago
Stephen C. Wills
94c7e7fc01
Add bounds check to MonsterIdle() to prevent var2 overflow ( #6395 )
3 years ago
Gleb Mazovetskiy
d8cd147ac7
Re-encode CL2 on load
...
Original Blizzard encoder is slightly less optimal than our encoder.
While size in RAM in less of a concern for the non-`UNPACKED_MPQS`
build, smaller files are faster to render.
Savings for unpacked and minified MPQs:
* diabdat.mpq: 918,311 bytes.
* hellfire.mpq: 313,882 bytes.
Example player graphics (note that only a few are loaded at any given time for single player):
* diabdat/plrgfx/warrior/: 366,564 bytes.
Example monster graphics savings:
* diabdat/monsters/skelbow: 5,391 bytes.
Based on the implementation from https://github.com/diasurgical/devilutionx-graphics-tools/pull/6
3 years ago
Gleb Mazovetskiy
de081b7080
Fix a few compilation warnings
3 years ago
Anders Jenbo
13e3217578
Only play the dialogs for the initating player ( #6173 )
...
* Only play the The Chamber of Bone lore for the reader
* Only play dialog for the player who is having the conversation
* Allow rock quest when skipping to level 5
3 years ago
staphen
217f6aee85
Don't turn monster towards player during hit recovery if monster is petrified
3 years ago
obligaron
d46aa0e2bc
Always check for uniqueType in TalktoMonster
3 years ago
obligaron
aa354849ee
Fix stone curse shows the wrong animation & infinite petrify
3 years ago
obligaron
31fe55a161
Prevent hellfire quests from disapearing from quest log
3 years ago
obligaron
1e8230b9b1
Move Gharbad talk logic (spawn item) to TalktoMonster
3 years ago
obligaron
3f195ae29b
Use CMD_SPAWNITEM to spawn Ghardbards first item
3 years ago
obligaron
deee72b0bc
Move Zhar talk logic (spawn item) to TalktoMonster
3 years ago
obligaron
e1082126a3
Use CMD_SPAWNITEM to spawn Zhars first book
3 years ago
staphen
874fa6b8d3
Fix monster light offset after walk animation ends
3 years ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Anders Jenbo
b7424a0068
Clean up PmChangeLightOff()
3 years ago
staphen
45da8b2295
Remove unique monster's light when no corpse is left behind
3 years ago
Trihedraf
7baaa3c35e
Fix monster health to +100 for NM and +200 for Hell instead of +1 and +3 ( #5987 )
3 years ago
Eric Robinson
81e3c7abaa
Remove fixed bugfix comments, apply golem fix
3 years ago
Gleb Mazovetskiy
957bd03b98
Remove `FMT_COMPILE` in "cold" places
...
Removes most `FMT_COMPILE` calls.
`FMT_COMPILE` results in better performance but larger code size.
Removes `FMT_COMPILE` calls for places that are called infrequently,
i.e. not on every frame.
RG-99 binary size reduced by ~4 KiB.
3 years ago
obligaron
63b04045f2
MP: Send delta message for lachdanans death
3 years ago
obligaron
6a5210e14a
Multiplayer: Enable Lachdanan Quest
3 years ago
obligaron
3a31539c7e
Multiplayer: Enable Warlord of Blood Quest
...
Update Source/quests.h
Co-authored-by: qndel <stefan551@o2.pl>
3 years ago
obligaron
76528246d7
Multiplayer: Enable Zhar the Mad Quest ( #5823 )
3 years ago
obligaron
31b0f2147a
Multiplayer: Enable Gharbad the Week Quest
3 years ago
Gleb Mazovetskiy
e67ea9b006
Make `MissilesData` const
...
Instead of temporarily modifying `MissileData` around certain calls,
pass the arguments from the outside.
3 years ago
Gleb Mazovetskiy
98294e0ad5
Optimize `MissileData`: 32 bytes -> 24
...
23 bytes used, 1 spare byte in the padding.
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
Gleb Mazovetskiy
0a6a8e8aa0
Clean up missile data access
...
Replace enum static casts with `GetMissile(Sprite)Data`.
3 years ago
KPhoenix
7947b99511
Implement new enum class
3 years ago
staphen
620a86b007
Change default monster missile damage to zero
3 years ago
Eric Robinson
30c1991039
`enum _mai_id` -> `enum class MonsterAIID` ( #5683 )
3 years ago
Anders Jenbo
c99f7cf644
Floating numbers ( #5639 )
...
Co-authored-by: qndel <stefan551@o2.pl>
Co-authored-by: Stephen C. Wills <staphen@gmail.com>
3 years ago
KPhoenix
8db521727d
`enum missile_id` -> `enum class MissileID`
...
Changes `enum missile_id` to `enum class MissileID`
3 years ago
Anders Jenbo
0c5fd01067
Change missile_resistance into class DamageType
3 years ago
ephphatha
9da76e0003
Update CheckReflect to return applied damage
...
Instead of modifying the damage value by reference
3 years ago
KPhoenix
a22389613d
Remove No Monster Heal from Fire Arrows
3 years ago
Gleb Mazovetskiy
36c4a89f3e
Clean up a few position types
3 years ago
Gleb Mazovetskiy
6654a26345
IsPlayerMinion: Faster check
...
Debug profile cost: 2.5% -> 1.5%
This should be as robust as the other check. If not, we have a bug
elsewhere.
3 years ago
Gleb Mazovetskiy
3910c2e56a
UpdateEnemy: Swap the M_Talker check
...
The `otherMonster.talkMsg != TEXT_NONE` check is a lot cheaper and is
almost always false.
This eliminates the M_Talker cost from the debug profile.
3 years ago
Gleb Mazovetskiy
9a1587060d
Use real `CalculateSoundPosition` with NOSOUND
...
Fixes big-endian tests, which currently build with `-DNOSOUND`
to reduce build time.
3 years ago
Gleb Mazovetskiy
09d7f99c32
Optimize IsTileSafe
...
Add dungeon flags for Fire/Lightning Wall and use them to check if the
monster considers the tile safe.
3 years ago