ephphatha
ea3ecbd619
Use _item_indexes type where appropriate
2022-10-11 18:51:13 +02:00
ephphatha
a5b5441794
Restore item seed when converting potions to rejuvenation potions
2022-10-11 11:39:47 +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
obligaron
37de526cb8
DeltaSyncOpObject: Add handling for shrine
2022-08-10 21:23:26 +02:00
ephphatha
b4839dadcc
Dedupe operate object network commands
2022-08-07 02:46:24 +02:00
ephphatha
8132d6a033
Take object by reference in OperateObject
2022-08-07 02:46:24 +02:00
Anders Jenbo
52780a3712
Do not count closed doors as blocked
2022-08-05 19:48:30 +02:00
qndel
3736b5c8fd
fix interacting with lazarus books while not on circles
2022-08-04 14:01:24 +02:00
Anders Jenbo
2d9531f692
Remove redundant check for distance when operating doors
...
IsPlayerAdjacentToObject() is checked before calling OperateObject().
Previously teleFlag would ignore sendmsg which was likely a bug causing
the event to fire multiple times.
2022-08-04 01:37:03 +02:00
Anders Jenbo
acab00652e
Unify operate door logic
2022-08-04 01:37:03 +02:00
Anders Jenbo
3589744ed1
Fix crypt doors looking wrong after closing them
2022-08-04 01:37:03 +02:00
Anders Jenbo
37ad8a438a
Remove some redundant door logic
2022-08-04 01:37:03 +02:00
Anders Jenbo
8dd8203a39
Add missing check to IsDoorClear
2022-08-04 01:37:03 +02:00
Anders Jenbo
e1417be472
Reuse code for opening and closing doors
2022-08-04 01:37:03 +02:00
Anders Jenbo
6fdd756023
[hellfire] Fix blocked crypt door sound
...
Clean up blocked check in OperateL??Door
2022-08-04 01:37:03 +02:00
Anders Jenbo
52d9b69624
Reuse SetDoorStateClosed in AddDoor
2022-08-04 01:37:03 +02:00
Anders Jenbo
e9702b4415
Move and rename door state functions
2022-08-04 01:37:03 +02:00
staphen
748bb1f84d
Split delta trap operation from realtime trap operation
2022-08-03 07:39: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
Anders Jenbo
da5f392cfa
Merge OpenDoor and DeltaSyncDoor
2022-08-01 12:09:26 +02:00
Anders Jenbo
b9aa2959a6
Split deleta sync from operate door
2022-08-01 12:09:26 +02:00
Anders Jenbo
5f3acebe5e
Merge operate door functions
2022-08-01 12:09:26 +02:00
Anders Jenbo
069a33749c
Merge sync door functions
2022-07-31 11:01:03 +02:00
Anders Jenbo
70683bf9de
Add door state enum
2022-07-31 11:01:03 +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
ephphatha
b234565f65
Inline functions which only set Object::_oRndSeed
2022-07-30 14:43:03 +02:00
Cesar Canassa
f069cdc771
♻️ Pass objects by reference (#5148 )
2022-07-30 13:46:07 +02:00
ephphatha
0ce76a3f13
Add Object lookup method to mimic map::at()
2022-07-28 12:47:13 +02:00
ephphatha
ed5d2d98e7
Simplify AddBookLever
2022-07-28 12:47:13 +02:00
ephphatha
cdcccef47a
Return pointer from AddObject
...
This allows removing the immediate lookup for call sites which need further initialisation.
2022-07-28 12:47:13 +02:00
Andrew James
24c57bf6c6
Simplify MonsterOperateDoor ( #5100 )
2022-07-23 13:14:47 +02:00
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.
2022-07-22 17:46:53 +02:00
ephphatha
50d292f8c6
Take references in operate door functions
2022-07-22 16:24:06 +02:00
Andrew James
9a09b07c4d
Cleanup Object/Quest triggers which activate quests ( #5081 )
2022-07-22 14:16:38 +00:00
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
2022-07-21 18:58:27 +02:00
Andrew James
a075e5fe05
Take Object by reference in OperateContainer methods ( #5079 )
2022-07-20 14:24:07 +02:00
ephphatha
de83d9440e
Use position for break object network messages
2022-07-19 16:22:52 +02:00
Andrew James
986650afc8
Take Object by reference when operating quest objects ( #5066 )
2022-07-19 15:59:59 +02:00
ephphatha
9e76cd4ab7
Use object pointer for pcursobj
2022-07-19 13:20:24 +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
Anders Jenbo
56915974d6
Minimize passing of player indexes
2022-07-18 11:15:50 +02:00
Cesar Canassa
aa6ea3907e
♻️ Adds Missile::SourcePlayer and Missile::SourceMonster (#4999 )
2022-07-17 18:50:29 +02:00
Anders Jenbo
d1189388f5
Use user by reference
2022-07-17 18:41:05 +02:00
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`).
2022-07-16 12:55:18 +01:00
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.
2022-07-14 00:19:21 +01:00
Anders Jenbo
ac2bf9aaac
Limit what gets called in headless mode
2022-07-13 18:54:36 +02:00
ephphatha
073b62549c
Cleanup AddTrap
2022-07-13 11:44:07 +02:00
ephphatha
16b8530375
Object reference in AddObjectLight
2022-07-13 11:44:07 +02:00
ephphatha
90c8f41e52
Object reference in AddChest
2022-07-13 11:44:07 +02:00