Anders Jenbo
1703901c2d
Explicitly mark strings as not c-formatted
5 years ago
obligaron
551645060b
Fix item swapping and AnimationInfo::ChangeAnimationData
5 years ago
Anders Jenbo
a19e7b2a3b
Remove some more use of miniwin
5 years ago
obligaron
70db8456ba
Remove _pwtype and replace it with UsesRangedWeapon
5 years ago
obligaron
d1d61fcd0f
Convert anim_weapon_id and anim_armor_id to enum class
5 years ago
Anders Jenbo
9264ad4b89
Use IsTileNotSolid() in place of !nSolidTable[dPiece[][]]
5 years ago
FluffyQuack
ba60907853
Hold mouse button to keep attacking (Diablo 2-style) ( #2349 )
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
996cadf972
♻️ Unique powers cleanup
...
- Mark unused unique item powers as invalid
- Split to hit and value calculations from SaveItemPowers
5 years ago
Anders Jenbo
65d7b3c1eb
Use AdvanceRndSeed() when changing RNG with out use
5 years ago
Anders Jenbo
35ccc8eb1c
Apply clang-tidy to code
5 years ago
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
5 years ago
matheusgomes28
42e2c174ac
Refactored parameters of "StartItemPower(...)" and code around calls to it. ( #2345 )
...
Co-authored-by: Matheus Gomes <mgomes1@jaguarlandrover.com>
5 years ago
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
5 years ago
Anders Jenbo
9ebdb6db69
General clean up
5 years ago
Anders Jenbo
467b74dc06
Rename object globals
5 years ago
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
c8870dbd1f
Rename item globals
5 years ago
Anders Jenbo
07ad083fda
Rename monster globals
5 years ago
ephphatha
be23f6864b
Reorder int *= float operations that could be expressed using int fractions
...
This was triggering narrowing conversion warnings in msvc. I assume the compiler can optimise this into a float multiplication if it does turn out faster.
5 years ago
Anders Jenbo
bc59218d0d
More clang-tidy/Android Studio cleanups
5 years ago
Gleb Mazovetskiy
55464eec78
Fix `-Wmissing-braces`
...
Fixes warnings such as this one:
```
../../../../../../Source/engine/render/text_render.hpp:83:33: warning: suggest braces around initialization of subobject [-Wmissing-braces]
return DrawString(out, text, { position.x, position.y, out.w() - position.x, 0 }, flags, spacing, lineHeight, drawTextCursor);
^~~~~~~~~~~~~~~~~~~~~~
```
5 years ago
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
5 years ago
Anders Jenbo
ecea12fc15
Clang-tidy: ParameterCase
5 years ago
Anders Jenbo
ee2e7518c4
Clang-tidy: FunctionCase part 2
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
a350fb0b15
Clang-tidy: FunctionCase part 1
5 years ago
Anders Jenbo
4cd916a085
Clang-tidy: EnumConstantCase
5 years ago
Anders Jenbo
e426c38adb
Correct AddInitItems
5 years ago
Anders Jenbo
d9e0658643
Clang-tidy: basic naming
5 years ago
Anders Jenbo
b1d237c823
More init clean up ( #2262 )
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
5 years ago
obligaron
3ba4bac5e2
Harmonize DelayLen for Player and Monster (was 1-based on monseter (>= DelayLen) and 0-based on player (> DelayLen). Now both are 1-based (>= DelayLen)
5 years ago
Anders Jenbo
8a4d38dd74
Stabalize clang-tidy runs
5 years ago
Anders Jenbo
f167bd4dfb
Clang-tidy: llvm-include-order
5 years ago
Anders Jenbo
de4ced7e4f
Clang-tidy: readability-qualified-auto
5 years ago
Anders Jenbo
f4f8f22699
Clang-tidy: readability-redundant-control-flow
5 years ago
Anders Jenbo
bf221f4322
Clang-tidy: readability-simplify-boolean-expr
5 years ago
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
5 years ago
ephphatha
f4f6a8a51e
Refactor PlaySfxLoc to take a Point instead of x/y params
...
Because of the heavy usage of this function in objects.cpp and the mixed use of aliases and direct references to the active object in Operate*Door functions I've done some refactoring of those areas beyond what is strictly necessary. Hopefully this makes sense and is reasonable to include in this change.
5 years ago
Anders Jenbo
d8fa29c972
Clean up more implicit bool conversion
5 years ago
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
5 years ago
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
5 years ago
Anders Jenbo
625333dfb1
♻️ Clean up items
5 years ago
Andrew James
60a47caf1b
Refactor Draw* functions to use Rectangle and Point types
...
Added overload for DrawString taking a Point to avoid creating a rect for callers which only use position. This also documents the way DrawString operates when passed a clipping rectangle with a dimension of 0.
As part of this overload removed the logic for 0 width regions from DrawString. This does change the behaviour of the Rectangle version if called with a rect with width 0, all callers using that behaviour have been updated in this commit.
Using Rectangle/Size allowed simplifying the logic for certain calls where they could use DrawText alignment flags, previously this was manually aligning by calculating dimensions and offsetting the position. This also fixes #2169
Also includes a few instances where a temporary buffer was used to set the text to be drawn with unbounded sprintf calls, replaced those with snprintf as is recommended in modern C applications. Moving to C++ strings would be good in a future refactor.
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
qndel
92d1006134
Use std::move for premiumitems shift
5 years ago
Juliano Leal Goncalves
604b72bb12
Reword potion effect descriptions for consistency
5 years ago