Commit Graph

721 Commits

Author SHA1 Message Date
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
Rangi
3feb75f84f Implement new string functions (#1655)
`STRFIND`, `STRRFIND`, `STRCHAR`, `STRSLICE`, `CHARCMP`, `CHARSIZE`, and `REVCHAR`
2025-02-14 23:09:45 +01:00
Rangi42
ad4d9da4cf Remove unnecessary default constructor definitions 2025-02-14 18:58:34 +01:00
Rangi42
1489854932 Use more const references when possible 2025-02-14 18:58:34 +01:00
Rangi
2aef09c8d9 Allow the bit/res/set bit index to be determined at link time (#1654)
This increments the object file revision number from 11 to 12
since it adds a new `RPN_BIT_INDEX` command.
2025-02-12 17:14:10 +01:00
Rangi42
48412e9c56 Some miscellaneous refactoring and copy-editing 2025-02-10 16:51:51 +01:00
Rangi42
81ea4ee920 Release 0.9.1 2025-02-02 20:16:54 +01:00
Rangi
b35e9d86fb Remove redundant @-style doc comment tags (#1641) 2025-01-29 19:56:28 -05:00
Rangi42
d54619a453 Remove colNo column tracking from lexer
This was added as part of 71f88717 just for debug and fstack trace
output, but we no longer output it anyway.
2025-01-28 01:12:18 -05:00
Rangi42
e49291b7cf Refactor readUTF8Char into charmap_ConvertNext 2025-01-28 00:07:08 -05:00
Rangi42
c4b456b166 Remove unused fix_PrecisionFactor function 2025-01-27 23:04:11 -05:00
Rangi42
79401cce8b Add braces inside #define macro bodies 2025-01-27 20:12:12 -05:00
Rangi42
25c9f8f383 Add more rules to .clang-format 2025-01-27 20:12:12 -05:00
Rangi42
b8b60207f5 Use // line comments not /* block comments 2025-01-27 20:12:12 -05:00
Rangi42
c5e59f40fd Get rid of unnecessary extern "C" blocks 2025-01-27 20:12:12 -05:00
Rangi42
a354af3d08 Reformat source files with clang-format 19.1.7 2025-01-27 20:12:12 -05:00
Rangi42
890528812e Prefer C++ constructs to C-style sizeof-based macros 2025-01-24 18:56:41 -05:00
Rangi42
f23a14afc7 Remove unnecessary semicolons after closing braces 2025-01-17 00:01:06 -05:00
Rangi
b13c0f2f8e Use a constant for 0x8001 (#1596) 2025-01-04 04:03:40 -05:00
Rangi42
4e2464a69d Replace some #define with constexpr 2025-01-04 03:53:59 -05:00
Rangi42
a5f12f66bb Define the default -recursion depth in main.cpp with other default values 2025-01-04 03:53:59 -05:00
Rangi
73ad431b8d Fix the node type for "file" nodes in object files (#1593) 2025-01-03 17:20:06 +01:00
Rangi42
d63955eccd Release 0.9.0 2024-12-25 10:46:17 -05:00
Sylvie
c1c5b10082 Deprecate LDH with $00-$FF (#1575) 2024-12-10 21:27:37 -05:00
Sylvie
b877c81c32 Use C++-style casts (#1576) 2024-12-09 21:56:54 -05:00
Rangi42
a27f704c25 Implement -Wunmatched-directive 2024-11-28 20:30:38 +01:00
Rangi42
9216485bca Add TRACE-level verbose logging for efficiency calculations 2024-11-27 21:06:18 +01:00
Rangi42
4c495c31d9 Release 0.9.0-rc2 2024-10-21 22:52:18 -04:00
Sylvie
90286ccbbc Fix detection of tiles with too many colors (#1546) 2024-10-20 13:51:39 -04:00
Sylvie
3b3263273c Make ENDL optional like ENDSECTION (#1538)
Add warning for `LOAD` without `ENDL`
2024-10-15 21:13:50 -04:00
Sylvie
cf85146353 Refactoring and enhancements to RGBASM warnings (#1526)
* Allow a `no-` prefix to negate "meta" warnings
  (`-Wno-all`, `-Wno-extra`, `-Wno-everything`)
* Allow `-Wno-error=...` to override `-Werror`
  (including for "meta" warnings)
2024-10-04 21:52:40 +02:00
Rangi42
c7a029a051 Remove duplicated condition check 2024-09-30 10:47:57 -04:00
Sylvie
d5ded84501 Move definition of _POSIX_C_SOURCE to include/platform.hpp (#1524) 2024-09-29 23:53:15 +02: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
Rangi42
dd20012e88 Release 0.9.0-rc1 2024-09-18 10:15:38 -04:00
Sylvie
9ef2e43bf7 Track local label scope, string equated as .. (#1504) 2024-09-18 09:52:30 -04:00
Sylvie
122ef95d9c Implement . string constant for the current label scope (#1499) 2024-09-13 21:20:01 +02:00
Rangi42
1adf68d018 Refer to "label scope", not "symbol scope" 2024-09-10 21:38:50 +02:00
Rangi42
56af572bfd Refactor symbol value getters for less redundancy 2024-09-10 21:38:50 +02:00
Rangi42
155e7287db Store a pointer to the scoped label, not just its name 2024-09-10 21:38:50 +02:00
Sylvie
1dcc000572 Report locations for RGBLINK errors with conflicting objects (#1494)
This requires updating the object file format to record the
fstack context for sections themselves, not just for patches.
2024-09-10 19:23:48 +02:00
Rangi42
8cd0e66297 Revert "Implement INCLUDE_ONCE directive (#1481)"
This reverts commit 5f07095f6d.
2024-09-08 11:30:31 -04:00
sukus
5f07095f6d Implement INCLUDE_ONCE directive (#1481)
Identify files by (device, inode), not by path, so that symlinks,
relative paths, case-insensitive paths, or other edge cases
do not result in double includes.
2024-09-08 00:02:02 -04:00
Sylvie
323028d9f2 RGBLINK lists local symbols when encountering an unknown symbol reference (#1496) 2024-09-06 21:31:13 -04:00
ISSOtm
610f04beeb Fix condition for assuming at EOF
Part of that condition's purpose is to ensure that we read the correct
lexer state; but it's possible now for the fstack to be non-empty
*before* the lexer state is registered, i.e. if there is an error
in the function that registers it.
This causes a NULL pointer deref.
2024-09-05 17:48:52 +02:00
Eldred Habert
80d37f9988 Implement --input-tileset (#1464)
As discussed in https://github.com/gbdev/rgbds/issues/575#issuecomment-1991456862
2024-09-04 15:20:01 -04:00
Sylvie
6b8d33529e Improve string/interpolation formatting (#1491)
- The '#' component for type 's' now escapes the string characters
- The '#' component for type 'f' now prints a precision suffix
- The new 'q' component specifies a precision value
2024-09-01 12:54:26 -04:00
Rangi42
15f0871683 Update some names and comments 2024-08-27 14:04:52 -04:00
Rangi42
b77ba1d87d Forward declare struct Section to avoid a nested header include 2024-08-26 22:58:38 -04:00