From 3174391110bb7c0dbb4d68c064253474a734d84a Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 5 Jan 2008 22:17:12 +0000 Subject: Tile support for Lugonu's corruption ability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3208 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abyss.cc | 15 +++++++++++++++ crawl-ref/source/rltiles/dc-dngn.txt | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index a553c4af6f..adb4fdfb7d 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -31,6 +31,7 @@ #include "randart.h" #include "stuff.h" #include "terrain.h" +#include "tiles.h" #include "traps.h" #include "view.h" #include "xom.h" @@ -746,6 +747,20 @@ static void corrupt_square(const crawl_environment &oenv, const coord_def &c) env.grid_colours(c) = oenv.rock_colour; else if (feat == DNGN_FLOOR) env.grid_colours(c) = oenv.floor_colour; + +#ifdef USE_TILE + // Modify tile flavor to use corrupted tiles. + if (feat == DNGN_ROCK_WALL) + { + env.tile_flavor[c.x][c.y].wall = + TILE_DNGN_WALL_CORRUPT - get_wall_tile_idx() + random2(4); + } + else if (feat == DNGN_FLOOR) + { + env.tile_flavor[c.x][c.y].floor = + TILE_DNGN_FLOOR_CORRUPT - get_floor_tile_idx() + random2(4); + } +#endif } static void corrupt_level_features(const crawl_environment &oenv) diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt index de5529bc5e..1d3c10cdef 100644 --- a/crawl-ref/source/rltiles/dc-dngn.txt +++ b/crawl-ref/source/rltiles/dc-dngn.txt @@ -3,6 +3,8 @@ blank BLANK dngn_unseen DNGN_UNSEEN +# Do not separate basic floors and rock walls. They get overwritten by +# branch-specific floors and walls and will overwrite anything in between. floor/pebble_gray0 DNGN_FLOOR floor/pebble_gray1 floor/pebble_gray2 @@ -24,6 +26,15 @@ wall/brick_brown3 wall/brick_brown3 wall/brick_brown3 +floor/floor_nerves0 DNGN_FLOOR_CORRUPT +floor/floor_nerves1 +floor/floor_nerves2 +floor/floor_nerves3 +wall/undead0 DNGN_WALL_CORRUPT +wall/undead1 +wall/undead2 +wall/undead3 + floor/lava0 DNGN_LAVA floor/lava1 floor/lava2 -- cgit v1.2.3-54-g00ecf