From cd720efbfa60f434f420ab66e220eca742c48e45 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 10 Aug 2019 19:01:24 +0200 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@b91f87c770c78340dcd96df970e55b5c0469e884 --- dep/CascLib/src/CascRootFile_Text.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'dep/CascLib/src/CascRootFile_Text.cpp') diff --git a/dep/CascLib/src/CascRootFile_Text.cpp b/dep/CascLib/src/CascRootFile_Text.cpp index e78b0bf086f..7662f85d86d 100644 --- a/dep/CascLib/src/CascRootFile_Text.cpp +++ b/dep/CascLib/src/CascRootFile_Text.cpp @@ -49,16 +49,16 @@ struct TRootHandler_SC1 : public TFileTreeRoot return bResult; } - int Load(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbRootFile) + DWORD Load(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbRootFile) { PCASC_CKEY_ENTRY pCKeyEntry; CASC_CSV Csv(0, false); BYTE CKey[MD5_HASH_SIZE]; - int nError; + DWORD dwErrCode; // Parse the ROOT file first in order to see whether we have the correct format - nError = Csv.Load(pbRootFile, cbRootFile); - if(nError == ERROR_SUCCESS) + dwErrCode = Csv.Load(pbRootFile, cbRootFile); + if(dwErrCode == ERROR_SUCCESS) { // Parse all lines while(Csv.LoadNextLine()) @@ -79,7 +79,7 @@ struct TRootHandler_SC1 : public TFileTreeRoot } } - return nError; + return dwErrCode; } }; @@ -93,10 +93,10 @@ struct TRootHandler_SC1 : public TFileTreeRoot // locales/zhCN/Assets/sound/terran/ghost/tghdth01.wav|6637ed776bd22089e083b8b0b2c0374c // -int RootHandler_CreateStarcraft1(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbRootFile) +DWORD RootHandler_CreateStarcraft1(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbRootFile) { TRootHandler_SC1 * pRootHandler = NULL; - int nError = ERROR_BAD_FORMAT; + DWORD dwErrCode = ERROR_BAD_FORMAT; // Verify whether this looks like a Starcraft I root file if(TRootHandler_SC1::IsRootFile(pbRootFile, cbRootFile)) @@ -106,8 +106,8 @@ int RootHandler_CreateStarcraft1(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbR if(pRootHandler != NULL) { // Load the root directory. If load failed, we free the object - nError = pRootHandler->Load(hs, pbRootFile, cbRootFile); - if(nError != ERROR_SUCCESS) + dwErrCode = pRootHandler->Load(hs, pbRootFile, cbRootFile); + if(dwErrCode != ERROR_SUCCESS) { delete pRootHandler; pRootHandler = NULL; @@ -117,5 +117,5 @@ int RootHandler_CreateStarcraft1(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbR // Assign the root directory (or NULL) and return error hs->pRootHandler = pRootHandler; - return nError; + return dwErrCode; } -- cgit v1.2.3