2
0
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:
2019-08-03 17:02:53 -07:00
parent 9d2cbf61ed
commit ff83dbc676
12 changed files with 96 additions and 13 deletions

View File

@@ -1650,7 +1650,7 @@ TXTR::Meta TXTR::GetMetaData(DataSpec::PAKEntryReadStream& rs) {
atUint16 palHeight = rs.readUint16Big();
palMeta.elementCount = palWidth * palHeight;
atUint32 palSize = atUint32(palWidth * palHeight * 2);
if (palMeta.format == 4)
if (format == 8)
textureSize /= 2;
std::unique_ptr<u8[]> palData(new u8[palSize]);
rs.readUBytesToBuf(palData.get(), palSize);