10static void item_acquire_unimplemented(
Item* item);
11static bool item_always_can_acquire(
Item* item);
19 .can_acquire = joker_object_can_acquire,
29 [ITEM_TYPE_PLAYING_CARD] = {
30 .roll_new = item_roll_new_unimplemented,
31 .get_buy_price = card_object_get_buy_price,
32 .acquire = item_acquire_unimplemented,
33 .can_acquire = item_always_can_acquire,
34 .dispose = card_object_dispose
43 MGBA_FUNC_ERROR(
"Invalid type %d", type);
47 return &item_func_table[type];
52 MGBA_FUNC_ERROR(
"Unimplemented roll_new function called");
56static void item_acquire_unimplemented(
Item* item)
59 MGBA_FUNC_ERROR(
"Unimplemented acquire function called for item type type %d", (item)->type);
62static 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_get_buy_price(Item *joker_object)
Returns the buy price of the joker object.
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.
RngSequence
Keys to different independent RNG sequences.
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.
#define GBAL_RETURN_IF_NULL_VOID(param)
Checks if param is NULL and prints error message and returns in case it is. Useful for checking argum...