# HG changeset patch # User thebastion@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1222600356 0 # Node ID 3fddb45c0304dc64fd1b5bb28cd708bef61ae895 # Parent 2cc01d9433ab4c6926fab4e5a63f3a2aa3bb913f edited the loaders, images are now loaded only once into memory diff -r 2cc01d9433ab -r 3fddb45c0304 doc/AUTHORS --- a/doc/AUTHORS Sat Sep 27 23:33:17 2008 +0000 +++ b/doc/AUTHORS Sun Sep 28 11:12:36 2008 +0000 @@ -39,6 +39,7 @@ spq >> spq@my-ct.de stro >> stroantree@gmail.com tesseract >> josh_root@users.sourceforge.net +thebastion >> s.klytta@gmx.eu trapdoor >> ko2fan@gmail.com undeadinsanity >> arron@arronbailiss.co.uk vja >> vja@inbox.ru diff -r 2cc01d9433ab -r 3fddb45c0304 engine/extensions/pychan/manager.py --- a/engine/extensions/pychan/manager.py Sat Sep 27 23:33:17 2008 +0000 +++ b/engine/extensions/pychan/manager.py Sun Sep 28 11:12:36 2008 +0000 @@ -125,7 +125,7 @@ return style_copy def loadImage(self,filename): - return fife.GuiImage(self.engine.imagePool.addResourceFromFile(filename),self.engine.imagePool) + return fife.GuiImage(self.engine.imagePool.getIndex(filename),self.engine.imagePool) def defaultWidgetAction(self,event): if self.debug: diff -r 2cc01d9433ab -r 3fddb45c0304 engine/extensions/serializers/xmlanimation.py --- a/engine/extensions/serializers/xmlanimation.py Sat Sep 27 23:33:17 2008 +0000 +++ b/engine/extensions/serializers/xmlanimation.py Sun Sep 28 11:12:36 2008 +0000 @@ -44,10 +44,11 @@ path.pop() path.append(str(source)) - image = self.imagepool.getImage(self.imagepool.addResourceFromFile('/'.join(path))) + image = self.imagepool.getImage(self.imagepool.getIndex('/'.join(path))) image.setXShift(frame_x_offset) image.setYShift(frame_y_offset) animation.addFrame(image, frame_delay); animation.thisown = 0 return animation + diff -r 2cc01d9433ab -r 3fddb45c0304 engine/extensions/serializers/xmlobject.py --- a/engine/extensions/serializers/xmlobject.py Sat Sep 27 23:33:17 2008 +0000 +++ b/engine/extensions/serializers/xmlobject.py Sun Sep 28 11:12:36 2008 +0000 @@ -99,7 +99,7 @@ path.pop() path.append(str(source)) - id = self.image_pool.addResourceFromFile('/'.join(path)) + id = self.image_pool.getIndex('/'.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.addResourceFromFile('/'.join(path)) + anim_id = self.anim_pool.getIndex('/'.join(path)) animation = self.anim_pool.getAnimation(anim_id) action.get2dGfxVisual().addAnimation(int( anim.get('direction', 0) ), anim_id) action.setDuration(animation.getDuration())