Commit Graph
297 Commits
Author SHA1 Message Date
obligaron 0aa3831e32 Multiplayer: Enable Ogden's Sign Quest 2022-11-22 15:29:04 +01:00
obligaron 0711e6af4d Sync SpawnQuestItem (multiplayer quest items) 2022-11-12 19:27:36 +01:00
obligaron d0978672e9 Make Poisoned Water Supply quest multiplayer compatible 2022-11-11 03:27:37 +01:00
obligaron 5a45ee4eba Update diablo pentagram when quest state changes 2022-11-11 03:27:37 +01:00
obligaron 0c13f88694 Ensure questmap changes are synced between clients 2022-11-11 03:27:37 +01:00
obligaron 5fe20e3d32 Make Lazarus quest map multiplayer compatible 2022-11-11 03:27:37 +01:00
obligaron 57a3ede76a Introduce UseMultiplayerQuests 2022-11-11 03:27:37 +01:00
obligaron 17712562c8 Sync Quest._qvar2 2022-11-11 03:27:37 +01:00
obligaron 0de0894ad5 Enable sync of all quests 2022-11-11 03:27:37 +01:00
Gleb Mazovetskiy b5f788cb33 trigs.cpp: Optimize & clean up the data structures
1. Use appropriate types.
2. Do not use an end marker for static arrays (their length is known).
2022-10-16 03:53:26 +01:00
Gleb Mazovetskiy 759ca7f055 WorldTileRectangle/Size
Adds a custom sized type for the world tile rectagle.

This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
2022-10-16 03:53:26 +01:00
obligaron 795a43dd89 Add Arena Support 2022-10-14 16:25:30 +02:00
obligaron 7ad5a45905 Fix warp position offset and adjust some spawn positions (#5364) 2022-09-25 02:20:35 +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
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
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 d1189388f5 Use user by reference 2022-07-17 18:41:05 +02:00
ephphatha 1337ff6ea2 Add check if a monster potentially has leashed minions 2022-07-13 07:13:34 +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
Cesar Canassa bb3fb36ddc ✨ Introduces FlipCoin() (#4908) 2022-07-07 20:57:03 +02:00
Mikołaj Piróg 15989609a8 Members' name changes and comments in Monster struct (#4861) 2022-07-06 10:21:22 +02:00
Gleb Mazovetskiy 6949a6f418 Monster: Remove MType/MData pointers
These pointers are redundant, replaces them with methods.
2022-07-03 13:21:11 +01:00
Gleb Mazovetskiy d152d2c0fb Add OptionalOwnedCelSprite 2022-07-03 12:26:39 +01:00
Mikołaj Piróg 7cab074aa5 Correct members' names in monster.h (#4850)
* Fix case in AnimStruct
* Rename CMonster members
2022-07-01 23:34:32 +02:00
ephphatha c68fcf3cb1 Apply MethodCase config to Rectangle::Contains
Also included Circle and VirtualButton classes due to the shared use.
2022-06-24 00:39:55 +02:00
Anders Jenbo 6d56058708 Move level generation to subfolder 2022-06-23 09:21:58 +02:00
Andrew James f846263462 Restore change to trigger position when advancing betrayer quest (#4752) 2022-06-20 10:15:10 +02:00
Gleb Mazovetskiy 8e9c9e0238 Reduced the size of OwnedCelSprite* by 8 bytes
`OwnedCelSpriteWithFrameHeight`: 40 -> 32
2022-06-20 01:11:22 +02:00
Anders Jenbo 4cc3a5264c Make dPiece zero-indexed 2022-06-19 09:57:30 +02:00
Anders Jenbo d17d7e018d Use common function for loading .dun tile data 2022-06-15 14:18:06 +02:00
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.
2022-06-14 12:46:36 +01:00
Andrew James 4bd1e06336 Point mega <-> world conversion helpers 2022-06-13 00:27:57 +02:00
ephphatha c859ec57d0 Dedupe SP/MP logic when killing archbishop lazarus 2022-06-12 03:44:24 +02:00
Anders Jenbo 6962fcd63e Clean up PlaceMiniSet() 2022-06-11 09:26:06 +02:00
Anders Jenbo 50a222f1a2 Test generating a level for the butcher quests 2022-06-06 14:10:58 +02:00
qndel 354e329644 Players[MyPlayerId] -> MyPlayer 2022-05-31 05:35:52 +02:00
Anders Jenbo 457f804f10 [vanilla] Fix missing tource light in Lazarus' chamber 2022-05-12 21:39:00 +02:00
galaxyhaxz 157adc7e11 Lazarus level reset bugfix 2022-05-08 12:15:32 +02:00
Gleb Mazovetskiy a66ca44695 Zero-based frame indexing
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy ade8aba822 Fix some more warnings 2022-04-14 01:26:29 +02:00
Anders Jenbo 3c54925a84 Fix cow quest getting stuck in multiplayer 2022-03-29 11:25:33 +02:00
Anders Jenbo 6d28810dc7 Change infostr from char[128] to std::string 2022-03-20 14:23:30 +01:00
Anders Jenbo 1409e604f5 Reduce string conversions 2022-03-20 11:04:15 +01:00
Anders Jenbo be57d62684 Use UTF8 aware string copying 2022-03-19 06:03:19 +01:00
Gleb Mazovetskiy 7fede6c4cb Clean up owned/unowned CelSprite ambiguity
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.

This clarifies ownership and makes the code cleaner in a number of
places.

Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
staphen 5b21e0188f Fix order of operations during game initialization 2022-01-15 06:47:09 +01:00
obligaron ff5de056fa Add all (boolean) Game Settings to Settingsmenu (#3616) 2021-11-26 23:43:46 +01:00
Gleb Mazovetskiy c57644970f Move UiFlags and UiPanels into their own files
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
2021-11-25 12:22:27 +01:00
obligaron 677303cba9 Reduce use of view globals in game menu 2021-11-20 21:57:32 +01:00