Defines | Variables

hack.h File Reference

#include "config.h"
#include "align.h"
#include "dungeon.h"
#include "monsym.h"
#include "mkroom.h"
#include "objclass.h"
#include "youprop.h"
#include "wintype.h"
#include "decl.h"
#include "timeout.h"
#include "trap.h"
#include "flag.h"
#include "rm.h"
#include "vision.h"
#include "display.h"
#include "engrave.h"
#include "rect.h"
#include "region.h"
#include "extern.h"
#include "winprocs.h"
Include dependency graph for hack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TELL   1
#define NOTELL   0
#define ON   1
#define OFF   0
#define BOLT_LIM   8
#define MAX_CARR_CAP   1000
#define DUMMY   { 0 }
#define UNENCUMBERED   0
#define SLT_ENCUMBER   1
#define MOD_ENCUMBER   2
#define HVY_ENCUMBER   3
#define EXT_ENCUMBER   4
#define OVERLOADED   5
#define BY_ORACLE   0
#define BY_COOKIE   1
#define BY_PAPER   2
#define BY_OTHER   9
#define MG_CORPSE   0x01
#define MG_INVIS   0x02
#define MG_DETECT   0x04
#define MG_PET   0x08
#define MG_RIDDEN   0x10
#define MG_INVERSE   0x20
#define SELL_NORMAL   (0)
#define SELL_DELIBERATE   (1)
#define SELL_DONTSELL   (2)
#define DIED   0
#define CHOKING   1
#define POISONING   2
#define STARVING   3
#define DROWNING   4
#define BURNING   5
#define DISSOLVED   6
#define CRUSHING   7
#define STONING   8
#define TURNED_SLIME   9
#define GENOCIDED   10
#define DISINTEGRATED   11
#define MAX_SURVIVABLE_DEATH   11
#define PANICKED   12
#define TRICKED   13
#define QUIT   14
#define ESCAPED   15
#define DEFIED   16
#define ASCENDED   17
#define ZAPPED_WAND   0
#define THROWN_WEAPON   1
#define KICKED_WEAPON   2
#define FLASHED_LIGHT   3
#define INVIS_BEAM   4
#define NO_SPELL   0
#define NO_MM_FLAGS   0x00
#define NO_MINVENT   0x01
#define MM_NOWAIT   0x02
#define MM_EDOG   0x04
#define MM_EMIN   0x08
#define MM_ANGRY   0x10
#define MM_NONAME   0x20
#define MM_NOCOUNTBIRTH   0x40
#define MM_IGNOREWATER   0x80
#define MM_ADJACENTOK   0x100
#define DEFUNCT_MONSTER   (-100)
#define ALL_FINISHED   0x01
#define BY_NEXTHERE   0x1
#define AUTOSELECT_SINGLE   0x2
#define USE_INVLET   0x4
#define INVORDER_SORT   0x8
#define SIGNAL_NOMENU   0x10
#define FEEL_COCKATRICE   0x20
#define UNPAID_TYPES   0x02
#define GOLD_TYPES   0x04
#define WORN_TYPES   0x08
#define ALL_TYPES   0x10
#define BILLED_TYPES   0x20
#define CHOOSE_ALL   0x40
#define BUC_BLESSED   0x80
#define BUC_CURSED   0x100
#define BUC_UNCURSED   0x200
#define BUC_UNKNOWN   0x400
#define BUC_ALLBKNOWN   (BUC_BLESSED|BUC_CURSED|BUC_UNCURSED)
#define UNIDENTIFIED_TYPES   0x800
#define ALL_TYPES_SELECTED   -2
#define FM_FMON   0x01
#define FM_MIGRATE   0x02
#define FM_MYDOGS   0x04
#define FM_EVERYWHERE   (FM_FMON | FM_MIGRATE | FM_MYDOGS)
#define PICK_RANDOM   0
#define PICK_RIGID   1
#define NOWEBMSG   0x01
#define FORCEBUNGLE   0x02
#define RECURSIVETRAP   0x04
#define DO_MOVE   0
#define TEST_MOVE   1
#define TEST_TRAV   2
#define yn(query)   yn_function(query,ynchars, 'n')
#define ynq(query)   yn_function(query,ynqchars, 'q')
#define ynaq(query)   yn_function(query,ynaqchars, 'y')
#define nyaq(query)   yn_function(query,ynaqchars, 'n')
#define nyNaq(query)   yn_function(query,ynNaqchars, 'n')
#define ynNaq(query)   yn_function(query,ynNaqchars, 'y')
#define VIS_EFFECTS   0x01
#define MAY_HITMON   0x02
#define MAY_HITYOU   0x04
#define MAY_HIT   (MAY_HITMON|MAY_HITYOU)
#define MAY_DESTROY   0x08
#define MAY_FRACTURE   0x10
#define ROLL   0x01
#define FLING   0x02
#define LAUNCH_UNSEEN   0x40
#define LAUNCH_KNOWN   0x80
#define EXPL_DARK   0
#define EXPL_NOXIOUS   1
#define EXPL_MUDDY   2
#define EXPL_WET   3
#define EXPL_MAGICAL   4
#define EXPL_FIERY   5
#define EXPL_FROSTY   6
#define EXPL_MAX   7
#define ARM   0
#define EYE   1
#define FACE   2
#define FINGER   3
#define FINGERTIP   4
#define FOOT   5
#define HAND   6
#define HANDED   7
#define HEAD   8
#define LEG   9
#define LIGHT_HEADED   10
#define NECK   11
#define SPINE   12
#define TOE   13
#define HAIR   14
#define BLOOD   15
#define LUNG   16
#define NOSE   17
#define STOMACH   18
#define MENUTYPELEN   sizeof("traditional ")
#define MENU_TRADITIONAL   0
#define MENU_COMBINATION   1
#define MENU_PARTIAL   2
#define MENU_FULL   3
#define MENU_SELECTED   TRUE
#define MENU_UNSELECTED   FALSE
#define SET_IN_FILE   0
#define SET_VIA_PROG   1
#define DISP_IN_GAME   2
#define SET_IN_GAME   3
#define FEATURE_NOTICE_VER(major, minor, patch)
#define FEATURE_NOTICE_VER_MAJ   (flags.suppress_alert >> 24)
#define FEATURE_NOTICE_VER_MIN   (((unsigned long)(0x0000000000FF0000L & flags.suppress_alert)) >> 16)
#define FEATURE_NOTICE_VER_PATCH   (((unsigned long)(0x000000000000FF00L & flags.suppress_alert)) >> 8)
#define max(a, b)   ((a) > (b) ? (a) : (b))
#define min(x, y)   ((x) < (y) ? (x) : (y))
#define plur(x)   (((x) == 1) ? "" : "s")
#define ARM_BONUS(obj)
#define makeknown(x)   discover_object((x),TRUE,TRUE)
#define distu(xx, yy)   dist2((int)(xx),(int)(yy),(int)u.ux,(int)u.uy)
#define onlineu(xx, yy)   online2((int)(xx),(int)(yy),(int)u.ux,(int)u.uy)
#define rn1(x, y)   (rn2(x)+(y))
#define AC_VALUE(AC)   ((AC) >= 0 ? (AC) : -rnd(-(AC)))
#define STATIC_DCL   static
#define STATIC_OVL   static
#define STATIC_VAR   static
#define OVL0
#define OVL1
#define OVL2
#define OVL3
#define OVLB
#define STATIC_PTR   static
#define CFDECLSPEC

