summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-17 21:36:30 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-17 21:36:30 +0000
commit7b768f7fac47ee709312b381e5844b55f58d3553 (patch)
treeb2876cd5f9a27add79eaa6e99e82c7dbe5dbd7ca /crawl-ref
parent5f770d9133518e7f43d8064ca11acbd9830c0cfc (diff)
downloadcrawl-ref-7b768f7fac47ee709312b381e5844b55f58d3553.tar.gz
crawl-ref-7b768f7fac47ee709312b381e5844b55f58d3553.zip
* More steps on the path to reintroducing player doll customization.
Also apply my two previous commits to trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9995 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/acr.cc11
-rw-r--r--crawl-ref/source/cmd-keys.h3
-rw-r--r--crawl-ref/source/cmd-name.h5
-rw-r--r--crawl-ref/source/command.cc8
-rw-r--r--crawl-ref/source/dat/database/rand_wpn.txt2
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt7
-rw-r--r--crawl-ref/source/debug.cc3
-rw-r--r--crawl-ref/source/delay.cc6
-rw-r--r--crawl-ref/source/enum.h11
-rw-r--r--crawl-ref/source/macro.cc14
-rw-r--r--crawl-ref/source/misc.cc19
-rw-r--r--crawl-ref/source/misc.h1
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/state.cc3
-rw-r--r--crawl-ref/source/tilepick.cc9
-rw-r--r--crawl-ref/source/tilereg.cc59
-rw-r--r--crawl-ref/source/tilereg.h2
-rw-r--r--crawl-ref/source/tiles.h73
-rw-r--r--crawl-ref/source/view.cc10
19 files changed, 164 insertions, 88 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 853c16a791..aa1934a2dd 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -788,6 +788,9 @@ static bool _cmd_is_repeatable(command_type cmd, bool is_again = false)
case CMD_INSCRIBE_ITEM:
case CMD_MAKE_NOTE:
case CMD_CYCLE_QUIVER_FORWARD:
+#ifdef USE_TILE
+ case CMD_EDIT_PLAYER_TILE:
+#endif
mpr("You can't repeat that command.");
return (false);
@@ -1325,9 +1328,15 @@ static void _print_friendly_pickup_setting(bool was_changed)
void process_command( command_type cmd )
{
apply_berserk_penalty = true;
-
+ mprf("cmd: %d", cmd);
switch (cmd)
{
+#ifdef USE_TILE
+ case CMD_EDIT_PLAYER_TILE:
+ TilePlayerEdit();
+ break;
+#endif
+
case CMD_OPEN_DOOR_UP_RIGHT: _open_door( 1, -1); break;
case CMD_OPEN_DOOR_UP: _open_door( 0, -1); break;
case CMD_OPEN_DOOR_UP_LEFT: _open_door(-1, -1); break;
diff --git a/crawl-ref/source/cmd-keys.h b/crawl-ref/source/cmd-keys.h
index f45e2383fd..82cb9e4a17 100644
--- a/crawl-ref/source/cmd-keys.h
+++ b/crawl-ref/source/cmd-keys.h
@@ -1,3 +1,6 @@
+#ifdef USE_TILE
+{'-', CMD_EDIT_PLAYER_TILE},
+#endif
{'b', CMD_MOVE_DOWN_LEFT},
{'h', CMD_MOVE_LEFT},
{'j', CMD_MOVE_DOWN},
diff --git a/crawl-ref/source/cmd-name.h b/crawl-ref/source/cmd-name.h
index 5aa7954b3a..a262f1cb85 100644
--- a/crawl-ref/source/cmd-name.h
+++ b/crawl-ref/source/cmd-name.h
@@ -104,6 +104,9 @@
{CMD_MOUSE_MOVE, "CMD_MOUSE_MOVE"},
{CMD_MOUSE_CLICK, "CMD_MOUSE_CLICK"},
{CMD_ANNOTATE_LEVEL, "CMD_ANNOTATE_LEVEL"},
+#ifdef USE_TILE
+{CMD_EDIT_PLAYER_TILE, "CMD_EDIT_PLAYER_TILE"},
+#endif
{CMD_PREV_CMD_AGAIN, "CMD_PREV_CMD_AGAIN"},
{CMD_REPEAT_CMD, "CMD_REPEAT_CMD"},
{CMD_MAP_CLEAR_MAP, "CMD_MAP_CLEAR_MAP"},
@@ -201,7 +204,5 @@
{CMD_TARGET_MOUSE_MOVE, "CMD_TARGET_MOUSE_MOVE"},
{CMD_TARGET_MOUSE_SELECT, "CMD_TARGET_MOUSE_SELECT"},
{CMD_TARGET_HELP, "CMD_TARGET_HELP"},
-#ifdef USE_TILE
-#endif
{CMD_NO_CMD, NULL}
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index fd9fa3b399..4afd3aebea 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -660,14 +660,14 @@ void list_weapons(void)
mpr(wstring.c_str(), MSGCH_EQUIPMENT, colour);
// Print out the swap slots.
- for (int i = 0; i <= 1; i++)
+ for (int i = 0; i <= 1; ++i)
{
// We'll avoid repeating the current weapon for these slots,
// in order to keep things clean.
if (weapon_id == i)
continue;
- if ( i == 0 )
+ if (i == 0)
wstring = "Primary : ";
else
wstring = "Secondary : ";
@@ -724,8 +724,8 @@ void list_weapons(void)
if (colour == MSGCOL_BLACK)
colour = menu_colour(wstring, "", "equip");
- mpr( wstring.c_str(), MSGCH_EQUIPMENT, colour );
-} // end list_weapons()
+ mpr(wstring.c_str(), MSGCH_EQUIPMENT, colour);
+}
static bool _cmdhelp_textfilter(const std::string &tag)
{
diff --git a/crawl-ref/source/dat/database/rand_wpn.txt b/crawl-ref/source/dat/database/rand_wpn.txt
index d9e371a152..4ef85e6b8f 100644
--- a/crawl-ref/source/dat/database/rand_wpn.txt
+++ b/crawl-ref/source/dat/database/rand_wpn.txt
@@ -549,8 +549,6 @@ Sequestration
%%%%
place_name
-Earth
-
the World
the Sea
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index ada4d7b1d0..e0c33be01f 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -567,12 +567,7 @@ One of the race of elves which inhabits this dreary cave.
%%%%
ettin
-"But he had not been long in his hiding-hole, before the awful Ettin came in; and no sooner was he in, than he was heard crying:
-'Snouk but and snouk ben,
-I find the smell of an earthly man,
-Be he living, or be he dead,
-His heart this night shall kitchen my bread.'"
- -Joseph Jacobs, _The Red Ettin_
+A two-headed giant.
%%%%
eye of devastation
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 8bf156786f..d3c2343bb9 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -362,6 +362,9 @@ void wizard_change_species( void )
break;
}
+#ifdef USE_TILE
+ init_player_doll();
+#endif
redraw_screen();
}
#endif
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 71b46c9d4e..eb1cab8575 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1847,12 +1847,8 @@ inline static bool _monster_warning(activity_interrupt_type ai,
else
{
ASSERT(mon->seen_context != "just seen");
- // If the monster is in the auto_exclude list, automatically
- // set an exclusion.
- if (need_auto_exclude(mon) && !is_exclude_root(mon->pos()))
- toggle_exclude(mon->pos());
-
std::string text = mon->full_name(DESC_CAP_A);
+ set_auto_exclude(mon);
if (starts_with(at.context, "open"))
text += " " + at.context;
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 9d8bbf4671..2e95d31c18 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -537,6 +537,12 @@ enum command_type
CMD_ANNOTATE_LEVEL,
+#ifdef USE_TILE
+ CMD_EDIT_PLAYER_TILE,
+ CMD_MIN_TILE = CMD_EDIT_PLAYER_TILE,
+ CMD_MAX_TILE = CMD_MIN_TILE,
+#endif
+
// Repeat previous command
CMD_PREV_CMD_AGAIN,
@@ -659,11 +665,6 @@ enum command_type
CMD_TARGET_HELP,
CMD_MAX_TARGET = CMD_TARGET_HELP,
-#ifdef USE_TILE
- CMD_MIN_TILE,
- CMD_MAX_TILE = CMD_MIN_TILE - 1,
-#endif
-
// Disable/enable -more- prompts.
CMD_DISABLE_MORE,
CMD_MIN_SYNTHETIC = CMD_DISABLE_MORE,
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index fe200e45a4..b53d210f9a 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -1106,6 +1106,17 @@ command_type key_to_command(int key, KeymapContext context)
key_to_cmd_map &key_map = _keys_to_cmds[context];
key_to_cmd_map::iterator it = key_map.find(key);
+#if 0
+#ifdef USE_TILE
+ if (context != KMC_TILE && it == key_map.end())
+ {
+ context = KMC_TILE;
+ key_map = _keys_to_cmds[KMC_TILE];
+ it = key_map.find(key);
+ }
+#endif
+#endif
+
if (it == key_map.end())
return CMD_NO_CMD;
@@ -1134,11 +1145,12 @@ int command_to_key(command_type cmd)
KeymapContext context_for_command(command_type cmd)
{
+#if 0
#ifdef USE_TILE
if (cmd >= CMD_MIN_TILE && cmd <= CMD_MAX_TILE)
return KMC_TILE;
#endif
-
+#endif
if (cmd > CMD_NO_CMD && cmd <= CMD_MAX_NORMAL)
return KMC_DEFAULT;
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 7420143953..32b5d1625b 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2672,12 +2672,31 @@ bool need_auto_exclude(const monsters *mon, bool sleepy)
return (false);
}
+// If the monster is in the auto_exclude list, automatically set an
+// exclusion.
+void set_auto_exclude(const monsters *mon)
+{
+ if (need_auto_exclude(mon) && !is_exclude_root(mon->pos()))
+ {
+ toggle_exclude(mon->pos());
+#ifdef USE_TILE
+ viewwindow(true, false);
+#endif
+ learned_something_new(TUT_AUTO_EXCLUSION, mon->pos());
+ }
+}
+
// Clear auto exclusion if the monster is killed or wakes up with the
// player in sight. If sleepy is true, stationary monsters are ignored.
void remove_auto_exclude(const monsters *mon, bool sleepy)
{
if (need_auto_exclude(mon, sleepy) && is_exclude_root(mon->pos()))
+ {
toggle_exclude(mon->pos());
+#ifdef USE_TILE
+ viewwindow(true, false);
+#endif
+ }
}
// Return all nearby monsters in range (default: LOS) that the player
diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h
index 6149bc8e0d..0ced7ed8e9 100644
--- a/crawl-ref/source/misc.h
+++ b/crawl-ref/source/misc.h
@@ -72,6 +72,7 @@ std::string weird_sound();
bool mons_is_safe(const monsters *mon, bool want_move = false,
bool consider_user_options = true);
bool need_auto_exclude(const monsters *mon, bool sleepy = false);
+void set_auto_exclude(const monsters *mon);
void remove_auto_exclude(const monsters *mon, bool sleepy = false);
std::vector<monsters*> get_nearby_monsters(bool want_move = false,
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 1106bbf47b..85ef6af6b2 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -8936,11 +8936,7 @@ void seen_monster(monsters *monster)
{
// If the monster is in the auto_exclude list, automatically
// set an exclusion.
- if (need_auto_exclude(monster) && !is_exclude_root(monster->pos()))
- {
- toggle_exclude(monster->pos());
- learned_something_new(TUT_AUTO_EXCLUSION, monster->pos());
- }
+ set_auto_exclude(monster);
// Monster was viewed this turn
monster->flags |= MF_WAS_IN_VIEW;
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index 1e57e372c9..256b5a6fb8 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -14,6 +14,7 @@ REVISION("$Rev$");
#include "delay.h"
#include "directn.h"
#include "macro.h"
+#include "misc.h"
#include "menu.h" // For print_formatted_paragraph()
#include "message.h"
#include "mon-util.h"
@@ -195,6 +196,8 @@ bool interrupt_cmd_repeat( activity_interrupt_type ai,
#ifndef DEBUG_DIAGNOSTICS
if (at.context == "newly seen")
{
+ set_auto_exclude(mon);
+
std::string text = get_monster_equipment_desc(mon, false);
text += " comes into view.";
print_formatted_paragraph(text, MSGCH_WARN);
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 1035271e68..344193e21e 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2933,9 +2933,12 @@ void tilep_race_default(int race, int gender, int level, int *parts)
if (gender == TILEP_GENDER_MALE)
result++;
- parts[TILEP_PART_BASE] = result;
- parts[TILEP_PART_HAIR] = hair;
- parts[TILEP_PART_BEARD] = beard;
+ parts[TILEP_PART_BASE] = result;
+ //Don't overwrite doll parts defined elsewhere.
+ if (parts[TILEP_PART_HAIR] == TILEP_SHOW_EQUIP)
+ parts[TILEP_PART_HAIR] = hair;
+ if (parts[TILEP_PART_BEARD] == TILEP_SHOW_EQUIP)
+ parts[TILEP_PART_BEARD] = beard;
parts[TILEP_PART_SHADOW] = TILEP_SHADOW_SHADOW;
}
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 0aa97e31b1..e1a0c7cd32 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -293,6 +293,9 @@ void DungeonRegion::pack_background(unsigned int bg, int x, int y)
m_buf_dngn.add(TILE_RAY_OUT_OF_RANGE, x, y);
}
+static dolls_data player_doll;
+static int gender = -1;
+
// static void _load_doll_data(const char *fn, dolls_data *dolls, int max,
// int *mode, int *cur)
static void _load_doll_data(const char *fn, dolls_data *doll)
@@ -306,16 +309,13 @@ static void _load_doll_data(const char *fn, dolls_data *doll)
if ( (fp = fopen(dollsTxt, "r")) == NULL )
{
- mpr("File not found.");
// File doesn't exist. By default, use equipment defaults.
// This will be saved out (if possible).
// Don't take gender too seriously. -- Enne
- tilep_race_default(you.species, coinflip() ? 1 : 0,
+ tilep_race_default(you.species, coinflip(),
you.experience_level, doll->parts);
- doll->parts[TILEP_PART_SHADOW] = TILEP_SHADOW_SHADOW;
-
#if 0
// For some reason I can't reset this although it's used identically
// elsewhere. (jpeg)
@@ -326,19 +326,23 @@ static void _load_doll_data(const char *fn, dolls_data *doll)
else
{
memset(fbuf, 0, sizeof(fbuf));
- if (fscanf(fp, "%s", fbuf) == EOF)
+ if (fscanf(fp, "%s", fbuf) != EOF)
{
- // We're currently not interested in the MODE setting. (jpeg)
- fclose(fp);
- return;
+ if (strcmp(fbuf, "MODE=DEFAULT") == 0)
+ {
+ tilep_job_default(you.char_class, gender, doll->parts);
+ fclose(fp);
+ return;
+ }
+ // else loading
}
- int cur = 0;
+ int cur = 0; // # of current doll
if (fscanf(fp, "%s", fbuf) != EOF)
{
if (strncmp(fbuf, "NUM=", 4) == 0)
{
sscanf(fbuf, "NUM=%d", &cur);
- if (cur < 0 || cur > 10)
+ if (cur < 0 || cur >= 10)
cur = 0;
}
}
@@ -349,6 +353,7 @@ static void _load_doll_data(const char *fn, dolls_data *doll)
if (cur == count++)
{
tilep_scan_parts(fbuf, doll->parts);
+ gender = doll->parts[TILEP_PART_BASE] % 2;
break;
}
}
@@ -362,8 +367,6 @@ static void _load_doll_data(const char *fn, dolls_data *doll)
}
}
-static dolls_data player_doll;
-
void init_player_doll()
{
dolls_data default_doll;
@@ -371,15 +374,41 @@ void init_player_doll()
for (unsigned int i = 0; i < TILEP_PART_MAX; ++i)
default_doll.parts[i] = TILEP_SHOW_EQUIP;
- int gender = coinflip();
+ _load_doll_data("dolls.txt", &default_doll);
+
+ if (gender == -1)
+ gender = coinflip();
tilep_race_default(you.species, gender, you.experience_level,
default_doll.parts);
- _load_doll_data("dolls.txt", &default_doll);
player_doll = default_doll;
}
+void TilePlayerEdit()
+{
+ // TODO: Prompt for (D)efault job, or 0-9 for specific dolls,
+ // alternatively (C)reate dolls.txt (if missing).
+ // * Read content from dolls.txt.
+ // * If (D) and MODE=DEFAULT, nothing to be done.
+ // * If (#) and NUM=#, nothing to be done.
+ // * If MODE != DEFAULT or NUM != #, save file back to disk with
+ // MODE/NUM modified, then call _load_doll_data().
+ // * If dolls.txt missing, possibly (C)reate the file with
+ // dummy values (MODE=DEFAULT, 10 variable dolls).
+
+ mpr("Sorry, this command has not yet been implemented.");
+
+ // TODO 2: Allow saving back of customized dolls.
+ // * Use pack_player (split into 2 methods) to fill the (C)urrent equipment.
+ // * Create (R)andom equipment for player doll.
+ // * (S)ave current doll to slot 0-9, prompt to overwrite non-empty slots?
+ // With empty == consisting only of *** or 000 after the first two
+ // colons.
+
+ // TODO 3: Change to proper menu.
+}
+
void DungeonRegion::pack_player(int x, int y)
{
dolls_data result = player_doll;
@@ -520,7 +549,7 @@ void DungeonRegion::pack_doll(const dolls_data &doll, int x, int y)
for (int i = 0; i < TILEP_PART_MAX; i++)
{
int p = p_order[i];
- if (!doll.parts[p])
+ if (!doll.parts[p] || flags[p] == TILEP_FLAG_HIDE)
continue;
int ymax = TILE_Y;
diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h
index da8d36f8b0..231c5c3efb 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -439,7 +439,5 @@ protected:
GenericTexture m_img;
VertBuffer<PTVert> m_buf;
};
-
-void init_player_doll();
#endif
#endif
diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h
index 7e84bbc775..885efbcc92 100644
--- a/crawl-ref/source/tiles.h
+++ b/crawl-ref/source/tiles.h
@@ -20,7 +20,7 @@
enum tag_version
{
TILETAG_PRE_MCACHE = 71,
- TILETAG_CURRENT = 72
+ TILETAG_CURRENT = 72
};
struct dolls_data
@@ -126,6 +126,7 @@ void TileNewLevel(bool first_time);
// edit player tile
void TilePlayerEdit();
+void init_player_doll();
int item_unid_type(const item_def &item);
int tile_known_weapon_brand(const item_def item);
@@ -138,45 +139,45 @@ int get_clean_map_idx(int tile_idx);
enum tile_flags
{
// Foreground flags
- TILE_FLAG_S_UNDER = 0x00000800,
- TILE_FLAG_FLYING = 0x00001000,
- TILE_FLAG_PET = 0x00002000,
- TILE_FLAG_NEUTRAL = 0x00004000,
- TILE_FLAG_STAB = 0x00008000,
- TILE_FLAG_MAY_STAB = 0x0000C000,
- TILE_FLAG_NET = 0x00010000,
- TILE_FLAG_POISON = 0x00020000,
- TILE_FLAG_FLAME = 0x00040000,
- TILE_FLAG_ANIM_WEP = 0x00080000,
+ TILE_FLAG_S_UNDER = 0x00000800,
+ TILE_FLAG_FLYING = 0x00001000,
+ TILE_FLAG_PET = 0x00002000,
+ TILE_FLAG_NEUTRAL = 0x00004000,
+ TILE_FLAG_STAB = 0x00008000,
+ TILE_FLAG_MAY_STAB = 0x0000C000,
+ TILE_FLAG_NET = 0x00010000,
+ TILE_FLAG_POISON = 0x00020000,
+ TILE_FLAG_FLAME = 0x00040000,
+ TILE_FLAG_ANIM_WEP = 0x00080000,
// MDAM has 5 possibilities, so uses 3 bits.
- TILE_FLAG_MDAM_MASK = 0x03800000,
- TILE_FLAG_MDAM_LIGHT= 0x00800000,
- TILE_FLAG_MDAM_MOD = 0x01000000,
- TILE_FLAG_MDAM_HEAVY= 0x01800000,
- TILE_FLAG_MDAM_SEV = 0x02000000,
- TILE_FLAG_MDAM_ADEAD= 0x02800000,
+ TILE_FLAG_MDAM_MASK = 0x03800000,
+ TILE_FLAG_MDAM_LIGHT = 0x00800000,
+ TILE_FLAG_MDAM_MOD = 0x01000000,
+ TILE_FLAG_MDAM_HEAVY = 0x01800000,
+ TILE_FLAG_MDAM_SEV = 0x02000000,
+ TILE_FLAG_MDAM_ADEAD = 0x02800000,
// Background flags
- TILE_FLAG_RAY = 0x00000800,
- TILE_FLAG_MM_UNSEEN = 0x00001000,
- TILE_FLAG_UNSEEN = 0x00002000,
- TILE_FLAG_CURSOR1 = 0x00004000,
- TILE_FLAG_CURSOR2 = 0x00008000,
- TILE_FLAG_CURSOR3 = 0x0000C000,
- TILE_FLAG_CURSOR = 0x0000C000,
- TILE_FLAG_BLOOD = 0x00010000,
- TILE_FLAG_HALO = 0x00020000,
- TILE_FLAG_NEW_STAIR = 0x00040000,
- TILE_FLAG_TRAV_EXCL = 0x00080000,
- TILE_FLAG_EXCL_CTR = 0x00100000,
- TILE_FLAG_SANCTUARY = 0x00200000,
- TILE_FLAG_TUT_CURSOR= 0x00400000,
- TILE_FLAG_RAY_OOR = 0x00800000,
- TILE_FLAG_OOR = 0x01000000,
+ TILE_FLAG_RAY = 0x00000800,
+ TILE_FLAG_MM_UNSEEN = 0x00001000,
+ TILE_FLAG_UNSEEN = 0x00002000,
+ TILE_FLAG_CURSOR1 = 0x00004000,
+ TILE_FLAG_CURSOR2 = 0x00008000,
+ TILE_FLAG_CURSOR3 = 0x0000C000,
+ TILE_FLAG_CURSOR = 0x0000C000,
+ TILE_FLAG_BLOOD = 0x00010000,
+ TILE_FLAG_HALO = 0x00020000,
+ TILE_FLAG_NEW_STAIR = 0x00040000,
+ TILE_FLAG_TRAV_EXCL = 0x00080000,
+ TILE_FLAG_EXCL_CTR = 0x00100000,
+ TILE_FLAG_SANCTUARY = 0x00200000,
+ TILE_FLAG_TUT_CURSOR = 0x00400000,
+ TILE_FLAG_RAY_OOR = 0x00800000,
+ TILE_FLAG_OOR = 0x01000000,
// General
- TILE_FLAG_MASK = 0x000007FF
+ TILE_FLAG_MASK = 0x000007FF
};
enum
@@ -193,9 +194,9 @@ enum
enum
{
- TILEP_GENDER_MALE = 0,
+ TILEP_GENDER_MALE = 0,
TILEP_GENDER_FEMALE = 1,
- TILEP_SHOW_EQUIP = 0x1000
+ TILEP_SHOW_EQUIP = 0x1000
};
enum tile_player_flag_cut
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index ec151ae053..4f2e7d677a 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1198,7 +1198,15 @@ void handle_monster_shouts(monsters* monster, bool force)
if (you.can_see(monster))
{
- monster->seen_context = "bursts forth shouting";
+ if (monster->type == MONS_AIR_ELEMENTAL)
+ monster->seen_context = "thin air";
+ else if (monster->type == MONS_TRAPDOOR_SPIDER)
+ monster->seen_context = "leaps out";
+ else if (!monster_habitable_grid(monster, DNGN_FLOOR))
+ monster->seen_context = "bursts forth shouting";
+ else
+ monster->seen_context = "surfaces";
+
// Give interrupt message before shout message.
handle_seen_interrupt(monster);
}