Skip to content

Commit

Permalink
Add pluralName to gItems to allow the proper spelling when multiple i…
Browse files Browse the repository at this point in the history
…tems are received at once (#4001)

* Updated CopyItemNameHandlePlural to deal with plural names

* Fixed whitespace in a few places

* Fixed whitespace in a few places

* Add remaining plural forms.

* Created ITEM_NAME_PLURAL_LENGTH

* Updated ITEM_NAME_PLURAL_LENGTH per feedback https://github.com/rh-hideout/pokeemerald-expansion/pull/4001\#discussion_r1453598165

* Reverted ITEM_NAME_PLURAL_LENGTH to +2 and added new comment

* Removed GetBerryCountString from CopyItemNameHandlePlural
Will deprecate the former in a future feature: #4010

---------

Co-authored-by: Zimmermann Gyula <[email protected]>
Co-authored-by: Bassoonian <[email protected]>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent 9a1f6df commit cdf7190
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/constants/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

// string lengths
#define ITEM_NAME_LENGTH 14
#define ITEM_NAME_PLURAL_LENGTH ITEM_NAME_LENGTH + 2 // 2 is used for the instance where a word's suffix becomes y->ies
#define POKEMON_NAME_LENGTH 10
#define POKEMON_NAME_BUFFER_SIZE max(20, POKEMON_NAME_LENGTH + 1) // Frequently used buffer size. Larger than necessary
#define PLAYER_NAME_LENGTH 7
Expand Down
1 change: 1 addition & 0 deletions include/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct Item
const u8 *description;
const u8 *effect;
u8 name[ITEM_NAME_LENGTH];
u8 pluralName[ITEM_NAME_PLURAL_LENGTH];
u8 holdEffect;
u8 holdEffectParam;
u8 importance;
Expand Down
Loading

0 comments on commit cdf7190

Please sign in to comment.