#include "hack.h"
Defines | |
#define | BCPOS_DIFFER 0 |
#define | BCPOS_CHAIN 1 |
#define | BCPOS_BALL 2 |
#define | CHAIN_IN_MIDDLE(chx, chy) (distmin(x, y, chx, chy) <= 1 && distmin(chx, chy, uball->ox, uball->oy) <= 1) |
#define | IS_CHAIN_ROCK(x, y) |
#define | SKIP_TO_DRAG |
Functions | |
STATIC_DCL int | NDECL (bc_order) |
STATIC_DCL void | NDECL (litter) |
void | ballfall () |
void | placebc () |
void | unplacebc () |
STATIC_OVL int | bc_order () |
void | set_bc (int already_blind) |
void | move_bc (int before, int control, xchar ballx, xchar bally, xchar chainx, xchar chainy) |
boolean | drag_ball (xchar x, xchar y, int *bc_control, xchar *ballx, xchar *bally, xchar *chainx, xchar *chainy, boolean *cause_delay, boolean allow_drag) |
void | drop_ball (xchar x, xchar y) |
STATIC_OVL void | litter () |
void | drag_down () |
#define BCPOS_BALL 2 |
Referenced by bc_order(), and move_bc().
#define BCPOS_CHAIN 1 |
Referenced by bc_order(), move_bc(), placebc(), and set_bc().
#define BCPOS_DIFFER 0 |
Referenced by bc_order(), move_bc(), placebc(), and set_bc().
#define CHAIN_IN_MIDDLE | ( | chx, | |
chy | |||
) | (distmin(x, y, chx, chy) <= 1 && distmin(chx, chy, uball->ox, uball->oy) <= 1) |
Referenced by drag_ball().
#define IS_CHAIN_ROCK | ( | x, | |
y | |||
) |
#define SKIP_TO_DRAG |
{ *chainx = oldchainx; *chainy = oldchainy; \ move_bc(0, *bc_control, *ballx, *bally, *chainx, *chainy); \ goto drag; }
Referenced by drag_ball().
void ballfall | ( | ) |
References body_part(), carried, FALSE, flags, freeinv(), HEAD, is_metallic, losehp(), NO_KILLER_PREFIX, obj::ox, obj::oy, pline(), rn1, rn2(), setuqwep(), setuswapwep(), setuwep(), u, uarmh, uball, uquiver, uswapwep, uwep, you::ux, you::uy, flag::verbose, and xname().
Referenced by dotrap(), and goto_level().
STATIC_OVL int bc_order | ( | ) |
References BCPOS_BALL, BCPOS_CHAIN, BCPOS_DIFFER, carried, level, dlevel_t::objects, obj::ox, obj::oy, u, uball, and uchain.
Referenced by drop_ball(), move_bc(), and set_bc().
boolean drag_ball | ( | xchar | x, |
xchar | y, | ||
int * | bc_control, | ||
xchar * | ballx, | ||
xchar * | bally, | ||
xchar * | chainx, | ||
xchar * | chainy, | ||
boolean * | cause_delay, | ||
boolean | allow_drag | ||
) |
References BC_BALL, BC_CHAIN, carried, CHAIN_IN_MIDDLE, dist2(), distmin(), FALSE, find_mac(), hmon(), HOLE, invent, IS_CHAIN_ROCK, is_pool(), Levitation, levl, Luck, m_at, miss(), move_bc(), near_capacity(), newsym(), nomul(), omon_adj(), obj::ox, obj::oy, PIT, POOL, rn2(), rnd(), SKIP_TO_DRAG, SLT_ENCUMBER, SPIKED_PIT, spoteffects(), t_at(), TRAPDOOR, TRUE, u, uball, uchain, you::ux, you::ux0, you::uy, you::uy0, trap::x, xname(), and trap::y.
Referenced by domove(), move_into_trap(), and teleds().
void drag_down | ( | ) |
References A_STR, carried, exercise(), FALSE, KILLED_BY_AN, litter(), losehp(), NO_KILLER_PREFIX, rn2(), rnd(), uball, and uwep.
Referenced by goto_level().
References BC_CHAIN, you::bc_felt, bc_order(), you::bc_order, you::bglyph, Blind, body_part(), you::cglyph, change_luck(), deltrap(), you::dx, you::dy, fill_pit(), HOLE, In_sokoban, is_pool(), KILLED_BY, LEFT_SIDE, LEG, Levitation, levl, losehp(), MON_AT, movobj(), newsym(), obj::ox, obj::oy, PIT, pline(), RIGHT_SIDE, rn1, rn2(), set_wounded_legs(), SPIKED_PIT, spoteffects(), t_at(), TRAPDOOR, TRUE, TT_BEARTRAP, TT_INFLOOR, TT_LAVA, TT_PIT, TT_WEB, u, uchain, you::utrap, you::utraptype, you::ux, you::ux0, you::uy, you::uy0, you::uz, vision_full_recalc, trap::x, and trap::y.
Referenced by dropy(), and throwit().
STATIC_OVL void litter | ( | ) |
References aobjnam(), canletgo(), dropx(), invent, obj::nobj, otmp, obj::owt, rnd(), uball, and weight_cap().
Referenced by drag_down(), and repair_damage().
References BC_BALL, BC_CHAIN, you::bc_felt, bc_order(), you::bc_order, BCPOS_BALL, BCPOS_CHAIN, BCPOS_DIFFER, you::bglyph, Blind, carried, you::cglyph, levl, map_object(), movobj(), newsym(), obj::ox, obj::oy, place_object(), remove_object(), u, uball, and uchain.
Referenced by domove(), drag_ball(), litroom(), move_into_trap(), and teleds().
STATIC_DCL void NDECL | ( | litter | ) |
STATIC_DCL int NDECL | ( | bc_order | ) |
void placebc | ( | ) |
References you::bc_order, BCPOS_CHAIN, BCPOS_DIFFER, carried, flooreffects(), place_object(), u, uball, uchain, you::ux, and you::uy.
Referenced by dotrap(), drown(), goto_level(), movebubbles(), punish(), repair_damage(), teleds(), and unstuck().
void set_bc | ( | int | already_blind ) |
References BC_BALL, BC_CHAIN, you::bc_felt, bc_order(), you::bc_order, BCPOS_CHAIN, BCPOS_DIFFER, you::bglyph, carried, you::cglyph, levl, newsym(), obj::ox, obj::oy, place_object(), remove_object(), u, uball, uchain, you::ux, and you::uy.
Referenced by Blindf_off(), Blindf_on(), make_blinded(), and punish().
void unplacebc | ( | ) |
References BC_BALL, BC_CHAIN, you::bc_felt, you::bglyph, Blind, carried, you::cglyph, levl, newsym(), obj_extract_self(), obj::ox, obj::oy, u, uball, and uchain.
Referenced by dotrap(), drown(), goto_level(), gulpmu(), movebubbles(), repair_damage(), and teleds().