Package fife :: Package extensions :: Module loaders
[hide private]
[frames] | no frames]

Module loaders

source code

Loaders plugin manager

Functions [hide private]
 
loadMapFile(path, engine, callback=None, debug=True, extensions={})
load map file and get (an optional) callback if major stuff is done:
source code
 
addMapLoader(fileExtension, loaderClass)
Add a new loader for fileextension
source code
 
_updateMapFileExtensions() source code
Variables [hide private]
  mapFileMapping = {'xml': XMLMapLoader}
  fileExtensions = set(['xml'])

Imports: os, fife, XMLMapLoader


Function Details [hide private]

loadMapFile(path, engine, callback=None, debug=True, extensions={})

source code 

load map file and get (an optional) callback if major stuff is done:

  • map creation
  • parsed imports
  • parsed layers
  • parsed cameras

    the callback will send both a string and a float (which shows the overall process), callback(string, float)

Parameters:
  • engine (object) - FIFE engine instance
  • callback (function) - callback for maploading progress
  • debug (bool) - flag to activate / deactivate print statements @rtype object @return FIFE map object

addMapLoader(fileExtension, loaderClass)

source code 

Add a new loader for fileextension

Parameters:
  • fileExtension (string) - The file extension the loader is registered for
  • loaderClass (object) - A fife.ResourceLoader implementation that loads maps from files with the given fileExtension