Defines | Functions | Variables

read.c File Reference

#include "hack.h"
Include dependency graph for read.c:

Defines

#define DEVOUT   14
#define STRIDENT   4
#define Your_Own_Role(mndx)
#define Your_Own_Race(mndx)
#define REALLY   1
#define PLAYER   2
#define ONTHRONE   4

Functions

static void FDECL (wand_explode,(struct obj *))
static void NDECL (do_class_genocide)
static void FDECL (stripspe,(struct obj *))
static void FDECL (p_glow1,(struct obj *))
static void FDECL (p_glow2,(struct obj *, const char *))
static void FDECL (randomize,(int *, int))
static void FDECL (forget_single_object,(int))
static void FDECL (forget,(int))
static void FDECL (maybe_tame,(struct monst *, struct obj *))
STATIC_PTR void FDECL (do_flood,(int, int, genericptr_t))
STATIC_PTR void FDECL (undo_flood,(int, int, genericptr_t))
STATIC_PTR void FDECL (set_lit,(int, int, genericptr_t))
int doread ()
static void stripspe (struct obj *obj)
static void p_glow1 (struct obj *otmp)
static void p_glow2 (struct obj *otmp, const char *color)
boolean is_chargeable (struct obj *obj)
void recharge (struct obj *obj, int curse_bless)
static void forget_single_object (int obj_id)
static void randomize (int *indices, int count)
void forget_objects (int percent)
void forget_map (int howmuch)
void forget_traps ()
void forget_levels (int percent)
static void forget (int howmuch)
static void maybe_tame (struct monst *mtmp, struct obj *sobj)
STATIC_PTR void undo_flood (int x, int y, genericptr_t roomcnt)
STATIC_PTR void do_flood (int x, int y, genericptr_t poolcnt)
int seffects (struct obj *sobj)
static void wand_explode (struct obj *obj)
STATIC_PTR void set_lit (int x, int y, genericptr_t val)
void litroom (boolean on, struct obj *obj)
static void do_class_genocide ()
void do_genocide (int how, boolean only_on_level)
void punish (struct obj *sobj)
void unpunish ()
boolean cant_create (int *mtype, boolean revival)
void drop_boulder_on_player (boolean confused, boolean helmet_protects, boolean by_player, boolean drop_directly_to_floor)
int drop_boulder_on_monster (int x, int y, boolean confused, boolean by_player)

Variables

boolean known
static NEARDATA const char readable []
static const char all_count [] = { ALLOW_COUNT, ALL_CLASSES, 0 }

Define Documentation

#define DEVOUT   14
#define ONTHRONE   4

Referenced by do_genocide().

#define PLAYER   2

Referenced by do_genocide().

#define REALLY   1

Referenced by do_genocide().

#define STRIDENT   4
#define Your_Own_Race (   mndx )
Value:
((mndx) == urace.malenum || \
         (urace.femalenum != NON_PM && (mndx) == urace.femalenum))

Referenced by do_class_genocide(), and do_genocide().

#define Your_Own_Role (   mndx )
Value:
((mndx) == urole.malenum || \
         (urole.femalenum != NON_PM && (mndx) == urole.femalenum))

Referenced by do_class_genocide(), and do_genocide().


Function Documentation

boolean cant_create ( int *  mtype,
boolean  revival 
)

References FALSE, PM_ALIGNED_PRIEST, PM_ANGEL, PM_GUARD, PM_HUMAN_ZOMBIE, PM_LONG_WORM, PM_LONG_WORM_TAIL, PM_SHOPKEEPER, and TRUE.

Referenced by revive().

Here is the caller graph for this function:

static void do_class_genocide (  ) [static]
STATIC_PTR void do_flood ( int  x,
int  y,
genericptr_t  poolcnt 
)

References BOULDER, del_engr_at(), delfloortrap(), distmin(), FALSE, level, levl, m_at, minliquid(), newsym(), nexttodoor(), dlevel_t::objects, POOL, rn2(), ROOM, sobj_at(), t_at(), TRUE, u, you::ux, you::uy, water_damage(), trap::x, and trap::y.

