Skip to content

Commit

Permalink
duplicate certain rendering states for _dfog areas when porting from iw3
Browse files Browse the repository at this point in the history
  • Loading branch information
RektInator committed Oct 31, 2019
1 parent a68a292 commit 9f02928
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/IW3/Assets/Techset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ namespace ZoneTool
if (itr->second >= 0)
{
iw4_statebits[itr->second] = statebits[i];

if (itr->second >= 5 && itr->second <= 36)
{
iw4_statebits[itr->second + 1] = statebits[i];
}
}
}
}
Expand All @@ -379,6 +384,11 @@ namespace ZoneTool
const auto size = sizeof(IW4::MaterialTechniqueHeader) + (sizeof(IW4::MaterialPass) * asset->techniques[i]->hdr.numPasses);
iw4_techset->techniques[itr->second] = reinterpret_cast<IW4::MaterialTechnique*>(
new char[size]);

if (itr->second >= 5 && itr->second <= 36)
{
iw4_techset->techniques[itr->second + 1] = iw4_techset->techniques[itr->second];
}

memcpy(iw4_techset->techniques[itr->second], asset->techniques[i], size);

Expand Down Expand Up @@ -425,6 +435,11 @@ namespace ZoneTool
{
if (iw4_techset->techniques[i])
{
if (i >= 5 && i <= 36 && i % 2 == 0)
{
continue;
}

for (short pass = 0; pass < iw4_techset->techniques[i]->hdr.numPasses; pass++)
{
delete iw4_techset->techniques[i]->pass[pass].pixelShader;
Expand Down

0 comments on commit 9f02928

Please sign in to comment.