Commit graph

517 commits

Author SHA1 Message Date
Jmgr
c33182d6de Modernize deprecated headers 2021-04-25 02:50:31 +02:00
Jmgr
1b7e0d2cb3 Migrate existing log entries 2021-04-25 02:39:42 +02:00
Anders Jenbo
f77c52941a ♻️Make GetDirection take Points instead of ints 2021-04-25 02:25:52 +02:00
Anders Jenbo
2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo
efbe8a8338 ♻️ add possition points to monsters 2021-04-24 20:29:52 +02:00
Anders Jenbo
7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
Anders Jenbo
275404029e ♻️Cleanup player temp variables 2021-04-24 17:07:07 +02:00
obligaron
b1ee8c00b3 change AnimationDistributionFlags to enum class and rename to AnimationDistributionParams 2021-04-24 10:00:07 +02:00
obligaron
ab28255c68 temporary: use normal animation logic for walk 2021-04-24 10:00:07 +02:00
obligaron
93d487d3ed move comments to own line 2021-04-24 10:00:07 +02:00
obligaron
1930b0f1a6 rename enum AnimationFlags to AnimationDistributionFlags 2021-04-24 10:00:07 +02:00
obligaron
2f2e48abf5 check the result of &-operator for enum flag explicitly 2021-04-24 10:00:07 +02:00
obligaron
e0aec0b153 Rename _pAnimRelevantAnimationFramesForDistributen to _pAnimRelevantAnimationFramesForDistributing 2021-04-24 10:00:07 +02:00
obligaron
9834e4849b player.cpp: Rename absolutAnimationFrame to absoluteAnimationFrame 2021-04-24 10:00:07 +02:00
obligaron
fa6bf63dd3 Introduce AnimationFlags::SkipsDelayOfLastFrame and handle it 2021-04-24 10:00:07 +02:00
obligaron
4fc7a4c8aa Change Logic from Frames to GameTicks 2021-04-24 10:00:07 +02:00
obligaron
c9b506d334 Introduce AnimationFlags::ProcessAnimationPending and stop passing skipped Frames cause of ProcessAnimationPending as skipped Frames 2021-04-24 10:00:07 +02:00
obligaron
f908f47751 Move the original logic to NewPlrAnim and introduce _pAnimGameTickModifier and _pAnimRelevantAnimationFramesForDistributen 2021-04-24 10:00:07 +02:00
Anders Jenbo
e4cfad3196 ♻️Use points instead of individual fileds for player structure 2021-04-24 04:46:08 +02:00
Gleb Mazovetskiy
00bc7cb302 🧹 GetPlrGFXSize: unordered_set -> direct test
The use of `unordered_set` here is a bit gratuitous and doesn't do much
for readability.
2021-04-24 03:04:35 +02:00
qndel
118d480be7
🐛 Fix loading monk block animations 2021-04-24 01:26:00 +02:00
Anders Jenbo
d99522b9a5 ♻️ Clean up direction related code 2021-04-23 17:39:18 +02:00
Anders Jenbo
a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Anders Jenbo
1e3ed903be 🎨 strip redundant else 2021-04-22 00:39:48 +02:00
Anders Jenbo
aa290b6f63 🎨 Add missing braces 2021-04-22 00:31:39 +02:00
Anders Jenbo
593c6a6f17 🎨 Drop unused param and rename random_ to GenerateRnd 2021-04-22 00:08:19 +02:00
Anders Jenbo
f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Jmgr
1d84156509 Simplify bitshift divisions/multiplications 2021-04-21 05:31:17 +02:00
Anders Jenbo
97d7171123 🔥 Get rid of _ptargx/y 2021-04-21 03:55:27 +02:00
qndel
ec74917cb4 class sounds cleanup 2021-04-20 23:35:16 +02:00
FluffyQuack
4f417d2fdc Fix to one desync related to player movement (queuing moving after attacking). 2021-04-20 19:55:17 +02:00
Anders Jenbo
a9874d65c1 ♻️Remove SDL types from player header 2021-04-20 19:39:38 +02:00
Anders Jenbo
373f28736f 🎨 Acceptable parts of modernize-* 2021-04-19 22:42:19 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo
c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Anders Jenbo
5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +02:00
Anders Jenbo
946ff5b0fa ♻️Performe static casts when load save game data 2021-04-18 23:27:21 +02:00
staphen
006fa39691 Use SetPlayerHitPoints() for minHP handling in ApplyPlrDamage(). 2021-04-18 21:12:16 +02:00
staphen
621ed481bd Join declaration and initialization of variables. 2021-04-18 21:12:16 +02:00
staphen
4faf09c2df Consolidate logic for Mana Shield and player damage. 2021-04-18 21:12:16 +02:00
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables (#1584)
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
2021-04-18 18:15:47 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
6e1a106a38 🚚 Move header we implement into the project 2021-04-16 01:04:54 +02:00
Anders Jenbo
f450d6a125 🚚 Move defines to there proper files 2021-04-16 01:04:54 +02:00
Juliano Leal Goncalves
cc5f2a8f49 🎨 Rename 'attribute_id' enum to 'CharacterAttribute'
Members were renamed as well for readability.
2021-04-13 03:02:14 +02:00
Juliano Leal Goncalves
f54cc5aa95 ♻️ Convert 'attribute_id' to a scoped enumeration 2021-04-13 03:02:14 +02:00
Juliano Leal Goncalves
8cf972e843 ♻️ Move 'HeroClass::ClassCount' to external tracking template
This eliminates the problem where the compiler complains we are not handling all enumeration values by moving the "hack" counting member into somewhere else external to the enum.
2021-04-12 20:55:33 +02:00
obligaron
9fbe139f64 cache ProgressToNextGameTick and update it only once before rendering 2021-04-12 20:44:29 +02:00
obligaron
c7b9ffec1f Decouple Animations from Gamelogi (Smooth Animations for skipped Frames).
NewPlrAnim: Use default arguments instead of overloads

StartPlrHit: Fix skippedAnimationFrames - Frames starts with 1

Add missing comment for StartPlrHit

Fix GotHit-Animation: Skipping Frames corrected and adjusted _pAnimGameTicksSinceSequenceStarted for animations that don't start with a additional tick.
Thanks @StephenCWills for the gothit skipping frame calculation logic :-)

Update StartWalk: calculated numSkippedFrames in own line.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
StartPlrHit: always initialize skippedAnimationFrames

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Update nthread_GetProgressToNextGameTick comment

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
fix spelling "lenght" instead of "length"

Update NewPlrAnim comment

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
GetFrameToUseForPlayerRendering: avoid one "else"
2021-04-12 20:44:29 +02:00
Juliano Leal Goncalves
28ad9d43c5 🎨 Rename 'plr_class' enum to 'HeroClass'
Members were renamed as well for readability.
2021-04-12 20:00:53 +02:00