mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-09 22:28:12 +00:00
37 lines
927 B
C++
37 lines
927 B
C++
#pragma once
|
|
|
|
#pragma push_macro("byte")
|
|
#pragma push_macro("GetNextSibling")
|
|
#pragma push_macro("GetFirstChild")
|
|
#undef byte
|
|
#undef GetNextSibling
|
|
#undef GetFirstChild
|
|
|
|
#include <RmlUi/Core/FileInterface.h>
|
|
|
|
// NOTE: pop_macro at end of file
|
|
|
|
class FileInterface_Game : public Rml::FileInterface
|
|
{
|
|
public:
|
|
FileInterface_Game();
|
|
~FileInterface_Game();
|
|
|
|
void SetAssetPath(const Rml::String& path) { m_asset_path = path; }
|
|
|
|
Rml::FileHandle Open(const Rml::String& path) override;
|
|
void Close(Rml::FileHandle file) override;
|
|
size_t Read(void* buffer, size_t size, Rml::FileHandle file) override;
|
|
bool Seek(Rml::FileHandle file, long offset, int origin) override;
|
|
size_t Tell(Rml::FileHandle file) override;
|
|
|
|
private:
|
|
static constexpr size_t MAX_OPEN_FILES = 32;
|
|
FILE* m_files[MAX_OPEN_FILES];
|
|
Rml::String m_asset_path;
|
|
};
|
|
|
|
#pragma pop_macro("GetFirstChild")
|
|
#pragma pop_macro("GetNextSibling")
|
|
#pragma pop_macro("byte")
|