diff pytouhou/vm/eclrunner.py @ 242:1d3c8c7473a2

Implement auxiliary animations of enemies like magic circles, and interruptions from ecl.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 02 Jan 2012 15:46:29 +0100
parents 9bb26dbb8438
children 2b7f69ad9ccd
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -744,8 +744,8 @@ class ECLRunner(object):
 
 
     @instruction(97)
-    def set_anim(self, sprite_index):
-        self._enemy.set_anim(sprite_index)
+    def set_anim(self, script):
+        self._enemy.set_anim(script)
 
 
     @instruction(98)
@@ -754,6 +754,11 @@ class ECLRunner(object):
         self._enemy.set_anim(default)
 
 
+    @instruction(99)
+    def set_aux_anm(self, number, script):
+        self._enemy.set_aux_anm(number, script)
+
+
     @instruction(100)
     def set_death_anim(self, sprite_index):
         self._enemy.death_anim = sprite_index
@@ -931,6 +936,16 @@ class ECLRunner(object):
         self._enemy.remaining_lives = lives
 
 
+    @instruction(128)
+    def interrupt(self, event):
+        self._enemy._anmrunner.interrupt(event)
+
+
+    @instruction(129)
+    def interrupt_aux(self, number, event):
+        self._enemy.aux_anm[number]._anmrunner.interrupt(event)
+
+
     @instruction(132)
     def set_visible(self, value):
         self._enemy._visible = bool(value)