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
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
35e57a55c9
Handle base tile IDs in "optimized" output
2022-07-02 17:04:17 +02:00
ISSOtm
779c8c9368
Implement -m
...
Though none of the code involved has been tested in any capacity yet, lol
2022-07-02 17:04:17 +02:00
ISSOtm
3b1808cc8f
Fix Windows-breaking use of struct vs class
...
MSVC's (broken) ABI breaks otherwise.
What the f@!$#ck, Microsoft?
(Thank you based Clang for warning, by the way.)
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
ISSOtm
c82cce6d95
Explicitly specify queue template param
...
GCC 7 fails to deduce the contained type
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
ISSOtm
b95c26c886
Fully implement decanting step
2022-07-02 17:04:17 +02:00
ISSOtm
a96aa1725f
Optimize AssignedProtos::empty() to stop early
...
Also allow counting an `AssignedProtos`'s number of proto-palettes
2022-07-02 17:04:17 +02:00
ISSOtm
3d79f76e41
Avoid calling skipEmpty() for AssignedProtos::end()
2022-07-02 17:04:17 +02:00
ISSOtm
fdfedc45a6
Allow computing the combined weight of any proto-palette set
2022-07-02 17:04:17 +02:00
ISSOtm
c98d92a4c4
Implement -C
2022-07-02 17:04:17 +02:00
ISSOtm
d438838db4
Correctly handle "multiple" overlap between proto-palettes
...
As explained by the comment
2022-07-02 17:04:17 +02:00
ISSOtm
d675523e49
Skip initializing the PNG pixel array
...
We are about to set all of the pixels anyway
2022-07-02 17:04:17 +02:00
ISSOtm
ad07c9deb9
Implement (stub) handling for all options
2022-07-02 17:04:17 +02:00
ISSOtm
e8d8ae4c78
Print all configuration on verbose startup
2022-07-02 17:04:17 +02:00
ISSOtm
2fb1eb9136
Print file paths in a platform-independent way
...
Conversion may be unspecified, but Windows better do the right thing (or else.)
2022-07-02 17:04:17 +02:00
ISSOtm
bde380f38b
Fix unchecked narrowing conversion of tile IDs
...
The conversion is OK because of the tile amount cap
2022-07-02 17:04:17 +02:00
ISSOtm
3bd6078537
Tag AssignedProtos iterator as forward
...
That's what it actually is, oops
(Required for `minmax_element`)
2022-07-02 17:04:17 +02:00
ISSOtm
5409d0d15a
Add missing header for strcasecmp
2022-07-02 17:04:17 +02:00
ISSOtm
9262fefd07
Fix compiling with Clang
...
Force version.c to be compiled as C++ (bodge, will need a proper fix for `version.c`)
Remove user-defined `ProtoPalette` assignment operator (same as default, anyway)
2022-07-02 17:04:17 +02:00
ISSOtm
3fa1854332
Implement enough functionality to compile & match pokecrystal
2022-07-02 17:04:17 +02:00
ISSOtm
6e406b22bb
Implement more features and fix bugs
2022-07-02 17:04:17 +02:00
ISSOtm
d30e507270
Fix duplicated CGB color calculation in pal sorting
...
And also the inverted alpha channel condition causing the wrong colors
to be treated as transparent
2022-07-02 17:04:17 +02:00
ISSOtm
8c62e80c18
Reimplement basic RGBGFX features in C++
...
Currently missing from the old version:
- `-f` ("fixing" the input image to be indexed)
- `-m` (the code for detecting mirrored tiles is missing, but all of the
"plumbing" is otherwise there)
- `-C`
- `-d`
- `-x` (though I need to check the exact functionality the old one has)
- Also the man page is still a draft and needs to be fleshed out
More planned features are not implemented yet either:
- Explicit palette spec
- Better error messages, also error "images"
- Better 8x16 support, as well as other "dedup unit" sizes
- Support for arbitrary number of palettes & colors per palette
- Other output formats (for example, a "full" palette map for "streaming"
use cases like gb-open-world)
- Quantization?
Some things may also be bugged:
- Transparency support
- Tile offsets (not exposed yet)
- Tile counts per bank (not exposed yet)
...and performance remains to be checked.
We need to set up some tests, honestly.
2022-07-02 17:04:17 +02:00
ISSOtm
7e94ecbfe6
Move all man pages to a separate directory
...
Simplifies processing all around, and makes more sense
2022-05-15 13:34:35 +02:00
ISSOtm
ac59ecf3c0
Enable -Wsign-compare and fix the warnings
2022-02-05 20:11:25 +01:00
ISSOtm
72b677a8d7
Enable "debug" optimizations in make develop
...
Enhances some warnings as well as the sanitizers (Clang especially complained about it)
The `-f*` flags are to get better stack traces out of the sanitizers, as recommended
by Clang's docs: https://clang.llvm.org/docs/AddressSanitizer.html#usage
GCC's docs claim that these optimizations should not hinder the debugging
experience, and Clang's don't mention optimization flags at all.
2022-02-05 20:11:25 +01:00
Rangi
bdcef6f252
Refactor error reporting to simplify BSD-style err ( #949 )
2021-11-21 16:16:54 -05:00
Rangi
3e945679ad
Standardize on "east const" (type const * not const type *)
...
Avoid "WARNING: Move const after static - use 'static const char'"
2021-11-18 09:12:00 +01:00
Rangi
04788e15af
Fix a potential out-of-bounds array access in RGBGFX
...
This was caught by ASAN for pokered's gfx/battle/minimize.png.
2021-05-01 22:33:54 -04:00
Rangi
5dbfafcc55
Update man page copyrights to 2021
2021-03-28 16:37:15 -04:00
ISSOtm
5fb7fcf461
Fix description of rgbgfx -h
...
The old description was backwards and mostly confusing.
2021-03-18 15:35:01 +01:00
Rangi
464a3a4892
Separate extern getopt implementation from the unistd.h one
...
Fixes #710
2021-02-12 00:29:21 +01:00
ISSOtm
9028fb5391
Fix mistakes in RGBDS man pages
...
As reported by `mandoc -Wall`
2020-10-23 01:02:59 +02:00
ISSOtm
d22a667095
Update help text to redirect to new online docs
2020-09-17 03:10:02 +02:00
ISSOtm
131ad9b315
Fix GitHub link in BUGS sections
2020-09-15 18:35:04 +02:00
ISSOtm
5e63527190
Update repo link at bottom of all man pages
2020-09-15 16:00:17 +02:00
James Larrowe
5c24de3dc4
Use inttypes for stdint types
...
This should help make RGBDS portable to systems with 16-bit integers,
like DOS.
For kicks, use the macros for 16-bit and 8-bit integers.
Fix other miscellaneous things, like #include ordering and other
printf-format related things.
Reduce repitition in math.c while I'm there.
2020-05-07 11:10:20 -04:00
JL2210
7f9bd12f76
Add error checking and fix memory leak in gfx/gb.c
...
It's possible that tile could be leaked, so free it.
Fix sizeof convention and check the result of malloc.
Signed-off-by: JL2210 <larrowe.semaj11@gmail.com >
2020-04-13 22:02:24 -04:00