#include "hack.h"
#include "func_tab.h"
Defines | |
#define | CMD_TRAVEL (char)0x90 |
#define | enl_msg(prefix, present, past, suffix) enlght_line(prefix, final ? past : present, suffix) |
#define | you_are(attr) enl_msg(You_,are,were,attr) |
#define | you_have(attr) enl_msg(You_,have,had,attr) |
#define | you_can(attr) enl_msg(You_,can,could,attr) |
#define | you_have_been(goodthing) enl_msg(You_,have_been,were,goodthing) |
#define | you_have_never(badthing) enl_msg(You_,have_never,never,badthing) |
#define | you_have_X(something) enl_msg(You_,have,(const char *)"",something) |
#define | M(c) (0x80 | (c)) |
#define | C(c) (0x1f & (c)) |
#define | unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c)) |
#define | unmeta(c) (0x7f & (c)) |
Functions | |
static int | NDECL ((*timed_occ_fn)) |
STATIC_PTR int | NDECL (doprev_message) |
STATIC_PTR int | NDECL (timed_occupation) |
STATIC_PTR int | NDECL (doextcmd) |
STATIC_PTR int | NDECL (domonability) |
STATIC_PTR int | NDECL (dooverview_or_wiz_where) |
STATIC_PTR int | NDECL (dotravel) |
int | NDECL (tutorial_redisplay) |
STATIC_PTR int | NDECL (enter_explore_mode) |
STATIC_PTR int | NDECL (doattributes) |
STATIC_PTR int | NDECL (doconduct) |
STATIC_PTR boolean | NDECL (minimal_enlightenment) |
STATIC_DCL void | FDECL (enlght_line,(const char *, const char *, const char *)) |
STATIC_DCL char * | FDECL (enlght_combatinc,(const char *, int, int, char *)) |
STATIC_DCL char * | NDECL (parse) |
STATIC_DCL boolean | FDECL (help_dir,(CHAR_P, const char *)) |
STATIC_PTR int | doprev_message () |
STATIC_PTR int | timed_occupation () |
void | reset_occupations () |
void | set_occupation (fn, const char *txt, int xtime) |
STATIC_PTR int | doextcmd () |
int | doextlist () |
STATIC_PTR int | domonability () |
STATIC_PTR int | enter_explore_mode () |
STATIC_PTR int | dooverview_or_wiz_where () |
static void | enlght_line (char *start, char *middle, char *end) const |
static char * | enlght_combatinc (char *inctyp, int incamt, int final, char *outbuf) const |
void | enlightenment (int final, boolean want_disp) |
STATIC_OVL boolean | minimal_enlightenment () |
STATIC_PTR int | doattributes () |
STATIC_PTR int | doconduct () |
void | show_conduct (int final, boolean want_disp) |
void | rhack (char *cmd) |
int | xytod (schar x, schar y) |
void | dtoxy (coord *cc, int dd) |
int | movecmd (char sym) |
int | get_adjacent_loc (char *prompt, char *emsg, xchar x, xchar y, coord *cc) const |
int | getdir (char *s) const |
STATIC_OVL boolean | help_dir (char sym, const char *msg) |
void | confdir () |
int | isok (int x, int y) |
const char * | click_to_cmd (int x, int y, int mod) |
STATIC_OVL char * | parse () |
char | readchar () |
STATIC_PTR int | dotravel () |
char | yn_function (char *query, char *resp, char def) const |
char | paranoid_yn (char *query, boolean paranoid) const |
Variables | |
static const char * | readchar_queue = "" |
static winid | en_win |
static const char | You_ [] = "You " |
static const char | are [] = "are " |
static const char | were [] = "were " |
static const char | have [] = "have " |
static const char | had [] = "had " |
static const char | can [] = "can " |
static const char | could [] = "could " |
static const char | have_been [] = "have been " |
static const char | have_never [] = "have never " |
static const char | never [] = "never " |
static int | want_display = FALSE |
static struct func_tab | cmdlist [] |
struct ext_func_tab | extcmdlist [] |
static NEARDATA int | last_multi |
#define C | ( | c ) | (0x1f & (c)) |
Referenced by click_to_cmd(), and rhack().
#define CMD_TRAVEL (char)0x90 |
Referenced by click_to_cmd(), dotravel(), and rhack().
#define enl_msg | ( | prefix, | |
present, | |||
past, | |||
suffix | |||
) | enlght_line(prefix, final ? past : present, suffix) |
Referenced by enlightenment(), and show_conduct().
#define M | ( | c ) | (0x80 | (c)) |
Referenced by click_to_cmd(), and rhack().
#define unctrl | ( | c ) | ((c) <= C('z') ? (0x60 | (c)) : (c)) |
Referenced by rhack().
#define unmeta | ( | c ) | (0x7f & (c)) |
Referenced by rhack().
Referenced by enlightenment().
Referenced by enlightenment().
Referenced by enlightenment().
#define you_have_never | ( | badthing ) | enl_msg(You_,have_never,never,badthing) |
Referenced by show_conduct().
Referenced by show_conduct().
const char* click_to_cmd | ( | int | x, |
int | y, | ||
int | mod | ||
) |
References C, CLICK_1, CMD_TRAVEL, D_CLOSED, D_LOCKED, iflags, Is_container, IS_DOOR, IS_FOUNTAIN, IS_SINK, IS_THRONE, level, levl, M, m_at, ndir, instance_flags::num_pad, OBJ_AT, dlevel_t::objects, SCORR, sdir, sgn(), sstairs, stairway::sx, stairway::sy, TEST_MOVE, test_move(), instance_flags::travelcmd, you::tx, you::ty, u, stairway::up, you::ux, you::uy, xdnladder, xdnstair, xupladder, xupstair, xytod(), ydnladder, ydnstair, yupladder, and yupstair.
Referenced by readchar().
void confdir | ( | ) |
References you::dx, you::dy, PM_GRID_BUG, rn2(), u, you::umonnum, xdir, and ydir.
Referenced by domove(), getdir(), use_pick_axe2(), use_stethoscope(), and use_whip().
STATIC_PTR int doattributes | ( | ) |
References discover, enlightenment(), minimal_enlightenment(), TRUE, and wizard.
STATIC_PTR int doconduct | ( | ) |
STATIC_PTR int doextcmd | ( | ) |
int doextlist | ( | ) |
References BUFSZ, create_nhwindow, destroy_nhwindow, display_nhwindow, ext_func_tab::ef_desc, ext_func_tab::ef_txt, extcmdlist, FALSE, NHW_TEXT, putstr, and Sprintf.
Referenced by doextcmd(), and dohelp().
STATIC_PTR int domonability | ( | ) |
References aggravate(), AT_GAZE, AT_SPIT, attacktype(), can_breathe, monst::data, dobreathe(), dogaze(), dohide(), domindblast(), doremove(), dospinweb(), dospit(), dosummon(), dryup(), fix_attributes_and_properties(), IS_FOUNTAIN, is_hider, is_mind_flayer, is_unicorn, is_were, levl, permonst::mlet, MS_SHRIEK, permonst::msound, pline(), PM_GREMLIN, S_NYMPH, split_mon(), TRUE, u, you::umonnum, Upolyd, you::ux, you::uy, webmaker, and youmonst.
STATIC_PTR int dooverview_or_wiz_where | ( | ) |
STATIC_PTR int doprev_message | ( | ) |
References nh_doprev_message.
STATIC_PTR int dotravel | ( | ) |
References CMD_TRAVEL, getpos(), iflags, pline(), instance_flags::travelcc, instance_flags::travelcmd, TRUE, you::tx, you::ty, u, you::ux, you::uy, nhcoord::x, and nhcoord::y.
void dtoxy | ( | coord * | cc, |
int | dd | ||
) |
static char* enlght_combatinc | ( | char * | inctyp, |
int | incamt, | ||
int | final, | ||
char * | outbuf | ||
) | const [static] |
References an(), Sprintf, wizard, and WIZARD.
Referenced by enlightenment().
static void enlght_line | ( | char * | start, |
char * | middle, | ||
char * | end | ||
) | const [static] |
void enlightenment | ( | int | final, |
boolean | want_disp | ||
) |
References a_monnam(), Acid_resistance, Adornment, Aggravate_monster, ALIGNLIM, Amphibious, an(), Antimagic, ARTICLE_YOUR, BInvis, Blind_telepat, Blinded, body_part(), Breathless, BUFSZ, can_pray(), carrying(), Clairvoyant, Cold_resistance, Conflict, Confusion, create_nhwindow, monst::data, destroy_nhwindow, Detect_monsters, Disint_resistance, Displaced, display_nhwindow, Drain_resistance, dump(), dump_list_end(), dump_list_start(), dump_title(), EInvis, enl_msg, enlght_combatinc(), eos(), FALSE, Fast, FINGER, Fire_resistance, Fixed_abil, flags, Flying, Free_action, Fumbling, Glib, Halluc_resistance, Hallucination, highc(), HInvis, HProtection, Hunger, Infravision, INTRINSIC, Invis, Invisible, Invulnerable, Jumping, killer, LEG, Lev_at_will, level_difficulty(), Levitation, Lifesaved, LOW_PM, Luck, LUCKSTONE, M2_DEMON, M2_GIANT, M2_ORC, M2_UNDEAD, M2_WERE, makeplural(), max_monster_difficulty(), min_monster_difficulty(), permonst::mname, mons, you::moreluck, you::mtimedone, NHW_MENU, ordin(), obj::otyp, Passes_walls, pm_invisible, Poison_resistance, Polymorph, Polymorph_control, Protection, Protection_from_shape_changers, putstr, align::record, Reflecting, Regeneration, RIN_ADORNMENT, RIN_PROTECTION, Searching, See_invisible, Shock_resistance, Sick, SICK_NONVOMITABLE, Sick_resistance, SICK_VOMITABLE, Sleep_resistance, Sleeping, Slimed, Slow_digestion, something, obj::spe, Sprintf, Stealth, STEED, sticks(), stone_luck(), Stone_resistance, Stoned, Strangled, Strcpy, Stunned, SUPPRESS_HALLUCINATION, SUPPRESS_SADDLE, Swimming, Teleport_control, Teleportation, TRUE, you::twoweap, u, u_gname(), you::ualign, you::ublesscnt, you::ublessed, you::udaminc, you::uevent, you::ugangr, you::uhitinc, you::uhunger, uleft, you::ulycn, you::umconf, you::umonnum, you::umortality, Unchanging, Undead_warning, Upolyd, uright, you::uspellprot, you::ustuck, you::uswldtim, uwep, Very_fast, Warn_of_mon, Warning, flag::warntype, wizard, Wounded_legs, Wwalking, x_monnam(), y_monnam(), You_, you_are, you_can, you_have, and youmonst.
Referenced by arti_invoke(), disclose(), doattributes(), drinkfountain(), peffects(), and zapnodir().
STATIC_PTR int enter_explore_mode | ( | ) |
References clear_nhwindow, discover, iflags, instance_flags::paranoid_quit, paranoid_yn(), pline(), TRUE, WIN_MESSAGE, and wizard.
STATIC_DCL boolean FDECL | ( | help_dir | , |
(CHAR_P, const char *) | |||
) |
STATIC_DCL void FDECL | ( | enlght_line | , |
(const char *, const char *, const char *) | |||
) |
STATIC_DCL char* FDECL | ( | enlght_combatinc | , |
(const char *, int, int, char *) | |||
) |
References you::dx, you::dy, getdir(), isok(), Never_mind, pline(), u, nhcoord::x, and nhcoord::y.
Referenced by pick_lock(), and use_leash().
int getdir | ( | char * | s ) | const |
References instance_flags::cmdassist, confdir(), Confusion, you::dx, you::dy, you::dz, FALSE, help_dir(), iflags, index, movecmd(), pline(), quitchars, readchar(), rn2(), Stunned, u, and yn_function().
Referenced by do_improvisation(), dobreathe(), dochat(), doclose(), doidtrap(), dokick(), dospit(), dozap(), get_adjacent_loc(), spelleffects(), throw_obj(), untrap(), use_figurine(), use_mirror(), use_pick_axe(), use_stethoscope(), and use_whip().
STATIC_OVL boolean help_dir | ( | char | sym, |
const char * | msg | ||
) |
References BUFSZ, create_nhwindow, destroy_nhwindow, display_nhwindow, dowhatdoes_core(), expl, FALSE, highc(), iflags, index, letter(), NHW_TEXT, instance_flags::num_pad, PM_GRID_BUG, putstr, Sprintf, TRUE, u, you::umonnum, and wizard.
Referenced by getdir(), and rhack().
int isok | ( | int | x, |
int | y | ||
) |
Referenced by add_region(), bhit(), blocked_boulder(), buzz(), bydoor(), can_reach_location(), check_pos(), clone_mon(), do_break_wand(), do_play_instrument(), dokick(), domagictrap(), domove(), dosearch0(), explode(), figurine_location_checks(), find_defensive(), find_misc(), findtravelpath(), flood_fill_rm(), gd_move(), get_adjacent_loc(), get_location(), getpos(), goodpos(), hurtle_step(), in_trouble(), is_ice(), is_lava(), is_pool(), is_solid(), isclearpath(), iswall(), iswall_or_stone(), jump(), launch_obj(), lookaround(), m_throw(), make_angry_shk(), maybe_tutorial(), mbhit(), mkcavepos(), mon_beside(), monster_nearby(), movebubbles(), moverock(), nexttodoor(), place_niche(), remove_region(), rm_waslit(), scatter(), seffects(), selection_floodfill(), selection_rndcoord(), set_apparxy(), shkinit(), show_glyph(), sp_level_coder(), spelleffects(), spill_terrain(), spo_grave(), swallowed(), under_water(), use_offensive(), use_pick_axe(), use_pick_axe2(), use_stethoscope(), vision_recalc(), wallify_map(), wallwalk_right(), water_friction(), waterbody_name(), and zap_dig().
STATIC_OVL boolean minimal_enlightenment | ( | ) |
References A_CHAOTIC, A_LAWFUL, A_NEUTRAL, A_ORIGINAL, any::a_void, add_menu, Gender::adj, align_gname(), align_str(), ATR_NONE, BUFSZ, create_nhwindow, monst::data, destroy_nhwindow, end_menu, RoleName::f, FALSE, flag::female, flags, genders, iflags, flag::initgend, is_neuter, RoleName::m, instance_flags::menu_headings, instance_flags::menu_tab_sep, permonst::mname, Role::name, NHW_MENU, NO_GLYPH, Race::noun, PICK_NONE, plname, select_menu, Sprintf, start_menu, align::type, u, you::ualign, you::ualignbase, Upolyd, urace, urole, you::ux, you::uy, wizard, and youmonst.
Referenced by doattributes().
int movecmd | ( | char | sym ) |
References you::dx, you::dy, you::dz, iflags, index, ndir, instance_flags::num_pad, PM_GRID_BUG, sdir, u, you::umonnum, xdir, ydir, and zdir.
Referenced by getdir(), rhack(), and use_pick_axe().
STATIC_PTR int NDECL | ( | timed_occupation | ) |
int NDECL | ( | tutorial_redisplay | ) |
STATIC_PTR int NDECL | ( | doprev_message | ) |
static int NDECL | ( | * | timed_occ_fn ) | [static] |
STATIC_PTR int NDECL | ( | domonability | ) |
STATIC_PTR int NDECL | ( | doattributes | ) |
STATIC_PTR int NDECL | ( | dooverview_or_wiz_where | ) |
STATIC_PTR int NDECL | ( | doextcmd | ) |
STATIC_PTR boolean NDECL | ( | minimal_enlightenment | ) |
STATIC_DCL char* NDECL | ( | parse | ) |
STATIC_PTR int NDECL | ( | dotravel | ) |
STATIC_PTR int NDECL | ( | enter_explore_mode | ) |
STATIC_PTR int NDECL | ( | doconduct | ) |
char paranoid_yn | ( | char * | query, |
boolean | paranoid | ||
) | const |
Asks the player a yes/no question if paranoid is true.
References BUFSZ, getlin, lcase(), Sprintf, and yn.
Referenced by attack_checks(), done(), done2(), and enter_explore_mode().
STATIC_OVL char* parse | ( | ) |
References clear_nhwindow, COLNO, FALSE, flags, flush_screen(), iflags, in_line, LARGEST_INT, last_multi, mark_synch, flag::move, multi, instance_flags::num_pad, pline(), readchar(), save_cm, Sprintf, TRUE, and WIN_MESSAGE.
Referenced by rhack().
char readchar | ( | ) |
void reset_occupations | ( | ) |
References reset_pick(), reset_remarm(), and reset_trapset().
Referenced by doddrop(), dodrop(), domove(), and gulpmu().
void rhack | ( | char * | cmd ) |
References C, func_tab::can_if_buried, check_tutorial_command(), CMD_TRAVEL, instance_flags::cmdassist, ddoinv(), domove(), you::dz, func_tab::f_char, func_tab::f_text, FALSE, flags, flag::forcefight, help_dir(), iflags, you::last_str_turn, lowc(), M, max, instance_flags::menu_requested, flag::move, movecmd(), multi, flag::mv, NDECL, nhbell, flag::nopick, instance_flags::num_pad, instance_flags::num_pad_mode, parse(), flag::rest_on_space, flag::run, set_occupation(), flag::travel, instance_flags::travel1, instance_flags::travelcmd, TRUE, u, unctrl, and unmeta.
Referenced by moveloop().
void set_occupation | ( | fn | , |
const char * | txt, | ||
int | xtime | ||
) |
References occtime, occtxt, timed_occupation(), and txt.
Referenced by doddoremarm(), doforce(), dowipe(), eatspecial(), pick_lock(), rhack(), start_eating(), start_tin(), study_book(), take_off(), use_pick_axe2(), and use_trap().
void show_conduct | ( | int | final, |
boolean | want_disp | ||
) |
References u_conduct::armoruses, BUFSZ, CONDUCT_PACIFISM, CONDUCT_SADISM, conducts, create_nhwindow, destroy_nhwindow, display_nhwindow, dump(), dump_list_end(), dump_list_start(), dump_title(), u_conduct::elbereths, enl_msg, failed_cdt(), FIRST_CONDUCT, intended_cdt(), u_conduct::killer, LAST_CONDUCT, u_conduct::literate, NHW_MENU, num_genocides(), plur, u_conduct::polypiles, u_conduct::polyselfs, putstr, Sprintf, successful_cdt(), superfluous_cdt(), TRUE, u, you::uconduct, u_conduct::weaphit, u_conduct::wisharti, u_conduct::wishes, u_conduct::wishmagic, wizard, You_, you_have_never, and you_have_X.
Referenced by disclose(), and doconduct().
STATIC_PTR int timed_occupation | ( | ) |
char yn_function | ( | char * | query, |
char* | resp, | ||
char | def | ||
) | const |
References paniclog(), QBUFSZ, Strcat, and windowprocs.
Referenced by disclose(), dokick(), doorganize(), doputon(), dosacrifice(), dotypeinv(), dowhatdoes(), edibility_prompts(), engrave(), floorfood(), getdir(), getobj(), getspell(), is_pure(), lesshungry(), list_genocided(), loot_mon(), use_container(), and use_crystal_ball().
const char are[] = "are " |
const char can[] = "can " |
Referenced by use_tinning_kit().
const char could[] = "could " |
struct ext_func_tab extcmdlist[] |
Referenced by doextcmd(), and doextlist().
const char had[] = "had " |
const char have[] = "have " |
const char have_been[] = "have been " [static] |
const char have_never[] = "have never " |
NEARDATA int last_multi [static] |
Referenced by parse().
const char never[] = "never " |
const char* readchar_queue = "" [static] |
int want_display = FALSE [static] |
const char were[] = "were " |
const char You_[] = "You " [static] |
Referenced by enlightenment(), and show_conduct().