Commit Graph

2670 Commits

Author SHA1 Message Date
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
ISSOtm
747427e801 Make test/gfx/at-file-ref consistent
The generated `result.pal` can change between platforms, it turns out
(due to "unstable sort" differences), and creates additional churn if
changing anything related to palette generation.

tl;dr this makes the test less flaky in the long run.
2024-08-08 12:23:12 +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
ISSOtm
1ad9383042 Disable optimisations in make debug
I am starting to feel aggravated by `$1 = <optimized out>`
2024-08-08 11:15:19 +02:00
Sylvie
5b486e1d87 Document the behavior of FMOD, and other man page cleanup (#1458) 2024-08-07 19:51:35 +02:00
Sylvie
e93190d491 Implement BITWIDTH and TZCOUNT functions (#1450) 2024-08-07 10:39:30 -04:00
Sylvie
7435630d6a Error messages note when a symbol has been purged (#1453) 2024-08-06 15:35:06 -04:00
Sylvie
fc8707886c Output exported numeric constants to sym file (#1439) 2024-08-06 10:58:35 -04:00
Sylvie
bb480b761c Rephrase numeric-string warning to not be identical to another one (#1449) 2024-08-06 13:56:09 +02:00
Sylvie
2706f94788 Multiple fixes and enhancements to RPN behavior: (#1448)
- FIX: `Label & const` was not actually doing the `& const` masking
  (fixes #1446)
- ADD: `LOW(Label)` can be constant if `Label` is aligned to 8 or more bits
  (resolves #1444)
- ADD: `!expr` can be constant 0 if `expr` has any non-zero bits
  (resolves #1447)
- `LOW()` and `HIGH()` have their own RPN operator values
  (resolves #1445)

The change to RPN values means that the object file version was incremented.

This also refactors unary operators and functions, combining their
evaluation similarly to binary ones.
2024-08-06 13:54:55 +02:00
Sylvie
2f8f99bd94 Implement -Wpurge= (#1443) 2024-08-05 12:50:48 -04:00
Sylvie
f304e1dd7f Implement state file output for RGBASM (#1435) 2024-08-05 12:41:40 -04:00
Sylvie
c5e6a815fa Deprecate treating multi-unit strings as numbers (#1438) 2024-08-05 16:05:50 +02:00
Sylvie
d4231f9efa Remove redundant "unknown option" error messages (#1441)
`getopt` already prints "unrecognized option"
2024-08-05 16:04:53 +02:00
Rangi42
e4ffcf7153 Update the 'ucity' commit used for testing
This removes our need to patch it for compatibility
2024-08-04 21:52:57 -04:00
Sylvie
1d194b68ca Update test deps (#1440) 2024-08-04 21:49:22 -04:00
Sylvie
9a5b3f0902 Implement multi-value charmaps (#1429) 2024-08-04 23:32:08 +02:00
Rangi42
436580a649 Consistently use "palette spec" not "color spec"
Fixes #1436
2024-08-04 16:24:14 -04:00
Sylvie
8af9e9d465 Add rgbgfx -r 0 to infer a width (#1437) 2024-08-04 20:31:05 +02:00
ISSOtm
98bca79df4 Run clang-format 2024-08-02 22:36:33 -04:00
ISSOtm
dae4219acd With -r, print both palettes if -c and -p mismatch 2024-08-02 22:36:33 -04:00
ISSOtm
3d1f5386c2 Fix parsing of GPL files
Can you tell this was *not* tested whatsoever?
2024-08-02 22:36:33 -04:00
ISSOtm
1f8f28cac8 Fix parsing of textual colours
`n`'s input value was not honored, and its updating logic incorrect
2024-08-02 22:36:33 -04:00
ISSOtm
8e60d1f0b8 Fix textual palettes not accepting to be filled
A weird case of off-by-one error
2024-08-02 22:36:33 -04:00
ISSOtm
d8aceaea4a Ignore empty lines in HEX files
They are free-form enough that empty lines should probably be supported.
2024-08-02 22:36:33 -04:00
ISSOtm
a23b4732e3 Distinguish EOF and empty lines when parsing text pal files 2024-08-02 22:36:33 -04:00
Rangi42
3bd35a8848 "Write" to files, "print" to console 2024-08-02 16:26:42 -04:00
ISSOtm
41046c287f Use appropriate format specifier for number of palettes 2024-08-02 21:59:51 +02:00
ISSOtm
f4d0f01f91 Fix max number of palettes wrapping around after 255 2024-08-02 16:14:43 +02:00
Rangi42
0ed846c773 Remove outdated RGBASM options from man page 2024-07-27 09:57:52 -04:00
Rangi42
4e0f794c23 More refactoring and renaming 2024-07-26 20:12:51 -04:00
Sylvie
6a65cbc9ed Some refactoring and reformatting (#1431) 2024-07-26 11:51:27 -04:00
Sylvie
92abe24894 Implement EXPORT DEF to define and export symbols (#1422) 2024-07-25 17:40:58 -04:00
Sylvie
13a8895fca Improve the error messages for interpolating undefined or invalid symbols (#1423) 2024-07-25 17:36:02 -04:00
Sylvie
e179ba5fd3 Add syntax to push and modify stacks in one line (#1421) 2024-07-25 23:14:59 +02:00
Eldred Habert
1d89d75381 Fix use-after-free when keeping pointers to args from at-files (#1426) 2024-07-25 23:00:48 +02:00
Sylvie
c0904228f2 Fix bison.sh for patch-less bison versions (#1416) 2024-07-03 13:37:04 +02:00
Rangi42
556c8a968a Release 0.8.0 v0.8.0 2024-06-28 14:53:17 -04:00
Sylvie
ed5529d639 Fix generating a palette overriding a previous pal spec (#1415) 2024-06-25 18:27:01 +02:00
Sylvie
240ab8ed1c Keep the object version as RGB9; only increment the revision to 10 (#1413) 2024-06-21 16:47:49 +02:00
Sylvie
0433714d77 Allow a suffix (e.g. the version) to be added when installing (#1406) 2024-06-18 22:06:43 +02:00
Sylvie
ee748cfe26 Miscellaneous refactoring of code and docs (#1411) 2024-06-18 20:47:31 +02:00
Sylvie
623c3f662c Allow NUL characters in strings (#1405) 2024-06-18 14:26:18 -04:00
Sylvie
9cc595b2cc Specify a custom logo file to use instead of the Nintendo logo (#1400)
Fixes #1398
2024-06-18 20:02:50 +02:00
Sylvie
8c3ca462fe Add more test cases (#1409) 2024-06-17 15:07:35 -04:00
Sylvie
9e1898238d Remove unsupported macOS 11 from CI (#1410) 2024-06-17 14:30:57 -04:00
Sylvie
b3c94b5b87 Give names to links in man pages (#1407) 2024-06-15 13:48:37 +02:00
Sylvie
82f60e26c4 Fix reading ACO palette files (#1404) 2024-06-13 12:21:19 -04:00
Sylvie
dfec7111e2 X && 0 and X & 0 are constant 0; X || 1 is constant 1 (#1399)
Fixes #977
2024-06-13 11:09:39 -04:00