# HG changeset patch # User Gauvain "GovanifY" Roussel-Tarbouriech # Date 1565637038 -7200 # Node ID 1209e7f855a428330de12ad598a00aef3372d36d # Parent ef2dbd676a918819db6ef4a018b07987e4a2ece5 ecl_vm: added sibling function and a warning. diff --git a/src/th06/ecl_vm.rs b/src/th06/ecl_vm.rs --- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -569,9 +569,11 @@ impl EclRunner { // 104 SubInstruction::SetCollidable(collidable) => { - // TODO: me and my siblings(105, 107) are implemented as a single variable in the touhou 6 + // TODO: me and my siblings(105, 107, 117) are implemented as a single variable in the touhou 6 // original engine. While our behaviour seems correct we might want to implement // that as a single variable + // TODO[2]: THE BITFLAG MIGHT BE INCORRECT FOR OTHER SIBLING INSTRUCTIONS, the + // behavior was DEFINITELY incorrect in pytouhou for SetTouchable at the very least let mut enemy = self.enemy.borrow_mut(); enemy.collidable = (collidable&1) != 0; } @@ -596,6 +598,12 @@ impl EclRunner { enemy.death_flags = death_flags; } + // 117 + SubInstruction::SetTouchable(touchable) => { + let mut enemy = self.enemy.borrow_mut(); + enemy.touchable = touchable != 0; + } + _ => unimplemented!("{:?}", instruction) } }