mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-15 03:20:35 +00:00
Updated to use latest version of ZAPD (#777)
* Updated config file * Added missing files * Temporarily removed asm_processor changes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "96ffc1e62" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "96ffc1e62" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "179af7d11" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "179af7d11" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Cleanup and fixes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "50ad2fe78" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "50ad2fe78" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Makefile fix * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "b9120803e" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "b9120803e" git-subrepo: version: "0.4.3" origin: "???" commit: "???" Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
This commit is contained in:
parent
6e58354c71
commit
0432011bd9
141 changed files with 7843 additions and 4338 deletions
|
@ -24,13 +24,18 @@ class ZTexture : public ZResource
|
|||
{
|
||||
protected:
|
||||
TextureType type;
|
||||
int width, height;
|
||||
uint16_t width, height;
|
||||
|
||||
uint8_t* bmpRgb;
|
||||
uint8_t* bmpRgba;
|
||||
bool isRawDataFixed;
|
||||
|
||||
void ParseXML(tinyxml2::XMLElement* reader) override;
|
||||
void FixRawData();
|
||||
void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData,
|
||||
const uint32_t nRawDataIndex,
|
||||
const std::string& nRelPath) override; // Extract Mode
|
||||
|
||||
void PrepareBitmap();
|
||||
void PrepareBitmapRGBA16();
|
||||
void PrepareBitmapRGBA32();
|
||||
|
@ -52,22 +57,20 @@ protected:
|
|||
void PrepareRawDataPalette4(std::string palPath);
|
||||
void PrepareRawDataPalette8(std::string palPath);
|
||||
float GetPixelMultiplyer();
|
||||
bool IsExternalResource() override;
|
||||
ZResourceType GetResourceType() override;
|
||||
void CalcHash() override;
|
||||
|
||||
public:
|
||||
ZTexture();
|
||||
ZTexture(ZFile* nParent);
|
||||
~ZTexture();
|
||||
|
||||
bool isPalette;
|
||||
|
||||
static ZTexture* BuildFromXML(tinyxml2::XMLElement* reader, std::string inFolder,
|
||||
bool readFile);
|
||||
static ZTexture* ExtractFromXML(tinyxml2::XMLElement* reader, std::vector<uint8_t> nRawData,
|
||||
int rawDataIndex, std::string nRelPath);
|
||||
static ZTexture* FromBinary(TextureType nType, std::vector<uint8_t> nRawData, int rawDataIndex,
|
||||
std::string nName, int nWidth, int nHeight);
|
||||
// static ZTexture* ExtractFromXML(tinyxml2::XMLElement* reader, std::vector<uint8_t> nRawData,
|
||||
// uint32_t rawDataIndex, std::string nRelPath, ZFile* nParent);
|
||||
static ZTexture* FromBinary(TextureType nType, std::vector<uint8_t> nRawData,
|
||||
uint32_t rawDataIndex, std::string nName, int32_t nWidth,
|
||||
int32_t nHeight, ZFile* nParent);
|
||||
static ZTexture* FromPNG(std::string pngFilePath, TextureType texType);
|
||||
static ZTexture* FromHLTexture(HLTexture* hlTex);
|
||||
static TextureType GetTextureTypeFromString(std::string str);
|
||||
|
@ -75,15 +78,20 @@ public:
|
|||
std::string GetSourceOutputCode(const std::string& prefix) override;
|
||||
std::string GetSourceOutputHeader(const std::string& prefix) override;
|
||||
|
||||
std::vector<uint8_t> GetRawData() override;
|
||||
int GetRawDataSize() override;
|
||||
size_t GetRawDataSize() override;
|
||||
std::string GetIMFmtFromType();
|
||||
std::string GetIMSizFromType();
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
void SetWidth(int nWidth);
|
||||
void SetHeight(int nHeight);
|
||||
uint16_t GetWidth();
|
||||
uint16_t GetHeight();
|
||||
void SetWidth(uint16_t nWidth);
|
||||
void SetHeight(uint16_t nHeight);
|
||||
TextureType GetTextureType();
|
||||
void Save(const std::string& outFolder) override;
|
||||
std::string GetExternalExtension() override;
|
||||
std::string GetPoolOutPath(std::string defaultValue);
|
||||
void CalcHash() override;
|
||||
|
||||
bool IsExternalResource() override;
|
||||
std::string GetSourceTypeName() override;
|
||||
ZResourceType GetResourceType() override;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue