mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-08 23:41:06 +00:00
[vfs #1] Add ttvfs, miniz, and minihttp sources
This commit is contained in:
parent
99e3f5ebe2
commit
a90f57afb0
36 changed files with 10047 additions and 0 deletions
32
ExternalLibs/ttvfs/VFSBase.cpp
Normal file
32
ExternalLibs/ttvfs/VFSBase.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
// VFSBase.cpp - common code for VFSDir and VFSFile
|
||||
// For conditions of distribution and use, see copyright notice in VFS.h
|
||||
|
||||
#include "VFSBase.h"
|
||||
#include "VFSInternal.h"
|
||||
#include "VFSTools.h"
|
||||
|
||||
VFS_NAMESPACE_START
|
||||
|
||||
VFSBase::VFSBase()
|
||||
: ref(this)
|
||||
#ifdef VFS_USE_HASHMAP
|
||||
, _hash(0)
|
||||
#endif
|
||||
, _origin(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
// call this only with a lock held!
|
||||
void VFSBase::_setName(const char *n)
|
||||
{
|
||||
if(!n)
|
||||
return;
|
||||
_fullname = FixPath(n);
|
||||
_name = PathToFileName(_fullname.c_str());
|
||||
#ifdef VFS_USE_HASHMAP
|
||||
_hash = STRINGHASH(_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
VFS_NAMESPACE_END
|
Loading…
Add table
Add a link
Reference in a new issue