Package horizons :: Package util :: Package loaders :: Module tilesetloader :: Class TileSetLoader
[hide private]
[frames] | no frames]

Class TileSetLoader

source code

The TileSetLoader loads tile sets from a directory tree. The directories loaded begin with 'ts_' to tell tell the loader that they are an action set. directory structure is as follows: <tile_set>/<rotation>/<framenumber>.png for example that would be: ts_shallow/90/0.png Note that all directories except for the rotation dir, all dirs have to be empty and must not include additional tile sets.

Class Methods [hide private]
 
_find_tile_sets(cls, dir)
Traverses recursively starting from dir to find action sets.
source code
 
load(cls) source code
 
get_sets(cls) source code
Class Variables [hide private]
  log = logging.getLogger("util.loaders.tilesetloader")
  tile_sets = {}
  _loaded = False
Method Details [hide private]

_find_tile_sets(cls, dir)
Class Method

source code 

Traverses recursively starting from dir to find action sets. It is similar to os.walk, but more optimized for this use case.