[General] Fix compiler warnings

This commit is contained in:
momo5502 2016-12-27 15:33:47 +01:00
parent 803596214d
commit 43db338a5a
5 changed files with 34 additions and 32 deletions

View File

@ -4,8 +4,7 @@ namespace Assets
{ {
void IFxEffectDef::load(Game::XAssetHeader* /*header*/, std::string name, Components::ZoneBuilder::Zone* /*builder*/) void IFxEffectDef::load(Game::XAssetHeader* /*header*/, std::string name, Components::ZoneBuilder::Zone* /*builder*/)
{ {
if (0) #if 0
{
Components::FileSystem::File rawFx(fmt::sprintf("fx/%s.efx", name.data())); Components::FileSystem::File rawFx(fmt::sprintf("fx/%s.efx", name.data()));
if (rawFx.exists()) if (rawFx.exists())
{ {
@ -38,7 +37,7 @@ namespace Assets
Game::Com_EndParseSession(); Game::Com_EndParseSession();
} }
} #endif
} }
void IFxEffectDef::markFxElemVisuals(Game::FxElemVisuals* visuals, char elemType, Components::ZoneBuilder::Zone* builder) void IFxEffectDef::markFxElemVisuals(Game::FxElemVisuals* visuals, char elemType, Components::ZoneBuilder::Zone* builder)

View File

@ -68,6 +68,7 @@ namespace Assets
void IGameWorldSp::saveVehicleTrackSegment_ptrArray(Game::VehicleTrackSegment** trackSegmentPtrs, int count, Components::ZoneBuilder::Zone* builder) void IGameWorldSp::saveVehicleTrackSegment_ptrArray(Game::VehicleTrackSegment** trackSegmentPtrs, int count, Components::ZoneBuilder::Zone* builder)
{ {
Utils::Stream* buffer = builder->getBuffer(); Utils::Stream* buffer = builder->getBuffer();
if (!trackSegmentPtrs) return;
Game::VehicleTrackSegment** destTrackSegmentPtrs = buffer->dest<Game::VehicleTrackSegment*>(); Game::VehicleTrackSegment** destTrackSegmentPtrs = buffer->dest<Game::VehicleTrackSegment*>();
buffer->saveArray(trackSegmentPtrs, count); buffer->saveArray(trackSegmentPtrs, count);

View File

@ -108,7 +108,6 @@ namespace Assets
map->draw.vd.vertices[i].texCoord[0] = originalVerts[i % 3].texCoord[0]; map->draw.vd.vertices[i].texCoord[0] = originalVerts[i % 3].texCoord[0];
map->draw.vd.vertices[i].texCoord[1] = originalVerts[i % 3].texCoord[1]; map->draw.vd.vertices[i].texCoord[1] = originalVerts[i % 3].texCoord[1];
map->draw.vd.vertices[i].texCoord[2] = originalVerts[i % 3].texCoord[2];
} }
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)

View File

@ -95,6 +95,7 @@ namespace Components
int Materials::FormatImagePath(char* buffer, size_t size, int, int, const char* image) int Materials::FormatImagePath(char* buffer, size_t size, int, int, const char* image)
{ {
#if 0
if (Utils::String::StartsWith(image, "preview_")) if (Utils::String::StartsWith(image, "preview_"))
{ {
std::string newImage = image; std::string newImage = image;
@ -105,6 +106,7 @@ namespace Components
image = Utils::String::VA("%s", newImage.data()); image = Utils::String::VA("%s", newImage.data());
} }
} }
#endif
return _snprintf_s(buffer, size, size, "images/%s.iwi", image); return _snprintf_s(buffer, size, size, "images/%s.iwi", image);
} }

View File

@ -164,7 +164,8 @@ namespace Components
surfs->numSurfaces = newSurfs->numSurfaces; surfs->numSurfaces = newSurfs->numSurfaces;
model->lods[i].surfs = newSurfs->surfaces; model->lods[i].surfs = newSurfs->surfaces;
std::memcpy(&model->lods[i].partBits, newSurfs->partBits, 24); std::memcpy(&model->lods[i].partBits, &newSurfs->partBits, 16);
std::memcpy(&model->lods[i].pad3, &newSurfs->pad, 8);
short numSurfs = static_cast<short>(newSurfs->numSurfaces); short numSurfs = static_cast<short>(newSurfs->numSurfaces);
model->lods[i].numSurfs = numSurfs; model->lods[i].numSurfs = numSurfs;