9static bool item_always_can_acquire(
Item* item);
20 .can_acquire = joker_object_can_acquire,
31 [ITEM_TYPE_PLAYING_CARD] = {
33 .get_buy_price = card_object_get_buy_price,
34 .get_sell_price = NULL,
36 .get_subtype_info = NULL,
38 .can_acquire = item_always_can_acquire,
39 .dispose = card_object_dispose,
40 .print_description = NULL
49 MGBA_FUNC_ERROR(
"Invalid type %d", type);
53 return &item_func_table[type];
56static bool item_always_can_acquire(
Item* item)
An API for the item functions defined in item.h Separated module from item.c/.h so item_funcs....
ItemFuncs * get_item_type_funcs(enum ItemType type)
Returns the function table for a given item type.
Functions relative to the handling of Jokers.
void joker_object_dispose(Item **joker_object)
Destroy a JokerObject item, free its resources, and make it available to be rolled.
Item * joker_object_roll_new(enum RngSequence key)
Roll and create a new JokerObject item.
int joker_object_print_description(Item *joker_object, Rect dest_rect)
Print the description of the requested Joker centered within the specified Rect.
int joker_object_get_buy_price(Item *joker_object)
Returns the buy price of the joker object.
const char * joker_object_get_name(Item *joker_object)
Get Joker name.
void joker_object_add_to_owned(Item *joker_object)
Add a Joker to the list of owned Jokers and place it in the joker row.
ItemDescSubtypeInfo joker_object_get_rarity_info(Item *joker_object)
Get Joker rarity name and associated panel color.
int joker_object_get_sell_price(Item *joker_object)
Returns the sell price of the joker object.
The set of functions that each item type implements.
Item *(* roll_new)(enum RngSequence key)
A generic interface for all items that can appear in the shop or be in the inventory....
Utilities relating around number string representation and protected arithmatic helper functions.
#define NUM_ELEM_IN_ARR(arr)
Get the number of elements in an array.