[General] Fix compiler warnings
This commit is contained in:
parent
803596214d
commit
43db338a5a
@ -4,41 +4,40 @@ namespace Assets
|
||||
{
|
||||
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()));
|
||||
if (rawFx.exists())
|
||||
{
|
||||
Components::FileSystem::File rawFx(fmt::sprintf("fx/%s.efx", name.data()));
|
||||
if (rawFx.exists())
|
||||
const char* session = rawFx.getBuffer().data();
|
||||
Game::Com_BeginParseSession("fx");
|
||||
Game::Com_SetSpaceDelimited(0);
|
||||
Game::Com_SetParseNegativeNumbers(1);
|
||||
|
||||
const char* format = Game::Com_Parse(&session);
|
||||
if (format != "iwfx"s)
|
||||
{
|
||||
const char* session = rawFx.getBuffer().data();
|
||||
Game::Com_BeginParseSession("fx");
|
||||
Game::Com_SetSpaceDelimited(0);
|
||||
Game::Com_SetParseNegativeNumbers(1);
|
||||
|
||||
const char* format = Game::Com_Parse(&session);
|
||||
if (format != "iwfx"s)
|
||||
{
|
||||
Game::Com_EndParseSession();
|
||||
Components::Logger::Error("Effect needs to be updated from the legacy format.\n");
|
||||
}
|
||||
|
||||
int version = atoi(Game::Com_Parse(&session));
|
||||
if (version > 2)
|
||||
{
|
||||
Game::Com_EndParseSession();
|
||||
Components::Logger::Error("Version %i is too high. I can only handle up to %i.\n", version, 2);
|
||||
}
|
||||
|
||||
Game::FxEditorEffectDef efx;
|
||||
ZeroMemory(&efx, sizeof(efx));
|
||||
|
||||
// for (int i = 0; i < FX_ELEM_FIELD_COUNT; ++i)
|
||||
// {
|
||||
// Game::s_elemFields[i].handler(&session, efx.elems);
|
||||
// }
|
||||
|
||||
Game::Com_EndParseSession();
|
||||
Components::Logger::Error("Effect needs to be updated from the legacy format.\n");
|
||||
}
|
||||
|
||||
int version = atoi(Game::Com_Parse(&session));
|
||||
if (version > 2)
|
||||
{
|
||||
Game::Com_EndParseSession();
|
||||
Components::Logger::Error("Version %i is too high. I can only handle up to %i.\n", version, 2);
|
||||
}
|
||||
|
||||
Game::FxEditorEffectDef efx;
|
||||
ZeroMemory(&efx, sizeof(efx));
|
||||
|
||||
// for (int i = 0; i < FX_ELEM_FIELD_COUNT; ++i)
|
||||
// {
|
||||
// Game::s_elemFields[i].handler(&session, efx.elems);
|
||||
// }
|
||||
|
||||
Game::Com_EndParseSession();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void IFxEffectDef::markFxElemVisuals(Game::FxElemVisuals* visuals, char elemType, Components::ZoneBuilder::Zone* builder)
|
||||
|
@ -68,6 +68,7 @@ namespace Assets
|
||||
void IGameWorldSp::saveVehicleTrackSegment_ptrArray(Game::VehicleTrackSegment** trackSegmentPtrs, int count, Components::ZoneBuilder::Zone* builder)
|
||||
{
|
||||
Utils::Stream* buffer = builder->getBuffer();
|
||||
if (!trackSegmentPtrs) return;
|
||||
|
||||
Game::VehicleTrackSegment** destTrackSegmentPtrs = buffer->dest<Game::VehicleTrackSegment*>();
|
||||
buffer->saveArray(trackSegmentPtrs, count);
|
||||
|
@ -108,7 +108,6 @@ namespace Assets
|
||||
|
||||
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[2] = originalVerts[i % 3].texCoord[2];
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; ++i)
|
||||
|
@ -95,6 +95,7 @@ namespace Components
|
||||
|
||||
int Materials::FormatImagePath(char* buffer, size_t size, int, int, const char* image)
|
||||
{
|
||||
#if 0
|
||||
if (Utils::String::StartsWith(image, "preview_"))
|
||||
{
|
||||
std::string newImage = image;
|
||||
@ -105,6 +106,7 @@ namespace Components
|
||||
image = Utils::String::VA("%s", newImage.data());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return _snprintf_s(buffer, size, size, "images/%s.iwi", image);
|
||||
}
|
||||
|
@ -164,7 +164,8 @@ namespace Components
|
||||
surfs->numSurfaces = newSurfs->numSurfaces;
|
||||
|
||||
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);
|
||||
model->lods[i].numSurfs = numSurfs;
|
||||
|
Loading…
Reference in New Issue
Block a user