mirror of https://github.com/AxioDL/metaforce.git
Windows compile fixes, and warning squash
This commit is contained in:
parent
4b10697a5a
commit
76b88d0ad6
|
@ -7,7 +7,7 @@ if(MSVC)
|
|||
endif()
|
||||
|
||||
# Shaddup MSVC
|
||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D__SSE__=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1 /wd4267 /wd4244 /wd4305 ${VS_DEFINES})
|
||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D__SSE__=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1 /IGNORE:4221 /wd4800 /wd4005 /wd4311 /wd4267 /wd4244 /wd4305 ${VS_DEFINES})
|
||||
|
||||
# Link-time Code Generation for Release builds
|
||||
set(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /O2 /Oy /GL /Gy /MD")
|
||||
|
|
|
@ -29,7 +29,7 @@ static void BoxFilter(const uint8_t* input, unsigned chanCount,
|
|||
if (inHeight > 1)
|
||||
mipHeight = inHeight / 2;
|
||||
|
||||
int y,x,c;
|
||||
unsigned y,x,c;
|
||||
for (y=0 ; y<mipHeight ; ++y)
|
||||
{
|
||||
unsigned miplineBase = mipWidth * y;
|
||||
|
@ -753,7 +753,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
|||
}
|
||||
break;
|
||||
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
||||
for (int i=0 ; i<width ; ++i)
|
||||
for (unsigned i=0 ; i<width ; ++i)
|
||||
{
|
||||
size_t inbase = i*2;
|
||||
size_t outbase = (r*width+i)*4;
|
||||
|
@ -764,7 +764,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
|||
}
|
||||
break;
|
||||
case PNG_COLOR_TYPE_RGB:
|
||||
for (int i=0 ; i<width ; ++i)
|
||||
for (unsigned i=0 ; i<width ; ++i)
|
||||
{
|
||||
size_t inbase = i*3;
|
||||
size_t outbase = (r*width+i)*4;
|
||||
|
@ -775,7 +775,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
|||
}
|
||||
break;
|
||||
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||
for (int i=0 ; i<width ; ++i)
|
||||
for (unsigned i=0 ; i<width ; ++i)
|
||||
{
|
||||
size_t inbase = i*4;
|
||||
size_t outbase = (r*width+i)*4;
|
||||
|
|
|
@ -204,7 +204,7 @@ bool MREA::Extract(const SpecBase& dataSpec,
|
|||
|
||||
/* Calculate offset to EGMC section */
|
||||
atUint64 egmcOffset = 0;
|
||||
for (int i = 0; i < head.egmcSecIdx; i++)
|
||||
for (unsigned i = 0; i < head.egmcSecIdx; i++)
|
||||
egmcOffset += head.secSizes[i];
|
||||
|
||||
/* Load EGMC if possible so we can assign meshes to scanIds */
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#if _WIN32
|
||||
#include <D3Dcommon.h>
|
||||
#endif
|
||||
#include "CBooRenderer.hpp"
|
||||
|
||||
namespace urde
|
||||
|
@ -182,6 +185,7 @@ void CBooRenderer::DrawString(const char*, int, int)
|
|||
|
||||
u32 CBooRenderer::GetFPS()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CBooRenderer::CacheReflection(TReflectionCallback, void*, bool)
|
||||
|
@ -232,6 +236,7 @@ void CBooRenderer::DoThermalBlendHot()
|
|||
|
||||
u32 CBooRenderer::GetStaticWorldDataSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if(WIN32)
|
||||
set(PLAT_SRCS Shaders/CLineRendererShadersHLSL.cpp Shaders/CModelShadersHLSL.cpp)
|
||||
set(PLAT_SRCS Shaders/CLineRendererShadersHLSL.cpp Shaders/CModelShadersHLSL.cpp Shaders/CThermalColdFilterHLSL.cpp)
|
||||
elseif(APPLE)
|
||||
set(PLAT_SRCS Shaders/CLineRendererShadersMetal.cpp Shaders/CModelShadersMetal.cpp)
|
||||
set(PLAT_SRCS Shaders/CLineRendererShadersMetal.cpp Shaders/CModelShadersMetal.cpp Shaders/CThermalColdFilterMetal.cpp)
|
||||
endif()
|
||||
|
||||
set(GRAPHICS_SOURCES
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "CLineRendererShaders.hpp"
|
||||
#include "CLineRenderer.hpp"
|
||||
#include "Graphics/CLineRenderer.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
TFilterShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize(boo::ID3DDataFactory::Context& ctx,
|
||||
TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize(boo::ID3DDataFactory::Context& ctx,
|
||||
boo::IShaderPipeline*& pipeOut,
|
||||
boo::IVertexFormat*& vtxFmtOut)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
TFilterShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize(boo::MetalDataFactory::Context& ctx,
|
||||
TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize(boo::MetalDataFactory::Context& ctx,
|
||||
boo::IShaderPipeline*& pipeOut,
|
||||
boo::IVertexFormat*& vtxFmtOut)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@ void CGameArea::CAreaFog::SetFogExplicit(ERglFogMode, const zeus::CColor& color,
|
|||
|
||||
bool CGameArea::CAreaFog::IsFogDisabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CGameArea::CAreaFog::DisableFog()
|
||||
|
@ -45,49 +46,58 @@ CDummyGameArea::CDummyGameArea(CInputStream& in, int idx, int mlvlVersion)
|
|||
|
||||
u32 attachAreaCount = in.readUint32Big();
|
||||
x44_attachedAreaIndices.reserve(attachAreaCount);
|
||||
for (int i=0 ; i<attachAreaCount ; ++i)
|
||||
for (u32 i=0 ; i<attachAreaCount ; ++i)
|
||||
x44_attachedAreaIndices.push_back(in.readUint16Big());
|
||||
|
||||
u32 depCount = in.readUint32Big();
|
||||
for (int i=0 ; i<depCount ; ++i)
|
||||
for (u32 i=0 ; i<depCount ; ++i)
|
||||
in.readUint32Big();
|
||||
|
||||
u32 dockCount = in.readUint32Big();
|
||||
x54_docks.reserve(dockCount);
|
||||
for (int i=0 ; i<dockCount ; ++i)
|
||||
for (u32 i=0 ; i<dockCount ; ++i)
|
||||
x54_docks.emplace_back(in, x14_transform);
|
||||
}
|
||||
|
||||
bool CDummyGameArea::IGetScriptingMemoryAlways() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TAreaId CDummyGameArea::IGetAreaId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ResId CDummyGameArea::IGetAreaAssetId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CDummyGameArea::IIsActive() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TAreaId CDummyGameArea::IGetAttachedAreaId(int) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 CDummyGameArea::IGetNumAttachedAreas() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ResId CDummyGameArea::IGetStringTableAssetId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static zeus::CTransform identityXf(zeus::CMatrix3f::skIdentityMatrix3f);
|
||||
const zeus::CTransform& CDummyGameArea::IGetTM() const
|
||||
{
|
||||
return identityXf;
|
||||
}
|
||||
|
||||
static std::vector<SObjectTag> ReadDependencyList(CInputStream& in)
|
||||
|
@ -95,7 +105,7 @@ static std::vector<SObjectTag> ReadDependencyList(CInputStream& in)
|
|||
std::vector<SObjectTag> ret;
|
||||
u32 count = in.readUint32Big();
|
||||
ret.reserve(count);
|
||||
for (int i=0 ; i<count ; ++i)
|
||||
for (u32 i=0 ; i<count ; ++i)
|
||||
{
|
||||
ret.emplace_back();
|
||||
ret.back().readMLVL(in);
|
||||
|
@ -119,7 +129,7 @@ CGameArea::CGameArea(CInputStream& in, int idx, int mlvlVersion)
|
|||
|
||||
u32 attachedCount = in.readUint32Big();
|
||||
x8c_attachedAreaIndices.reserve(attachedCount);
|
||||
for (int i=0 ; i<attachedCount ; ++i)
|
||||
for (u32 i=0 ; i<attachedCount ; ++i)
|
||||
x8c_attachedAreaIndices.push_back(in.readUint16Big());
|
||||
|
||||
x9c_deps1 = ::urde::ReadDependencyList(in);
|
||||
|
@ -129,42 +139,52 @@ CGameArea::CGameArea(CInputStream& in, int idx, int mlvlVersion)
|
|||
|
||||
bool CGameArea::IGetScriptingMemoryAlways() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TAreaId CGameArea::IGetAreaId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ResId CGameArea::IGetAreaAssetId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CGameArea::IIsActive() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TAreaId CGameArea::IGetAttachedAreaId(int) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 CGameArea::IGetNumAttachedAreas() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ResId CGameArea::IGetStringTableAssetId() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const zeus::CTransform& CGameArea::IGetTM() const
|
||||
{
|
||||
return identityXf;
|
||||
}
|
||||
|
||||
bool CGameArea::DoesAreaNeedEnvFx() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CGameArea::DoesAreaNeedSkyNow() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void CGameArea::UpdateFog(float dt)
|
||||
|
@ -173,6 +193,7 @@ void CGameArea::UpdateFog(float dt)
|
|||
|
||||
bool CGameArea::OtherAreaOcclusionChanged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void CGameArea::PingOcclusionState()
|
||||
|
@ -238,6 +259,7 @@ void CGameArea::StartStreamingMainArea()
|
|||
|
||||
u32 CGameArea::GetNumPartSizes() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CGameArea::AllocNewAreaData(int, int)
|
||||
|
@ -258,6 +280,7 @@ void CGameArea::StartStreamIn(CStateManager& mgr)
|
|||
|
||||
bool CGameArea::Validate(CStateManager& mgr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void CGameArea::PostConstructArea()
|
||||
|
@ -278,10 +301,12 @@ void CGameArea::ClearTokenList()
|
|||
|
||||
u32 CGameArea::GetPreConstructedSize() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CGameArea::VerifyHeader() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "CSimplePool.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "CInGameTweakManagerBase.hpp"
|
||||
#include "AutoMapper/CMapWorld.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
|
|
@ -5,13 +5,14 @@
|
|||
#include "ScriptObjectSupport.hpp"
|
||||
#include "CGameArea.hpp"
|
||||
#include "Graphics/CModel.hpp"
|
||||
#include "AutoMapper/CMapWorld.hpp"
|
||||
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CGameArea;
|
||||
class IObjectStore;
|
||||
class CResFactory;
|
||||
class CMapWorld;
|
||||
class IGameArea;
|
||||
|
||||
class IWorld
|
||||
|
|
Loading…
Reference in New Issue