diff --git a/gfx/RetroDaysTileset/tiles.png b/gfx/RetroDaysTileset/tiles.png index 34e0e7ea2805f..729766ab9dd38 100644 Binary files a/gfx/RetroDaysTileset/tiles.png and b/gfx/RetroDaysTileset/tiles.png differ diff --git a/src/game.cpp b/src/game.cpp index 4809d51b6b19b..523400f39bed6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -5794,8 +5794,7 @@ void game::print_visibility_info( const catacurses::window &w_look, int column, visibility_message = _( "Unseen." ); break; } - - mvwprintw( w_look, point( line, column ), visibility_message ); + mvwprintz( w_look, point( line, column ), c_light_gray, visibility_message ); line += 2; } @@ -5806,24 +5805,25 @@ void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_l const int max_width = getmaxx( w_look ) - column - 1; int lines; std::string tile = m.tername( lp ); - tile = "(" + area_name + ") " + tile; + tile = _( "Place : " ) + area_name + _( "\nTile : " ) + tile; if( m.has_furn( lp ) ) { - tile += "; " + m.furnname( lp ); + tile += "\n"; + tile += _( "Decor : " ) + m.furnname( lp ); } if( m.impassable( lp ) ) { lines = fold_and_print( w_look, point( column, line ), max_width, c_light_gray, - _( "%s; Impassable" ), + _( "%s, Impassable" ), tile ); } else { lines = fold_and_print( w_look, point( column, line ), max_width, c_light_gray, - _( "%s; Movement cost %d" ), + _( "%s\nMove : %d" ), tile, m.move_cost( lp ) * 50 ); const auto ll = get_light_level( std::max( 1.0, LIGHT_AMBIENT_LIT - m.ambient_light_at( lp ) + 1.0 ) ); - mvwprintw( w_look, point( column, ++lines ), _( "Lighting: " ) ); - wprintz( w_look, ll.second, ll.first ); + mvwprintz( w_look, point( column, ++lines ), c_light_gray, _( "Light : " ) ); + mvwprintz( w_look, point( column + 9, lines ), ll.second, ll.first ); } std::string signage = m.get_signage( lp ); @@ -5838,7 +5838,7 @@ void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_l tripoint below( lp.xy(), lp.z - 1 ); std::string tile_below = m.tername( below ); if( m.has_furn( below ) ) { - tile_below += "; " + m.furnname( below ); + tile_below += ", " + m.furnname( below ); } if( !m.has_floor_or_support( lp ) ) { @@ -5851,13 +5851,12 @@ void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_l tile_below ); } } - - int map_features = fold_and_print( w_look, point( column, ++lines ), max_width, c_dark_gray, - m.features( lp ) ); - fold_and_print( w_look, point( column, ++lines ), max_width, c_light_gray, _( "Coverage: %d%%" ), + fold_and_print( w_look, point( column, ++lines ), max_width, c_light_gray, + _( "Type : " ) + m.features( lp ) ); + fold_and_print( w_look, point( column, ++lines ), max_width, c_light_gray, _( "Surface: %d%% \n" ), m.coverage( lp ) ); if( line < lines ) { - line = lines + map_features - 1; + line = lines + 1; } } @@ -5874,9 +5873,15 @@ void game::print_fields_info( const tripoint &lp, const catacurses::window &w_lo get_fire_fuel_string( lp ) ) - 1; line += lines; } else { + // display tile special detail if it exists (blood stain, puddle of acid ..) mvwprintz( w_look, point( column, ++line ), cur.color(), cur.name() ); } } + // only display new line if there is items to show + int size = std::distance( tmpfield.begin(), tmpfield.end() ); + if( size > 0 ) { + mvwprintz( w_look, point( column, ++line ), c_white, "\n" ); + } } void game::print_trap_info( const tripoint &lp, const catacurses::window &w_look, const int column, @@ -5960,9 +5965,11 @@ void game::print_items_info( const tripoint &lp, const catacurses::window &w_loo _( "There's something there, but you can't see what it is." ) ); return; } else { - std::map item_names; + //loop through list of items, get their names and colored string + std::map> item_names; for( auto &item : m.i_at( lp ) ) { - ++item_names[item.tname()]; + ++item_names[item.tname()].first; + item_names[item.tname()].second = item.color_in_inventory(); } const int max_width = getmaxx( w_look ) - column - 1; @@ -5972,12 +5979,13 @@ void game::print_items_info( const tripoint &lp, const catacurses::window &w_loo break; } - if( it.second > 1 ) { - trim_and_print( w_look, point( column, ++line ), max_width, c_white, + if( it.second.first > 1 ) { + trim_and_print( w_look, point( column, ++line ), max_width, it.second.second, pgettext( "%s is the name of the item. %d is the quantity of that item.", "%s [%d]" ), - it.first.c_str(), it.second ); + it.first.c_str(), it.second.first ); } else { - trim_and_print( w_look, point( column, ++line ), max_width, c_white, it.first ); + // display colored item list in look_around window + trim_and_print( w_look, point( column, ++line ), max_width, it.second.second, it.first ); } } } diff --git a/src/monster.cpp b/src/monster.cpp index 0c3e76417bc7f..31de1a2e050e3 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -597,38 +597,68 @@ int monster::print_info( const catacurses::window &w, int vStart, int vLines, in { const int vEnd = vStart + vLines; - mvwprintz( w, point( column, vStart ), c_white, "%s ", name() ); + // display name + mvwprintz( w, point( column, vStart ), c_light_gray, _( "Entity : " ) ); + mvwprintz( w, point( column + 9, vStart ), c_white, name() ); const auto att = get_attitude(); - wprintz( w, att.second, att.first ); + std::string effects = get_effect_status(); + //size_t used_space = utf8_width( att.first ) + utf8_width( name() ) + 3; + size_t used_space = utf8_width( "Entity : " ) + utf8_width( name() ) + 3; + trim_and_print( w, point( used_space, vStart ), getmaxx( w ) - used_space - 2, + h_white, effects ); - if( debug_mode ) { - wprintz( w, c_light_gray, _( " Difficulty " ) + to_string( type->difficulty ) ); - } + // display health + nc_color color = c_white; + std::string sText; + get_HP_Bar( color, sText ); + mvwprintz( w, point( column, ++vStart ), c_light_gray, _( "Health : " ) ); + mvwprintz( w, point( column + 9, vStart ), color, sText ); + // display sense + std::string senses_str = "--"; if( sees( g->u ) ) { - mvwprintz( w, point( column, ++vStart ), c_yellow, _( "Aware of your presence!" ) ); + senses_str = _( "It is aware of your presence" ); + } else { + senses_str = _( "It hasn't noticed you" ); } - std::string effects = get_effect_status(); - size_t used_space = utf8_width( att.first ) + utf8_width( name() ) + 3; - trim_and_print( w, point( used_space, vStart++ ), getmaxx( w ) - used_space - 2, - h_white, effects ); + mvwprintz( w, point( column, ++vStart ), c_light_gray, _( "Senses : " ) ); + mvwprintz( w, point( column + 9, vStart ), sees( g->u ) ? c_red : c_green, senses_str ); - const auto hp_desc = hp_description( hp, type->hp ); - mvwprintz( w, point( column, vStart++ ), hp_desc.second, hp_desc.first ); - if( has_effect( effect_ridden ) && mounted_player ) { - mvwprintz( w, point( column, vStart++ ), c_white, _( "Rider: %s" ), mounted_player->disp_name() ); - } + // display stance + mvwprintz( w, point( column, ++vStart ), c_light_gray, _( "Stance : " ) ); + mvwprintz( w, point( column + 9, vStart ), att.second, att.first ); - if( size_bonus > 0 ) { - wprintz( w, c_light_gray, _( " It is %s." ), size_names.at( get_size() ) ); + // display threat + int threatlvl = type->difficulty; + nc_color threatlvl_color = c_white; + if( threatlvl >= 8 ) { + threatlvl_color = c_red; + } else if( threatlvl >= 4 ) { + threatlvl_color = c_yellow; + } else if( threatlvl >= 0 ) { + threatlvl_color = c_blue; } + mvwprintz( w, point( column, ++vStart ), c_light_gray, _( "Threat : " ) ); + mvwprintz( w, point( column + 9, vStart ), threatlvl_color, to_string( threatlvl ) ); + + // dipslay aspect + //mvwprintz( w, point( column, ++vStart ), c_light_gray, _( "Aspect :" ) ); + vStart++; std::vector lines = foldstring( type->get_description(), getmaxx( w ) - 1 - column ); int numlines = lines.size(); for( int i = 0; i < numlines && vStart <= vEnd; i++ ) { - mvwprintz( w, point( column, vStart++ ), c_white, lines[i] ); + mvwprintz( w, point( column, ++vStart ), c_white, lines[i] ); + } + + if( has_effect( effect_ridden ) && mounted_player ) { + mvwprintz( w, point( column, vStart++ ), c_white, _( "Rider: %s" ), mounted_player->disp_name() ); + } + + if( size_bonus > 0 ) { + wprintz( w, c_light_gray, _( " It is %s." ), size_names.at( get_size() ) ); } return vStart;