Table of Contents

Module: some_sprites urdpyg/some_sprites.py

file: some_sprites.py purpose: animation, sprite playing.

Imported modules   
import bisect
import glob
import os
import os.path
import pygame
from pygame.locals import *
import sys
import time
Functions   
animation_factory
get_background_names
get_character_frame_names
load_image
read_anim_data
  animation_factory 
animation_factory ( anim_data,  loop=1 )

Returns a dict keyed by anim_name valued by Animation instances. anim_data - keyed by anim name, valued by a list of tuples(frame_name, length). loop - passed through to Animation class.

  get_background_names 
get_background_names ( base_dir )

TODO: needs fixing/testing.

  get_character_frame_names 
get_character_frame_names ( the_layer_order,  base_dir=".." )

returns a dict keyed by character name, valued by a dict(keyed by meaningful name, valued by image path name).

  load_image 
load_image (
        name,
        colorkey=None,
        convert_alpha=0,
        )

Exceptions   
SystemExit, message
  read_anim_data 
read_anim_data ( character_name,  base_dir=".." )

Reads the animation data from the characters anim.py file.

Classes   

A

Animation

For telling which of the frames should be drawn.

ImageAnimation

Timer


Table of Contents

This document was automatically generated on Sat Jul 30 12:45:44 2005 by HappyDoc version 2.1