mirror of https://github.com/AxioDL/metaforce.git
Windows fixes
This commit is contained in:
parent
60374a472a
commit
bcd025f375
|
@ -463,26 +463,26 @@ BlenderConnection::DataStream::Mesh::Mesh(BlenderConnection& conn, int skinSlotC
|
|||
uint32_t matSetCount;
|
||||
conn._readBuf(&matSetCount, 4);
|
||||
materialSets.reserve(matSetCount);
|
||||
for (int i=0 ; i<matSetCount ; ++i)
|
||||
for (uint32_t i=0 ; i<matSetCount ; ++i)
|
||||
{
|
||||
materialSets.emplace_back();
|
||||
std::vector<Material>& materials = materialSets.back();
|
||||
uint32_t matCount;
|
||||
conn._readBuf(&matCount, 4);
|
||||
materials.reserve(matCount);
|
||||
for (int i=0 ; i<matCount ; ++i)
|
||||
for (uint32_t i=0 ; i<matCount ; ++i)
|
||||
materials.emplace_back(conn);
|
||||
}
|
||||
|
||||
uint32_t count;
|
||||
conn._readBuf(&count, 4);
|
||||
pos.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
pos.emplace_back(conn);
|
||||
|
||||
conn._readBuf(&count, 4);
|
||||
norm.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
norm.emplace_back(conn);
|
||||
|
||||
conn._readBuf(&colorLayerCount, 4);
|
||||
|
@ -490,7 +490,7 @@ BlenderConnection::DataStream::Mesh::Mesh(BlenderConnection& conn, int skinSlotC
|
|||
LogModule.report(LogVisor::FatalError, "mesh has %u color-layers; max 4", colorLayerCount);
|
||||
conn._readBuf(&count, 4);
|
||||
color.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
color.emplace_back(conn);
|
||||
|
||||
conn._readBuf(&uvLayerCount, 4);
|
||||
|
@ -498,12 +498,12 @@ BlenderConnection::DataStream::Mesh::Mesh(BlenderConnection& conn, int skinSlotC
|
|||
LogModule.report(LogVisor::FatalError, "mesh has %u UV-layers; max 8", uvLayerCount);
|
||||
conn._readBuf(&count, 4);
|
||||
uv.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
uv.emplace_back(conn);
|
||||
|
||||
conn._readBuf(&count, 4);
|
||||
boneNames.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
{
|
||||
char name[128];
|
||||
conn._readLine(name, 128);
|
||||
|
@ -512,14 +512,14 @@ BlenderConnection::DataStream::Mesh::Mesh(BlenderConnection& conn, int skinSlotC
|
|||
|
||||
conn._readBuf(&count, 4);
|
||||
skins.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
{
|
||||
skins.emplace_back();
|
||||
std::vector<SkinBind>& binds = skins.back();
|
||||
uint32_t bindCount;
|
||||
conn._readBuf(&bindCount, 4);
|
||||
binds.reserve(bindCount);
|
||||
for (int j=0 ; j<bindCount ; ++j)
|
||||
for (uint32_t j=0 ; j<bindCount ; ++j)
|
||||
binds.emplace_back(conn);
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ BlenderConnection::DataStream::Mesh::Material::Material
|
|||
uint32_t texCount;
|
||||
conn._readBuf(&texCount, 4);
|
||||
texs.reserve(texCount);
|
||||
for (int i=0 ; i<texCount ; ++i)
|
||||
for (uint32_t i=0 ; i<texCount ; ++i)
|
||||
{
|
||||
conn._readLine(buf, 4096);
|
||||
#if HECL_UCS2
|
||||
|
@ -605,9 +605,9 @@ BlenderConnection::DataStream::Mesh::Surface::Vert::Vert
|
|||
{
|
||||
conn._readBuf(&iPos, 4);
|
||||
conn._readBuf(&iNorm, 4);
|
||||
for (int i=0 ; i<parent.colorLayerCount ; ++i)
|
||||
for (uint32_t i=0 ; i<parent.colorLayerCount ; ++i)
|
||||
conn._readBuf(&iColor[i], 4);
|
||||
for (int i=0 ; i<parent.uvLayerCount ; ++i)
|
||||
for (uint32_t i=0 ; i<parent.uvLayerCount ; ++i)
|
||||
conn._readBuf(&iUv[i], 4);
|
||||
conn._readBuf(&iSkin, 4);
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ public:
|
|||
m_parent->_readBuf(&count, 4);
|
||||
std::vector<std::string> retval;
|
||||
retval.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (uint32_t i=0 ; i<count ; ++i)
|
||||
{
|
||||
char name[128];
|
||||
m_parent->_readLine(name, 128);
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#if _WIN32
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#define WIN_PAUSE 1
|
||||
#include <objbase.h>
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace HECL
|
||||
{
|
||||
namespace Frontend {class IR;}
|
||||
namespace Frontend {struct IR;}
|
||||
namespace Backend
|
||||
{
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ struct IR
|
|||
OpSwizzle /**< Vector insertion/extraction/swizzling operation */
|
||||
};
|
||||
|
||||
using RegID = ssize_t;
|
||||
using RegID = int;
|
||||
|
||||
struct Instruction
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ struct IR
|
|||
|
||||
struct
|
||||
{
|
||||
ssize_t m_idxs[4] = {-1};
|
||||
int m_idxs[4] = {-1};
|
||||
size_t m_instIdx;
|
||||
} m_swizzle;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace HECL
|
|||
namespace Database
|
||||
{
|
||||
class Project;
|
||||
class DataSpecEntry;
|
||||
struct DataSpecEntry;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX 1
|
||||
#endif
|
||||
#include "windows.h"
|
||||
|
||||
void* memmem(const void *haystack, size_t hlen, const void *needle, size_t nlen);
|
||||
|
|
|
@ -94,7 +94,7 @@ void ProjectPath::assign(Database::Project& project, const std::string& path)
|
|||
{
|
||||
m_proj = &project;
|
||||
std::wstring wpath = UTF8ToWide(path);
|
||||
m_relPath = canonRelPath(wpath);
|
||||
m_relPath = CanonRelPath(wpath);
|
||||
m_absPath = project.getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath;
|
||||
SanitizePath(m_relPath);
|
||||
SanitizePath(m_absPath);
|
||||
|
@ -122,9 +122,9 @@ void ProjectPath::assign(const ProjectPath& parentPath, const SystemString& path
|
|||
#if HECL_UCS2
|
||||
void ProjectPath::assign(const ProjectPath& parentPath, const std::string& path)
|
||||
{
|
||||
m_projRoot = parentPath.m_projRoot;
|
||||
m_proj = parentPath.m_proj;
|
||||
std::wstring wpath = UTF8ToWide(path);
|
||||
m_relPath = canonRelPath(parentPath.m_relPath + _S('/') + wpath);
|
||||
m_relPath = CanonRelPath(parentPath.m_relPath + _S('/') + wpath);
|
||||
m_absPath = m_proj->getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath;
|
||||
SanitizePath(m_relPath);
|
||||
SanitizePath(m_absPath);
|
||||
|
|
Loading…
Reference in New Issue