Variables

NEARDATA coord bhitpos

Define Documentation

#define AC_VALUE (   AC )    ((AC) >= 0 ? (AC) : -rnd(-(AC)))

Referenced by mattacku(), and zap_hit().

#define ALL_FINISHED   0x01

Referenced by ggetobj(), and menu_drop().

#define ALL_TYPES   0x10
#define ALL_TYPES_SELECTED   -2
#define ARM   0
#define ARM_BONUS (   obj )
Value:
(objects[(obj)->otyp].a_ac + (obj)->spe \
                         - min((int)greatest_erosion(obj),objects[(obj)->otyp].a_ac))

Referenced by find_ac(), find_mac(), and m_dowear_type().

#define ASCENDED   17

Referenced by done(), and dosacrifice().

#define AUTOSELECT_SINGLE   0x2

Referenced by pickup(), and query_objlist().

#define BILLED_TYPES   0x20

Referenced by dotypeinv(), and query_category().

#define BLOOD   15

Referenced by domonnoise().

#define BOLT_LIM   8
#define BUC_ALLBKNOWN   (BUC_BLESSED|BUC_CURSED|BUC_UNCURSED)

Referenced by menu_loot().

#define BUC_BLESSED   0x80
#define BUC_CURSED   0x100
#define BUC_UNCURSED   0x200
#define BUC_UNKNOWN   0x400
#define BURNING   5
#define BY_COOKIE   1

