Angband
|
chunk allocation and utility functions More...
#include "angband.h"
#include "cave.h"
#include "cmds.h"
#include "cmd-core.h"
#include "game-event.h"
#include "game-world.h"
#include "init.h"
#include "mon-group.h"
#include "monster.h"
#include "obj-ignore.h"
#include "obj-pile.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "object.h"
#include "player-timed.h"
#include "trap.h"
Functions | |
int | motion_dir (struct loc start, struct loc finish) |
Given a "start" and "finish" location, extract a "direction", which will move one step from the "start" towards the "finish". More... | |
struct loc | next_grid (struct loc grid, int dir) |
Given a grid and a direction, extract the adjacent grid in that direction. More... | |
int | lookup_feat (const char *name) |
Find a terrain feature index by name. More... | |
void | set_terrain (void) |
Set terrain constants to the indices from terrain.txt. More... | |
struct chunk * | cave_new (int height, int width) |
Allocate a new chunk of the world. More... | |
void | cave_free (struct chunk *c) |
Free a chunk. More... | |
void | list_object (struct chunk *c, struct object *obj) |
Enter an object in the list of objects for the current level/chunk. More... | |
void | delist_object (struct chunk *c, struct object *obj) |
Remove an object from the list of objects for the current level/chunk. More... | |
void | object_lists_check_integrity (struct chunk *c, struct chunk *c_k) |
Check that a pair of object lists are consistent and relate to locations of objects correctly. More... | |
void | scatter (struct chunk *c, struct loc *place, struct loc grid, int d, bool need_los) |
Standard "find me a location" function, now with all legal outputs! More... | |
struct monster * | cave_monster (struct chunk *c, int idx) |
Get a monster on the current level by its index. More... | |
int | cave_monster_max (struct chunk *c) |
The maximum number of monsters allowed in the level. More... | |
int | cave_monster_count (struct chunk *c) |
The current number of monsters present on the level. More... | |
int | count_feats (struct loc *grid, bool(*test)(struct chunk *c, struct loc grid), bool under) |
Return the number of doors/traps around (or under) the character. More... | |
struct loc | cave_find_decoy (struct chunk *c) |
Variables | |
struct feature * | f_info |
struct chunk * | cave = NULL |
int | FEAT_NONE |
int | FEAT_FLOOR |
int | FEAT_CLOSED |
int | FEAT_OPEN |
int | FEAT_BROKEN |
int | FEAT_LESS |
int | FEAT_MORE |
int | FEAT_SECRET |
int | FEAT_RUBBLE |
int | FEAT_PASS_RUBBLE |
int | FEAT_MAGMA |
int | FEAT_QUARTZ |
int | FEAT_MAGMA_K |
int | FEAT_QUARTZ_K |
int | FEAT_GRANITE |
int | FEAT_PERM |
int | FEAT_LAVA |
const s16b | ddd [9] |
Global array for looping through the "keypad directions". More... | |
const s16b | ddx [10] |
Global arrays for converting "keypad direction" into "offsets". More... | |
const s16b | ddy [10] |
const struct loc | ddgrid [10] |
const s16b | ddx_ddd [9] |
Global arrays for optimizing "ddx[ddd[i]]", "ddy[ddd[i]]" and "loc(ddx[ddd[i]], ddy[ddd[i]])". More... | |
const s16b | ddy_ddd [9] |
const struct loc | ddgrid_ddd [9] |
static const int | d_off_y_0 [] |
Hack – Precompute a bunch of calls to distance(). More... | |
static const int | d_off_x_0 [] |
static const int | d_off_y_1 [] |
static const int | d_off_x_1 [] |
static const int | d_off_y_2 [] |
static const int | d_off_x_2 [] |
static const int | d_off_y_3 [] |
static const int | d_off_x_3 [] |
static const int | d_off_y_4 [] |
static const int | d_off_x_4 [] |
static const int | d_off_y_5 [] |
static const int | d_off_x_5 [] |
static const int | d_off_y_6 [] |
static const int | d_off_x_6 [] |
static const int | d_off_y_7 [] |
static const int | d_off_x_7 [] |
static const int | d_off_y_8 [] |
static const int | d_off_x_8 [] |
static const int | d_off_y_9 [] |
static const int | d_off_x_9 [] |
const int * | dist_offsets_y [10] |
const int * | dist_offsets_x [10] |
const byte | side_dirs [20][8] |
Given a central direction at position [dir #][0], return a series of directions radiating out on both sides from the central direction all the way back to its rear. More... | |
chunk allocation and utility functions
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
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.
Referenced by effect_handler_BALL(), effect_handler_BREATH(), effect_handler_DAMAGE(), effect_handler_DARKEN_AREA(), effect_handler_DRAIN_MANA(), effect_handler_GLYPH(), effect_handler_LASH(), effect_handler_TELEPORT(), effect_handler_TELEPORT_LEVEL(), effect_handler_TELEPORT_TO(), effect_handler_TIMED_INC(), effect_handler_TOUCH(), get_move(), get_move_advance(), get_target(), make_noise(), monster_swap(), and project_path().
Free a chunk.
References chunk::feat_count, heatmap::grids, chunk::height, square::info, connector::info, chunk::join, loc(), mem_free(), chunk::monster_groups, chunk::monsters, chunk::name, connector::next, chunk::noise, square::obj, object_pile_free(), chunk::objects, chunk::scent, square_free_trap(), chunk::squares, string_free(), square::trap, chunk::width, loc::x, and loc::y.
Referenced by cave_clear(), cavern_chunk(), cleanup_angband(), cleanup_player(), gauntlet_gen(), hard_centre_gen(), lair_gen(), and prepare_next_level().
Get a monster on the current level by its index.
References chunk::monsters.
Referenced by calc_light(), call_monster(), chunk_copy(), compact_monsters(), compact_monsters_aux(), delete_monster_idx(), detect_monsters(), do_animation(), do_cmd_walk_test(), do_cmd_wiz_zap(), do_mon_spell(), effect_handler_BALL(), effect_handler_BANISH(), effect_handler_BREATH(), effect_handler_DAMAGE(), effect_handler_DRAIN_MANA(), effect_handler_LASH(), effect_handler_MASS_BANISH(), effect_handler_MON_HEAL_HP(), effect_handler_MON_HEAL_KIN(), effect_handler_MON_TIMED_INC(), effect_handler_PROBE(), effect_handler_PROJECT_LOS(), effect_handler_PROJECT_LOS_AWARE(), effect_handler_READ_MINDS(), effect_handler_SINGLE_COMBAT(), effect_handler_SUMMON(), effect_handler_TELEPORT(), effect_handler_TELEPORT_TO(), effect_handler_TOUCH(), effect_handler_WAKE(), effect_handler_WEB(), find_artifact(), get_commanded_monster(), get_target(), grid_data_as_text(), group_monster_tracking(), kill_arena_monster(), look_mon_desc(), map_info(), mon_pop(), monster_blow_method_action(), monster_group_change_index(), monster_group_leader(), monster_group_remove_leader(), monster_groups_verify(), monster_list_collect(), monster_list_show_subwindow(), monster_swap(), monster_target_monster(), move_player(), origin_get_loc(), place_monster(), player_inc_check(), process_monsters(), process_player_cleanup(), project(), project_m(), project_o(), project_p(), project_player_handler_NEXUS(), reset_monsters(), restore_monsters(), spell_message(), spell_value_base_lash_damage(), spell_value_base_spell_power(), square_monster(), steal_monster_item(), summon_group(), target_get_monster(), target_okay(), target_sighted(), update_monsters(), wipe_mon_list(), and wr_monsters_aux().
The current number of monsters present on the level.
References chunk::mon_cnt.
Referenced by process_world().
The maximum number of monsters allowed in the level.
References chunk::mon_max.
Referenced by calc_light(), call_monster(), cave_generate(), compact_monsters(), detect_monsters(), do_animation(), do_cmd_wiz_zap(), effect_handler_BANISH(), effect_handler_MASS_BANISH(), effect_handler_PROBE(), effect_handler_PROJECT_LOS(), effect_handler_PROJECT_LOS_AWARE(), effect_handler_READ_MINDS(), effect_handler_WAKE(), find_artifact(), get_commanded_monster(), mon_pop(), monster_list_can_update(), monster_list_collect(), monster_list_new(), monster_list_reset(), monster_list_show_subwindow(), process_monsters(), process_player_cleanup(), process_world(), reset_monsters(), restore_monsters(), update_monsters(), wipe_mon_list(), and wr_monsters_aux().
Allocate a new chunk of the world.
References angband_constants::f_max, chunk::feat_count, heatmap::grids, chunk::height, height, square::info, angband_constants::level_monster_max, mem_zalloc(), chunk::mon_current, chunk::mon_max, chunk::monster_groups, chunk::monsters, chunk::noise, chunk::obj_max, OBJECT_LIST_SIZE, chunk::objects, chunk::scent, SQUARE_SIZE, chunk::squares, turn, chunk::turn, chunk::width, width, loc::x, loc::y, and z_info.
Referenced by arena_gen(), cave_generate(), cavern_chunk(), chunk_write(), classic_gen(), gauntlet_gen(), hard_centre_gen(), labyrinth_chunk(), lair_gen(), modified_chunk(), moria_chunk(), rd_dungeon_aux(), town_gen(), and vault_chunk().
Return the number of doors/traps around (or under) the character.
References player::grid, loc_sum(), square_in_bounds_fully(), and square_isknown().
Referenced by do_cmd_close(), do_cmd_disarm(), do_cmd_open(), and effect_handler_RUBBLE().
Remove an object from the list of objects for the current level/chunk.
This function is robust against delisting of unlisted objects.
References player::cave, chunk::objects, and object::oidx.
Referenced by become_aware(), delete_monster_idx(), floor_carry(), floor_carry_fail(), floor_object_for_use(), monster_turn_grab_objects(), player_pickup_aux(), player_pickup_gold(), project_o(), square_know_pile(), steal_monster_item(), and uncurse_object().
Enter an object in the list of objects for the current level/chunk.
This function is robust against listing of duplicates or non-objects
References player::cave, i, mem_realloc(), chunk::obj_max, OBJECT_LIST_INCR, chunk::objects, and object::oidx.
Referenced by floor_carry(), mon_create_mimicked_object(), monster_carry(), place_gold(), and place_object().
Find a terrain feature index by name.
References angband_constants::f_max, i, feature::name, quit_fmt(), streq, and z_info.
Referenced by map_info(), parse_prefs_feat(), set_terrain(), and square_apparent_name().
Given a "start" and "finish" location, extract a "direction", which will move one step from the "start" towards the "finish".
Note that we use "diagonal" motion whenever possible.
We return DIR_NONE if no motion is needed.
References DIR_E, DIR_N, DIR_NE, DIR_NONE, DIR_NW, DIR_S, DIR_SE, DIR_SW, DIR_W, loc_eq(), loc::x, and loc::y.
Referenced by context_menu_cave(), do_cmd_close(), do_cmd_disarm(), do_cmd_open(), and textui_process_click().
Given a grid and a direction, extract the adjacent grid in that direction.
References loc(), loc::x, and loc::y.
Referenced by classic_gen(), lab_get_adjoin(), lab_is_tunnel(), labyrinth_chunk(), modified_chunk(), moria_chunk(), possible_doorway(), square_dtrap_edge(), square_num_walls_adjacent(), square_num_walls_diagonal(), and town_gen_layout().
Check that a pair of object lists are consistent and relate to locations of objects correctly.
References object::grid, i, object::known, loc_is_zero(), chunk::obj_max, chunk::objects, object::oidx, pile_contains(), player_upkeep::playing, square_object(), and player::upkeep.
Referenced by square_know_pile().
Standard "find me a location" function, now with all legal outputs!
Obtains a legal location within the given distance of the initial location, and with "los()" from the source to destination location.
This function is often called from inside a loop which searches for locations while increasing the "d" distance.
need_los determines whether line of sight is needed
References distance(), los(), rand_loc(), and square_in_bounds_fully().
Referenced by build_quest_stairs(), do_cmd_wiz_named(), multiply_monster(), place_friends(), summon_specific(), and vault_monsters().
Set terrain constants to the indices from terrain.txt.
References FEAT_BROKEN, FEAT_CLOSED, FEAT_FLOOR, FEAT_GRANITE, FEAT_LAVA, FEAT_LESS, FEAT_MAGMA, FEAT_MAGMA_K, FEAT_MORE, FEAT_NONE, FEAT_OPEN, FEAT_PASS_RUBBLE, FEAT_PERM, FEAT_QUARTZ, FEAT_QUARTZ_K, FEAT_RUBBLE, FEAT_SECRET, and lookup_feat().
Referenced by finish_parse_feat().
struct chunk* cave = NULL |
Referenced by acquirement(), autoinscribe_ground(), become_aware(), blow_after_effects(), blow_knock_back(), build_quest_stairs(), call_monster(), can_call_monster(), cave_known(), cave_light(), cave_room_aux(), cave_unlight(), chest_check(), chest_death(), cleanup_angband(), close_game(), compact_monsters(), compact_monsters_aux(), context_menu_cave(), context_menu_object(), context_menu_player(), decrease_timeouts(), delete_monster(), delete_monster_idx(), detect_monsters(), display_feeling(), display_map(), do_animation(), do_autopickup(), do_cmd_alter_aux(), do_cmd_buy(), do_cmd_close(), do_cmd_close_aux(), do_cmd_close_test(), do_cmd_disarm(), do_cmd_disarm_aux(), do_cmd_disarm_test(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_hold(), do_cmd_jump(), do_cmd_lock_door(), do_cmd_mon_command(), do_cmd_open(), do_cmd_open_aux(), do_cmd_open_chest(), do_cmd_open_test(), do_cmd_retrieve(), do_cmd_sell(), do_cmd_stash(), do_cmd_tunnel(), do_cmd_tunnel_aux(), do_cmd_tunnel_test(), do_cmd_walk(), do_cmd_walk_test(), do_cmd_wiz_bamf(), do_cmd_wiz_features(), do_cmd_wiz_hack_nick(), do_cmd_wiz_named(), do_cmd_wiz_query(), do_cmd_wiz_zap(), do_mon_spell(), draw_path(), drop_find_grid(), drop_near(), effect_handler_BALL(), effect_handler_BANISH(), effect_handler_BREATH(), effect_handler_CREATE_STAIRS(), effect_handler_DAMAGE(), effect_handler_DARKEN_AREA(), effect_handler_DARKEN_LEVEL(), effect_handler_DESTRUCTION(), effect_handler_DETECT_DOORS(), effect_handler_DETECT_GOLD(), effect_handler_DETECT_OBJECTS(), effect_handler_DETECT_STAIRS(), effect_handler_DETECT_TRAPS(), effect_handler_DRAIN_MANA(), effect_handler_EARTHQUAKE(), effect_handler_GLYPH(), effect_handler_JUMP_AND_BITE(), effect_handler_LASH(), effect_handler_LIGHT_LEVEL(), effect_handler_MAP_AREA(), effect_handler_MASS_BANISH(), effect_handler_MON_HEAL_HP(), effect_handler_MON_HEAL_KIN(), effect_handler_MON_TIMED_INC(), effect_handler_PROBE(), effect_handler_PROJECT_LOS(), effect_handler_PROJECT_LOS_AWARE(), effect_handler_READ_MINDS(), effect_handler_RUBBLE(), effect_handler_SENSE_OBJECTS(), effect_handler_SINGLE_COMBAT(), effect_handler_SUMMON(), effect_handler_TELEPORT(), effect_handler_TELEPORT_LEVEL(), effect_handler_TELEPORT_TO(), effect_handler_TIMED_INC(), effect_handler_TOUCH(), effect_handler_WAKE(), effect_handler_WEB(), enter_store(), fill_terrain_info(), find_artifact(), findpath(), floor_carry_fail(), floor_object_for_use(), get_commanded_monster(), get_debug_command(), get_panel_skills(), get_target(), grid_data_as_text(), hit_trap(), hp_colour_change(), ignore_drop(), ignore_known_item_ok(), inven_drop(), is_valid_pf(), item_is_available(), kill_arena_monster(), light_room(), look_mon_desc(), make_noise(), make_ranged_attack(), make_ranged_shot(), make_ranged_throw(), map_info(), melee_effect_handler_EAT_GOLD(), modify_panel(), monster_attack_monster(), monster_blow_method_action(), monster_can_be_scared(), monster_can_cast(), monster_change_shape(), monster_death(), monster_list_can_update(), monster_list_collect(), monster_list_new(), monster_list_reset(), monster_list_show_subwindow(), monster_revert_shape(), monster_swap(), monster_take_terrain_damage(), monster_target_monster(), move_player(), no_light(), object_delete(), object_flavor_aware(), object_list_collect(), object_list_entry_line_attribute(), object_list_format_name(), object_list_should_ignore_object(), object_list_standard_compare(), origin_get_loc(), pack_overflow(), panel_should_modify(), path_analyse(), player_attack_random_monster(), player_check_terrain_damage(), player_inc_check(), player_know_object(), player_pickup_aux(), player_pickup_gold(), player_pickup_item(), player_take_terrain_damage(), prepare_next_level(), process_player_cleanup(), project(), project_feature_handler_ACID(), project_feature_handler_ARROW(), project_feature_handler_CHAOS(), project_feature_handler_COLD(), project_feature_handler_DARK_WEAK(), project_feature_handler_DISEN(), project_feature_handler_ELEC(), project_feature_handler_FIRE(), project_feature_handler_FORCE(), project_feature_handler_GRAVITY(), project_feature_handler_HOLY_ORB(), project_feature_handler_ICE(), project_feature_handler_INERTIA(), project_feature_handler_KILL_DOOR(), project_feature_handler_KILL_TRAP(), project_feature_handler_KILL_WALL(), project_feature_handler_LIGHT_WEAK(), project_feature_handler_MAKE_DOOR(), project_feature_handler_MAKE_TRAP(), project_feature_handler_MANA(), project_feature_handler_METEOR(), project_feature_handler_MISSILE(), project_feature_handler_NETHER(), project_feature_handler_NEXUS(), project_feature_handler_PLASMA(), project_feature_handler_POIS(), project_feature_handler_SHARD(), project_feature_handler_SOUND(), project_feature_handler_TIME(), project_feature_handler_WATER(), project_m(), project_m_apply_side_effects(), project_monster_handler_MON_CLONE(), project_o(), project_p(), project_path(), project_player_handler_NEXUS(), prt_dtrap(), prt_level_feeling(), prt_map(), prt_map_aux(), push_object(), py_attack(), py_attack_real(), ranged_helper(), rd_dungeon(), rd_monsters(), rd_objects(), rd_traps(), rd_traps_aux(), recharge_objects(), refill_lamp(), remove_bad_spells(), reset_monsters(), restore_monsters(), run_game_loop(), run_step(), run_test(), rune_autoinscribe(), scan_distant_floor(), scan_floor(), search(), see_wall(), show_obj(), spell_chance(), spell_message(), spell_value_base_dungeon_level(), spell_value_base_lash_damage(), spell_value_base_spell_power(), square_forget(), square_isknown(), square_isnotknown(), square_know_pile(), square_light_spot(), square_memorize(), square_note_spot(), square_sense_pile(), square_set_known_feat(), start_game(), steal_monster_item(), steal_player_item(), store_at(), store_will_buy_tester(), summon_possible(), summon_specific(), take1(), target_able(), target_accept(), target_get_monster(), target_get_monsters(), target_okay(), target_recall_loop_object(), target_set_closest(), target_set_interactive(), target_set_interactive_aux(), target_set_location(), target_sighted(), teardown_tests(), test_drop_eat(), test_drop_pickup(), test_loadgame(), test_magic_missile(), test_newgame(), textui_process_click(), thrust_away(), twall(), uncurse_object(), update_minimap_subwindow(), update_mon(), update_monsters(), update_player_object_knowledge(), update_scent(), update_stuff(), use_aux(), use_store(), wiz_create_item_drop_object(), wiz_dark(), wiz_statistics(), wiz_test_kind(), wr_dungeon(), wr_monsters(), wr_objects(), and wr_traps().
Hack – Precompute a bunch of calls to distance().
The pair of arrays dist_offsets_y[n] and dist_offsets_x[n] contain the offsets of all the locations with a distance of n from a central point, with an offset of (0,0) indicating no more offsets at this distance.
This is, of course, fairly unreadable, but it eliminates multiple loops from the previous version.
It is probably better to replace these arrays with code to compute the relevant arrays, even if the storage is pre-allocated in hard coded sizes. At the very least, code should be included which is able to generate and dump these arrays (ala "los()"). XXX XXX XXX
Global array for looping through the "keypad directions".
Referenced by build_streamer(), monster_turn(), player_confuse_dir(), and use_aux().
Referenced by build_streamer(), do_cmd_alter_aux(), do_cmd_close(), do_cmd_disarm(), do_cmd_jump(), do_cmd_mon_command(), do_cmd_open(), do_cmd_run(), do_cmd_tunnel(), do_cmd_walk(), effect_handler_ARC(), effect_handler_BALL(), effect_handler_BIZARRE(), effect_handler_BREATH(), effect_handler_SHORT_BEAM(), effect_handler_SWARM(), get_target(), monster_turn(), and move_player().
Referenced by build_color_point(), build_room_of_chambers(), calc_light(), cave_illuminate(), cave_known(), count_adj_walls(), count_chests(), effect_handler_EARTHQUAKE(), effect_handler_JUMP_AND_BITE(), effect_handler_RUBBLE(), effect_handler_STAR(), effect_handler_STAR_BALL(), generate_starburst_room(), get_move(), get_move_advance(), get_move_bodyguard(), get_move_flee(), hollow_out_room(), join_region(), light_room(), make_noise(), next_to_corr(), place_new_monster_group(), player_attack_random_monster(), project_player_handler_FORCE(), rand_dir(), square_smash_wall(), thrust_away(), update_scent(), wiz_dark(), and wiz_light().
Global arrays for converting "keypad direction" into "offsets".
Referenced by change_panel(), column_process_direction(), do_cmd_options_win(), findpath(), glyph_command(), object_skin_process_direction(), ranged_helper(), run_init(), run_step(), run_test(), scroll_process_direction(), see_wall(), target_set_interactive(), and tile_picker_command().
Global arrays for optimizing "ddx[ddd[i]]", "ddy[ddd[i]]" and "loc(ddx[ddd[i]], ddy[ddd[i]])".
This means that each entry in this array corresponds to the direction with the same array index in ddd[].
Referenced by effect_handler_MAP_AREA(), make_chamber(), and project().
Referenced by change_panel(), column_process_direction(), do_cmd_options_win(), findpath(), glyph_command(), menu_handle_keypress(), object_skin_process_direction(), ranged_helper(), run_init(), run_step(), run_test(), scroll_process_direction(), see_wall(), target_set_interactive(), and tile_picker_command().
Referenced by effect_handler_MAP_AREA(), make_chamber(), and project().
Referenced by get_move_find_hiding(), and get_move_find_safety().
Referenced by get_move_find_hiding(), and get_move_find_safety().
struct feature* f_info |
Referenced by build_store(), cleanup_feat(), display_feature(), display_map(), do_cmd_knowledge_features(), dump_features(), f_cmp_fkind(), feat_is_bright(), feat_is_fiery(), feat_is_floor(), feat_is_granite(), feat_is_magma(), feat_is_monster_walkable(), feat_is_no_flow(), feat_is_no_scent(), feat_is_object_holding(), feat_is_passable(), feat_is_projectable(), feat_is_quartz(), feat_is_shop(), feat_is_smooth(), feat_is_torch(), feat_is_trap_holding(), feat_is_treasure(), feat_is_wall(), feat_lore(), feat_order(), finish_parse_feat(), grid_data_as_text(), lookup_symbol(), map_info(), reset_visuals(), square_apparent_name(), square_digging(), square_feat(), square_hasgoldvein(), square_isbrokendoor(), square_iscloseddoor(), square_isdoor(), square_isdownstairs(), square_isinteresting(), square_isopendoor(), square_isperm(), square_isrock(), square_isrubble(), square_issecretdoor(), square_isstairs(), square_isupstairs(), square_seemslikewall(), and square_shopnum().
int FEAT_BROKEN |
Referenced by build_room_of_chambers(), do_cmd_wiz_features(), hollow_out_room(), place_random_door(), set_terrain(), and square_smash_door().
int FEAT_CLOSED |
Referenced by build_crossed(), build_large(), build_nest(), build_pit(), do_cmd_wiz_features(), place_closed_door(), set_terrain(), square_add_door(), and square_close_door().
int FEAT_FLOOR |
Referenced by arena_gen(), build_circular(), build_crossed(), build_huge(), build_large(), build_moria(), build_nest(), build_overlap(), build_pit(), build_room_of_chambers(), build_room_template(), build_simple(), build_tunnel(), build_vault(), cavern_chunk(), do_cmd_wiz_features(), gauntlet_gen(), hard_centre_gen(), hollow_out_room(), init_cavern(), join_region(), labyrinth_chunk(), modified_chunk(), moria_chunk(), mutate_cavern(), project_feature_handler_COLD(), project_feature_handler_ICE(), set_terrain(), square_destroy(), square_destroy_door(), square_destroy_rubble(), square_destroy_wall(), square_earthquake(), square_force_floor(), square_smash_wall(), square_tunnel_wall(), and town_gen_layout().
int FEAT_GRANITE |
Referenced by build_circular(), build_crossed(), build_large(), build_nest(), build_overlap(), build_pit(), build_room_of_chambers(), build_simple(), build_staircase(), classic_gen(), do_cmd_wiz_features(), gauntlet_gen(), generate_starburst_room(), init_cavern(), labyrinth_chunk(), make_inner_chamber_wall(), modified_chunk(), moria_chunk(), mutate_cavern(), set_marked_granite(), set_terrain(), square_destroy(), square_earthquake(), square_is_granite_with_flag(), and town_gen_layout().
int FEAT_LAVA |
Referenced by build_vault(), project_feature_handler_FIRE(), project_feature_handler_PLASMA(), set_terrain(), and town_gen_layout().
int FEAT_LESS |
Referenced by build_vault(), cavern_gen(), classic_gen(), do_cmd_wiz_features(), gauntlet_gen(), get_join_info(), get_min_level_size(), hard_centre_gen(), labyrinth_gen(), lair_gen(), modified_gen(), moria_gen(), new_player_spot(), place_random_stairs(), place_stairs(), set_terrain(), and square_add_stairs().
int FEAT_MAGMA |
int FEAT_MAGMA_K |
Referenced by build_vault(), do_cmd_wiz_features(), set_terrain(), and square_upgrade_mineral().
int FEAT_MORE |
Referenced by build_quest_stairs(), build_vault(), cavern_gen(), classic_gen(), do_cmd_wiz_features(), gauntlet_gen(), get_join_info(), get_min_level_size(), hard_centre_gen(), labyrinth_gen(), lair_gen(), modified_gen(), moria_gen(), new_player_spot(), place_random_stairs(), place_stairs(), set_terrain(), square_add_stairs(), town_gen(), and town_gen_layout().
int FEAT_NONE |
Referenced by map_info(), set_terrain(), square_forget(), and square_isknown().
int FEAT_OPEN |
int FEAT_PASS_RUBBLE |
int FEAT_PERM |
int FEAT_QUARTZ |
int FEAT_QUARTZ_K |
Referenced by build_vault(), do_cmd_wiz_features(), set_terrain(), and square_upgrade_mineral().
int FEAT_RUBBLE |
int FEAT_SECRET |
Referenced by build_crossed(), do_cmd_wiz_features(), place_secret_door(), and set_terrain().
Given a central direction at position [dir #][0], return a series of directions radiating out on both sides from the central direction all the way back to its rear.
Side directions come in pairs; for example, directions '1' and '3' flank direction '2'. The code should know which side to consider first. If the left, it must add 10 to the central direction to access the second part of the table.
Referenced by monster_turn().