Windows fixes

This commit is contained in:
Jack Andersen 2015-10-11 18:41:28 -10:00
parent 364f03d7e5
commit faa262b73c
10 changed files with 24 additions and 14 deletions

View File

@ -3,6 +3,11 @@
#include <BlenderConnection.hpp>
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES 1
#endif
#include <math.h>
namespace Retro
{

View File

@ -3,7 +3,9 @@
#include "DeafBabe.hpp"
#include "../DNACommon/BabeDead.hpp"
#define _USE_MATH_DEFINES
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES 1
#endif
#include <math.h>
namespace Retro
@ -92,7 +94,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* Read meshes */
atUint32 curSec = 1;
for (int m=0 ; m<head.meshCount ; ++m)
for (atUint32 m=0 ; m<head.meshCount ; ++m)
{
MeshHeader mHeader;
secStart = rs.position();

View File

@ -73,7 +73,7 @@ MREA::StreamReader::StreamReader(Athena::io::IStreamReader& source, atUint32 blk
m_source(source), m_blkCount(blkCount)
{
m_blockInfos.reserve(blkCount);
for (int i=0 ; i<blkCount ; ++i)
for (atUint32 i=0 ; i<blkCount ; ++i)
{
m_blockInfos.emplace_back();
BlockInfo& info = m_blockInfos.back();
@ -228,7 +228,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* Read meshes */
atUint32 curSec = 1;
for (int m=0 ; m<head.meshCount ; ++m)
for (atUint32 m=0 ; m<head.meshCount ; ++m)
{
MeshHeader mHeader;
secStart = drs.position();

View File

@ -14,7 +14,7 @@ MREA::StreamReader::StreamReader(Athena::io::IStreamReader& source,
{
m_blkCount = blkCount;
m_blockInfos.reserve(blkCount);
for (int i=0 ; i<blkCount ; ++i)
for (atUint32 i=0 ; i<blkCount ; ++i)
{
m_blockInfos.emplace_back();
BlockInfo& info = m_blockInfos.back();
@ -23,7 +23,7 @@ MREA::StreamReader::StreamReader(Athena::io::IStreamReader& source,
}
source.seekAlign32();
m_secIdxs.reserve(secIdxCount);
for (int i=0 ; i<secIdxCount ; ++i)
for (atUint32 i=0 ; i<secIdxCount ; ++i)
{
m_secIdxs.emplace_back();
std::pair<DNAFourCC, atUint32>& idx = m_secIdxs.back();
@ -136,7 +136,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
atUint32 curSec = 1;
std::vector<atUint32> surfaceCounts;
surfaceCounts.reserve(head.meshCount);
for (int m=0 ; m<head.meshCount ; ++m)
for (atUint32 m=0 ; m<head.meshCount ; ++m)
{
/* Mesh header */
MeshHeader mHeader;
@ -176,7 +176,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* Now the meshes themselves */
if (secIdxIt->first == FOURCC('GPUD'))
{
for (int m=0 ; m<head.meshCount ; ++m)
for (atUint32 m=0 ; m<head.meshCount ; ++m)
{
curSec += DNACMDL::ReadGeomSectionsToBlender<PAKRouter<PAKBridge>, MaterialSet, RigPair, DNACMDL::SurfaceHeader_3>
(os, drs, pakRouter, entry, dummy, true,
@ -195,7 +195,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* Skip SOBJ (SCLY) */
if (secIdxIt->first == FOURCC('SOBJ'))
{
for (int l=0 ; l<head.sclyLayerCount ; ++l)
for (atUint32 l=0 ; l<head.sclyLayerCount ; ++l)
drs.seek(head.secSizes[curSec++], Athena::Current);
++secIdxIt;
}

View File

@ -268,7 +268,7 @@ struct SpecMP1 : SpecBase
bool checkPathPrefix(const HECL::ProjectPath& path)
{
return path.getRelativePath().compare(0, 4, "MP1/") == 0;
return path.getRelativePath().compare(0, 4, _S("MP1/")) == 0;
}
bool validateYAMLDNAType(FILE* fp) const

View File

@ -258,7 +258,7 @@ struct SpecMP2 : SpecBase
bool checkPathPrefix(const HECL::ProjectPath& path)
{
return path.getRelativePath().compare(0, 4, "MP2/") == 0;
return path.getRelativePath().compare(0, 4, _S("MP2/")) == 0;
}
bool validateYAMLDNAType(FILE* fp) const

View File

@ -439,7 +439,7 @@ struct SpecMP3 : SpecBase
bool checkPathPrefix(const HECL::ProjectPath& path)
{
return path.getRelativePath().compare(0, 4, "MP3/") == 0;
return path.getRelativePath().compare(0, 4, _S("MP3/")) == 0;
}
bool validateYAMLDNAType(FILE* fp) const

@ -1 +1 @@
Subproject commit 57cfbc93b935b03edb3a1311b8c61afc1f69ae79
Subproject commit 72972196a4ebf8d41ba9e5c212fe89cd796f97eb

View File

@ -1,4 +1,7 @@
#if _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <objbase.h>
#endif

2
hecl

@ -1 +1 @@
Subproject commit b33c31a34bf8f2c8d13ac923abe58da624814368
Subproject commit 7dd98199713427ee1c998387bc4714b2898eaccb