Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove a bunch of unnecessary imports.

Also remove some dead code in porigonz.nds.util.
  • Loading branch information...
commit e64b1181b32c99d3b233be57e78a193f09495311 1 parent 8f8f9ae
@magical magical authored
View
3  porigonz/__init__.py
@@ -1,4 +1,3 @@
-import binascii
from optparse import OptionParser
import os
import re
@@ -7,8 +6,6 @@
from porigonz.nds import DSImage
from porigonz.nds import format
-from porigonz.nds.util.text import CharacterTable
-from porigonz.nds.util.sprites import Palette, Sprite
help = """porigon-z: a Nintendo DS game image inspector aimed at Pokemon
Syntax: porigon-z {path-to-image-file} {command} ...
View
2  porigonz/nds/__init__.py
@@ -12,8 +12,6 @@
from construct import *
-from porigonz.nds import util
-
# Useful for much of the below: http://llref.emutalk.net/nds_formats.htm
# DS uses UTF-16 null-terminated strings for a lot of text
View
16 porigonz/nds/util/__init__.py
@@ -26,19 +26,3 @@ def word_iterator(source, word_size):
current_len -= word_size
yield new_word
-"""
- for ch in source:
- # Add in some bits
- current_word = (current_word << 8) | ord(ch)
- current_len += 8
-
- # If there are enough bits for a word, split them off and yield
- while current_len >= word_size:
- extra_bits = current_len - word_size
- new_word = current_word >> extra_bits
-
- current_word = current_word & ~(new_word << extra_bits)
- current_len -= word_size
-
- yield new_word
-"""
View
2  porigonz/nds/util/texture.py
@@ -1,10 +1,8 @@
from construct import *
-from construct.lib import int_to_bin, bin_to_int
from PIL import Image
from cStringIO import StringIO
from collections import namedtuple
from itertools import izip as zip
-from math import sqrt, ceil
from porigonz.nds.util import word_iterator
Please sign in to comment.
Something went wrong with that request. Please try again.