diff src/th06/ecl_vm.rs @ 722:e71ea8214ee2

ecl_vm: some work on vampire fantasy
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Mon, 28 Oct 2019 21:19:50 +0100
parents bbf0da7de481
children 420cec4005b5
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -988,6 +988,32 @@ impl EclRunner {
                                    rand_y * range_y + enemy.pos.x as f64 - range_y / 2.];
                         enemy.bullet_attributes.fire();
                     }
+                    8 => { // Vampire Fantasy
+                        /*
+                        let mut n = 0:
+                        for bullet in game.bullets{
+                            if bullet._bullet_type.state != 0 && bullet._bullet_type.state != 5 && (30. <= (bullet.sprites[0].additional_infos)->height) {
+                                          local_5c.pos[0] = local_bullet_vec->pos[0];
+                                          local_5c.pos[1] = local_bullet_vec->pos[1];
+                                          local_5c.pos[2] = local_bullet_vec->pos[2];
+                                          local_5c.anim = 3;
+                                          local_5c.sprite_index_offset = 1;
+                                          fVar3 = prng_double(&PRNG_STATE);
+                                          local_5c.launch_angle = (self.get_prng().borrow_mut().get_f64() * (2. * std::f64::consts::PI) - std::f64::consts::PI) as f32;
+                                          local_5c.speed = 0.00000000;
+                                          local_5c.bullets_per_shot = 1;
+                                          local_5c.nb_of_shots = 1;
+                                          local_5c.flags = 8;
+                                          local_5c.bullet_type = 1;
+                                          bullet_fire(&local_5c,&ETAMA_ARRAY);
+                                }
+                            n += 1
+                        }
+                        //TODO: this variable might not always be correct! it uses the argument in
+                        //th06: *(int *)(param_1 + 0x9b0) = local_60;
+                        self._setval(-10004, n)
+                        */
+                    }
                     14 => { // Lävatein
                         let mut enemy = self.enemy.borrow_mut();
                         self.frame.ints1[3] = 0;