diff options
author | Enne Walker <ennewalker@users.sourceforge.net> | 2009-12-23 23:32:52 -0500 |
---|---|---|
committer | Enne Walker <ennewalker@users.sourceforge.net> | 2009-12-24 00:15:48 -0500 |
commit | bcc249f77c1459b75b7a4f96b018a15569e675b3 (patch) | |
tree | 72ad82e9ff51f45396c95933e3583437ab5489fb /crawl-ref/source/rltiles/tool/tile_list_processor.h | |
parent | 5b9916a319a570598c8cd54e916eb10dab0eb916 (diff) | |
download | crawl-ref-bcc249f77c1459b75b7a4f96b018a15569e675b3.tar.gz crawl-ref-bcc249f77c1459b75b7a4f96b018a15569e675b3.zip |
Basic support for tile recolouring.
Added %variation, %repeat, %desat, %lum, %hue, %pal, %resetcol commands
to rltiles. Also, multiple enum synonyms can now be specified.
Documentation on all rltiles commands is forthcoming. Sorry.
Added coloured variations for a number of floor and wall tiles, removing
duplicate source art where it made sense. The variations probably need
some adjusting to look less like fruit salad.
COLOUR in a vault specification will now automatically try to pick
coloured variations of basic floor and rock wall tiles by default. It
will also pick coloured variations of any tiles specified by
FTILE/RTILE/TILE.
I'll leave it as an exercise for due to generalize this to features and
monsters. tile_dngn_coloured (and corresponding functions for other tile
sheets) can be used to look up coloured variations for a given tile
index.
Diffstat (limited to 'crawl-ref/source/rltiles/tool/tile_list_processor.h')
-rw-r--r-- | crawl-ref/source/rltiles/tool/tile_list_processor.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.h b/crawl-ref/source/rltiles/tool/tile_list_processor.h index 74b199b5ef..5e95d1815b 100644 --- a/crawl-ref/source/rltiles/tool/tile_list_processor.h +++ b/crawl-ref/source/rltiles/tool/tile_list_processor.h @@ -18,6 +18,7 @@ protected: bool load_image(tile &img, const char *filename); bool process_line(char *read_line, const char *list_file, int line); void add_image(tile &img, const char *enumname); + void recolour(tile &img); std::string m_name; @@ -38,6 +39,22 @@ protected: std::vector<std::string> m_categories; std::vector<int> m_ctg_counts; tile m_compose; + int m_variation_idx; + int m_variation_col; + + typedef std::pair<tile_colour, tile_colour> palette_entry; + typedef std::vector<palette_entry> palette_list; + palette_list m_palette; + + typedef std::pair<int, int> int_pair; + typedef std::vector<int_pair> hue_list; + hue_list m_hues; + + typedef std::vector<int> desat_list; + desat_list m_desat; + + typedef std::vector<int_pair> lum_list; + lum_list m_lum; }; #endif |