Gleb Mazovetskiy
74755c8be7
Remove utils/stdcompat/cstddef.hpp
3 years ago
Gleb Mazovetskiy
53db86ee9a
Use `std::from_chars` instead of `std::stoi`
...
Adds a `ParseInt` function which uses `std::from_chars`.
From `std::from_chars` documentation:
> Unlike other parsing functions in C++ and C libraries,
> std::from_chars is locale-independent, non-allocating, and non-throwing.
Co-authored-by: Andrew James <ephphatha@thelettereph.com>
3 years ago
Gleb Mazovetskiy
703f3c2e6b
Clean up `IsAreaOk`
...
Follow-up to #6403
3 years ago
Gleb Mazovetskiy
2f1290c5d2
Remove C++11 compatibility code
3 years ago
Eric Robinson
7f2010f77b
Level Up Sound ( #6275 )
3 years ago
qndel
728b632960
fix typos
3 years ago
qndel
41adc6a259
rename WarpDrop -> PortalTownPosition
3 years ago
qndel
4884da895c
rename AddWarpMissile -> AddPortalMissile
3 years ago
qndel
398d09477a
rename AddInTownPortal -> AddPortalInTown
3 years ago
qndel
b5ab3a10a2
correct IsTileWalkable to mark tiles out of bounds as not walkable
3 years ago
qndel
1e6277595d
deduplicate NPC sell/buy code
3 years ago
obligaron
97f9045c83
Introduce TrySelectPixelBased
3 years ago
obligaron
f59e3aaffb
Introduce IsPointWithinClx
3 years ago
obligaron
d5642daeb4
Introduce GetScreenPosition
3 years ago
obligaron
ac7c96b33f
Introduce PointOf operator /=
3 years ago
obligaron
578ce01432
Introduce Towner/Player/Object/Item/Monster::currentSprite/getRenderingOffset
3 years ago
obligaron
e8838a73d5
Refactor CheckCursMove()
3 years ago
Anders Jenbo
b25b6a1daa
Fix spawn location when using map debug command
3 years ago
Anders Jenbo
28b26da7fa
Fix spawning shrines on custom levels
3 years ago
Gleb Mazovetskiy
7a5e5f73e6
Support language-specific font variants
...
Refs #3538
3 years ago
ephphatha
4e3f46603a
Remove unused attribute _pMaxLvl
3 years ago
staphen
663c33475b
Introduce function to determine if ZT comms channel to peer is relayed
3 years ago
qndel
384a303afa
add IsAreaOk function instead of multiple manual checks
3 years ago
Gleb Mazovetskiy
8101e2c0ba
Add `c_any_of` and friends
...
Adds handy helpers for performing algorithms on the entire container.
They're prefixed with `c_` for container.
This naming convention is identical to some popular C++ libraries, such
as Abseil.
3 years ago
Gleb Mazovetskiy
999f44cf07
Point: Safer `operator-`
...
1. Require both operands to have the same signedness to avoid surprises.
2. Only allow unary negation on signed points.
Fixes #6409
Also fixes a potential bug in the sound position calculation.
3 years ago
qndel
1b42a17153
dont show hit indicator for 1 player
3 years ago
staphen
21af333d90
Fix missiles passing through enemies on SW/NE diagonal
3 years ago
staphen
36186ca9b5
Don't extrapolate missile position in collision interpolation logic
3 years ago
Stephen C. Wills
94c7e7fc01
Add bounds check to MonsterIdle() to prevent var2 overflow ( #6395 )
3 years ago
Anders Jenbo
64d7af2937
Fix loading new demo files and give better error messages when failing
3 years ago
obligaron
09bc43b0ed
Ensure warp and teleport target position is free
3 years ago
staphen
470c028c17
Make Bucklers available in shareware
3 years ago
staphen
b1711739c6
Immediately drop player who sends invalid player data
3 years ago
staphen
b43a8dc904
Fix empty item slot validation in UnPackNetItem()
3 years ago
obligaron
0eda8d9367
Convert town portal level type to vanilla hellfire logic
3 years ago
Anders Jenbo
b01670e1e4
Correct fields being validated
3 years ago
Eric Robinson
46824261f9
Validate iCreateInfo ( #6377 )
...
Co-authored-by: staphen <staphen@gmail.com>
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Co-authored-by: Stephen C. Wills <swills@gridprotectionalliance.org>
3 years ago
Gleb Mazovetskiy
9d96eea86b
De-duplicate extra fonts version check code
...
Co-authored-by: Stephen C. Wills <swills@gridprotectionalliance.org>
3 years ago
staphen
22fdeaf2f0
Use JNI to check VERSION file in fonts.mpq
3 years ago
Gleb Mazovetskiy
d6b7949dab
Fonts: Use pre-cropped CLX sprites
...
Built-in font size decreased by 121,587 bytes
(2,287,332 -> 2,165,745).
Fixes #6361
3 years ago
Gleb Mazovetskiy
fee948b9c5
Fix character panel label for CJK
...
We fixed clipping in text rendering between 1.4 and 1.5.
This surfaced a bug in the char panel label height.
3 years ago
staphen
a090ab7d5c
Apply position-based quest completion logic to Single Player
3 years ago
ikonomov
ee91d9ecf5
update arenas
...
Removed the murky pools, simplified the areas and made them accessible without teleport.
3 years ago
Stephen C. Wills
f0f317e685
Log validation errors in UnPackNetPlayer() ( #6363 )
3 years ago
DakkJaniels
ad19caf667
Move hp/mana display and item graphics to gameplay options
3 years ago
Eric Robinson
b835460541
Fix iCreateInfo comment ( #6354 )
3 years ago
ikonomov
db7ca59738
Update discord link in support
3 years ago
Gleb Mazovetskiy
4187a34896
Fix `-Wshift-negative-value`
3 years ago
Gleb Mazovetskiy
6230ab34b6
Fix `-Wunused-result` for `std::fread` calls
...
Check the result of `fread` and friends explicitly rather than
calling `ferror`.
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