HK3_INT.SRC 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. ;************************************************************************
  2. ;* *
  3. ;* *HK3 COMMAND INTERRUPT PROGRAM *
  4. ;* presented by k.morikawa *
  5. ;* 1992/4/3~ *
  6. ;************************************************************************
  7. XREF ?A5
  8. SECT HK3,,C
  9. ;by HK3
  10. XREF ACTION_PROG
  11. ;by HK3_SUB
  12. XREF TYPE1_SET,TYPE2_SET,SET_RD16
  13. INCLUDE GAME_SYM.INC @@@
  14. INCLUDE LABEL.INC
  15. INCLUDE HFLAG.INC
  16. INCLUDE EM_MAC2.INC
  17. ;************************************************************************
  18. ;
  19. ; action command interrupt program
  20. ; 1992/3/4
  21. XDEF COM_INT
  22. COM_INT:
  23. MOVE EM_INT(A6),D0
  24. CMP #1,D0
  25. BNE COM_INT_OPE
  26. CLR EM_INT(A6)
  27. RTS
  28. COM_INT_OPE:
  29. D0R_ADD
  30. LEA.L ACTION_PROG,A0
  31. MOVE.L (A0,D0),A0
  32. JMP (A0)
  33. XDEF COM_INT1
  34. ;
  35. ; *now_player lock
  36. ;
  37. COM_INT1:
  38. MOVE.W #0,ACT_COM(A6)
  39. ANDI.B #11111000B,PLAYER_CONTROL(A6)
  40. ; JOB_CLEAR
  41. CLR EM_INT(A6)
  42. RTS
  43. XDEF COM_INT2
  44. ;
  45. ; *command_data_skip
  46. ;
  47. COM_INT2:
  48. RTS
  49. MOVE.W ACT_COM(A6),D0
  50. SUBQ.W #2,D0
  51. BNE A2_SKIP_1
  52. ADD.L #1,ACTION_ADRS(A6)
  53. A2_SKIP_1:
  54. SUBQ.W #3,D0
  55. BNE A2_SKIP_2
  56. ADD.L #1,ACTION_ADRS(A6)
  57. A2_SKIP_2
  58. CMP.B #3,1(A0)
  59. BNE ADRS_SKIP
  60. ADD.L #4,ACTION_ADRS(A6)
  61. ADRS_SKIP:
  62. CLR EM_INT(A6)
  63. ; JOB_CLEAR
  64. RTS
  65. XDEF COM_INT3
  66. ;
  67. ; *com_ope interrupt
  68. ; action_data creative program
  69. ; 1992/5/28
  70. ;
  71. COM_INT3:
  72. RTS
  73. XDEF COM_INT4
  74. ;
  75. ; *com_ope interrupt
  76. ; act_operation checker program
  77. ; 1992/6/4~6/10
  78. ;
  79. COM_INT4:
  80. MOVE.W #11000000B,D0
  81. AND.B PLAYER_CONTROL(A6),D0
  82. BEQ COM_INT4_NEXT
  83. BTST.B #BHS_JUMP,HERO_STATE+HERO_OFFSET(A6)
  84. BEQ COM_INT4_END
  85. ADD.B D0,D0
  86. BCS.L LANDING_CHECK
  87. MOVE.W ACT_COM(A6),D0
  88. BEQ.L COM_OPE_CLEAR
  89. SUBQ.W #1,D0
  90. BEQ.L COM_OPE_CLEAR
  91. COM_INT4_NEXT:
  92. MOVE.L ACTION_ADRS(A6),A0
  93. MOVE.W ACT_COM(A6),D0
  94. ADD.W D0,D0
  95. LEA.L CHECKER_PROG(PC),A1
  96. ADDA.W (A1,D0),A1
  97. JMP (A1)
  98. CHECKER_PROG:
  99. DC.W CHK_SKIP-CHECKER_PROG ;0
  100. DC.W CHK_ACT1-CHECKER_PROG ;1
  101. DC.W CHK_ACT2-CHECKER_PROG ;2
  102. DC.W CHK_ACT3-CHECKER_PROG ;3
  103. DC.W CHK_ACT4-CHECKER_PROG ;4
  104. DC.W CHK_ACT5-CHECKER_PROG ;5
  105. DC.W CHK_ACTS0-CHECKER_PROG ;6
  106. DC.W CHK_ACTS1-CHECKER_PROG ;7
  107. DC.W CHK_ACTS2-CHECKER_PROG ;8
  108. DC.W CHK_ACTS3-CHECKER_PROG ;9
  109. DC.W CHK_ACTS4-CHECKER_PROG ;10
  110. DC.W CHK_ACTS5-CHECKER_PROG ;11
  111. DC.W CHK_ACTS0-CHECKER_PROG ;12
  112. DC.W CHK_SKIP-CHECKER_PROG ;13
  113. ;
  114. ; *************************************
  115. ;
  116. CHK_ACT1:
  117. CMP.B #0F0H,(A0)
  118. BEQ.L SUB_ACT_CHK
  119. MOVE.W #11H,D0
  120. SUB.B (A0),D0
  121. BEQ COM_INT4_SET
  122. MOVE.W #21H,D0
  123. SUB.B (A0),D0
  124. BEQ COM_INT4_SET
  125. CHK_ACTS0:
  126. CHK_ACTS1:
  127. BRA COM_OPE_CLEAR
  128. CHK_SKIP:
  129. RTS
  130. SUB_ACT_CHK:
  131. MOVEQ.L #0,D0
  132. MOVE.B 1(A0),D0
  133. LEA.L SUB_CHK_TBL(PC),A1
  134. TST.B (A1,D0)
  135. BEQ.L COM_OPE_CLEAR
  136. MOVE.B 3(A0),D0 ;jump_kick or jump_punch code check
  137. MOVEQ.L #11H,D1
  138. SUB.B D0,D1
  139. BEQ.S COM_INT4_SET
  140. MOVEQ.L #21H,D1
  141. SUB.B D0,D1
  142. BEQ COM_INT4_SET
  143. BRA COM_OPE_CLEAR
  144. SUB_CHK_TBL:; 0:1:2:3:4,5
  145. DC.B 0,0,0,1,1,1
  146. ; *************************************
  147. CHK_ACT3:
  148. CHK_ACT4:
  149. CHK_ACT5:
  150. CHK_ACTS3:
  151. CHK_ACTS4:
  152. CHK_ACTS5:
  153. MOVE #11H,D0
  154. SUB.B SUCCESS_LEVER(A6),D0
  155. BEQ.S COM_INT4_SET
  156. MOVE #21H,D0
  157. SUB.B SUCCESS_LEVER(A6),D0
  158. BEQ COM_INT4_SET
  159. BRA COM_OPE_CLEAR
  160. CHK_ACT2:
  161. CHK_ACTS2:
  162. MOVE #11H,D0
  163. CMP.B SUCCESS_LEVER(A6),D0
  164. BEQ COM_INT4_SET
  165. CMP.B FAIL_LEVER(A6),D0
  166. BEQ COM_INT4_SET
  167. MOVE #21H,D0
  168. CMP.B SUCCESS_LEVER(A6),D0
  169. BEQ COM_INT4_SET
  170. CMP.B FAIL_LEVER(A6),D0
  171. BEQ COM_INT4_SET
  172. BRA COM_OPE_CLEAR
  173. ; *************************************
  174. COM_INT4_SET:
  175. BSET.B #6,PLAYER_CONTROL(A6)
  176. RTS
  177. XDEF LANDING_CHECK
  178. LANDING_CHECK:
  179. LEA.L INT4_TBL(PC),A1
  180. MOVEQ.L #0,D0
  181. MOVE ACT_CTRL+HERO_OFFSET(A6),D0
  182. BEQ.S INT4_NEXT_1
  183. TST.B (A1,D0)
  184. BEQ.S COM_INT4_END
  185. INT4_NEXT_1:
  186. CMP.B #0CH,D0
  187. BNE INT4_NEXT_3
  188. BSET.B #COM_RESULT_END,PLAYER_CONTROL(A6)
  189. INT4_NEXT_3:
  190. RTS
  191. COM_INT4_END:
  192. BTST.B #4,HERO_STATE+HERO_OFFSET(A6)
  193. BNE.S INT4_NEXT_2
  194. ANDI.B #00111000B,PLAYER_CONTROL(A6)
  195. CLR EM_INT(A6)
  196. INT4_NEXT_2:
  197. RTS
  198. XDEF INT4_TBL
  199. INT4_TBL:; 0:1:2:3:4:5:6:7:8:9:A:B:C:D:E:F
  200. DC.B 0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0 ;0 <**
  201. DC.B 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0 ;1
  202. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;2
  203. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;3
  204. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;4
  205. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;5
  206. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;6
  207. DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;7
  208. COM_OPE_CLEAR:
  209. ORI.B #10000100B,PLAYER_CONTROL(A6) <**
  210. ; BSET.B #7,PLAYER_CONTROL(A6)
  211. RTS
  212. ;************************************************************************
  213. XDEF SPECIAL_CHECKER
  214. ;
  215. ; enemy_type checker_program
  216. ; 1992/3/4
  217. SPECIAL_CHECKER:
  218. LEA.L EM_JUDGE_VECTOR(PC),A0
  219. MOVE HERO_TYPE+HERO_OFFSET(A6),D3
  220. ADD D3,D3
  221. ADDA (A0,D3),A0
  222. JSR (A0)
  223. ; BNE NML_STA_NEXT
  224. ;
  225. ; JOB_CHG SC_LIM_JOB
  226. ;NML_STA_NEXT:
  227. RTS
  228. EM_JUDGE_VECTOR: ;type
  229. DC.W HR1_JUDGE-EM_JUDGE_VECTOR ;0
  230. DC.W HR2_JUDGE-EM_JUDGE_VECTOR ;1
  231. DC.W EM1_JUDGE-EM_JUDGE_VECTOR ;2
  232. DC.W EM2_JUDGE-EM_JUDGE_VECTOR ;3
  233. DC.W EM3_JUDGE-EM_JUDGE_VECTOR ;4
  234. DC.W EM4_JUDGE-EM_JUDGE_VECTOR ;5
  235. DC.W EM5_JUDGE-EM_JUDGE_VECTOR ;6
  236. DC.W EM6_JUDGE-EM_JUDGE_VECTOR ;7
  237. DC.W EM7_JUDGE-EM_JUDGE_VECTOR ;8
  238. DC.W EM7_JUDGE-EM_JUDGE_VECTOR ;9
  239. ;
  240. ; non_reaction
  241. ;
  242. HR1_JUDGE:
  243. HR2_JUDGE:
  244. EM1_JUDGE:
  245. EM3_JUDGE:
  246. EM6_JUDGE:
  247. EM7_JUDGE:
  248. MOVEQ.L #0,D0
  249. RTS
  250. EM8_JUDGE:
  251. MOVEQ.L #0,D0
  252. RTS
  253. MOVE.L ANOTHER_PLAYER(A6),A0
  254. MOVE X_POSITION+HERO_OFFSET(A6),D0
  255. MOVE X_POSITION+HERO_OFFSET(A6),D1
  256. MOVEQ.L #0,D3 ;judge_type
  257. MOVE #0FFE0H,D2 ;frame_position check(near)
  258. AND D0,D2
  259. BEQ E8_JD_1
  260. ADDQ #1,D3
  261. E8_JD_1:
  262. MOVE #0FFE0H,D2 ;frame_position check(near)
  263. AND D1,D2
  264. BEQ E8_JD_2
  265. ADDQ #1,D3
  266. E8_JD_2:
  267. ; MOVEQ.L #3AH,D4
  268. ; JMP CTRL_CHANGE(PC) ;move_chg
  269. EM2_JUDGE:
  270. EM4_JUDGE:
  271. EM5_JUDGE:
  272. MOVEQ.L #0,D0
  273. RTS
  274. TST.B OBJECT_WORK(A6)
  275. BEQ.S OBJ_JUDGE_END
  276. MOVEQ.L #0,D0
  277. MOVE.B 0(A0,D0.W),D0
  278. BEQ.S OBJ_JUDGE_END
  279. CLR.W (A5)
  280. MOVE.B OBJECT_WORK(A6),(A5)
  281. MOVE.W (A5),D0
  282. MOVE.L (A5,D0),A0 ;fornt object_physical_work
  283. MOVE.W X_POSITION(A0),D0
  284. ; JSR EM_OBEJCT_SRCH(PC)
  285. JOB_INIT_SET
  286. ; BSET.B ?????
  287. OBJ_JUDGE_END:
  288. RTS
  289. ;************************************************************************
  290. INCLUDE WORK.INC
  291. ;************************************************************************
  292.