Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
150:6e7d228def30 | 151:afcd83f7fac8 |
---|---|
1 | |
2 """ | |
3 FIFE Backwards Combatibility Layer | |
4 ================================== | |
5 | |
6 This module can be imported if you want to | |
7 run code that wasn't adapted to API changes in FIFE. | |
8 | |
9 2008.1 | |
10 ------ | |
11 | |
12 - Animation.addFrame now expects a fife.ResourcePtr instead of an fife.Image | |
13 | |
14 | |
15 """ | |
16 | |
17 import fife | |
18 | |
19 # 2008.1 compatibility functions | |
20 | |
21 def decorate_addFrame(f): | |
22 """ Revision 2616 - Animation.addFrame doesn't accept Image* anymore """ | |
23 def addFrame(self,image_ptr, delay): | |
24 resource_ptr = fife.ResourcePtr(image_ptr) | |
25 return f(self,resource_ptr,delay) | |
26 return addFrame | |
27 | |
28 fife.Animation.addFrame = decorate_addFrame(fife.Animation.addFrame) |