Referenced by doread(), fpostfx(), and outrumor().

#define BY_NEXTHERE   0x1

Referenced by pickup().

#define BY_ORACLE   0

Referenced by doconsult(), and outrumor().

#define BY_OTHER   9
#define BY_PAPER   2

Referenced by outrumor().

#define CFDECLSPEC
#define CHOKING   1

Referenced by choke(), done(), and savelife().

#define CHOOSE_ALL   0x40
#define CRUSHING   7

Referenced by destroy_drawbridge(), and do_entity().

#define DEFIED   16

Referenced by done().

#define DEFUNCT_MONSTER   (-100)

Referenced by getbones(), and restmonchn().

#define DIED   0
#define DISINTEGRATED   11

Referenced by done(), and zhitu().

#define DISP_IN_GAME   2

Referenced by doset().

#define DISSOLVED   6

Referenced by moveloop().

#define distu (   xx,
  yy 
)    dist2((int)(xx),(int)(yy),(int)u.ux,(int)u.uy)
#define DO_MOVE   0

Referenced by domove(), and test_move().

#define DROWNING   4

Referenced by do_entity(), drown(), e_died(), and hitmu().

#define DUMMY   { 0 }
#define ESCAPED   15
#define EXPL_DARK   0
#define EXPL_FIERY   5
#define EXPL_FROSTY   6

Referenced by do_break_wand(), and spelleffects().

#define EXPL_MAGICAL   4

Referenced by do_break_wand().

#define EXPL_MAX   7
#define EXPL_MUDDY   2
#define EXPL_NOXIOUS   1

Referenced by corpse_chance().

#define EXPL_WET   3
#define EXT_ENCUMBER   4
#define EYE   1
#define FACE   2
#define FEATURE_NOTICE_VER (   major,
  minor,
  patch 
)
Value:
(((unsigned long)major << 24) | \
        ((unsigned long)minor << 16) | \
        ((unsigned long)patch << 8) | \
        ((unsigned long)0))

Referenced by dowieldquiver(), get_current_feature_ver(), and get_feature_notice_ver().

#define FEATURE_NOTICE_VER_MAJ   (flags.suppress_alert >> 24)
#define FEATURE_NOTICE_VER_MIN   (((unsigned long)(0x0000000000FF0000L & flags.suppress_alert)) >> 16)
#define FEATURE_NOTICE_VER_PATCH   (((unsigned long)(0x000000000000FF00L & flags.suppress_alert)) >> 8)
#define FEEL_COCKATRICE   0x20

Referenced by pickup(), and query_objlist().

#define FINGER   3
#define FINGERTIP   4

Referenced by mbodypart().

#define FLASHED_LIGHT   3

Referenced by bhit().

#define FLING   0x02
#define FM_EVERYWHERE   (FM_FMON | FM_MIGRATE | FM_MYDOGS)

Referenced by relink_light_sources(), and write_ls().

#define FM_FMON   0x01

Referenced by find_mid(), revive(), and run_regions().

#define FM_MIGRATE   0x02

Referenced by find_mid().

#define FM_MYDOGS   0x04

Referenced by find_mid().

#define FOOT   5
#define FORCEBUNGLE   0x02

Referenced by dotrap(), and set_trap().

#define GENOCIDED   10
#define GOLD_TYPES   0x04
#define HAIR   14

Referenced by dosounds(), and mbodypart().

#define HAND   6
#define HANDED   7
#define HEAD   8
#define HVY_ENCUMBER   3
#define INVIS_BEAM   4

