travel.cc File Reference

#include "AppHdr.h"
#include "coord.h"
#include "coordit.h"
#include "files.h"
#include "fixedarray.h"
#include "food.h"
#include "branch.h"
#include "command.h"
#include "cio.h"
#include "cloud.h"
#include "clua.h"
#include "delay.h"
#include "describe.h"
#include "dgn-actions.h"
#include "dgn-overview.h"
#include "dgnevent.h"
#include "directn.h"
#include "exclude.h"
#include "fight.h"
#include "godabil.h"
#include "itemname.h"
#include "itemprop.h"
#include "items.h"
#include "libutil.h"
#include "macro.h"
#include "map_knowledge.h"
#include "message.h"
#include "misc.h"
#include "mon-util.h"
#include "mon-stuff.h"
#include "options.h"
#include "place.h"
#include "player.h"
#include "stash.h"
#include "stuff.h"
#include "env.h"
#include "tags.h"
#include "terrain.h"
#include "traps.h"
#include "travel.h"
#include "hints.h"
#include "view.h"
#include <algorithm>
#include <set>
#include <cstdarg>
#include <cctype>
#include <cstdio>
#include <memory>
#include <sstream>

Include dependency graph for travel.cc:


Classes

class  deviant_route_warning
struct  cell_travel_safety
class  precompute_travel_safety_grid

Defines

#define ES_item   (Options.explore_stop & ES_ITEM)
#define ES_greedy   (Options.explore_stop & ES_GREEDY_ITEM)
#define ES_glow   (Options.explore_stop & ES_GLOWING_ITEM)
#define ES_art   (Options.explore_stop & ES_ARTEFACT)
#define ES_rune   (Options.explore_stop & ES_RUNE)
#define ES_shop   (Options.explore_stop & ES_SHOP)
#define ES_stair   (Options.explore_stop & ES_STAIR)
#define ES_altar   (Options.explore_stop & ES_ALTAR)
#define ES_portal   (Options.explore_stop & ES_PORTAL)

Typedefs

typedef FixedArray
< cell_travel_safety, GXM, GYM > 
travel_safe_grid

Enumerations

enum  IntertravelDestination { ID_DOWN = -100, ID_UP = -99, ID_REPEAT = -101, ID_CANCEL = -1000 }
enum  explore_status_type { EST_FULLY_EXPLORED = 0, EST_PARTLY_EXPLORED = 1, EST_GREED_UNFULFILLED = 2 }

Functions

int feature_traverse_cost (dungeon_feature_type feature)
bool is_altar (const coord_def &c)
bool is_player_altar (const coord_def &c)
bool is_unknown_stair (const coord_def &p)
bool feat_is_traversable (dungeon_feature_type grid)
const char * run_mode_name (int runmode)
uint8_t is_waypoint (const coord_def &p)
bool is_stash (const LevelStashes *ls, const coord_def &p)
bool is_travelsafe_square (const coord_def &c, bool ignore_hostile)
void init_travel_terrain_check (bool check_race_equip)
void travel_init_load_level ()
void travel_init_new_level ()
void initialise_travel ()
int get_feature_type (const std::string &feature)
void prevent_travel_to (const std::string &feature)
bool is_branch_stair (const coord_def &pos)
bool prompt_stop_explore (int es_why)
bool is_resting ()
void stop_running ()
void explore_pickup_event (int did_pickup, int tried_pickup)
command_type travel ()
command_type direction_to_command (int x, int y)
void find_travel_pos (const coord_def &youpos, int *move_x, int *move_y, std::vector< coord_def > *features)
branch_type find_parent_branch (branch_type br)
void find_parent_branch (branch_type br, int depth, branch_type *pb, int *pd)
void trackback (std::vector< level_id > &vec, branch_type branch, int subdepth)
void track_intersect (std::vector< level_id > &cur, std::vector< level_id > &targ, level_id *cx)
int level_distance (level_id first, level_id second)
std::string get_trans_travel_dest (const travel_target &target, bool skip_branch=false, bool skip_coord=false)
level_id find_up_level (level_id curr, bool up_branch)
level_id find_down_level (level_id curr)
level_id find_deepest_explored (level_id curr)
bool travel_kill_monster (const monster *mons)
travel_target prompt_translevel_target (int prompt_flags, std::string &dest_name)
void start_translevel_travel (const travel_target &pos)
void start_translevel_travel_prompt ()
void start_travel (const coord_def &p)
void start_explore (bool grab_items)
void do_explore_cmd ()
void arrange_features (std::vector< coord_def > &features)
bool can_travel_to (const level_id &id)
bool can_travel_interlevel ()
void do_interlevel_travel ()
int click_travel (const coord_def &gc, bool force)
bool check_for_interesting_features ()

Variables

TravelCache travel_cache
exclude_set curr_excludes
travel_distance_grid_t travel_point_distance
bool g_Slime_Wall_Check = true
const int8_t TRAVERSABLE = 1
const int8_t IMPASSABLE = 0
const int8_t FORBIDDEN = -1
std::map< branch_type, level_idstair_level
const int dir_dx [8] = {-1, 0, 1, -1, 1, -1, 0, 1}
const int dir_dy [8] = { 1, 1, 1, 0, 0, -1, -1, -1}
const int cmd_array [8]

Define Documentation

