Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
665:965ecdbf0316 | 666:838d9402b12f |
---|---|
526 SubInstruction::SetAnim(index) => { | 526 SubInstruction::SetAnim(index) => { |
527 // TODO: check in ghidra! | 527 // TODO: check in ghidra! |
528 let mut enemy = self.enemy.borrow_mut(); | 528 let mut enemy = self.enemy.borrow_mut(); |
529 enemy.set_anim(index as u8); | 529 enemy.set_anim(index as u8); |
530 } | 530 } |
531 // 98 | |
532 SubInstruction::SetMultipleAnims(default, end_left, end_right, left, right, _unused) => { | |
533 // TODO: check in ghidra! | |
534 let mut enemy = self.enemy.borrow_mut(); | |
535 enemy.movement_dependant_sprites = if left == -1 { | |
536 None | |
537 } else { | |
538 enemy.set_anim(default as u8); | |
539 Some((end_left as u8, end_right as u8, left as u8, right as u8)) | |
540 }; | |
541 } | |
531 | 542 |
532 // 100 | 543 // 100 |
533 SubInstruction::SetDeathAnim(index) => { | 544 SubInstruction::SetDeathAnim(index) => { |
534 // TODO: check in ghidra! | 545 // TODO: check in ghidra! |
535 let mut enemy = self.enemy.borrow_mut(); | 546 let mut enemy = self.enemy.borrow_mut(); |