Skip to content

Commit

Permalink
nothing to say here
Browse files Browse the repository at this point in the history
  • Loading branch information
aboood40091 committed Sep 28, 2016
1 parent 90e2a1c commit 7ab86b8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gtx_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# GTX Extractor
# Version v3.0
# Copyright © 2014 Treeki, 2015-2016 AboodXD


# This file is part of GTX Extractor.

Expand Down Expand Up @@ -192,7 +192,7 @@ def get_deswizzled_data(gfd):
format_ = 26
elif gfd.format == 0x1:
format_ = 50
elif gfd.format == 0x7:
elif gfd.format == 0x7: # I'm not sure about this, but this is what Random Talking Bush said. :/
format_ = 51
elif (gfd.format == 0x31 or gfd.format == 0x431):
format_ = "BC1"
Expand Down Expand Up @@ -825,6 +825,11 @@ def AddrLib_computeCmaskInfo(pitchIn, heightIn, numSlices, isLinear, pTileInfo,
return returnCode

# ----------\/-Start of DDS writer section-\/---------- #

# Copyright © 2016 AboodXD

# Feel free to include this in your own program if you want, just give credits. :)

def writeHeader(num_mipmaps, w, h, format_, compressed=False):
hdr = bytearray(128)

Expand Down Expand Up @@ -882,7 +887,7 @@ def writeHeader(num_mipmaps, w, h, format_, compressed=False):
rmask = 0x000000ff
gmask = 0x000000ff
bmask = 0x000000ff
amask = 0x00000000
amask = 0x0000ff00

hdr[:4] = b'DDS '
hdr[4:4+4] = 124 .to_bytes(4, 'little')
Expand Down

0 comments on commit 7ab86b8

Please sign in to comment.