Commit graph

604 commits

Author SHA1 Message Date
Anders Jenbo
e82d103465 🐛 Fix bounds checks in monster code 2021-07-15 19:48:55 +02:00
Anders Jenbo
a089692850 💄 Introduce MonsterRelation enum 2021-07-15 19:48:55 +02:00
Anders Jenbo
77b72da276 ♻️Use monster by reference when possible 2021-07-14 20:22:35 -07:00
FluffyQuack
c4a96bc829 👑 Fix to bug that made spawned monsters overwrite alive ones (cause was monsters not being properly deleted) 2021-07-13 12:52:06 -07:00
Anders Jenbo
a709790c82 Document a few functions 2021-07-12 19:41:55 -07:00
Anders Jenbo
43aec8cecc Clean up AiDelay 2021-07-12 19:41:55 -07:00
Anders Jenbo
684d6943aa Merge MegaAi and MAI_RR2 2021-07-12 19:41:55 -07:00
Anders Jenbo
c30ff97885 Use Point in UpdateEnemy 2021-07-12 19:41:55 -07:00
Anders Jenbo
ef6275caac Clean up private function names 2021-07-12 17:59:22 -07:00
Anders Jenbo
4bf4e42230 Move local symbols to anonymous namespace 2021-07-12 17:59:22 -07:00
Anders Jenbo
5d99cb4925 Fix MAI_Warlord direction 2021-07-12 13:11:12 -07:00
obligaron
3e57d0d69b Introduce MonsterGraphic enum class 2021-07-12 07:40:38 -07:00
obligaron
5f7a2803fc Introduce CMonster::GetAnimData 2021-07-12 07:40:38 -07:00
obligaron
481fc04235 InitMonster: Get AnimData only once 2021-07-12 07:40:38 -07:00
obligaron
1fcbad0810 MAI_Ranged: Use CheckStandAnimationIsLoaded instead of directly changing animation data 2021-07-12 07:40:38 -07:00
obligaron
e5bf44a75f M_DoWalk: Simplify check if we reached new tile 2021-07-12 07:40:38 -07:00
obligaron
dc2d5e2b04 Remove unnecessary assignments to _mdir 2021-07-12 07:40:38 -07:00
obligaron
a94da6b4a3 NewMonsterAnim gets monster references and monster graphic instead of index, and AnimStruct Pointer 2021-07-12 07:40:38 -07:00
obligaron
02d2754a68 MAI Garbud/Zhar/SnotSpill/Lazurus/Lachdanan/Warlord
Change _mdir in CheckStandAnimationIsLoaded (and only in stand).
2021-07-12 02:49:06 -07:00
obligaron
95937021fe Fallen fear: Use _mgoalvar2 for new direction instead of _mdir 2021-07-11 16:12:59 -07:00
obligaron
508132e014 ADL: Handle skipped Frames for Diablo Got-Hit Animation 2021-07-11 16:08:34 -07:00
obligaron
e2ba79d3d1 Introduce StartMonsterGotHit 2021-07-11 16:08:34 -07:00
obligaron
b4966f22e1 Move NewMonsterAnim to anonymous namespace 2021-07-11 16:08:34 -07:00
Anders Jenbo
65d7b3c1eb Use AdvanceRndSeed() when changing RNG with out use 2021-07-10 17:30:15 -07:00
Anders Jenbo
903d4bd2e1 Scope all for loops
This caused 7 of the loops to be rewriteen using range by clang-tidy
2021-07-08 08:14:03 -07:00
Anders Jenbo
9ebdb6db69 General clean up 2021-07-08 03:30:25 -07:00
Anders Jenbo
467b74dc06 Rename object globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
9ae908f947 Rename missile globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
9b8bf92575 Rename quest globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
96bf75b502 Rename player globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
dce78dde62 Rename lighting globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
07ad083fda Rename monster globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
56d3b5d710 clang-tidy/Android Stuidio cleanups 5 2021-07-05 13:14:47 -07:00
ephphatha
51d05a3523 Reorder monster damage calculations to avoid warnings
This was giving type conversion warnings for the forced int > double > int conversion. The int + int operation in the middle was also flagged as it gets upcast during the multiplication (despite the values always being well within the range of an int) so using long constants there to avoid it.
2021-07-05 08:52:05 -07:00
obligaron
e1e92ad777 Fix PlaceUniques calculates wrong monster type 2021-07-05 08:38:32 -07:00
Anders Jenbo
bc0d1f7ac0 clang-tidy/Android Stuidio cleanups 3 2021-07-04 16:09:32 -07:00
Anders Jenbo
bc59218d0d More clang-tidy/Android Studio cleanups 2021-07-04 19:34:37 +02:00
Anders Jenbo
a7c7fa0030 Fully apply clang-tidy/format to all files 2021-07-03 16:41:43 -07:00
Anders Jenbo
ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -07:00
Anders Jenbo
ee2e7518c4 Clang-tidy: FunctionCase part 2 2021-07-03 12:36:04 -07:00
Anders Jenbo
d7a86330c6 Correct assertions in ProcessMonsters 2021-07-03 03:53:32 +02:00
Anders Jenbo
b71b0149a3 Clang-tidy: ConstexprVariableCase 2021-07-03 03:09:43 +02:00
Anders Jenbo
e285cacce5 Fix debug builds 2021-07-03 02:51:44 +02:00
Anders Jenbo
c63a420e12 Clang-tidy: apply base naming to merged src 2021-07-03 02:38:47 +02:00
Anders Jenbo
9ffafdfcc6 Clean up var init in monster.cpp 2021-07-02 17:09:38 -07:00
Anders Jenbo
7e737cfa96 Merge remote-tracking branch 'refs/remotes/devilution/master' 2021-07-03 01:44:45 +02:00
Anders Jenbo
129342d07a Clang-tidy: GlobalConstantCase 2021-07-02 22:56:56 +02:00
Anders Jenbo
d9e0658643 Clang-tidy: basic naming 2021-07-02 22:55:01 +02:00
Anders Jenbo
3a1a44de34 Fix and clean up AddDoppelganger 2021-07-02 13:07:47 -07:00
qndel
373f1db22e
If cleanup + bugfixes (#2273) 2021-07-01 18:32:25 +02:00