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
d2f9cc7e8c
Document accepted number formats
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
21e9a65f0b
Remove old C headers
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
e855b6f622
Include libstdc++-6.dll in 32-bit MinGW build
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
b9de65c9a2
Set C++ compiler in CI as well
...
Duh
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
8d00a61602
Flesh out man page
...
Describe current options, and add some TODOs for functionality to be implemented
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
bf9f99ebf5
Reorder Options members by usage order
2022-07-02 17:04:17 +02:00
ISSOtm
f0eca86c52
Update checkdiff to check for gfx/main.cpp
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
0cc62824b9
Use MinGW C++ compiler as well
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
38e8024ffa
Add missing return type for unreachable_()
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
638d024040
Update subprojects and patch pokecrystal
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
373a22660b
Switch clang-format to C++17
...
Be consistent with what we settled on in code
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
43ba7d0efb
Explain to static analyzer that initial symbol creation cannot fail
2022-06-12 16:49:06 +02:00
ISSOtm
685ea5feed
Fix RGBLINK leaking partial string at EOF
...
Does not really do much, but silences some static analyzers
2022-06-12 16:39:55 +02:00
ISSOtm
f5ac268989
Fix unchecked realloc in makeUnknown
2022-06-12 16:36:35 +02:00
ISSOtm
d51ab35203
Trim macro arg whitespace after line continuations
2022-06-09 00:07:27 +02:00
ISSOtm
ec25b4ac0e
Disable -Winline
...
<@aaaaaa123456789> I mean, `-Winline -Werror` is the "make my builds fail at random for no reason" switch
2022-06-04 11:14:07 +02:00
ISSOtm
83222a8147
Fix "building from source" link in README
...
Fixes #1001
2022-05-27 11:56:52 +02:00
ISSOtm
97c326942f
Warn about automatic instruction alterations
...
Step 1 of #986
2022-05-21 21:49:07 +02:00
ISSOtm
b037d54f64
Remove deprecated symbols
...
Fixes #896
2022-05-21 21:45:06 +02:00
ISSOtm
80df6640e3
Update checkdiff to check new man page locations
2022-05-21 11:01:32 +02:00
ISSOtm
68d3ef8e76
Only test a few random padding values each time
...
It's unlikely that a specific value matters, though in theory possible;
however, an exhaustive test every time is really slow, and testing a couple
random values should, over time, cover everything.
It is fine to test random values because those tested will be logged,
so the problem can be manually reproduced later.
It does make CI technically not deterministic... but that should be fine.
2022-05-19 22:47:48 +02:00
Eldred Habert
01777c96c8
Link to rgbds-www repo in README
...
Should make it easier to find..!
2022-05-18 19:27:55 +02:00
ISSOtm
28f9183d80
Fix formatting of rgbasm -D documentation
2022-05-17 20:11:00 +02:00
ISSOtm
74c31f7c0f
Update docs CI workflows to sync with new rgbds-www repo
2022-05-17 18:36:31 +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
0195196425
Cache built deps in Windows CI runs
2022-05-01 16:40:11 +02:00
ISSOtm
19c85a7c2e
Update uCity commit to fix deprecation warnings
...
Cleaning up the logs!
See #991 for context.
2022-04-30 20:42:55 +02:00
ISSOtm
59e73e64ca
Unconditionally output ROM0 even without any sections
...
Required for example when "overlaying" over a ROM and only patching ROMX.
Fixes #993
2022-04-30 14:27:36 +02:00
ISSOtm
972d06bb41
Fix gbdiff script
...
Fix issues with spaces in input filenames,
as well as a bunch more lint warnings.
2022-04-30 14:27:36 +02:00
ISSOtm
e27da737c6
Print name of up to 10 floating sections on overlay error
2022-04-14 23:58:32 +02:00
ISSOtm
e6ae1992fe
Update zlib downloaded for generating releases
2022-04-01 12:46:44 +02:00
ISSOtm
d9b46cdec9
Update CI builds to zlib 1.2.12
...
"Due to the bug fixes, any installations of 1.2.11 should be replaced with 1.2.12."
2022-03-28 09:10:04 +02:00
ISSOtm
570cd62b81
Update subproject commits and shallow dates
...
Added a comment to explain what to update those to, too
2022-03-13 14:43:27 +01:00
ISSOtm
a4ead0c25f
Freshen version number when building with CMake
...
Fixes #979
2022-03-11 09:21:08 +01:00
ISSOtm
da66eeb40e
Clean up lint warnings in deps install script
...
Also use a simpler way to remove the version number, lol
2022-03-10 00:06:32 +01:00
ISSOtm
0c4f1f8334
Add a shebang to the deps install script
...
Duh.
2022-03-10 00:03:54 +01:00
ISSOtm
af70d555fc
Remove signed check on unsigned variable
2022-03-09 08:40:49 +01:00
Eldred Habert
e07bd92314
Have the eqn preprocessor run on rgbasm(5)
...
This is required for the built-in functions (L315-337), otherwise the math syntax doesn't get processed.
This magic line is detected by most `man` impls:
https://www.gnu.org/software/groff/manual/html_node/Preprocessors-in-man-pages.html
2022-03-08 22:11:49 +01:00
ISSOtm
9169028e57
Add .clang-format
...
Should not be followed for C files, to avoid mucking `blame`s,
but will be applied during the gradual C++ rollout, since that
will likely touch most lines in the codebase anyway.
2022-02-28 01:52:54 +01:00
ISSOtm
7dd8ba37f1
Allow changing recursion depth limit at runtime
2022-02-05 20:32:56 +01:00
Eldred Habert
6842c831fd
Allow binary AND to be sometimes constant ( #976 )
2022-02-05 14:17:57 -05:00
Eldred Habert
6b903059fe
Document endianness of dw and dl ( #972 )
2022-02-05 14:12:35 -05:00
ISSOtm
eb5af70d79
Add unsigned right shift operator
2022-02-05 20:12:15 +01:00
ISSOtm
cf19879281
Enable make develop on all Unix platforms
...
We are actually already doing it, so simplify the code
2022-02-05 20:11:25 +01: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
ISSOtm
bbae9966e9
Fix string constness issues in RGBASM
2022-02-05 20:11:25 +01:00
ISSOtm
b3304ae1ac
Add more warnings to develop
...
As suggested by #969
2022-02-05 20:11:25 +01:00
ISSOtm
a48801a675
Trim down develop warning list and add comments
...
Remove already-enabled warnings as pointed out by #969
Comments added to the CMakeLists because the Makefile format does not really allow them
"Plain" list also sorted alphabetically, the rest (somewhat) thematically
2022-02-05 20:11:25 +01:00
ISSOtm
7dc81a64d3
Make recursive Make invocations properly recurse flags
2022-02-05 20:11:25 +01:00
ISSOtm
3afa6b5a5a
Use pedantic warnings in Makefile default config as well
...
We aim to be standard-conformant, and the CMakeLists already does it
2022-02-05 20:11:25 +01:00
ISSOtm
9b49f788e4
Add missing header in opt.h
2022-02-05 13:37:40 +01:00
ISSOtm
acc31feaa1
Fix "shift" test to actually test RGBLINK
2022-02-05 11:39:10 +01:00
ISSOtm
fef168b2a5
Add the new completion scripts to checkdiff
2021-11-23 22:12:57 +01:00
ISSOtm
4a4b22c78c
Add Bash completion scripts for the last 3
2021-11-23 22:10:08 +01:00
ISSOtm
54293a9184
Remove unused "MAX_PATH" header
...
The header's name was also quite misleading.
Also remove an unused define in `asm/symbol.h`.
2021-11-21 18:32:29 +01:00
ISSOtm
b04e71ed34
Use correct length type for Abs*Group
2021-11-21 18:28:42 +01:00
ISSOtm
b06e3b239d
Clean up -MT/-MQ code
...
Remove unreachable argument presence check (handled by `getopt`)
Merge allocation paths into a single `realloc` call
Avoid searching for string lengths multiple times
Tiny (compatible) change: no space between last dependent and colon if
`-MT` or `-MQ` is specified
2021-11-06 13:21:39 +01:00
ISSOtm
0ce66009c1
Parallelize CMake builds
2021-10-31 22:01:35 +01:00
ISSOtm
33f2f555a6
Enable sanitizers with Clang on Ubuntu as well
2021-10-31 21:41:58 +01:00
ISSOtm
0487f9f841
Enable more checks in CMake builds on macOS
2021-10-31 21:17:51 +01:00
ISSOtm
0d6bfb84ce
Ignore unknown warning options
...
GCC and Clang do not understand the exact same warning option sets
2021-10-31 21:17:51 +01:00
ISSOtm
1e4ace8974
Update tested subproject commits
2021-10-31 20:50:26 +01:00
Eldred Habert and Rangi
a378d1e8cb
Reword label definition docs ( #887 )
...
* Reword label definition docs
A bunch of short sentences isn't very readable, this should be better
* Use correct wording for "computing difference"
Co-authored-by: Rangi <[email protected] >
* Explain how to define a label before mentioning local ones
* Move double-colon paragraph to make the explanation flow better
* Clarify what a label's value is
Co-authored-by: Rangi <[email protected] >
2021-10-31 20:20:57 +01:00
ISSOtm
81ea39effe
Add two forgotten warnings to RGBASM Zsh completion
2021-10-31 20:16:03 +01:00