Commit Graph
731 Commits
Author SHA1 Message Date
Juliano Leal Goncalves bb2dfdfb73 🚚 Rename 'ItemStruct' to 'Item' 2021-08-30 13:40:08 +02:00
Anders Jenbo bee8388c20 Fix inaccurate gameplay with NOSOUND 2021-08-30 10:57:59 +02:00
Juliano Leal Goncalves 01823e1324 ♻️ Replace 'cursmx' and 'cursmy' globals with single 'cursPosition' 2021-08-30 06:45:51 +02:00
Juliano Leal Goncalves bbf529c65a 🚚 Rename 'PlayerStruct' to 'Player' 2021-08-30 06:44:18 +02:00
Anders Jenbo 4044fadeb5 Clean up some players references 2021-08-30 03:26:17 +02:00
BC Ko 4df798808e 2435 refactor global variable Items part 2 (#2673) 2021-08-26 08:06:48 +02:00
qndel d8a0211da8 Remove redundant condition 2021-08-25 19:32:10 +02:00
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.
2021-08-24 11:08:24 +00:00
qndel 6fca66ad8a debug commands: dropitem/dropunique 2021-08-21 20:42:07 +02:00
qndel 0530fcb969 apply enums to mTreasure 2021-08-21 19:23:11 +02:00
BC Ko 1b91194f0f refactor Items[ii] (#2655) 2021-08-21 03:30:39 +02:00
Anders Jenbo f931778b90 Remove debug_mode_key_w
Replaced by debug commands
2021-08-19 20:36:12 +02:00
BC Ko 40c804c0ba Replace QuestStatus() with IsAvailable() in QuestStruct 2021-08-19 02:12:20 +02:00
qndel 230c9a8d4e Fix shop items morphing
Reverts ab0478319c
Except for the fix to SpawnQuestItem
2021-08-15 15:39:05 +02:00
qndel 644d9dfc5c fix armor piercing affix range (#2535) 2021-08-08 11:53:54 +00:00
Anders Jenbo 8df8b940c4 Handle some clang-tidy issues 2021-08-07 16:30:14 +02:00
Aaron Sun 3ee90ca629 Add options for sub-panel alignment 2021-08-07 16:09:32 +02:00
Anders Jenbo 90960f0c14 Remove dead code 2021-08-07 00:36:38 +02:00
4aron5un 4c8210df21 Center the sub-panels (Quest, Character, Spell and Inventory) (#2498) 2021-08-05 21:27:07 +02:00
Anders Jenbo d523fc1e81 Cleanups 2021-08-02 10:12:40 +02:00
ephphatha 0575716eac Rename UiFlags members to group related options 2021-07-31 20:22:40 +02:00
ephphatha 4ad53232a0 Convert the UiFlags enum to a scoped enum type
Replace operator&& with named function
2021-07-31 20:22:40 +02:00
Anders Jenbo 1703901c2d Explicitly mark strings as not c-formatted 2021-07-31 17:05:21 +02:00
obligaron 551645060b Fix item swapping and AnimationInfo::ChangeAnimationData 2021-07-26 22:46:16 +02:00
Anders Jenbo a19e7b2a3b Remove some more use of miniwin 2021-07-17 23:54:13 +02:00
obligaron 70db8456ba Remove _pwtype and replace it with UsesRangedWeapon 2021-07-17 17:38:28 +02:00
obligaron d1d61fcd0f Convert anim_weapon_id and anim_armor_id to enum class 2021-07-17 17:38:28 +02:00
Anders Jenbo 9264ad4b89 Use IsTileNotSolid() in place of !nSolidTable[dPiece[][]] 2021-07-17 03:57:26 +02:00
FluffyQuack ba60907853 Hold mouse button to keep attacking (Diablo 2-style) (#2349) 2021-07-16 15:01:01 +01:00
Anders Jenbo 77b72da276 ♻️Use monster by reference when possible 2021-07-14 20:22:35 -07:00
Anders Jenbo 996cadf972 ♻️Unique powers cleanup
- Mark unused unique item powers as invalid
- Split to hit and value calculations from SaveItemPowers
2021-07-11 15:07:24 -07:00
Anders Jenbo 65d7b3c1eb Use AdvanceRndSeed() when changing RNG with out use 2021-07-10 17:30:15 -07:00
Anders Jenbo 35ccc8eb1c Apply clang-tidy to code 2021-07-10 17:30:15 -07:00
Anders Jenbo 74b57558c9 🚚 Move local code to anonymous namespace 2021-07-10 17:30:15 -07:00
matheusgomes28andMatheus Gomes 42e2c174ac Refactored parameters of "StartItemPower(...)" and code around calls to it. (#2345)
Co-authored-by: Matheus Gomes <[email protected]>
2021-07-10 18:04:42 +02: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 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 c8870dbd1f Rename item globals 2021-07-08 02:01:14 -07:00
Anders Jenbo 07ad083fda Rename monster globals 2021-07-08 02:01:14 -07:00
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.
2021-07-05 08:52:05 -07:00
Anders Jenbo bc59218d0d More clang-tidy/Android Studio cleanups 2021-07-04 19:34:37 +02:00
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);
                                       ^~~~~~~~~~~~~~~~~~~~~~
```
2021-07-03 19:08:45 -07: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
Gleb Mazovetskiy cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Anders Jenbo a350fb0b15 Clang-tidy: FunctionCase part 1 2021-07-03 03:45:33 +02:00