Skip to content

Commit

Permalink
Fix a bug while exporting mipmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
aboood40091 committed Aug 12, 2017
1 parent ab6bc90 commit 3fa0b82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bfres_tool.py
Expand Up @@ -268,9 +268,9 @@ def FTEXtoDDS(ftex_pos, f, name, folder):
deswizzled = addrlib.deswizzle(max(1, width >> level), max(1, height >> level), surfOut.height, format_, surfOut.tileMode, swizzle_, surfOut.pitch, surfOut.bpp, data)

if format_ in BCn_formats:
size = ((max(1, width >> level) + 3) >> 2) * ((max(1, height >> level) + 3) >> 2) * surfOut.bpp
size = ((max(1, width >> level) + 3) >> 2) * ((max(1, height >> level) + 3) >> 2) * bpp
else:
size = max(1, width >> level) * max(1, height >> level) * surfOut.bpp
size = max(1, width >> level) * max(1, height >> level) * bpp

if format_ == 0xa:
data = form_conv.toDDSrgb5a1(deswizzled[:size])
Expand Down

0 comments on commit 3fa0b82

Please sign in to comment.