Moved pytmx library into data
Justin Armstrong justinmeister@gmail.com
Fri, 11 Apr 2014 00:38:09 -0700
7 files changed,
21 insertions(+),
14 deletions(-)
A
data/pytmx/__init__.py
@@ -0,0 +1,8 @@
+from data.pytmx.tmxloader import load_pygame, load_tmx +from data.pytmx.utils import buildDistributionRects +from data.pytmx.pytmx import * + +__version__ = '2.16.4' +__author__ = 'bitcraft' +__author_email__ = 'leif.theden@gmail.com' +__description__ = 'Map loader for TMX Files - Python 2.7'
M
data/tilerender.py
→
data/tilerender.py
@@ -1,9 +1,10 @@
""" This is a test of using the pytmx library with Tiled. """ -import sys import pygame as pg -import pytmx + +from . import pytmx + class Renderer(object): """
D
pytmx/__init__.py
@@ -1,8 +0,0 @@
-from tmxloader import load_pygame, load_tmx -from utils import buildDistributionRects -from pytmx import * - -__version__ = '2.16.4' -__author__ = 'bitcraft' -__author_email__ = 'leif.theden@gmail.com' -__description__ = 'Map loader for TMX Files - Python 2.7'
M
pytmx/pytmx.py
→
data/pytmx/pytmx.py
@@ -1,7 +1,8 @@
from itertools import chain, product from xml.etree import ElementTree + from .utils import decode_gid, types, parse_properties, read_points -from .constants import * + __all__ = ['TiledMap', 'TiledTileset', 'TiledLayer', 'TiledObject', 'TiledObjectGroup', 'TiledImageLayer']@@ -493,7 +494,7 @@ def parse(self, node):
""" parse a layer element """ - from utils import group + from data.pytmx.utils import group from itertools import product, imap from struct import unpack import array
M
pytmx/tmxloader.py
→
data/pytmx/tmxloader.py
@@ -1,8 +1,11 @@
import itertools import os + import pygame -import pytmx + +from data.pytmx import pytmx from .constants import * + __all__ = ['load_pygame', 'load_tmx']
M
pytmx/utils.py
→
data/pytmx/utils.py
@@ -1,6 +1,8 @@
-from pygame import Rect from itertools import tee, islice, izip, product from collections import defaultdict + +from pygame import Rect + from .constants import *