diff src/th06/ecl.rs @ 685:11d7e4d6947a

ecl_vm: nearing the complete list
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Fri, 16 Aug 2019 23:27:09 +0200
parents c8bb28961d31
children aefe5b5f481e
line wrap: on
line diff
--- a/src/th06/ecl.rs
+++ b/src/th06/ecl.rs
@@ -189,18 +189,24 @@ declare_sub_instructions!{
     4 => fn SetInt(var: i32, value: i32),
     5 => fn SetFloat(var: i32, value: f32),
     6 => fn SetRandomInt(var: i32, max: i32),
+    7 => fn SetRandomIntMin(var: i32, max: i32, min: i32),
     8 => fn SetRandomFloat(var: i32, max: f32),
     9 => fn SetRandomFloatMin(var: i32, amplitude: f32, min: f32),
     10 => fn StoreX(var: i32),
+    11 => fn StoreY(var: i32),
+    12 => fn StoreZ(var: i32),
     13 => fn AddInt(var: i32, a: i32, b: i32),
     14 => fn SubstractInt(var: i32, a: i32, b: i32),
     15 => fn MultiplyInt(var: i32, a: i32, b: i32),
     16 => fn DivideInt(var: i32, a: i32, b: i32),
     17 => fn ModuloInt(var: i32, a: i32, b: i32),
     18 => fn Increment(var: i32),
+    19 => fn Decrement(var: i32),
     20 => fn AddFloat(var: i32, a: f32, b: f32),
     21 => fn SubstractFloat(var: i32, a: f32, b: f32),
+    22 => fn MultiplyFloat(var: i32, a: f32, b: f32),
     23 => fn DivideFloat(var: i32, a: f32, b: f32),
+    24 => fn ModuloFloat(var: i32, a: f32, b: f32),
     25 => fn GetDirection(var: i32, x1: f32, y1: f32, x2: f32, y2: f32),
     26 => fn FloatToUnitCircle(var: i32),
     27 => fn CompareInts(a: i32, b: i32),
@@ -213,7 +219,12 @@ declare_sub_instructions!{
     34 => fn RelativeJumpIfNotEqual(frame: i32, ip: i32),
     35 => fn Call(sub: i32, param1: i32, param2: f32),
     36 => fn Return(),
+    37 => fn CallIfSuperior(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
+    38 => fn CallIfSuperiorOrEqual(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
     39 => fn CallIfEqual(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
+    40 => fn CallIfInferior(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
+    41 => fn CallIfInferiorOrEqual(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
+    42 => fn CallIfNotEqual(sub: i32, param1: i32, param2: f32, a: i32, b: i32),
     43 => fn SetPosition(x: f32, y: f32, z: f32),
     45 => fn SetAngleAndSpeed(angle: f32, speed: f32),
     46 => fn SetRotationSpeed(speed: f32),
@@ -254,7 +265,7 @@ declare_sub_instructions!{
     91 => fn LaserSetCompare(id: u32),
     92 => fn CancelLaser(id: u32),
     93 => fn SetSpellcard(face: i16, number: i16, name: String),
-    94 => fn Endspellcard(),
+    94 => fn EndSpellcard(),
     95 => fn SpawnEnemy(sub: i32, x: f32, y: f32, z: f32, life: i16, bonus_dropped: i16, die_score: i32),
     96 => fn KillAllEnemies(),
     97 => fn SetAnim(script: i32),
@@ -271,7 +282,7 @@ declare_sub_instructions!{
     108 => fn SetDeathCallback(sub: i32),
     109 => fn MemoryWriteInt(value: i32, index: i32),
     111 => fn SetLife(life: i32),
-    112 => fn SetEllapsedTime(frame: i32),
+    112 => fn SetElapsedTime(frame: i32),
     113 => fn SetLowLifeTrigger(trigger: i32),
     114 => fn SetLowLifeCallback(sub: i32),
     115 => fn SetTimeout(timeout: i32),