BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
5 years ago
qndel
d8a0211da8
Remove redundant condition
5 years ago
Robin
f7f9786658
items: add BUGFIX, reset item get records when resetting items ( #2691 )
...
* items: add BUGFIX, reset item get records when resetting items
The item get record array tracks items being recently looted in an
effort to prevent the same item from being looted more than once.
Prior to this commit, the item get record array (and corresponding
item get record array length) variables were not cleared when
creating a new game. Therefore, the item get record array of a
previous game could remain in between games and prevent an item
from being looted (if it was looted in a previous), even if it was
never looted in the current game. In practice this almost never
shows up, since each item get record is valid for a total of 6
seconds before being cleared. So, you would either have to save
a game, quickly loot an item, when load the game and try to loot
the same item before 6 seconds pass. OR, you could use the demo
replay functionality to run test cases, and speed up execution to
run e.g. 10'000'000 logic ticks per second. Both would exhibit the
bug and prevent the item from being looted.
This commit fixes such issues by explicitly clearing the item get
record array and item get record array length variables whenever
items are initialized.
5 years ago
qndel
6fca66ad8a
debug commands: dropitem/dropunique
5 years ago
qndel
0530fcb969
apply enums to mTreasure
5 years ago
BC Ko
1b91194f0f
refactor Items[ii] ( #2655 )
5 years ago
Anders Jenbo
f931778b90
Remove debug_mode_key_w
...
Replaced by debug commands
5 years ago
BC Ko
40c804c0ba
Replace QuestStatus() with IsAvailable() in QuestStruct
5 years ago
qndel
230c9a8d4e
Fix shop items morphing
...
Reverts ab0478319c
Except for the fix to SpawnQuestItem
5 years ago
qndel
644d9dfc5c
fix armor piercing affix range ( #2535 )
5 years ago
Anders Jenbo
8df8b940c4
Handle some clang-tidy issues
5 years ago
Aaron Sun
3ee90ca629
Add options for sub-panel alignment
5 years ago
Anders Jenbo
90960f0c14
Remove dead code
5 years ago
4aron5un
4c8210df21
Center the sub-panels (Quest, Character, Spell and Inventory) ( #2498 )
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
5 years ago
ephphatha
0575716eac
Rename UiFlags members to group related options
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
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