Mercurial > fife-parpg
diff engine/extensions/serializers/xmlobject.py @ 152:679ed3e15513
Deprecation: getIndex is now thrown out.
Import fife_compat for the transition.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 11 Oct 2008 12:55:41 +0000 |
parents | 3fddb45c0304 |
children | 376b8afc9a18 |
line wrap: on
line diff
--- a/engine/extensions/serializers/xmlobject.py Sat Oct 11 12:25:53 2008 +0000 +++ b/engine/extensions/serializers/xmlobject.py Sat Oct 11 12:55:41 2008 +0000 @@ -99,7 +99,7 @@ path.pop() path.append(str(source)) - id = self.image_pool.getIndex('/'.join(path)) + id = self.image_pool.addResourceFromFile('/'.join(path)) object.get2dGfxVisual().addStaticImage(int( image.get('direction', 0) ), id) img = self.image_pool.getImage(id) img.setXShift(int( image.get('x_offset', 0) )) @@ -126,7 +126,7 @@ path.pop() path.append(str(source)) - anim_id = self.anim_pool.getIndex('/'.join(path)) + anim_id = self.anim_pool.addResourceFromFile('/'.join(path)) animation = self.anim_pool.getAnimation(anim_id) action.get2dGfxVisual().addAnimation(int( anim.get('direction', 0) ), anim_id) action.setDuration(animation.getDuration())