Commit Graph

106 Commits

Author SHA1 Message Date
Sylvie
66fd5a7062 Fix some usually disabled compiler warnings (#1286)
* Fixes from temporarily re-enabling more compiler warnings

* More edits suggested by cppcheck

* Fix hanging on append_yylval_string

* Fix FOR loop increment
2024-01-18 20:47:20 +01: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
6f0ffcf3e1 Remove deprecated RGBGFX options (#1246) 2023-11-21 23:30:34 +01:00
Rangi
f5ae6a80f0 Rename the RGBGFX --output-* options to --auto-* (#1245)
Fixes #1243
2023-11-21 17:52:16 +01:00
Rangi
083a82f6d1 Implement rgbgfx -O (#1240) 2023-11-21 10:19:44 -05:00
Rangi
232416b30d Fix the hack for File::c_str to work (#1242) 2023-11-14 13:38:18 +01: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
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00
Rangi
143e76b7e3 Output the map file summary at the top of the file (#1203) 2023-11-05 15:43:58 +01:00
Rangi
f8af569680 Shorten license comments and consolidate an AUTHORS file (#1217) 2023-11-05 09:54:32 +01:00
Rangi
259ec58140 Implement ENDSECTION (#1211) 2023-11-04 23:41:17 +01:00
Rangi
5a25c547ab Allow rgbgfx to generate a palette from a spec, without an image (#1192) 2023-11-02 20:12:48 +01:00
Rangi
0d72ba886b Consistent behavior with missing or incorrect parameters (#1179) 2023-11-02 17:40:40 +01:00
ISSOtm
cfe432ea65 Enforce that transparent colours take slot #0 in all palettes 2023-08-26 23:23:28 +02:00
ISSOtm
3e5cd8ce1a Use a special name for stdin/stdout in diagnostics 2022-11-15 19:49:04 +01:00
ISSOtm
6902387991 Allow rgbgfx - for stdin and stdout
Closes #1087
2022-11-15 19:49:04 +01:00
ISSOtm
d90a7e4302 Terminate RGBGFX when opening a file fails
`std::filebuf::open`'s result must be checked, though that's not obvious.
2022-10-04 13:58:05 +02:00
Rangi
5ad8a8c958 Warn when a duplicate CLI argument overrides a previous one (#1053)
Fixes #1050
2022-09-25 10:04:30 +02: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
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
d9b1402ef8 Fix RGBGFX number parsing 2022-07-02 17:04:17 +02:00
ISSOtm
05e36767b0 Implement "palette map" output 2022-07-02 17:04:17 +02:00
ISSOtm
fcce42d3d2 Avoid sorting proto-palettes breaking mappings
The sorting was performed without updating the mappings, which broke the world.
We can instead sort the IDs as they are inserted into the packing queue,
which should also be faster than moving the actual proto-pal objects around.
2022-07-02 17:04:17 +02:00
ISSOtm
7fdc6cbced Fix erroneous tabs in rgbgfx usage text
Thanks @GreenAndEievui!
2022-07-02 17:04:17 +02:00
ISSOtm
7927dfd2e3 Remove negative values in parseNumber checking
Including removal of a dead & useless check.
By the way, fuck integer promotion.
2022-07-02 17:04:17 +02:00
ISSOtm
02d957278d Document output formats 2022-07-02 17:04:17 +02:00
ISSOtm
6feb1fb73a Retire -f 2022-07-02 17:04:17 +02:00
ISSOtm
91071009a8 Implement some external palette specs
PSP, ACT, and ACO are complete
2022-07-02 17:04:17 +02:00
ISSOtm
1da884db15 Handle processing errors appropriately
Alter the return status accordingly, and print the error counts on exit
2022-07-02 17:04:17 +02:00
ISSOtm
ef473de75a Explicitly error out if no input image is given 2022-07-02 17:04:17 +02:00
ISSOtm
6b0cab32a6 Implement inline palette spec parsing 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
75f8b16f33 Implement "at-files" for RGBGFX
Useful for persisting flags outside of the build system
2022-07-02 17:04:17 +02:00
ISSOtm
188027bccc Rename convert to process
More consistent with its "main" function's name
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
e86eb9337a Check the range of the CLI-specified palette size 2022-07-02 17:04:17 +02:00
ISSOtm
b0f8e04fb7 Do not do anything if option parsing goes wrong 2022-07-02 17:04:17 +02:00
ISSOtm
493b94919f Fix -TAP being non-functional 2022-07-02 17:04:17 +02:00
ISSOtm
943d631701 Implement max palette count 2022-07-02 17:04:17 +02:00
ISSOtm
76bb950be5 Parse bank capacities 2022-07-02 17:04:17 +02:00
ISSOtm
f29c5d81ec Provide a per-option sane default when number parsing fails 2022-07-02 17:04:17 +02:00
ISSOtm
2307981878 Parse base tile IDs 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
71cb2854e8 Use cinttypes instead of inttypes.h
Fixes build on some compilers for some reason I fail to understand
2022-07-02 17:04:17 +02:00
ISSOtm
97965c9766 Revamp number parsing and remove <charconv>
Support all intended formats and allow partial parsing
<charconv> is not available in GCC 7
2022-07-02 17:04:17 +02:00
ISSOtm
5efc49cb12 Change UseTab to ForIndentation
This fixes many whitespace issues
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