Mikołaj Piróg
32b3333bfb
Exp overflow fix ( #5070 )
2022-08-28 17:35:58 +02:00
Anders Jenbo
f8dca40427
Merge branch 'master' of https://github.com/diasurgical/devilution
2022-08-27 02:41:28 +02:00
Stephen C. Wills
c91702ffbc
Don't use MyPlayer in SaveHotkeys() ( #5292 )
2022-08-26 23:53:38 +02:00
qndel
ef5a4de227
typos + code cleanup
2022-08-07 20:28:43 +02:00
obligaron
2493f06116
ActorPosition: Remove offset, offset2 and velocity
2022-08-03 21:25:21 +02:00
obligaron
1cfd1ca99d
Fix double casting bug - use separated info for casted and queued spells
2022-08-02 03:05:46 +02:00
obligaron
ca1949a87f
Don't recalculate leveltype (from currlevel) in SaveGameData
2022-07-29 20:25:43 +02:00
Gleb Mazovetskiy
b21ebffaf2
Clean up player graphic loading
2022-07-24 18:25:12 +02:00
ephphatha and Anders Jenbo
975eb3674b
Add helper to check if a monster belongs to a player
...
Co-authored-by: Anders Jenbo <[email protected] >
2022-07-24 16:08:09 +02:00
Anders Jenbo
d1189388f5
Use user by reference
2022-07-17 18:41:05 +02:00
Gleb Mazovetskiy
04c3d85179
Remove MAX_PATH
...
Rather than using the Windows-like `MAX_PATH`, what we really want is 2
things:
1. Maximum path of a file in an MPQ. This is now `MaxMpqPathSize`.
2. Max size for the known monster paths. This is now 64 for sounds and
TRNs, which is more than enough (picked arbitrarily).
2022-07-16 11:14:16 +01:00
Gleb Mazovetskiy
7ad0ec925f
Reduce sizes of Monster (goal)Vars
...
sizeof(Monster): 168 -> 144
2022-07-15 17:15:50 +01:00
Mikołaj Piróg
262fa9ac2d
Rename MonsterData members ( #5000 )
2022-07-15 16:20:13 +02:00
ephphatha
1337ff6ea2
Add check if a monster potentially has leashed minions
2022-07-13 07:13:34 +02:00
ephphatha and Anders Jenbo
4fef842b0b
Remove use of ID/index from PlaceGroup
...
use getId helper for leader id
Co-authored-by: Anders Jenbo <[email protected] >
2022-07-13 07:13:34 +02:00
ephphatha
1e0f2c149c
Add getLeader helper for monsters in a pack
2022-07-13 07:13:34 +02:00
Gleb Mazovetskiy
33ac2cca8e
♻️ Make Monster counters size_t
2022-07-12 03:04:53 +01:00
Anders Jenbo
38113c0ad8
Convert monster_goal in to a scoped enum
2022-07-11 01:46:24 +02:00
Anders Jenbo
2d21fc372e
Remove more miniwin code
2022-07-10 21:13:39 +02:00
Anders Jenbo
6a8fd04067
Use player by references ( #4938 )
2022-07-10 11:40:04 +02:00
Stephen C. Wills
4398c1e06a
Use absolute coordinates for temp position when north-walking ( #4937 )
2022-07-10 07:25:53 +02:00
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings (#4904 )
2022-07-07 12:51:24 +02:00
Mikołaj Piróg
15989609a8
Members' name changes and comments in Monster struct ( #4861 )
2022-07-06 10:21:22 +02:00
obligaron
3c571bf64b
Avoid overflow of tickCounterOfCurrentFrame ( #4893 )
...
* When MFLAG_ALLOW_SPECIAL is set, don't call processAnimation (avoid overflow of tickCounterOfCurrentFrame)
2022-07-05 19:23:32 +02:00
aetn23
bf568fe480
Remove assert to check if value is in bounds
2022-07-05 17:38:39 +02:00
Mikołaj Piróg
dda0b96ea5
Remove #defines in player.h and add constexpr where applicable ( #4896 )
...
* Change defines to constexpr int in player.h
* Add const or constexpr to player.h/cpp where applicable
* Update tests with changed names of player constatns
* remove unecessary variable
2022-07-05 17:25:23 +02:00
k-bar
26de74f4a2
AnimationInfo class correct style ( #4870 )
...
* AnimationInfo class correct case-style for private members
clang-tidy warnings:
readability-identifier-naming invalid case style for private member
* AnimationInfo class correct case-style for members
clang-tidy warnings:
readability-identifier-naming invalid case style for member
* AnimationInfo class correct case-style for methods
clang-tidy warnings:
readability-identifier-naming invalid case style for method
* AnimationInfo class use nodiscard
clang-tidy warnings:
modernize-use-nodiscard function should be marked [[nodiscard]]
2022-07-03 16:55:37 +02:00
Gleb Mazovetskiy
6949a6f418
Monster: Remove MType/MData pointers
...
These pointers are redundant, replaces them with methods.
2022-07-03 13:21:11 +01:00
obligaron
a6132a1aa8
Ensure that no overflow happens when loading (invalid) data
2022-07-03 10:20:42 +01:00
Andrew James
ace09d5f45
Address int-arithmetic-overflow in loadsave.cpp ( #4853 )
2022-07-02 02:48:18 +02:00
Mikołaj Piróg
7cab074aa5
Correct members' names in monster.h ( #4850 )
...
* Fix case in AnimStruct
* Rename CMonster members
2022-07-01 23:34:32 +02:00
Gleb Mazovetskiy
3178dd5158
Replace most uses of sprintf with fmt ( #4837 )
2022-07-01 17:02:56 +02:00
k-bar
c2432d23e8
Berserk light fix
2022-06-30 21:01:29 +02:00
Anders Jenbo
d82f2ebc9e
Pass players by reference instead of an index
2022-06-28 00:30:00 +02:00
Anders Jenbo
0d27761ac2
Make _oAnimFlag a boolean
2022-06-27 20:21:10 +02:00
obligaron
ceb08d783f
Introduce Player::plrIsOnSetLevel
2022-06-18 17:05:30 +02:00
obligaron
d0c14fe92f
Introduce Player::setlevel
2022-06-18 17:05:30 +02:00
obligaron
19749420b5
Introduce Player::isOnActiveLevel
2022-06-18 17:05:30 +02:00
obligaron
7afe7d2a70
Save Methods in loadsave gets MpqWriter passed
2022-06-16 09:43:34 +02:00
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
2022-06-14 12:46:36 +01:00
Anders Jenbo
1203514383
Clean up use of currlevel
2022-06-07 21:35:01 +02:00
staphen
a2fe3a981e
Fix issues with ears due to translation
2022-06-06 07:26:43 +02:00
Anders Jenbo
54cd839cf6
Clean up drlg tests
2022-06-05 16:43:06 +02:00
Andrew James
1047e408bd
Simplify logic of UpdateMissilePos using helpers from 4620 ( #4621 )
2022-05-31 06:58:47 +02:00
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
2022-05-31 05:35:52 +02:00
Anders Jenbo
0645d9b2a1
Correct missing hellfire level mapping in leveltype
...
Hellfire never added the 2 new dungion types, instead it makes
additional checks on currlevel. This is confusing and mess, so cleaned
it up.
2022-05-10 15:16:38 +02:00
ephphatha
64a2c41b2c
Set clang-tidy config for MethodCase option
...
Previously this was falling back to FunctionCase, leading to inconsistent casing of class methods throughout the codebase. Applied to Item as an example.
2022-04-20 13:50:57 +02:00
DakkJaniels
dad46e1905
Item special effect enum ( #4129 )
2022-04-19 15:44:46 +02:00
ephphatha
7e7798fd2b
Add function to mark an item as empty
2022-04-18 19:25:55 +02:00
Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00