Mercurial > mm7
diff DecorationList.cpp @ 2275:8193a64c7461
Слияние
author | Ritor1 |
---|---|
date | Fri, 14 Mar 2014 09:32:42 +0600 |
parents | 90f56da08d76 01489aec3cb0 |
children | e2433db49428 |
line wrap: on
line diff
--- a/DecorationList.cpp Fri Mar 14 09:32:25 2014 +0600 +++ b/DecorationList.cpp Fri Mar 14 09:32:42 2014 +0600 @@ -66,7 +66,6 @@ unsigned __int8 v25; // of@16 int j; // edi@17 const char *v27; // esi@18 - int v28; // eax@19 int v29; // eax@21 int v30; // eax@23 int v31; // eax@25 @@ -224,10 +223,7 @@ } } else - { - v28 = (int)&v2->pDecorations[v2->uNumDecorations].uFlags; - *(char *)v28 |= 1u; - } + v2->pDecorations[v2->uNumDecorations].uFlags |= 1; } } ++v2->uNumDecorations; @@ -239,44 +235,28 @@ //----- (00458600) -------------------------------------------------------- void DecorationList::ToFile() { - DecorationList *v1; // esi@1 FILE *v2; // eax@1 FILE *v3; // edi@1 - v1 = this; v2 = fopen("data\\ddeclist.bin", "wb"); v3 = v2; if ( !v2 ) Error("Unable to save ddeclist.bin!"); - fwrite(v1, 4u, 1u, v2); - fwrite(v1->pDecorations, 0x54u, v1->uNumDecorations, v3); + fwrite(this, 4, 1, v2); + fwrite(this->pDecorations, 84, this->uNumDecorations, v3); fclose(v3); } //----- (004488B6) -------------------------------------------------------- unsigned __int16 DecorationList::GetDecorIdByName(const char *pName) { - DecorationList *v2; // esi@1 - signed int uID; // edi@2 - signed int v4; // ebx@3 - unsigned __int16 result; // ax@6 - - v2 = this; - if ( pName && (uID = 1, (signed int)this->uNumDecorations > 1) ) + if ( pName && (signed int)this->uNumDecorations > 1 ) { - v4 = 1; - while ( _stricmp(pName, v2->pDecorations[v4].pName) ) + for ( uint uID = 1; uID < (signed int)this->uNumDecorations; ++uID ) { - ++uID; - ++v4; - if ( uID >= (signed int)v2->uNumDecorations ) - return 0; + if ( !_stricmp(pName, this->pDecorations[uID].pName) ) + return uID; } - result = uID; } - else - { - result = 0; - } - return result; + return 0; } \ No newline at end of file