mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-16 08:57:03 +00:00
temporary ID dumping hard-coded
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
#include "../DNACommon/PAK.hpp"
|
||||
#include "../DNACommon/MAPA.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace Retro
|
||||
{
|
||||
@@ -25,14 +27,36 @@ struct MAPA : BigDNA
|
||||
struct MappableObject : BigDNA
|
||||
{
|
||||
DECL_DNA
|
||||
Value<atUint32> type;
|
||||
enum Type : atUint32
|
||||
{
|
||||
MOBlueDoor = 0,
|
||||
MOShieldDoor = 1,
|
||||
MOIceDoor = 2,
|
||||
MOWaveDoor = 3,
|
||||
MOPlasmaDoor = 4,
|
||||
MOBigDoor1 = 5,
|
||||
MOBigDoor2 = 6,
|
||||
MOIceDoorCeiling = 7,
|
||||
MOIceDoorFloor = 8,
|
||||
MOWaveDoorCeiling = 9,
|
||||
MOWaveDoorFloor = 10,
|
||||
MOIceDoorFloor2 = 13,
|
||||
MOWaveDoorFloor2 = 14,
|
||||
MODownArrowYellow = 27, /* Maintenance Tunnel */
|
||||
MOUpArrowYellow = 28, /* Phazon Processing Center */
|
||||
MODownArrowGreen = 29, /* Elevator A */
|
||||
MOUpArrowGreen = 30, /* Elite Control Access */
|
||||
MODownArrowRed = 31, /* Elevator B */
|
||||
MOUpArrowRed = 32, /* Fungal Hall Access */
|
||||
MOTransportLift = 33,
|
||||
MOSaveStation = 34,
|
||||
MOMissileStation = 37
|
||||
};
|
||||
Value<Type> type;
|
||||
Value<atUint32> unknown1;
|
||||
Value<atUint16> unknown2;
|
||||
Value<atUint16> id;
|
||||
Value<atUint32> sclyId;
|
||||
Seek<DNA_COUNT(4), Athena::Current> seek1;
|
||||
Value<atVec4f> transform1;
|
||||
Value<atVec4f> transform2;
|
||||
Value<atVec4f> transform3;
|
||||
Value<atVec4f> transformMtx[3];
|
||||
Seek<DNA_COUNT(0x10), Athena::Current> seek2;
|
||||
};
|
||||
Vector<MappableObject, DNA_COUNT(mappableObjectCount)> mappableObjects;
|
||||
@@ -42,9 +66,9 @@ struct MAPA : BigDNA
|
||||
{
|
||||
DECL_DNA
|
||||
Value<atVec3f> normal;
|
||||
Value<atVec3f> center;
|
||||
Value<atUint32> start;
|
||||
Value<atUint32> end;
|
||||
Value<atVec3f> centroid;
|
||||
Value<atUint32> polyOff;
|
||||
Value<atUint32> edgeOff;
|
||||
};
|
||||
|
||||
Vector<SurfaceHeader, DNA_COUNT(surfaceCount)> surfaceHeaders;
|
||||
@@ -58,7 +82,7 @@ struct MAPA : BigDNA
|
||||
DECL_DNA
|
||||
Value<atUint32> type;
|
||||
Value<atUint32> indexCount;
|
||||
Vector<atUint32, DNA_COUNT(indexCount)> indices;
|
||||
Vector<atUint8, DNA_COUNT(indexCount)> indices;
|
||||
Align<4> align;
|
||||
};
|
||||
Vector<Primitive, DNA_COUNT(primitiveCount)> primitives;
|
||||
@@ -67,13 +91,27 @@ struct MAPA : BigDNA
|
||||
{
|
||||
DECL_DNA
|
||||
Value<atUint32> indexCount;
|
||||
Vector<atUint32, DNA_COUNT(indexCount)> indices;
|
||||
Vector<atUint8, DNA_COUNT(indexCount)> indices;
|
||||
Align<4> align;
|
||||
};
|
||||
Vector<Border, DNA_COUNT(borderCount)> borders;
|
||||
};
|
||||
|
||||
Vector<Surface, DNA_COUNT(surfaceCount)> surfaces;
|
||||
|
||||
static bool Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const HECL::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
std::function<void(const HECL::SystemChar*)> fileChanged)
|
||||
{
|
||||
MAPA mapa;
|
||||
mapa.read(rs);
|
||||
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
|
||||
return DNAMAPA::ReadMAPAToBlender(conn, mapa, outPath, pakRouter, entry, force);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user