mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 21:39:48 +00:00
PKR_LockFile
This commit is contained in:
parent
816d950ae9
commit
056bb46b5e
14
pkr.cpp
14
pkr.cpp
@ -13,6 +13,20 @@ LIBPKR_HANDLE* gDataPkr;
|
||||
// @NB: the original was built as library and built in debug mode, I won't do the same
|
||||
// too much hassle for little gain
|
||||
|
||||
// @Ok
|
||||
u8 PKR_LockFile(LIBPKR_HANDLE* pHandle)
|
||||
{
|
||||
if (pHandle->fp)
|
||||
return 1;
|
||||
|
||||
pHandle->fp = fopen(pHandle->name, "rb+");
|
||||
if (pHandle->fp)
|
||||
return 1;
|
||||
|
||||
PKR_ReportError("PKR_UnlockFile: Error cannot open %s", &pHandle->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
u8 fileAddToPKR(LIBPKR_HANDLE*, PKR_FILEINFO, PKR_DIRINFO*, char*)
|
||||
{
|
||||
|
1
pkr.h
1
pkr.h
@ -67,6 +67,7 @@ EXPORT u8* PKRComp_DecompressFile(PKR_FILEINFO*, u8*, i32);
|
||||
EXPORT u8 PKR_UnlockFile(LIBPKR_HANDLE* fp);
|
||||
EXPORT u8 PKR_Open(LIBPKR_HANDLE**, const char*, i32);
|
||||
EXPORT u8 PKR_GetLastError(char*);
|
||||
EXPORT u8 PKR_LockFile(LIBPKR_HANDLE*);
|
||||
|
||||
EXPORT u8 dirAddToPKR(LIBPKR_HANDLE*, PKR_DIRINFO);
|
||||
EXPORT u8 fileAddToPKR(LIBPKR_HANDLE*, PKR_FILEINFO, PKR_DIRINFO*, char*);
|
||||
|
Loading…
Reference in New Issue
Block a user