diff --git a/src/ailists/setupame.c b/src/ailists/setupame.c index ced5cc735..b04957fc3 100644 --- a/src/ailists/setupame.c +++ b/src/ailists/setupame.c @@ -1593,17 +1593,10 @@ u8 func0414_programmer[] = { // Wait until Jo or Velvet near his office beginloop(0x91) -#if VERSION >= VERSION_NTSC_1_0 set_target_chr(CHR_BOND) - if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, 80, 1240, /*goto*/ 0x06) + if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_007C, 800, /*goto*/ 0x06) set_target_chr(CHR_COOP) - if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, 80, 1240, /*goto*/ 0x06) -#else - set_target_chr(CHR_BOND) - if_chr_distance_to_pad_lt(CHR_TARGET, 800, 124, /*goto*/ 0x06) - set_target_chr(CHR_COOP) - if_chr_distance_to_pad_lt(CHR_TARGET, 800, 124, /*goto*/ 0x06) -#endif + if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_007C, 800, /*goto*/ 0x06) endloop(0x91) // Phone ringing @@ -1616,17 +1609,10 @@ u8 func0414_programmer[] = { // Wait until Jo or Velvet is close to his door beginloop(0x92) -#if VERSION >= VERSION_NTSC_1_0 set_target_chr(CHR_BOND) - if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_0014, 1240, /*goto*/ 0x06) + if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_007C, 200, /*goto*/ 0x06) set_target_chr(CHR_COOP) - if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_0014, 1240, /*goto*/ 0x06) -#else - set_target_chr(CHR_BOND) - if_chr_distance_to_pad_lt(CHR_TARGET, 200, 124, /*goto*/ 0x06) - set_target_chr(CHR_COOP) - if_chr_distance_to_pad_lt(CHR_TARGET, 200, 124, /*goto*/ 0x06) -#endif + if_chr_same_floor_distance_to_pad_lt(CHR_TARGET, PAD_AME_007C, 200, /*goto*/ 0x06) endloop(0x92) label(0x06) diff --git a/src/include/commands.h b/src/include/commands.h index cab672231..33f95f9c1 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -3495,8 +3495,8 @@ #define if_chr_same_floor_distance_to_pad_lt(chr, pad, distance, label) \ mkshort(0x01df), \ chr, \ - mkshort(pad), \ mkshort(distance / 10), \ + mkshort(pad), \ label, /** diff --git a/tools/ai2asm/ai2asm.py b/tools/ai2asm/ai2asm.py index be18b1a10..aa0a56164 100755 --- a/tools/ai2asm/ai2asm.py +++ b/tools/ai2asm/ai2asm.py @@ -713,8 +713,8 @@ class App(): def ai_if_chr_same_floor_distance_to_pad_lt(self, params): self.emit('li', ['$a0', '0x%02x' % params[0]]) - self.emit('li', ['$a1', '0x%04x' % self.u16(params, 1)]) - self.emit('li.s', ['$a2', self.u16(params, 3) * 10]) + self.emit('li', ['$a1', '0x%04x' % self.u16(params, 3)]) + self.emit('li.s', ['$a2', self.u16(params, 1) * 10]) self.emit('jal', ['aiIfChrSameFloorDistanceToPadLessThan']) self.emit_bnez_label(params[5])