Mercurial > touhou
changeset 155:ed86bec43b93
Implement two new instructions.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 09 Oct 2011 16:55:49 -0700 |
parents | 364935f6e313 |
children | ebfd328e700c |
files | pytouhou/vm/eclrunner.py |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -344,6 +344,12 @@ class ECLRunner(object): self._setval(variable_id, atan2(self._getval(y2) - self._getval(y1), self._getval(x2) - self._getval(x1))) + @instruction(26) + def float_to_unit_circle(self, variable_id): + #TODO: takes only floats. + self._setval(variable_id, (self._getval(variable_id) + pi) % (2*pi) - pi) + + @instruction(27) @instruction(28) def compare(self, a, b): @@ -666,7 +672,16 @@ class ECLRunner(object): @instruction(93) def set_spellcard(self, unknown, number, name): #TODO: display it on the game. - print("%d - %s" % (number, name)) + #TODO: change the background. + #TODO: make the enemies more resistants (and find how). + print("%d - %s" % (number+1, name)) + + + @instruction(94) + def end_spellcard(self): + #TODO: return everything back to normal + #TODO: give the spellcard bonus. + self._game.change_bullets_into_star_items() @instruction(95)