Windows fixes

This commit is contained in:
Jack Andersen 2016-02-24 10:53:26 -10:00
parent e9996034c9
commit eb3679dd88
6 changed files with 16 additions and 8 deletions

View File

@ -8,7 +8,7 @@ template <class IDType>
struct NamedResourceCatalog : BigYAML struct NamedResourceCatalog : BigYAML
{ {
Delete _d; Delete _d;
Value<atUint32> namedResCount; Value<atUint32> namedResCount = 0;
struct NamedResource : BigYAML struct NamedResource : BigYAML
{ {
Delete _d; Delete _d;

View File

@ -21,9 +21,9 @@ void ProjectResourceFactory::BuildObjectMap(const HECL::Database::Project::Proje
{ {
m_resPaths.clear(); m_resPaths.clear();
m_namedResources.clear(); m_namedResources.clear();
HECL::SystemString catalogPath = HECL::ProjectPath(spec.cookedPath, std::string(spec.spec.m_name) + "/catalog.yaml").getAbsolutePath(); HECL::SystemString catalogPath = HECL::ProjectPath(spec.cookedPath, HECL::SystemString(spec.spec.m_name) + _S("/catalog.yaml")).getAbsolutePath();
FILE* catalogFile = HECL::Fopen(catalogPath.c_str(), _S("r")); FILE* catalogFile = HECL::Fopen(catalogPath.c_str(), _S("r"));
if (!HECL::StrCmp(spec.spec.m_name, "MP3")) if (!HECL::StrCmp(spec.spec.m_name, _S("MP3")))
{ {
DataSpec::NamedResourceCatalog<DataSpec::UniqueID64> catalog; DataSpec::NamedResourceCatalog<DataSpec::UniqueID64> catalog;
if (catalogFile) if (catalogFile)

View File

@ -25,7 +25,11 @@ class ProjectResourceFactory : public pshag::IFactory
if (ent.m_name.size() == idLen && ent.m_name[4] == _S('_')) if (ent.m_name.size() == idLen && ent.m_name[4] == _S('_'))
{ {
HECL::SystemUTF8View entu8(ent.m_name); HECL::SystemUTF8View entu8(ent.m_name);
#if _WIN32
u64 id = _strtoui64(entu8.c_str() + 5, nullptr, 16);
#else
u64 id = strtouq(entu8.c_str() + 5, nullptr, 16); u64 id = strtouq(entu8.c_str() + 5, nullptr, 16);
#endif
if (id) if (id)
{ {

View File

@ -1,6 +1,10 @@
#include "CDecalDataFactory.hpp" #include "CDecalDataFactory.hpp"
#include "CDecalDescription.hpp" #include "CDecalDescription.hpp"
#include "CGenDescription.hpp"
#include "CSwooshDescription.hpp"
#include "CElectricDescription.hpp"
#include "CParticleDataFactory.hpp" #include "CParticleDataFactory.hpp"
#include "CModel.hpp"
#include "CSimplePool.hpp" #include "CSimplePool.hpp"
#include "CRandom16.hpp" #include "CRandom16.hpp"
@ -35,10 +39,10 @@ bool CDecalDataFactory::CreateDPSM(CDecalDescription* desc, CInputStream& in, CS
CGlobalRandom gr{rand}; CGlobalRandom gr{rand};
FourCC clsId = CPF::GetClassID(in); FourCC clsId = CPF::GetClassID(in);
while(clsId != SBIG('_END')) while (clsId != SBIG('_END'))
{ {
bool loadFirstDesc = false; bool loadFirstDesc = false;
switch(clsId) switch (clsId)
{ {
case SBIG('1SZE'): case SBIG('1SZE'):
case SBIG('1LFT'): case SBIG('1LFT'):
@ -100,7 +104,7 @@ bool CDecalDataFactory::CreateDPSM(CDecalDescription* desc, CInputStream& in, CS
void CDecalDataFactory::GetQuadDecalInfo(CInputStream& in, CSimplePool* resPool, FourCC clsId, SQuadDescr& quad) void CDecalDataFactory::GetQuadDecalInfo(CInputStream& in, CSimplePool* resPool, FourCC clsId, SQuadDescr& quad)
{ {
switch(clsId) switch (clsId)
{ {
case SBIG('1LFT'): case SBIG('1LFT'):
case SBIG('2LFT'): case SBIG('2LFT'):

2
hecl

@ -1 +1 @@
Subproject commit 5fa984eba8c87a974fba3c5f621747f2cd6982fc Subproject commit 47e72384415a5062cc0358512a272fc939aa1514

@ -1 +1 @@
Subproject commit 0deeec94cc838c5e3a4f094fee0ca9fd1d524de3 Subproject commit bb78a20553ea665c0ec301404dce0c6753b8eb09