Commit Graph

218 Commits

Author SHA1 Message Date
d79fec3f91 fix the simple semantic type issues.
Fixed all the simple issues when it came to type semantics. The
remaining warnings/errors are near buggy / poor quality code, and need a
finer comb to resolve.
2026-01-22 16:14:25 +01:00
568f4e48cb fix: use && instead of &
This is to silence the sparse `warning: dubious usage of x & !y`.
The difference is insignificant and I am not going to argue sparse here.
2026-01-22 16:02:25 +01:00
a082fc8a4e fix: Using 0 instead of NULL when assigning to tmp.
This will likely lead to confusing usage of `tmp`.
2026-01-22 16:02:25 +01:00
0d59153a58 fix: sparse issue with EXIT_FAILURE.
EXIT_FAILURE aparrently is defined the same for every platform, so there
is no fucking difference using this macro.
2026-01-22 16:02:25 +01:00
ebcd150415 Delete all rendering / graphics code.
Whilst it was fun to experiment with OpenGL, I do not see myself
maintaining a codebase using that, when all I do is draw bloody pixels
to a buffer.
Thus begins the search for a... more suitable graphical framework.
2026-01-22 16:02:25 +01:00
d81502588f add a static assertion to ensure that the platform compiles right-shifts to sar. 2026-01-22 16:02:12 +01:00
51dc8f85a6 Rewrite endian.h to utilise the new endian-specific integer types, for better type safety. 2026-01-22 12:25:39 +01:00
1400e93b6d Add format specifiers for logging macros. 2026-01-22 12:25:39 +01:00
102f9295fd Delete __VA_OPT__ from logging macros, since this is unnecessary. 2026-01-22 12:25:39 +01:00
f5784844a8 Move more of the utility headers into /include/mcaselector-lite.
These headers have no associated C files, and are mainly used for
utility logic.
Having them in `/include` makes them more easily located, and more
globally used.

We are using "classic" header guards here over `#pragma once` for better
support. Since `#pragma once` is defined by the compiler, rather than
standard C.
Why isn't it used across the project? I have no idea.
2026-01-21 17:27:54 +01:00
c259a90fa4 Rename CONF_I* to CONF_S, to match the recent typedef change.
Note: not changing `NBT_I*` macros, since the NBT specification does not
specify a difference between signed/unsigned types. Generally speaking,
internally we treat these as unsigned types for the purpose of
computations being correct.
2026-01-20 11:24:03 +01:00
aa09b6591f Migrate from i* signed integer type definitions to s* integer definitions.
The `s*` format is preferred due to it being
2026-01-20 10:26:14 +01:00
91383e205f Remove /test and /.github, the CI/testing framework.
The unit tests and continious integration is... exessive.
Yes, it's useful, but creates more complications than that it helps, so
it is removed for the time being. Maybe I will add a new framework at a
later date, but at the moment it is constraining development.
2026-01-15 13:35:38 +01:00
b595d83468 add value processing to conf.c 2025-12-18 17:42:00 +01:00
3a2041194c switch to GPL-2.0-only licence 2025-12-18 17:42:00 +01:00
9e8f5958c7 write conf scripts 2025-12-15 18:52:47 +01:00
bc0743a72b add __assume__ macro definition in atrb.h 2025-12-15 12:32:34 +01:00
81b21ff7ce move windowing code into io/win 2025-12-15 10:02:54 +01:00
7df20e9aa1 remove mapcolour files, since we don't use them 2025-12-15 09:56:45 +01:00
5cf0292ebe delete configuration logic
The configuration logic was violating alignment rules, and will be
rewritten.
2025-12-15 09:54:57 +01:00
64b06d88c8 fix: error headers were needlessly backing out of util/ 2025-12-15 09:54:17 +01:00
8bb8671fb0 rephrase the header a little, to not be confusing when a file is copy-pasted. 2025-11-13 22:29:41 +01:00
8d0e825157 rewrite copyright file header to provide more information about where the file is from. 2025-11-13 22:24:09 +01:00
316726a610 tmp: revert enabling a column limit 2025-10-16 23:35:30 +02:00
1aa34f7d3f enable a column limit. 2025-10-09 21:12:53 +02:00
00719b1933 refactor code with new formatting rules
Functions now break before their brace, mirroring the Linux kernel.
The reason for this is that breaking the parameter list otherwise makes
code unreadable.
2025-10-09 19:02:16 +02:00
eb45650178 fix: use uintptr over usize in locations where applicable 2025-10-09 18:35:39 +02:00
8ca49aa4fa fix: ssize got removed in rework of intdef.h/types.h. 2025-10-09 12:28:24 +02:00
d4fabf437c reformat the code by enabeling assignment- and declaration alignment. 2025-10-09 12:17:04 +02:00
cebe0df8a2 move /src/error.? to /src/util/error.? 2025-10-09 12:16:38 +02:00
aa58d931aa move /src/util/intdef.h to /src/util/types.h 2025-10-09 12:16:06 +02:00
27c862c215 rework intdef.h to not rely upon standard library headers by using predefined macros. 2025-10-09 12:05:05 +02:00
6eb7d126da create a custom definition for size_t and ssize_t, which is ssize and usize, for conveinience. 2025-09-18 10:39:57 +02:00
76c992efdc note about the memory leak I could not locate within my code.
hint: I couldn't locate it, because it isn't in my code.
2025-09-15 15:14:08 +02:00
28b98705f5 refactor the lot a bit, for clairity. 2025-09-15 15:08:15 +02:00
057b234251 fix: don't free window twice 2025-09-15 15:07:41 +02:00
dd2f4c403c add copyright information to error.c 2025-09-15 14:23:03 +02:00
dc3abf992b handle window exits more gracefully and appropriately. 2025-09-15 14:23:03 +02:00
1e10fec9c6 rename input callback to something more appropriate. 2025-09-15 14:12:18 +02:00
41d944ac21 remove old/stale code from main.c 2025-09-15 14:00:40 +02:00
faa93f4372 remove needless inline function from main.c
this is shorter, does the same, and this was an incorrect application of
`inline`.
2025-09-15 13:58:47 +02:00
e3c0afbb2f fix: glfw error logging inconsistent with how the rest of our application logs errors. 2025-09-15 13:55:32 +02:00
25fa078c98 add a check for debug logging, to only log when the environment variable DEBUG is set to 1 2025-09-15 13:51:36 +02:00
023123e54f make debug loggers not be needlessly abbreviated. 2025-09-15 13:06:20 +02:00
b04ce9998f fix: shader hex code is formatted incorrectly 2025-09-15 11:59:39 +02:00
218b98e684 fix: colour coding on error messages is incorrect 2025-09-15 11:59:39 +02:00
f20171c0d7 fix: using the linker for generating a .o file is a feature for only GNU ld.
Now utilising a process to generate a .c file using `xxd`, and compiling
those to object files.
2025-09-15 11:59:39 +02:00
4f081e7f3e remove usage of mempcpy; this is apart of GNU C 2025-09-13 21:09:56 +02:00
8548c2d037 fix: log macros were using GNU extensions without them needing them.
We can optionally add `,` utilising the `__VA_OPT__` macro. However,
this lead to the next problem, which is that an empty vardiac parameter
is a C23 extension. This was solved by dropping the string parameter,
making it be part of the vardiac parameters.
2025-09-13 20:25:38 +02:00
f0d14e76b2 write decompression logic up to the point of hanelling the buffer. 2025-09-10 12:52:35 +02:00