Mercurial > might-and-magic-trilogy
diff LOD.cpp @ 134:6d1f537a1346
Слияние
author | Ritor1 |
---|---|
date | Tue, 13 Nov 2012 20:40:21 +0600 |
parents | 8981a63bb559 a64b244da76c |
children | f07a29f328e8 |
line wrap: on
line diff
--- a/LOD.cpp Tue Nov 13 20:37:07 2012 +0600 +++ b/LOD.cpp Tue Nov 13 20:40:21 2012 +0600 @@ -995,34 +995,32 @@ _6A0CA8_lod_unused = 0; } } -// 6A0CA8: using guessed type int 6A0CA8_lod_unused; + + //----- (00461492) -------------------------------------------------------- int LODWriteableFile::_461492(LOD::FileHeader *pHeader, LOD::Directory *pDir, const char *Source) { - LODWriteableFile *v4; // esi@1 - FILE *v6; // eax@5 - - v4 = this; - if ( this->isFileOpened ) + if (isFileOpened) return 1; if ( !pDir->pFilename[0] ) return 2; - strcpy((char *)pHeader, "LOD"); + strcpy(pHeader->pSignature, "LOD"); pHeader->dword_0000A4 = 100; pHeader->uNumIndices = 1; pDir->pFilename[15] = 0; pDir->uDataSize = 0; pDir->uOfsetFromSubindicesStart = 288; - strcpy((char *)v4->pLODName, Source); - v6 = fopen((const char *)v4->pLODName, "wb+"); - v4->pFile = v6; - if ( !v6 ) + strcpy(pLODName, Source); + + pFile = fopen(pLODName, "wb+"); + if (!pFile) return 3; - fwrite(pHeader, 0x100, 1, v6); - fwrite(pDir, 0x20, 1, v4->pFile); - fclose(v4->pFile); - v4->pFile = 0; + + fwrite(pHeader, 0x100, 1, pFile); + fwrite(pDir, 0x20, 1, pFile); + fclose(pFile); + pFile = 0; return 0; } @@ -1645,6 +1643,7 @@ // 6A0CA8: using guessed type int 6A0CA8_lod_unused; +//----- (00461B48) -------------------------------------------------------- unsigned int LODWriteableFile::Write(const LOD::Directory *pDir, const void *pDirData, int a4) { //LODWriteableFile *v4; // ebx@1