Rangi
17475648cc
Implement -c embedded:multiple ( #2194 )
2026-10-03 13:26:02 -04:00
Rangi
27a0a6bc2a
Use named constants for meaningful numbers in RGBGFX ( #2233 )
2026-10-29 00:19:33 +01:00
Rangi
1e9e2ad5fa
Fix reversing an image with an empty -c/--colors spec file ( #2228 )
2026-10-22 15:30:43 -04:00
Rangi
b99069e25d
Fix reversing an image with an empty -p/--palette file ( #2227 )
2026-10-22 14:41:11 -04:00
Rangi
d1fb662501
Fix rgbgfx -c/--colors to read GBC palettes with less than 4 colors ( #2216 )
2026-10-16 01:47:23 +02:00
Rangi
c0a16e4bad
Move File-opening of PNG image into Png constructor ( #2161 )
...
Also rename `File::c_str` to `display_name` for clarity
2026-09-27 13:19:05 -04:00
Rangi42
f37e289fde
Fix off-by-one error in transparent palette count
2026-09-27 09:07:33 -04:00
Rangi
fd7715dcb0
Fix inconsistent handling of transparent colors in the middle of palettes
2026-09-26 19:20:18 +02:00
Rangi
e6e5133bcf
RGBGFX honors -c/--colors in -r/--reverse mode ( #2144 )
...
f4463b17 (#1254 ) was an incomplete fix for #1166
2026-09-26 19:13:34 +02:00
Rangi
408e861ecc
Correct warning message about different RGBGFX -L and -r widths
2026-09-20 14:32:04 -04:00
Rangi
89403ca23b
Fix RGBGFX to support -C/--color-curve in -r/--reverse mode ( #2110 )
...
Clarifies error message when RGBGFX reverse mode has `-c` mismatching `-p`.
2026-09-18 17:35:22 -04:00
Rangi
7746ddbf2b
Fix reverse-graphics check for whether the tilemap references too-high tile IDs in bank 1 ( #2086 )
2026-09-14 10:26:57 -04:00
Rangi
82f58b95ac
Fix reversing some images with an input tileset ( #2081 )
2026-09-13 21:00:58 +02:00
Rangi
520cc2a80d
Fix reversing a tilemapped image with -x trimmed tiles
2026-09-12 15:38:34 -04:00
Rangi
e9c800b3be
Fix reversing 1bpp images
...
Fixes #2075
2026-09-12 14:17:33 -04:00
Rangi
439a7a1828
Fix reversing multiple palettes with fewer than 4 colors per palette
...
Fixes #2073
2026-09-12 11:50:47 -04:00
Rangi
8a6b1946e3
Parse inline palette specs after getting CLI palette size limit ( #2054 )
2026-09-10 18:54:24 +02:00
Rangi
8988cdde46
Fix reversing images with fewer than 4 colors per palette
2026-09-03 13:39:24 +02:00
Rangi
0af28de791
Fix assertion failure on nonzero base palette ID without an attribute map or palette map
...
Also fix palette map IDs to wrap at 256, not at 8 like attributes
2026-07-19 23:59:38 -04:00
Rangi
dff176791c
Correct grammar "is" vs "are" in RGBGFX reverse mode error messages
2026-07-14 11:29:30 -04:00
Rangi
07f5969005
Consistency check the palette map, not just the attribute map
2026-07-14 11:27:41 -04:00
Rangi
d61c0561c1
Correct condition to completely print both palettes and options.palSpec
2026-07-14 11:23:03 -04:00
Rangi
e7855ea1b8
Fix reverse mode with -s/--palette-size too small for the tile data
2026-07-14 01:11:11 -04:00
Rangi
c0ff3d92ad
Fix reverse palette offsets when base palette ID wraps around to 0
2026-07-13 23:08:20 -04:00
Rangi
e4583e7ac2
RGBGFX reverse mode checks for too-low palette IDs, not just too-high
2026-07-13 23:08:20 -04:00
Rangi
8b951bc047
Fix a flaky/random-seed rgbgfx_test test failure
...
Commit 21eaa2d2cc missed some
intentional unsigned underflow that is needed to set `nbTilesInBank`.
Without it, some of the randomly-seeded RGBGFX tests, such as
`./rgbgfx_test seed8.bin -b 207 -N 54,256`, can fail with "Color
mismatch after round-tripping" errors.
2026-07-13 21:31:05 -04:00
Rangi
21eaa2d2cc
Fix a > to >=, and avoid underflow in some sanity checks
2026-07-13 13:14:06 -04:00
Rangi
7b39bcd412
Refactor expression for clarity
...
`tileData[realY + 1 % options.bitDepth]` relied on order of
operations and the fact that `1 % 1 == 0` but `1 % 2 == 1` for
correct indexing. However, it was not obvious at first glance,
and confusable with the more common `(base + offset) % size`
pattern. (And would need changing anyway if we ever support 4bpp.)
2026-07-10 14:30:25 -04:00
Rangi
276a1a7952
Use const_cast more precisely to remove const without changing type
2026-07-08 16:42:53 -04:00
Rangi42
12186fdccc
Keep more non-declaration initialization within the for loop clause
2026-04-19 22:01:56 +02:00
Rangi
2666dcbc26
Remove exclamation marks and periods from error messages ( #1874 )
2025-12-10 11:50:33 -05:00
Rangi
7462bccb72
Move struct Palette into its own file ( #1850 )
2025-10-20 16:59:24 -04:00
Rangi
cca3794dd0
Mention libpng in its internal warning and error messages
2025-10-06 17:03:51 -04:00
Rangi42
a82fd17529
Simplify RGBGFX code by using fewer templates
2025-09-20 21:06:51 -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
Rangi
7b405513d9
Make quote marks consistent in error/warning messages ( #1791 )
...
- "Double quotes" for strings (filenames, section names, CLI option arguments, etc)
- 'Single quotes' for characters and CLI option flags
- `Backticks` for keywords and identifiers (symbol names, charmap names, etc)
CLI option flags also have their leading dashes
2025-08-12 15:24:21 -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
2ce4cdbff6
Reduce deep nesting some more, including larger refactors to assign.cpp
2025-07-22 19:38:49 -04:00
Rangi
0c96234532
Use concrete types instead of auto when convenient and not redundant ( #1757 )
2025-07-17 14:59:51 -04:00
Rangi
5e43ece578
Remove errx and errors.hpp ( #1737 )
2025-07-09 11:04:23 -04:00
Rangi
5de05e2e4b
Replace DefaultInitVec with std::vector ( #1732 )
2025-07-08 14:55:28 -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
Rangi42
185a3b29e6
Implement base palette ID
2025-07-06 12:57:20 +02:00
Rangi
7054d81650
Implement grayscale DMG palette specs ( #1709 )
2025-06-30 14:53:05 -04:00
Rangi
b13d623ad4
Encode reversed PNG images as grayscale or indexed when possible ( #1703 )
2025-06-19 09:48:27 -04:00
Rangi
7c6f778ae7
Take care of miscellaneous commented TODOs ( #1676 )
2025-05-02 16:44:12 -04:00
Rangi
0150eb4bf3
Exclude more lines from test coverage ( #1663 )
...
These fall into a few categories:
- `_unreachable()`
- Verbose print messages
- Errors that should never practically occur (alloc/read/write failure,
more than UINT32_MAX anonymous labels, etc)
2025-02-17 04:56:10 -05:00
Rangi42
cae31005f8
Always use braces with InsertBraces: true in .clang-format
2025-01-27 20:12:12 -05:00
Rangi42
25c9f8f383
Add more rules to .clang-format
2025-01-27 20:12:12 -05:00
Rangi42
9c8e327ae2
Zero-initialize trimmedTile array
2025-01-27 20:12:12 -05:00