Angband
Enumerations | Functions
obj-info.h File Reference

Object description code. More...

#include "z-textblock.h"

Go to the source code of this file.

Enumerations

enum  oinfo_detail_t {
  OINFO_NONE = 0x00, OINFO_TERSE = 0x01, OINFO_SUBJ = 0x02, OINFO_EGO = 0x04,
  OINFO_FAKE = 0x08, OINFO_SPOIL = 0x10
}
 Modes for object_info() More...
 
enum  {
  EFINFO_NONE, EFINFO_HEAL, EFINFO_CONST, EFINFO_CURE,
  EFINFO_TIMED, EFINFO_STAT, EFINFO_SEEN, EFINFO_SUMM,
  EFINFO_TELE, EFINFO_QUAKE, EFINFO_LIGHT, EFINFO_BALL,
  EFINFO_BREATH, EFINFO_BOLT, EFINFO_BOLTD, EFINFO_TOUCH
}
 Flags for effect descriptions. More...
 

Functions

textblockobject_info (const struct object *obj, oinfo_detail_t mode)
 Provide information on an item, including how it would affect the current player's state. More...
 
textblockobject_info_ego (struct ego_item *ego)
 Provide information on an ego-item type. More...
 
void object_info_spoil (ang_file *f, const struct object *obj, int wrap)
 Provide spoiler information on an item. More...
 
void object_info_chardump (ang_file *f, const struct object *obj, int indent, int wrap)
 Provide information on an item suitable for writing to the character dump. More...
 

Detailed Description

Object description code.

Copyright (c) 2010 Andi Sidwell Copyright (c) 2004 Robert Ruehlmann

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Enumeration Type Documentation

anonymous enum

Flags for effect descriptions.

Enumerator
EFINFO_NONE 
EFINFO_HEAL 
EFINFO_CONST 
EFINFO_CURE 
EFINFO_TIMED 
EFINFO_STAT 
EFINFO_SEEN 
EFINFO_SUMM 
EFINFO_TELE 
EFINFO_QUAKE 
EFINFO_LIGHT 
EFINFO_BALL 
EFINFO_BREATH 
EFINFO_BOLT 
EFINFO_BOLTD 
EFINFO_TOUCH 

Modes for object_info()

Enumerator
OINFO_NONE 
OINFO_TERSE 
OINFO_SUBJ 
OINFO_EGO 
OINFO_FAKE 
OINFO_SPOIL 

Function Documentation

textblock* object_info ( const struct object obj,
oinfo_detail_t  mode 
)

Provide information on an item, including how it would affect the current player's state.

returns true if anything is printed.

References object_info_out(), and OINFO_SUBJ.

Referenced by context_menu_object(), death_examine(), desc_art_fake(), desc_obj_fake(), display_object_recall(), display_object_recall_interactive(), store_examine(), and textui_obj_examine().

void object_info_chardump ( ang_file f,
const struct object obj,
int  indent,
int  wrap 
)

Provide information on an item suitable for writing to the character dump.

  • keep it brief.

References object_info_out(), OINFO_SUBJ, OINFO_TERSE, textblock_free(), and textblock_to_file().

Referenced by write_character_dump().

textblock* object_info_ego ( struct ego_item ego)
void object_info_spoil ( ang_file f,
const struct object obj,
int  wrap 
)

Provide spoiler information on an item.

Practically, this means that we should not print anything which relies upon the player's current state, since that is not suitable for spoiler material.

References object_info_out(), OINFO_SPOIL, textblock_free(), and textblock_to_file().

Referenced by spoil_artifact().