diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 06:42:50 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 06:42:50 +0000 |
commit | 4958b84b497fe729eaf14bc90b8d01874722c33d (patch) | |
tree | 12bce6e34f779166f7cdcefee95255b53d9ba8b3 /crawl-ref/source/view.h | |
parent | 63318a4b57b03ffc4686e4a3b78d64b73f50b6b9 (diff) | |
download | crawl-ref-4958b84b497fe729eaf14bc90b8d01874722c33d.tar.gz crawl-ref-4958b84b497fe729eaf14bc90b8d01874722c33d.zip |
Introduces three new wall types, translucent versions of the normal
rock wall, stone wall and permanent rock wall. These are for use in
vaults, and are never randomly generated. Magically translucent
versions of the normal wall types are used, rather than glass, so we
don't have to figure out how glass would react to things like digging
and Shatter, but can re-use the code for the normal wall types.
I've tried to fix all the places where the old code assumes that any
square which is visible to the player has no walls between it and the
player, but I've probably missed lots; this will require a lot of play
testing before its ready for non-developers.
viewwindow() now has two calls to losight(), the second one
determining what squares would be visible if all translucent walls
were made transparent, so that there's a quick way to see if there's
any translucent walls between the player and a square. This second
call to losight() doesn't cause any noticeable slowdown for me, but it
might on an older system.
Other than viewwindow() making a second call to losight(), there
shouldn't be any changes to game-play or game-logic if there aren't any
translucent walls around.
The wizard blinking command (&b) has been changed so that it ignores
all normal restrictions except for needing to see the target square and
not landing on monsters; if the player lands on a wall square it's
changed to floor. Wizard blinking also doesn't increase magical
contamination.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2145 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.h')
-rw-r--r-- | crawl-ref/source/view.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index 3afd19bab6..d1fa30116b 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -93,7 +93,7 @@ void find_features(const std::vector<coord_def>& features, * *********************************************************************** */ void losight(FixedArray<unsigned int, ENV_SHOW_DIAMETER, ENV_SHOW_DIAMETER>& sh, FixedArray<dungeon_feature_type, GXM, GYM>& gr, - int x_p, int y_p); + int x_p, int y_p, bool clear_walls_block = false); bool magic_mapping(int map_radius, int proportion, bool suppress_msg, @@ -184,6 +184,14 @@ void add_cset_override(char_set_type set, const std::string &overrides); bool see_grid( int grx, int gry ); inline bool see_grid(const coord_def &p) { return see_grid(p.x, p.y); } +bool see_grid_no_trans( int grx, int gry ); +inline bool see_grid_no_trans(const coord_def &p) +{ + return see_grid_no_trans(p.x, p.y); +} + +bool trans_wall_blocking( int grx, int gry ); + std::string screenshot(bool fullscreen = false); unsigned get_sightmap_char(int feature); @@ -197,7 +205,12 @@ void fire_monster_alerts(); struct ray_def; bool find_ray( int sourcex, int sourcey, int targetx, int targety, bool allow_fallback, ray_def& ray, int cycle_dir = 0, - bool find_shortest = false ); + bool find_shortest = false, bool ignore_solid = false ); + +int num_feats_between(int sourcex, int sourcey, int targetx, int targety, + dungeon_feature_type min_feat, + dungeon_feature_type max_feat, + bool exclude_endpoints = true); dungeon_char_type dchar_by_name(const std::string &name); |