diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-12-19 00:01:17 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-12-22 12:47:40 +0100 |
| commit | c736e13c7dd04bfa6c0580a4db3d6501dc28eed1 (patch) | |
| tree | 04d1b490f710b0ed956e8f43d620ed6f846b8cf2 /src/irrlicht/RezFileList.h | |
| parent | e2f9ee3f8cd319e952e4f5d5ec466f0ea9e6e77f (diff) | |
| download | globalops-irrlicht.tar.gz | |
Irrlichtirrlicht
Diffstat (limited to 'src/irrlicht/RezFileList.h')
| -rw-r--r-- | src/irrlicht/RezFileList.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/irrlicht/RezFileList.h b/src/irrlicht/RezFileList.h new file mode 100644 index 0000000..a5ce077 --- /dev/null +++ b/src/irrlicht/RezFileList.h @@ -0,0 +1,35 @@ +#ifndef REZFILELIST_H +#define REZFILELIST_H + +#include <rez.h> +#include <irrlicht.h> +#include <vector> + +class RezFileList : public irr::io::IFileList +{ +public: + RezFileList(const rez::ball &rez); + virtual irr::u32 getFileCount() const; + virtual const irr::io::path &getFileName(irr::u32 index) const; + virtual const irr::io::path &getFullFileName(irr::u32 index) const; + virtual irr::u32 getFileSize(irr::u32 index) const; + virtual irr::u32 getFileOffset(irr::u32 index) const; + virtual irr::u32 getID(irr::u32 index) const; + virtual bool isDirectory(irr::u32 index) const; + virtual irr::s32 findFile(const irr::io::path &filename, bool isFolder) const; + virtual const irr::io::path &getPath() const; + virtual irr::u32 addItem(const irr::io::path& fullPath, irr::u32 offset, + irr::u32 size, bool isDirectory, irr::u32 id); + virtual void sort(); + +protected: + const rez::ball &rez; + +private: + irr::u32 getFileCount(const rez::dir &dir) const; + int findFile(const irr::io::path &filename, bool isFolder, + const rez::dir::direntry *entry) const; + mutable std::vector<const rez::dir::direntry *> entries; +}; + +#endif |
