diff pytouhou/game/itemtype.py @ 430:c9433188ffdb

Remove AnmWrapper, since ANMs are lists of entries now.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 03 Aug 2013 15:49:04 +0200
parents 5afc75f71fed
children b32cef75df59
line wrap: on
line diff
--- a/pytouhou/game/itemtype.py
+++ b/pytouhou/game/itemtype.py
@@ -1,9 +1,11 @@
 from pytouhou.game.sprite import Sprite
 
 class ItemType(object):
-    def __init__(self, anm_wrapper, sprite_index, indicator_sprite_index):
-        self.anm_wrapper = anm_wrapper
+    def __init__(self, anm, sprite_index, indicator_sprite_index):
+        self.anm = anm
         self.sprite = Sprite()
-        self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(sprite_index)
+        self.sprite.anm = anm
+        self.sprite.texcoords = anm.sprites[sprite_index]
         self.indicator_sprite = Sprite()
-        self.indicator_sprite.anm, self.indicator_sprite.texcoords = anm_wrapper.get_sprite(indicator_sprite_index)
+        self.indicator_sprite.anm = anm
+        self.indicator_sprite.texcoords = anm.sprites[indicator_sprite_index]