add support for a new terrain type

This commit is contained in:
Enno Rehling 2010-09-11 20:11:15 -07:00
parent 45f451f17d
commit 163f6f13cf
2 changed files with 10 additions and 3 deletions

View File

@ -223,13 +223,19 @@ mr_tile(const map_region * mr, int highlight)
} else if (r->terrain->_name[1]=='i') { /* firewall */
return '%' | COLOR_PAIR(hl + COLOR_RED) | A_BOLD;
}
break;
case 'h' :
return 'H' | COLOR_PAIR(hl + COLOR_YELLOW) | A_NORMAL;
case 'm' :
return '^' | COLOR_PAIR(hl + COLOR_WHITE) | A_NORMAL;
case 'p' :
if (r->terrain->_name[1]=='l') { /* plain */
if (r_isforest(r)) return '#' | COLOR_PAIR(hl + COLOR_GREEN) | A_NORMAL;
return '+' | COLOR_PAIR(hl + COLOR_GREEN) | A_BOLD;
} else if (r->terrain->_name[1]=='l') { /* packice */
return ':' | COLOR_PAIR(hl + COLOR_WHITE) | A_BOLD;
}
break;
case 'g' :
return '*' | COLOR_PAIR(hl + COLOR_WHITE) | A_BOLD;
case 's' :

View File

@ -13,6 +13,7 @@
#include <curses.h>
#include "listbox.h"
#include "gmtool_structs.h"
#include <string.h>
#include <ctype.h>
@ -94,7 +95,7 @@ do_selection(list_selection * sel, const char * title, void (*perform)(list_sele
waddnstr(wn, s->str, -1);
wclrtoeol(wn);
}
wborder(wn, 0, 0, 0, 0, 0, 0, 0, 0);
wxborder(wn);
mvwprintw(wn, 0, 2, "[ %s ]", title);
update = false;
}