Commit Graph
784 Commits
Author SHA1 Message Date
Anders Jenbo c2515f4724 Fix number of witch items for Diablo, clean up store spawn code 2021-11-25 13:02:38 +01:00
Gleb Mazovetskiy c57644970f Move UiFlags and UiPanels into their own files
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
2021-11-25 12:22:27 +01:00
Andrew James 4a940b1b07 Remove uses of Items[] as a temporary for other Item variables (#2924) 2021-11-25 09:34:13 +01:00
obligaron 43841477bc Add OptionEntry Test Bard 2021-11-24 09:31:39 +01:00
ephphatha b8b220311a Remove AvailableItems, no longer required 2021-11-23 19:08:41 +01:00
ephphatha 18658f6a42 Remove duplicate argument to DeleteItem 2021-11-23 19:08:41 +01:00
ephphatha f60cc3bfd9 Update calls to DeleteItem to use ActiveItems inline
This highlights how all (except one) call sites duplicate the i argument. With the exception of the use in msg.cpp this can be treated as a offset into activeItems and doesn't care about the real index.
2021-11-23 19:08:41 +01:00
ephphatha 55a52b82c2 Use unsigned types for Items array indexes consistently
Actual type used varied based on context, this addresses some type conversion warnings.
2021-11-23 19:08:41 +01:00
ephphatha 71e39dda6f Extract common logic for loading items from a save
This was duplicated for loading a save from the menu and transitioning to a new level
2021-11-23 19:08:41 +01:00
qndel 30a28fd21e fix displaying unique stats 2021-11-22 18:15:20 +01:00
Anders Jenbo 799f1763af Performce UTF8 aware limited string copies 2021-11-22 03:28:51 +01:00
Anders Jenbo 9d4a5f4890 Clean up item name generation 2021-11-22 03:28:51 +01:00
obligaron 677303cba9 Reduce use of view globals in game menu 2021-11-20 21:57:32 +01:00
Anders Jenbo 69b4a64a8f Fix OOB in ItemSpaceOk
Fixes #3557
2021-11-20 21:17:19 +01:00
qndel 18c0b1858f use DUR_INDESTRUCTIBLE (#3468) 2021-11-10 10:41:17 +01:00
Anders Jenbo 56170b3372 Clean up id normalization 2021-11-07 23:15:10 +01:00
ephphatha 335b0b9349 Use crawl table based search for item checks
fixes #3207
2021-11-07 20:13:31 +01:00
Andrew James 796e2813cf Use scoped enums for DungeonFlags/BFLAG (#3135) 2021-11-07 03:11:16 +01:00
Gleb Mazovetskiy 64a88343e8 Refactor: Use item iterators in 7 more places 2021-10-31 13:28:08 +00:00
Anders Jenbo 2d986430be Allow for slightly better item name generation 2021-10-28 22:02:57 +02:00
Anders Jenbo e9bc05063c [translation] Allow reordering of prefix 2021-10-28 01:43:50 +02:00
Anders Jenbo bff9140995 Expand buffers to handle Bulgarian translation 2021-10-26 17:57:46 +02:00
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