Commit Graph
762 Commits
Author SHA1 Message Date
qndel 0ccdf940f7 fix bounds checks (#3237) 2021-10-24 17:20:04 +02:00
qndel 78c75aa7c7 update vision of other players 2021-10-24 16:19:20 +02:00
qndel d81de165d4 code cleanup (#3235) 2021-10-24 16:05:44 +02:00
staphen 2e9dd1defa Use unsigned char in CornerstoneSave() 2021-10-13 02:33:48 +02:00
staphen ab13fba13f Use Rune Bomb or Cathedral Map to open Hive or Crypt 2021-10-12 15:21:37 +02:00
qndel 91fd583fe6 Revert "fix loot" for 1.3.0 (#3064)
This reverts commit e268ff9afa963142455fbaba84d3ed222c9da9f0.
2021-10-09 10:45:35 +02:00
Anders Jenbo ba10fa3182 Correct name generation of staffs 2021-10-06 08:49:24 +02:00
Anders Jenbo ebc0ad94eb Clean up SetupAllItems initialization 2021-09-25 05:58:51 +02:00
qndel c44ae7b0d4 Faster and better debug unique drop
Drop unique debug command tweak
2021-09-24 16:03:19 +02:00
Gleb Mazovetskiy ec13c333a9 Refactor: Use item iterators for scroll checks
Refs #2586
2021-09-24 01:56:44 +01:00
Anders Jenbo 4f791948ff Fix missing switch cases 2021-09-23 16:55:13 +02:00
Anders Jenbo 0c5bdf5dbf 🐛 Reject items that would cause an OOB to 2021-09-23 10:20:54 +02:00
Anders Jenbo 671fdbd125 Implement contextural translation (pgettext)
Fixes #2369
Fixes #2790
2021-09-20 04:18:35 +02:00
Gleb Mazovetskiy 55b49bfea4 Simplify unique info window drawing
1. Use `BlitFrom` instead of a custom loop for drawing the divider line.
2. De-duplicate position calculation.
2021-09-19 15:56:37 +02:00
Anders Jenbo 7771a08d03 Translatable mainpanel 2021-09-19 07:21:52 +02:00
Juliano Leal Goncalves 379a27b64a ♻️ Convert 'ItemType' enum to enum class
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
Juliano Leal Goncalves e39b33971f ♻️ Leverage 'IsAnyOf' 2021-09-13 00:25:49 +02:00
Juliano Leal Goncalves 5a69380074 ♻️ Leverage 'ItemType' enum 2021-09-13 00:25:49 +02:00
Juliano Leal Goncalves 6323539fcc 🚚 Rename 'item_type' enum to 'ItemType' 2021-09-13 00:25:49 +02:00
ephphatha 956dcc7fc9 Add helper for selecting animation sprites from Direction
The use on PlayerAnimationData could be further simplified by adding a helper to PlayerStruct but that'd be introducing another changed file to the PR... Something for later.

The monster version is only used once thanks to the helpers added in previous commits. This was mainly to highlight the similarity between PlayerAnimationData and AnimStruct, AnimStruct could inherit/extend PlayerAnimationData without much trouble.
2021-09-12 02:27:47 +02:00
ephphathaandAnders Jenbo b12de6fe12 Use scoped enum for Direction
Identified and removed an instance of Direction being used as an argument for a bool parameter

Removed a single-use temporary variable being cast from sprite frame to direction to size_t

Co-authored-by: Anders Jenbo <[email protected]>

Fix alignment of WalkSettings array
2021-09-12 02:27:47 +02:00
Anders Jenbo b74feb01dc 🐛 Correctly check if item name will fit in the info panel 2021-09-12 01:37:28 +02:00
Anders Jenbo 7169882b1f ✨ Implement new font rendering 2021-09-12 01:37:28 +02:00
qndel 197d3edd1b fix loot 2021-09-07 01:33:46 +02:00
Juliano Leal Goncalves 4431e3a823 🚚 Rename 'UItemStruct' struct to 'UniqueItem' (#2806)
* 🚚 Rename 'UItemStruct' struct to 'UniqueItem'
* 🚚 Rename 'UniqueItemList' global array to 'UniqueItems'
New name is more concise and follows the standard of pluralizing the base name for collections.
2021-09-06 12:51:23 +02:00
qndel 927e773696 small debug cleanup 2021-09-02 21:58:49 +02:00
Juliano Leal Goncalves 6146b828e9 🚚 Rename 'MonsterData' global to 'MonstersData'
This avoids conflicts with the struct name as we'll be renaming that next.
2021-09-02 21:57:50 +02:00
Juliano Leal Goncalves 20db8d1a11 🚚 Rename 'MonsterStruct' to 'Monster' 2021-09-01 22:26:37 +02:00
qndel 3d17bfdc7d upgrade debug item drop generation 2021-09-01 08:05:22 +02:00
BC Ko 589abe65d1 documentation cleanup: items 2021-08-30 13:56:11 +02:00
Juliano Leal Goncalves 7841c4731e 🚚 Rename 'PkItemStruct' to 'ItemPack' 2021-08-30 13:40:08 +02:00
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