EM_MAC2.INC 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. ;
  2. ; enemy action_data macro
  3. ;
  4. CHG_TBL MACRO D1,D2,D3,D4,D5,D6,D7,D8
  5. DC.B D1*4
  6. DC.B D2*4
  7. DC.B D3*4
  8. DC.B D4*4
  9. DC.B D5*4
  10. DC.B D6*4
  11. DC.B D7*4
  12. DC.B D8*4
  13. ENDM
  14. ;
  15. ; *********** common macro inculde file ***************
  16. ;
  17. D0R_ADD MACRO
  18. ADD.W D0,D0
  19. ADD.W D0,D0
  20. ENDM
  21. D1R_ADD MACRO
  22. ADD.W D1,D1
  23. ADD.W D1,D1
  24. ENDM
  25. D2R_ADD MACRO
  26. ADD.W D2,D2
  27. ADD.W D2,D2
  28. ENDM
  29. D3R_ADD MACRO
  30. ADD.W D3,D3
  31. ADD.W D3,D3
  32. ENDM
  33. D4R_ADD MACRO
  34. ADD.W D4,D4
  35. ADD.W D4,D4
  36. ENDM
  37. ;************************************************************************
  38. ;
  39. ; job_controll macro no.1
  40. ;
  41. JOB_INIT_SET MACRO
  42. MOVE.B #INIT_DIS_JOB,0(A4)
  43. ENDM
  44. INIT_DIS_CLEAR MACRO
  45. MOVE.B #0,0(A4)
  46. ENDM
  47. ;
  48. ; job_controll macro no.2
  49. ;
  50. JOB_SPSTA_SET MACRO JOBSP
  51. LOCAL JSEND
  52. TST.B SEARCH_STATE(A6)
  53. BMI.S JSEND
  54. MOVE.B #JOBSP,1(A4)
  55. JSEND NOP
  56. ENDM
  57. JOB_SPSTA_CLEAR MACRO
  58. MOVE.B #0,1(A4)
  59. ENDM
  60. ;
  61. ; job_controll macro no.3
  62. ;
  63. JOB_DIS_SET MACRO
  64. LOCAL JDEND
  65. CMP.B #3,SEARCH_MODE(A6)
  66. BGT.S JDEND
  67. MOVE.B #DIS_JOB,2(A4)
  68. JDEND NOP
  69. ENDM
  70. JOB_DIS_CLEAR MACRO
  71. MOVE.B #0,2(A4)
  72. ENDM
  73. ;
  74. ; job_controll macro no.4
  75. ;
  76. JOB_INT_SET MACRO LB
  77. MOVE.B #LB,3(A4)
  78. ENDM
  79. ;
  80. ; job_controll macro no.5
  81. ;
  82. JOB_STA_SET MACRO JOBS
  83. MOVE.B #JOBS,4(A4)
  84. ENDM
  85. JOB_STA_CLEAR MACRO
  86. MOVE.B #0,4(A4)
  87. ENDM
  88. ;
  89. ; job_controll macro no.6
  90. ;
  91. JOB_ADRS_SET MACRO JADRSS
  92. MOVE.B #JADRSS,5(A4)
  93. ENDM
  94. JOB_ADRS_CLEAR MACRO
  95. MOVE.B #0,5(A4)
  96. ENDM
  97. ;
  98. ; job_controll macro no.7
  99. ;
  100. JOB_COM_SET MACRO JCOM
  101. MOVE.B #JCOM,6(A4)
  102. ENDM
  103. JOB_COM_CLEAR MACRO
  104. MOVE.B #0,6(A4)
  105. ENDM
  106. ;
  107. ; job_controll macro etc.
  108. ;
  109. JOB_CLEAR MACRO
  110. MOVE JOB_POINTER(A6),D0
  111. EORI #7,D0
  112. MOVE.B #0,(A4,D0)
  113. ENDM
  114. JOB_ALL_CLEAR MACRO
  115. MOVE.L #0,(A4)
  116. MOVE.W #0,4(A4)
  117. ENDM
  118. JOB_CHG MACRO JB
  119. LOCAL JOB_CHG_1
  120. MOVE JOB_POINTER(A6),D0
  121. EORI #7,D0
  122. MOVE.B #JB,0(A4,D0)
  123. ADD #1,JOB_POINTER(A6)
  124. CMP #8,JOB_POINTER(A6)
  125. BLE JOB_CHG_1
  126. MOVE #7,JOB_POINTER(A6)
  127. JOB_CHG_1 NOP
  128. ENDM
  129. ;************************************************************************
  130. EM_INIT EQU 1
  131. EM_SPECIAL EQU 11
  132. EM_ATTACK EQU 12
  133. EM_SCLIM EQU 13
  134. EM_AT_CHK EQU 14
  135. EINT1 EQU 2
  136. EINT2 EQU 3
  137. EINT3 EQU 4
  138. EINT4 EQU 5
  139. EM_DEF_WAIT EQU 6
  140. EM_DEF_NEXT EQU 7
  141. EM_DEF_UP EQU 9
  142. EM_DEF_DOWN EQU 10
  143. SANKAKU EQU 8
  144. ;************************************************************************
  145. ;
  146. ; *job no.1 (init_diatance search mode)
  147. ;
  148. INIT_DIS_JOB EQU 1
  149. ;
  150. ; *job no.2 (player special_status search mode)
  151. ;
  152. SP_CHK_JOB EQU 4
  153. STA_AT_JOB EQU 16
  154. ;
  155. ; *job no.3 (player vs enemy status search mode)
  156. ;
  157. DIS_JOB EQU 5
  158. ;
  159. ; *job no.4 (command interrupt program)
  160. ;
  161. INT1_JOB EQU 6
  162. INT2_JOB EQU 7
  163. INT3_JOB EQU 8
  164. INT4_JOB EQU 14
  165. ;
  166. ; *job no.5 (enemy type seaquence program
  167. ; & nomal_status search mode)
  168. ;
  169. SP_SRCH_JOB EQU 9
  170. SC_LIM_JOB EQU 2
  171. STA_NML_JOB EQU 3
  172. ;
  173. ; *job no.6 (enemy action_command address setting)
  174. ;
  175. ADRS_SET_JOB EQU 10
  176. SP_ADRS_SET_JOB EQU 11
  177. ;
  178. ; *job no.7 (action_command operation program)
  179. ;
  180. COM_OPE_JOB EQU 12
  181. COM_WAIT_JOB EQU 13
  182. COM_STOP_JOB EQU 15
  183. DEF_WAIT_JOB EQU 17
  184. DEF_NEXT_JOB EQU 18
  185. DEF_UP_JOB EQU 20
  186. DEF_DOWN_JOB EQU 21
  187. SANKAKU_JOB EQU 19
  188. ;************************************************************************
  189.