2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 15:44:56 +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

@@ -1,5 +1,8 @@
make_dnalist(liblist
MLVL
STRG)
add_library(DNAMP2 ${liblist}
add_library(DNAMP2
DNAMP2.hpp
DNAMP2.cpp
${liblist}
STRG.cpp)

View File

@@ -0,0 +1,9 @@
#include "DNAMP2.hpp"
namespace Retro
{
namespace DNAMP2
{
LogVisor::LogModule Log("Retro::DNAMP2");
}
}

View File

@@ -0,0 +1,16 @@
#ifndef __DNAMP2_HPP__
#define __DNAMP2_HPP__
#include "../DNACommon/DNACommon.hpp"
namespace Retro
{
namespace DNAMP2
{
extern LogVisor::LogModule Log;
}
}
#endif // __DNAMP2_HPP__

View File

@@ -1,5 +1,5 @@
#include "STRG.hpp"
#include "../Logging.hpp"
#include "DNAMP2.hpp"
namespace Retro
{
@@ -53,11 +53,11 @@ void STRG::read(Athena::io::IStreamReader& reader)
reader.setEndian(Athena::BigEndian);
atUint32 magic = reader.readUint32();
if (magic != 0x87654321)
LogModule.report(LogVisor::Error, "invalid STRG magic");
Log.report(LogVisor::Error, "invalid STRG magic");
atUint32 version = reader.readUint32();
if (version != 1)
LogModule.report(LogVisor::Error, "invalid STRG version");
Log.report(LogVisor::Error, "invalid STRG version");
_read(reader);
}
@@ -134,5 +134,13 @@ void STRG::write(Athena::io::IStreamWriter& writer) const
}
}
bool STRG::readAngelScript(const AngelScript::asIScriptModule& in)
{
}
void STRG::writeAngelScript(std::ofstream& out) const
{
}
}
}

View File

@@ -28,7 +28,7 @@ struct STRG : ISTRG, BigDNA
inline size_t count() const
{
size_t retval = 0;
for (auto item : langs)
for (const auto& item : langs)
{
size_t sz = item.second.size();
if (sz > retval)
@@ -61,6 +61,9 @@ struct STRG : ISTRG, BigDNA
#endif
return std::string();
}
bool readAngelScript(const AngelScript::asIScriptModule& in);
void writeAngelScript(std::ofstream& out) const;
};
}