Commit Graph

29 Commits

Author SHA1 Message Date
ISSOtm
e5078aba3b Clean up #includes
Remove unused headers, and avoid relying on transitive inclusions

`include-what-you-use` has been very useful for this!
2024-03-28 01:25:38 +01:00
ISSOtm
cae7b5dcf6 Use standard attribute syntax instead of IBM __attribute__
Move format attrs to proper standard location

For some reason, GCC 13 is more lax than earlier versions...
2024-03-27 20:01:12 -04:00
Sylvie
e74073e480 Run clang-format on everything (#1332) 2024-03-04 14:22:49 -05:00
Evie
6b67c82b94 Implement -c #none (#1301)
Also adds a test case for round-tripping `-r` with `-c #none`.
2024-03-03 18:45:33 -05:00
Rangi42
d812acff24 Check RGBGFX warning/error format strings with format_ macro 2024-03-02 23:17:54 -05:00
ISSOtm
6b559e99b2 Revert "Switch to using std::filesystem (#1235)"
This reverts commit cf62ff772f.
Some functions used by this break on macOS before 10.15,
which we want to keep supporting.
2023-12-30 23:20:04 -05:00
Rangi
cf62ff772f Switch to using std::filesystem (#1235)
Allows better platform-agnostic path manipulation.
Also, using `std::optional` rather than empty strings allows
correctly handling empty arguments (treating them as such,
instead of acting as they were never passed).
2023-11-13 18:10:09 +01:00
Rangi
e824e34526 Use an iterator template for enum sequence loops (#1228) 2023-11-12 09:19:19 +01:00
Rangi
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00
Rangi
f8af569680 Shorten license comments and consolidate an AUTHORS file (#1217) 2023-11-05 09:54:32 +01:00
Rangi
fa13611bbf Make comments more consistent
- Changes most `/* comments */` to `// comments`
- Changes `/**` block comments consistently to `/*`
- Adds consistent license comments to all files

Also renames `T_POP_SET` to `T_Z80_SET`
2022-08-30 07:51:32 +02:00
ISSOtm
b02ccf8f4a Check before attempting to generate empty image
This causes a libpng warning then error, but print a better error message
Fixes #1016
2022-08-04 20:40:20 +02:00
ISSOtm
2e0991f32b Use proper 16-bit type for image reversing width
Fixes #1015
2022-08-04 20:40:20 +02:00
ISSOtm
ca8693690a Cancel -U option
As it turns out, it is really difficult to implement, and can be dealt with later.
2022-07-02 17:04:17 +02:00
ISSOtm
3f70372308 Implement slicing input image 2022-07-02 17:04:17 +02:00
ISSOtm
3f5983358c Add proper error message for bad manual palettes 2022-07-02 17:04:17 +02:00
ISSOtm
7a7126f3b8 Implement bit flipping with a lookup table
Should improve performance.
This version is cooler, and also does not suffer from iteration limits
2022-07-02 17:04:17 +02:00
ISSOtm
05e36767b0 Implement "palette map" output 2022-07-02 17:04:17 +02:00
ISSOtm
6feb1fb73a Retire -f 2022-07-02 17:04:17 +02:00
ISSOtm
cc27169ecd Implement preliminary version of "reverse" feature
Not hooked to all RGBGFX flags yet, but good enough for most use cases
(and as a base for future development, should I need to `reset --hard`.)

TODOs marked appropriately.
2022-07-02 17:04:17 +02:00
ISSOtm
3c9d5b05d6 Implement transparency handling
Though none of this has been tested so far...
2022-07-02 17:04:17 +02:00
ISSOtm
6bab2ea5c8 Add different verbosity levels
And also some ASCII art, perhaps?
2022-07-02 17:04:17 +02:00
ISSOtm
c4361b965c Remove <filesystem>
Should fix compilation with GCC before 9
2022-07-02 17:04:17 +02:00
ISSOtm
20442c8a43 Add compatibility hack for unused colors in indexed PNGs 2022-07-02 17:04:17 +02:00
ISSOtm
bf9f99ebf5 Reorder Options members by usage order 2022-07-02 17:04:17 +02:00
ISSOtm
e8d8ae4c78 Print all configuration on verbose startup 2022-07-02 17:04:17 +02:00
ISSOtm
3fa1854332 Implement enough functionality to compile & match pokecrystal 2022-07-02 17:04:17 +02:00
ISSOtm
6e406b22bb Implement more features and fix bugs 2022-07-02 17:04:17 +02:00
ISSOtm
8c62e80c18 Reimplement basic RGBGFX features in C++
Currently missing from the old version:
- `-f` ("fixing" the input image to be indexed)
- `-m` (the code for detecting mirrored tiles is missing, but all of the
        "plumbing" is otherwise there)
- `-C`
- `-d`
- `-x` (though I need to check the exact functionality the old one has)
- Also the man page is still a draft and needs to be fleshed out

More planned features are not implemented yet either:
- Explicit palette spec
- Better error messages, also error "images"
- Better 8x16 support, as well as other "dedup unit" sizes
- Support for arbitrary number of palettes & colors per palette
- Other output formats (for example, a "full" palette map for "streaming"
  use cases like gb-open-world)
- Quantization?

Some things may also be bugged:
- Transparency support
- Tile offsets (not exposed yet)
- Tile counts per bank (not exposed yet)

...and performance remains to be checked.
We need to set up some tests, honestly.
2022-07-02 17:04:17 +02:00