2021-04-30 21:23:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <vector>
|
|
|
|
#include "ZResource.h"
|
|
|
|
|
|
|
|
class ZBackground : public ZResource
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::vector<uint8_t> data;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ZBackground(ZFile* nParent);
|
2021-07-28 02:16:03 +00:00
|
|
|
|
2021-04-30 21:23:22 +00:00
|
|
|
void ParseBinaryFile(const std::string& inFolder, bool appendOutName);
|
|
|
|
|
2021-10-17 11:32:09 +00:00
|
|
|
void ParseRawData() override;
|
2021-04-30 21:23:22 +00:00
|
|
|
|
2021-10-17 11:32:09 +00:00
|
|
|
Declaration* DeclareVar(const std::string& prefix, const std::string& bodyStr) override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
std::string GetDefaultName(const std::string& prefix) const override;
|
2021-04-30 21:23:22 +00:00
|
|
|
|
2021-05-30 15:09:59 +00:00
|
|
|
void Save(const fs::path& outFolder) override;
|
2021-04-30 21:23:22 +00:00
|
|
|
|
2021-10-17 11:32:09 +00:00
|
|
|
bool IsExternalResource() const override;
|
2021-05-30 15:09:59 +00:00
|
|
|
std::string GetSourceTypeName() const override;
|
|
|
|
ZResourceType GetResourceType() const override;
|
2021-10-17 11:32:09 +00:00
|
|
|
std::string GetExternalExtension() const override;
|
|
|
|
|
|
|
|
size_t GetRawDataSize() const override;
|
|
|
|
DeclarationAlignment GetDeclarationAlignment() const override;
|
|
|
|
|
|
|
|
void CheckValidJpeg(const std::string& filepath);
|
2021-04-30 21:23:22 +00:00
|
|
|
};
|