@@ -53,11 +53,11 @@ void CTextureDescrMngr::LoadLTX(pcstr initial, bool listTHM)
53
53
const auto processAssociation = [&](const CInifile::Item& item)
54
54
{
55
55
if (listTHM)
56
- Msg (" \t\t %s = %s" , item.first .c_str (), item.second .c_str ());
56
+ Msg (" \t\t %s = %s" , item.name .c_str (), item.value .c_str ());
57
57
58
58
lock.Enter ();
59
- texture_desc& desc = m_texture_details[item.first ];
60
- cl_dt_scaler*& dts = m_detail_scalers[item.first ];
59
+ texture_desc& desc = m_texture_details[item.name ];
60
+ cl_dt_scaler*& dts = m_detail_scalers[item.name ];
61
61
lock.Leave ();
62
62
63
63
if (desc.m_assoc )
@@ -68,19 +68,19 @@ void CTextureDescrMngr::LoadLTX(pcstr initial, bool listTHM)
68
68
string_path T;
69
69
float s;
70
70
71
- const int res = sscanf (*item.second , " %[^,],%f" , T, &s);
72
- R_ASSERT4 (res == 2 , " Bad texture association" , item.first .c_str (), fname);
71
+ const int res = sscanf (*item.value , " %[^,],%f" , T, &s);
72
+ R_ASSERT4 (res == 2 , " Bad texture association" , item.name .c_str (), fname);
73
73
desc.m_assoc ->detail_name = T;
74
74
if (dts)
75
75
dts->scale = s;
76
76
else
77
77
dts = xr_new<cl_dt_scaler>(s);
78
78
79
- if (strstr (item.second .c_str (), " usage[diffuse_or_bump]" ))
79
+ if (strstr (item.value .c_str (), " usage[diffuse_or_bump]" ))
80
80
desc.m_assoc ->usage .set (texture_assoc::flDiffuseDetail | texture_assoc::flBumpDetail);
81
- else if (strstr (item.second .c_str (), " usage[bump]" ))
81
+ else if (strstr (item.value .c_str (), " usage[bump]" ))
82
82
desc.m_assoc ->usage .set (texture_assoc::flBumpDetail);
83
- else if (strstr (item.second .c_str (), " usage[diffuse]" ))
83
+ else if (strstr (item.value .c_str (), " usage[diffuse]" ))
84
84
desc.m_assoc ->usage .set (texture_assoc::flDiffuseDetail);
85
85
};
86
86
xr_parallel_for_each (data.Data , processAssociation);
@@ -97,10 +97,10 @@ void CTextureDescrMngr::LoadLTX(pcstr initial, bool listTHM)
97
97
const auto processSpecification = [&](const CInifile::Item& item)
98
98
{
99
99
if (listTHM)
100
- Msg (" \t\t %s = %s" , item.first .c_str (), item.second .c_str ());
100
+ Msg (" \t\t %s = %s" , item.name .c_str (), item.value .c_str ());
101
101
102
102
lock.Enter ();
103
- texture_desc& desc = m_texture_details[item.first ];
103
+ texture_desc& desc = m_texture_details[item.name ];
104
104
lock.Leave ();
105
105
106
106
if (desc.m_spec )
@@ -110,8 +110,8 @@ void CTextureDescrMngr::LoadLTX(pcstr initial, bool listTHM)
110
110
111
111
string_path bmode;
112
112
const int res =
113
- sscanf (item.second .c_str (), " bump_mode[%[^]]], material[%f]" , bmode, &desc.m_spec ->m_material );
114
- R_ASSERT4 (res == 2 , " Bad texture specification" , item.first .c_str (), fname);
113
+ sscanf (item.value .c_str (), " bump_mode[%[^]]], material[%f]" , bmode, &desc.m_spec ->m_material );
114
+ R_ASSERT4 (res == 2 , " Bad texture specification" , item.name .c_str (), fname);
115
115
if ((bmode[0 ] == ' u' ) && (bmode[1 ] == ' s' ) && (bmode[2 ] == ' e' ) && (bmode[3 ] == ' :' ))
116
116
{
117
117
// bump-map specified
0 commit comments