Mercurial > fife-parpg
view engine/extensions/fife_compat.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 | |
children | 679ed3e15513 |
line wrap: on
line source
""" FIFE Backwards Combatibility Layer ================================== This module can be imported if you want to run code that wasn't adapted to API changes in FIFE. 2008.1 ------ - Animation.addFrame now expects a fife.ResourcePtr instead of an fife.Image """ import fife # 2008.1 compatibility functions def decorate_addFrame(f): """ Revision 2616 - Animation.addFrame doesn't accept Image* anymore """ def addFrame(self,image_ptr, delay): resource_ptr = fife.ResourcePtr(image_ptr) return f(self,resource_ptr,delay) return addFrame fife.Animation.addFrame = decorate_addFrame(fife.Animation.addFrame)