Main Page | Data Structures | File List | Globals

item.h File Reference

#include "item_types.h"
#include "combat.h"

Go to the source code of this file.

Data Structures

struct  item
struct  food
struct  drink
struct  gear
struct  weapon
struct  text
struct  container

Defines

#define ITEM_MEMBER_VARS

Functions

void set_item_name (struct item *item, const char *name)
void set_item_desc (struct item *item, const char *desc)
void set_text_contents (struct text *text, const char *contents)
void destroy_item (struct item *item)
containercreate_container (int size)
void destroy_container (struct container *cont)


Detailed Description


Define Documentation

#define ITEM_MEMBER_VARS
 

Value:

char *name, *desc;\ enum item_type type;\ unsigned int weight


Function Documentation

struct container* create_container int  size  ) 
 

creates and initialized a container item

void destroy_container struct container cont  ) 
 

destroys a container item

void destroy_item struct item item  ) 
 

destroy an item.

beware, do not use this on any item that contains additional dynamic allocations except from the standard ones that all the items have

void set_item_desc struct item item,
const char *  desc
 

sets the item description (the string is copied, you don't need to keep the old value)

void set_item_name struct item item,
const char *  name
 

sets the item name (the string is copied, you don't need to keep the old value)

void set_text_contents struct text text,
const char *  contents
 

sets the text contents (the string is copied, you don't need to keep the old value)


Generated on Thu Sep 9 00:52:33 2004 for MUD by doxygen 1.3.8