# HG changeset patch # User Gauvain "GovanifY" Roussel-Tarbouriech # Date 1572356343 -3600 # Node ID 8acaf45b47d06d870bfdfd348593cc41ea097252 # Parent 420cec4005b53d950d4cd18884ef2df7de09e15f ecl_vm: added spellcard 13 diff --git a/src/th06/ecl_vm.rs b/src/th06/ecl_vm.rs --- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -1029,6 +1029,28 @@ impl EclRunner { self._setval(-10004, n) */ } + 13 => { + if self.frame.ints1[3] % 6 == 0 { + let mut _angle=self.frame.floats[2]; + /* + (type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots, + speed, speed2, launch_angle, angle, flags) = self._enemy.bullet_attributes + for i in range(arg) { + //TODO: distance is obtained directly by copying bullet attributes + //in memory + launch_pos = (192 + cos(_angle) * _distance, + 224 + sin(_angle) * _distance); + + bullet_attributes = (type_, anim, sprite_idx_offset, + bullets_per_shot, number_of_shots, + speed, speed2, + _angle + self.frame.floats[1], angle, flags); + enemy.fire(launch_pos=launch_pos,bullet_attributes=bullet_attributes); + _angle += 2*std::f64::consts::PI/arg; + }*/ + } + self.frame.ints1[3] += 1; + } 14 => { // Lävatein let mut enemy = self.enemy.borrow_mut(); self.frame.ints1[3] = 0;