Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
item.h
Go to the documentation of this file.
1 #ifndef ITEM_H
2 #define ITEM_H
3 
4 struct Mob;
5 
6 #include <stdbool.h>
7 #include "list.h"
8 #include "mob.h"
9 
14 
21 typedef struct Item {
22  enum ItemType type;
24  char symbol;
25  char * name;
27  bool luminous;
31  bool equipped;
33  int value;
34  void (*effect)(struct Mob *);
35 } Item;
36 
37 void display_inventory(List * inventory, const char * title);
38 List ** choose_items(List * inventory, const char * prompt);
40  enum ItemType type,
41  const char * prompt,
42  bool no_equipped);
43 
44 #endif /*ITEM_H*/
Definition: mob.h:18
char symbol
Definition: item.h:24
List * inventory
Definition: mob.h:29
bool equipped
Definition: item.h:31
char * name
Definition: item.h:25
void(* effect)(struct Mob *)
Definition: item.h:34
Definition: item.h:21
enum ItemType type
Definition: item.h:22
ItemType
Definition: item.h:13
struct Item Item
Definition: item.h:13
Definition: item.h:13
bool luminous
Definition: item.h:27
Item * choose_item_by_type(List *inventory, enum ItemType type, const char *prompt, bool no_equipped)
Definition: item.c:89
List inventory
Definition: item.h:29
Definition: item.h:13
Definition: item.h:13
List ** choose_items(List *inventory, const char *prompt)
Definition: item.c:69
void display_inventory(List *inventory, const char *title)
Definition: item.c:55
Definition: item.h:13
int value
Definition: item.h:33
Definition: list.h:7