forked from github/server
add support for a new terrain type
This commit is contained in:
parent
45f451f17d
commit
163f6f13cf
|
@ -223,13 +223,19 @@ mr_tile(const map_region * mr, int highlight)
|
||||||
} else if (r->terrain->_name[1]=='i') { /* firewall */
|
} else if (r->terrain->_name[1]=='i') { /* firewall */
|
||||||
return '%' | COLOR_PAIR(hl + COLOR_RED) | A_BOLD;
|
return '%' | COLOR_PAIR(hl + COLOR_RED) | A_BOLD;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case 'h' :
|
case 'h' :
|
||||||
return 'H' | COLOR_PAIR(hl + COLOR_YELLOW) | A_NORMAL;
|
return 'H' | COLOR_PAIR(hl + COLOR_YELLOW) | A_NORMAL;
|
||||||
case 'm' :
|
case 'm' :
|
||||||
return '^' | COLOR_PAIR(hl + COLOR_WHITE) | A_NORMAL;
|
return '^' | COLOR_PAIR(hl + COLOR_WHITE) | A_NORMAL;
|
||||||
case 'p' :
|
case 'p' :
|
||||||
|
if (r->terrain->_name[1]=='l') { /* plain */
|
||||||
if (r_isforest(r)) return '#' | COLOR_PAIR(hl + COLOR_GREEN) | A_NORMAL;
|
if (r_isforest(r)) return '#' | COLOR_PAIR(hl + COLOR_GREEN) | A_NORMAL;
|
||||||
return '+' | COLOR_PAIR(hl + COLOR_GREEN) | A_BOLD;
|
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' :
|
case 'g' :
|
||||||
return '*' | COLOR_PAIR(hl + COLOR_WHITE) | A_BOLD;
|
return '*' | COLOR_PAIR(hl + COLOR_WHITE) | A_BOLD;
|
||||||
case 's' :
|
case 's' :
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
|
||||||
#include "listbox.h"
|
#include "listbox.h"
|
||||||
|
#include "gmtool_structs.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.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);
|
waddnstr(wn, s->str, -1);
|
||||||
wclrtoeol(wn);
|
wclrtoeol(wn);
|
||||||
}
|
}
|
||||||
wborder(wn, 0, 0, 0, 0, 0, 0, 0, 0);
|
wxborder(wn);
|
||||||
mvwprintw(wn, 0, 2, "[ %s ]", title);
|
mvwprintw(wn, 0, 2, "[ %s ]", title);
|
||||||
update = false;
|
update = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue