Commit Graph

415 Commits

Author SHA1 Message Date
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
94f4688ba6 fix: ASSUME not defined if unavailable 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
401d7acc69 fix: Sparse executing one-by-one is more of an issue than a help.
This causes the makefile to stop execution as soon as sparse fails,
hiding errors in any other file.
2026-01-22 15:36:02 +01:00
4679d6bbc5 clean makefile 2026-01-22 12:54:43 +01:00
bfc108bd78 Write install, install-strip, and uninstall targets. 2026-01-22 12:53:08 +01:00
7ef3d16b53 Use NAME instead of hard-coding the name.
Windows NT systems use the `.exe` extension, and thus binary name cannot
be hard-coded.
2026-01-22 12:52:47 +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
44b3af2b46 Add differing integer types for integers with different endianess.
This is inspired by the Linux kernel source code, and reduces
endianess-related bugs.
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
a4a0b2e845 Add check recipe, which checks the code using sparse. 2026-01-22 12:25:39 +01:00
52d1f9a6f7 Add C files produced in /res to gitignore 2026-01-22 12:25:39 +01:00
8f49ae45bb Modify clang format to allow short functions to be put on a singular line. 2026-01-21 17:27:54 +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
cf79f7fdc8 Use native packages over included submodules.
This is the best option out of all, since it removes the requirement of
manually managing the dependencies, and should not matter for stable
ABI.
2026-01-21 15:57:22 +01:00
2192acbc9d fix: Second LDFLAGS not used. Replace variable appending with escaping.
This reduces the probability for this happening in the future, and
improve overall clairity.
2026-01-21 11:02:17 +01:00
2ae24f588c Remove a large section of .editorconfig to allow for customisation with specifying a tab width.
Users of the codebase may now use `tab_width` to override the preferred
indentation width, i.e. the width of the tabulation character.
2026-01-21 10:22:44 +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
1b1e906015 Rework Makefile, to be more robust, reliable and minimal.
- Improved logic for overriding compiler flags.
- Made tooling and logging more robust.
- Added functionality to disable "silent mode" by listening to
`--no-silent`
- Removed OSX/Darwin build support (for now)
- No longer utilising /obj directory, but instead just building files
right in the worktree.
- Generating dependency files seperately from general code, for
clairity.
2026-01-15 21:23:34 +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
0d0038735f Rework some values in .clang-format for better consistency. 2026-01-15 12:01:47 +01:00
40c1fd7dc4 fix: GNU Make predefines variables, and ?= will not behave as expected. 2025-12-22 14:22:37 +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
5f909d1d65 rework the flow of the Makefile. 2025-10-23 15:28:42 +02:00
87541d5789 modify Makefile to be more in-line with the GNU standard.
Mainly so the makefile is a bit less esoteric to use, debugging flags
must be specified manually.

changed:
- `$RM` for calling `rm`
- removed unused `$ISWIN`
- renamed `test` to `check`
- added `install` and `install-strip` recipes, which for now remain
empty
- added `-g` to `$CFLAGS`, since it helps debugging, and in case of
failures makes bug report less of a headache.

I decided to not modify it further so "specialised tools" don't need to
store files in the git repo, which seemed to complicate logic.
This is the same reason to why I chose to not adapt clean in a way to
introduce `mostlyclean`.
2025-10-20 15:19:24 +02: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
1e24a4ee92 add a CI status badge to the README.md 2025-09-18 09:58:05 +02:00
181fca6828 fix: windows test; USERPROFILE should also result in a roaming path. 2025-09-18 09:50:56 +02:00