Skip to content

Commit

Permalink
NiPixelData.save_as_dds fourcc flag bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
amorilia committed Jan 30, 2011
1 parent 3097591 commit ca640ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -12,6 +12,8 @@ Release 2.1.8 (in development)
* Added CStreamableAssetData for Divinity 2 (reported by pertinen,
niftools issue #3164929).

* NiPixelData.save_as_dds fourcc flag bugfix.

Release 2.1.7 (23 January 2011)
===============================

Expand Down
10 changes: 5 additions & 5 deletions pyffi/formats/nif/__init__.py
Expand Up @@ -5775,7 +5775,7 @@ def save_as_dds(self, stream):
# used in newer nif versions
pixeldata.set_value(''.join(self.pixel_data_matrix))
elif self.pixel_format == NifFormat.PixelFormat.PX_FMT_DXT1:
# format used in Megami Tensei: Imagine
# format used in Megami Tensei: Imagine and Bully SE
header.flags.caps = 1
header.flags.height = 1
header.flags.width = 1
Expand All @@ -5786,8 +5786,8 @@ def save_as_dds(self, stream):
header.width = self.mipmaps[0].width
header.linear_size = 0
header.mipmap_count = len(self.mipmaps)
header.pixel_format.flags.fourcc = 1
header.pixel_format.fourcc = pyffi.formats.dds.DdsFormat.FourCC.DXT1
header.pixel_format.flags.four_c_c = 1
header.pixel_format.four_c_c = pyffi.formats.dds.DdsFormat.FourCC.DXT1
header.pixel_format.bit_count = 0
header.pixel_format.r_mask = 0
header.pixel_format.g_mask = 0
Expand Down Expand Up @@ -5817,8 +5817,8 @@ def save_as_dds(self, stream):
header.width = self.mipmaps[0].width
header.linear_size = 0
header.mipmap_count = len(self.mipmaps)
header.pixel_format.flags.fourcc = 1
header.pixel_format.fourcc = pyffi.formats.dds.DdsFormat.FourCC.DXT5
header.pixel_format.flags.four_c_c = 1
header.pixel_format.four_c_c = pyffi.formats.dds.DdsFormat.FourCC.DXT5
header.pixel_format.bit_count = 0
header.pixel_format.r_mask = 0
header.pixel_format.g_mask = 0
Expand Down

0 comments on commit ca640ce

Please sign in to comment.