2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Massive template-based DNA refactor

This commit is contained in:
Jack Andersen
2018-02-21 21:24:51 -10:00
parent b405f33ded
commit e4ff23c279
265 changed files with 3993 additions and 5773 deletions

View File

@@ -0,0 +1,27 @@
#include "Water.hpp"
namespace DataSpec::DNAMP1
{
template <>
void Water::UnusedBitset::Enumerate<BigDNA::Read>(typename Read::StreamT& in)
{
if (in.readBool())
{
atUint32 bitVal0 = in.readUint16Big();
atUint32 bitVal1 = in.readUint16Big();
atUint32 len = ((bitVal0 * bitVal1) + 31) / 31;
in.seek(len * 4);
}
}
template <>
void Water::UnusedBitset::Enumerate<BigDNA::Write>(typename Write::StreamT& out) { out.writeBool(false); }
template <>
void Water::UnusedBitset::Enumerate<BigDNA::ReadYaml>(typename ReadYaml::StreamT& r) {}
template <>
void Water::UnusedBitset::Enumerate<BigDNA::WriteYaml>(typename WriteYaml::StreamT& w) {}
template <>
void Water::UnusedBitset::Enumerate<BigDNA::BinarySize>(typename BinarySize::StreamT& s) { s += 1; }
}