mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-29 05:18:30 -05:00
Changed item name/pluralName to a compound string (#7359)
This commit is contained in:
@@ -32,6 +32,12 @@
|
||||
|
||||
/* Converts a string to a compound literal, essentially making it a pointer to const u8 */
|
||||
#define COMPOUND_STRING(str) (const u8[]) _(str)
|
||||
#define COMPOUND_STRING_SIZE_LIMIT(str, limit) (const u8[COMPOUND_STRING_CHECK_SIZE(str, limit)]) _(str)
|
||||
|
||||
/* Used for COMPOUND_STRING_SIZE_LIMIT. Stupid, but makes sure we only get
|
||||
* one error message regardless of how many characters over the limit we are.
|
||||
* Otherwise, GCC gives an error for each and every character (which is annoying). */
|
||||
#define COMPOUND_STRING_CHECK_SIZE(str, limit) (sizeof(COMPOUND_STRING(str)) > limit ? sizeof(COMPOUND_STRING(str)) - 1 : sizeof(COMPOUND_STRING(str)))
|
||||
|
||||
/* Expands to the first/second/third/fourth argument. */
|
||||
#define FIRST(a, ...) a
|
||||
|
||||
Reference in New Issue
Block a user