2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 01:47:43 +00:00

began doExtract method

This commit is contained in:
Jack Andersen
2015-07-15 15:57:34 -10:00
parent a4d1fdbcfa
commit 07ae1e7379
31 changed files with 274 additions and 64 deletions

View File

@@ -3,11 +3,12 @@
#include <Athena/DNA.hpp>
#include "HECL/HECL.hpp"
#include "../Logging.hpp"
namespace Retro
{
extern LogVisor::LogModule LogDNACommon;
/* This comes up a great deal */
typedef Athena::io::DNA<Athena::BigEndian> BigDNA;
@@ -151,7 +152,7 @@ public:
: m_buf(std::move(buf)), m_sz(sz), m_pos(pos)
{
if (m_pos >= m_sz)
LogModule.report(LogVisor::FatalError, "PAK stream cursor overrun");
LogDNACommon.report(LogVisor::FatalError, "PAK stream cursor overrun");
}
inline void seek(atInt64 pos, Athena::SeekOrigin origin)
{
@@ -162,7 +163,7 @@ public:
else if (origin == Athena::End)
m_pos = m_sz + pos;
if (m_pos >= m_sz)
LogModule.report(LogVisor::FatalError, "PAK stream cursor overrun");
LogDNACommon.report(LogVisor::FatalError, "PAK stream cursor overrun");
}
inline atUint64 position() const {return m_pos;}
inline atUint64 length() const {return m_sz;}