make a distinction between rock and unexplored area
This adds a pair of new glyphs: GLYPH_UNEXPLORED and GLYPH_NOTHING GLYPH_UNEXPLORED is meant to be the glyph for areas of the map that haven't been explored yet. GLYPH_NOTHING is a glyph that represents that which cannot be seen, for instance the dark part of a room when the dark_room option is not set. Since the symbol for stone can now be overridden to a players choice, it no longer made sense using S_stone for the dark areas of the room with dark_room off. This allows the same intended result even if S_stone symbol is mapped to something visible. GLYPH_UNEXPLORED is what areas of the map get initialized to now instead of STONE. This adds a pair of new symbols: S_unexplored and S_nothing. S_nothing is meant to be left as an unseen character (space) in order to achieve the intended effect on the display. S_unexplored is the symbol that is mapped to GLYPH_UNEXPLORED, and is a distinct symbol from S_stone, even if they are set to the same character. They don't have to be set to the same character. Hopefully there are minimal bugs, but it is a deviation from a fairly long-standing approach so there could be some unintended glitches that will need repair.
This commit is contained in:
@@ -130,7 +130,7 @@ const struct symdef def_warnsyms[WARNCOUNT] = {
|
||||
* Default screen symbols with explanations and colors.
|
||||
*/
|
||||
const struct symdef defsyms[MAXPCHARS] = {
|
||||
/* 0*/ { ' ', "dark part of a room", C(NO_COLOR) }, /* stone */
|
||||
/* 0*/ { ' ', "stone", C(NO_COLOR) }, /* stone */
|
||||
{ '|', "wall", C(CLR_GRAY) }, /* vwall */
|
||||
{ '-', "wall", C(CLR_GRAY) }, /* hwall */
|
||||
{ '-', "wall", C(CLR_GRAY) }, /* tlcorn */
|
||||
@@ -405,12 +405,22 @@ int idx, which_set;
|
||||
: g.primary_syms[oidx];
|
||||
if (!sym) {
|
||||
switch(idx) {
|
||||
case SYM_NOTHING:
|
||||
case SYM_UNEXPLORED:
|
||||
sym = DEF_NOTHING;
|
||||
break;
|
||||
case SYM_BOULDER:
|
||||
sym = def_oc_syms[ROCK_CLASS].sym;
|
||||
break;
|
||||
case SYM_INVISIBLE:
|
||||
sym = DEF_INVISIBLE;
|
||||
break;
|
||||
#if 0
|
||||
/* these intentionally have no defaults */
|
||||
case SYM_PET_OVERRIDE:
|
||||
case SYM_HERO_OVERRIDE:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return sym;
|
||||
@@ -805,6 +815,8 @@ const struct symparse loadsyms[] = {
|
||||
{ SYM_MON, S_LIZARD + SYM_OFF_M, "S_lizard" },
|
||||
{ SYM_MON, S_WORM_TAIL + SYM_OFF_M, "S_worm_tail" },
|
||||
{ SYM_MON, S_MIMIC_DEF + SYM_OFF_M, "S_mimic_def" },
|
||||
{ SYM_OTH, SYM_NOTHING + SYM_OFF_X, "S_nothing" },
|
||||
{ SYM_OTH, SYM_UNEXPLORED + SYM_OFF_X, "S_unexplored" },
|
||||
{ SYM_OTH, SYM_BOULDER + SYM_OFF_X, "S_boulder" },
|
||||
{ SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible" },
|
||||
{ SYM_OTH, SYM_PET_OVERRIDE + SYM_OFF_X, "S_pet_override" },
|
||||
|
||||
Reference in New Issue
Block a user