HIT.SRC 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. ************************************************************************
  2. * *
  3. * 044 [ART OF FIGHT] *
  4. * HIT JUDGE PROGRAM *
  5. * by S.OKADA from 91/10/22 Tue 16:44 *
  6. * *
  7. ************************************************************************
  8. XDEF HERO1_HIT_JUDGE
  9. XDEF HERO2_HIT_JUDGE
  10. XREF ?A5
  11. SECT GAME,,C
  12. INCLUDE SYS.INC @@@
  13. INCLUDE MACRO.INC
  14. INCLUDE NEO_GEO.INC
  15. INCLUDE LABEL.INC
  16. HERO1_HIT_JUDGE:
  17. LEA.L HERO1_OBJ_START(A5),A6
  18. MOVE.B #10H,HIT_JUDGE_COUNT(A5)
  19. H1HJ_1:
  20. TST.W TYPE(A6)
  21. BLE H1HJ_7
  22. TST.B HIT_FLAG(A6)
  23. BEQ H1HJ_7
  24. MOVE.B HIT_ACTIVE(A6),D2
  25. BEQ H1HJ_7
  26. MOVE.W HIT_LEFT(A6),D3
  27. MOVE.W HIT_RIGHT(A6),D4
  28. MOVE.W HIT_UPPER(A6),D5
  29. MOVE.W HIT_LOWER(A6),D6
  30. TST.B HIT_FLAG(A6)
  31. BMI H1HJ_4
  32. MOVE.B #10H,HIT_JUDGE_COUNT+1(A5)
  33. LEA.L HERO2_OBJ_START(A5),A4
  34. H1HJ_2:
  35. TST.W TYPE(A4)
  36. BLE H1HJ_3
  37. TST.B HIT_FLAG(A4)
  38. BLE H1HJ_3
  39. MOVE.B D2,D1
  40. AND.B HIT_PASSIVE(A4),D1
  41. BEQ H1HJ_3
  42. CMP.W HIT_RIGHT(A4),D3
  43. BGT.S H1HJ_3
  44. CMP.W HIT_LEFT(A4),D4
  45. BLT.S H1HJ_3
  46. CMP.W HIT_LOWER(A4),D5
  47. BLT.S H1HJ_3
  48. CMP.W HIT_UPPER(A4),D6
  49. BGT.S H1HJ_3
  50. MOVE.B WORK_No(A4),HIT_PLAYER(A6)
  51. MOVE.B WORK_No(A6),HIT_PLAYER(A4)
  52. OR.B #10000000B,HIT_FLAG(A6)
  53. OR.B #10000000B,HIT_FLAG(A4)
  54. ; JMP H1HJ_4(PC)
  55. H1HJ_3:
  56. LEA.L 100H(A4),A4
  57. SUBQ.B #1,HIT_JUDGE_COUNT+1(A5)
  58. BNE H1HJ_2
  59. H1HJ_4:
  60. MOVE.B #96-20H,HIT_JUDGE_COUNT+1(A5)
  61. LEA.L FREE_OBJ_START(A5),A4
  62. H1HJ_5:
  63. TST.W TYPE(A4)
  64. BLE H1HJ_6
  65. TST.B HIT_FLAG(A4)
  66. BLE H1HJ_6
  67. MOVE.B D2,D1
  68. AND.B HIT_PASSIVE(A4),D1
  69. BEQ H1HJ_6
  70. CMP.W HIT_RIGHT(A4),D3
  71. BGT.S H1HJ_6
  72. CMP.W HIT_LEFT(A4),D4
  73. BLT.S H1HJ_6
  74. CMP.W HIT_LOWER(A4),D5
  75. BLT.S H1HJ_6
  76. CMP.W HIT_UPPER(A4),D6
  77. BGT.S H1HJ_6
  78. MOVE.B WORK_No(A4),HIT_OBJ(A6)
  79. MOVE.B WORK_No(A6),HIT_PLAYER(A4)
  80. OR.B #01000000B,HIT_FLAG(A6)
  81. OR.B #10000000B,HIT_FLAG(A4)
  82. JMP H1HJ_7(PC)
  83. H1HJ_6:
  84. LEA.L 100H(A4),A4
  85. SUBQ.B #1,HIT_JUDGE_COUNT+1(A5)
  86. BNE H1HJ_5
  87. H1HJ_7:
  88. LEA.L 100H(A6),A6
  89. SUBQ.B #1,HIT_JUDGE_COUNT(A5)
  90. BNE H1HJ_1
  91. RTS
  92. HERO2_HIT_JUDGE:
  93. LEA.L HERO2_OBJ_START(A5),A6
  94. MOVE.B #10H,HIT_JUDGE_COUNT(A5)
  95. H2HJ_1:
  96. TST.W TYPE(A6)
  97. BLE H2HJ_4
  98. TST.B HIT_FLAG(A6)
  99. BEQ H2HJ_4
  100. MOVE.B HIT_ACTIVE(A6),D2
  101. BEQ H2HJ_4
  102. MOVE.W HIT_LEFT(A6),D3
  103. MOVE.W HIT_RIGHT(A6),D4
  104. MOVE.W HIT_UPPER(A6),D5
  105. MOVE.W HIT_LOWER(A6),D6
  106. LEA.L FREE_OBJ_START(A5),A4
  107. MOVE.B #96-20H,HIT_JUDGE_COUNT+1(A5)
  108. H2HJ_2:
  109. TST.W TYPE(A4)
  110. BLE H2HJ_3
  111. TST.B HIT_FLAG(A4)
  112. BLE H2HJ_3
  113. MOVE.B D2,D1
  114. AND.B HIT_PASSIVE(A4),D1
  115. BEQ H2HJ_3
  116. CMP.W HIT_RIGHT(A4),D3
  117. BGT.S H2HJ_3
  118. CMP.W HIT_LEFT(A4),D4
  119. BLT.S H2HJ_3
  120. CMP.W HIT_LOWER(A4),D5
  121. BLT.S H2HJ_3
  122. CMP.W HIT_UPPER(A4),D6
  123. BGT.S H2HJ_3
  124. MOVE.B WORK_No(A4),HIT_OBJ(A6)
  125. MOVE.B WORK_No(A6),HIT_PLAYER(A4)
  126. OR.B #01000000B,HIT_FLAG(A6)
  127. OR.B #10000000B,HIT_FLAG(A4)
  128. JMP H2HJ_4(PC)
  129. H2HJ_3:
  130. LEA.L 100H(A4),A4
  131. SUBQ.B #1,HIT_JUDGE_COUNT+1(A5)
  132. BNE H2HJ_2
  133. H2HJ_4:
  134. LEA.L 100H(A6),A6
  135. SUBQ.B #1,HIT_JUDGE_COUNT(A5)
  136. BNE H2HJ_1
  137. RTS
  138. INCLUDE WORK.INC
  139.