Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+e

'>=': signed/unsigned mismatch

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+e

'>=': signed/unsigned mismatch

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down Expand Up @@ -1363,7 +1363,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+e

'>=': signed/unsigned mismatch

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+e

'>=': signed/unsigned mismatch

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down Expand Up @@ -1530,6 +1530,10 @@
#endif
);

if (!D3DTexture) {
return false;
}

MipLevelCount = mip_level_count;

return true;
Expand Down Expand Up @@ -1625,6 +1629,10 @@
#endif
);

if (!D3DTexture) {
return false;
}

return true;
}

Expand Down Expand Up @@ -1775,6 +1783,10 @@

void TextureLoadTaskClass::Lock_Surfaces()
{
if (!D3DTexture) {
return;
}

MipLevelCount = D3DTexture->GetLevelCount();

for (unsigned int i = 0; i < MipLevelCount; ++i)
Expand Down
Loading