Angband
Data Structures | Macros | Typedefs | Enumerations | Variables
object.h File Reference

basic object structs and enums More...

#include "z-rand.h"
#include "z-quark.h"
#include "z-bitflag.h"
#include "z-dice.h"
#include "obj-properties.h"
#include "effects.h"
#include "list-elements.h"
#include "list-stats.h"
#include "list-object-modifiers.h"
#include "list-identify-flags.h"
#include "list-origins.h"

Go to the source code of this file.

Data Structures

struct  brand
struct  slay
struct  element_info
struct  activation
 Activation structure. More...
struct  object_base
 Information about object types, like rods, wands, etc. More...
struct  object_kind
 Information about object kinds, including player knowledge. More...
struct  artifact
 Information about artifacts. More...
struct  ego_poss_item
 Stricture for possible object kinds for an ego item. More...
struct  ego_item
 Information about ego-items. More...
struct  object
struct  flavor

Macros

#define ELEM(a, b, c, d, e, f, g, col)   ELEM_##a,
#define ELEM_BASE_MIN   ELEM_ACID
#define ELEM_HIGH_MIN   ELEM_POIS
#define ELEM_HIGH_MAX   ELEM_DISEN
#define STAT(a, b, c, d, e, f, g, h)   ID_##a,
#define OBJ_MOD(a, b, c, d)   ID_##a,
#define ID(a)   ID_##a,
#define ID_MOD_MIN   ID_STR
#define ID_MISC_MIN   ID_ARTIFACT
#define ID_SIZE   FLAG_SIZE(ID_MAX)
#define id_has(f, flag)   flag_has_dbg(f, ID_SIZE, flag, #f, #flag)
#define id_next(f, flag)   flag_next(f, ID_SIZE, flag)
#define id_is_empty(f)   flag_is_empty(f, ID_SIZE)
#define id_is_full(f)   flag_is_full(f, ID_SIZE)
#define id_is_inter(f1, f2)   flag_is_inter(f1, f2, ID_SIZE)
#define id_is_subset(f1, f2)   flag_is_subset(f1, f2, ID_SIZE)
#define id_is_equal(f1, f2)   flag_is_equal(f1, f2, ID_SIZE)
#define id_on(f, flag)   flag_on_dbg(f, ID_SIZE, flag, #f, #flag)
#define id_off(f, flag)   flag_off(f, ID_SIZE, flag)
#define id_wipe(f)   flag_wipe(f, ID_SIZE)
#define id_setall(f)   flag_setall(f, ID_SIZE)
#define id_negate(f)   flag_negate(f, ID_SIZE)
#define id_copy(f1, f2)   flag_copy(f1, f2, ID_SIZE)
#define id_union(f1, f2)   flag_union(f1, f2, ID_SIZE)
#define id_comp_union(f1, f2)   flag_comp_union(f1, f2, ID_SIZE)
#define id_inter(f1, f2)   flag_inter(f1, f2, ID_SIZE)
#define id_diff(f1, f2)   flag_diff(f1, f2, ID_SIZE)
#define ORIGIN(a, b, c)   ORIGIN_##a,

Typedefs

typedef struct object_base object_base
 Information about object types, like rods, wands, etc.
typedef struct object_kind object_kind
 Information about object kinds, including player knowledge.
typedef struct artifact artifact_type
 Information about artifacts.
typedef struct ego_item ego_item_type
 Information about ego-items.
typedef struct object object_type
typedef bool(* item_tester )(const struct object *)

Enumerations

enum  { ELEM_MAX }
 Elements. More...
enum  { ID_NONE, ID_MAX }
 Identify flags. More...
enum  { ORIGIN, ORIGIN }
 Object origin kinds. More...
enum  { MARK_UNAWARE = 0, MARK_AWARE = 1, MARK_SEEN = 2 }
enum  { EL_INFO_KNOWN = 0x01, EL_INFO_HATES = 0x02, EL_INFO_IGNORE = 0x04, EL_INFO_RANDOM = 0x08 }

