ephphatha
ea3ecbd619
Use _item_indexes type where appropriate
2022-10-11 18:51:13 +02:00
ephphatha
236b672687
Move increment of monster drop index to caller
...
This allows the caller which combines unrelated values into a single return value to take ownership of the transformation.
2022-10-11 18:51:13 +02:00
ephphatha
3e8715a3fd
Remove pointless increment/decrement of indexes returned by RndVendorItem
2022-10-11 18:51:13 +02:00
ephphatha
fc2a158a8f
Tidy up code dealing with temporary arrays
2022-10-11 18:51:13 +02:00
ephphatha
6c32945571
Use _item_indexes enum values instead of magic numbers
2022-10-11 18:51:13 +02:00
Gleb Mazovetskiy
ec12d7ce44
Player: Optimize to save 40 bytes
2022-10-11 10:17:01 +01:00
Gleb Mazovetskiy
6150973c1b
Clean up gamepad icons code
...
1. Correctly defined button strings.
2. Clean up the printing code.
3. Use translatable strings for the generic gamepad type.
2022-10-11 02:04:58 +01:00
Nicholas Calaway
eb45857422
Gamepad icons ( #5357 )
2022-10-10 18:30:58 +02:00
obligaron
c80fcf42c8
Fix infravision lasts forever ( #5404 )
2022-10-09 19:55:41 +02:00
DakkJaniels
4015dc186a
Prevent oil damage wrap around
...
per discussion in #development on 30/Sep/2022 (could hypothetically use gloomy shrine to subtract 1 max damage and eventually exceed max value for damage)
2022-09-30 22:57:14 +02:00
Trihedraf
895ae95ef9
Fix Activate to use showing on all items ( #5379 )
...
* Revert "Fix activate to use showing up on all items"
This reverts commit 597030d250 .
* Fix Activate to use showing on all items
2022-09-27 06:12:05 +02:00
burningserenity
597030d250
Fix activate to use showing up on all items
2022-09-27 03:19:01 +02:00
Mikołaj Piróg
5e340d3261
Replace level member with a member function in monster ( #5336 )
2022-09-17 11:39:44 +02:00
staphen
73028ec04a
Define network struct for ears
2022-09-08 06:11:36 +02:00
obligaron
a2ec22667f
Use AnimationInfo::isLastFrame in more places
2022-09-04 18:00:16 +02:00
obligaron
c1abeeac5a
Use getAnimationFramesAndTicksPerFrame when swapping gear
2022-09-04 17:58:18 +02:00
Anders Jenbo
f8dca40427
Merge branch 'master' of https://github.com/diasurgical/devilution
2022-08-27 02:41:28 +02:00
obligaron
b3aa08589b
Don't use MyPlayer in UnPackItem and dependend methods
2022-08-26 18:18:40 +02:00
Anders Jenbo
872456ae5d
Use size_t for a select few pnum variables
2022-08-26 13:22:04 +09:00
Gleb Mazovetskiy
188dc79f6e
Make Players a vector
2022-08-26 13:22:04 +09:00
obligaron
034eacda98
PrintItemMisc: Fix staffs and flash scrolls
2022-08-22 16:52:37 +02:00
Gleb Mazovetskiy
6327e713e0
Lowercase all file paths
...
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).
This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
2022-08-20 23:49:23 +01:00
Nicholas Calaway
cf33230293
#3380 Use appropriate terms for mouse/gamepad/touch #5234 ( #5235 )
2022-08-17 00:36:58 +02:00
Vladimir Olteanu
58ae9169f1
Item effect cleanup ( #5229 )
2022-08-11 01:00:38 +02:00
Gleb Mazovetskiy
a6ab8df2a6
Make the debug drop command work in town
2022-08-08 01:47:51 +02:00
Robin Eklind
aa2ab57539
items: add BUGFIX for SpawnItem, uninitialized use of onlygood
2022-08-06 00:57:25 +02:00
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
2022-08-03 02:38:55 +02:00
obligaron
6804221199
Store scroll/rune location in SpellCastInfo.spellFrom and remove the scroll/rune only after the spell is casted
2022-08-02 03:05:46 +02:00
obligaron
1cfd1ca99d
Fix double casting bug - use separated info for casted and queued spells
2022-08-02 03:05:46 +02:00
Anders Jenbo
3250472789
Clean up player references
2022-07-31 06:19:20 +02:00
Anders Jenbo
e83c55d444
Clean up object references
2022-07-31 06:19:20 +02:00
qndel
ed8964907a
fix jester's affix description ( #5120 )
...
* fix jester's affix description
2022-07-25 19:03:54 +02:00
Gleb Mazovetskiy
8ca71272b8
Load all CEL as CL2
...
Convert CEL files to CL2 at load time. CL2 format is more efficient and is about as fast to render.
CEL vs CL2 sizes, on dLvl 5: https://gist.github.com/glebm/9bbdd76962abcd4fd2405ecd3379af97
Memory:
* Peak memory (while loading): -300 KiB
* Memory in-game (dLvl5): -700 KiB
* RG99 binary size: -15 KiB (1333096 -> 1317192)
Performance on rg99:
* On average, -1 FPS in town.
* Same FPS in dungeon (20 FPS on dLvl 1).
2022-07-19 10:59:35 +02:00
Vladimir Olteanu
75ea31e89c
Remove unused misc items
2022-07-16 02:35:22 +02:00
Mikołaj Piróg
262fa9ac2d
Rename MonsterData members ( #5000 )
2022-07-15 16:20:13 +02:00
Anders Jenbo
ac2bf9aaac
Limit what gets called in headless mode
2022-07-13 18:54:36 +02:00
obligaron
0d00d75cd3
Items: Handle if CelSprite is not present
2022-07-13 18:54:36 +02:00
ephphatha
019b52c247
Remove temporary variables in SpawnRock
2022-07-13 11:44:07 +02:00
ephphatha
1337ff6ea2
Add check if a monster potentially has leashed minions
2022-07-13 07:13:34 +02:00
Anders Jenbo
2d21fc372e
Remove more miniwin code
2022-07-10 21:13:39 +02:00
Anders Jenbo
6a8fd04067
Use player by references ( #4938 )
2022-07-10 11:40:04 +02:00
Gleb Mazovetskiy
197e1180b2
Add StrCat and StrAppend
...
Adds simple string / integer concatenation functions.
Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.
`StrCat` is an easier-to-read alternative to such uses of `fmt`.
2022-07-10 06:14:58 +02:00
ephphatha
420a248e0c
Use FlipCoin for most uses of GenerateRnd with variable frequency
2022-07-10 02:37:33 +02:00
ephphatha
7c54066f31
Use PickRandomlyAmong when choosing between two options
2022-07-10 02:37:33 +02:00
ephphatha
bc0a058350
Invert FlipCoin
2022-07-10 02:37:33 +02:00
burningserenity
b5378f74d5
Apply formatting
2022-07-09 19:51:55 +02:00
burningserenity
69e0c51d8c
Another approach
2022-07-09 19:51:55 +02:00
Anders Jenbo
bd7d5a0143
Deduplicate using spells
2022-07-09 05:25:33 +02:00
staphen
cab75ded6b
Check both SPL_NULL and SPL_INVALID to determine spell validity
2022-07-09 04:04:22 +02:00
Cesar Canassa
bb3fb36ddc
✨ Introduces FlipCoin() (#4908 )
2022-07-07 20:57:03 +02:00