comparison DecorationList.cpp @ 2275:8193a64c7461

Слияние
author Ritor1
date Fri, 14 Mar 2014 09:32:42 +0600
parents 90f56da08d76 01489aec3cb0
children e2433db49428
comparison
equal deleted inserted replaced
2274:90f56da08d76 2275:8193a64c7461
64 unsigned __int8 v23; // zf@16 64 unsigned __int8 v23; // zf@16
65 char v24; // sf@16 65 char v24; // sf@16
66 unsigned __int8 v25; // of@16 66 unsigned __int8 v25; // of@16
67 int j; // edi@17 67 int j; // edi@17
68 const char *v27; // esi@18 68 const char *v27; // esi@18
69 int v28; // eax@19
70 int v29; // eax@21 69 int v29; // eax@21
71 int v30; // eax@23 70 int v30; // eax@23
72 int v31; // eax@25 71 int v31; // eax@25
73 int v32; // eax@27 72 int v32; // eax@27
74 int v33; // eax@29 73 int v33; // eax@29
222 v29 = (int)&v2->pDecorations[v2->uNumDecorations].uFlags; 221 v29 = (int)&v2->pDecorations[v2->uNumDecorations].uFlags;
223 *(char *)v29 |= 2u; 222 *(char *)v29 |= 2u;
224 } 223 }
225 } 224 }
226 else 225 else
227 { 226 v2->pDecorations[v2->uNumDecorations].uFlags |= 1;
228 v28 = (int)&v2->pDecorations[v2->uNumDecorations].uFlags;
229 *(char *)v28 |= 1u;
230 }
231 } 227 }
232 } 228 }
233 ++v2->uNumDecorations; 229 ++v2->uNumDecorations;
234 } 230 }
235 } 231 }
237 return 1; 233 return 1;
238 } 234 }
239 //----- (00458600) -------------------------------------------------------- 235 //----- (00458600) --------------------------------------------------------
240 void DecorationList::ToFile() 236 void DecorationList::ToFile()
241 { 237 {
242 DecorationList *v1; // esi@1
243 FILE *v2; // eax@1 238 FILE *v2; // eax@1
244 FILE *v3; // edi@1 239 FILE *v3; // edi@1
245 240
246 v1 = this;
247 v2 = fopen("data\\ddeclist.bin", "wb"); 241 v2 = fopen("data\\ddeclist.bin", "wb");
248 v3 = v2; 242 v3 = v2;
249 if ( !v2 ) 243 if ( !v2 )
250 Error("Unable to save ddeclist.bin!"); 244 Error("Unable to save ddeclist.bin!");
251 245
252 fwrite(v1, 4u, 1u, v2); 246 fwrite(this, 4, 1, v2);
253 fwrite(v1->pDecorations, 0x54u, v1->uNumDecorations, v3); 247 fwrite(this->pDecorations, 84, this->uNumDecorations, v3);
254 fclose(v3); 248 fclose(v3);
255 } 249 }
256 //----- (004488B6) -------------------------------------------------------- 250 //----- (004488B6) --------------------------------------------------------
257 unsigned __int16 DecorationList::GetDecorIdByName(const char *pName) 251 unsigned __int16 DecorationList::GetDecorIdByName(const char *pName)
258 { 252 {
259 DecorationList *v2; // esi@1 253 if ( pName && (signed int)this->uNumDecorations > 1 )
260 signed int uID; // edi@2 254 {
261 signed int v4; // ebx@3 255 for ( uint uID = 1; uID < (signed int)this->uNumDecorations; ++uID )
262 unsigned __int16 result; // ax@6
263
264 v2 = this;
265 if ( pName && (uID = 1, (signed int)this->uNumDecorations > 1) )
266 {
267 v4 = 1;
268 while ( _stricmp(pName, v2->pDecorations[v4].pName) )
269 { 256 {
270 ++uID; 257 if ( !_stricmp(pName, this->pDecorations[uID].pName) )
271 ++v4; 258 return uID;
272 if ( uID >= (signed int)v2->uNumDecorations )
273 return 0;
274 } 259 }
275 result = uID; 260 }
276 } 261 return 0;
277 else 262 }
278 {
279 result = 0;
280 }
281 return result;
282 }