#define ES_altar   (Options.explore_stop & ES_ALTAR)

#define ES_art   (Options.explore_stop & ES_ARTEFACT)

#define ES_glow   (Options.explore_stop & ES_GLOWING_ITEM)

#define ES_greedy   (Options.explore_stop & ES_GREEDY_ITEM)

#define ES_item   (Options.explore_stop & ES_ITEM)

#define ES_portal   (Options.explore_stop & ES_PORTAL)

#define ES_rune   (Options.explore_stop & ES_RUNE)

#define ES_shop   (Options.explore_stop & ES_SHOP)

#define ES_stair   (Options.explore_stop & ES_STAIR)


Typedef Documentation


Enumeration Type Documentation

Enumerator:
EST_FULLY_EXPLORED 
EST_PARTLY_EXPLORED 
EST_GREED_UNFULFILLED 

Enumerator:
ID_DOWN 
ID_UP 
ID_REPEAT 
ID_CANCEL 


Function Documentation

void arrange_features ( std::vector< coord_def > &  features  ) 

Here is the call graph for this function:

bool can_travel_interlevel (  ) 

bool can_travel_to ( const level_id id  ) 

Here is the call graph for this function:

bool check_for_interesting_features (  ) 

Here is the call graph for this function:

int click_travel ( const coord_def gc,
bool  force 
)

Here is the call graph for this function:

command_type direction_to_command ( int  x,
int  y 
)

void do_explore_cmd (  ) 

Here is the call graph for this function:

void do_interlevel_travel (  ) 

Here is the call graph for this function:

void explore_pickup_event ( int  did_pickup,
int  tried_pickup 
)

Here is the call graph for this function:

bool feat_is_traversable ( dungeon_feature_type  grid  ) 

int feature_traverse_cost ( dungeon_feature_type  feature  )  [inline]

Here is the call graph for this function:

level_id find_deepest_explored ( level_id  curr  ) 

Here is the call graph for this function:

level_id find_down_level ( level_id  curr  ) 

void find_parent_branch ( branch_type  br,
int  depth,
branch_type pb,
int *  pd 
)

Here is the call graph for this function:

branch_type find_parent_branch ( branch_type  br  ) 

void find_travel_pos ( const coord_def youpos,
int *  move_x,
int *  move_y,
std::vector< coord_def > *  features 
)

Here is the call graph for this function:

level_id find_up_level ( level_id  curr,
bool  up_branch 
)

Here is the call graph for this function:

int get_feature_type ( const std::string feature  ) 

std::string get_trans_travel_dest ( const travel_target target,
bool  skip_branch = false,
bool  skip_coord = false 
)

void init_travel_terrain_check ( bool  check_race_equip  ) 

Here is the call graph for this function:

void initialise_travel (  ) 

bool is_altar ( const coord_def c  ) 

Here is the call graph for this function:

bool is_branch_stair ( const coord_def pos  ) 

Here is the call graph for this function:

bool is_player_altar ( const coord_def c  )  [inline]

Here is the call graph for this function:

bool is_resting ( void   ) 

Here is the call graph for this function:

bool is_stash ( const LevelStashes ls,
const coord_def p 
) [inline]

Here is the call graph for this function:

bool is_travelsafe_square ( const coord_def c,
bool  ignore_hostile 
)

Here is the call graph for this function:

bool is_unknown_stair ( const coord_def p  ) 

Here is the call graph for this function:

uint8_t is_waypoint ( const coord_def p  ) 

Here is the call graph for this function:

int level_distance ( level_id  first,
level_id  second 
)

Here is the call graph for this function:

void prevent_travel_to ( const std::string feature  ) 

Here is the call graph for this function:

bool prompt_stop_explore ( int  es_why  ) 

Here is the call graph for this function:

travel_target prompt_translevel_target ( int  prompt_flags,
std::string dest_name 
)

Here is the call graph for this function:

const char* run_mode_name ( int  runmode  ) 

void start_explore ( bool  grab_items  ) 

Here is the call graph for this function:

void start_translevel_travel ( const travel_target pos  ) 

Here is the call graph for this function:

void start_translevel_travel_prompt (  ) 

Here is the call graph for this function:

void start_travel ( const coord_def p  ) 

Here is the call graph for this function:

void stop_running ( void   ) 

Here is the call graph for this function:

void track_intersect ( std::vector< level_id > &  cur,
std::vector< level_id > &  targ,
level_id cx 
)

void trackback ( std::vector< level_id > &  vec,
branch_type  branch,
int  subdepth 
)

Here is the call graph for this function:

command_type travel (  ) 

Here is the call graph for this function:

void travel_init_load_level (  ) 

Here is the call graph for this function:

void travel_init_new_level (  ) 

Here is the call graph for this function:

bool travel_kill_monster ( const monster mons  ) 

Here is the call graph for this function:


Variable Documentation

const int cmd_array[8]

const int dir_dx[8] = {-1, 0, 1, -1, 1, -1, 0, 1}

const int dir_dy[8] = { 1, 1, 1, 0, 0, -1, -1, -1}

const int8_t FORBIDDEN = -1

bool g_Slime_Wall_Check = true

const int8_t IMPASSABLE = 0

const int8_t TRAVERSABLE = 1


Generated on Thu Jan 13 13:29:19 2011 by  doxygen 1.5.6