Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
95:e2d8f2a56ea4 | 96:54929d495654 |
---|---|
247 @instruction(17) | 247 @instruction(17) |
248 def modulo(self, variable_id, a, b): | 248 def modulo(self, variable_id, a, b): |
249 self._setval(variable_id, self._getval(a) % self._getval(b)) | 249 self._setval(variable_id, self._getval(a) % self._getval(b)) |
250 | 250 |
251 | 251 |
252 @instruction(18) | |
253 def increment(self, variable_id): | |
254 self._setval(variable_id, self._getval(variable_id) + 1) | |
255 | |
256 | |
252 @instruction(23) | 257 @instruction(23) |
253 def divide_float(self, variable_id, a, b): | 258 def divide_float(self, variable_id, a, b): |
254 #TODO: takes only floats. | 259 #TODO: takes only floats. |
255 self._setval(variable_id, self._getval(a) / self._getval(b)) | 260 self._setval(variable_id, self._getval(a) / self._getval(b)) |
256 | 261 |