b72b8eaee1
add comments to point at where strict aliasing rule violations occur in data scripts
...
this is definitely not all of them, a thorough rewrite must take place
to fix as many as we can.
2025-09-10 10:13:26 +02:00
55635d44ae
delete redundant COLOUR32 definitions
2025-09-10 10:13:26 +02:00
4fa0b41e7a
add quit in main.c to atexit, for added safety
2025-09-10 10:13:26 +02:00
8a5afd6915
write a portable version of endian.h, to replace the system's endian.h.
...
utilising GNU C standard library for some of the functionality, or GNU C
extensions.
2025-09-10 10:13:26 +02:00
8b952fb86f
edit makefile to remove redundant flags, and make clean task more conditional
2025-08-29 11:47:46 +02:00
0baadfca75
update copyright information in all files
...
the comment was using single-line comments, I prefer multi-line comments
now.
This bothered me for much too long.
2025-08-29 09:36:55 +02:00
9a45294e56
write some constants for mcx.c, so things are less error-prone.
2025-08-29 09:35:02 +02:00
5b5f1f54af
remove unneeded code
2025-08-28 16:46:27 +02:00
f1141e0db4
fix: not moving chunks correctly in mcx_delchunk_range
2025-08-28 10:59:30 +02:00
15942b47f5
fix: assertion was inverted
2025-08-28 10:57:00 +02:00
bc8803525d
update comments and a parameter name in mcx.h
2025-08-27 14:57:34 +02:00
7531d786be
add a function for range deleting chunks
2025-08-27 14:50:35 +02:00
2c5b9def28
should set the spare chunk to 0x400, not 0
2025-08-27 14:50:35 +02:00
cd277873b5
split apart the moving of the data, for further flexibility
2025-08-27 14:50:35 +02:00
f203cabad9
fix: endianess was (often) converted after performing computations or missing completely.
2025-08-27 14:47:50 +02:00
28dd8af353
add comments
2025-08-27 14:38:30 +02:00
9c690eb327
add NONNULL attributes to chunk deletion functions
2025-08-27 12:58:59 +02:00
af8211c5ce
write function for bulk removal of chunks
2025-08-27 12:58:28 +02:00
767f3a5c13
refactor of mcx_delchunk to make things a bit more clear and flexible
2025-08-27 12:30:38 +02:00
43e3e4fe85
fix: not converting big-endian numbers to host.
...
I swear I did have this here at some point... I've got no idea when I
removed it, or even why.
2025-08-27 12:30:38 +02:00
fad6f366b4
fix: mcx_delchunk was not updating the byte offset of affected chunks.
2025-08-27 12:30:38 +02:00
b7859d56d9
add function for computing the bytesize of the *.mcX file
2025-08-27 12:30:38 +02:00
7a45724de7
modify planned features in README.md, to add a few of my ideas.
2025-08-27 11:43:17 +02:00
1c863099a9
write a function for deleting a specific chunk.
2025-08-27 11:43:17 +02:00
2f68574aea
swap order of nbt_proctag and nbt_nexttag
2025-08-26 11:32:26 +02:00
4e230ae856
add a utility macro for getting the bitwise ceiling. (e.i. the next power of 2)
2025-08-26 11:32:26 +02:00
e02f4091b8
start writing code for *.mcX file parsing, starting with indexing logic.
2025-08-26 11:32:26 +02:00
1f46640e49
clarify which bytes we're referring to
2025-08-25 13:44:01 +02:00
17357d4672
remove unused/unmaintained code.
...
this will likely re-appear in some form or another later on, but
currently I don't see its use.
2025-08-25 12:42:45 +02:00
5644d377de
make helper functions for nbt_proctag have similar IO as itself.
...
fix: `procarr` was counting `nmem`, whilst we should be counting the
bytes.
fix: `procarr` wasn't actually writing to `struct nbt_array`'s `len`
member.
2025-08-25 12:41:12 +02:00
44d2271972
fix: return values and list processing was too funky with nbt_proctag.
...
- Updated documentation
- Fixed logic so `nbt_proctag` actually returns the next pointer.
2025-08-25 10:57:15 +02:00
545eecca37
remove CI, because I cannot be bothered.
...
I am not going to work on the continuous integration workflow for now.
It keeps failing and I just do not care about it right now.
2025-08-25 09:32:31 +02:00
6dae1d1600
use a flexible array member for including length with array data
2025-08-24 13:37:33 +02:00
a6442a851e
write a function for processing NBT_LIST
2025-08-24 13:06:04 +02:00
ec04177f45
remove exessive comments
2025-08-24 12:52:43 +02:00
40b8c0ef30
write documentation for nbt_procarr.
2025-08-24 12:51:59 +02:00
7feb193c51
make procarr code more consise.
2025-08-24 12:48:21 +02:00
29c8a2b6ea
improve documentation for the nbt_proctag function
2025-08-23 23:19:16 +02:00
8cd29225d1
remove outdated TODO comments
2025-08-23 23:13:27 +02:00
20ec45f230
fix: not actually returning NULL.
2025-08-23 23:13:27 +02:00
3cdee8b40c
add nbt_proctag to nbt.h
...
also changed the `out` parameter from `u8` to `void`, to be more
acurrate that it may point to whatever.
2025-08-23 23:13:27 +02:00
89ceb5263c
put attributes after function declarations
...
super confusing, but the formatter is being annoying otherwise
2025-08-23 23:09:09 +02:00
4fa0a84c94
fix attributes with parameters to be less messy due to vardiac arguments
2025-08-23 23:01:01 +02:00
8452f7d21e
updated contents link in styleref
2025-08-23 22:36:21 +02:00
6c0a1de365
fix: x86_64 wikipedia link is always the English variant.
...
The link was pointing to `en.wikipedia.org`, where it is better to not
assume the (preferred) language, and just link to `wikipedia.org`.
2025-08-23 22:34:20 +02:00
d9ee6c9155
replace "UNIX-based systems" with "Linux systems"
...
UNIX-based would include MacOSX, OpenBSD, et cetera.
This chould prove problematic in the future due to lack of testing.
Henceforth, "Linux systems" is more accurate.
2025-08-23 22:31:06 +02:00
5ba44689ff
remove unused file
2025-08-23 22:26:26 +02:00
fb21e7e782
add more planned features to the list
...
and sort list based upon importance
2025-08-23 22:24:03 +02:00
f1ea7dcef8
continue working on nbt_proctag focussing on array processing.
2025-08-22 13:02:12 +02:00
9996e84ef5
move contents of do while loop in nbt_nexttag into its own funciton
2025-08-22 10:14:57 +02:00