Rename everything
|
@ -5,7 +5,7 @@ version.h
|
|||
*.autosave
|
||||
docs/*
|
||||
.idea/
|
||||
Editor/platforms/win/urde.rc
|
||||
Editor/platforms/win/metaforce.rc
|
||||
.vs/
|
||||
out/
|
||||
cmake-build-*/
|
|
@ -9,7 +9,7 @@ make_dnalist(CMDL
|
|||
EGMC
|
||||
SAVWCommon
|
||||
ParticleCommon
|
||||
URDEVersionInfo
|
||||
MetaforceVersionInfo
|
||||
Tweaks/ITweakPlayerGun)
|
||||
|
||||
set(DNACOMMON_SOURCES
|
||||
|
@ -41,7 +41,7 @@ set(DNACOMMON_SOURCES
|
|||
RigInverter.hpp RigInverter.cpp
|
||||
AROTBuilder.hpp AROTBuilder.cpp
|
||||
OBBTreeBuilder.hpp OBBTreeBuilder.cpp
|
||||
URDEVersionInfo.hpp
|
||||
MetaforceVersionInfo.hpp
|
||||
Tweaks/ITweak.hpp
|
||||
Tweaks/TweakWriter.hpp
|
||||
Tweaks/ITweakGame.hpp
|
||||
|
|
|
@ -11,12 +11,12 @@ AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_CRSM<UniqueID64>>)
|
|||
|
||||
template <>
|
||||
std::string_view PPImpl<_CRSM<UniqueID32>>::DNAType() {
|
||||
return "urde::CRSM<UniqueID32>"sv;
|
||||
return "CRSM<UniqueID32>"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string_view PPImpl<_CRSM<UniqueID64>>::DNAType() {
|
||||
return "urde::CRSM<UniqueID64>"sv;
|
||||
return "CRSM<UniqueID64>"sv;
|
||||
}
|
||||
|
||||
template <class IDType>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace DataSpec {
|
||||
|
||||
logvisor::Module LogDNACommon("urde::DNACommon");
|
||||
logvisor::Module LogDNACommon("DataSpec::DNACommon");
|
||||
ThreadLocalPtr<SpecBase> g_curSpec;
|
||||
ThreadLocalPtr<PAKRouterBase> g_PakRouter;
|
||||
ThreadLocalPtr<hecl::blender::Token> g_ThreadBlenderToken;
|
||||
|
|
|
@ -11,12 +11,12 @@ AT_SUBSPECIALIZE_DNA_YAML(PPImpl<_ELSM<UniqueID64>>)
|
|||
|
||||
template <>
|
||||
std::string_view ELSM<UniqueID32>::DNAType() {
|
||||
return "urde::ELSM<UniqueID32>"sv;
|
||||
return "ELSM<UniqueID32>"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string_view ELSM<UniqueID64>::DNAType() {
|
||||
return "urde::ELSM<UniqueID64>"sv;
|
||||
return "ELSM<UniqueID64>"sv;
|
||||
}
|
||||
|
||||
template <class IDType>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <logvisor/logvisor.hpp>
|
||||
|
||||
namespace DataSpec::DNAFont {
|
||||
logvisor::Module LogModule("urde::DNAFont");
|
||||
logvisor::Module LogModule("DataSpec::DNAFont");
|
||||
|
||||
template <class IDType>
|
||||
void FONT<IDType>::_read(athena::io::IStreamReader& __dna_reader) {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <logvisor/logvisor.hpp>
|
||||
|
||||
namespace DataSpec::DNAFSM2 {
|
||||
logvisor::Module LogDNAFSM2("urde::DNAFSM2");
|
||||
logvisor::Module LogDNAFSM2("DataSpec::DNAFSM2");
|
||||
|
||||
template <class IDType>
|
||||
template <class Op>
|
||||
|
@ -39,12 +39,12 @@ AT_SPECIALIZE_DNA(FSM2<UniqueID64>)
|
|||
|
||||
template <>
|
||||
std::string_view FSM2<UniqueID32>::DNAType() {
|
||||
return "urde::FSM2<UniqueID32>"sv;
|
||||
return "FSM2<UniqueID32>"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string_view FSM2<UniqueID64>::DNAType() {
|
||||
return "urde::FSM2<UniqueID64>"sv;
|
||||
return "FSM2<UniqueID64>"sv;
|
||||
}
|
||||
|
||||
template struct FSM2<UniqueID32>;
|
||||
|
|
|
@ -13,7 +13,7 @@ enum class EGame {
|
|||
MetroidPrime3,
|
||||
};
|
||||
|
||||
struct URDEVersionInfo : BigDNA {
|
||||
struct MetaforceVersionInfo : BigDNA {
|
||||
AT_DECL_DNA_YAML
|
||||
|
||||
String<-1> version;
|
|
@ -1,7 +1,7 @@
|
|||
#include "ParticleCommon.hpp"
|
||||
|
||||
namespace DataSpec::DNAParticle {
|
||||
logvisor::Module LogModule("urde::DNAParticle");
|
||||
logvisor::Module LogModule("DataSpec::DNAParticle");
|
||||
|
||||
template struct PEImpl<_RealElementFactory>;
|
||||
template struct PEImpl<_IntElementFactory>;
|
||||
|
|
|
@ -846,7 +846,7 @@ bool TXTR::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) {
|
|||
png_infop info = png_create_info_struct(png);
|
||||
|
||||
png_text textStruct = {};
|
||||
textStruct.key = png_charp("urde_nomip");
|
||||
textStruct.key = png_charp("metaforce_nomip");
|
||||
if (numMips == 1)
|
||||
png_set_text(png, info, &textStruct, 1);
|
||||
|
||||
|
@ -1088,13 +1088,13 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Disable mipmapping if urde_nomip embedded */
|
||||
/* Disable mipmapping if metaforce_nomip embedded */
|
||||
bool mipmap = true;
|
||||
png_text* textStruct;
|
||||
int numText;
|
||||
png_get_text(pngRead, info, &textStruct, &numText);
|
||||
for (int i = 0; i < numText; ++i) {
|
||||
if (std::strcmp(textStruct[i].key, "urde_nomip") == 0) {
|
||||
if (std::strcmp(textStruct[i].key, "metaforce_nomip") == 0) {
|
||||
mipmap = false;
|
||||
}
|
||||
}
|
||||
|
@ -1401,13 +1401,13 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
|||
const png_byte colorType = png_get_color_type(pngRead, info);
|
||||
const png_byte bitDepth = png_get_bit_depth(pngRead, info);
|
||||
|
||||
/* Disable mipmapping if urde_nomip embedded */
|
||||
/* Disable mipmapping if metaforce_nomip embedded */
|
||||
bool mipmap = true;
|
||||
png_text* textStruct;
|
||||
int numText;
|
||||
png_get_text(pngRead, info, &textStruct, &numText);
|
||||
for (int i = 0; i < numText; ++i) {
|
||||
if (std::strcmp(textStruct[i].key, "urde_nomip") == 0) {
|
||||
if (std::strcmp(textStruct[i].key, "metaforce_nomip") == 0) {
|
||||
mipmap = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
namespace DataSpec {
|
||||
|
||||
struct ITweakGunRes : ITweak {
|
||||
using ResId = urde::CAssetId;
|
||||
using EBeamId = urde::CPlayerState::EBeamId;
|
||||
using ResId = metaforce::CAssetId;
|
||||
using EBeamId = metaforce::CPlayerState::EBeamId;
|
||||
|
||||
ResId x4_gunMotion;
|
||||
ResId x8_grappleArm;
|
||||
|
@ -68,7 +68,7 @@ struct ITweakGunRes : ITweak {
|
|||
return x34_weapons[b];
|
||||
}
|
||||
|
||||
void ResolveResources(const urde::IFactory& factory) {
|
||||
void ResolveResources(const metaforce::IFactory& factory) {
|
||||
x4_gunMotion = factory.GetResourceIdByName(GetGunMotion())->id;
|
||||
x8_grappleArm = factory.GetResourceIdByName(GetGrappleArm())->id;
|
||||
xc_rightHand = factory.GetResourceIdByName(GetRightHand())->id;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
namespace DataSpec {
|
||||
|
||||
struct ITweakPlayerRes : ITweak {
|
||||
using ResId = urde::CAssetId;
|
||||
using EBeamId = urde::CPlayerState::EBeamId;
|
||||
using ResId = metaforce::CAssetId;
|
||||
using EBeamId = metaforce::CPlayerState::EBeamId;
|
||||
|
||||
ResId x4_saveStationIcon;
|
||||
ResId x8_missileStationIcon;
|
||||
|
@ -85,7 +85,7 @@ struct ITweakPlayerRes : ITweak {
|
|||
}
|
||||
}
|
||||
|
||||
void ResolveResources(const urde::IFactory& factory) {
|
||||
void ResolveResources(const metaforce::IFactory& factory) {
|
||||
x4_saveStationIcon = factory.GetResourceIdByName(_GetSaveStationIcon())->id;
|
||||
x8_missileStationIcon = factory.GetResourceIdByName(_GetMissileStationIcon())->id;
|
||||
xc_elevatorIcon = factory.GetResourceIdByName(_GetElevatorIcon())->id;
|
||||
|
|
|
@ -43,7 +43,7 @@ void AFSM::State::Transition::Enumerate<BigDNA::BinarySize>(typename BinarySize:
|
|||
trig.binarySize(s);
|
||||
}
|
||||
|
||||
std::string_view AFSM::State::Transition::DNAType() { return "urde::DNAMP1::AFSM::Transition"sv; }
|
||||
std::string_view AFSM::State::Transition::DNAType() { return "DNAMP1::AFSM::Transition"sv; }
|
||||
|
||||
template <>
|
||||
void AFSM::State::Transition::Trigger::Enumerate<BigDNA::Read>(athena::io::IStreamReader& __dna_reader) {
|
||||
|
@ -100,7 +100,7 @@ void AFSM::State::Transition::Trigger::Enumerate<BigDNA::BinarySize>(size_t& __i
|
|||
}
|
||||
|
||||
std::string_view AFSM::State::Transition::Trigger::DNAType() {
|
||||
return "urde::DNAMP1::AFSM::State::Transition::Trigger"sv;
|
||||
return "DNAMP1::AFSM::State::Transition::Trigger"sv;
|
||||
}
|
||||
|
||||
} // namespace DataSpec::DNAMP1
|
||||
|
|
|
@ -139,7 +139,7 @@ void ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo::Enumer
|
|||
}
|
||||
|
||||
std::string_view ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo::DNAType() {
|
||||
return "urde::DNAMP1::ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo"sv;
|
||||
return "DNAMP1::ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::ParmInfo"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -315,7 +315,7 @@ void ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::Enumerate<BigDNA
|
|||
}
|
||||
|
||||
std::string_view ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState::DNAType() {
|
||||
return "urde::DNAMP1::ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState"sv;
|
||||
return "DNAMP1::ANCS::CharacterSet::CharacterInfo::PASDatabase::AnimState"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -606,7 +606,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::WriteYaml>(athena::io:
|
|||
}
|
||||
|
||||
std::string_view ANCS::CharacterSet::CharacterInfo::DNAType() {
|
||||
return "urde::DNAMP1::ANCS::CharacterSet::CharacterInfo"sv;
|
||||
return "DNAMP1::ANCS::CharacterSet::CharacterInfo"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -688,7 +688,7 @@ void ANCS::AnimationSet::MetaAnimFactory::Enumerate<BigDNA::WriteYaml>(athena::i
|
|||
}
|
||||
|
||||
std::string_view ANCS::AnimationSet::MetaAnimFactory::DNAType() {
|
||||
return "urde::DNAMP1::ANCS::AnimationSet::MetaAnimFactory"sv;
|
||||
return "DNAMP1::ANCS::AnimationSet::MetaAnimFactory"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -761,7 +761,7 @@ void ANCS::AnimationSet::MetaTransFactory::Enumerate<BigDNA::WriteYaml>(athena::
|
|||
}
|
||||
|
||||
std::string_view ANCS::AnimationSet::MetaTransFactory::DNAType() {
|
||||
return "urde::DNAMP1::ANCS::AnimationSet::MetaTransFactory"sv;
|
||||
return "DNAMP1::ANCS::AnimationSet::MetaTransFactory"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -955,7 +955,7 @@ void ANCS::AnimationSet::MetaAnimPrimitive::gatherPrimitives(
|
|||
out[animIdx] = {animName, animId, ANIM::GetEVNTId(rs), false};
|
||||
}
|
||||
|
||||
std::string_view ANCS::AnimationSet::DNAType() { return "urde::DNAMP1::ANCS::AnimationSet"sv; }
|
||||
std::string_view ANCS::AnimationSet::DNAType() { return "DNAMP1::ANCS::AnimationSet"sv; }
|
||||
|
||||
bool ANCS::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath,
|
||||
PAKRouter<PAKBridge>& pakRouter, const PAK::Entry& entry, bool force, hecl::blender::Token& btok,
|
||||
|
@ -994,7 +994,7 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
Log.report(logvisor::Fatal, FMT_STRING(_SYS_STR("can't open '{}' for reading")), yamlPath.getRelativePath());
|
||||
|
||||
if (!athena::io::ValidateFromYAMLStream<ANCS>(reader)) {
|
||||
Log.report(logvisor::Fatal, FMT_STRING(_SYS_STR("'{}' is not urde::DNAMP1::ANCS type")), yamlPath.getRelativePath());
|
||||
Log.report(logvisor::Fatal, FMT_STRING(_SYS_STR("'{}' is not DNAMP1::ANCS type")), yamlPath.getRelativePath());
|
||||
}
|
||||
|
||||
athena::io::YAMLDocReader yamlReader;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "PATH.hpp"
|
||||
|
||||
#include "DataSpec/DNACommon/Tweaks/TweakWriter.hpp"
|
||||
#include "DataSpec/DNACommon/URDEVersionInfo.hpp"
|
||||
#include "DataSpec/DNACommon/MetaforceVersionInfo.hpp"
|
||||
#include "Tweaks/CTweakPlayerRes.hpp"
|
||||
#include "Tweaks/CTweakGunRes.hpp"
|
||||
#include "Tweaks/CTweakPlayer.hpp"
|
||||
|
@ -49,7 +49,7 @@
|
|||
#include "SnowForces.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1 {
|
||||
logvisor::Module Log("urde::DNAMP1");
|
||||
logvisor::Module Log("DataSpec::DNAMP1");
|
||||
|
||||
static bool GetNoShare(std::string_view name) {
|
||||
std::string lowerName(name);
|
||||
|
|
|
@ -23,6 +23,6 @@ void EVNT::Enumerate(typename Op::StreamT& s) {
|
|||
|
||||
AT_SPECIALIZE_DNA_YAML(EVNT)
|
||||
|
||||
std::string_view EVNT::DNAType() { return "urde::DNAMP1::EVNT"sv; }
|
||||
std::string_view EVNT::DNAType() { return "DNAMP1::EVNT"sv; }
|
||||
|
||||
} // namespace DataSpec::DNAMP1
|
||||
|
|
|
@ -269,7 +269,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
std::vector<hecl::ProjectPath> depPaths;
|
||||
std::vector<hecl::ProjectPath> lazyPaths;
|
||||
for (std::unique_ptr<IScriptObject>& obj : layer.objects) {
|
||||
if (obj->type == int(urde::EScriptObjectType::MemoryRelay)) {
|
||||
if (obj->type == int(metaforce::EScriptObjectType::MemoryRelay)) {
|
||||
MemoryRelay& memRelay = static_cast<MemoryRelay&>(*obj);
|
||||
for (IScriptObject::Connection& conn : memRelay.connections) {
|
||||
MemRelayLink linkOut;
|
||||
|
@ -319,7 +319,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
areaOut.depLayers.push_back(areaOut.deps.size());
|
||||
for (const std::pair<hecl::ProjectPath, bool>& path : layer) {
|
||||
if (path.first) {
|
||||
urde::SObjectTag tag = g_curSpec->buildTagFromPath(path.first);
|
||||
metaforce::SObjectTag tag = g_curSpec->buildTagFromPath(path.first);
|
||||
if (tag.id.IsValid()) {
|
||||
if (path.second)
|
||||
areaOut.lazyDeps.emplace_back(tag.id.Value(), tag.type);
|
||||
|
@ -348,7 +348,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
layerResources.addSharedPath(path, false);
|
||||
|
||||
for (const std::pair<hecl::ProjectPath, bool>& path : layerResources.sharedPaths) {
|
||||
urde::SObjectTag tag = g_curSpec->buildTagFromPath(path.first);
|
||||
metaforce::SObjectTag tag = g_curSpec->buildTagFromPath(path.first);
|
||||
if (tag.id.IsValid()) {
|
||||
if (path.second)
|
||||
areaOut.lazyDeps.emplace_back(tag.id.Value(), tag.type);
|
||||
|
@ -359,7 +359,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
}
|
||||
|
||||
hecl::ProjectPath pathPath = GetPathBeginsWith(areaDEnum, area.path, _SYS_STR("!path_"));
|
||||
urde::SObjectTag pathTag = g_curSpec->buildTagFromPath(pathPath);
|
||||
metaforce::SObjectTag pathTag = g_curSpec->buildTagFromPath(pathPath);
|
||||
if (pathTag.id.IsValid()) {
|
||||
areaOut.deps.emplace_back(pathTag.id.Value(), pathTag.type);
|
||||
areaOut.lazyDeps.emplace_back(0, FOURCC('NONE'));
|
||||
|
@ -392,7 +392,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
|
|||
}
|
||||
|
||||
bool MLVL::CookMAPW(const hecl::ProjectPath& outPath, const World& wld) {
|
||||
std::vector<urde::SObjectTag> mapaTags;
|
||||
std::vector<metaforce::SObjectTag> mapaTags;
|
||||
mapaTags.reserve(wld.areas.size());
|
||||
|
||||
for (const World::Area& area : wld.areas) {
|
||||
|
@ -411,7 +411,7 @@ bool MLVL::CookMAPW(const hecl::ProjectPath& outPath, const World& wld) {
|
|||
fo.writeUint32Big(0xDEADF00D);
|
||||
fo.writeUint32Big(1);
|
||||
fo.writeUint32Big(mapaTags.size());
|
||||
for (const urde::SObjectTag& mapa : mapaTags)
|
||||
for (const metaforce::SObjectTag& mapa : mapaTags)
|
||||
fo.writeUint32Big(u32(mapa.id.Value()));
|
||||
int64_t rem = fo.position() % 32;
|
||||
if (rem)
|
||||
|
@ -479,7 +479,7 @@ bool MLVL::CookSAVW(const hecl::ProjectPath& outPath, const World& wld) {
|
|||
{
|
||||
std::vector<Scan> scans;
|
||||
for (std::unique_ptr<IScriptObject>& obj : layer.objects) {
|
||||
if (obj->type == int(urde::EScriptObjectType::MemoryRelay)) {
|
||||
if (obj->type == int(metaforce::EScriptObjectType::MemoryRelay)) {
|
||||
MemoryRelay& memRelay = static_cast<MemoryRelay&>(*obj);
|
||||
auto iter = std::find(memRelays.begin(), memRelays.end(), memRelay.id);
|
||||
if (iter == memRelays.end()) {
|
||||
|
@ -487,7 +487,7 @@ bool MLVL::CookSAVW(const hecl::ProjectPath& outPath, const World& wld) {
|
|||
savw.relays.push_back(memRelay.id);
|
||||
memRelays.push_back(memRelay.id);
|
||||
}
|
||||
} else if (obj->type == int(urde::EScriptObjectType::SpecialFunction)) {
|
||||
} else if (obj->type == int(metaforce::EScriptObjectType::SpecialFunction)) {
|
||||
SpecialFunction& specialFunc = static_cast<SpecialFunction&>(*obj);
|
||||
if (specialFunc.function == ESpecialFunctionType::CinematicSkip)
|
||||
savw.skippableCutscenes.push_back(specialFunc.id);
|
||||
|
@ -497,7 +497,7 @@ bool MLVL::CookSAVW(const hecl::ProjectPath& outPath, const World& wld) {
|
|||
layer.areaId = specialFunc.layerSwitch.area;
|
||||
layer.layer = specialFunc.layerSwitch.layerIdx;
|
||||
}
|
||||
} else if (obj->type == int(urde::EScriptObjectType::Door)) {
|
||||
} else if (obj->type == int(metaforce::EScriptObjectType::Door)) {
|
||||
DoorArea& doorArea = static_cast<DoorArea&>(*obj);
|
||||
savw.doors.push_back(doorArea.id);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ void SCAN::Texture::Enumerate<BigDNA::WriteYaml>(typename WriteYaml::StreamT& w)
|
|||
w.writeFloat("fadeDuration", fadeDuration);
|
||||
}
|
||||
|
||||
std::string_view SCAN::Texture::DNAType() { return "urde::DNAMP1::SCAN::Texture"sv; }
|
||||
std::string_view SCAN::Texture::DNAType() { return "DNAMP1::SCAN::Texture"sv; }
|
||||
|
||||
template <>
|
||||
void SCAN::Texture::Enumerate<BigDNA::BinarySize>(typename BinarySize::StreamT& s) {
|
||||
|
|
|
@ -91,7 +91,7 @@ void SCLY::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& docout) {
|
|||
docout.enumerate("layers", layers);
|
||||
}
|
||||
|
||||
std::string_view SCLY::DNAType() { return "urde::DNAMP1::SCLY"sv; }
|
||||
std::string_view SCLY::DNAType() { return "DNAMP1::SCLY"sv; }
|
||||
|
||||
template <>
|
||||
void SCLY::ScriptLayer::Enumerate<BigDNA::Read>(athena::io::IStreamReader& rs) {
|
||||
|
@ -191,6 +191,6 @@ void SCLY::ScriptLayer::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter&
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view SCLY::ScriptLayer::DNAType() { return "urde::DNAMP1::SCLY::ScriptLayer"sv; }
|
||||
std::string_view SCLY::ScriptLayer::DNAType() { return "DNAMP1::SCLY::ScriptLayer"sv; }
|
||||
|
||||
} // namespace DataSpec::DNAMP1
|
||||
|
|
|
@ -458,5 +458,5 @@ void STRG::Enumerate<BigDNA::WriteYaml>(typename WriteYaml::StreamT& writer) {
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view STRG::DNAType() { return "urde::DNAMP1::STRG"sv; }
|
||||
std::string_view STRG::DNAType() { return "DNAMP1::STRG"sv; }
|
||||
} // namespace DataSpec::DNAMP1
|
||||
|
|
|
@ -26,7 +26,7 @@ void Oculus::Enumerate(typename Op::StreamT& s) {
|
|||
unknown8 = 0.f;
|
||||
}
|
||||
|
||||
std::string_view Oculus::DNAType() { return "urde::DNAMP1::Oculus"sv; }
|
||||
std::string_view Oculus::DNAType() { return "DNAMP1::Oculus"sv; }
|
||||
|
||||
AT_SPECIALIZE_DNA_YAML(Oculus)
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ void Ridley::Enumerate(typename Op::StreamT& s) {
|
|||
Do<Op>(athena::io::PropId{"damageInfo9"}, damageInfo9, s);
|
||||
}
|
||||
|
||||
std::string_view Ridley::DNAType() { return "urde::DNAMP1::Ridley"sv; }
|
||||
std::string_view Ridley::DNAType() { return "DNAMP1::Ridley"sv; }
|
||||
|
||||
AT_SPECIALIZE_DNA_YAML(Ridley)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ void WorldTeleporter::Enumerate(typename Op::StreamT& s) {
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view WorldTeleporter::DNAType() { return "urde::DNAMP1::WorldTeleporter"sv; }
|
||||
std::string_view WorldTeleporter::DNAType() { return "DNAMP1::WorldTeleporter"sv; }
|
||||
|
||||
AT_SPECIALIZE_DNA_YAML(WorldTeleporter)
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::WriteYaml>(typename Wr
|
|||
}
|
||||
|
||||
std::string_view ANCS::CharacterSet::CharacterInfo::DNAType() {
|
||||
return "urde::DNAMP2::ANCS::CharacterSet::CharacterInfo"sv;
|
||||
return "DNAMP2::ANCS::CharacterSet::CharacterInfo"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -523,7 +523,7 @@ void ANCS::AnimationSet::Enumerate<BigDNA::WriteYaml>(typename WriteYaml::Stream
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view ANCS::AnimationSet::DNAType() { return "urde::DNAMP2::ANCS::AnimationSet"sv; }
|
||||
std::string_view ANCS::AnimationSet::DNAType() { return "DNAMP2::ANCS::AnimationSet"sv; }
|
||||
|
||||
template <class Op>
|
||||
void ANCS::AnimationSet::EVNT::Enumerate(typename Op::StreamT& s) {
|
||||
|
@ -542,6 +542,6 @@ void ANCS::AnimationSet::EVNT::Enumerate(typename Op::StreamT& s) {
|
|||
|
||||
AT_SPECIALIZE_DNA(ANCS::AnimationSet::EVNT)
|
||||
|
||||
std::string_view ANCS::AnimationSet::EVNT::DNAType() { return "urde::DNAMP2::ANCS::AnimationSet::EVNT"sv; }
|
||||
std::string_view ANCS::AnimationSet::EVNT::DNAType() { return "DNAMP2::ANCS::AnimationSet::EVNT"sv; }
|
||||
|
||||
} // namespace DataSpec::DNAMP2
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "Runtime/GCNTypes.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP2 {
|
||||
logvisor::Module Log("urde::DNAMP2");
|
||||
logvisor::Module Log("DataSpec::DNAMP2");
|
||||
|
||||
static bool GetNoShare(std::string_view name) {
|
||||
std::string lowerName(name);
|
||||
|
|
|
@ -213,6 +213,6 @@ void STRG::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view STRG::DNAType() { return "urde::DNAMP2::STRG"sv; }
|
||||
std::string_view STRG::DNAType() { return "DNAMP2::STRG"sv; }
|
||||
|
||||
} // namespace DataSpec::DNAMP2
|
||||
|
|
|
@ -69,7 +69,7 @@ void CHAR::AnimationInfo::EVNT::SFXEvent::Enumerate<BigDNA::WriteYaml>(athena::i
|
|||
}
|
||||
|
||||
std::string_view CHAR::AnimationInfo::EVNT::SFXEvent::DNAType() {
|
||||
return "urde::DNAMP3::CHAR::AnimationInfo::EVNT::SFXEvent"sv;
|
||||
return "DNAMP3::CHAR::AnimationInfo::EVNT::SFXEvent"sv;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -151,7 +151,7 @@ void CHAR::AnimationInfo::MetaAnimFactory::Enumerate<BigDNA::WriteYaml>(athena::
|
|||
}
|
||||
|
||||
std::string_view CHAR::AnimationInfo::MetaAnimFactory::DNAType() {
|
||||
return "urde::DNAMP3::CHAR::AnimationInfo::MetaAnimFactory"sv;
|
||||
return "DNAMP3::CHAR::AnimationInfo::MetaAnimFactory"sv;
|
||||
}
|
||||
|
||||
} // namespace DataSpec::DNAMP3
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "Runtime/GCNTypes.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP3 {
|
||||
logvisor::Module Log("urde::DNAMP3");
|
||||
logvisor::Module Log("DataSpec::DNAMP3");
|
||||
|
||||
static bool GetNoShare(std::string_view name) {
|
||||
std::string lowerName(name);
|
||||
|
|
|
@ -220,6 +220,6 @@ void STRG::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
|
|||
}
|
||||
}
|
||||
|
||||
std::string_view STRG::DNAType() { return "urde::DNAMP3::STRG"sv; }
|
||||
std::string_view STRG::DNAType() { return "DNAMP3::STRG"sv; }
|
||||
|
||||
} // namespace DataSpec::DNAMP3
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "DataSpec/DNACommon/DNACommon.hpp"
|
||||
#include "DataSpec/DNACommon/TXTR.hpp"
|
||||
#include "DataSpec/AssetNameMap.hpp"
|
||||
#include "DataSpec/DNACommon/URDEVersionInfo.hpp"
|
||||
#include "DataSpec/DNACommon/MetaforceVersionInfo.hpp"
|
||||
#include "hecl/ClientProcess.hpp"
|
||||
#include "nod/DiscBase.hpp"
|
||||
#include "nod/nod.hpp"
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace DataSpec {
|
||||
|
||||
static logvisor::Module Log("urde::SpecBase");
|
||||
static logvisor::Module Log("DataSpec::SpecBase");
|
||||
|
||||
static const hecl::SystemChar* MomErr[] = {_SYS_STR("Your metroid is in another castle"),
|
||||
_SYS_STR("HECL is experiencing a PTSD attack"),
|
||||
|
@ -441,8 +441,8 @@ bool SpecBase::canPackage(const hecl::ProjectPath& path) {
|
|||
return path.isFile() || path.isDirectory();
|
||||
}
|
||||
|
||||
void SpecBase::recursiveBuildResourceList(std::vector<urde::SObjectTag>& listOut,
|
||||
std::unordered_set<urde::SObjectTag>& addedTags,
|
||||
void SpecBase::recursiveBuildResourceList(std::vector<metaforce::SObjectTag>& listOut,
|
||||
std::unordered_set<metaforce::SObjectTag>& addedTags,
|
||||
const hecl::ProjectPath& path, hecl::blender::Token& btok) {
|
||||
hecl::DirectoryEnumerator dEnum(path.getAbsolutePath(), hecl::DirectoryEnumerator::Mode::DirsThenFilesSorted, false,
|
||||
false, true);
|
||||
|
@ -452,7 +452,7 @@ void SpecBase::recursiveBuildResourceList(std::vector<urde::SObjectTag>& listOut
|
|||
if (hecl::ProjectPath(childPath, _SYS_STR("!project.yaml")).isFile() &&
|
||||
hecl::ProjectPath(childPath, _SYS_STR("!pool.yaml")).isFile()) {
|
||||
/* Handle AudioGroup case */
|
||||
if (urde::SObjectTag tag = tagFromPath(childPath)) {
|
||||
if (metaforce::SObjectTag tag = tagFromPath(childPath)) {
|
||||
if (addedTags.find(tag) != addedTags.end())
|
||||
continue;
|
||||
addedTags.insert(tag);
|
||||
|
@ -466,7 +466,7 @@ void SpecBase::recursiveBuildResourceList(std::vector<urde::SObjectTag>& listOut
|
|||
std::vector<hecl::ProjectPath> subPaths;
|
||||
flattenDependencies(childPath, subPaths, btok);
|
||||
for (const auto& subPath : subPaths) {
|
||||
if (urde::SObjectTag tag = tagFromPath(subPath)) {
|
||||
if (metaforce::SObjectTag tag = tagFromPath(subPath)) {
|
||||
if (addedTags.find(tag) != addedTags.end())
|
||||
continue;
|
||||
addedTags.insert(tag);
|
||||
|
@ -478,10 +478,10 @@ void SpecBase::recursiveBuildResourceList(std::vector<urde::SObjectTag>& listOut
|
|||
}
|
||||
|
||||
void SpecBase::copyBuildListData(std::vector<std::tuple<size_t, size_t, bool>>& fileIndex,
|
||||
const std::vector<urde::SObjectTag>& buildList,
|
||||
const std::vector<metaforce::SObjectTag>& buildList,
|
||||
const hecl::Database::DataSpecEntry* entry, bool fast,
|
||||
const hecl::MultiProgressPrinter& progress, athena::io::FileWriter& pakOut,
|
||||
const std::unordered_map<urde::CAssetId, std::vector<uint8_t>>& mlvlData) {
|
||||
const std::unordered_map<metaforce::CAssetId, std::vector<uint8_t>>& mlvlData) {
|
||||
fileIndex.reserve(buildList.size());
|
||||
int loadIdx = 0;
|
||||
for (const auto& tag : buildList) {
|
||||
|
@ -564,9 +564,9 @@ void SpecBase::doPackage(const hecl::ProjectPath& path, const hecl::Database::Da
|
|||
|
||||
/* Output file */
|
||||
athena::io::FileWriter pakOut(outPath.getAbsolutePath());
|
||||
std::vector<urde::SObjectTag> buildList;
|
||||
std::vector<metaforce::SObjectTag> buildList;
|
||||
atUint64 resTableOffset = 0;
|
||||
std::unordered_map<urde::CAssetId, std::vector<uint8_t>> mlvlData;
|
||||
std::unordered_map<metaforce::CAssetId, std::vector<uint8_t>> mlvlData;
|
||||
|
||||
if (IsWorldBlend(path)) /* World PAK */
|
||||
{
|
||||
|
@ -583,9 +583,9 @@ void SpecBase::doPackage(const hecl::ProjectPath& path, const hecl::Database::Da
|
|||
} else if (path.getPathType() == hecl::ProjectPath::Type::Directory) /* General PAK */
|
||||
{
|
||||
/* Build resource list */
|
||||
std::unordered_set<urde::SObjectTag> addedTags;
|
||||
std::unordered_set<metaforce::SObjectTag> addedTags;
|
||||
recursiveBuildResourceList(buildList, addedTags, path, btok);
|
||||
std::vector<std::pair<urde::SObjectTag, std::string>> nameList;
|
||||
std::vector<std::pair<metaforce::SObjectTag, std::string>> nameList;
|
||||
|
||||
/* Build name list */
|
||||
for (const auto& item : buildList) {
|
||||
|
@ -605,10 +605,10 @@ void SpecBase::doPackage(const hecl::ProjectPath& path, const hecl::Database::Da
|
|||
/* Build resource list */
|
||||
std::vector<hecl::ProjectPath> subPaths;
|
||||
flattenDependencies(path, subPaths, btok);
|
||||
std::unordered_set<urde::SObjectTag> addedTags;
|
||||
std::vector<std::pair<urde::SObjectTag, std::string>> nameList;
|
||||
std::unordered_set<metaforce::SObjectTag> addedTags;
|
||||
std::vector<std::pair<metaforce::SObjectTag, std::string>> nameList;
|
||||
for (const auto& subPath : subPaths) {
|
||||
if (urde::SObjectTag tag = tagFromPath(subPath)) {
|
||||
if (metaforce::SObjectTag tag = tagFromPath(subPath)) {
|
||||
if (addedTags.find(tag) != addedTags.end())
|
||||
continue;
|
||||
addedTags.insert(tag);
|
||||
|
@ -635,12 +635,12 @@ void SpecBase::doPackage(const hecl::ProjectPath& path, const hecl::Database::Da
|
|||
if (cp) {
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Validating resources")));
|
||||
progress.setMainIndeterminate(true);
|
||||
std::vector<urde::SObjectTag> cookTags;
|
||||
std::vector<metaforce::SObjectTag> cookTags;
|
||||
cookTags.reserve(buildList.size());
|
||||
|
||||
/* Ensure CMDLs are enqueued first to minimize synchronous dependency cooking */
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
std::unordered_set<urde::SObjectTag> addedTags;
|
||||
std::unordered_set<metaforce::SObjectTag> addedTags;
|
||||
addedTags.reserve(buildList.size());
|
||||
for (auto& tag : buildList) {
|
||||
if ((i == 0 && tag.type == FOURCC('CMDL')) || (i == 1 && tag.type != FOURCC('CMDL'))) {
|
||||
|
@ -732,7 +732,7 @@ void SpecBase::extractRandomStaticEntropy(const uint8_t* buf, const hecl::Projec
|
|||
png_infop info = png_create_info_struct(png);
|
||||
|
||||
png_text textStruct = {};
|
||||
textStruct.key = png_charp("urde_nomip");
|
||||
textStruct.key = png_charp("meta_nomip");
|
||||
png_set_text(png, info, &textStruct, 1);
|
||||
|
||||
png_set_IHDR(png, info, 1024, 512, 8, PNG_COLOR_TYPE_GRAY_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
|
||||
|
@ -761,7 +761,7 @@ void SpecBase::clearTagCache() {
|
|||
m_catalogTagToNames.clear();
|
||||
}
|
||||
|
||||
hecl::ProjectPath SpecBase::pathFromTag(const urde::SObjectTag& tag) const {
|
||||
hecl::ProjectPath SpecBase::pathFromTag(const metaforce::SObjectTag& tag) const {
|
||||
std::unique_lock lk(m_backgroundIndexMutex);
|
||||
auto search = m_tagToPath.find(tag);
|
||||
if (search != m_tagToPath.cend())
|
||||
|
@ -769,14 +769,14 @@ hecl::ProjectPath SpecBase::pathFromTag(const urde::SObjectTag& tag) const {
|
|||
return {};
|
||||
}
|
||||
|
||||
urde::SObjectTag SpecBase::tagFromPath(const hecl::ProjectPath& path) const {
|
||||
metaforce::SObjectTag SpecBase::tagFromPath(const hecl::ProjectPath& path) const {
|
||||
auto search = m_pathToTag.find(path.hash());
|
||||
if (search != m_pathToTag.cend())
|
||||
return search->second;
|
||||
return buildTagFromPath(path);
|
||||
}
|
||||
|
||||
bool SpecBase::waitForTagReady(const urde::SObjectTag& tag, const hecl::ProjectPath*& pathOut) {
|
||||
bool SpecBase::waitForTagReady(const metaforce::SObjectTag& tag, const hecl::ProjectPath*& pathOut) {
|
||||
std::unique_lock lk(m_backgroundIndexMutex);
|
||||
auto search = m_tagToPath.find(tag);
|
||||
if (search == m_tagToPath.end()) {
|
||||
|
@ -799,7 +799,7 @@ bool SpecBase::waitForTagReady(const urde::SObjectTag& tag, const hecl::ProjectP
|
|||
return true;
|
||||
}
|
||||
|
||||
const urde::SObjectTag* SpecBase::getResourceIdByName(std::string_view name) const {
|
||||
const metaforce::SObjectTag* SpecBase::getResourceIdByName(std::string_view name) const {
|
||||
std::string lower(name);
|
||||
std::transform(lower.cbegin(), lower.cend(), lower.begin(), tolower);
|
||||
|
||||
|
@ -823,12 +823,12 @@ const urde::SObjectTag* SpecBase::getResourceIdByName(std::string_view name) con
|
|||
return &search->second;
|
||||
}
|
||||
|
||||
FourCC SpecBase::getResourceTypeById(urde::CAssetId id) const {
|
||||
FourCC SpecBase::getResourceTypeById(metaforce::CAssetId id) const {
|
||||
if (!id.IsValid())
|
||||
return {};
|
||||
|
||||
std::unique_lock lk(m_backgroundIndexMutex);
|
||||
urde::SObjectTag searchTag = {FourCC(), id};
|
||||
metaforce::SObjectTag searchTag = {FourCC(), id};
|
||||
auto search = m_tagToPath.find(searchTag);
|
||||
if (search == m_tagToPath.end()) {
|
||||
if (m_backgroundRunning) {
|
||||
|
@ -849,7 +849,7 @@ FourCC SpecBase::getResourceTypeById(urde::CAssetId id) const {
|
|||
return search->first.type;
|
||||
}
|
||||
|
||||
void SpecBase::enumerateResources(const std::function<bool(const urde::SObjectTag&)>& lambda) const {
|
||||
void SpecBase::enumerateResources(const std::function<bool(const metaforce::SObjectTag&)>& lambda) const {
|
||||
waitForIndexComplete();
|
||||
for (const auto& pair : m_tagToPath) {
|
||||
if (!lambda(pair.first))
|
||||
|
@ -858,7 +858,7 @@ void SpecBase::enumerateResources(const std::function<bool(const urde::SObjectTa
|
|||
}
|
||||
|
||||
void SpecBase::enumerateNamedResources(
|
||||
const std::function<bool(std::string_view, const urde::SObjectTag&)>& lambda) const {
|
||||
const std::function<bool(std::string_view, const metaforce::SObjectTag&)>& lambda) const {
|
||||
waitForIndexComplete();
|
||||
for (const auto& pair : m_catalogNameToTag) {
|
||||
if (!lambda(pair.first, pair.second))
|
||||
|
@ -866,7 +866,7 @@ void SpecBase::enumerateNamedResources(
|
|||
}
|
||||
}
|
||||
|
||||
static void WriteTag(athena::io::YAMLDocWriter& cacheWriter, const urde::SObjectTag& pathTag,
|
||||
static void WriteTag(athena::io::YAMLDocWriter& cacheWriter, const metaforce::SObjectTag& pathTag,
|
||||
const hecl::ProjectPath& path) {
|
||||
auto key = fmt::format(FMT_STRING("{}"), pathTag.id);
|
||||
if (auto* existing = cacheWriter.getCurNode()->findMapChild(key)) {
|
||||
|
@ -877,7 +877,7 @@ static void WriteTag(athena::io::YAMLDocWriter& cacheWriter, const urde::SObject
|
|||
}
|
||||
}
|
||||
|
||||
static void WriteNameTag(athena::io::YAMLDocWriter& nameWriter, const urde::SObjectTag& pathTag,
|
||||
static void WriteNameTag(athena::io::YAMLDocWriter& nameWriter, const metaforce::SObjectTag& pathTag,
|
||||
std::string_view name) {
|
||||
nameWriter.writeString(name.data(), fmt::format(FMT_STRING("{}"), pathTag.id));
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ void SpecBase::readCatalog(const hecl::ProjectPath& catalogPath, athena::io::YAM
|
|||
}
|
||||
if (path.isNone())
|
||||
continue;
|
||||
urde::SObjectTag pathTag = tagFromPath(path);
|
||||
metaforce::SObjectTag pathTag = tagFromPath(path);
|
||||
if (pathTag) {
|
||||
std::unique_lock lk(m_backgroundIndexMutex);
|
||||
m_catalogNameToTag[pLower] = pathTag;
|
||||
|
@ -956,7 +956,7 @@ void SpecBase::backgroundIndexRecursiveCatalogs(const hecl::ProjectPath& dir, at
|
|||
}
|
||||
}
|
||||
|
||||
void SpecBase::insertPathTag(athena::io::YAMLDocWriter& cacheWriter, const urde::SObjectTag& tag,
|
||||
void SpecBase::insertPathTag(athena::io::YAMLDocWriter& cacheWriter, const metaforce::SObjectTag& tag,
|
||||
const hecl::ProjectPath& path, bool dump) {
|
||||
#if 0
|
||||
auto search = m_tagToPath.find(tag);
|
||||
|
@ -989,7 +989,7 @@ bool SpecBase::addFileToIndex(const hecl::ProjectPath& path, athena::io::YAMLDoc
|
|||
return true;
|
||||
|
||||
/* Classify intermediate into tag */
|
||||
urde::SObjectTag pathTag = buildTagFromPath(path);
|
||||
metaforce::SObjectTag pathTag = buildTagFromPath(path);
|
||||
if (pathTag) {
|
||||
std::unique_lock lk{m_backgroundIndexMutex};
|
||||
bool useGlob = false;
|
||||
|
@ -1085,7 +1085,7 @@ void SpecBase::backgroundIndexRecursiveProc(const hecl::ProjectPath& dir, athena
|
|||
if (hecl::ProjectPath(path, "!project.yaml").isFile() && hecl::ProjectPath(path, "!pool.yaml").isFile()) {
|
||||
/* Avoid redundant filesystem access for re-caches */
|
||||
if (m_pathToTag.find(path.hash()) == m_pathToTag.cend()) {
|
||||
urde::SObjectTag pathTag(SBIG('AGSC'), path.parsedHash32());
|
||||
metaforce::SObjectTag pathTag(SBIG('AGSC'), path.parsedHash32());
|
||||
insertPathTag(cacheWriter, pathTag, path);
|
||||
}
|
||||
} else {
|
||||
|
@ -1138,7 +1138,7 @@ void SpecBase::backgroundIndexProc() {
|
|||
if (node.m_seqChildren.size() >= 2) {
|
||||
unsigned long id = strtoul(child.first.c_str(), nullptr, 16);
|
||||
hecl::FourCC type(node.m_seqChildren[0]->m_scalarString.c_str());
|
||||
urde::SObjectTag pathTag(type, id);
|
||||
metaforce::SObjectTag pathTag(type, id);
|
||||
for (auto I = node.m_seqChildren.begin() + 1, E = node.m_seqChildren.end(); I != E; ++I) {
|
||||
hecl::ProjectPath path(m_project.getProjectWorkingPath(), (*I)->m_scalarString);
|
||||
if (!path.isNone())
|
||||
|
@ -1166,7 +1166,7 @@ void SpecBase::backgroundIndexProc() {
|
|||
m_catalogTagToNames.reserve(nameReader.getRootNode()->m_mapChildren.size());
|
||||
for (const auto& child : nameReader.getRootNode()->m_mapChildren) {
|
||||
unsigned long id = strtoul(child.second->m_scalarString.c_str(), nullptr, 16);
|
||||
auto search = m_tagToPath.find(urde::SObjectTag(FourCC(), uint32_t(id)));
|
||||
auto search = m_tagToPath.find(metaforce::SObjectTag(FourCC(), uint32_t(id)));
|
||||
if (search != m_tagToPath.cend()) {
|
||||
std::string chLower = child.first;
|
||||
std::transform(chLower.cbegin(), chLower.cend(), chLower.begin(), tolower);
|
||||
|
@ -1224,7 +1224,7 @@ void SpecBase::WriteVersionInfo(hecl::Database::Project& project, const hecl::Pr
|
|||
hecl::ProjectPath versionPath(pakPath, _SYS_STR("version.yaml"));
|
||||
versionPath.makeDirChain(false);
|
||||
|
||||
URDEVersionInfo info;
|
||||
MetaforceVersionInfo info;
|
||||
info.version = m_version;
|
||||
info.region = m_region;
|
||||
info.game = m_game;
|
||||
|
|
|
@ -57,7 +57,7 @@ struct SpecBase : hecl::Database::IDataSpec {
|
|||
virtual bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) = 0;
|
||||
|
||||
/* Convert path to object tag */
|
||||
virtual urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const = 0;
|
||||
virtual metaforce::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const = 0;
|
||||
|
||||
/* Even if PC spec is being cooked, this will return the vanilla GCN spec */
|
||||
virtual const hecl::Database::DataSpecEntry& getOriginalSpec() const = 0;
|
||||
|
@ -121,15 +121,15 @@ struct SpecBase : hecl::Database::IDataSpec {
|
|||
|
||||
virtual void buildWorldPakList(const hecl::ProjectPath& worldPath, const hecl::ProjectPath& worldPathCooked,
|
||||
hecl::blender::Token& btok, athena::io::FileWriter& w,
|
||||
std::vector<urde::SObjectTag>& listOut, atUint64& resTableOffset,
|
||||
std::unordered_map<urde::CAssetId, std::vector<uint8_t>>& mlvlData) {}
|
||||
std::vector<metaforce::SObjectTag>& listOut, atUint64& resTableOffset,
|
||||
std::unordered_map<metaforce::CAssetId, std::vector<uint8_t>>& mlvlData) {}
|
||||
virtual void buildPakList(hecl::blender::Token& btok, athena::io::FileWriter& w,
|
||||
const std::vector<urde::SObjectTag>& list,
|
||||
const std::vector<std::pair<urde::SObjectTag, std::string>>& nameList,
|
||||
const std::vector<metaforce::SObjectTag>& list,
|
||||
const std::vector<std::pair<metaforce::SObjectTag, std::string>>& nameList,
|
||||
atUint64& resTableOffset) {}
|
||||
virtual void writePakFileIndex(athena::io::FileWriter& w, const std::vector<urde::SObjectTag>& tags,
|
||||
virtual void writePakFileIndex(athena::io::FileWriter& w, const std::vector<metaforce::SObjectTag>& tags,
|
||||
const std::vector<std::tuple<size_t, size_t, bool>>& index, atUint64 resTableOffset) {}
|
||||
virtual std::pair<std::unique_ptr<uint8_t[]>, size_t> compressPakData(const urde::SObjectTag& tag,
|
||||
virtual std::pair<std::unique_ptr<uint8_t[]>, size_t> compressPakData(const metaforce::SObjectTag& tag,
|
||||
const uint8_t* data, size_t len) {
|
||||
return {};
|
||||
}
|
||||
|
@ -149,19 +149,19 @@ struct SpecBase : hecl::Database::IDataSpec {
|
|||
void extractRandomStaticEntropy(const uint8_t* buf, const hecl::ProjectPath& pakPath);
|
||||
|
||||
/* Tag cache functions */
|
||||
urde::SObjectTag tagFromPath(const hecl::ProjectPath& path) const;
|
||||
hecl::ProjectPath pathFromTag(const urde::SObjectTag& tag) const;
|
||||
bool waitForTagReady(const urde::SObjectTag& tag, const hecl::ProjectPath*& pathOut);
|
||||
const urde::SObjectTag* getResourceIdByName(std::string_view name) const;
|
||||
hecl::FourCC getResourceTypeById(urde::CAssetId id) const;
|
||||
void enumerateResources(const std::function<bool(const urde::SObjectTag&)>& lambda) const;
|
||||
void enumerateNamedResources(const std::function<bool(std::string_view, const urde::SObjectTag&)>& lambda) const;
|
||||
metaforce::SObjectTag tagFromPath(const hecl::ProjectPath& path) const;
|
||||
hecl::ProjectPath pathFromTag(const metaforce::SObjectTag& tag) const;
|
||||
bool waitForTagReady(const metaforce::SObjectTag& tag, const hecl::ProjectPath*& pathOut);
|
||||
const metaforce::SObjectTag* getResourceIdByName(std::string_view name) const;
|
||||
hecl::FourCC getResourceTypeById(metaforce::CAssetId id) const;
|
||||
void enumerateResources(const std::function<bool(const metaforce::SObjectTag&)>& lambda) const;
|
||||
void enumerateNamedResources(const std::function<bool(std::string_view, const metaforce::SObjectTag&)>& lambda) const;
|
||||
void cancelBackgroundIndex();
|
||||
void beginBackgroundIndex();
|
||||
bool backgroundIndexRunning() const { return m_backgroundRunning; }
|
||||
void waitForIndexComplete() const;
|
||||
|
||||
virtual void getTagListForFile(const char* pakName, std::vector<urde::SObjectTag>& out) const {}
|
||||
virtual void getTagListForFile(const char* pakName, std::vector<metaforce::SObjectTag>& out) const {}
|
||||
|
||||
SpecBase(const hecl::Database::DataSpecEntry* specEntry, hecl::Database::Project& project, bool pc);
|
||||
~SpecBase();
|
||||
|
@ -171,10 +171,10 @@ protected:
|
|||
bool m_pc;
|
||||
hecl::ProjectPath m_masterShader;
|
||||
|
||||
std::unordered_multimap<urde::SObjectTag, hecl::ProjectPath> m_tagToPath;
|
||||
std::unordered_map<hecl::Hash, urde::SObjectTag> m_pathToTag;
|
||||
std::unordered_map<std::string, urde::SObjectTag> m_catalogNameToTag;
|
||||
std::unordered_map<urde::SObjectTag, std::unordered_set<std::string>> m_catalogTagToNames;
|
||||
std::unordered_multimap<metaforce::SObjectTag, hecl::ProjectPath> m_tagToPath;
|
||||
std::unordered_map<hecl::Hash, metaforce::SObjectTag> m_pathToTag;
|
||||
std::unordered_map<std::string, metaforce::SObjectTag> m_catalogNameToTag;
|
||||
std::unordered_map<metaforce::SObjectTag, std::unordered_set<std::string>> m_catalogTagToNames;
|
||||
void clearTagCache();
|
||||
|
||||
hecl::blender::Token m_backgroundBlender;
|
||||
|
@ -183,7 +183,7 @@ protected:
|
|||
bool m_backgroundRunning = false;
|
||||
|
||||
void readCatalog(const hecl::ProjectPath& catalogPath, athena::io::YAMLDocWriter& nameWriter);
|
||||
void insertPathTag(athena::io::YAMLDocWriter& cacheWriter, const urde::SObjectTag& tag, const hecl::ProjectPath& path,
|
||||
void insertPathTag(athena::io::YAMLDocWriter& cacheWriter, const metaforce::SObjectTag& tag, const hecl::ProjectPath& path,
|
||||
bool dump = true);
|
||||
bool addFileToIndex(const hecl::ProjectPath& path, athena::io::YAMLDocWriter& cacheWriter);
|
||||
void backgroundIndexRecursiveProc(const hecl::ProjectPath& path, athena::io::YAMLDocWriter& cacheWriter,
|
||||
|
@ -192,13 +192,13 @@ protected:
|
|||
int level);
|
||||
void backgroundIndexProc();
|
||||
|
||||
void recursiveBuildResourceList(std::vector<urde::SObjectTag>& listOut,
|
||||
std::unordered_set<urde::SObjectTag>& addedTags, const hecl::ProjectPath& path,
|
||||
void recursiveBuildResourceList(std::vector<metaforce::SObjectTag>& listOut,
|
||||
std::unordered_set<metaforce::SObjectTag>& addedTags, const hecl::ProjectPath& path,
|
||||
hecl::blender::Token& btok);
|
||||
void copyBuildListData(std::vector<std::tuple<size_t, size_t, bool>>& fileIndex,
|
||||
const std::vector<urde::SObjectTag>& buildList, const hecl::Database::DataSpecEntry* entry,
|
||||
const std::vector<metaforce::SObjectTag>& buildList, const hecl::Database::DataSpecEntry* entry,
|
||||
bool fast, const hecl::MultiProgressPrinter& progress, athena::io::FileWriter& pakOut,
|
||||
const std::unordered_map<urde::CAssetId, std::vector<uint8_t>>& mlvlData);
|
||||
const std::unordered_map<metaforce::CAssetId, std::vector<uint8_t>>& mlvlData);
|
||||
|
||||
std::unique_ptr<nod::DiscBase> m_disc;
|
||||
bool m_isWii{};
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "DNACommon/DPSC.hpp"
|
||||
#include "DNACommon/DGRP.hpp"
|
||||
#include "DNACommon/MAPU.hpp"
|
||||
#include "DNACommon/URDEVersionInfo.hpp"
|
||||
#include "DNACommon/MetaforceVersionInfo.hpp"
|
||||
#include "DNACommon/Tweaks/TweakWriter.hpp"
|
||||
#include "DNAMP1/Tweaks/CTweakPlayerRes.hpp"
|
||||
#include "DNAMP1/Tweaks/CTweakGunRes.hpp"
|
||||
|
@ -57,7 +57,7 @@ namespace DataSpec {
|
|||
|
||||
using namespace std::literals;
|
||||
|
||||
static logvisor::Module Log("urde::SpecMP1");
|
||||
static logvisor::Module Log("metaforce::SpecMP1");
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP1;
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP1PC;
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP1ORIG;
|
||||
|
@ -473,7 +473,7 @@ struct SpecMP1 : SpecBase {
|
|||
});
|
||||
}
|
||||
|
||||
urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override {
|
||||
metaforce::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override {
|
||||
if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _SYS_STR(".CSKR")))
|
||||
return {SBIG('CSKR'), path.parsedHash32()};
|
||||
else if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _SYS_STR(".ANIM")))
|
||||
|
@ -542,7 +542,7 @@ struct SpecMP1 : SpecBase {
|
|||
athena::io::YAMLDocReader reader;
|
||||
yaml_parser_set_input_file(reader.getParser(), fp.get());
|
||||
|
||||
urde::SObjectTag resTag;
|
||||
metaforce::SObjectTag resTag;
|
||||
if (reader.ClassTypeOperation([&](std::string_view className) {
|
||||
if (className == DNAParticle::GPSM<UniqueID32>::DNAType()) {
|
||||
resTag.type = SBIG('PART');
|
||||
|
@ -634,7 +634,7 @@ struct SpecMP1 : SpecBase {
|
|||
return {};
|
||||
}
|
||||
|
||||
void getTagListForFile(const char* pakName, std::vector<urde::SObjectTag>& out) const override {
|
||||
void getTagListForFile(const char* pakName, std::vector<metaforce::SObjectTag>& out) const override {
|
||||
std::string pathPrefix("MP1/");
|
||||
pathPrefix += pakName;
|
||||
pathPrefix += '/';
|
||||
|
@ -992,9 +992,9 @@ struct SpecMP1 : SpecBase {
|
|||
}
|
||||
|
||||
void buildWorldPakList(const hecl::ProjectPath& worldPath, const hecl::ProjectPath& worldPathCooked,
|
||||
hecl::blender::Token& btok, athena::io::FileWriter& w, std::vector<urde::SObjectTag>& listOut,
|
||||
hecl::blender::Token& btok, athena::io::FileWriter& w, std::vector<metaforce::SObjectTag>& listOut,
|
||||
atUint64& resTableOffset,
|
||||
std::unordered_map<urde::CAssetId, std::vector<uint8_t>>& mlvlData) override {
|
||||
std::unordered_map<metaforce::CAssetId, std::vector<uint8_t>>& mlvlData) override {
|
||||
DNAMP1::MLVL mlvl;
|
||||
{
|
||||
athena::io::FileReader r(worldPathCooked.getAbsolutePath());
|
||||
|
@ -1016,7 +1016,7 @@ struct SpecMP1 : SpecBase {
|
|||
}
|
||||
listOut.reserve(count);
|
||||
|
||||
urde::SObjectTag worldTag = tagFromPath(worldPath.getWithExtension(_SYS_STR(".*"), true));
|
||||
metaforce::SObjectTag worldTag = tagFromPath(worldPath.getWithExtension(_SYS_STR(".*"), true));
|
||||
|
||||
w.writeUint32Big(m_pc ? 0x80030005 : 0x00030005);
|
||||
w.writeUint32Big(0);
|
||||
|
@ -1030,19 +1030,19 @@ struct SpecMP1 : SpecBase {
|
|||
nameEnt.name = parentDir.getLastComponentUTF8();
|
||||
nameEnt.write(w);
|
||||
|
||||
std::unordered_set<urde::CAssetId> addedTags;
|
||||
std::unordered_set<metaforce::CAssetId> addedTags;
|
||||
for (auto& area : mlvl.areas) {
|
||||
urde::SObjectTag areaTag(FOURCC('MREA'), area.areaMREAId.toUint64());
|
||||
metaforce::SObjectTag areaTag(FOURCC('MREA'), area.areaMREAId.toUint64());
|
||||
|
||||
bool dupeRes = false;
|
||||
if (hecl::ProjectPath areaDir = pathFromTag(areaTag).getParentPath())
|
||||
dupeRes = hecl::ProjectPath(areaDir, _SYS_STR("!duperes")).isFile();
|
||||
|
||||
urde::SObjectTag nameTag(FOURCC('STRG'), area.areaNameId.toUint64());
|
||||
metaforce::SObjectTag nameTag(FOURCC('STRG'), area.areaNameId.toUint64());
|
||||
if (nameTag)
|
||||
listOut.push_back(nameTag);
|
||||
for (const auto& dep : area.deps) {
|
||||
urde::CAssetId newId = dep.id.toUint64();
|
||||
metaforce::CAssetId newId = dep.id.toUint64();
|
||||
if (dupeRes || addedTags.find(newId) == addedTags.end()) {
|
||||
listOut.emplace_back(dep.type, newId);
|
||||
addedTags.insert(newId);
|
||||
|
@ -1077,18 +1077,18 @@ struct SpecMP1 : SpecBase {
|
|||
area.depLayers = std::move(strippedDepLayers);
|
||||
}
|
||||
|
||||
urde::SObjectTag nameTag(FOURCC('STRG'), mlvl.worldNameId.toUint64());
|
||||
metaforce::SObjectTag nameTag(FOURCC('STRG'), mlvl.worldNameId.toUint64());
|
||||
if (nameTag)
|
||||
listOut.push_back(nameTag);
|
||||
|
||||
urde::SObjectTag savwTag(FOURCC('SAVW'), mlvl.saveWorldId.toUint64());
|
||||
metaforce::SObjectTag savwTag(FOURCC('SAVW'), mlvl.saveWorldId.toUint64());
|
||||
if (savwTag) {
|
||||
if (hecl::ProjectPath savwPath = pathFromTag(savwTag))
|
||||
m_project.cookPath(savwPath, {}, false, true);
|
||||
listOut.push_back(savwTag);
|
||||
}
|
||||
|
||||
urde::SObjectTag mapTag(FOURCC('MAPW'), mlvl.worldMap.toUint64());
|
||||
metaforce::SObjectTag mapTag(FOURCC('MAPW'), mlvl.worldMap.toUint64());
|
||||
if (mapTag) {
|
||||
if (hecl::ProjectPath mapPath = pathFromTag(mapTag)) {
|
||||
m_project.cookPath(mapPath, {}, false, true);
|
||||
|
@ -1111,7 +1111,7 @@ struct SpecMP1 : SpecBase {
|
|||
listOut.push_back(mapTag);
|
||||
}
|
||||
|
||||
urde::SObjectTag skyboxTag(FOURCC('CMDL'), mlvl.worldSkyboxId.toUint64());
|
||||
metaforce::SObjectTag skyboxTag(FOURCC('CMDL'), mlvl.worldSkyboxId.toUint64());
|
||||
if (skyboxTag) {
|
||||
listOut.push_back(skyboxTag);
|
||||
hecl::ProjectPath skyboxPath = pathFromTag(skyboxTag);
|
||||
|
@ -1119,7 +1119,7 @@ struct SpecMP1 : SpecBase {
|
|||
auto data = btok.getBlenderConnection().beginData();
|
||||
std::vector<hecl::ProjectPath> textures = data.getTextures();
|
||||
for (const auto& tex : textures) {
|
||||
urde::SObjectTag texTag = tagFromPath(tex);
|
||||
metaforce::SObjectTag texTag = tagFromPath(tex);
|
||||
if (!texTag)
|
||||
Log.report(logvisor::Fatal, FMT_STRING(_SYS_STR("Unable to resolve {}")), tex.getRelativePath());
|
||||
listOut.push_back(texTag);
|
||||
|
@ -1151,8 +1151,8 @@ struct SpecMP1 : SpecBase {
|
|||
}
|
||||
}
|
||||
|
||||
void buildPakList(hecl::blender::Token& btok, athena::io::FileWriter& w, const std::vector<urde::SObjectTag>& list,
|
||||
const std::vector<std::pair<urde::SObjectTag, std::string>>& nameList,
|
||||
void buildPakList(hecl::blender::Token& btok, athena::io::FileWriter& w, const std::vector<metaforce::SObjectTag>& list,
|
||||
const std::vector<std::pair<metaforce::SObjectTag, std::string>>& nameList,
|
||||
atUint64& resTableOffset) override {
|
||||
w.writeUint32Big(m_pc ? 0x80030005 : 0x00030005);
|
||||
w.writeUint32Big(0);
|
||||
|
@ -1180,13 +1180,13 @@ struct SpecMP1 : SpecBase {
|
|||
}
|
||||
}
|
||||
|
||||
void writePakFileIndex(athena::io::FileWriter& w, const std::vector<urde::SObjectTag>& tags,
|
||||
void writePakFileIndex(athena::io::FileWriter& w, const std::vector<metaforce::SObjectTag>& tags,
|
||||
const std::vector<std::tuple<size_t, size_t, bool>>& index, atUint64 resTableOffset) override {
|
||||
w.seek(resTableOffset, athena::SeekOrigin::Begin);
|
||||
|
||||
auto it = tags.begin();
|
||||
for (const auto& item : index) {
|
||||
const urde::SObjectTag& tag = *it++;
|
||||
const metaforce::SObjectTag& tag = *it++;
|
||||
DNAMP1::PAK::Entry ent;
|
||||
ent.compressed = atUint32(std::get<2>(item));
|
||||
ent.type = tag.type;
|
||||
|
@ -1197,7 +1197,7 @@ struct SpecMP1 : SpecBase {
|
|||
}
|
||||
}
|
||||
|
||||
std::pair<std::unique_ptr<uint8_t[]>, size_t> compressPakData(const urde::SObjectTag& tag, const uint8_t* data,
|
||||
std::pair<std::unique_ptr<uint8_t[]>, size_t> compressPakData(const metaforce::SObjectTag& tag, const uint8_t* data,
|
||||
size_t len) override {
|
||||
bool doCompress = false;
|
||||
switch (tag.type.toUint32()) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "DNACommon/MAPU.hpp"
|
||||
#include "DNACommon/PATH.hpp"
|
||||
#include "DNACommon/TXTR.hpp"
|
||||
#include "DNACommon/URDEVersionInfo.hpp"
|
||||
#include "DNACommon/MetaforceVersionInfo.hpp"
|
||||
|
||||
#include "hecl/ClientProcess.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
@ -25,7 +25,7 @@ namespace DataSpec {
|
|||
|
||||
using namespace std::literals;
|
||||
|
||||
static logvisor::Module Log("urde::SpecMP2");
|
||||
static logvisor::Module Log("metaforce::SpecMP2");
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP2;
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP2ORIG;
|
||||
|
||||
|
@ -350,7 +350,7 @@ struct SpecMP2 : SpecBase {
|
|||
});
|
||||
}
|
||||
|
||||
urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; }
|
||||
metaforce::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; }
|
||||
|
||||
void cookMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast,
|
||||
hecl::blender::Token& btok, FCookProgress progress) override {}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "DataSpec/DNAMP3/MAPA.hpp"
|
||||
#include "DataSpec/DNAMP2/STRG.hpp"
|
||||
#include "DataSpec/DNACommon/TXTR.hpp"
|
||||
#include "DataSpec/DNACommon/URDEVersionInfo.hpp"
|
||||
#include "DataSpec/DNACommon/MetaforceVersionInfo.hpp"
|
||||
|
||||
#include "hecl/ClientProcess.hpp"
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
|
@ -22,7 +22,7 @@ namespace DataSpec {
|
|||
|
||||
using namespace std::literals;
|
||||
|
||||
static logvisor::Module Log("urde::SpecMP3");
|
||||
static logvisor::Module Log("metaforce::SpecMP3");
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP3;
|
||||
extern hecl::Database::DataSpecEntry SpecEntMP3ORIG;
|
||||
|
||||
|
@ -516,7 +516,7 @@ struct SpecMP3 : SpecBase {
|
|||
return false;
|
||||
}
|
||||
|
||||
urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; }
|
||||
metaforce::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; }
|
||||
|
||||
void cookMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast,
|
||||
hecl::blender::Token& btok, FCookProgress progress) override {}
|
||||
|
|
|
@ -5,8 +5,8 @@ add_subdirectory(badging)
|
|||
unset(URDE_PLAT_LIBS)
|
||||
|
||||
if(WIN32)
|
||||
configure_file(platforms/win/urde.rc.in "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/urde.rc" @ONLY)
|
||||
set(PLAT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/urde.rc" platforms/win/urde.manifest)
|
||||
configure_file(platforms/win/metaforce.rc.in "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/metaforce.rc" @ONLY)
|
||||
set(PLAT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/metaforce.rc" platforms/win/metaforce.manifest)
|
||||
if(WINDOWS_STORE)
|
||||
set(UWP_ASSETS
|
||||
platforms/win/Assets/LargeTile.scale-100.png
|
||||
|
@ -39,11 +39,11 @@ if(WIN32)
|
|||
platforms/win/Assets/Square150x150Logo.scale-150.png
|
||||
platforms/win/Assets/Square150x150Logo.scale-200.png
|
||||
platforms/win/Assets/Square150x150Logo.scale-400.png
|
||||
platforms/win/Assets/urde.scale-100.png
|
||||
platforms/win/Assets/urde.scale-125.png
|
||||
platforms/win/Assets/urde.scale-150.png
|
||||
platforms/win/Assets/urde.scale-200.png
|
||||
platforms/win/Assets/urde.scale-400.png
|
||||
platforms/win/Assets/metaforce.scale-100.png
|
||||
platforms/win/Assets/metaforce.scale-125.png
|
||||
platforms/win/Assets/metaforce.scale-150.png
|
||||
platforms/win/Assets/metaforce.scale-200.png
|
||||
platforms/win/Assets/metaforce.scale-400.png
|
||||
platforms/win/Assets/WideTile.scale-100.png
|
||||
platforms/win/Assets/WideTile.scale-125.png
|
||||
platforms/win/Assets/WideTile.scale-150.png
|
||||
|
@ -84,8 +84,8 @@ target_include_directories(metaforce PUBLIC
|
|||
${CMAKE_BINARY_DIR})
|
||||
|
||||
target_link_libraries(metaforce
|
||||
UrdeIcons
|
||||
UrdeBadging
|
||||
MetaforceIcons
|
||||
MetaforceBadging
|
||||
RuntimeCommon
|
||||
amuse
|
||||
RetroDataSpec
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class Camera {
|
||||
zeus::CFrustum m_frustum;
|
||||
zeus::CProjection m_projection;
|
||||
|
@ -22,4 +22,4 @@ public:
|
|||
|
||||
virtual void think() {}
|
||||
};
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "GameMode.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
void GameMode::think() { ViewerSpace::think(); }
|
||||
|
||||
void GameMode::View::draw(boo::IGraphicsCommandQueue* gfxQ) {
|
||||
|
@ -8,4 +8,4 @@ void GameMode::View::draw(boo::IGraphicsCommandQueue* gfxQ) {
|
|||
m_gMode.m_main->Draw();
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ViewManager.hpp"
|
||||
#include "Runtime/IMain.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class GameMode : public ViewerSpace {
|
||||
std::shared_ptr<IMain> m_main;
|
||||
|
||||
|
@ -51,4 +51,4 @@ public:
|
|||
|
||||
bool usesToolbar() const override { return m_state.showToolbar; }
|
||||
};
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#include "InformationCenter.hpp"
|
||||
|
||||
namespace urde {}
|
||||
namespace metaforce {}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "Space.hpp"
|
||||
#include "ViewManager.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class InformationCenter : public ViewerSpace {
|
||||
struct State : Space::State {
|
||||
AT_DECL_DNA_YAMLV
|
||||
|
@ -47,4 +47,4 @@ public:
|
|||
|
||||
bool usesToolbar() const override { return true; }
|
||||
};
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "ModelViewer.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
void ModelViewer::View::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) {
|
||||
specter::View::resized(root, sub);
|
||||
m_scissorRect = sub;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ViewManager.hpp"
|
||||
#include "Camera.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class ModelViewer : public ViewerSpace {
|
||||
struct State : Space::State {
|
||||
AT_DECL_DNA_YAMLV
|
||||
|
@ -17,7 +17,7 @@ class ModelViewer : public ViewerSpace {
|
|||
} m_state;
|
||||
|
||||
const Space::State& spaceState() const override { return m_state; }
|
||||
std::unique_ptr<urde::CLineRenderer> m_lineRenderer;
|
||||
std::unique_ptr<metaforce::CLineRenderer> m_lineRenderer;
|
||||
struct View : specter::View {
|
||||
ModelViewer& m_mv;
|
||||
boo::SWindowRect m_scissorRect;
|
||||
|
@ -33,7 +33,7 @@ class ModelViewer : public ViewerSpace {
|
|||
public:
|
||||
ModelViewer(ViewManager& vm, Space* parent) : ViewerSpace(vm, Class::ModelViewer, parent) {
|
||||
reloadState();
|
||||
m_lineRenderer.reset(new urde::CLineRenderer(urde::CLineRenderer::EPrimitiveMode::LineStrip, 4, nullptr, true));
|
||||
m_lineRenderer.reset(new metaforce::CLineRenderer(metaforce::CLineRenderer::EPrimitiveMode::LineStrip, 4, nullptr, true));
|
||||
}
|
||||
|
||||
ModelViewer(ViewManager& vm, Space* parent, const ModelViewer& other) : ModelViewer(vm, parent) {
|
||||
|
@ -61,4 +61,4 @@ public:
|
|||
bool usesToolbar() const override { return true; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#include "ParticleEditor.hpp"
|
||||
|
||||
namespace urde {}
|
||||
namespace metaforce {}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Space.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
class EffectEditor : public EditorSpace {
|
||||
struct State : Space::State {
|
||||
|
@ -29,4 +29,4 @@ public:
|
|||
bool usesToolbar() const override { return true; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "hecl/Blender/Connection.hpp"
|
||||
#include "version.h"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("URDE::ProjectManager");
|
||||
ProjectManager* ProjectManager::g_SharedManager = nullptr;
|
||||
|
||||
|
@ -113,8 +113,8 @@ bool ProjectManager::openProject(hecl::SystemStringView path) {
|
|||
return true;
|
||||
};
|
||||
|
||||
const hecl::ProjectPath urdeSpacesPath(*m_proj, _SYS_STR(".hecl/urde_spaces.yaml"));
|
||||
athena::io::FileReader reader(urdeSpacesPath.getAbsolutePath());
|
||||
const hecl::ProjectPath metaforceSpacesPath(*m_proj, _SYS_STR(".hecl/metaforce_spaces.yaml"));
|
||||
athena::io::FileReader reader(metaforceSpacesPath.getAbsolutePath());
|
||||
|
||||
if (!reader.isOpen()) {
|
||||
return makeProj(true);
|
||||
|
@ -126,7 +126,7 @@ bool ProjectManager::openProject(hecl::SystemStringView path) {
|
|||
};
|
||||
|
||||
yaml_parser_set_input(r.getParser(), readHandler, &reader);
|
||||
if (!r.ValidateClassType("UrdeSpacesState")) {
|
||||
if (!r.ValidateClassType("MetaforceSpacesState")) {
|
||||
return makeProj(true);
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ bool ProjectManager::saveProject() {
|
|||
if (!m_proj)
|
||||
return false;
|
||||
|
||||
hecl::ProjectPath oldSpacesPath(*m_proj, _SYS_STR(".hecl/~urde_spaces.yaml"));
|
||||
hecl::ProjectPath oldSpacesPath(*m_proj, _SYS_STR(".hecl/~metaforce_spaces.yaml"));
|
||||
athena::io::FileWriter writer(oldSpacesPath.getAbsolutePath());
|
||||
if (!writer.isOpen())
|
||||
return false;
|
||||
|
@ -155,7 +155,7 @@ bool ProjectManager::saveProject() {
|
|||
if (!w.finish(&writer))
|
||||
return false;
|
||||
|
||||
hecl::ProjectPath newSpacesPath(*m_proj, _SYS_STR(".hecl/urde_spaces.yaml"));
|
||||
hecl::ProjectPath newSpacesPath(*m_proj, _SYS_STR(".hecl/metaforce_spaces.yaml"));
|
||||
|
||||
hecl::Unlink(newSpacesPath.getAbsolutePath().data());
|
||||
hecl::Rename(oldSpacesPath.getAbsolutePath().data(), newSpacesPath.getAbsolutePath().data());
|
||||
|
@ -197,4 +197,4 @@ void ProjectManager::shutdown() {
|
|||
hecl::blender::Connection::Shutdown();
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "hecl/Runtime.hpp"
|
||||
#include "MP1/MP1.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class ViewManager;
|
||||
|
||||
using ConfigReader = athena::io::YAMLDocReader;
|
||||
|
@ -55,4 +55,4 @@ public:
|
|||
void shutdown();
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
namespace urde {
|
||||
static logvisor::Module Log("urde::ProjectResourceFactoryBase");
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("metaforce::ProjectResourceFactoryBase");
|
||||
|
||||
void ProjectResourceFactoryBase::BeginBackgroundIndex(hecl::Database::Project& proj,
|
||||
const hecl::Database::DataSpecEntry& origSpec,
|
||||
|
@ -47,7 +47,7 @@ CFactoryFnReturn ProjectResourceFactoryBase::BuildSync(const SObjectTag& tag, co
|
|||
return ret;
|
||||
}
|
||||
|
||||
void ProjectResourceFactoryBase::AsyncTask::EnsurePath(const urde::SObjectTag& tag, const hecl::ProjectPath& path) {
|
||||
void ProjectResourceFactoryBase::AsyncTask::EnsurePath(const metaforce::SObjectTag& tag, const hecl::ProjectPath& path) {
|
||||
if (!m_workingPath) {
|
||||
m_workingPath = path;
|
||||
|
||||
|
@ -64,7 +64,7 @@ void ProjectResourceFactoryBase::AsyncTask::EnsurePath(const urde::SObjectTag& t
|
|||
m_cookedPath = path.getCookedPath(*m_parent.m_origSpec);
|
||||
if (!m_cookedPath.isFile() || m_cookedPath.getModtime() < path.getModtime()) {
|
||||
/* Last chance type validation */
|
||||
urde::SObjectTag verifyTag = m_parent.TagFromPath(path);
|
||||
metaforce::SObjectTag verifyTag = m_parent.TagFromPath(path);
|
||||
if (verifyTag.type != tag.type) {
|
||||
Log.report(logvisor::Error, FMT_STRING(_SYS_STR("{}: expected type '{}', found '{}'")), path.getRelativePath(),
|
||||
tag.type, verifyTag.type);
|
||||
|
@ -181,7 +181,7 @@ bool ProjectResourceFactoryBase::PrepForReadSync(const SObjectTag& tag, const he
|
|||
cooked = path.getCookedPath(*m_origSpec);
|
||||
if (!cooked.isFile() || cooked.getModtime() < path.getModtime()) {
|
||||
/* Last chance type validation */
|
||||
urde::SObjectTag verifyTag = TagFromPath(path);
|
||||
metaforce::SObjectTag verifyTag = TagFromPath(path);
|
||||
if (verifyTag.type != tag.type) {
|
||||
Log.report(logvisor::Error, FMT_STRING(_SYS_STR("{}: expected type '{}', found '{}'")), path.getRelativePath(),
|
||||
tag.type, verifyTag.type);
|
||||
|
@ -211,8 +211,8 @@ bool ProjectResourceFactoryBase::PrepForReadSync(const SObjectTag& tag, const he
|
|||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<urde::IObj> ProjectResourceFactoryBase::Build(const urde::SObjectTag& tag,
|
||||
const urde::CVParamTransfer& paramXfer,
|
||||
std::unique_ptr<metaforce::IObj> ProjectResourceFactoryBase::Build(const metaforce::SObjectTag& tag,
|
||||
const metaforce::CVParamTransfer& paramXfer,
|
||||
CObjectReference* selfRef) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id on type '{}'"), tag.type);
|
||||
|
@ -261,17 +261,17 @@ std::unique_ptr<urde::IObj> ProjectResourceFactoryBase::Build(const urde::SObjec
|
|||
return BuildSync(tag, *resPath, paramXfer, selfRef);
|
||||
}
|
||||
|
||||
std::shared_ptr<AsyncTask> ProjectResourceFactoryBase::BuildAsyncInternal(const urde::SObjectTag& tag,
|
||||
const urde::CVParamTransfer& paramXfer,
|
||||
std::unique_ptr<urde::IObj>* objOut,
|
||||
std::shared_ptr<AsyncTask> ProjectResourceFactoryBase::BuildAsyncInternal(const metaforce::SObjectTag& tag,
|
||||
const metaforce::CVParamTransfer& paramXfer,
|
||||
std::unique_ptr<metaforce::IObj>* objOut,
|
||||
CObjectReference* selfRef) {
|
||||
if (m_asyncLoadMap.find(tag) != m_asyncLoadMap.end())
|
||||
return {};
|
||||
return _AddTask(std::make_unique<AsyncTask>(*this, tag, objOut, paramXfer, selfRef));
|
||||
}
|
||||
|
||||
void ProjectResourceFactoryBase::BuildAsync(const urde::SObjectTag& tag, const urde::CVParamTransfer& paramXfer,
|
||||
std::unique_ptr<urde::IObj>* objOut, CObjectReference* selfRef) {
|
||||
void ProjectResourceFactoryBase::BuildAsync(const metaforce::SObjectTag& tag, const metaforce::CVParamTransfer& paramXfer,
|
||||
std::unique_ptr<metaforce::IObj>* objOut, CObjectReference* selfRef) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id on type '{}'"), tag.type);
|
||||
|
||||
|
@ -295,27 +295,27 @@ u32 ProjectResourceFactoryBase::ResourceSize(const SObjectTag& tag) {
|
|||
return fr->length();
|
||||
}
|
||||
|
||||
std::shared_ptr<urde::IDvdRequest> ProjectResourceFactoryBase::LoadResourceAsync(const urde::SObjectTag& tag,
|
||||
std::shared_ptr<metaforce::IDvdRequest> ProjectResourceFactoryBase::LoadResourceAsync(const metaforce::SObjectTag& tag,
|
||||
void* target) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
if (m_asyncLoadMap.find(tag) != m_asyncLoadMap.end())
|
||||
return {};
|
||||
return std::static_pointer_cast<urde::IDvdRequest>(
|
||||
return std::static_pointer_cast<metaforce::IDvdRequest>(
|
||||
_AddTask(std::make_shared<AsyncTask>(*this, tag, reinterpret_cast<u8*>(target))));
|
||||
}
|
||||
|
||||
std::shared_ptr<urde::IDvdRequest> ProjectResourceFactoryBase::LoadResourcePartAsync(const urde::SObjectTag& tag,
|
||||
std::shared_ptr<metaforce::IDvdRequest> ProjectResourceFactoryBase::LoadResourcePartAsync(const metaforce::SObjectTag& tag,
|
||||
u32 off, u32 size, void* target) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
if (m_asyncLoadMap.find(tag) != m_asyncLoadMap.end())
|
||||
return {};
|
||||
return std::static_pointer_cast<urde::IDvdRequest>(
|
||||
return std::static_pointer_cast<metaforce::IDvdRequest>(
|
||||
_AddTask(std::make_shared<AsyncTask>(*this, tag, reinterpret_cast<u8*>(target), size, off)));
|
||||
}
|
||||
|
||||
std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadResourceSync(const urde::SObjectTag& tag) {
|
||||
std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadResourceSync(const metaforce::SObjectTag& tag) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
|
||||
|
@ -332,7 +332,7 @@ std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadResourceSync(const urde::S
|
|||
return fr->readUBytes(fr->length());
|
||||
}
|
||||
|
||||
std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off,
|
||||
std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadNewResourcePartSync(const metaforce::SObjectTag& tag, u32 off,
|
||||
u32 size) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
|
@ -352,7 +352,7 @@ std::unique_ptr<u8[]> ProjectResourceFactoryBase::LoadNewResourcePartSync(const
|
|||
return fr->readUBytes(sz);
|
||||
}
|
||||
|
||||
std::shared_ptr<AsyncTask> ProjectResourceFactoryBase::CookResourceAsync(const urde::SObjectTag& tag) {
|
||||
std::shared_ptr<AsyncTask> ProjectResourceFactoryBase::CookResourceAsync(const metaforce::SObjectTag& tag) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
if (m_asyncLoadMap.find(tag) != m_asyncLoadMap.end())
|
||||
|
@ -360,9 +360,9 @@ std::shared_ptr<AsyncTask> ProjectResourceFactoryBase::CookResourceAsync(const u
|
|||
return _AddTask(std::make_shared<AsyncTask>(*this, tag));
|
||||
}
|
||||
|
||||
void ProjectResourceFactoryBase::CancelBuild(const urde::SObjectTag& tag) { _RemoveTask(tag); }
|
||||
void ProjectResourceFactoryBase::CancelBuild(const metaforce::SObjectTag& tag) { _RemoveTask(tag); }
|
||||
|
||||
bool ProjectResourceFactoryBase::CanBuild(const urde::SObjectTag& tag) {
|
||||
bool ProjectResourceFactoryBase::CanBuild(const metaforce::SObjectTag& tag) {
|
||||
if (!tag.id.IsValid())
|
||||
Log.report(logvisor::Fatal, FMT_STRING("attempted to access null id"));
|
||||
|
||||
|
@ -376,7 +376,7 @@ bool ProjectResourceFactoryBase::CanBuild(const urde::SObjectTag& tag) {
|
|||
return false;
|
||||
}
|
||||
|
||||
const urde::SObjectTag* ProjectResourceFactoryBase::GetResourceIdByName(std::string_view name) const {
|
||||
const metaforce::SObjectTag* ProjectResourceFactoryBase::GetResourceIdByName(std::string_view name) const {
|
||||
return static_cast<DataSpec::SpecBase&>(*m_cookSpec).getResourceIdByName(name);
|
||||
}
|
||||
|
||||
|
@ -464,4 +464,4 @@ void ProjectResourceFactoryBase::AsyncIdle() {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
#include <hecl/ClientProcess.hpp>
|
||||
#include <hecl/Database.hpp>
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
class ProjectResourceFactoryBase : public IFactory {
|
||||
friend class ProjectResourcePool;
|
||||
hecl::ClientProcess& m_clientProc;
|
||||
|
||||
public:
|
||||
struct AsyncTask : urde::IDvdRequest {
|
||||
struct AsyncTask : metaforce::IDvdRequest {
|
||||
ProjectResourceFactoryBase& m_parent;
|
||||
|
||||
SObjectTag x0_tag;
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
/* Cook only */
|
||||
AsyncTask(ProjectResourceFactoryBase& parent, const SObjectTag& tag) : m_parent(parent), x0_tag(tag) {}
|
||||
|
||||
void EnsurePath(const urde::SObjectTag& tag, const hecl::ProjectPath& path);
|
||||
void EnsurePath(const metaforce::SObjectTag& tag, const hecl::ProjectPath& path);
|
||||
void CookComplete();
|
||||
bool AsyncPump();
|
||||
void WaitUntilComplete() override;
|
||||
|
@ -78,7 +78,7 @@ protected:
|
|||
const hecl::Database::DataSpecEntry* m_pcSpec = nullptr;
|
||||
/* Used to resolve cooked paths */
|
||||
std::unique_ptr<hecl::Database::IDataSpec> m_cookSpec;
|
||||
urde::CFactoryMgr m_factoryMgr;
|
||||
metaforce::CFactoryMgr m_factoryMgr;
|
||||
|
||||
std::list<std::shared_ptr<AsyncTask>> m_asyncLoadList;
|
||||
std::unordered_map<SObjectTag, std::list<std::shared_ptr<AsyncTask>>::iterator> m_asyncLoadMap;
|
||||
|
@ -98,7 +98,7 @@ protected:
|
|||
bool PrepForReadSync(const SObjectTag& tag, const hecl::ProjectPath& path,
|
||||
std::optional<athena::io::FileReader>& fr);
|
||||
|
||||
bool WaitForTagReady(const urde::SObjectTag& tag, const hecl::ProjectPath*& pathOut) {
|
||||
bool WaitForTagReady(const metaforce::SObjectTag& tag, const hecl::ProjectPath*& pathOut) {
|
||||
return static_cast<DataSpec::SpecBase&>(*m_cookSpec).waitForTagReady(tag, pathOut);
|
||||
}
|
||||
SObjectTag TagFromPath(const hecl::ProjectPath& path) const {
|
||||
|
@ -120,18 +120,18 @@ protected:
|
|||
bool SyncCook(const hecl::ProjectPath& working);
|
||||
CFactoryFnReturn BuildSync(const SObjectTag& tag, const hecl::ProjectPath& path, const CVParamTransfer& paramXfer,
|
||||
CObjectReference* selfRef);
|
||||
std::shared_ptr<AsyncTask> BuildAsyncInternal(const urde::SObjectTag&, const urde::CVParamTransfer&,
|
||||
std::unique_ptr<urde::IObj>*, CObjectReference* selfRef);
|
||||
std::shared_ptr<AsyncTask> BuildAsyncInternal(const metaforce::SObjectTag&, const metaforce::CVParamTransfer&,
|
||||
std::unique_ptr<metaforce::IObj>*, CObjectReference* selfRef);
|
||||
|
||||
public:
|
||||
ProjectResourceFactoryBase(hecl::ClientProcess& clientProc) : m_clientProc(clientProc) {}
|
||||
std::unique_ptr<urde::IObj> Build(const urde::SObjectTag&, const urde::CVParamTransfer&,
|
||||
std::unique_ptr<metaforce::IObj> Build(const metaforce::SObjectTag&, const metaforce::CVParamTransfer&,
|
||||
CObjectReference* selfRef) override;
|
||||
void BuildAsync(const urde::SObjectTag&, const urde::CVParamTransfer&, std::unique_ptr<urde::IObj>*,
|
||||
void BuildAsync(const metaforce::SObjectTag&, const metaforce::CVParamTransfer&, std::unique_ptr<metaforce::IObj>*,
|
||||
CObjectReference* selfRef) override;
|
||||
void CancelBuild(const urde::SObjectTag&) override;
|
||||
bool CanBuild(const urde::SObjectTag&) override;
|
||||
const urde::SObjectTag* GetResourceIdByName(std::string_view) const override;
|
||||
void CancelBuild(const metaforce::SObjectTag&) override;
|
||||
bool CanBuild(const metaforce::SObjectTag&) override;
|
||||
const metaforce::SObjectTag* GetResourceIdByName(std::string_view) const override;
|
||||
FourCC GetResourceTypeById(CAssetId id) const override;
|
||||
hecl::ProjectPath GetCookedPath(const hecl::ProjectPath& working, bool pcTarget) const {
|
||||
return static_cast<DataSpec::SpecBase&>(*m_cookSpec).getCookedPath(working, pcTarget);
|
||||
|
@ -141,13 +141,13 @@ public:
|
|||
void EnumerateNamedResources(const std::function<bool(std::string_view, const SObjectTag&)>& lambda) const override;
|
||||
|
||||
u32 ResourceSize(const SObjectTag& tag) override;
|
||||
std::shared_ptr<urde::IDvdRequest> LoadResourceAsync(const urde::SObjectTag& tag, void* target) override;
|
||||
std::shared_ptr<urde::IDvdRequest> LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size,
|
||||
std::shared_ptr<metaforce::IDvdRequest> LoadResourceAsync(const metaforce::SObjectTag& tag, void* target) override;
|
||||
std::shared_ptr<metaforce::IDvdRequest> LoadResourcePartAsync(const metaforce::SObjectTag& tag, u32 off, u32 size,
|
||||
void* target) override;
|
||||
std::unique_ptr<u8[]> LoadResourceSync(const urde::SObjectTag& tag) override;
|
||||
std::unique_ptr<u8[]> LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override;
|
||||
std::unique_ptr<u8[]> LoadResourceSync(const metaforce::SObjectTag& tag) override;
|
||||
std::unique_ptr<u8[]> LoadNewResourcePartSync(const metaforce::SObjectTag& tag, u32 off, u32 size) override;
|
||||
|
||||
std::shared_ptr<AsyncTask> CookResourceAsync(const urde::SObjectTag& tag);
|
||||
std::shared_ptr<AsyncTask> CookResourceAsync(const metaforce::SObjectTag& tag);
|
||||
|
||||
template <typename ItType>
|
||||
bool AsyncPumpTask(ItType& it);
|
||||
|
@ -160,4 +160,4 @@ public:
|
|||
~ProjectResourceFactoryBase() override { Shutdown(); }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -43,7 +43,7 @@ extern hecl::Database::DataSpecEntry SpecEntMP1;
|
|||
extern hecl::Database::DataSpecEntry SpecEntMP1PC;
|
||||
} // namespace DataSpec
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
ProjectResourceFactoryMP1::ProjectResourceFactoryMP1(hecl::ClientProcess& clientProc)
|
||||
: ProjectResourceFactoryBase(clientProc) {
|
||||
|
@ -81,4 +81,4 @@ void ProjectResourceFactoryMP1::IndexMP1Resources(hecl::Database::Project& proj,
|
|||
BeginBackgroundIndex(proj, DataSpec::SpecEntMP1, DataSpec::SpecEntMP1PC);
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "Editor/ProjectResourceFactoryBase.hpp"
|
||||
#include "Runtime/CToken.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class MP1OriginalIDs;
|
||||
class CSimplePool;
|
||||
|
||||
|
@ -13,4 +13,4 @@ public:
|
|||
void IndexMP1Resources(hecl::Database::Project& proj, CSimplePool& sp);
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Resource.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
Space::Class Resource::DeduceDefaultSpaceClass(const hecl::ProjectPath& path) {
|
||||
athena::io::FileReader r(path.getAbsolutePath(), 32 * 1024, false);
|
||||
|
@ -9,4 +9,4 @@ Space::Class Resource::DeduceDefaultSpaceClass(const hecl::ProjectPath& path) {
|
|||
return Space::Class::None;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "hecl/Database.hpp"
|
||||
#include "Space.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
/** Combines a ProjectPath with actively used Space references
|
||||
*
|
||||
|
@ -43,4 +43,4 @@ private:
|
|||
std::unique_ptr<Node> m_rootNode;
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "ResourceBrowser.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
#define BROWSER_MARGIN 8
|
||||
|
||||
bool ResourceBrowser::navigateToPath(const hecl::ProjectPath& pathIn) {
|
||||
|
@ -67,4 +67,4 @@ void ResourceBrowser::View::resized(const boo::SWindowRect& root, const boo::SWi
|
|||
}
|
||||
void ResourceBrowser::View::draw(boo::IGraphicsCommandQueue* gfxQ) { m_resListing.m_view->draw(gfxQ); }
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "specter/PathButtons.hpp"
|
||||
#include "specter/Table.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
class ResourceBrowser : public Space, public specter::IPathButtonsBinding {
|
||||
struct State : Space::State {
|
||||
|
@ -202,4 +202,4 @@ public:
|
|||
unsigned toolbarUnits() const override { return 2; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "icons/icons.hpp"
|
||||
#include "specter/Menu.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("URDE::Space");
|
||||
|
||||
Space::Space(ViewManager& vm, Class cls, Space* parent)
|
||||
|
@ -259,4 +259,4 @@ void Space::SpaceMenuNode::SubNode::activated(const boo::SWindowCoord& coord) {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -16,7 +16,7 @@ class ViewResources;
|
|||
class Toolbar;
|
||||
struct Icon;
|
||||
} // namespace specter
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class ViewManager;
|
||||
class RootSpace;
|
||||
class SplitSpace;
|
||||
|
@ -374,4 +374,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "version.h"
|
||||
#include "badging/Badging.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
#define SPLASH_WIDTH 555
|
||||
#define SPLASH_HEIGHT 300
|
||||
|
@ -268,4 +268,4 @@ void SplashScreen::draw(boo::IGraphicsCommandQueue* gfxQ) {
|
|||
m_fileBrowser.m_view->draw(gfxQ);
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "ViewManager.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("specter::SplashScreen");
|
||||
|
||||
class SplashScreen : public specter::ModalWindow {
|
||||
|
@ -161,4 +161,4 @@ public:
|
|||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -23,7 +23,7 @@ using YAMLNode = athena::io::YAMLNode;
|
|||
|
||||
extern hecl::SystemString ExeDir;
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
void ViewManager::InitMP1(MP1::CMain& main) {
|
||||
main.Init(m_fileStoreManager, &m_cvarManager, m_mainWindow.get(), m_voiceEngine.get(), *m_amuseAllocWrapper);
|
||||
|
@ -39,7 +39,7 @@ void ViewManager::InitMP1(MP1::CMain& main) {
|
|||
|
||||
void ViewManager::TestGameView::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) {
|
||||
specter::View::resized(root, sub);
|
||||
urde::CGraphics::SetViewportResolution({sub.size[0], sub.size[1]});
|
||||
metaforce::CGraphics::SetViewportResolution({sub.size[0], sub.size[1]});
|
||||
if (m_debugText) {
|
||||
boo::SWindowRect newSub = sub;
|
||||
newSub.location[1] = 5 * m_vm.m_viewResources.pixelFactor();
|
||||
|
@ -68,7 +68,7 @@ void ViewManager::TestGameView::think() {
|
|||
overlayText += fmt::format(FMT_STRING("Frame: {}\n"), g_StateManager->GetUpdateFrameIndex());
|
||||
|
||||
if (m_vm.m_cvarCommons.m_debugOverlayShowFramerate->toBoolean())
|
||||
overlayText += fmt::format(FMT_STRING("FPS: {}\n"), urde::CGraphics::GetFPS());
|
||||
overlayText += fmt::format(FMT_STRING("FPS: {}\n"), metaforce::CGraphics::GetFPS());
|
||||
|
||||
if (m_vm.m_cvarCommons.m_debugOverlayShowInGameTime->toBoolean()) {
|
||||
double igt = g_GameState->GetTotalPlayTime();
|
||||
|
@ -113,12 +113,12 @@ void ViewManager::TestGameView::think() {
|
|||
if (m_vm.m_cvarCommons.m_debugOverlayWorldInfo->toBoolean()) {
|
||||
TLockedToken<CStringTable> tbl =
|
||||
g_SimplePool->GetObj({FOURCC('STRG'), g_StateManager->GetWorld()->IGetStringTableAssetId()});
|
||||
const urde::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||
overlayText += fmt::format(FMT_STRING("World: 0x{}{}, Area: {}\n"), g_GameState->CurrentWorldAssetId(),
|
||||
(tbl.IsLoaded() ? (" " + hecl::Char16ToUTF8(tbl->GetString(0))).c_str() : ""), aId);
|
||||
}
|
||||
|
||||
const urde::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||
if (m_vm.m_cvarCommons.m_debugOverlayAreaInfo->toBoolean() && g_StateManager->GetWorld() &&
|
||||
g_StateManager->GetWorld()->DoesAreaExist(aId)) {
|
||||
const auto& layerStates = g_GameState->CurrentWorldState().GetLayerState();
|
||||
|
@ -139,7 +139,7 @@ void ViewManager::TestGameView::think() {
|
|||
}
|
||||
|
||||
if (m_vm.m_cvarCommons.m_debugOverlayShowRandomStats->toBoolean()) {
|
||||
overlayText += fmt::format(FMT_STRING("CRandom16::Next calls: {}\n"), urde::CRandom16::GetNumNextCalls());
|
||||
overlayText += fmt::format(FMT_STRING("CRandom16::Next calls: {}\n"), metaforce::CRandom16::GetNumNextCalls());
|
||||
}
|
||||
|
||||
if (m_vm.m_cvarCommons.m_debugOverlayShowResourceStats->toBoolean())
|
||||
|
@ -420,4 +420,4 @@ void ViewManager::stop() {
|
|||
m_fontCache.destroyAtlases();
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace hecl {
|
|||
class PipelineConverterBase;
|
||||
}
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class SplashScreen;
|
||||
|
||||
class ViewManager final : public specter::IViewManager {
|
||||
|
@ -196,4 +196,4 @@ public:
|
|||
void deferOpenProject(const hecl::SystemString& path) { m_deferedProject = path; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
extern "C" uint8_t URDE_BADGE[];
|
||||
extern "C" size_t URDE_BADGE_SZ;
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("URDE::badging");
|
||||
static specter::Icon g_BadgeIcon;
|
||||
|
||||
|
@ -42,4 +42,4 @@ void DestroyBadging() { g_BadgeIcon.m_tex.reset(); }
|
|||
|
||||
specter::Icon& GetBadge() { return g_BadgeIcon; }
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
#include "specter/ViewResources.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
void InitializeBadging(specter::ViewResources& viewRes);
|
||||
void DestroyBadging();
|
||||
|
||||
specter::Icon& GetBadge();
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
||||
#ifndef BADGE_PHRASE
|
||||
#define BADGE_PHRASE "Prototype"
|
||||
|
|
|
@ -13,22 +13,22 @@ target_include_directories(packbadge PRIVATE ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_D
|
|||
##################
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
export(TARGETS packbadge FILE "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeTargets.cmake")
|
||||
export(TARGETS packbadge FILE "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packbadgeTargets.cmake")
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
export(PACKAGE urde-packbadge)
|
||||
export(PACKAGE metaforce-packbadge)
|
||||
|
||||
# Create the atdnaConfig.cmake
|
||||
# ... for the build tree
|
||||
configure_file(urde-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeConfig.cmake" @ONLY)
|
||||
configure_file(metaforce-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packbadgeConfig.cmake" @ONLY)
|
||||
# ... for the install tree
|
||||
configure_file(urde-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/urde-packbadgeConfig.cmake" @ONLY)
|
||||
configure_file(metaforce-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/metaforce-packbadgeConfig.cmake" @ONLY)
|
||||
# ... for both
|
||||
configure_file(urde-packbadgeConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeConfigVersion.cmake" @ONLY)
|
||||
configure_file(metaforce-packbadgeConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packbadgeConfigVersion.cmake" @ONLY)
|
||||
|
||||
else()
|
||||
find_package(urde-packbadge REQUIRED)
|
||||
find_package(metaforce-packbadge REQUIRED)
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT badge.bin COMMAND $<TARGET_FILE:packbadge>
|
||||
|
@ -37,7 +37,7 @@ add_custom_command(OUTPUT badge.bin COMMAND $<TARGET_FILE:packbadge>
|
|||
MAIN_DEPENDENCY badge.png COMMENT "Generating badge.bin")
|
||||
|
||||
bintoc(badge.cpp ${CMAKE_CURRENT_BINARY_DIR}/badge.bin URDE_BADGE)
|
||||
add_library(UrdeBadging
|
||||
add_library(MetaforceBadging
|
||||
badge.cpp badge.bin
|
||||
Badging.hpp Badging.cpp)
|
||||
target_link_libraries(UrdeBadging PUBLIC specter)
|
||||
target_link_libraries(MetaforceBadging PUBLIC specter)
|
||||
|
|
|
@ -5,5 +5,5 @@ get_filename_component(PACKBADGE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|||
|
||||
# Our library dependencies (contains definitions for IMPORTED targets)
|
||||
if(NOT TARGET packbadge AND NOT packbadge_BINARY_DIR)
|
||||
include("${PACKBADGE_CMAKE_DIR}/urde-packbadgeTargets.cmake")
|
||||
include("${PACKBADGE_CMAKE_DIR}/metaforce-packbadgeTargets.cmake")
|
||||
endif()
|
|
@ -12,22 +12,22 @@ target_include_directories(packicons PRIVATE ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_D
|
|||
##################
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
export(TARGETS packicons FILE "${CMAKE_CURRENT_BINARY_DIR}/urde-packiconsTargets.cmake")
|
||||
export(TARGETS packicons FILE "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packiconsTargets.cmake")
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
export(PACKAGE urde-packicons)
|
||||
export(PACKAGE metaforce-packicons)
|
||||
|
||||
# Create the atdnaConfig.cmake
|
||||
# ... for the build tree
|
||||
configure_file(urde-packiconsConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packiconsConfig.cmake" @ONLY)
|
||||
configure_file(metaforce-packiconsConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packiconsConfig.cmake" @ONLY)
|
||||
# ... for the install tree
|
||||
configure_file(urde-packiconsConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/urde-packiconsConfig.cmake" @ONLY)
|
||||
configure_file(metaforce-packiconsConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/metaforce-packiconsConfig.cmake" @ONLY)
|
||||
# ... for both
|
||||
configure_file(urde-packiconsConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packiconsConfigVersion.cmake" @ONLY)
|
||||
configure_file(metaforce-packiconsConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/metaforce-packiconsConfigVersion.cmake" @ONLY)
|
||||
|
||||
else()
|
||||
find_package(urde-packicons REQUIRED)
|
||||
find_package(metaforce-packicons REQUIRED)
|
||||
endif()
|
||||
|
||||
unset(INKSCAPE_BIN CACHE)
|
||||
|
@ -59,5 +59,5 @@ else()
|
|||
endif()
|
||||
|
||||
bintoc(icons_dat.cpp ${CMAKE_CURRENT_BINARY_DIR}/icons.bin URDE_ICONS)
|
||||
add_library(UrdeIcons icons.cpp icons.hpp icons.bin icons_dat.cpp)
|
||||
target_link_libraries(UrdeIcons PUBLIC specter)
|
||||
add_library(MetaforceIcons icons.cpp icons.hpp icons.bin icons_dat.cpp)
|
||||
target_link_libraries(MetaforceIcons PUBLIC specter)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
extern "C" uint8_t URDE_ICONS[];
|
||||
extern "C" size_t URDE_ICONS_SZ;
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log("URDE::icons");
|
||||
|
||||
specter::IconAtlas<8, 8> g_IconAtlas;
|
||||
|
@ -91,4 +91,4 @@ specter::Icon& GetIcon(MonoIcon icon) {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "specter/Icon.hpp"
|
||||
#include "specter/ViewResources.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
void InitializeIcons(specter::ViewResources& viewRes);
|
||||
void DestroyIcons();
|
||||
|
||||
|
@ -30,4 +30,4 @@ enum class MonoIcon {
|
|||
};
|
||||
specter::Icon& GetIcon(MonoIcon icon);
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -5,5 +5,5 @@ get_filename_component(PACKICONS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|||
|
||||
# Our library dependencies (contains definitions for IMPORTED targets)
|
||||
if(NOT TARGET packicons AND NOT packicons_BINARY_DIR)
|
||||
include("${PACKICONS_CMAKE_DIR}/urde-packiconsTargets.cmake")
|
||||
include("${PACKICONS_CMAKE_DIR}/metaforce-packiconsTargets.cmake")
|
||||
endif()
|
|
@ -16,7 +16,7 @@ static void AthenaExc(athena::error::Level level, const char* file, const char*,
|
|||
AthenaLog.vreport(logvisor::Level(level), fmt, args);
|
||||
}
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
static logvisor::Module Log{"Metaforce"};
|
||||
|
||||
static hecl::SystemString CPUFeatureString(const zeus::CPUInfo& cpuInf) {
|
||||
|
@ -119,7 +119,7 @@ struct Application : boo::IApplicationCallback {
|
|||
int64_t getTargetFrameTime() { return m_cvarCommons.getVariableFrameTime() ? 0 : 1000000000L / 60; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
||||
static hecl::SystemChar CwdBuf[1024];
|
||||
hecl::SystemString ExeDir;
|
||||
|
@ -129,11 +129,11 @@ static void SetupBasics(bool logging) {
|
|||
if (!result.first) {
|
||||
#if _WIN32 && !WINDOWS_STORE
|
||||
std::wstring msg = fmt::format(FMT_STRING(L"ERROR: This build of Metaforce requires the following CPU features:\n{}\n"),
|
||||
urde::CPUFeatureString(result.second));
|
||||
metaforce::CPUFeatureString(result.second));
|
||||
MessageBoxW(nullptr, msg.c_str(), L"CPU error", MB_OK | MB_ICONERROR);
|
||||
#else
|
||||
fmt::print(stderr, FMT_STRING("ERROR: This build of Metaforce requires the following CPU features:\n{}\n"),
|
||||
urde::CPUFeatureString(result.second));
|
||||
metaforce::CPUFeatureString(result.second));
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
/* Handle -j argument */
|
||||
hecl::SetCpuCountOverride(argc, argv);
|
||||
|
||||
urde::Application appCb(fileMgr, cvarMgr, cvarCmns);
|
||||
metaforce::Application appCb(fileMgr, cvarMgr, cvarCmns);
|
||||
int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto, appCb, _SYS_STR("metaforce"),
|
||||
_SYS_STR("Metaforce"), argc, argv, appCb.getGraphicsApi(), appCb.getSamples(),
|
||||
appCb.getAnisotropy(), appCb.getDeepColor(), appCb.getTargetFrameTime(), false);
|
||||
|
@ -217,9 +217,9 @@ using namespace Windows::ApplicationModel::Core;
|
|||
|
||||
[Platform::MTAThread] int WINAPIV main(Platform::Array<Platform::String ^> ^ params) {
|
||||
SetupBasics(false);
|
||||
urde::Application appCb;
|
||||
metaforce::Application appCb;
|
||||
auto viewProvider =
|
||||
ref new boo::ViewProvider(appCb, _SYS_STR("urde"), _SYS_STR("URDE"), _SYS_STR("urde"), params, false);
|
||||
ref new boo::ViewProvider(appCb, _SYS_STR("metaforce"), _SYS_STR("Metaforce"), _SYS_STR("metaforce"), params, false);
|
||||
CoreApplication::Run(viewProvider);
|
||||
return 0;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 637 KiB After Width: | Height: | Size: 637 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 203 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
@ -7,11 +7,11 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/Editor/platforms/freedesktop/maini
|
|||
COMMAND $<TARGET_FILE:mkwmicon>
|
||||
ARGS ${CMAKE_BINARY_DIR}/Editor/platforms/freedesktop/mainicon_netwm.bin
|
||||
DEPENDS
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/128x128/apps/urde.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/64x64/apps/urde.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/48x48/apps/urde.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/32x32/apps/urde.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/16x16/apps/urde.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/128x128/apps/metaforce.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/64x64/apps/metaforce.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/48x48/apps/metaforce.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/32x32/apps/metaforce.png
|
||||
${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop/16x16/apps/metaforce.png
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Editor/platforms/freedesktop
|
||||
COMMENT "Generating mainicon_netwm.bin")
|
||||
bintoc(mainicon_netwm.cpp ${CMAKE_BINARY_DIR}/Editor/platforms/freedesktop/mainicon_netwm.bin MAINICON_NETWM)
|
||||
|
|
|
@ -49,7 +49,7 @@ int main(int argc, char* argv[])
|
|||
printf("Rendering main icon @%dx%d\n", *d, *d);
|
||||
fflush(stdout);
|
||||
|
||||
snprintf(command, 2048, "%dx%d/apps/urde.png", *d, *d);
|
||||
snprintf(command, 2048, "%dx%d/apps/metaforce.png", *d, *d);
|
||||
FILE* fp = fopen(command, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
Name=URDE
|
||||
GenericName=Game Data Editor
|
||||
Comment=Edit 3D assets from games by Retro Studios
|
||||
Exec=urde
|
||||
Icon=urde
|
||||
Exec=metaforce
|
||||
Icon=metaforce
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;3DGraphics;
|
||||
|
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:pm="http://schemas.microsoft.com/appx/2014/phone/manifest" IgnorableNamespaces="uap uap4 pm">
|
||||
<Identity Name="AxioDL.URDE" Version="1.0.0.0" Publisher="CN=AxioDL" />
|
||||
<Identity Name="AxioDL.Metaforce" Version="1.0.0.0" Publisher="CN=AxioDL" />
|
||||
<pm:PhoneIdentity PhoneProductId="97E278C0-4527-453D-AE03-375B1FAA0B19" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
<Properties>
|
||||
<DisplayName>URDE</DisplayName>
|
||||
<DisplayName>Metaforce</DisplayName>
|
||||
<PublisherDisplayName>AxioDL</PublisherDisplayName>
|
||||
<Logo>Assets\urde.png</Logo>
|
||||
<Logo>Assets\metaforce.png</Logo>
|
||||
</Properties>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.14393.0" MaxVersionTested="10.0.16299.0" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="URDE" Executable="$targetnametoken$.exe" EntryPoint="URDE.App">
|
||||
<uap:VisualElements DisplayName="URDE" Description="Game engine recreation for Metroid Prime" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" BackgroundColor="#333333">
|
||||
<uap:VisualElements DisplayName="Metaforce" Description="Game engine recreation for Metroid Prime" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" BackgroundColor="#333333">
|
||||
<uap:DefaultTile Square310x310Logo="Assets\LargeTile.png" Wide310x150Logo="Assets\WideTile.png" Square71x71Logo="Assets\SmallTile.png" ShortName="URDE">
|
||||
<uap:ShowNameOnTiles>
|
||||
<uap:ShowOn Tile="square150x150Logo" />
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctime>
|
||||
#include <cmath>
|
||||
|
||||
static urde::MP1::CNESEmulator* EmulatorInst = nullptr;
|
||||
static metaforce::MP1::CNESEmulator* EmulatorInst = nullptr;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -166,7 +166,7 @@ int audioUpdate() {
|
|||
}
|
||||
}
|
||||
|
||||
namespace urde::MP1 {
|
||||
namespace metaforce::MP1 {
|
||||
|
||||
bool CNESEmulator::EmulatorConstructed = false;
|
||||
static logvisor::Module Log("CNESEmulator");
|
||||
|
@ -781,4 +781,4 @@ void CNESEmulator::LoadPassword(const u8* state) {
|
|||
x38_passwordPending = true;
|
||||
}
|
||||
|
||||
} // namespace urde::MP1
|
||||
} // namespace metaforce::MP1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "boo/audiodev/IAudioVoice.hpp"
|
||||
#include "zeus/CMatrix4f.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
struct CFinalInput;
|
||||
class IDvdRequest;
|
||||
|
||||
|
@ -86,4 +86,4 @@ public:
|
|||
};
|
||||
|
||||
} // namespace MP1
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "Graphics/CGraphics.hpp"
|
||||
#include "hecl/Pipeline.hpp"
|
||||
|
||||
namespace urde::MP1 {
|
||||
namespace metaforce::MP1 {
|
||||
|
||||
boo::ObjToken<boo::IShaderPipeline> CNESShader::g_Pipeline;
|
||||
|
||||
|
@ -21,4 +21,4 @@ boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::I
|
|||
|
||||
void CNESShader::Shutdown() { g_Pipeline.reset(); }
|
||||
|
||||
} // namespace urde::MP1
|
||||
} // namespace metaforce::MP1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "boo/graphicsdev/IGraphicsDataFactory.hpp"
|
||||
|
||||
namespace urde::MP1 {
|
||||
namespace metaforce::MP1 {
|
||||
|
||||
class CNESShader {
|
||||
public:
|
||||
|
@ -17,4 +17,4 @@ public:
|
|||
static boo::ObjToken<boo::IShaderPipeline> g_Pipeline;
|
||||
};
|
||||
|
||||
} // namespace urde::MP1
|
||||
} // namespace metaforce::MP1
|
||||
|
|
|
@ -23,7 +23,7 @@ Everything else is much too experimental to make portable/stable release builds
|
|||
* Extract ISO: `hecl extract [path].iso -o mp1`
|
||||
* `mp1` can be substituted with the directory name of your choice
|
||||
* Repackage game for Metaforce: `cd mp1; hecl package`
|
||||
* Run Metaforce: `urde mp1/out`
|
||||
* Run Metaforce: `metaforce mp1/out`
|
||||
|
||||
### Usage (Wii versions)
|
||||
|
||||
|
@ -33,7 +33,7 @@ NFS files dumped from Metroid Prime Trilogy on Wii U VC can be used directly wit
|
|||
* `mpt` can be substituted with the directory name of your choice
|
||||
* Repackage game for Metaforce: `cd mpt; hecl package MP1`
|
||||
* The `MP1` parameter is important here.
|
||||
* Run Metaforce: `urde mpt/out`
|
||||
* Run Metaforce: `metaforce mpt/out`
|
||||
|
||||
#### Metaforce options (non-exhaustive)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
amuse::AudioGroupData CAudioGroupSet::LoadData() {
|
||||
const auto readU32 = [](const u8* ptr) {
|
||||
|
@ -33,9 +33,9 @@ amuse::AudioGroupData CAudioGroupSet::LoadData() {
|
|||
|
||||
CAudioGroupSet::CAudioGroupSet(std::unique_ptr<u8[]>&& in) : m_buffer(std::move(in)), m_data(LoadData()) {}
|
||||
|
||||
CFactoryFnReturn FAudioGroupSetDataFactory(const urde::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
|
||||
const urde::CVParamTransfer& vparms, CObjectReference* selfRef) {
|
||||
CFactoryFnReturn FAudioGroupSetDataFactory(const metaforce::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
|
||||
const metaforce::CVParamTransfer& vparms, CObjectReference* selfRef) {
|
||||
return TToken<CAudioGroupSet>::GetIObjObjectFor(std::make_unique<CAudioGroupSet>(std::move(in)));
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <amuse/AudioGroupData.hpp>
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
|
||||
class CAudioGroupSet {
|
||||
std::unique_ptr<u8[]> m_buffer;
|
||||
|
@ -26,7 +26,7 @@ public:
|
|||
std::string_view GetName() const { return x20_name; }
|
||||
};
|
||||
|
||||
CFactoryFnReturn FAudioGroupSetDataFactory(const urde::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
|
||||
const urde::CVParamTransfer& vparms, CObjectReference* selfRef);
|
||||
CFactoryFnReturn FAudioGroupSetDataFactory(const metaforce::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
|
||||
const metaforce::CVParamTransfer& vparms, CObjectReference* selfRef);
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "Runtime/CSimplePool.hpp"
|
||||
#include "Runtime/Audio/CAudioGroupSet.hpp"
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
namespace {
|
||||
std::unordered_map<std::string, TLockedToken<CAudioGroupSet>> mpGroupSetDB;
|
||||
std::unordered_map<CAssetId, std::string> mpGroupSetResNameDB;
|
||||
|
@ -96,4 +96,4 @@ void CAudioSys::SetDefaultVolumeScale(s16 scale) { s_DefaultVolumeScale = scale;
|
|||
|
||||
void CAudioSys::SetVolumeScale(s16 scale) { s_VolumeScale = scale; }
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <boo/audiodev/IAudioVoiceEngine.hpp>
|
||||
#include <zeus/CVector3f.hpp>
|
||||
|
||||
namespace urde {
|
||||
namespace metaforce {
|
||||
class CAudioGroupSet;
|
||||
class CSimplePool;
|
||||
|
||||
|
@ -65,4 +65,4 @@ public:
|
|||
static void SetVolumeScale(s16 scale);
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
} // namespace metaforce
|
||||
|
|