Referenced by bhit(), and use_mirror().

#define INVORDER_SORT   0x8
#define KICKED_WEAPON   2

Referenced by bhit(), and kick_object().

#define LAUNCH_KNOWN   0x80

Referenced by dotrap(), and launch_obj().

#define LAUNCH_UNSEEN   0x40

Referenced by launch_obj(), and mintrap().

#define LEG   9
#define LIGHT_HEADED   10

Referenced by rottenfood().

#define LUNG   16

Referenced by inside_gas_cloud().

#define makeknown (   x )    discover_object((x),TRUE,TRUE)
#define max (   a,
 
)    ((a) > (b) ? (a) : (b))
#define MAX_CARR_CAP   1000

Referenced by max_mon_load(), and weight_cap().

#define MAX_SURVIVABLE_DEATH   11

Referenced by done().

#define MAY_DESTROY   0x08
#define MAY_FRACTURE   0x10
#define MAY_HIT   (MAY_HITMON|MAY_HITYOU)
#define MAY_HITMON   0x02

Referenced by scatter().

#define MAY_HITYOU   0x04

Referenced by scatter().

#define MENU_COMBINATION   1
#define MENU_FULL   3
#define MENU_PARTIAL   2

Referenced by dotypeinv(), and parseoptions().

#define MENU_SELECTED   TRUE

Referenced by dospellmenu(), and special_handling().

#define MENU_TRADITIONAL   0
#define MENU_UNSELECTED   FALSE
#define MENUTYPELEN   sizeof("traditional ")
#define MG_CORPSE   0x01

Referenced by mapglyph().

#define MG_DETECT   0x04

Referenced by mapglyph().

#define MG_INVERSE   0x20

Referenced by mapglyph().

#define MG_INVIS   0x02

Referenced by mapglyph().

#define MG_PET   0x08

Referenced by mapglyph().

#define MG_RIDDEN   0x10

Referenced by mapglyph().

#define min (   x,
 
)    ((x) < (y) ? (x) : (y))
#define MM_ADJACENTOK   0x100

Referenced by animate_statue(), and makemon().

#define MM_ANGRY   0x10

Referenced by dokick(), and makemon().

#define MM_EDOG   0x04
#define MM_EMIN   0x08

Referenced by makemon(), and summon_minion().

#define MM_IGNOREWATER   0x80
#define MM_NOCOUNTBIRTH   0x40
#define MM_NONAME   0x20

Referenced by makemon(), and savebones().

#define MM_NOWAIT   0x02

Referenced by makemon(), montraits(), resurrect(), and revive().

#define MOD_ENCUMBER   2
#define NECK   11
#define NO_MINVENT   0x01
#define NO_MM_FLAGS   0x00
#define NO_SPELL   0
#define NOSE   17

Referenced by doeat(), food_detect(), and mbodypart().

#define NOTELL   0
#define NOWEBMSG   0x01

Referenced by dotrap(), and try_disarm().

#define nyaq (   query )    yn_function(query,ynaqchars, 'n')

Referenced by askchain().

#define nyNaq (   query )    yn_function(query,ynNaqchars, 'n')

Referenced by askchain().

#define OFF   0
#define ON   1
#define onlineu (   xx,
  yy 
)    online2((int)(xx),(int)(yy),(int)u.ux,(int)u.uy)

Referenced by mfndpos(), move_special(), and shk_move().

#define OVERLOADED   5

Referenced by calc_capacity(), domove(), and parseoptions().

#define OVL0
#define OVL1
#define OVL2
#define OVL3
#define OVLB
#define PANICKED   12

Referenced by disclose(), done(), and topten().

#define PICK_RANDOM   0

Referenced by rigid_role_checks().

#define PICK_RIGID   1
#define plur (   x )    (((x) == 1) ? "" : "s")
#define POISONING   2

Referenced by fpostfx(), nh_timeout(), and poisoned().

#define QUIT   14

Referenced by disclose(), done(), done2(), and violated().

#define RECURSIVETRAP   0x04

Referenced by dotrap().

#define rn1 (   x,
 
)    (rn2(x)+(y))