Variables

struct activationactivations
object_basekb_info
object_kindk_info
artifact_typea_info
 The artifact arrays.
ego_item_typee_info
struct flavorflavors

Detailed Description

basic object structs and enums

Macro Definition Documentation

#define ELEM (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  col 
)    ELEM_##a,
#define ELEM_BASE_MIN   ELEM_ACID
#define ELEM_HIGH_MAX   ELEM_DISEN
#define ELEM_HIGH_MIN   ELEM_POIS
#define ID (   a)    ID_##a,
#define id_comp_union (   f1,
  f2 
)    flag_comp_union(f1, f2, ID_SIZE)
#define id_copy (   f1,
  f2 
)    flag_copy(f1, f2, ID_SIZE)
#define id_diff (   f1,
  f2 
)    flag_diff(f1, f2, ID_SIZE)
#define id_has (   f,
  flag 
)    flag_has_dbg(f, ID_SIZE, flag, #f, #flag)
#define id_inter (   f1,
  f2 
)    flag_inter(f1, f2, ID_SIZE)
#define id_is_empty (   f)    flag_is_empty(f, ID_SIZE)
#define id_is_equal (   f1,
  f2 
)    flag_is_equal(f1, f2, ID_SIZE)
#define id_is_full (   f)    flag_is_full(f, ID_SIZE)
#define id_is_inter (   f1,
  f2 
)    flag_is_inter(f1, f2, ID_SIZE)
#define id_is_subset (   f1,
  f2 
)    flag_is_subset(f1, f2, ID_SIZE)
#define ID_MISC_MIN   ID_ARTIFACT
#define ID_MOD_MIN   ID_STR
#define id_negate (   f)    flag_negate(f, ID_SIZE)
#define id_next (   f,
  flag 
)    flag_next(f, ID_SIZE, flag)
#define id_off (   f,
  flag 
)    flag_off(f, ID_SIZE, flag)
#define id_on (   f,
  flag 
)    flag_on_dbg(f, ID_SIZE, flag, #f, #flag)
#define id_setall (   f)    flag_setall(f, ID_SIZE)
#define ID_SIZE   FLAG_SIZE(ID_MAX)
#define id_union (   f1,
  f2 
)    flag_union(f1, f2, ID_SIZE)
#define id_wipe (   f)    flag_wipe(f, ID_SIZE)
#define OBJ_MOD (   a,
  b,
  c,
 
)    ID_##a,
#define ORIGIN (   a,
  b,
 
)    ORIGIN_##a,
#define STAT (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)    ID_##a,

Typedef Documentation

typedef struct artifact artifact_type

Information about artifacts.

Note that ::cur_num is written to the savefile.

TODO: Fix this max_num/cur_num crap and just have a big boolean array of which artifacts have been created and haven't, so this can become read-only.

typedef struct ego_item ego_item_type

Information about ego-items.

typedef bool(* item_tester)(const struct object *)
typedef struct object_base object_base

Information about object types, like rods, wands, etc.

typedef struct object_kind object_kind

Information about object kinds, including player knowledge.

TODO: split out the user-changeable bits into a separate struct so this one can be read-only.

typedef struct object object_type

Enumeration Type Documentation

anonymous enum

Elements.

Enumerator:
ELEM_MAX 
anonymous enum

Identify flags.

Enumerator:
ID_NONE 
ID_MAX 
anonymous enum

Object origin kinds.

Enumerator:
ORIGIN 
ORIGIN 
anonymous enum
Enumerator:
MARK_UNAWARE 
MARK_AWARE 
MARK_SEEN 
anonymous enum
Enumerator:
EL_INFO_KNOWN 
EL_INFO_HATES 
EL_INFO_IGNORE 
EL_INFO_RANDOM 

Variable Documentation

artifact_type* a_info
struct activation* activations
ego_item_type* e_info
struct flavor* flavors
object_kind* k_info
object_base* kb_info