Commit Graph

384 Commits (61cec73c49780894cb18790d563c666719b8711f)

Author SHA1 Message Date
BodgeMaster 61cec73c49 lib/zlibutil, tools/zlibutil: moving things around
This includes the following changes:
- Move the data type wrangling into the lib to make it easier to use
- Put the functions into their own `zlib` namespace
- Use ErrorOr instead of exceptions
- Error codes for compression/decompression
2024-06-10 20:41:29 -03:00
BodgeMaster ef0a2707dd lib/zlibutil, tools/zlibutil: moving things around
This includes the following changes:
- Move the data type wrangling into the lib to make it easier to use
- Put the functions into their own `zlib` namespace
- Use ErrorOr instead of exceptions
- Error codes for compression/decompression
2024-06-09 02:51:32 +02:00
BodgeMaster 8482194b01 build system: update build commands for libs
I forgot this after changing the build system when resolving merge conflicts.
2024-06-08 23:59:55 +02:00
BodgeMaster 229392a7fe test/zlibutil: update to match changes in zlibutil, increase reliability
The following changes have been made:
- The test has been adjusted to zlibutil's changed behavior.
- The output of zlibutil isn’t checked against static data, instead it hands
  the compressed file to another decompressor. This was done because the exact
  output can change with updates to zlib itself (this appears to have happened
  in my case).
