Yggdrasill
2df2c95839
Fix items.cpp:SortVendor() buffer overflow ( #7875 )
...
* Fix items.cpp:SortVendor() buffer overflow
A recent commit seems to have exposed a buffer overflow problem
in SortVendor(). This commit aims to fix that by not counting
the array members within the function, but passing it as an
argument instead.
* Rename nmemb to count in SortVendor()
* Subtract PinnedItemCount from item count
12 months ago
Yggdrasill
176819a072
Make RecreateItem() take whole dwBuff flag as argument ( #7870 )
1 year ago
Eric Robinson
f5d430fbf1
Stores - Unhardcode shop values
...
Use constexpr instead of #define, and unhardcode values used in towner stores.
1 year ago
Eric Robinson
56fc060c89
Stores - Rename Global Vars
1 year ago
staphen
c798253587
Use constexpr for length of item names
1 year ago
Eric Robinson
173c662723
Remove CalcPlrStaff()
1 year ago
staphen
2d27363228
Use padmapper input names for item descriptions
1 year ago
staphen
8f2154faca
Update gamepad scroll descriptions to match logic in plrctrls
1 year ago
staphen
ba773259cd
Fix gcc/MSVC compiler warnings
1 year ago
Gleb Mazovetskiy
f7be00cea6
`DrawUniqueInfo`: Word-wrap long lines
...
Pre-wraps the string at spaces, otherwise `DrawString` would hard wrap in the middle of words.
1 year ago
Gleb Mazovetskiy
ee16071761
Untangle pathfinding dependencies
...
1. Makes `path.cpp` concerned solely with the pathfinding algorithm.
2. Turns `path_test` into a standalone test.
1 year ago
Gleb Mazovetskiy
3bb1d685af
Extract current input mode into its own library
...
Removes a transitive dependency on the entire plrctrl from options.
1 year ago
Gleb Mazovetskiy
d94bc424df
`sgOptions` -> `GetOptions()`
...
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638 , which will statically initialize change
handlers after the Options object has been initialized.
1 year ago
staphen
7a6a6a6c32
Don't send spell level in spell casting network message
1 year ago
Gleb Mazovetskiy
d7647d6c63
More dependency untangling
...
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
1 year ago
Gleb Mazovetskiy
a7651f15d9
Extract `HeadlessMode` from `diablo.h`
...
Untangles some dependencies.
Many places that use `HeadlessMode` do not need all of `diablo.h`.
1 year ago
Gleb Mazovetskiy
c31836eab8
Split up `engine.{h,cpp}`
...
Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Eric Robinson
cfac786daf
Make invalid items unusable ( #7506 )
1 year ago
Andrew James
1412e25eff
Allow for item drop rates up to 255 ( #7533 )
1 year ago
staphen
bfd289db88
Clear unique item flags in LoadGameLevel()
1 year ago
Andrew James
c7abf2f778
Extract logic from CheckInvCut/AutoPlaceItemInInventory ( #7494 )
...
* Remove unnecessary namespace
* Extract FindSlotUnderCursor
* Split logic for finding a space in the inventory to dedicated functions
1 year ago
Eric Robinson
baaa906583
Remove CheckCheatStats() ( #7461 )
1 year ago
Eric Robinson
0fd4a7b348
Fix Life/Mana bugs ( #5777 )
1 year ago
Eric Robinson
793eb7a835
Fix 0 charge staff in speed spell ( #6502 )
...
* Fix 0 charge staff in speed spell
1 year ago
Eric Robinson
e90855b3c4
Rename stores.cpp global variables ( #7425 )
2 years ago
Eric Robinson
6396af1ff5
Cleanup panel code (Part 2) ( #7421 )
2 years ago
Eric Robinson
d8e58b2547
Fix Elemental Arrows vs Objects ( #6507 )
2 years ago
Eric Robinson
cabc85b660
Fix Magic Rock animations ( #7365 )
2 years ago
Anders Jenbo
e949f41d83
Clean up selection type
2 years ago
obligaron
138f937519
Fix infinite loop in unique item randomization
2 years ago
obligaron
ca16398147
Move DebugSpawn(Unique)Item to lua dev moduls and make necessary functions public
2 years ago
qndel
24f108f193
fix many typos ( #7322 )
2 years ago
Anders Jenbo
28b7ae6b03
Allow for more flexible translations of "Book of {SpellName}"
2 years ago
Gleb Mazovetskiy
177ba45f8d
Controller buttons: Make most of the code private
...
The compiler constant-folds the lookups in `printItemMiscGamepad`
code to the same asm as the manual version.
2 years ago
Gleb Mazovetskiy
742f5fd5f7
Fix a couple of compilation warnings
2 years ago
Eric Robinson
a30f7c0b8e
Randomize Unique Item Generation (Reverse compatible) ( #7060 )
...
Co-authored-by: staphen <staphen@gmail.com>
2 years ago
Eric Robinson
9f6055a4a1
Clean up CalcPlrItemVals() ( #4052 )
2 years ago
Eric Robinson
f67fbfeaca
Conditionally set cursor graphic for unique items ( #7067 )
2 years ago
Eric Robinson
ebe353f105
Revise how unique cursor graphic is obtained ( #7066 )
2 years ago
Tully
ba529feb3e
Fix infravision monsters flickering when manipulating inventory ( #6687 )
2 years ago
PaintingTs
00c8882c73
Unique items InfoBox now visible at 800X600 and lower resolutions. Stashed unique items show InfoBox near the Stash Panel
2 years ago
staphen
bc4f43490f
Load objcurs when creating starting items
2 years ago
obligaron
2da492d203
Change some functions to Player reference
2 years ago
Gleb Mazovetskiy
f566359e4f
Migrate item data to txtdata/
2 years ago
Gleb Mazovetskiy
a2b94cc03c
Lua: Migrate and organize the rest of debug cmds
...
Fully migrates debug commands to Lua and organizes them into logical
groups.
The CLI `+` syntax now runs Lua, e.g.:
```bash
build/devilutionx '+dev.player.trn.plr("infra")'
```
Chat hotkeys run Lua code if they start with `/lua`, e.g.:
```ini
[NetMsg]
QuickMessage1=/lua message(dev.player.info())
```
2 years ago
Gleb Mazovetskiy
c5a5dc9f5c
Fix a few MSVC warnings
2 years ago
Anders Jenbo
bb2e189327
Convert _sfx_id in to class enum
2 years ago
Gleb Mazovetskiy
17d5f05ada
Fix some compilation warnings
2 years ago
Gleb Mazovetskiy
e5881688f4
`text_render`: Replace optional args with struct
...
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.
With a struct, there is no need to specify the default values
for the args in between.
2 years ago