Mercurial > touhou
diff src/th06/ecl_vm.rs @ 666:838d9402b12f
Implement ECL instruction 98, for directional sprites.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 12 Aug 2019 00:22:25 +0200 |
parents | 965ecdbf0316 |
children | d20cf9ede914 |
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -528,6 +528,17 @@ impl EclRunner { let mut enemy = self.enemy.borrow_mut(); enemy.set_anim(index as u8); } + // 98 + SubInstruction::SetMultipleAnims(default, end_left, end_right, left, right, _unused) => { + // TODO: check in ghidra! + let mut enemy = self.enemy.borrow_mut(); + enemy.movement_dependant_sprites = if left == -1 { + None + } else { + enemy.set_anim(default as u8); + Some((end_left as u8, end_right as u8, left as u8, right as u8)) + }; + } // 100 SubInstruction::SetDeathAnim(index) => {