Permalink
Browse files

Remove a bunch of unnecessary imports.

Also remove some dead code in porigonz.nds.util.
  • Loading branch information...
1 parent 8f8f9ae commit e64b1181b32c99d3b233be57e78a193f09495311 @magical magical committed Apr 24, 2010
Showing with 0 additions and 23 deletions.
  1. +0 −3 porigonz/__init__.py
  2. +0 −2 porigonz/nds/__init__.py
  3. +0 −16 porigonz/nds/util/__init__.py
  4. +0 −2 porigonz/nds/util/texture.py
View
@@ -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
@@ -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
@@ -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
-"""
@@ -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

0 comments on commit e64b118

Please sign in to comment.