Rangi42
651877e094
Avoid reusing a static local variable (too fragile)
2025-10-08 21:19:23 -04:00
Rangi
23b9039716
Give clearer names to template parameters
2025-10-08 14:55:43 -04:00
Rangi
634fd853d1
Factor out a single parseNumber utility function ( #1839 )
2025-09-22 15:15:24 -04:00
Rangi42
c8d22d8744
Refactor some iterator template code in RGBGFX pal_packing.cpp
2025-09-21 10:59:59 -04:00
Rangi42
3ece61b103
Use fewer templates in RGBGFX pal_packing.cpp
2025-09-20 22:00:17 -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
Rangi42
ea1358bbe6
Predef std::pair to two-element std::tuple
2025-08-13 20:48:54 -04:00
Rangi42
2cae47a5a2
Color verbose output as magenta
...
Output RGBASM's lexed tokens at level 5 (TRACE)
2025-08-05 00:00:57 -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
499edaecd0
Exclude verboseOutputAssignments from LCOV coverage testing
2025-07-29 14:53:30 -04:00
Rangi
225490163e
Fix RGBGFX "decanting" on "components" (color sets sharing colors) ( #1768 )
2025-07-29 14:52:20 -04:00
Rangi42
d388a60daa
Reduce deep nesting in gfx/pal_packing.cpp
2025-07-29 14:02:51 -04:00
Rangi42
ded4ef4072
Avoid non-ASCII characters when not necessary
2025-07-23 21:18:21 -04:00
Rangi42
1849a35e61
Rename proto-palettes to color sets (copied from rsgbds)
2025-07-23 21:13:46 -04:00
Rangi42
5f333d9753
More refactoring around extern variables
2025-07-21 19:22:10 -04:00
Rangi42
bf69043a1d
Reduce deep nesting some more
2025-07-19 16:18:30 -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
8c50839109
Miscellaneous updates
2025-07-08 17:45:13 -04:00
Rangi
5de05e2e4b
Replace DefaultInitVec with std::vector ( #1732 )
2025-07-08 14:55:28 -04:00
Rangi
7054d81650
Implement grayscale DMG palette specs ( #1709 )
2025-06-30 14:53:05 -04:00
Rangi
122d91509f
Clear some more TODO comments ( #1677 )
2025-05-02 21:06: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
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
b8b60207f5
Use // line comments not /* block comments
2025-01-27 20:12:12 -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
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
ISSOtm
23272f028f
Update the best proto-pal relative size when a new best is found
...
*facepalm*
2024-08-23 13:35:48 +02:00
ISSOtm
6b09838739
Sort proto-palettes by decreasing size when refitting overloaded palettes
...
Since that refitting process is a First-Fit, it benefits from that sorting step.
2024-08-08 12:12:29 +02:00
ISSOtm
0f1137c6ec
Fix ineffective sorting of palettes pre-packing
...
We were sorting the *IDs*, not the proto-palettes...
2024-08-08 11:31:46 +02:00
Sylvie
a234da42a6
Replace assert with assume for release build optimization ( #1390 )
2024-04-02 11:09:31 -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
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
Rangi42
2dee0fc536
Refer to https URLs when applicable
2024-02-18 14:58:46 -05:00
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
Rangi
495d701022
Use RANGE macro to abbreviate begin/end pairs ( #1269 )
2023-12-11 14:10:20 -05: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
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
7311fc9ef8
Fix transparency handling
...
Ensure that the color count is properly used, and that
transparency is not counted as a color when packing palettes
2022-07-02 17:04:17 +02:00
ISSOtm
6ed220b4c1
Make some style corrections
...
Co-Authored-By: Rangi <remy.oukaour+rangi42@gmail.com >
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
71e22f3bfe
Correct "is this palette empty?" function
...
This notably caused decantation to delete non-empty palettes, which crashes
2022-07-02 17:04:17 +02:00
ISSOtm
ac02382632
Clean up palette packing a bit
...
Rename a poorly-named attribute, and add a bunch of debug logging
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
2099a25ee0
Avoid using transform_reduce
...
Not available in libstdc++ 7, apparently
2022-07-02 17:04:17 +02:00