git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3314 c06c8d41-db1a-0410-9941-cceddc491573
DGB7DKTR6OEQEMOOF3MAHDT4PAPKZ54Y33MWYVD7XIOESPFAXHQQC
TOOHYAX73C5KPSWGHPCBWCUN62WMMO3BI5CWEEMGV3WBFZ5RIH5AC
GWGKGHFGBLVPDSSDWYFORHZHMWOR3SFC5PJNF732V7FEKWWJKPOAC
25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC
ND3T5LCZATC63EVQ6SLI7XXMSUL7XICJDNLH3UCYUDEFWTA3N5MQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
BWAQ3FHBBM6G3K3KYP75CRTR343RDQZJRYX5ZGYUEXYBAC3APDLAC
43ZTEB57FU7KE5EVMYWZONNVJBZCGF3JEAJZIY25LC4LGE65PG5QC
STQDS62PD6PCLYBAB7LPYTG47WMBJP3FIJL55UHC3XFDPGERC3UQC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
EHSY6DVGUMI6C67WKET3GDJVLWJWGYBYQONNDK5JVT7BCTHBEZVAC
#define PX_0 MAP_BLACK //unseen
#define PX_F MAP_LTGREY //floor
#define PX_W MAP_DKGREY //walls
#define PX_D MAP_BROWN //doors
#define PX_WB MAP_LTBLUE //blue wall
#define PX_I MAP_GREEN //items
#define PX_M MAP_RED //monsters
#define PX_US MAP_BLUE //upstair
#define PX_DS MAP_MAGENTA //downstair
#define PX_SS MAP_CYAN //special stair
#define PX_WT MAP_MDGREY //water
#define PX_LV MAP_MDGREY //lava
#define PX_T MAP_YELLOW //trap
#define PX_MS MAP_CYAN //misc
#define PX_0 0
#define PX_F 1
#define PX_W 2
#define PX_D 3
#define PX_WB 4
#define PX_I 5
#define PX_M 6
#define PX_US 7
#define PX_DS 8
#define PX_SS 9
#define PX_WT 10
#define PX_LV 11
#define PX_T 12
#define PX_MS 13
static char gmap_to_colour(char gm)
{
switch(gm)
{
case PX_0: // unseen
default:
return Options.tile_unseen_col;
case PX_F: // floor
return Options.tile_floor_col;
case PX_W: // walls
return Options.tile_wall_col;
case PX_WB: // walls detected by Magic Mapping
return Options.tile_mapped_wall_col;
case PX_D: // doors
return Options.tile_door_col;
case PX_I: // items
return Options.tile_item_col;
case PX_M: // (hostile) monsters
return Options.tile_monster_col;
case PX_US: // upstairs
return Options.tile_upstairs_col;
case PX_DS: // downstairs
return Options.tile_downstairs_col;
case PX_MS: // misc. features (altars, portals, fountains, ...)
case PX_SS: // special stairs (?)
return Options.tile_feature_col;
case PX_WT: // water
return Options.tile_water_col;
case PX_LV: // lava
return Options.tile_lava_col;
case PX_T: // traps
return Options.tile_trap_col;
}
}
#ifdef USE_TILE
const std::string tile_cols[24] =
{
"black", "darkgrey", "grey", "lightgrey", "white",
"blue", "lightblue", "darkblue",
"green", "lightgreen", "darkgreen",
"cyan", "lightcyan", "darkcyan",
"red", "lightred", "darkred",
"magenta", "lightmagenta", "darkmagenta",
"yellow", "lightyellow", "darkyellow", "brown"
};
static unsigned int str_to_tile_colour(std::string colour)
{
if (colour.empty())
return (0);
lowercase(colour);
if (colour == "darkgray")
colour = "darkgrey";
else if (colour == "gray")
colour = "grey";
else if (colour == "lightgray")
colour = "lightgrey";
for (unsigned int i=0; i<24; i++)
{
if (tile_cols[i] == colour)
return (i);
}
return (0);
}
#endif
title_screen = true;
title_screen = true;
// minimap colours
tile_player_col = MAP_WHITE;
tile_monster_col = MAP_RED;
tile_friendly_col = MAP_LTRED;
tile_item_col = MAP_GREEN;
tile_unseen_col = MAP_BLACK;
tile_floor_col = MAP_LTGREY;
tile_wall_col = MAP_DKGREY;
tile_mapped_wall_col = MAP_BLUE;
tile_door_col = MAP_BROWN;
tile_downstairs_col = MAP_MAGENTA;
tile_upstairs_col = MAP_BLUE;
tile_feature_col = MAP_CYAN;
tile_trap_col = MAP_YELLOW;
tile_water_col = MAP_MDGREY;
tile_lava_col = MAP_MDGREY;
tile_excluded_col = MAP_DKCYAN;
else if (key == "tile_player_col")
{
tile_player_col =
str_to_tile_colour(field);
}
else if (key == "tile_monster_col")
{
tile_monster_col =
str_to_tile_colour(field);
}
else if (key == "tile_friendly_col")
{
tile_friendly_col =
str_to_tile_colour(field);
}
else if (key == "tile_item_col")
{
tile_item_col =
str_to_tile_colour(field);
}
else if (key == "tile_unseen_col")
{
tile_unseen_col =
str_to_tile_colour(field);
}
else if (key == "tile_floor_col")
{
tile_floor_col =
str_to_tile_colour(field);
}
else if (key == "tile_wall_col")
{
tile_wall_col =
str_to_tile_colour(field);
}
else if (key == "tile_mapped_wall_col")
{
tile_mapped_wall_col =
str_to_tile_colour(field);
}
else if (key == "tile_door_col")
{
tile_door_col =
str_to_tile_colour(field);
}
else if (key == "tile_downstairs_col")
{
tile_downstairs_col =
str_to_tile_colour(field);
}
else if (key == "tile_upstairs_col")
{
tile_upstairs_col =
str_to_tile_colour(field);
}
else if (key == "tile_feature_col")
{
tile_feature_col =
str_to_tile_colour(field);
}
else if (key == "tile_trap_col")
{
tile_trap_col =
str_to_tile_colour(field);
}
else if (key == "tile_water_col")
{
tile_water_col =
str_to_tile_colour(field);
}
else if (key == "tile_lava_col")
{
tile_lava_col =
str_to_tile_colour(field);
}
else if (key == "tile_excluded_col")
{
tile_excluded_col =
str_to_tile_colour(field);
}
// minimap colours
char tile_player_col;
char tile_monster_col;
char tile_friendly_col;
char tile_item_col;
char tile_unseen_col;
char tile_floor_col;
char tile_wall_col;
char tile_mapped_wall_col;
char tile_door_col;
char tile_downstairs_col;
char tile_upstairs_col;
char tile_feature_col;
char tile_trap_col;
char tile_water_col;
char tile_lava_col;
char tile_excluded_col;
# tile_player_col = white
# tile_monster_col = red
# tile_friendly_col = lightred
# tile_item_col = green
# tile_unseen_col = black
# tile_floor_col = lightgrey
# tile_wall_col = darkgrey
# tile_mapped_wall_col = blue
# tile_door_col = brown
# tile_downstairs_col = magenta
# tile_upstairs_col = blue
# tile_feature_col = cyan
# tile_trap_col = yellow
# tile_water_col = grey
# tile_lava_col = grey
# tile_excluded_col = darkcyan
show_items
show_items, title_screen, tile_player_col,
tile_monster_col, tile_friendly_col, tile_item_col,
tile_unseen_col, tile_floor_col, tile_wall_col,
tile_mapped_wall_col, tile_door_col, tile_downstairs_col,
tile_upstairs_col, tile_spec_feature_col, tile_trap_col,
tile_water_col, tile_lava_col, tile_excluded_col
tile_player_col = white
tile_monster_col = red
tile_friendly_col = lightred
tile_item_col = green
tile_unseen_col = black
tile_floor_col = lightgrey
tile_wall_col = darkgrey
tile_mapped_wall_col = blue
tile_door_col = brown
tile_downstairs_col = magenta
tile_upstairs_col = blue
tile_feature_col = cyan
tile_trap_col = yellow
tile_water_col = grey
tile_lava_col = grey
tile_excluded_col = darkcyan
These options allow configuring the colours used for the minimap of
the dungeon level.
tile_player_col - colour of player position, as well as of
map centre during level map mode ('X')
tile_monster_col - colour of hostile monsters
tile_friendly_col - colour of friendly monsters
tile_item_col - colour of known or detected items
tile_unseen_col - colour of unseen areas (usually stone)
tile_wall_col - colour of any wall type
tile_mapped_wall_col - colour of walls detected via magic mapping
tile_door_col - colour of known doors, open or closed
tile_downstairs_col - colour of downstairs, including branch stairs
tile_upstairs_col - colour of upstairs, including branch stairs
tile_feature_col - colour of any non-stair feature
(altar, shop, portal, fountain, ...)
tile_trap_col - colour of known traps of any type
tile_water_col - colour of both shallow and deep water
tile_lava_col - colour of lava
tile_excluded_col - colour of squares excluded for autotravel
(will only override tile_floor_col colour)