Update references
Black list known demos
This commit is contained in:
Phillip Stephens 2015-09-24 00:47:30 -07:00
parent cf1c7e4781
commit 2c5f406c40
7 changed files with 121 additions and 19 deletions

View File

@ -10,6 +10,7 @@ make_dnalist(liblist
CMDLMaterials CMDLMaterials
MREA MREA
DeafBabe DeafBabe
SCAN
Tweaks/CTweakParticle Tweaks/CTweakParticle
Tweaks/CTweakPlayer Tweaks/CTweakPlayer
Tweaks/CTweakPlayerControl) Tweaks/CTweakPlayerControl)

View File

@ -3,6 +3,7 @@
#define NOD_ATHENA 1 #define NOD_ATHENA 1
#include "DNAMP1.hpp" #include "DNAMP1.hpp"
#include "STRG.hpp" #include "STRG.hpp"
#include "SCAN.hpp"
#include "MLVL.hpp" #include "MLVL.hpp"
#include "../DNACommon/TXTR.hpp" #include "../DNACommon/TXTR.hpp"
#include "CMDL.hpp" #include "CMDL.hpp"
@ -198,6 +199,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
{ {
case SBIG('STRG'): case SBIG('STRG'):
return {STRG::Extract, nullptr, {_S(".yaml")}}; return {STRG::Extract, nullptr, {_S(".yaml")}};
case SBIG('SCAN'):
return {SCAN::Extract, nullptr, {_S(".yaml")}};
case SBIG('TXTR'): case SBIG('TXTR'):
return {TXTR::Extract, nullptr, {_S(".png")}}; return {TXTR::Extract, nullptr, {_S(".png")}};
case SBIG('CMDL'): case SBIG('CMDL'):

87
DataSpec/DNAMP1/SCAN.hpp Normal file
View File

@ -0,0 +1,87 @@
#ifndef _DNAMP1_SCAN_HPP_
#define _DNAMP1_SCAN_HPP_
#include "../DNACommon/DNACommon.hpp"
#include "DNAMP1.hpp"
namespace Retro
{
namespace DNAMP1
{
struct SCAN : BigYAML
{
DECL_YAML
Value<atUint32> version;
Value<atUint32> magic;
UniqueID32 frame;
UniqueID32 string;
enum ScanSpeed
{ Normal, Slow };
Value<ScanSpeed> scanSpeed;
enum Category
{
None,
SpacePirateData,
ChozoLore,
Creatures,
Research
};
Value<Category> category;
Value<bool> isImportant;
struct Texture : BigYAML
{
DECL_YAML
UniqueID32 texture;
Value<float> appearanceRange;
enum Position
{
Invalid = -1,
Pane0,
Pane1,
Pane2,
Pane3,
Pane01,
Pane12,
Pane23,
Pane012,
Pane123,
Pane0123,
Pane4,
Pane5,
Pane6,
Pane7,
Pane45,
Pane56,
Pane67,
Pane456,
Pane567,
Pane4567
};
Value<Position> position;
Value<atUint32> unknown1;
Value<atUint32> unknown2;
Value<float> scanAnimationSpeed; // 0.0 - 1.0
Value<float> unknown3;
};
Texture textures[4];
static bool Extract(PAKEntryReadStream& rs, const HECL::ProjectPath& outPath)
{
SCAN scan;
scan.read(rs);
FILE* fp = HECL::Fopen(outPath.getAbsolutePath().c_str(), _S("wb"));
scan.toYAMLFile(fp);
fclose(fp);
return true;
}
};
}
}
#endif

View File

@ -124,6 +124,9 @@ struct SpecMP1 : SpecBase
std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf(); std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19;
if (!buildInfo)
return false;
/* Root Report */ /* Root Report */
reps.emplace_back(); reps.emplace_back();
ExtractReport& rep = reps.back(); ExtractReport& rep = reps.back();

View File

@ -120,18 +120,17 @@ struct SpecMP2 : SpecBase
NOD::DiscGCN::IPartition* partition = disc.getDataPartition(); NOD::DiscGCN::IPartition* partition = disc.getDataPartition();
std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf(); std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19;
if (!buildInfo)
return false;
/* Root Report */ /* Root Report */
reps.emplace_back(); reps.emplace_back();
ExtractReport& rep = reps.back(); ExtractReport& rep = reps.back();
rep.name = _S("MP2"); rep.name = _S("MP2");
rep.desc = _S("Metroid Prime 2 ") + regstr; rep.desc = _S("Metroid Prime 2 ") + regstr;
if (buildInfo)
{
std::string buildStr(buildInfo); std::string buildStr(buildInfo);
HECL::SystemStringView buildView(buildStr); HECL::SystemStringView buildView(buildStr);
rep.desc += _S(" (") + buildView + _S(")"); rep.desc += _S(" (") + buildView + _S(")");
}
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot(); NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot();

View File

@ -172,18 +172,21 @@ struct SpecMP3 : SpecBase
NOD::DiscGCN::IPartition* partition = disc.getDataPartition(); NOD::DiscGCN::IPartition* partition = disc.getDataPartition();
std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf(); std::unique_ptr<uint8_t[]> dolBuf = partition->getDOLBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19;
if (!buildInfo)
return false;
/* We don't want no stinking demo dammit */
if (!strcmp(buildInfo, "Build v3.068 3/2/2006 14:55:13"))
return false;
/* Root Report */ /* Root Report */
reps.emplace_back(); reps.emplace_back();
ExtractReport& rep = reps.back(); ExtractReport& rep = reps.back();
rep.name = _S("MP3"); rep.name = _S("MP3");
rep.desc = _S("Metroid Prime 3 ") + regstr; rep.desc = _S("Metroid Prime 3 ") + regstr;
if (buildInfo)
{
std::string buildStr(buildInfo); std::string buildStr(buildInfo);
HECL::SystemStringView buildView(buildStr); HECL::SystemStringView buildView(buildStr);
rep.desc += _S(" (") + buildView + _S(")"); rep.desc += _S(" (") + buildView + _S(")");
}
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot(); NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot();
@ -254,17 +257,23 @@ struct SpecMP3 : SpecBase
std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf(); std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
if (!buildInfo)
return false;
/* We don't want no stinking demo dammit */
if (!strcmp(buildInfo, "Build v3.068 3/2/2006 14:55:13"))
return false;
/* Root Report */ /* Root Report */
reps.emplace_back(); reps.emplace_back();
ExtractReport& rep = reps.back(); ExtractReport& rep = reps.back();
rep.name = _S("MP3"); rep.name = _S("MP3");
rep.desc = _S("Metroid Prime 3 ") + regstr; rep.desc = _S("Metroid Prime 3 ") + regstr;
if (buildInfo)
{
std::string buildStr(buildInfo); std::string buildStr(buildInfo);
HECL::SystemStringView buildView(buildStr); HECL::SystemStringView buildView(buildStr);
rep.desc += _S(" (") + buildView + _S(")"); rep.desc += _S(" (") + buildView + _S(")");
}
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
NOD::DiscBase::IPartition::Node::DirectoryIterator mp3It = root.find("MP3"); NOD::DiscBase::IPartition::Node::DirectoryIterator mp3It = root.find("MP3");

2
hecl

@ -1 +1 @@
Subproject commit 15ab074a1482a6967eec4c31270be0546dbc08a5 Subproject commit 7cb3419155242dd4fae867dc052af101fdb857f6