2015-05-26 06:05:08 +02:00
|
|
|
#include "core/reference.h"
|
2014-08-02 03:10:38 +02:00
|
|
|
|
|
|
|
class FileAccess;
|
|
|
|
|
2015-05-26 06:05:08 +02:00
|
|
|
class PCKPacker : public Reference {
|
2014-08-02 03:10:38 +02:00
|
|
|
|
2015-05-26 06:05:08 +02:00
|
|
|
OBJ_TYPE(PCKPacker, Reference);
|
2014-08-02 03:10:38 +02:00
|
|
|
|
|
|
|
FileAccess* file;
|
|
|
|
int alignment;
|
|
|
|
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
struct File {
|
|
|
|
|
|
|
|
String path;
|
|
|
|
String src_path;
|
|
|
|
int size;
|
|
|
|
uint64_t offset_offset;
|
|
|
|
};
|
|
|
|
Vector<File> files;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Error pck_start(const String& p_file, int p_alignment);
|
|
|
|
Error add_file(const String& p_file, const String& p_src);
|
|
|
|
Error flush(bool p_verbose = false);
|
|
|
|
|
|
|
|
|
|
|
|
PCKPacker();
|
|
|
|
~PCKPacker();
|
|
|
|
};
|