comparison src/th06/ecl_vm.rs @ 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
comparison
equal deleted inserted replaced
690:eecb8626f472 691:f5d85a646975
652 let mut enemy = self.enemy.borrow_mut(); 652 let mut enemy = self.enemy.borrow_mut();
653 enemy.bullet_offset = Offset { dx, dy }; 653 enemy.bullet_offset = Offset { dx, dy };
654 } 654 }
655 655
656 // 82 656 // 82
657 // TODO: correct but how to implement that in a rusty way? 657 SubInstruction::SetExtendedBulletAttributes(a, b, c, d, e, f, g, h) => {
658 /* 658 let (a, b, c, d) = (self.get_i32(a), self.get_i32(b), self.get_i32(c), self.get_i32(d));
659 SubInstruction::SetExtendedBulletAttributes(x, y, z) => { 659 let (e, f, g, h) = (self.get_f32(e), self.get_f32(f), self.get_f32(g), self.get_f32(h));
660 let mut enemy = self.enemy.borrow_mut(); 660 let mut enemy = self.enemy.borrow_mut();
661 661 enemy.bullet_attributes.extended_attributes = (a, b, c, d, e, f, g, h);
662 // self._enemy.extended_bullet_attributes = tuple(self._getval(attr) for attr in attributes) 662 }
663 } 663
664 */
665 // 83 664 // 83
666 /* 665 /*
667 SubInstruction::ChangeBulletsIntoStarBonus() => { 666 SubInstruction::ChangeBulletsIntoStarBonus() => {
668 let mut game = self.game.borrow_mut(); 667 let mut game = self.game.borrow_mut();
669 game.change_bullets_into_star_items(); 668 game.change_bullets_into_star_items();