changeset 735:b9928db975e1

ecl: Enable instruction 99.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Dec 2019 19:20:20 +0100
parents 7886a1a5d226
children ff9651cfe1b0
files src/th06/ecl_vm.rs src/th06/enemy.rs
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -815,14 +815,12 @@ impl EclRunner {
                     Some((end_left as u8, end_right as u8, left as u8, right as u8))
                 };
             }
-            /*
             // 99
-            SubInstruction::SetAuxAnims(number, script) => {
-                assert!(7 < number);
+            SubInstruction::SetAuxAnm(number, script) => {
+                assert!(number < 8);
                 let mut enemy = self.enemy.borrow_mut();
-                enemy.set_aux_anm(number, script)
+                enemy.set_aux_anm(number, script);
             }
-            */
 
             // 100
             SubInstruction::SetDeathAnim(index) => {
--- a/src/th06/enemy.rs
+++ b/src/th06/enemy.rs
@@ -511,6 +511,10 @@ impl Enemy {
         let offset = self.pos - player.pos;
         offset.dy.atan2(offset.dx)
     }
+
+    pub(crate) fn set_aux_anm(&self, number: i32, script: i32) {
+        println!("TODO: Spawn aux anm {} with script {}.", number, script);
+    }
 }
 
 trait Renderable {