aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/CascRootFile_TVFS.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-06-23 10:25:18 +0200
committerShauren <shauren.trinity@gmail.com>2023-06-23 10:25:18 +0200
commit9ad1e5d635e2fd4c2486d5f2bf1cb52d8e768558 (patch)
tree00b379e3f84ff5b428f0fafd5bdeac0489ede0c4 /dep/CascLib/src/CascRootFile_TVFS.cpp
parent54596eb8ce5d7933164073eb3768f52124ba4262 (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@ebd79e8fd43279343c543a27fce620f6b1b53cb9
Diffstat (limited to 'dep/CascLib/src/CascRootFile_TVFS.cpp')
-rw-r--r--dep/CascLib/src/CascRootFile_TVFS.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/dep/CascLib/src/CascRootFile_TVFS.cpp b/dep/CascLib/src/CascRootFile_TVFS.cpp
index 52408bf6660..abcac60c5c2 100644
--- a/dep/CascLib/src/CascRootFile_TVFS.cpp
+++ b/dep/CascLib/src/CascRootFile_TVFS.cpp
@@ -105,8 +105,8 @@ struct TVFS_DIRECTORY_HEADER
// In-memory layout of the path table entry
typedef struct _TVFS_PATH_TABLE_ENTRY
{
- LPBYTE pbNamePtr; // Pointer to the begin of the node name
- LPBYTE pbNameEnd; // Pointer to the end of the file name
+ char * m_pNamePtr; // Pointer to the begin of the node name
+ char * m_pNameEnd; // Pointer to the end of the file name
DWORD NodeFlags; // TVFS_PTE_XXX
DWORD NodeValue; // Node value
} TVFS_PATH_TABLE_ENTRY, *PTVFS_PATH_TABLE_ENTRY;
@@ -156,8 +156,8 @@ struct TRootHandler_TVFS : public TFileTreeRoot
PathBuffer.AppendChar('/');
// Append the name fragment, if any
- if(PathEntry.pbNameEnd > PathEntry.pbNamePtr)
- PathBuffer.AppendStringN((const char *)PathEntry.pbNamePtr, (PathEntry.pbNameEnd - PathEntry.pbNamePtr), false);
+ if(PathEntry.m_pNameEnd > PathEntry.m_pNamePtr)
+ PathBuffer.AppendStringN(PathEntry.m_pNamePtr, (PathEntry.m_pNameEnd - PathEntry.m_pNamePtr), false);
// Append the postfix separator, if needed
if(PathEntry.NodeFlags & TVFS_PTE_PATH_SEPARATOR_POST)
@@ -312,8 +312,8 @@ struct TRootHandler_TVFS : public TFileTreeRoot
LPBYTE CapturePathEntry(TVFS_PATH_TABLE_ENTRY & PathEntry, LPBYTE pbPathTablePtr, LPBYTE pbPathTableEnd)
{
// Reset the path entry structure
- PathEntry.pbNamePtr = pbPathTablePtr;
- PathEntry.pbNameEnd = pbPathTablePtr;
+ PathEntry.m_pNamePtr = (char *)(pbPathTablePtr);
+ PathEntry.m_pNameEnd = (char *)(pbPathTablePtr);
PathEntry.NodeFlags = 0;
PathEntry.NodeValue = 0;
@@ -332,8 +332,8 @@ struct TRootHandler_TVFS : public TFileTreeRoot
if((pbPathTablePtr + nLength) > pbPathTableEnd)
return NULL;
- PathEntry.pbNamePtr = pbPathTablePtr;
- PathEntry.pbNameEnd = pbPathTablePtr + nLength;
+ PathEntry.m_pNamePtr = (char *)(pbPathTablePtr);
+ PathEntry.m_pNameEnd = (char *)(pbPathTablePtr + nLength);
pbPathTablePtr += nLength;
}
@@ -536,6 +536,11 @@ struct TRootHandler_TVFS : public TFileTreeRoot
}
}
+ //BREAKIF(strcmp((const char *)PathBuffer, "Base") == 0);
+ //BREAKIF(strcmp((const char *)PathBuffer, "base") == 0);
+ //BREAKIF(strcmp((const char *)PathBuffer, "base:ComplexTypeDescriptorSizes.dat") == 0);
+ //BREAKIF(strcmp((const char *)PathBuffer, "DivideAndConquer.w3m:war3map.doo") == 0);
+
// We need to check whether this is another TVFS directory file
if(IsVfsSubDirectory(hs, DirHeader, SubHeader, SpanEntry.EKey, SpanEntry.ContentSize) == ERROR_SUCCESS)
{