2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 18:24:55 +00:00

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

Submodule MathLib updated: 57cfbc93b9...72972196a4

View File

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

2
hecl

Submodule hecl updated: b33c31a34b...7dd9819971