Pathfinding and running code. More...
|int||pathfind_direction_to (struct loc from, struct loc to)|
|Compute the direction (in the angband 123456789 sense) from a point to a point. More...|
|bool||findpath (int y, int x)|
|void||run_step (int dir)|
|Take one step along the current "run" path. More...|
Pathfinding and running code.
Copyright (c) 1988 Christopher J Stuart (running code) Copyright (c) 2004-2007 Christophe Cavalaria, Leon Marrick (pathfinding)
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.
Compute the direction (in the angband 123456789 sense) from a point to a point.
We decide to use diagonals if dx and dy are within a factor of two of each other; otherwise we choose a cardinal direction.
Take one step along the current "run" path.
Called with a real direction to begin a new run, and with zero to continue a run in progress.
References cave, CMD_RUN, cmd_set_arg_direction(), cmdq_peek(), cmdq_push(), ddx, ddy, disturb(), player_upkeep::energy_use, ignore_item_ok(), object::known, monster::mflag, mflag_has, square::mon, angband_constants::move_energy, move_player(), object::next, pf_result, pf_result_index, PU_TORCH, player::px, player::py, run_cur_dir, run_init(), run_test(), player_upkeep::running, player_upkeep::running_withpathfind, square_isknown(), square_ispassable(), square_monster(), square_object(), chunk::squares, player_upkeep::update, player::upkeep, and z_info.