mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Minor fixes and cleanup
This commit is contained in:
@@ -31,6 +31,7 @@ private:
|
||||
boo::ObjToken<boo::ITexture> m_paletteTex;
|
||||
std::unique_ptr<u8[]> m_otex;
|
||||
EFontType m_ftype = EFontType::None;
|
||||
std::string m_dolphinName;
|
||||
|
||||
size_t ComputeMippedTexelCount();
|
||||
size_t ComputeMippedBlockCountDXT1();
|
||||
@@ -67,6 +68,9 @@ public:
|
||||
const boo::ObjToken<boo::ITexture>& GetPaletteTexture() const { return m_paletteTex; }
|
||||
std::unique_ptr<u8[]> BuildMemoryCardTex(u32& sizeOut, ETexelFormat& fmtOut, std::unique_ptr<u8[]>& paletteOut) const;
|
||||
const boo::ObjToken<boo::ITexture>& GetFontTexture(EFontType tp);
|
||||
|
||||
std::string_view GetDolphinName() const { return m_dolphinName; }
|
||||
bool HasDolphinName() const { return !m_dolphinName.empty(); }
|
||||
};
|
||||
|
||||
CFactoryFnReturn FTextureFactory(const urde::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
|
||||
|
||||
@@ -762,6 +762,8 @@ CTexture::CTexture(std::unique_ptr<u8[]>&& in, u32 length, bool otex) {
|
||||
Log.report(logvisor::Fatal, fmt("invalid texture type {} for boo"), int(x0_fmt));
|
||||
}
|
||||
|
||||
if (r.readBool())
|
||||
m_dolphinName = r.readString();
|
||||
if (otex)
|
||||
m_otex = std::move(owned);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user