0e00cb2d54
remove non-functional code
2025-08-07 13:23:47 +02:00
c3fc688c35
remove nbt_proc and replace it with nbt_initproc
...
we're moving towards that the user will handle most of the looping and
data feed.
So the use of these functions is no longer intended, becides, they
weren't being maintained whilst the parameters changed, causing the
portion of code to lag behind.
I'd rather rewrite code than have to prune old, unused code.
2025-08-07 13:23:33 +02:00
066e1c0049
remove nbt_isprim function, because it never really served any purpose.'
2025-08-07 13:02:08 +02:00
1052dcaac9
add functions for incrementing to the next tag
2025-08-07 13:01:27 +02:00
f952268152
fix: the + unary operator does not add 1, but just specifies intent.
...
I was very mistaken, and I feel like an idiot.
2025-08-07 13:00:09 +02:00
4b2404e903
move utility functions upwards to keep the logical order
2025-08-07 13:00:09 +02:00
ff7598a7e3
rework attributes to be a bit safer and more logical.
...
we are targeting GNU extensions, GNU attributes are a part of that.
added aliases for the new attribute names (name as all caps = shorter
due to `atrb_` prefix)
The aliases are likely to be removed in a later commit
2025-07-31 11:27:57 +02:00
e472d9c251
rename types.h to intdef.h and replace types.h with a symlink.
...
`intdef.h` is more clear in the purpose that it describes, rather than
`types`, `types` is too generic.
Note: floating points are still defined in this header, I imagine this
to be removed later, alongside the compatibility symlink.
2025-07-31 11:27:57 +02:00
d70888f9fb
remove __attribute__((fallthrough)) from all that do not require it. Replace with // fall through in some places for readability
2025-07-24 16:32:41 +02:00
6dbf034ba1
add marker so I remember to add this back in
2025-07-24 16:29:03 +02:00
f3273ed5d0
fix: include my endian.h in nbt.h
2025-07-24 16:29:03 +02:00
6ccb55de8b
remove unused function nbt_cmpstr, since we're performing this check directly now.
2025-07-24 16:29:03 +02:00
69dc174ff2
remove nbt_arrlen function
2025-07-24 16:29:03 +02:00
58d0dd01e2
move nbt_strlen to nbt.h, and rename to nbt_namelen
2025-07-24 16:29:03 +02:00
4005163d61
fix: use atrb_pure for functions reading global state
2025-07-24 16:29:03 +02:00
8964a1a563
fix: atrb for when _MSC_VER is defined did not have parameters
2025-07-24 16:29:03 +02:00
f0c5408c51
fix: error.h should exit with EXIT_FAILURE, rather than 1
2025-07-24 16:29:03 +02:00
1d5df8df0a
apply new formatting rules to the whole project
2025-07-24 16:29:03 +02:00
13e1ceddfc
update nbt_proc function, still inoperable
2025-07-24 16:28:25 +02:00
333417dadd
add funciton for data loading/processing
2025-07-24 16:28:25 +02:00
fd8db02e77
modify the array bytelength function to get the bytelength of a single tag.
2025-07-24 16:28:25 +02:00
2daeb9823c
add a function to get an NBT array bytelength
2025-07-23 14:55:24 +02:00
4e1cd68c38
semantic fix, use explicit fallthrough
...
GCC was complaining, and I didn't have a valid counter argument.
2025-07-23 14:07:06 +02:00
501c623f01
rename nbt_prim_tagsize to nbt_primsize, for consistency.
2025-07-23 13:00:53 +02:00
65ee7c5b55
add a function for checking whether a tag is primitive or not
...
mainly for niche uses
2025-07-23 13:00:53 +02:00
5d7c244c8f
optimise switch of nbt_prim_tagsize
...
had duplicate switch branches, which wastes binary size.
2025-07-23 13:00:53 +02:00
9fd920908e
move nbt_prim_tagsize to header, since it's a pretty useful funciton.
2025-07-23 13:00:53 +02:00
6c2f51929b
write a function for skipping to the next NBT tag
...
including a function for acquireing the array size, and bytesize of a
tag.
2025-07-18 10:29:08 +02:00
ee1811a3a5
rewrite endian header to not interfere with the endian system header.
...
the system header is inconsistently available across platforms.
This header provides the same functionality for less of the cost,
overriding the system macros.
2025-07-18 10:29:08 +02:00
db76d6992b
add function for comparing an NBT string with a C string
2025-07-15 13:51:23 +02:00
8345ac1164
remove nbt_procdat struct
2025-07-15 13:51:23 +02:00
13451da2e8
add basic function signature for processing the NBT data
2025-07-15 13:51:23 +02:00
be87ccbe22
explicitly set hexadecimal values in NBT tags
2025-07-15 10:37:10 +02:00
2cb5d03211
write headers for data processing
2025-07-07 15:02:47 +02:00
600fa0f25e
add map colour definitions.
2025-07-07 14:27:28 +02:00
ceea087a88
remove colour32 typedef, and just use a 4D vector.
2025-07-07 14:27:28 +02:00
9b9a20e226
we are using GNU extensions, using __builtin_bswap* is fine.
2025-07-07 14:27:28 +02:00
271773a28c
replace vectors with SMID vectors.
2025-07-07 14:27:28 +02:00
9de6e7f92e
fix: window resize updates happen each update.
2025-07-03 11:52:27 +02:00
2d059cf1db
apply new formatting rules
2025-07-03 10:55:33 +02:00
d56c69ec4c
remove functions marked "inline" in conf.c
2025-06-20 20:39:59 +02:00
80b8b65b73
define short-hand types for int32/uint32 et cetera
2025-06-20 20:39:59 +02:00
ad66d9465a
remove unused header
2025-06-20 12:35:26 +02:00
cf1ed2a721
make colour definition more consise
2025-06-18 14:17:31 +02:00
16e0c9a95e
use vec2 to store window position
2025-06-18 13:28:03 +02:00
9de057112b
add integer vector types
2025-06-18 13:24:33 +02:00
e686baf5c1
clairify usage of long long with a comment
2025-06-18 13:24:23 +02:00
6a10122858
define some more utility functionality
2025-06-18 13:24:04 +02:00
d28b0189c2
fix: integer types are truncated, rather than clamped. Prefer clamping so values behave as expected for the user.
2025-06-16 13:40:53 +02:00
38aa65942f
cleanup shader code
...
added a cast to uintptr_t, since we're (pretty) certain that both array
pointers point to the same array.
Other than that, made the shader initialization code more consise
2025-06-16 13:40:53 +02:00