Referenced by seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void do_genocide ( int  how,
boolean  only_on_level 
)
int doread (  )
int drop_boulder_on_monster ( int  x,
int  y,
boolean  confused,
boolean  by_player 
)
void drop_boulder_on_player ( boolean  confused,
boolean  helmet_protects,
boolean  by_player,
boolean  drop_directly_to_floor 
)
Parameters:
helmet_protectsif player is protected by a hard helmet
by_playeris boulder creation caused by player
drop_directly_to_floordon't check if player is swallowed by a monster

References amorphous, BOULDER, monst::data, dmgval(), doname(), drop_boulder_on_monster(), FALSE, flags, flooreffects(), is_metallic, KILLED_BY_AN, losehp(), mksobj(), newsym(), noncorporeal, obj::owt, Passes_walls, place_object(), pline(), obj::quan, rn1, ROCK, stackobj(), u, uarmh, unsolid, you::ux, you::uy, flag::verbose, weight(), xname(), and youmonst.

Referenced by drop_boulder_on_monster(), seffects(), and use_offensive().

Here is the call graph for this function:

Here is the caller graph for this function:

static void FDECL ( p_glow1  ,
(struct obj *)   
) [static]
static void FDECL ( forget  ,
(int)   
) [static]
static void FDECL ( maybe_tame  ,
(struct monst *, struct obj *)   
) [static]
static void FDECL ( p_glow2  ,
(struct obj *, const char *)   
) [static]
STATIC_PTR void FDECL ( do_flood  ,
(int, int, genericptr_t  
)
STATIC_PTR void FDECL ( undo_flood  ,
(int, int, genericptr_t  
)
static void FDECL ( stripspe  ,
(struct obj *)   
) [static]
STATIC_PTR void FDECL ( set_lit  ,
(int, int, genericptr_t  
)
static void FDECL ( randomize  ,
(int *, int)   
) [static]
static void FDECL ( wand_explode  ,
(struct obj *)   
) [static]
static void FDECL ( forget_single_object  ,
(int)   
) [static]
static void forget ( int  howmuch ) [static]

References ALL_SPELLS, you::bc_felt, docrt(), forget_levels(), forget_map(), forget_objects(), forget_traps(), losespells(), Punished, rn2(), and u.

Referenced by seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void forget_levels ( int  percent )

References linfo::flags, flags, forget_mapseen(), FORGOTTEN, ledger_no(), ledger_to_dnum(), level_info, maxledgerno(), MAXLINFO, randomize(), sokoban_dnum, u, you::uz, and VISITED.

Referenced by forget(), and hitmu().

Here is the call graph for this function:

Here is the caller graph for this function:

void forget_map ( int  howmuch )

References ALL_MAP, cmap_to_glyph, COLNO, In_sokoban, known, levl, rn2(), ROWNO, S_stone, STONE, TRUE, u, and you::uz.

Referenced by forget(), and goto_level().

Here is the call graph for this function:

Here is the caller graph for this function:

void forget_objects ( int  percent )

References forget_single_object(), NUM_OBJECTS, OBJ_DESCR, objects, and randomize().

Referenced by forget(), and hitmu().

Here is the call graph for this function:

Here is the caller graph for this function:

static void forget_single_object ( int  obj_id ) [static]

References Dragon_mail_to_scales, Dragon_scales_to_mail, Is_dragon_mail, Is_dragon_scales, objects, objclass::oc_uname, and undiscover_object().

Referenced by forget_objects().

Here is the call graph for this function:

Here is the caller graph for this function:

void forget_traps (  )

References ftrap, HOLE, trap::ntrap, trap::tx, trap::ty, u, you::ux, and you::uy.

Referenced by forget(), and goto_level().

Here is the caller graph for this function:

boolean is_chargeable ( struct obj obj )

References FALSE, is_weptool, objects, objclass::oc_uname, RING_CLASS, TOOL_CLASS, TRUE, and WAND_CLASS.

Referenced by getobj().

Here is the caller graph for this function:

void litroom ( boolean  on,
struct obj obj 
)
static void maybe_tame ( struct monst mtmp,
struct obj sobj 
) [static]

References FALSE, make_happy_shk(), NOTELL, obj::oclass, resist(), setmangry(), STATIC_PTR, tamedog(), u, and you::uz.

Referenced by seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

static void NDECL ( do_class_genocide   ) [static]
static void p_glow1 ( struct obj otmp ) [static]

References Blind, otense(), and xname().

Referenced by recharge().

Here is the call graph for this function:

Here is the caller graph for this function:

static void p_glow2 ( struct obj otmp,
const char *  color 
) [static]

References Blind, hcolor(), nul, otense(), and xname().

Referenced by recharge(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void punish ( struct obj sobj )

References amorphous, BALL_CLASS, Blind, CHAIN_CLASS, monst::data, dropy(), is_whirly, mkobj(), newsym(), obj::owt, placebc(), pline(), Punished, set_bc(), setworn(), obj::spe, TRUE, u, uball, unsolid, you::ux, you::uy, W_BALL, W_CHAIN, and youmonst.

Referenced by angrygods(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

static void randomize ( int *  indices,
int  count 
) [static]

References rn2().

Referenced by forget_levels(), and forget_objects().

Here is the call graph for this function:

Here is the caller graph for this function:

void recharge ( struct obj obj,
int  curse_bless 
)
int seffects ( struct obj sobj )

References A_CON, A_DEX, A_INT, A_STR, A_WIS, ABON, adj_abon(), all_count, ALL_MAP, ALL_SPELLS, AMULET_CLASS, aobjnam(), ARMOR_CLASS, Armor_gone(), bcsign(), BLACK_DRAGON_SCALE_MAIL, BLACK_DRAGON_SCALES, BLACKMARKET, blessorcurse(), Blind, body_part(), Boots_off(), flag::botl, burn_away_slime(), cansee, ceiling(), change_luck(), chwepon(), Cloak_off(), closed_door(), COIN_CLASS, COLNO, Confusion, CORNUTHAUM, couldsee, create_critters(), create_gas_cloud(), cvt_sdoor_to_door(), d(), monst::data, DEADMONSTER, destroy_arm(), distu, do_clear_area(), do_flood(), do_genocide(), do_mapping(), drop_boulder_on_monster(), drop_boulder_on_player(), drown(), exercise(), EXPL_FIERY, explode(), FALSE, Fire_resistance, dlevel_t::flags, flags, Flying, fmon, FOOD_CLASS, food_detect(), forget(), GAUNTLETS_OF_DEXTERITY, GEM_CLASS, getobj(), getpos(), Gloves_off(), gold_detect(), goodpos(), GRAY_DRAGON_SCALE_MAIL, GRAY_DRAGON_SCALES, Hallucination, HAND, hcolor(), HConfusion, HEAD, HELM_OF_BRILLIANCE, Helmet_off(), HStun, identify_pack(), In_endgame, In_sokoban, invent, IS_AIR, is_boots, is_cloak, Is_earthlevel, is_elven_armor, is_gloves, is_helmet, IS_ROCK, Is_rogue_level, is_shield, is_weptool, isok(), KILLED_BY_AN, known, LEASH, level, level_tele(), Levitation, levl, litroom(), LOADSTONE, losehp(), Luck, m_at, make_confused(), make_stunned(), makeknown, makeplural(), maybe_tame(), permonst::mlet, monflee(), mons, more_experienced(), monst::mtame, monst::mx, monst::my, Never_mind, NH_BLACK, NH_GOLDEN, NH_PURPLE, NH_RED, NH_SILVER, monst::nmon, obj::nobj, NOTELL, nul, object_detect(), objects, obj::oclass, otense(), otmp, obj::otyp, obj::owornmask, p_glow2(), pline(), plname, PM_ACID_BLOB, PM_WIZARD, POTION_CLASS, punish(), Punished, recharge(), REINCARNATION, resist(), RING_CLASS, rn1, rn2(), rnd(), Role_if, ROWNO, S_HUMAN, SCR_BLANK_PAPER, SCR_CHARGING, SCR_CONFUSE_MONSTER, SCR_CREATE_MONSTER, SCR_DESTROY_ARMOR, SCR_EARTH, SCR_ENCHANT_ARMOR, SCR_ENCHANT_WEAPON, SCR_FIRE, SCR_FLOOD, SCR_FOOD_DETECTION, SCR_GENOCIDE, SCR_GOLD_DETECTION, SCR_IDENTIFY, SCR_LIGHT, SCR_MAGIC_MAPPING, SCR_MAIL, SCR_PUNISHMENT, SCR_REMOVE_CURSE, SCR_SCARE_MONSTER, SCR_STINKING_CLOUD, SCR_TAMING, SCR_TELEPORTATION, SCROLL_CLASS, SDOOR, setworn(), SHIELD_OF_REFLECTION, Shield_off(), shieldeff(), SILVER_DRAGON_SCALE_MAIL, SILVER_DRAGON_SCALES, SIZE, some_armor(), something, SPBOOK_CLASS, obj::spe, SPE_CAUSE_FEAR, SPE_CHARM_MONSTER, SPE_CONFUSE_MONSTER, SPE_CREATE_MONSTER, SPE_DETECT_FOOD, SPE_IDENTIFY, SPE_MAGIC_MAPPING, SPE_REMOVE_CURSE, strange_feeling(), strncmpi(), surface(), tele(), Teleport_control, TOOL_CLASS, trap_detect(), TRUE, you::twoweap, u, uarm, you::uen, you::uenmax, you::umconf, uncurse(), Underwater, undo_flood(), unpunish(), update_inventory, uquiver, useup(), uslinging, you::ustuck, uswapwep, uwep, you::ux, you::ux0, you::uy, you::uy0, you::uz, W_ARM, W_ART, W_ARTI, W_BALL, WAND_CLASS, WEAPON_CLASS, Wwalking, nhcoord::x, xname(), nhcoord::y, YELLOW_DRAGON_SCALES, yn, and youmonst.

Referenced by arti_invoke(), domagictrap(), doread(), and spelleffects().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR void set_lit ( int  x,
int  y,
genericptr_t  val 
)

References levl, and snuff_light_source().

Referenced by litroom().

Here is the call graph for this function:

Here is the caller graph for this function:

static void stripspe ( struct obj obj ) [static]

References BRASS_LANTERN, nothing_happens, OIL_LAMP, otense(), pline(), and xname().

Referenced by recharge().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR void undo_flood ( int  x,
int  y,
genericptr_t  roomcnt 
)

Remove water tile at x,y.

References FOUNTAIN, levl, MOAT, newsym(), POOL, ROOM, WATER, trap::x, and trap::y.

Referenced by seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void unpunish (  )

References dealloc_obj(), newsym(), obj_extract_self(), obj::ox, obj::oy, setworn(), obj::spe, uball, uchain, W_BALL, and W_CHAIN.

Referenced by bhito(), bury_an_obj(), chest_trap(), delallobj(), dog_eat(), doremove(), eatspecial(), fix_worst_trouble(), meatmetal(), polymon(), remove_worn_item(), seffects(), and use_bell().

Here is the call graph for this function:

Here is the caller graph for this function:

static void wand_explode ( struct obj obj ) [static]

References A_STR, exercise(), FALSE, KILLED_BY_AN, losehp(), nhbell, rnd(), TRUE, u, you::uhpmax, useup(), and xname().

Referenced by recharge().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 } [static]

Referenced by seffects().

NEARDATA const char readable[] [static]
Initial value:

Referenced by doread().