Referenced by bagotricks(), ballfall(), buzz(), chat_with_guardian(), chat_with_leader(), chat_with_nemesis(), chest_trap(), cpostfx(), create_mplayers(), create_room(), create_secret_door(), cthulhu_dies(), cursed_book(), damageum(), demon_talk(), digactualhole(), diseasemu(), display_warning(), dlord(), do_earthquake(), do_genocide(), do_improvisation(), dochug(), dokick(), domagictrap(), dorub(), dosit(), dotrap(), dowatersnakes(), dowrite(), dprince(), drinkfountain(), drop_ball(), drop_boulder_on_monster(), drop_boulder_on_player(), drown(), eatcorpse(), exerchk(), fill_room(), fill_zoo(), final_level(), fix_attributes_and_properties(), fixup_special(), fprefx(), fracture_rock(), goto_level(), hitmu(), hmon_hitmon(), init_dungeons(), init_fill(), jump(), lava_effects(), losexp(), m_initinv(), m_initthrow(), m_initweap(), makemaz(), makemon(), makewish(), maybe_cannibal(), maze1xy(), mdamagem(), mk_mplayer(), mk_mplayer_armor(), mk_split_room(), mkgarden(), mkroll_launch(), mksobj(), mon_arrive(), moveloop(), nemesis_speaks(), newman(), opentin(), peffects(), place_lregion(), pleased(), pluslvl(), poisoned(), polyman(), polymon(), polyself(), pri_move(), priest_talk(), priestini(), recharge(), reset_attribute_clock(), rloc(), rloc_engr(), rloco(), rndmonnam(), rndmonnum(), seffects(), select_newcham_form(), start_tin(), toss_up(), u_init(), use_defensive(), use_grapple(), use_offensive(), use_towel(), weffects(), wizdead(), worm_move(), zap_dig(), zap_over_floor(), and zapnodir().

#define ROLL   0x01

Referenced by dotrap(), launch_obj(), and mintrap().

#define SELL_DELIBERATE   (1)

Referenced by doddrop(), dodrop(), and in_container().

#define SELL_DONTSELL   (2)

Referenced by sellobj(), and touchfood().

#define SELL_NORMAL   (0)
#define SET_IN_FILE   0

Referenced by parseoptions().

#define SET_IN_GAME   3
#define SET_VIA_PROG   1
#define SIGNAL_NOMENU   0x10
#define SLT_ENCUMBER   1
#define SPINE   12

Referenced by deadbook(), domagictrap(), and intemple().

#define STARVING   3

Referenced by done(), and newuhs().

#define STATIC_DCL   static
#define STATIC_OVL   static
#define STATIC_PTR   static

Referenced by maybe_tame().

#define STATIC_VAR   static
#define STOMACH   18
#define STONING   8
#define TELL   1

Referenced by bhitm(), doturn(), and mbhitm().

#define TEST_MOVE   1

Referenced by bhit(), click_to_cmd(), and findtravelpath().

#define TEST_TRAV   2

Referenced by findtravelpath(), and test_move().

#define THROWN_WEAPON   1

Referenced by bhit(), throw_gold(), and throwit().

#define TOE   13

Referenced by mbodypart(), and trap_detect().

#define TRICKED   13

Referenced by done(), dosave0(), goto_level(), and trickery().

#define TURNED_SLIME   9

Referenced by done(), and nh_timeout().

#define UNENCUMBERED   0
#define UNIDENTIFIED_TYPES   0x800
#define UNPAID_TYPES   0x02
#define USE_INVLET   0x4
#define VIS_EFFECTS   0x01
#define WORN_TYPES   0x08
#define yn (   query )    yn_function(query,ynchars, 'n')
#define ynaq (   query )    yn_function(query,ynaqchars, 'y')

Referenced by pickup(), and sellobj().

#define ynNaq (   query )    yn_function(query,ynNaqchars, 'y')

Referenced by pickup().

#define ynq (   query )    yn_function(query,ynqchars, 'q')
#define ZAPPED_WAND   0

Referenced by bhit(), and weffects().


Variable Documentation

NEARDATA coord bhitpos