Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Enumerations | Functions
item.h File Reference
#include <stdbool.h>
#include "list.h"
#include "mob.h"
Include dependency graph for item.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Item
 

Typedefs

typedef struct Item Item
 

Enumerations

enum  ItemType {
  NONE, WEAPON, ARMOUR, FOOD,
  DRINK
}
 

Functions

void display_inventory (List *inventory, const char *title)
 
List ** choose_items (List *inventory, const char *prompt)
 
Itemchoose_item_by_type (List *inventory, enum ItemType type, const char *prompt, bool no_equipped)
 

Typedef Documentation

typedef struct Item Item

Items are things that mobs can carry around, and possibly equip. They live in inventories. Note: when a mob picks up or drops a luminous item, its (the mob) luminosity should change by 1.

Enumeration Type Documentation

enum ItemType

Used to determine the type of an item

Enumerator
NONE 
WEAPON 
ARMOUR 
FOOD 
DRINK 

Function Documentation

Item* choose_item_by_type ( List inventory,
enum ItemType  type,
const char *  prompt,
bool  no_equipped 
)

Choose an item by type

Parameters
inventoryThe inventory to choose from
typeThe type of the item
promptThe prompt
no_equippedDon't include equipped things
Returns
NULL if nothing was selected, otherwise a pointer to the choice.

Here is the call graph for this function:

Here is the caller graph for this function:

List** choose_items ( List inventory,
const char *  prompt 
)

Choose some items from an inventory

Parameters
inventoryThe inventory to choose from
promptThe prompt to display

Here is the call graph for this function:

Here is the caller graph for this function:

void display_inventory ( List inventory,
const char *  title 
)

Display an inventory

Parameters
inventoryThe inventory to display
titleThe title to display

Here is the call graph for this function:

Here is the caller graph for this function: