Rangi
ad81c74cda
Support PNG-format palette spec files ( #1764 )
2025-07-21 11:33:16 -04:00
Rangi42
14f5e16ae8
Prefer pre-inc/dec unless post-inc/dec are necessary
2025-07-19 16:18:35 -04:00
Rangi42
bf69043a1d
Reduce deep nesting some more
2025-07-19 16:18:30 -04:00
Rangi42
e99ff5ac45
Use more concrete types instead of auto
2025-07-17 23:52:09 -04:00
Rangi
0c96234532
Use concrete types instead of auto when convenient and not redundant ( #1757 )
2025-07-17 14:59:51 -04:00
Rangi42
2adeda0318
Use std::tie for sort comparator functions
2025-07-13 14:47:10 -04:00
Rangi42
ddb2acb652
Reduce more nesting depth, and fix an error message
2025-07-12 08:17:26 -04:00
Rangi42
01a5c94c7e
Factor out common code from readString and appendStringLiteral
2025-07-11 22:37:28 -04:00
Rangi
3f4e8396aa
Implement warning diagnostic flags for RGBGFX ( #1738 )
2025-07-10 09:58:40 -04:00
Rangi42
276a200590
A few miscellaneous edits
2025-07-10 00:33:03 -04:00
Rangi
34cf959c9d
Refactor to reduce nesting depth some more ( #1740 )
2025-07-09 22:46:40 -04:00
Rangi
5e43ece578
Remove errx and errors.hpp ( #1737 )
2025-07-09 11:04:23 -04:00
Rangi42
8c50839109
Miscellaneous updates
2025-07-08 17:45:13 -04:00
Rangi
6869e4807c
Make file.hpp independent of gfx ( #1733 )
2025-07-08 15:16:16 -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
Rangi42
965288de38
Fix out-of-bounds image slices
2025-07-02 19:43:11 +02:00
Rangi
7054d81650
Implement grayscale DMG palette specs ( #1709 )
2025-06-30 14:53:05 -04:00
Rangi42
e7a3b9d90e
Format rgbgfx -vvvvvv string visually
2025-06-21 14:16:48 -04:00
Rangi
b13d623ad4
Encode reversed PNG images as grayscale or indexed when possible ( #1703 )
2025-06-19 09:48:27 -04:00
Rangi42
081f48404c
Remove a TODO comment about overlapping proto-palettes
...
The original algorithm makes a simplifying assumption that one
proto-palette does not fully contain another, and we have no
particular reason to violate this condition.
2025-05-03 10:19:33 -04:00
Rangi42
bdac0ce053
Remove unplanned TODO comments in src/gfx/pal_spec.cpp
...
ACT palette files support a transparent color index, but RGBGFX
cannot apply *one* such transparent color; it would need every
palette's first color to be transparent. Also ACT files tend to
say the first color is transparent anyway, which the user may
not have intended.
ACO palette files can specify version 2 color data, but it's
required to come after version 1 data, and the colors themselves
already exist in the earlier v1 data; v2 just adds UTF-16 names.
Thus, we do not need to be handling these data in those formats.
2025-05-02 21:29:14 -04:00
Rangi
122d91509f
Clear some more TODO comments ( #1677 )
2025-05-02 21:06:34 -04:00
Rangi
7c6f778ae7
Take care of miscellaneous commented TODOs ( #1676 )
2025-05-02 16:44:12 -04:00
Eldred Habert
8cf6c5423a
Implement --background-color ( #1508 )
...
Co-authored-by: Rangi42 <sylvie.oukaour+rangi42@gmail.com >
2025-05-01 23:39:52 -04:00
Rangi
2a5b9b5f98
Fix two RGBGFX bugs ( #1671 )
...
* Fix two RGBGFX bugs
* Fix clang-format idempotence
* Update src/gfx/rgba.cpp
Co-authored-by: Eldred Habert <me@eldred.fr >
---------
Co-authored-by: Eldred Habert <me@eldred.fr >
2025-04-24 15:39:14 +02:00
Rangi42
a72843748f
Avoid using indirect C++ types
2025-04-23 00:53:20 -04:00
Rangi42
df83bc31d2
Consistently use PRId* not PRIi*
2025-04-19 23:44:34 -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
Rangi
632342b254
Use LCOV_EXCL comments to exclude some lines from test coverage ( #1662 )
2025-02-16 13:56:55 -05:00
Rangi
993879a2ed
Derive operator!= from operator== ( #1660 )
2025-02-15 12:37:42 +01:00
Rangi
62309d5c87
Define operator!= in terms of operator== ( #1659 )
2025-02-15 11:34:06 +01:00
Rangi
b35e9d86fb
Remove redundant @-style doc comment tags ( #1641 )
2025-01-29 19:56:28 -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
Rangi42
b8b60207f5
Use // line comments not /* block comments
2025-01-27 20:12:12 -05:00
Rangi42
a354af3d08
Reformat source files with clang-format 19.1.7
2025-01-27 20:12:12 -05:00
Rangi42
890528812e
Prefer C++ constructs to C-style sizeof-based macros
2025-01-24 18:56:41 -05:00
Rangi
d9654b752f
Support -h/--help for all programs ( #1620 )
2025-01-21 21:24:17 -05:00
Rangi42
a85d6b3b57
Remove unused readMagic function
2025-01-17 00:09:47 -05:00
Rangi
b13c0f2f8e
Use a constant for 0x8001 ( #1596 )
2025-01-04 04:03:40 -05:00
Rangi
ad95d2e06f
Allow deduplicating tiles with neither an input nor output tileset ( #1585 )
2024-12-30 18:58:07 +01:00
Rangi42
b058bb6e15
Sorting RGB palettes by luminance is not a "legacy" feature
2024-12-23 10:01:30 -05:00
Sylvie
b877c81c32
Use C++-style casts ( #1576 )
2024-12-09 21:56:54 -05:00
Eldred Habert
d5f39c8dce
Remove the use of floating-point for palette packing ( #1565 )
...
This is primarily a correctness change, *not* a performance one.
The expected performance impact is minimal anyway.
The goal is to eliminate the use of platform-inconsistent floating-point operations
for this load-bearing task.
2024-11-29 13:44:19 -05:00
Rangi42
9216485bca
Add TRACE-level verbose logging for efficiency calculations
2024-11-27 21:06:18 +01:00
Rangi42
c33acb905b
Avoid precision loss from floating-point division in calculating efficiency
...
This was breaking test results on 32-bit MinGW
2024-11-27 21:06:18 +01:00
Sylvie
e0ee9dc3ad
Add reverse_1bit RGBGFX test ( #1555 )
...
Fixes a bug to always use 2bpp `_data` in `TileData`
2024-11-24 19:30:49 -05:00