From: Martin Read Date: Tue, 12 Nov 2013 15:31:50 +0000 (+0000) Subject: Use the terrain properties array to get symbols and colours for terrain X-Git-Tag: printmsg-purged~51 X-Git-Url: http://git.blackswordsonics.com/?a=commitdiff_plain;h=650dd2d80facdb008ba679cbd1988178f686d765;p=victrix-abyssi Use the terrain properties array to get symbols and colours for terrain --- diff --git a/display-nc.cc b/display-nc.cc index faa6524..6bef344 100644 --- a/display-nc.cc +++ b/display-nc.cc @@ -103,17 +103,6 @@ short colour_cpairs[1 + LAST_COLOUR] = Gcol_l_grey // Silver = white }; -wchar_t terrain_wchars[NUM_TERRAINS] = -{ - L'█', L'█', L'+', L'·', L'_', L'>', L'{', L'{' -}; - -short terrain_cpairs[NUM_TERRAINS] = -{ - Gcol_brown, 0, 0, 0, - 0, 0, Gcol_red, Gcol_blue -}; - attr_t terrain_attrs[NUM_TERRAINS] = { 0, 0, 0, 0, @@ -339,9 +328,11 @@ int display_init(void) for (i = 0; i < NUM_TERRAINS; ++i) { wchar_t wch[2]; - wch[0] = terrain_wchars[i]; + /* policy decision: for now we don't support use of combining + * characters for terrain. */ + mbtowc(wch, terrain_props[i].unicode, 4); wch[1] = 0; - setcchar(terrain_tiles + i, wch, terrain_attrs[i], terrain_cpairs[i], NULL); + setcchar(terrain_tiles + i, wch, terrain_attrs[i], colour_cpairs[terrain_props[i].colour], NULL); } for (i = 0; i < NUM_OF_PERMOBJS; ++i) {