2025-12-29 02:35:05 +09:00
|
|
|
#ifndef STORM_FILE_HPP
|
|
|
|
|
#define STORM_FILE_HPP
|
|
|
|
|
|
|
|
|
|
#include "storm/Core.hpp"
|
2025-12-28 12:43:36 -06:00
|
|
|
#include "storm/Handle.hpp"
|
|
|
|
|
#include <cstdint>
|
2025-12-29 02:35:05 +09:00
|
|
|
|
|
|
|
|
#if defined(WHOA_SYSTEM_WIN)
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-12-28 12:43:36 -06:00
|
|
|
DECLARE_STORM_HANDLE(HSARCHIVE);
|
|
|
|
|
DECLARE_STORM_HANDLE(HSFILE);
|
|
|
|
|
|
|
|
|
|
int32_t STORMAPI SFileOpenArchive(const char* archivename, int32_t priority, uint32_t flags, HSARCHIVE* handle);
|
|
|
|
|
|
|
|
|
|
int32_t STORMAPI SFileCloseArchive(HSARCHIVE handle);
|
|
|
|
|
|
|
|
|
|
int32_t STORMAPI SFileOpenFileEx(HSARCHIVE archivehandle, const char* filename, uint32_t flags, HSFILE* handle);
|
|
|
|
|
|
|
|
|
|
int32_t STORMAPI SFileReadFile(HSFILE handle, void* buffer, uint32_t bytestoread, uint32_t* bytesread, LPOVERLAPPED overlapped);
|
|
|
|
|
|
|
|
|
|
uint32_t STORMAPI SFileGetFileSize(HSFILE handle, uint32_t* filesizehigh);
|
|
|
|
|
|
|
|
|
|
uint32_t STORMAPI SFileSetFilePointer(HSFILE handle, int32_t distancetomove, int32_t* distancetomovehigh, uint32_t movemethod);
|
|
|
|
|
|
|
|
|
|
int32_t STORMAPI SFileCloseFile(HSFILE handle);
|
2025-12-29 02:35:05 +09:00
|
|
|
|
|
|
|
|
#endif
|