33 Commits
Author SHA1 Message Date
obligaron ccaf8d1dac Use uint8_t in msg/multi/sync and fix MSVC warnings (#6856)
* Fix MSVC warnings in msg.cpp

* Move TBuffer to multi.cpp

* Fix MSVC warnings in multi.cpp

* SNet* change databytes to size_t

* msg/muli/sync: Change playerId to uint8_t
2023-12-16 18:56:06 +01:00
Gleb Mazovetskiy e350d9be06 Remove SNetGet/SetLastError
The only named code that was ever set is `STORM_ERROR_NO_MESSAGES_WAITING`.
There was also a call in `menu.cpp` which as far as I can tell is not
needed (if it is, it should be replaced by something else).
2023-11-14 02:53:49 +00: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
Anders Jenbo 872456ae5d Use size_t for a select few pnum variables 2022-08-26 13:22:04 +09:00
Stephen C. Wills a06dd25d17 Synchronize player inventories (#5217)
* Synchronize item placement in player's backpack

* Synchronize item remove from player's backpack

* Synchronize item placement and removal from player's belt

* Set up loopback network provider for failing tests
2022-08-20 16:30:40 +00: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 f6f05da485 Clean up game name and password variables 2022-07-16 20:15:07 +02:00
Cesar Canassa e538acb248 📝 Fixes Doxygen warnings (#4904) 2022-07-07 12:51:24 +02:00
obligaron 1f7b0607a6 public game browsing: show difficulty, speed, players and possible incompatibility 2022-02-20 12:18:31 +01:00
obligaron 0888546d62 Make DvlNet_SendInfoRequest non blocking 2022-01-06 13:16:23 +01:00
Anders Jenbo 799f1763af Performce UTF8 aware limited string copies 2021-11-22 03:28:51 +01:00
Gleb Mazovetskiy 3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
staphen ffbbcc6d62 Support unencrypted multiplayer games with no password 2021-10-25 01:14:37 +02:00
Anders Jenbo ae90193136 Game discovery over ZeroTier 2021-10-12 19:24:37 +02:00
staphen 393d6d7fbe Free dvlnet resources when game is shutting down 2021-10-01 06:52:16 +02:00
Anders Jenbo 0889780923 Remove more usage of miniwin types 2021-07-18 02:11:58 +02:00
Jonathan Bergeron 33ad9fa187 renamed Source/mainmenu.cpp and .h to menu.cpp/.h 2021-07-18 01:31:15 +02:00
Anders Jenbo a19e7b2a3b Remove some more use of miniwin 2021-07-17 23:54:13 +02:00
Anders Jenbo 2ca6e37c46 Clean up sub folders using clang-tidy/Android Studio 2021-07-08 03:30:25 -07:00
Anders Jenbo 0f2ad469ea ♻️Clean up variable initialization 2021-06-27 14:58:51 -07:00
Anders Jenbo 8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Anders Jenbo f167bd4dfb Clang-tidy: llvm-include-order 2021-06-27 01:45:49 +02:00
Anders Jenbo 7102724fda Clang-tidy: readability-named-parameter 2021-06-27 00:56:08 +02:00
Anders Jenbo d8fa29c972 Clean up more implicit bool conversion 2021-06-26 10:07:02 -07:00
staphen b6398b75d0 Replace std::mutex with SdlMutex 2021-06-20 16:31:25 -07:00
Anders Jenbo 7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
Anders Jenbo a32ac83090 🎨 cleanup trivial trype comparisons 2021-04-23 02:48:25 +02:00
Anders Jenbo cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +02:00
Anders Jenbo 2969b80163 🎨 Run readability-identifier-naming on all src sub-folders 2021-04-22 03:53:35 +02:00
Anders Jenbo f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo d024f79b0e 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo 8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00