123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- #include "CFTTFileSystem.h"
- #include "CFTTFile_Buffered.h"
- #include "memctrl.h"
- CFTTFileSystem* g_pFTTFileSystem = nullptr; //005CB398
- CFTTFileSystem* g_pPackageFileSystem = nullptr; //005CB39C
- CFTTFileSystem* g_pTempFileSystem = nullptr; //005CB3A0
- CFTTFileSystem* g_pDocsFileSystem = nullptr; //005CB3A4
- CFTTFileSystem* g_pCachesFileSystem = nullptr; //005CB3A8
- CFTTFileSystem* g_pSupportFileSystem = nullptr; //005CB3AC
- CFTTFileSystem* g_pAndroidAPKXFileSystem = nullptr; //005CB3B0
- FileSystemNode* CFTTFileSystem::ms_pFileSystems = nullptr; //005CB3B4 CFTTFileSystem::Register 中增加FileSystem 结点
- char byte_5CB3B8[64]; //005CB3B8
- //-------------------------------------------------------------------------------------------------
- // CFTTFileSystem::CFTTFileSystem(char* a2, char* ptype) {
- // }
- //-------------------------------------------------------------------------------------------------
- //002213EC 00265852 //^_^
- CFTTFileSystem::~CFTTFileSystem() {
- Deregister(this, nullptr);
- }
- //-------------------------------------------------------------------------------------------------
- //00221D22 //^_^
- bool CFTTFileSystem::GetAbsoluteFilename(char const* filepath,
- char* pOutputName,
- uint outpue_len) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //00263FF2 //^_^
- EFTTError CFTTFileSystem::Delete(char const* a1) {
- return (EFTTError)0xE;
- }
- //-------------------------------------------------------------------------------------------------
- //00221D26 //^_^
- EFTTError CFTTFileSystem::Rename(char const* a1, char const* a2, CFTTFileSystem* a3) {
- return (EFTTError)0x14;
- }
- //-------------------------------------------------------------------------------------------------
- //00221D2A //^_^
- EFTTError CFTTFileSystem::Copy(char const* a1, char const* a2, bool a3) {
- return (EFTTError)0x14;
- }
- //-------------------------------------------------------------------------------------------------
- //00263FF6 //^_^
- EFTTError CFTTFileSystem::OpenDir(char const* a1, CFTTFileIterator** ppFileIt) {
- return (EFTTError)0xE;
- }
- //-------------------------------------------------------------------------------------------------
- //00263FFA //^_^
- bool CFTTFileSystem::FileExistsFS(char const* a1) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //0026400E //^_^
- EFTTError CFTTFileSystem::GetAttributesFS(char const* filepath, TFTTFileAttributes* pAttr) {
- EFTTError eRet;
- //loc_264056
- return eRet;
- }
- //-------------------------------------------------------------------------------------------------
- //00263FEE //^_^
- void CFTTFileSystem::SetErrorCallback(EFTTErrorCallback errfunc) {
- errFunc_4 = errfunc;
- }
- //-------------------------------------------------------------------------------------------------
- //00263FDE //^_^
- EFTTError CFTTFileSystem::Error(EFTTError derr, int a2, CFTTFile* pFile3, char const* pBuf4) {
- EFTTError e;
- return e;
- }
- //-------------------------------------------------------------------------------------------------
- //00263BFC //^_^
- bool CFTTFileSystem::FileExists(char const* filepath) {
- //loc_263C4E
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //00263AF8 //^_^
- CFTTFileSystem* CFTTFileSystem::FindFileSystem(char const* filetype) {
- LOGE("FindFileSystem%s",filetype);
- return (CFTTFileSystem*)rand();
- }
- //-------------------------------------------------------------------------------------------------
- //00263D70 //^_^
- EFTTError CFTTFileSystem::GetAttributes(char const* filepath, TFTTFileAttributes* pAttr) {
- //loc_263DC8
- return (EFTTError)0x11;
- }
- //-------------------------------------------------------------------------------------------------
- //00263B44 //^_- 经过单元测试,功能正常
- uint CFTTFileSystem::GetModeFlags(char const* fmod) {
- uint dret = 0;
- return dret;
- }
- //-------------------------------------------------------------------------------------------------
- //00263BA4 //^_^
- const char* CFTTFileSystem::GetModeString(int dMod) {
- const char* result; // r0
- return result;
- }
- //-------------------------------------------------------------------------------------------------
- //00263830 //^_^
- void CFTTFileSystem::Register(CFTTFileSystem* pFileSystem, char const* ptype) {
- }
- //-------------------------------------------------------------------------------------------------
- //00263AB8 //^_^ static
- void CFTTFileSystem::Deregister(char const* ptype) {
- }
- //-------------------------------------------------------------------------------------------------
- //00263A6C //^_^
- void CFTTFileSystem::Deregister(CFTTFileSystem* pFileSystem, char const* ptype) {
- }
- //-------------------------------------------------------------------------------------------------
- //00263DD8 经过单元测试,功能正常
- //原始函数处理字符串太啰嗦,我理解后自己写的功能完全相同的逻辑
- char* CFTTFileSystem::TidyFilename(char const* file0,
- char const* path1,
- char c2,
- EFTTMemHeapID eID3,
- bool b4) {
- return nullptr;
- }
- //-------------------------------------------------------------------------------------------------
- //00263EDC 单元测试,没有调用到这个函数,暂时无法实际验证,但上逻辑与上一个函数完全相同
- char16_t* CFTTFileSystem::TidyFilename(char const* file0,
- wchar_t const* a_wpath1,
- wchar_t a_wc2,
- EFTTMemHeapID eID3,
- bool b4) {
- return nullptr;
- }
- //-------------------------------------------------------------------------------------------------
- //00263D54 //^_^
- //CFTTFileSystem::fopen("PKG:/Data/anims/anims.pak", "rb", 0);
- CFTTFile* CFTTFileSystem::fopen(char const* filepath, char const* pmod, EFTTMemHeapID eHeapID) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00263C60 //-_- 经过单元测试,功能正常不
- CFTTFile* CFTTFileSystem::fopen(char const* filepath, uint dMod, EFTTMemHeapID eHeapID) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
|