Use ordered paklist

Prelim MAPA DNA
This commit is contained in:
Phillip Stephens 2015-08-07 17:08:16 -07:00
parent 592c4484e7
commit 1c07a90dd2
5 changed files with 90 additions and 4 deletions

View File

@ -1,6 +1,7 @@
make_dnalist(liblist
PAK
MLVL
MAPA
CMDL
CMDLMaterials)
add_library(DNAMP1

81
DataSpec/DNAMP1/MAPA.hpp Normal file
View File

@ -0,0 +1,81 @@
#ifndef __DNAMP1_MAPA_HPP__
#define __DNAMP1_MAPA_HPP__
#include <vector>
#include "../DNACommon/DNACommon.hpp"
namespace Retro
{
namespace DNAMP1
{
struct MAPA : BigDNA
{
DECL_DNA
Value<atUint32> magic;
Value<atUint32> version;
Value<atUint32> unknown1;
Value<atUint32> unknown2;
Value<atVec3f> aabbMin;
Value<atVec3f> aabbMax;
Value<atUint32> mappableObjectCount;
Value<atUint32> vertexCount;
Value<atUint32> surfaceCount;
struct MappableObject : BigDNA
{
DECL_DNA
Value<atUint32> type;
Value<atUint32> unknown1;
Value<atUint16> unknown2;
Value<atUint16> id;
Seek<DNA_COUNT(4), Athena::Current> seek1;
Value<atVec4f> transform1;
Value<atVec4f> transform2;
Value<atVec4f> transform3;
Seek<DNA_COUNT(0x10), Athena::Current> seek2;
};
Vector<MappableObject, DNA_COUNT(mappableObjectCount)> mappableObjects;
Vector<atVec3f, DNA_COUNT(vertexCount)> vertices;
struct SurfaceHeader : BigDNA
{
DECL_DNA
Value<atVec3f> unkFloats1;
Value<atVec3f> unkFloats2;
Value<atUint32> start;
Value<atUint32> end;
};
Vector<SurfaceHeader, DNA_COUNT(surfaceCount)> surfaceHeaders;
struct Surface : BigDNA
{
DECL_DNA
Value<atUint32> primitiveCount;
struct Primitive : BigDNA
{
DECL_DNA
Value<atUint32> type;
Value<atUint32> indexCount;
Vector<atUint32, DNA_COUNT(indexCount)> indices;
Align<4> align;
};
Vector<Primitive, DNA_COUNT(primitiveCount)> primitives;
Value<atUint32> borderCount;
struct Border : BigDNA
{
DECL_DNA
Value<atUint32> indexCount;
Vector<atUint32, DNA_COUNT(indexCount)> indices;
Align<4> align;
};
Vector<Border, DNA_COUNT(borderCount)> borders;
};
Vector<Surface, DNA_COUNT(surfaceCount)> surfaces;
};
}
}
#endif

View File

@ -234,8 +234,9 @@ struct SpecMP1 : SpecBase
int compIdx = 4;
prog = 0;
for (DNAMP1::PAKBridge& pak : m_paks)
for (std::pair<std::string, DNAMP1::PAKBridge*> pair : m_orderedPaks)
{
DNAMP1::PAKBridge& pak = *pair.second;
const std::string& name = pak.getName();
HECL::SystemStringView sysName(name);

View File

@ -230,8 +230,9 @@ struct SpecMP2 : SpecBase
int compIdx = 4;
prog = 0;
for (DNAMP2::PAKBridge& pak : m_paks)
for (std::pair<std::string, DNAMP2::PAKBridge*> pair : m_orderedPaks)
{
DNAMP2::PAKBridge& pak = *pair.second;
const std::string& name = pak.getName();
HECL::SystemStringView sysName(name);

View File

@ -332,8 +332,9 @@ struct SpecMP3 : SpecBase
mp3CookPath.makeDir();
prog = 0;
for (DNAMP3::PAKBridge& pak : m_paks)
for (std::pair<std::string, DNAMP3::PAKBridge*> pair : m_orderedPaks)
{
DNAMP3::PAKBridge& pak = *pair.second;
m_pakRouter.enterPAKBridge(pak);
const std::string& name = pak.getName();
@ -373,8 +374,9 @@ struct SpecMP3 : SpecBase
m_feCookPath.makeDir();
prog = 0;
for (DNAMP3::PAKBridge& pak : m_fePaks)
for (std::pair<std::string, DNAMP3::PAKBridge*> pair : m_feOrderedPaks)
{
DNAMP3::PAKBridge& pak = *pair.second;
const std::string& name = pak.getName();
HECL::SystemStringView sysName(name);