diff --git a/TPL.py b/TPL.py index 9656b9c..3e3cf01 100644 --- a/TPL.py +++ b/TPL.py @@ -1,9 +1,14 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from common import * + + + class TPL(): """This is the class to generate TPL texutres from PNG images, and to convert TPL textures to PNG images. The parameter file specifies the filename of the source, either a PNG image or a TPL image. diff --git a/U8.py b/U8.py index 0bff63b..3a714b6 100644 --- a/U8.py +++ b/U8.py @@ -1,9 +1,14 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from common import * + + + class U8(): """This class can unpack and pack U8 archives, which are used all over the Wii. They are often used in Banners and contents in Downloadable Titles. Please remove all headers and compression first, kthx. diff --git a/__init__.py b/__init__.py index aace4f6..55ab47e 100644 --- a/__init__.py +++ b/__init__.py @@ -1,9 +1,3 @@ __all__ = [] -from common import * -from compression import * -from disc import * -from nand import * -from title import * -from TPL import * -from U8 import * \ No newline at end of file +from common import * \ No newline at end of file diff --git a/common.py b/common.py index b6d17ea..4244773 100644 --- a/common.py +++ b/common.py @@ -1,9 +1,18 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from compression import * +from disc import * +from nand import * +from title import * +from TPL import * +from U8 import * + + def align(x, boundary): return x + (x % boundary) diff --git a/compression.py b/compression.py index 1139864..f1fd794 100644 --- a/compression.py +++ b/compression.py @@ -1,9 +1,13 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from common import * + + class LZ77(): class WiiLZ77: #class by marcan TYPE_LZ77 = 1 diff --git a/disc.py b/disc.py index 9da6a27..82e20af 100644 --- a/disc.py +++ b/disc.py @@ -1,9 +1,17 @@ +import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array +import wx +import png + +from Crypto.Cipher import AES +from Struct import Struct + +from common import * + class WOD: #WiiOpticalDisc def __init__(self, f): self.f = f - class fsentry: name = "" parent = None @@ -82,7 +90,7 @@ class WOD: #WiiOpticalDisc self.tmd = TMD("tmd") - + print tmd.getIOSVersion() fst.seek(dataoffs) diff --git a/nand.py b/nand.py index ddf65b8..3a3d1d2 100644 --- a/nand.py +++ b/nand.py @@ -1,9 +1,14 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from common import * + + + class NAND: """This class performs all NAND related things. It includes functions to copy a title (given the TMD) into the correct structure as the Wii does, and will eventually have an entire ES-like system. Parameter f to the initializer is the folder that will be used as the NAND root.""" def __init__(self, f): diff --git a/title.py b/title.py index f99a708..81c473a 100644 --- a/title.py +++ b/title.py @@ -1,9 +1,13 @@ import os, hashlib, struct, subprocess, fnmatch, shutil, urllib, array import wx -from Crypto.Cipher import AES import png + +from Crypto.Cipher import AES from Struct import Struct +from common import * + + class Ticket: """Creates a ticket from the filename defined in f. This may take a longer amount of time than expected, as it also decrypts the title key. Now supports Korean tickets (but their title keys stay Korean on dump).""" class TicketStruct(Struct):