changeset 659:53786d834444

Yet more ecl.
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Fri, 09 Aug 2019 04:25:43 +0200
parents 3a9d82a02c88
children 31fc0d881105
files src/th06/ecl_vm.rs
diffstat 1 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs	Sat Aug 10 12:48:01 2019 +0200
+++ b/src/th06/ecl_vm.rs	Fri Aug 09 04:25:43 2019 +0200
@@ -213,6 +213,43 @@
                     Instruction::Call(sub, param1, param2);
                 }
             }
+            // 43 
+            Instruction::SetPos(x, y, z) {
+                self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z));
+            }
+            // 44 
+            Instruction::SetPosInterlacing(x, y, z) {
+                //TODO: almost the same as setpos, except with 3 different values and sets the
+                //interlacing, should double check 
+                self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z));
+            }
+            // 45
+            Instruction::SetAngleSpeed(angle, speed) {
+                self._enemy.update_mode = 0;
+                self._enemy.angle, self._enemy.speed = self._getval(angle), self._getval(speed);
+            }
+            // 46 
+            Instruction::SetRotationSpeed(speed) {
+                self._enemy.update_mode = 0
+                self._enemy.rotation_speed = self._getval(speed)
+            }
+            // 47 
+            Instruction::SetSpeed(speed) {
+                self._enemy.update_mode = 0
+                self._enemy.speed = self._getval(speed)
+            }
+            // 48 
+            Instruction::SetAcceleration(acceleration) {
+                self._enemy.update_mode = 0
+                self._enemy.acceleration = self._getval(acceleration)
+            }
+            // 49
+            Instruction::SetRandomAngle(min_angle, max_angle) {
+                angle = self._game.prng.rand_double() * (max_angle - min_angle) + min_angle
+                self._enemy.angle = angle
+            }
+
+            // 83 -> star items >>> life items