mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-10-06 18:23:23 +00:00
FileIO_FileExists
This commit is contained in:
parent
cea681558e
commit
a41e594c33
15
dcfileio.cpp
15
dcfileio.cpp
@ -1,6 +1,7 @@
|
||||
#include "dcfileio.h"
|
||||
#include "pcdcFile.h"
|
||||
|
||||
EXPORT volatile int gFileIOStatus;
|
||||
EXPORT volatile i32 gFileIOStatus;
|
||||
|
||||
// @SMALLTODO
|
||||
void DebugPrintfX(char *,...)
|
||||
@ -8,10 +9,16 @@ void DebugPrintfX(char *,...)
|
||||
printf("DebugPrintfX(char *,...)");
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
void FileIO_FileExists(char const *)
|
||||
// @Ok
|
||||
// @Matching
|
||||
u8 FileIO_FileExists(const char* pFileName)
|
||||
{
|
||||
printf("FileIO_FileExists(char const *)");
|
||||
print_if_false(gFileIOStatus == 0, "Previous file not finished loading");
|
||||
HANDLE handle = gdFsOpen(pFileName, 0);
|
||||
if (!handle)
|
||||
return 0;
|
||||
gdFsClose(handle);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
EXPORT void FileIO_Sync(void);
|
||||
EXPORT void DebugPrintfX(char *,...);
|
||||
EXPORT void FileIO_FileExists(char const *);
|
||||
EXPORT u8 FileIO_FileExists(const char *);
|
||||
EXPORT void FileIO_Init(void);
|
||||
EXPORT void FileIO_Load(void *);
|
||||
EXPORT i32 FileIO_Open(const char *);
|
||||
|
@ -17,6 +17,13 @@ EXPORT SGDOpenFile gOpenFiles[MAX_OPEN_FILE_COUNT];
|
||||
|
||||
EXPORT HANDLE gOpenFile;
|
||||
|
||||
// @SMALLTODO
|
||||
HANDLE gdFsOpen(const char*, i32)
|
||||
{
|
||||
printf("HANDLE gdFsOpen(const char*)");
|
||||
return reinterpret_cast<HANDLE>(0x21082024);
|
||||
}
|
||||
|
||||
// @Ok
|
||||
// @Matching
|
||||
void gdFsClose(HANDLE handle)
|
||||
@ -126,7 +133,7 @@ INLINE i32 nextFile(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
// @Ok
|
||||
i32 openFilePKR(char * a1,const char* a2)
|
||||
{
|
||||
i32 nFile = nextFile();
|
||||
|
@ -30,6 +30,7 @@ EXPORT void seekFilePKR(i32,i32,i32);
|
||||
EXPORT void tellFilePKR(i32);
|
||||
|
||||
EXPORT void gdFsClose(HANDLE);
|
||||
EXPORT HANDLE gdFsOpen(const char*, i32);
|
||||
|
||||
EXPORT i32 gdFsInit(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user