changeset 699:2a60f12bd5bd

ecl_vm: stub SetBossMode.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 23 Aug 2019 02:40:27 +0200
parents 05e0425a8bc5
children ccb739c5b66c
files src/th06/ecl_vm.rs src/th06/enemy.rs
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -827,7 +827,6 @@ impl EclRunner {
                 enemy.death_anim = index;
             }
             // 101
-            /*
             SubInstruction::SetBossMode(value) => {
                 let mut enemy = self.enemy.borrow_mut();
                 if value < 0 {
@@ -839,7 +838,6 @@ impl EclRunner {
                     enemy.set_boss(true);
                 }
             }
-            */
 
             // 102
             // TODO: title says it all
--- a/src/th06/enemy.rs
+++ b/src/th06/enemy.rs
@@ -384,6 +384,14 @@ impl Enemy {
         println!("Playing sound {}!", sound_index);
     }
 
+    /// Stubbed for now.
+    pub(crate) fn set_boss(&self, enable: bool) {
+        match enable {
+            true => println!("Enemy is now boss!"),
+            false => println!("Enemy is not boss anymore."),
+        }
+    }
+
     /// Run all interpolators and such, and update internal variables once per
     /// frame.
     pub fn update(&mut self) {