Commit Graph

272 Commits

Author SHA1 Message Date
ISSOtm d5ce5329ea Fix compilation with GCC 9 2026-04-26 23:30:59 +02:00
Rangi b3c3981a90 Use a separate CI step to install clang-format before running it
Also use short `-Yqu` flags like our other invocations
2026-04-15 20:12:48 -04:00
ISSOtm a802bcb320 Switch MinGW building to CMake
Automatically grabs and compiles libpng, and avoids having hacky lines in our Makefile
(the compiler specification *should* be orthogonal to the build target!)

Also move the MinGW package install to the `install_deps.sh` script,
to move logic off of the YAML.
2026-04-16 00:57:33 +02:00
Rangi 63a911e657 Specify -std=c++20 not c++2a (#1877) 2025-12-21 11:44:14 -05:00
Rangi 8ab4602ae5 Add -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG to develop builds (#1859) 2025-11-16 13:11:08 -05:00
Rangi f065243cd2 Enable RGBGFX's CLI "at-files" for all programs (#1848) 2025-10-22 17:05:59 -04:00
Rangi 7462bccb72 Move struct Palette into its own file (#1850) 2025-10-20 16:59:24 -04:00
Rangi42 024b33b63a make format should apply to all .cpp and .hpp files 2025-09-05 21:05:58 -04:00
Rangi 02b880e1b0 Separate RGBFIX header fixing from CLI option parsing (#1808) 2025-08-28 12:28:08 -04:00
Rangi 3d155d5695 Some refactoring and cleanup (#1806)
* Use clang-tidy `misc-include-cleaner` for IWYU `#include` cleanup

* Use `std::optional<size_t>` instead of `ssize_t`

* Rename some functions in linkdefs.hpp

* Fix header order
2025-08-20 16:09:04 -04:00
Rangi42 386fb5f398 Add more character utility functions 2025-08-19 19:17:40 -04:00
Rangi 0c4c25b2d2 Add a little more test coverage (#1805)
Format main.cpp files more consistently

Add `make format` to run clang-format on everything
2025-08-19 15:26:23 -04:00
Rangi db6793f444 Don't count single quote ' as garbage (#1801)
Also copy the "blank space" (space or tab) vs "whitespace" (space,
tab, or newline) convention from `<ctype.h>`
2025-08-14 10:10:59 -04:00
Rangi 9c3ce69180 Factor out shared backtrace code (#1793) 2025-08-12 17:56:54 -04:00
Rangi 5f8b7474b4 Add -B/--backtrace option to RGBASM and RGBLINK (#1787) 2025-08-11 14:30:14 -04:00
Rangi 23ce888d65 Use colored/styled text output for diagnostics and usage info (#1775) 2025-08-04 17:02:24 -04:00
Rangi 752b273aec Extend RGBASM and RGBLINK verbosity flags to have multiple levels like RGBGFX (#1772) 2025-08-02 17:10:10 -04:00
Rangi42 75aed1afd5 Factor out an UpperMap for case-insensitive matching 2025-07-28 00:00:24 -04:00
Rangi42 b2747dfbd8 Factor out common usage-help code 2025-07-27 19:20:04 -04:00
Rangi42 16e16cdf51 Split up the linkerscript lexer and layout actions 2025-07-27 13:38:20 -04:00
Rangi42 a353637a90 Split RGBLINK linkerscript parser functions into their own file 2025-07-27 11:31:25 -04:00
Rangi42 f3cbfcecf4 Split RGBASM parser action functions into their own file 2025-07-26 16:20:25 -04:00
Rangi 0df5b7b86d Implement warning diagnostic flags for RGBFIX (#1766)
* Implement warning diagnostic flags for RGBFIX

* `-m/--mbc-type help` prints to stdout

* Support `-m list` as well as `-m help`

* Make invalid `rgbfix -l` characters a fatal error, like other invalid CLI arguments

* Refactor fix/main.cpp into multiple files
2025-07-26 12:11:52 -04:00
Rangi42 1849a35e61 Rename proto-palettes to color sets (copied from rsgbds) 2025-07-23 21:13:46 -04:00
Rangi 7e151f16c3 Factor out a single PNG-reading function to encapsulate the libpng API (#1765) 2025-07-23 15:53:33 -04:00
Rangi42 8e84850679 Run clang-tidy with make tidy 2025-07-18 10:10:34 -04:00
Rangi42 e31256c0d4 Remove rgbasm-only -lm from Makefile 2025-07-18 08:22:40 -04:00
Rangi 5e43ece578 Remove errx and errors.hpp (#1737) 2025-07-09 11:04:23 -04:00
Rangi 35962dedc4 Refactor warnings and errors (#1728)
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too

* Separate RGBGFX and RGBLINK warnings/errors from main options

* Separate `report` function into `error` and `fatal` messages

* Implicit newlines for most RGBASM errors
2025-07-08 12:58:23 -04:00
Rangi c9765ec158 Factor out program-independent warning diagnostic code (#1725) 2025-07-07 18:34:34 -04:00
Rangi 41c94aa448 Omit the version number from distrbuted release archive filenames (#1685) 2025-05-06 13:28:54 +02:00
Rangi42 c841672059 Don't use tabs for alignment 2025-03-31 19:13:46 -04:00
Rangi 03452c6d4f Allow git describe to get the version for FreeBSD and Cygwin in CI (#1640)
* Specify `safe.directory`
* Fetch tags
* Fetch all commits
2025-01-29 19:57:15 -05:00
Rangi 8363f25d47 Enable more sanitizers in make develop (#1588)
- `-fsanitize=undefined` encompasses multiple checks we were specifying

- "detect_leaks=1" for `__asan_default_options` checks for memory leaks
  (except for with macOS clang++, which does not support LSan)

- `-fsanitize=float-divide-by-zero` is an extra UBSan check
  (and reveals a UB bug to fix with fixed-point `DIV` and `LOG`)
2024-12-31 10:02:20 +01:00
Sylvie c1b85554a8 Document obsolete syntax in rgbasm-old(5) (#1571) 2024-12-10 12:34:37 -05:00
Sylvie b877c81c32 Use C++-style casts (#1576) 2024-12-09 21:56:54 -05:00
Sylvie d5ded84501 Move definition of _POSIX_C_SOURCE to include/platform.hpp (#1524) 2024-09-29 23:53:15 +02:00
Sylvie 7330c2c606 Replace unmangle with cygpath (#1490)
Use `-m` not `-w` so paths use forward slashes
2024-08-31 00:10:44 -04:00
Rangi42 0adff57e2c Sync warning flags between Makefile and CMakeLists.txt 2024-08-08 16:02:11 -04:00
ISSOtm 60f9e86361 Pass libpng CFLAGS when building rgbgfx_test.cpp too
Don't ask me how this hasn't broken earlier, but hey, now it's fixed
2024-08-08 20:30:31 +02:00
ISSOtm 1ad9383042 Disable optimisations in make debug
I am starting to feel aggravated by `$1 = <optimized out>`
2024-08-08 11:15:19 +02:00
Sylvie 0433714d77 Allow a suffix (e.g. the version) to be added when installing (#1406) 2024-06-18 22:06:43 +02:00
Rangi42 6b5248f15b Add a build target for include-what-you-use 2024-03-29 20:49:09 -04:00
Rangi42 6560b7819d Add make profile, optimized for callgrind 2024-03-21 11:42:12 -04:00
Sylvie 68f6ab5c32 Add test cases for SECTION UNION defining multiple identical labels (#1349)
Exported labels should fail to link; non-exported ones should be okay.
2024-03-13 13:34:44 -04:00
ISSOtm b9596890c9 Disable a Clang warning
Fixes `make develop` with Clang 17.
The warning only triggers on the auto-generated `yynerrs_` in `src/asm/parser.cpp`,
so it's not very useful to us right now.
2024-03-13 00:04:11 +01:00
Sylvie 292adb27a3 Adapt the RGBASM parser to C++ (#1333)
This uses variants instead of a `%union`, and "complete symbols"
that can call complex constructors.
2024-03-06 20:40:36 -05:00
Rangi42 cdb9315366 Use std::vector for rgbfix ROMX data
Statically links libstdc++ for 32-bit MinGW
2024-02-29 13:44:08 -05:00
Rangi42 d53bba97e8 Remove our custom hashmap 2024-02-29 13:44:08 -05:00
Sylvie 54d6a22d19 Build with pedantically standard C++ (#1309)
* Remove array designators (not standard C++)

* Build with pedantically standard C++
2024-02-23 16:46:53 -05:00