Rangi
7e151f16c3
Factor out a single PNG-reading function to encapsulate the libpng API ( #1765 )
2025-07-23 15:53:33 -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
3f4e8396aa
Implement warning diagnostic flags for RGBGFX ( #1738 )
2025-07-10 09:58:40 -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
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
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
Rangi42
25c9f8f383
Add more rules to .clang-format
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
Rangi
b13c0f2f8e
Use a constant for 0x8001 ( #1596 )
2025-01-04 04:03:40 -05:00
Sylvie
b877c81c32
Use C++-style casts ( #1576 )
2024-12-09 21:56:54 -05:00
Rangi42
9216485bca
Add TRACE-level verbose logging for efficiency calculations
2024-11-27 21:06:18 +01:00
Sylvie
90286ccbbc
Fix detection of tiles with too many colors ( #1546 )
2024-10-20 13:51:39 -04:00
Sylvie
9783671399
Simplify some C++ abstractions ( #1518 )
...
* Remove namespaces
* Prefer `bool operator==`, not `friend auto operator==`
* Prefer not to use `using`
* Use a `constexpr` function instead of a template for `flipTable`
2024-09-26 00:07:27 -04:00
Eldred Habert
80d37f9988
Implement --input-tileset ( #1464 )
...
As discussed in https://github.com/gbdev/rgbds/issues/575#issuecomment-1991456862
2024-09-04 15:20:01 -04:00
Sylvie
356367bfd3
Allow mirroring only the X or Y axes ( #1468 )
2024-08-18 21:47:39 -04:00
Sylvie
0cd79c33ef
Fix RGBGFX reversal ( #1425 )
...
* Print all OoB tilemap IDs before aborting
* Rename `nbTileInstances` to `mapSize`
* Check that reversing doesn't overflow the tile array
---------
Co-authored-by: ISSOtm <me@eldred.fr >
2024-08-08 19:40:41 +02:00
Sylvie
8af9e9d465
Add rgbgfx -r 0 to infer a width ( #1437 )
2024-08-04 20:31:05 +02:00
ISSOtm
f4d0f01f91
Fix max number of palettes wrapping around after 255
2024-08-02 16:14:43 +02:00
Rangi42
b8387427a6
Use consistent RGBDS_<PROG>_<NAME>_HPP header guard convention
2024-04-14 21:50:05 -04:00
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
17444e825a
Reduce the header declarations ( #1342 )
...
- Since we have style rules to include foo.hpp at the top of its
corresponding foo.cpp, this takes any headers included by foo.hpp
as being also guaranteed for foo.cpp.
- Use C-style <foo.h> instead of <cfoo>, since the latter only
guarantees putting symbols in the `std` namespace, which we are
not using for C functions (e.g. `printf` not `std::printf`).
- Remove now-unused `__PRETTY_FUNCTION__` reporting
2024-03-09 14:55:39 -05: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
Rangi
b0f2f0ffd6
Allow fewer tRNS entries than PLTE colors ( #1284 )
2023-12-31 12:47:53 +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
Eldred Habert
f4463b1708
Honor -c with rgbgfx -r ( #1254 )
...
Fixes #1166
2023-11-24 13:19: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
5a25c547ab
Allow rgbgfx to generate a palette from a spec, without an image ( #1192 )
2023-11-02 20:12:48 +01:00
ISSOtm
33a0857b8d
Properly detect tiles with more than 4 colours
...
Fixes #1127 , which was caused by a dumb logic error. Duh me.
2023-02-08 00:21:05 +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
a5ed0292b1
Reject colors with ambiguous alpha channel
2022-07-02 17:04:17 +02:00
ISSOtm
05e36767b0
Implement "palette map" output
2022-07-02 17:04:17 +02:00
ISSOtm
c521233499
Fix ProtoPalette::compare
...
Some disjoint sets were mistakenly reported not as such
For example, {0} was considered to include {1}.
2022-07-02 17:04:17 +02:00