2018-10-24 23:31:26 +11:00
|
|
|
#ifndef XIV_DAT_FILE_H
|
|
|
|
#define XIV_DAT_FILE_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2019-10-14 18:41:16 +11:00
|
|
|
#include <filesystem>
|
2018-10-24 23:31:26 +11:00
|
|
|
#include <stdint.h>
|
|
|
|
#include "bparse.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace xiv
|
|
|
|
{
|
|
|
|
namespace dat
|
|
|
|
{
|
|
|
|
enum class FileType : uint32_t
|
|
|
|
{
|
|
|
|
empty = 1,
|
|
|
|
standard = 2,
|
|
|
|
model = 3,
|
|
|
|
texture = 4,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace xiv
|
|
|
|
{
|
|
|
|
namespace dat
|
|
|
|
{
|
|
|
|
|
|
|
|
class Dat;
|
|
|
|
|
|
|
|
// Basic file from the dats
|
|
|
|
class File
|
|
|
|
{
|
|
|
|
friend class Dat;
|
|
|
|
public:
|
|
|
|
File();
|
|
|
|
~File();
|
|
|
|
|
|
|
|
FileType get_type() const;
|
|
|
|
|
|
|
|
// Getters functions for the data in the file
|
|
|
|
const std::vector<std::vector<char>>& get_data_sections() const;
|
|
|
|
std::vector<std::vector<char>>& access_data_sections();
|
|
|
|
|
2019-10-14 18:41:16 +11:00
|
|
|
void exportToFile( const std::filesystem::path& i_path ) const;
|
2018-10-24 23:31:26 +11:00
|
|
|
|
|
|
|
protected:
|
|
|
|
FileType _type;
|
|
|
|
std::vector<std::vector<char>> _data_sections;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // XIV_DAT_FILE_H
|