Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
Main Page
Related Pages
Data Structures
Files
File List
Globals
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
13
enum
ItemType
{
NONE
,
WEAPON
,
ARMOUR
,
FOOD
,
DRINK
};
14
21
typedef
struct
Item
{
22
enum
ItemType
type
;
24
char
symbol
;
25
char
*
name
;
27
bool
luminous
;
29
List
inventory
;
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);
39
Item
*
choose_item_by_type
(
List
*
inventory
,
40
enum
ItemType
type,
41
const
char
* prompt,
42
bool
no_equipped);
43
44
#endif
/*ITEM_H*/
mob.h
Mob
Definition:
mob.h:18
Item::symbol
char symbol
Definition:
item.h:24
Mob::inventory
List * inventory
Definition:
mob.h:29
Item::equipped
bool equipped
Definition:
item.h:31
Item::name
char * name
Definition:
item.h:25
Item::effect
void(* effect)(struct Mob *)
Definition:
item.h:34
Item
Definition:
item.h:21
Item::type
enum ItemType type
Definition:
item.h:22
ItemType
ItemType
Definition:
item.h:13
Item
struct Item Item
NONE
Definition:
item.h:13
list.h
ARMOUR
Definition:
item.h:13
Item::luminous
bool luminous
Definition:
item.h:27
choose_item_by_type
Item * choose_item_by_type(List *inventory, enum ItemType type, const char *prompt, bool no_equipped)
Definition:
item.c:89
Item::inventory
List inventory
Definition:
item.h:29
FOOD
Definition:
item.h:13
DRINK
Definition:
item.h:13
choose_items
List ** choose_items(List *inventory, const char *prompt)
Definition:
item.c:69
display_inventory
void display_inventory(List *inventory, const char *title)
Definition:
item.c:55
WEAPON
Definition:
item.h:13
Item::value
int value
Definition:
item.h:33
List
Definition:
list.h:7
Generated on Sun Apr 27 2014 23:51:26 for Ludum Dare 29 by
1.8.7