2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 19:07:44 +00:00

Shader extract crash fix; SCLY trilogy fixes

This commit is contained in:
Jack Andersen
2015-10-11 23:30:18 -10:00
parent cb57d0ed93
commit 30b486c76f
5 changed files with 297 additions and 17 deletions

View File

@@ -90,8 +90,9 @@ void SCLY::ScriptLayer::read(Athena::io::IStreamReader& rs)
obj->type = type;
obj->read(rs);
objects.push_back(obj);
if ((rs.position() - start) != len)
Log.report(LogVisor::FatalError, _S("Error while reading object of type 0x%.2X, did not read the expected amount of data, read 0x%x, expected 0x%x"), (atUint32)type, (rs.position() - start), len);
size_t actualLen = rs.position() - start;
if (actualLen != len)
Log.report(LogVisor::Warning, _S("Error while reading object of type 0x%.2X, did not read the expected amount of data, read 0x%x, expected 0x%x"), (atUint32)type, actualLen, len);
rs.seek(start + len, Athena::Begin);
}
else