Commit Graph

431 Commits

Author SHA1 Message Date
d4e281a477 fix: makefile .PHONY directives were non-functional
It appears that .PHONY, and all other special built-in target names
should only be defined once, and should not be used as a "tag", as I
have done here.
2026-02-05 15:46:03 +01:00
8a01cd3a47 Update files' copyright headers (final time, promice)
This should be the end of the identity crisis with files' copyright
headers/disclosures.
We shall not be using names in the headers, since this does not make
sense, this is covered by the git logs, and is preferred.

The following commit will tackle the CONTRIBUTORS file, to specify how
it should be generated.
2026-02-05 12:15:48 +01:00
af0b82ea32 Define .mailmap due to e-mail change. 2026-02-04 10:56:57 +01:00
dee2b33e9b Update all documentation files to be more accurate.
Deleted two files which is just me rambling about unimportant stuff.

These files were created as a response to my personal experience in
working with other people, which has been quite negative so-far. I have
since learnt that this is not normal in most spaces, yet these files
didn't reflect this adjustment in perspective. They remained overly
negative and no longer reflect my views and should be rewritten. I
appologise.
2026-02-03 09:03:30 +01:00
9a96134872 Add a warning for variable length arrays 2026-02-02 11:32:27 +01:00
11a5e8dc4a Switch over to GNU17 C standard.
The main decision is due to GNU17 being more "modern", and more
accurately reflecting practices of today.
2026-02-02 11:28:26 +01:00
455072f0e7 fix: not using NAME for install and install-strip prerequisites 2026-01-25 09:40:14 +01:00
ae2989b5eb fix: potential NULL-dereference if buffer is corrupt. 2026-01-23 12:40:46 +01:00
5db8156824 Include cflags in sprase invoke 2026-01-23 12:27:00 +01:00
fa5dc7ed45 fix: licence badge was not linking to the correct file. 2026-01-22 17:41:32 +01:00
c4504e61d4 Reflow documentation 2026-01-22 17:37:40 +01:00
3518df8191 Add comment annotations 2026-01-22 17:37:40 +01:00
a73e03be50 Allow for customising makefile behaviour consistently. 2026-01-22 17:37:40 +01:00
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
dae2c5bda4 Add force attribute to the casts in endian.h 2026-01-22 16:02: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
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