Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
|
#include <assert.h>
#include <stdlib.h>
#include <stdbool.h>
#include <curses.h>
#include <string.h>
#include "item.h"
#include "utils.h"
#include "list.h"
Functions | |
static const char ** | inventory_name_array (List *inventory) |
static const List ** | inventory_array (List *inventory) |
void | display_inventory (List *inventory, const char *title) |
List ** | choose_items (List *inventory, const char *prompt) |
Item * | choose_item_by_type (List *inventory, enum ItemType type, const char *prompt, bool no_equipped) |
Item* choose_item_by_type | ( | List * | inventory, |
enum ItemType | type, | ||
const char * | prompt, | ||
bool | no_equipped | ||
) |
Choose an item by type
inventory | The inventory to choose from |
type | The type of the item |
prompt | The prompt |
no_equipped | Don't include equipped things |
Choose some items from an inventory
inventory | The inventory to choose from |
prompt | The prompt to display |
void display_inventory | ( | List * | inventory, |
const char * | title | ||
) |
Display an inventory
inventory | The inventory to display |
title | The title to display |
Convert an inventory doubly-linked list into an array of pointers to members of the inventory.
inventory | The inventory to convert |
|
static |
Convert an inventory doubly-linked list into an array of pointers to names of members of the inventory.
inventory | The inventory to convert |