comparison engine/extensions/serializers/xmlanimation.py @ 151:afcd83f7fac8

Backwards compatibility module fife_compat. Import and you'll get the old interface. This is just a start to make small API changes smoother.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 11 Oct 2008 12:25:53 +0000
parents 6e7d228def30
children 679ed3e15513
comparison
equal deleted inserted replaced
150:6e7d228def30 151:afcd83f7fac8
1 import fife 1 import fife
2 import fife_compat
2 from serializers import * 3 from serializers import *
3 4
4 class XMLAnimationLoader(fife.ResourceLoader): 5 class XMLAnimationLoader(fife.ResourceLoader):
5 def __init__(self, imagepool, vfs): 6 def __init__(self, imagepool, vfs):
6 fife.ResourceLoader.__init__(self) 7 fife.ResourceLoader.__init__(self)
48 image_location.setXShift(frame_x_offset) 49 image_location.setXShift(frame_x_offset)
49 image_location.setYShift(frame_y_offset) 50 image_location.setYShift(frame_y_offset)
50 51
51 image_index = self.imagepool.addResourceFromLocation(image_location) 52 image_index = self.imagepool.addResourceFromLocation(image_location)
52 animation.addFrame(fife.ResourcePtr(self.imagepool,image_index), frame_delay) 53 animation.addFrame(fife.ResourcePtr(self.imagepool,image_index), frame_delay)
54 #animation.addFrame(self.imagepool.get(image_index), frame_delay)
53 #print "...",image_index,image_location.getFilename() 55 #print "...",image_index,image_location.getFilename()
54 56
55 animation.thisown = 0 57 animation.thisown = 0
56 return animation 58 return animation
57 59