323 Commits
Author SHA1 Message Date
obligaron 42e1b82a91 Use GetDunSize in loops 2023-11-28 17:24:18 +01:00
obligaron dc85e7db43 Introduce GetDunSize 2023-11-28 17:24:18 +01:00
obligaron 79a43dc1de Introduce AddMissile overloads specific for player and monster 2023-11-26 13:36:28 +01:00
Anders Jenbo bb2e189327 Convert _sfx_id in to class enum 2023-11-02 14:34:24 +01:00
Gleb Mazovetskiy e5881688f4 text_render: Replace optional args with struct
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.

With a struct, there is no need to specify the default values
for the args in between.
2023-10-25 09:19:14 +01:00
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Anders Jenbo b25b6a1daa Fix spawn location when using map debug command 2023-08-12 17:44:52 +02:00
staphen c577b6a6bf Only warp to Lazarus' chamber when red portal is active 2023-07-08 21:52:26 +02:00
ephphatha 8f90f975c4 Always spawn at Farnham when returning from an arena level 2023-05-29 11:58:21 +02:00
obligaron 805c323063 Sync Jersey's Jersey Quest 2023-05-28 01:51:56 +02:00
obligaron bac8535564 Sync Little Girl Quest 2023-05-28 01:51:56 +02:00
obligaron abdec47a85 Multiplayer: Sync Lazarus death correctly 2023-05-16 19:53:34 +02:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
ephphatha 655a5da53e Make the poison water quest visible in the log when the level is cleared
Just in case the player skips talking to pepin and clears the whole quest, make the entry visible in the log.
2023-05-02 10:03:11 +02:00
Anders Jenbo 2f908277a8 Apply pre calculated lighting for quest levels 2023-04-24 17:20:17 +02:00
obligaron 4cdd7ff2d9 Replace ReturnLevel/LevelTyp/LvlPosition 2023-03-12 19:30:57 +01:00
obligaron f4b2fee532 Transform Lazarus portal position to world space earlier 2023-03-12 19:30:57 +01:00
obligaron adeeae2c52 Add option to enable singleplayer quests in multiplayer 2023-02-27 05:00:07 +01:00
obligaron 6a5210e14a Multiplayer: Enable Lachdanan Quest 2023-02-25 02:48:58 +01:00
obligaronandqndel 3a31539c7e Multiplayer: Enable Warlord of Blood Quest
Update Source/quests.h

Co-authored-by: qndel <[email protected]>
2023-02-20 21:30:50 +01:00
obligaron 76528246d7 Multiplayer: Enable Zhar the Mad Quest (#5823) 2023-02-19 22:06:08 +01:00
obligaron 31b0f2147a Multiplayer: Enable Gharbad the Week Quest 2023-02-19 14:13:06 +01:00
obligaron 475f1d67fb Spawn Fungal Tome during level generation to avoid desyncs 2023-02-07 08:02:38 +01:00
obligaron 5e9801f0cf Sync Quest._qmsg 2023-02-07 08:02:38 +01:00
KPhoenix 8db521727d enum missile_id -> enum class MissileID
Changes `enum missile_id` to `enum class MissileID`
2023-01-18 17:17:25 +00:00
obligaron 9948bc3477 Multiplayer: Fix Poisoned Water Supply purify 2022-12-28 21:03:09 +01:00
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