mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:44:56 +00:00
AutoMapper work
This commit is contained in:
@@ -48,6 +48,7 @@ set(DNAMP1_SOURCES
|
||||
CMDL.hpp
|
||||
CMDLMaterials.cpp
|
||||
MAPA.hpp
|
||||
MAPU.hpp
|
||||
MREA.cpp
|
||||
SCLY.hpp SCLY.cpp
|
||||
FRME.cpp
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ANCS.hpp"
|
||||
#include "MREA.hpp"
|
||||
#include "MAPA.hpp"
|
||||
#include "MAPU.hpp"
|
||||
#include "FRME.hpp"
|
||||
#include "AGSC.hpp"
|
||||
#include "CSNG.hpp"
|
||||
@@ -355,6 +356,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK& pak, const PAK::En
|
||||
return {MREA::Extract, {_S(".blend")}, 4, MREA::Name};
|
||||
case SBIG('MAPA'):
|
||||
return {MAPA::Extract, {_S(".blend")}, 4};
|
||||
case SBIG('MAPU'):
|
||||
return {MAPU::Extract, {_S(".blend")}, 5};
|
||||
case SBIG('PART'):
|
||||
return {DNAParticle::ExtractGPSM<UniqueID32>, {_S(".gpsm.yaml")}};
|
||||
case SBIG('ELSC'):
|
||||
|
||||
@@ -28,6 +28,15 @@ struct MAPA : DNAMAPA::MAPA
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
return DNAMAPA::ReadMAPAToBlender(conn, mapa, outPath, pakRouter, entry, force);
|
||||
}
|
||||
|
||||
static bool Cook(const hecl::BlenderConnection::DataStream::MapArea& mapa, const hecl::ProjectPath& out)
|
||||
{
|
||||
return DNAMAPA::Cook<MAPA>(mapa, out);
|
||||
}
|
||||
|
||||
static uint32_t Version() { return 2; }
|
||||
using Header = DNAMAPA::MAPA::HeaderMP1;
|
||||
using MappableObject = DNAMAPA::MAPA::MappableObjectMP1_2;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
35
DataSpec/DNAMP1/MAPU.hpp
Normal file
35
DataSpec/DNAMP1/MAPU.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef __DNAMP1_MAPU_HPP__
|
||||
#define __DNAMP1_MAPU_HPP__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "../DNACommon/PAK.hpp"
|
||||
#include "../DNACommon/MAPU.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
{
|
||||
|
||||
struct MAPU : DNAMAPU::MAPU
|
||||
{
|
||||
static bool Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const hecl::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
const PAK::Entry& entry,
|
||||
bool force,
|
||||
hecl::BlenderToken& btok,
|
||||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
MAPU mapu;
|
||||
mapu.read(rs);
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
return DNAMAPU::ReadMAPUToBlender(conn, mapu, outPath, pakRouter, entry, force);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,7 +20,7 @@ struct CameraShaker : IScriptObject
|
||||
Value<float> zA;
|
||||
Value<float> zB;
|
||||
Value<float> duration;
|
||||
Value<bool> shakeY;
|
||||
Value<bool> active;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@ struct NewCameraShaker : IScriptObject
|
||||
DECL_YAML
|
||||
String<-1> name;
|
||||
Value<atVec3f> location;
|
||||
Value<bool> unknown1;
|
||||
PlayerParameters playerParams;
|
||||
Value<float> unknown3;
|
||||
Value<bool> active;
|
||||
PlayerParameters flags;
|
||||
Value<float> duration;
|
||||
Value<float> unknown4;
|
||||
struct CameraShakerParameters : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
PlayerParameters playerParams;
|
||||
PlayerParameters flags;
|
||||
struct ShakerInfo : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
PlayerParameters playerParams;
|
||||
PlayerParameters flags;
|
||||
Value<float> unknown1;
|
||||
Value<float> unknown2;
|
||||
Value<float> unknown3;
|
||||
|
||||
@@ -45,20 +45,20 @@ struct CTweakAutoMapper : public ITweakAutoMapper
|
||||
Value<float> x78_;
|
||||
DNAColor x7c_;
|
||||
DNAColor x80_;
|
||||
Value<float> x84_;
|
||||
Value<float> x84_alphaSurfaceVisited;
|
||||
Value<float> x88_;
|
||||
Value<float> x8c_;
|
||||
Value<float> x8c_alphaOutlineVisited;
|
||||
Value<float> x90_;
|
||||
Value<float> x94_;
|
||||
Value<float> x94_alphaSurfaceUnvisited;
|
||||
Value<float> x98_;
|
||||
Value<float> x9c_;
|
||||
Value<float> x9c_alphaOutlineUnvisited;
|
||||
Value<float> xa0_;
|
||||
/* Originally 4 separate floats */
|
||||
Value<zeus::CVector3f> xa4_doorCenter;
|
||||
Value<float> xb0_;
|
||||
Value<float> xb4_;
|
||||
Value<float> xb8_;
|
||||
Value<float> xbc_;
|
||||
Value<float> xb8_miniMapViewportWidth;
|
||||
Value<float> xbc_miniMapViewportHeight;
|
||||
Value<float> xc0_;
|
||||
Value<float> xc4_;
|
||||
Value<float> xc8_;
|
||||
@@ -84,6 +84,15 @@ struct CTweakAutoMapper : public ITweakAutoMapper
|
||||
CTweakAutoMapper(athena::io::IStreamReader& r) { this->read(r); }
|
||||
const zeus::CVector3f& GetDoorCenter() const { return xa4_doorCenter; }
|
||||
float GetCamVerticalOffset() const { return xec_camVerticalOffset; }
|
||||
float GetX28() const { return x28_; }
|
||||
float GetX2C() const { return x2c_; }
|
||||
float GetX30() const { return x30_; }
|
||||
float GetAlphaSurfaceVisited() const { return x84_alphaSurfaceVisited; }
|
||||
float GetAlphaOutlineVisited() const { return x8c_alphaOutlineVisited; }
|
||||
float GetAlphaSurfaceUnvisited() const { return x94_alphaSurfaceUnvisited; }
|
||||
float GetAlphaOutlineUnvisited() const { return x9c_alphaOutlineUnvisited; }
|
||||
float GetMiniMapViewportWidth() const { return xb8_miniMapViewportWidth; }
|
||||
float GetMiniMapViewportHeight() const { return xbc_miniMapViewportHeight; }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ struct CTweakGui : ITweakGui
|
||||
{
|
||||
DECL_YAML
|
||||
Value<bool> x4_;
|
||||
Value<float> x8_;
|
||||
Value<float> x8_mapAlphaInterp;
|
||||
Value<float> xc_;
|
||||
Value<float> x10_;
|
||||
Value<float> x14_;
|
||||
@@ -195,6 +195,7 @@ struct CTweakGui : ITweakGui
|
||||
CTweakGui() = default;
|
||||
CTweakGui(athena::io::IStreamReader& r) { this->read(r); }
|
||||
|
||||
float GetMapAlphaInterpolant() const { return x8_mapAlphaInterp; }
|
||||
EHudVisMode GetHudVisMode() const { return xf8_hudVisMode; }
|
||||
EHelmetVisMode GetHelmetVisMode() const { return xfc_helmetVisMode; }
|
||||
atUint32 GetEnableAutoMapper() const { return x100_enableAutoMapper; }
|
||||
|
||||
Reference in New Issue
Block a user