diff pytouhou/vm/eclrunner.py @ 96:54929d495654

Handle ECL instruction 18
author Thibaut Girka <thib@sitedethib.com>
date Sun, 04 Sep 2011 21:50:50 +0200
parents e2d8f2a56ea4
children ac2e5e1c2c3c
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -249,6 +249,11 @@ class ECLRunner(object):
         self._setval(variable_id, self._getval(a) % self._getval(b))
 
 
+    @instruction(18)
+    def increment(self, variable_id):
+        self._setval(variable_id, self._getval(variable_id) + 1)
+
+
     @instruction(23)
     def divide_float(self, variable_id, a, b):
         #TODO: takes only floats.