Anders Jenbo
56915974d6
Minimize passing of player indexes
4 years ago
Cesar Canassa
aa6ea3907e
♻️ Adds Missile::SourcePlayer and Missile::SourceMonster ( #4999 )
4 years ago
Anders Jenbo
d1189388f5
Use user by reference
4 years ago
Gleb Mazovetskiy
70364013b0
Fix fmt v9 deprecation warnings
...
Version 9 of libfmt deprecates printing `enum` without casting it to an
integral type explicitly (consistent with `enum class`).
4 years ago
Gleb Mazovetskiy
f460405818
Fix warnings
...
Note that in test/utf8_test.cpp, the first comparison was redundant.
For a signed char, this iterates from -128 to -1, unsigned from 0 to 128.
4 years ago
Anders Jenbo
ac2bf9aaac
Limit what gets called in headless mode
4 years ago
ephphatha
073b62549c
Cleanup AddTrap
4 years ago
ephphatha
16b8530375
Object reference in AddObjectLight
4 years ago
ephphatha
90c8f41e52
Object reference in AddChest
4 years ago
ephphatha
1337ff6ea2
Add check if a monster potentially has leashed minions
4 years ago
Gleb Mazovetskiy
ae6a3dbe5e
Add missing <ctime> includes for `std::tm`
4 years ago
Anders Jenbo
38113c0ad8
Convert monster_goal in to a scoped enum
4 years ago
Anders Jenbo
6a8fd04067
Use player by references ( #4938 )
4 years ago
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`.
4 years ago
ephphatha
420a248e0c
Use FlipCoin for most uses of GenerateRnd with variable frequency
4 years ago
ephphatha
bc0a058350
Invert FlipCoin
4 years ago
Anders Jenbo
ce4595b440
Split Crypt from Cathedral
4 years ago
Cesar Canassa
bb3fb36ddc
✨ Introduces FlipCoin() ( #4908 )
4 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
Gleb Mazovetskiy
d07ac14440
Handle nullptr localtime
...
`localtime` can return `nullptr` on some platforms (e.g. NXDK)
Improve portability by handling the `nullptr` result.
4 years ago
Mikołaj Piróg
15989609a8
Members' name changes and comments in Monster struct ( #4861 )
4 years ago
Cesar Canassa
de971c6a8b
♻️ Refactor AddMonster to return a monster pointer ( #4894 )
4 years ago
Mikołaj Piróg
dda0b96ea5
Remove #defines in player.h and add constexpr where applicable ( #4896 )
...
* Change defines to constexpr int in player.h
* Add const or constexpr to player.h/cpp where applicable
* Update tests with changed names of player constatns
* remove unecessary variable
4 years ago
Gleb Mazovetskiy
495448c460
Fix extra bracket in (disabled) translation
4 years ago
Anders Jenbo
b00ae287b8
Minimize propegation of global Players index
4 years ago
Gleb Mazovetskiy
3178dd5158
Replace most uses of `sprintf` with `fmt` ( #4837 )
4 years ago
Anders Jenbo
b68fd1ff5e
Use player by reference in OperateShrine
4 years ago
Anders Jenbo
488a052ce6
Clean up OperateShrine
4 years ago
Anders Jenbo
ba4ee58c9f
Pass along bools instead of player index
4 years ago
Anders Jenbo
d82f2ebc9e
Pass players by reference instead of an index
4 years ago
Anders Jenbo
e47599c45f
Clean up BreakBarrel
4 years ago
Anders Jenbo
0d27761ac2
Make _oAnimFlag a boolean
4 years ago
Anders Jenbo
4c62905381
Deduplicate OperateLever
4 years ago
Anders Jenbo
21fd0fb686
Split delta sync from realtime sync
4 years ago
Anders Jenbo
9d167e22c1
Clean up Operate Door
4 years ago
Anders Jenbo
6d56058708
Move level generation to subfolder
4 years ago
ephphatha
3354c57ca8
Rename SkipThemeRoom/invert logic to match use
4 years ago
Anders Jenbo
4cc3a5264c
Make dPiece zero-indexed
4 years ago
Anders Jenbo
98e4310cad
Index Minis by tile instead of by coordinate
4 years ago
Anders Jenbo
860bd1cebf
Operate directly on SOL data
4 years ago
obligaron
19749420b5
Introduce Player::isOnActiveLevel
4 years ago
Vladimir Olteanu
6f4fe8a142
Fix typo in CanPlaceRandomObject
4 years ago
Vladimir Olteanu
5d3274de45
Consolidate random object placement
4 years ago
Vladimir Olteanu
4d6ff58c22
Reduce reliance on `bool done` for control flow (part 1 of x) ( #4720 )
4 years ago
Anders Jenbo
d17d7e018d
Use common function for loading .dun tile data
4 years ago
Gleb Mazovetskiy
1fc8ecb6f6
Add fmt::runtime annotations for C++20 support
...
`fmt` requires non-contexpr format string arguments to be wrapped in
`fmt::runtime` in C++20.
4 years ago
Anders Jenbo
98a10d262e
Unify PlaceMiniSet
4 years ago
qndel
fc5b7b3462
[diablo] Fix shrine rng ( #4529 )
...
This bug was less sever in Diablo then Hellfire as it didn't fully initialize the object leading to them sometimes getting garbage as the RNG seed, but it was never working correctly.
4 years ago
Anders Jenbo
1203514383
Clean up use of currlevel
4 years ago
Gleb Mazovetskiy
628406a44c
Refactor inventory/belt item presence and removal
...
Introduces new functions to check for presence of and remove player items.
These functions do not rely on or expose item indices.
They're implemented as free functions instead of Player methods due to
complicated include dependencies between `player.h`, `inv.h`, and
`inv_iterators.h`. We should probably look into cleaning this up at some
point.
4 years ago