@@ -775,7 +775,6 @@ namespace
775775 using df::global::plotinfo;
776776 auto font = stonesenseState.font ;
777777 auto fontHeight = al_get_font_line_height (font);
778- auto & contentLoader = stonesenseState.contentLoader ;
779778
780779 // get tile info
781780 Tile* b = segment->getTile (
@@ -887,12 +886,10 @@ namespace
887886 }
888887
889888 if (b->building .info && b->building .type != BUILDINGTYPE_NA && b->building .type != BUILDINGTYPE_BLACKBOX && b->building .type != BUILDINGTYPE_TREE) {
890- const char * matName = lookupMaterialTypeName (b->building .info ->material .type );
891- const char * subMatName = lookupMaterialName (b->building .info ->material .type , b->building .info ->material .index );
892889 const char * subTypeName = lookupBuildingSubtype (b->building .type , b->building .info ->subtype );
893890 draw_textf_border (font, uiColor (1 ), 2 , (i++ * fontHeight), 0 ,
894891 " Building: %s %s" ,
895- subTypeName != " NA" ? subTypeName : " " ,
892+ std::string ( subTypeName) != " NA" ? subTypeName : " " ,
896893 ENUM_KEY_STR (building_type, (df::building_type)b->building .type ).c_str ());
897894 for (size_t index = 0 ; index < b->building .constructed_mats .size (); index++) {
898895 const char * partMatName = lookupMaterialTypeName (b->building .constructed_mats [index].matt .type );
@@ -910,7 +907,6 @@ namespace
910907 mat.decode (b->material .type , b->material .index );
911908 if (mat.isValid ())
912909 {
913- ALLEGRO_COLOR color = al_map_rgb_f (contentLoader->Mats ->color [mat.material ->state_color [0 ]].red , contentLoader->Mats ->color [mat.material ->state_color [0 ]].green , contentLoader->Mats ->color [mat.material ->state_color [0 ]].blue );
914910 draw_textf_border (font, uiColor (1 ), 2 , (i++ * fontHeight), 0 ,
915911 " Tile: %s %s" , mat.material ->state_name [0 ].c_str (), DFHack::enum_item_key_str (b->tileType ));
916912 }
0 commit comments