- The new test works with random data, reducing the likelihood of false passes.
- The new decompression test works with its own file for the same reason.
2024-06-08 15:59:03 +02:00
BodgeMaster a48c4dcd33 tools/zlibutil: Change CLI to act more like other compression utilities
Compression is now the implied default action, decompress with the -d flag.
2024-06-08 15:10:38 +02:00
BodgeMaster a787a89493 resources/region_files: add a zlib compressed chunk 2024-06-08 15:09:14 +02:00
BodgeMaster b9006cc6ea Build system: start moving the download handler to its own file 2024-06-08 15:09:14 +02:00
BodgeMaster eb8db35615 scripts/lib: Fix a bug in the `remove` function 2024-06-08 15:09:14 +02:00
BodgeMaster 9dd4489141 test/hexnet: remove useless (unimplemented) test 2024-06-08 15:08:37 +02:00
BodgeMaster d1c855857c Code style guidelines and resources/README: Minor documentation changes 2024-06-08 15:07:26 +02:00
BodgeMaster 8f8d51f459 lib/net/*: Move stuff around
I did this months ago with the intention to finally start implementing networking....
Yeah, that definitely panned out.

Also, Git is drunk with how it says files have been renamed, they’re just empty apart from the license notice.
2024-06-08 15:07:26 +02:00
BodgeMaster 8b13f72acc tools: Add zlibutil
Third time's the charm...
Editing this commit again to resolve merge conflicts.
- Bodge

Splitting one of Joca’s commits by topic - Bodge

Add zlibutil.cpp and zlib to the project's dependencies. - Joca
2024-06-08 15:06:50 +02:00
Joca 6ef1d401bb lib: Add zlibutil library and test script 2024-05-12 17:24:58 -03:00
Joca 1bcc5eae64 tools: Add ZLIBUTIL
Add zlibutil.cpp and zlib to the project's dependencies.
2024-03-12 22:37:09 -03:00
BodgeMaster 97b844c6d1 build system: add support for building shaders to SPIRV binaries
This adds the following to the project:
- glslc from Google’s shaderc
- src/shaders directory
- shaders are now built as part of the `build` command
- forcefully remove some files during the setup process and when cleaning
2024-01-07 20:07:33 +01:00
BodgeMaster 20857cb8c5 build system (setup_project): Comment out seemingly useless workarounds 2023-06-18 07:53:35 +02:00
BodgeMaster abc5491192 Update sockpp to version 0.8.1
This supposedly fixes a bunch of things, we’ll see...
2023-06-18 07:01:10 +02:00
BodgeMaster ad54f0a012 test/dumpnbt: Move expected output out of the script, also add another test
What was I thinking!?
2023-06-18 03:37:19 +02:00
BodgeMaster ae71322ba1 lib/nbt: Fix #80 2023-06-18 03:17:20 +02:00
BodgeMaster 01e5f5eaac lib/region: Start working on region file parser
Something is fishy with dumpnbt or lib/nbt.
Attempting to dump the extracted chunk fails, but external tools
do manage to parse it.
2023-05-29 14:47:19 +02:00
BodgeMaster 6112da2e6f lib/game: Start working on game internals
Btw: I lost the game.
2023-01-27 03:32:43 +01:00
BodgeMaster b07d6e2ff6 fossvg (client): Clean up GLFW-related code
- add some Vulkan-specific things to deal with GLFW
- get rid of useless warnings
- allow to set window size from the command line

The Window size is fixed for now because that will hopefully make
things easier in the strt. I intend to have a resizable window
in the future but getting things going is more important.
2023-01-27 01:20:29 +01:00
BodgeMaster 4247bd295a fossvg (client): Commit to using Vulkan
I have decided that we are going to use Vulkan for this. Hopefully, it works out.
This commit removes some OpenGL-specific things and adds Vulkan to the build command line.
2023-01-27 01:20:29 +01:00
BodgeMaster 4c651d1b6f Merge branch 'master' into cygwin 2023-01-09 21:54:23 +01:00
BodgeMaster e152c72a04 fossvg (client): Create window 2023-01-09 20:43:49 +01:00
BodgeMaster 5d80ca801e scripts/clean: Recreate lib/net 2023-01-09 20:38:13 +01:00
BodgeMaster c245e8a5ca lib/{file,javacompat,net/conversion/position,net/conversion/varint,net/packet}: pragma once 2022-12-30 15:38:33 +01:00
BodgeMaster 10d8cdae22 lib/net/{client,server,packet}: Prepare for networking 2022-12-29 03:31:56 +01:00
BodgeMaster b08a86f0b8 resources: Add network capture of a server list ping 2022-12-29 03:28:18 +01:00
BodgeMaster c6ec0f6850 lib/net/conversion/position: Remove misattributed author
Yeah, I just copied the header from somewhere else...
2022-12-27 17:34:16 +01:00
BodgeMaster 85fc73e015 lib/net/conversion/position.hpp: Add library
Unit tests tbd
2022-12-27 17:28:11 +01:00
BodgeMaster d2861b79ac lib/net/conversion/varint: move lib/varint here 2022-12-27 16:24:59 +01:00
BodgeMaster 9403da4ca0 lib/varint: Fix error handling for out of bounds access 2022-12-27 15:44:05 +01:00
BodgeMaster ad5bf1c41a lib/cli: Remove completely useless TODO 2022-12-20 17:06:22 +01:00
BodgeMaster 7108e71b96 lib/varint: Add toVarN() functions 2022-12-20 04:41:09 +01:00
Shwoomple 26df433dc5 lib/file: Implement cutString function 2022-12-04 09:59:28 +05:30
BodgeMaster 44716a55bb lib/varint: Fix fromVar64 function
The problem was that I let the compiler assume data type widths.
`1 << 63` is a 32 bit integer on x86_64-pc-linux-gnu.
2022-11-26 14:50:02 +01:00
BodgeMaster fe7c763d06 lib/varint: Add VarInt library
Minecraft uses 32-bit and 64-bit VarInt types to cut down on network usage.
This library currently contains read functions for conversion to normal integers.

Something seems to be wrong with the converter for 64-bit varints,
can’t figure out what rn.
2022-11-25 22:19:49 +01:00
BodgeMaster d392e080ca test/nbt_tags: Add tests for constructing invalid lists/compounds 2022-11-25 17:07:35 +01:00
BodgeMaster 60a8ac9788 lib/nbt: Make constructor NBT::Tag::Compound::Compound(name, data) private
The constructor has been made private and replaced with a static wrapper
function to make constructing from invalid data impossible.

If there is more than one end tag or an end tag isn’t at the end,
an error will be returned.
2022-11-25 15:52:24 +01:00
Shwoomple bc2255de6b lib/file: Fix issue #71 - Electric Boogaloo (Out of bounds access)
Add size constraint to make sure string terminates at the correct
length. Cygwin appears to not put null bytes to terminate string when
reading from a file stream.
2022-11-12 11:51:43 +05:30
Shwoomple e627714b44 lib/file: Implement cut function. 2022-11-12 06:36:04 +01:00
Shwoomple 42b7e40f9d lib/file:Fix issue #71 (Out of Bounds access) 2022-11-12 06:36:04 +01:00
Shwoomple 9bda607649 lib/file: Implement cut function. 2022-11-12 10:59:08 +05:30
Shwoomple 76dd30c45a lib/file:Fix issue #71 (Out of Bounds access) 2022-11-12 10:58:27 +05:30
BodgeMaster 78880e1c20 setupenv: Fix spelling
Yeah, really important commit, I know.
2022-10-31 17:56:11 +01:00
BodgeMaster 1d899db889 scripts/clean: Add a link with the original file name of cygsockpp-0.dll
Otherwise, the dynamic linker complains that it can’t find the file.
2022-10-31 17:56:11 +01:00
BodgeMaster 3cc91ae33d Build system: Get sockpp to build on Cygwin
This is probably not the last time this issue needs attention
as it *builds* on Cygwin with these workarounds, but it doesn’t *work*
on Cygwin...
2022-10-31 17:56:11 +01:00
Shwoomple 63e1749ad1 lib/file: fix cutByte filesize bug 2022-10-31 17:23:02 +01:00
Shwoomple ea8e806366 lib/file.cpp: Implement cutByte function 2022-10-31 17:23:02 +01:00