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.
4 years ago
Anders Jenbo
da5f392cfa
Merge OpenDoor and DeltaSyncDoor
4 years ago
Anders Jenbo
b9aa2959a6
Split deleta sync from operate door
4 years ago
Anders Jenbo
5f3acebe5e
Merge operate door functions
4 years ago
Anders Jenbo
069a33749c
Merge sync door functions
4 years ago
Anders Jenbo
70683bf9de
Add door state enum
4 years ago
Anders Jenbo
3250472789
Clean up player references
4 years ago
Anders Jenbo
e83c55d444
Clean up object references
4 years ago
ephphatha
b234565f65
Inline functions which only set Object::_oRndSeed
4 years ago
Cesar Canassa
f069cdc771
♻️ Pass objects by reference ( #5148 )
4 years ago
ephphatha
0ce76a3f13
Add Object lookup method to mimic map::at()
4 years ago
ephphatha
ed5d2d98e7
Simplify AddBookLever
4 years ago
ephphatha
cdcccef47a
Return pointer from AddObject
...
This allows removing the immediate lookup for call sites which need further initialisation.
4 years ago
Andrew James
24c57bf6c6
Simplify MonsterOperateDoor ( #5100 )
4 years ago
ephphatha
4a8f375011
Use position for operate object network commands
...
Only one remaining use of Object::getId for caching the target of a command requiring the player to path to an object.
4 years ago
ephphatha
50d292f8c6
Take references in operate door functions
4 years ago
Andrew James
9a09b07c4d
Cleanup Object/Quest triggers which activate quests ( #5081 )
4 years ago
Andrew James
2786a65e7b
Tidy up ActivateSkeleton and take monster by reference ( #5080 )
...
* Take reference in OperateSarcophagus
* Use monster reference instead of pointer in ActivateSkeleton
* Clean up ActivateSkeleton
4 years ago
Andrew James
a075e5fe05
Take Object by reference in OperateContainer methods ( #5079 )
4 years ago
ephphatha
de83d9440e
Use position for break object network messages
4 years ago
Andrew James
986650afc8
Take Object by reference when operating quest objects ( #5066 )
4 years ago
ephphatha
9e76cd4ab7
Use object pointer for pcursobj
4 years ago
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).
4 years ago
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