@@ -887,12 +887,10 @@ namespace
887887 }
888888
889889 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 );
892890 const char * subTypeName = lookupBuildingSubtype (b->building .type , b->building .info ->subtype );
893891 draw_textf_border (font, uiColor (1 ), 2 , (i++ * fontHeight), 0 ,
894892 " Building: %s %s" ,
895- subTypeName != " NA" ? subTypeName : " " ,
893+ std::string ( subTypeName) != " NA" ? subTypeName : " " ,
896894 ENUM_KEY_STR (building_type, (df::building_type)b->building .type ).c_str ());
897895 for (size_t index = 0 ; index < b->building .constructed_mats .size (); index++) {
898896 const char * partMatName = lookupMaterialTypeName (b->building .constructed_mats [index].matt .type );
@@ -910,7 +908,6 @@ namespace
910908 mat.decode (b->material .type , b->material .index );
911909 if (mat.isValid ())
912910 {
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 );
914911 draw_textf_border (font, uiColor (1 ), 2 , (i++ * fontHeight), 0 ,
915912 " Tile: %s %s" , mat.material ->state_name [0 ].c_str (), DFHack::enum_item_key_str (b->tileType ));
916913 }
0 commit comments