15 Commits

Author SHA1 Message Date
IntegratedQuantum
09fc516828 Move all the allocators to a separate file. They can now be imported with main.heap (analogous to std.heap)
I also removed the unused BufferFallbackAllocator which was from a time where I was still experimenting with different allocators.
2025-03-09 16:26:41 +01:00
IntegratedQuantum
03769c2cda
Update Zig to 0.14.0 (#1158)
* Update Zig to 0.14.0

* Update ci.yml

* Copy the zig fmt source code

* Update ci.yml

* Fix formatting issues

* Update CONTRIBUTING.md with a new formatting command
2025-03-05 21:41:02 +01:00
IntegratedQuantum
bc02bb0587
Use (an adapted version) of zig fmt to format the source code. (#1140)
* Format all the files

* Fix compilation error.

* The install scripts now patch render.zig from the zig standard library.

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update the formatter, it doesn't need to run on .zig files anymore.

* Update ci.yml

* Update ci.yml

* Add a mistake to check if it works

* IT WORKS!
2025-03-02 16:36:58 +01:00
IntegratedQuantum
ffd408bf18 Print the file path when printing a zon error.
fixes #1133
2025-03-01 12:30:06 +01:00
IntegratedQuantum
e71161362a Remove extranous newline when printing a zon syntax error 2025-02-28 18:42:30 +01:00
IntegratedQuantum
1c64a8e4b7 zon: Improve the duplicate key error 2025-02-28 18:38:50 +01:00
IntegratedQuantum
22488a28ae CI: Check for trailing spaces and (missing) newlines at the end of the file
fixes #737
2025-02-12 17:36:44 +01:00
OneAvargeCoder193
b1dc5cacf0
add support for _defaults.zig.zon in blocks and biomes assets (#923)
* add support for _defaults.zig.zon in blocks and biomes assets

* this is temporary and doesnt fix anything and adds a couple segafaults dont merge this

* finally fix segfault and make it work

* changes

* changes
2025-01-18 10:59:23 +01:00
IntegratedQuantum
1b1f61cae9 Change some warning messages to error messages.
Errors are things that come from actual problems, like incorrect parametrizations.
Warnings are things that hint at potential problems, but could also occur during regular runtime, like for example server lag.

progress towards #911
2025-01-12 15:54:53 +01:00
OneAvargeCoder193
5986c76c45
Add player and inventory saving (#878)
* Save the player's location and inventory, and also added the ability to load the player's location

* remove the comment from utils

* make the player save every 5 seconds

* fix gamemode loading

* remove comment

* added inventory loading

* fix bug

* fix unintentional changes

* fix segfault

* fixes

* Some small fixes.

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2025-01-02 15:14:22 +01:00
IntegratedQuantum
de2e4aedb4 Rename ZonElement.free to deinit to follow zig convention. 2025-01-01 20:27:31 +01:00
IntegratedQuantum
1837fe7adf Don't print trailing commas in empty zon structs/tuples.
fixes #808 (after entering and leaving the world once)
2024-12-04 21:21:21 +01:00
IntegratedQuantum
2fbe3f5d9f Fix infinite loop in zon parser when encountering a json object. 2024-10-06 14:47:47 +02:00
IntegratedQuantum
e691adf936 Fix some mistakes in the zon parser. 2024-09-29 16:23:16 +02:00
IntegratedQuantum
c7a67eb42a Add a zon (Zig Object Notation) parser in preparation for #733 2024-09-28 19:55:22 +02:00