changeset 691:f5d85a646975

ecl_vm: implement SetExtendedBulletAttributes.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 17 Aug 2019 14:07:57 +0200
parents eecb8626f472
children a35df65e0d57
files src/th06/ecl_vm.rs
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -654,14 +654,13 @@ impl EclRunner {
             }
 
             // 82
-            // TODO: correct but how to implement that in a rusty way?
-            /*
-            SubInstruction::SetExtendedBulletAttributes(x, y, z) => {
+            SubInstruction::SetExtendedBulletAttributes(a, b, c, d, e, f, g, h) => {
+                let (a, b, c, d) = (self.get_i32(a), self.get_i32(b), self.get_i32(c), self.get_i32(d));
+                let (e, f, g, h) = (self.get_f32(e), self.get_f32(f), self.get_f32(g), self.get_f32(h));
                 let mut enemy = self.enemy.borrow_mut();
+                enemy.bullet_attributes.extended_attributes = (a, b, c, d, e, f, g, h);
+            }
 
-                // self._enemy.extended_bullet_attributes = tuple(self._getval(attr) for attr in attributes)
-            }
-            */
             // 83
             /*
             SubInstruction::ChangeBulletsIntoStarBonus() => {