Rangi
c35cb6ac32
Warning levels -Wunmapped-char=0/1/2 ( #1061 )
...
Fixes #1058
2022-09-29 18:14:04 -04:00
Rangi
023884d2b0
Redefine the trig functions to divide circles into 1.0 turns ( #1060 )
...
This makes their behavior consistent across Q settings
Fixes #1059
2022-09-29 10:57:29 +02:00
Eldred Habert
6502ed3919
Add -I as an alias for -i in rgbasm ( #1056 )
...
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com >
2022-09-26 03:42:30 -04:00
Rangi
f88968ec20
Fix rgbasm -b and rgbasm -g ( #1052 )
...
Fixes #1051
2022-09-25 10:22:55 +02:00
Rangi
5ad8a8c958
Warn when a duplicate CLI argument overrides a previous one ( #1053 )
...
Fixes #1050
2022-09-25 10:04:30 +02:00
Rangi
2827374505
Use STD*_FILENO constants ( #1055 )
...
These are defined in platform.h, but not consistently used
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com >
2022-09-25 10:02:53 +02:00
Rangi
b8385a50e3
Support -P/--preinclude to pre-INCLUDE a file ( #1043 )
...
Fixes #1041
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2022-09-24 12:37:16 -04:00
ISSOtm
02923a67f3
Use tabs for indentation in map files
...
As requested by #1012
2022-09-24 12:58:48 +02:00
Rangi
6df75f7af3
Summarize used and free space at the end of the .map file
...
Fixes #1046
2022-09-12 23:16:09 +02:00
Rangi
98a6dffbca
Implement opt Q for fixed-point precision, and q literals (e.g. 12.34q8) ( #958 )
...
Fixes #957
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2022-09-05 00:47:32 +02:00
Rangi
889302a9e2
Document the -H and -l flags
...
Fixes #1042
2022-09-02 08:43:41 +02:00
Rangi
c01317e08d
Only increment the unique \@ ID when it is first used per context ( #1030 )
...
This avoids changes to generated `\@` labels just by adding or
removing macros or loops which do not actually use `\@`.
Fixes #1019
2022-08-31 17:45:21 -04:00
Rangi
a52a00a9ca
macro_UndefUniqueID uses 0 to mean \@ is undefined
2022-08-30 16:50:34 -04: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
Rangi
14e6a79adc
Deprecate the old macro syntax ( #1025 )
...
Fixes #1011
2022-08-28 15:22:21 -04:00
Rangi
7a2ee26792
rgbasm -r sets the maximum recursion depth (#1026 )
...
Previously it set the minimum failure depth (off by one)
Fixes #978
2022-08-28 15:21:29 -04:00
Rangi
425339ccf6
Implement FMOD function for fixed-point modulo
...
Fixes #1021
2022-08-28 21:21:10 +02:00
Rangi
8207dc57b7
Add a -Wunmapped-char warning for characters not in the charmap ( #1023 )
...
Fixes #1022
2022-08-28 15:12:43 -04:00
Rangi
d29057e747
Indent "SLACK:" to match the "SECTION" headers
2022-08-28 20:35:21 +02:00
Rangi
f1b74fa610
Report empty space between sections in map file
2022-08-28 20:35:21 +02:00
Rangi
c7a92d3104
rgblink -M omits symbol names from .map file
2022-08-28 20:35:21 +02:00
ISSOtm
92eb0a133b
Allow rgbgfx -r to read an infinite amount of tiles without tilemap
...
Previously, indices would be wrapped after 256 even without a tilemap;
since RGBGFX can generate arbitrarily large tile data if `-N` is not used,
it should be possible to read those in.
Of course, this won't work if a tilemap is provided, but such "big blobs"
can't generate a meaningful tilemap anyway.
2022-08-04 20:50:08 +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
9ec8186ac6
Switch linkdefs from scattered arrays to an array of structs
...
The info is better organized this way
2022-07-19 19:11:02 +02:00
ISSOtm
ab9945c1ee
Avoid using fscanf to detect RGBDS object files
...
This function is made for text, e.g. accepts spaces, leading zeros, etc. before `%u`.
This way checks that the correct amount of bytes are read instead.
2022-07-19 19:10:58 +02:00
ISSOtm
828b2adcdf
Make RGBLINK able to link SDCC object files
...
This requires a LOT of tricky code, mostly due to the format itself being,
er, not the most straightforward.
Everything is converted to existing RGBLINK concepts (sections, patches,
etc.), so the core code is essentially unchanged.
(A couple of genuine RGBLINK bugs were uncovered along the way, so some of
the core code *is* changed, notably regarding `SECTION FRAGMENT`s.)
All of this code was clean-roomed, so SDCC's GPLv2 license does not apply.
2022-07-11 21:17:34 +02:00
ISSOtm
1c2965467d
Process linker script before doing sanity checks
2022-07-11 21:17:34 +02:00
ISSOtm
d243e50390
Do not perform any sanity checks for bad section types
...
Otherwise, the arrays get overflowed
2022-07-11 21:17:34 +02:00
ISSOtm
acb33777c6
Sort RGB colors as specified in the docs
2022-07-10 12:36:10 +02:00
ISSOtm
b53c115ec2
Fix width and height being reported in wrong order
2022-07-10 12:14:24 +02:00
ISSOtm
6a51e39a5c
Print error if reverse() fails to open a file
2022-07-10 11:55:56 +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
87092208bc
Stop passing options.columnMajor explicitly everywhere
2022-07-02 17:04:17 +02:00
ISSOtm
0d32775a1f
Add more sanity checks when reversing an image
2022-07-02 17:04:17 +02:00
ISSOtm
0df07d3688
Add note on supporting extra pal formats
2022-07-02 17:04:17 +02:00
ISSOtm
3f70372308
Implement slicing input image
2022-07-02 17:04:17 +02:00
ISSOtm
9646f15b59
Add error message for nigh-impossible proto-palette overflow
2022-07-02 17:04:17 +02:00
ISSOtm
973fbb91bc
Improve error message when a tile has too many colors
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
b4dadd35b6
Use an iterator zip
...
Simplifies iterating over tiles and attributes at the same time
2022-07-02 17:04:17 +02:00
ISSOtm
d9b1402ef8
Fix RGBGFX number parsing
2022-07-02 17:04:17 +02:00
ISSOtm
832e0ec972
Report position in color errors
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
c4359c1058
Ignore -b and -N when reversing without tilemap
...
These offsets should only be applied to a tile ID read as input... but this ain't one!
2022-07-02 17:04:17 +02:00
ISSOtm
cbf6fadcdb
Add RGBGFX tests
2022-07-02 17:04:17 +02:00
ISSOtm
a77b0b396a
Fix grayscale sorting not setting palette size
...
A black+white palette would turn into white+transparent, removing black pixels
from the palette (the third slot would be empty, and the 4th slot be set directly)
2022-07-02 17:04:17 +02:00
ISSOtm
568fb5e4c8
Only report "fusing" different colors once per pair
2022-07-02 17:04:17 +02:00
ISSOtm
57ac07b03e
Correctly handle fully-transparent tiles when outputting unoptimized tilemap
2022-07-02 17:04:17 +02:00