SIEdit/lib/object.h

74 lines
1.6 KiB
C
Raw Normal View History

2022-07-11 00:16:20 -04:00
#ifndef OBJECT_H
#define OBJECT_H
#include "core.h"
2022-07-17 21:51:16 -04:00
#include "sitypes.h"
2022-07-11 00:16:20 -04:00
#include "types.h"
namespace si {
class Object : public Core
{
public:
2022-07-11 12:05:28 -04:00
typedef std::vector<bytearray> ChunkedData;
2022-07-11 11:04:47 -04:00
2022-07-11 00:16:20 -04:00
Object();
2022-07-18 03:27:00 -04:00
#if defined(_WIN32)
LIBWEAVER_EXPORT bool ReplaceWithFile(const wchar_t *f);
LIBWEAVER_EXPORT bool ExtractToFile(const wchar_t *f) const;
#endif
2022-07-11 11:04:47 -04:00
2022-07-18 03:27:00 -04:00
LIBWEAVER_EXPORT bool ReplaceWithFile(const char *f);
LIBWEAVER_EXPORT bool ExtractToFile(const char *f) const;
2022-07-11 11:04:47 -04:00
2022-07-18 14:25:00 -04:00
LIBWEAVER_EXPORT bool ReplaceWithFile(FileBase *f);
LIBWEAVER_EXPORT bool ExtractToFile(FileBase *f) const;
2022-07-18 03:27:00 -04:00
LIBWEAVER_EXPORT bytearray ExtractToMemory() const;
2022-07-11 11:04:47 -04:00
LIBWEAVER_EXPORT const bytearray &GetFileHeader() const;
2022-07-11 11:04:47 -04:00
LIBWEAVER_EXPORT bytearray GetFileBody() const;
LIBWEAVER_EXPORT size_t GetFileBodySize() const;
2022-07-11 00:16:20 -04:00
2022-07-11 17:19:36 -04:00
const MxOb::Type &type() const { return type_; }
2022-07-11 04:48:20 -04:00
const MxOb::FileType &filetype() const { return filetype_; }
const uint32_t &id() const { return id_; }
const std::string &name() const { return name_; }
const std::string &filename() const { return filename_; }
2022-07-11 11:04:47 -04:00
const ChunkedData &data() const { return data_; }
2022-07-11 04:48:20 -04:00
Object *FindSubObjectWithID(uint32_t id);
2022-07-11 00:16:20 -04:00
MxOb::Type type_;
std::string presenter_;
uint32_t unknown1_;
std::string name_;
uint32_t id_;
uint32_t flags_;
uint32_t unknown4_;
uint32_t duration_;
uint32_t loops_;
Vector3 position_;
Vector3 direction_;
Vector3 up_;
bytearray extra_;
std::string filename_;
uint32_t unknown26_;
uint32_t unknown27_;
uint32_t unknown28_;
2022-07-11 04:48:20 -04:00
MxOb::FileType filetype_;
2022-07-11 00:16:20 -04:00
uint32_t unknown29_;
uint32_t unknown30_;
uint32_t unknown31_;
2022-07-11 11:04:47 -04:00
ChunkedData data_;
2022-07-11 00:16:20 -04:00
2022-07-18 03:27:00 -04:00
private:
2022-07-11 00:16:20 -04:00
};
}
#endif // OBJECT_H