Mercurial > touhou
changeset 697:600eb0a69b25
ecl_vm: fix RelativeJump* instructions to actually call RelativeJump.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 23 Aug 2019 02:36:59 +0200 |
parents | 7ae576a418ff |
children | 05e0425a8bc5 |
files | src/th06/ecl_vm.rs |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -256,7 +256,7 @@ impl EclRunner { // TODO: counter_value is a field of "enemy" in th06, to check let counter_value = self.get_i32(var_id) - 1; if counter_value > 0 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 4 @@ -407,37 +407,37 @@ impl EclRunner { // 29 SubInstruction::RelativeJumpIfLowerThan(frame, ip) => { if self.frame.comparison_reg == -1 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 30 SubInstruction::RelativeJumpIfLowerOrEqual(frame, ip) => { if self.frame.comparison_reg != 1 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 31 SubInstruction::RelativeJumpIfEqual(frame, ip) => { if self.frame.comparison_reg == 0 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 32 SubInstruction::RelativeJumpIfGreaterThan(frame, ip) => { if self.frame.comparison_reg == 1 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 33 SubInstruction::RelativeJumpIfGreaterOrEqual(frame, ip) => { if self.frame.comparison_reg != -1 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 34 SubInstruction::RelativeJumpIfNotEqual(frame, ip) => { if self.frame.comparison_reg != 0 { - SubInstruction::RelativeJump(frame, ip); + self.run_instruction(SubInstruction::RelativeJump(frame, ip)); } } // 35