changeset 725:fbf89cba04e2

ecl_vm: some work on spellcard 11
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Tue, 29 Oct 2019 15:41:23 +0100
parents 8acaf45b47d0
children 187359932584
files src/th06/ecl_vm.rs
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs	Tue Oct 29 14:39:03 2019 +0100
+++ b/src/th06/ecl_vm.rs	Tue Oct 29 15:41:23 2019 +0100
@@ -1029,6 +1029,29 @@
                         self._setval(-10004, n)
                         */
                     }
+                    11 => {
+                        self.get_prng().borrow_mut().get_f64();
+                        //TODO: the game does that
+                        //drop_particle(&PARTICLES_ARRAY,0xc,enemy->pos,1,0xffffffff);
+                        //self._game.new_effect((enemy.x, enemy.y), 17)
+                        /*
+                        for bullet in game.bullets {
+                            if bullet._bullet_type.state != 0 && bullet._bullet_type.state != 5 && (30. <= (bullet.sprites[0].additional_infos)->height) && bullet.speed == 0. {
+                                bullet.flags = bullet.flags | 0x10;
+                                //TODO: reverse this field and effect
+                                bullet->field_0x5ba = 2;
+                                new_effect(GAME_OBJECT,(sprite *)bullet, (int)bullet->sprites[0].sometimes_copy_of_UNK1 + (int)bullet->field_0x5ba);
+                                bullet.speed=0.01;
+                                bullet.frame=0x78;
+                                let mut angle = self.get_prng().borrow_mut().get_f64() * (2*std::f64::consts::PI) - std::f64::consts::PI;
+                                bullet->attributes[0] = cos(angle) * 0.01000000;
+                                bullet->attributes[1] = sin(angle) * 0.01000000;
+
+
+                            }
+                        }
+                        */
+                    }
                     13 => {
                         if self.frame.ints1[3] % 6 == 0 {
                             let mut _angle=self.frame.floats[2];