HERO_CML.SRC 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. ;
  2. ;
  3. ; *** 044 ART OF FIGT HERO cml ***
  4. ;
  5. ;
  6. XDEF HERO_STATE_DISP
  7. XDEF BONUS_LIFE
  8. XREF ?A5
  9. ;by HERO_PM
  10. XREF SPIRIT_RANK
  11. SECT HERO,,D
  12. ; INCLUDE GAME_SYM.INC
  13. INCLUDE NEO_GEO.INC
  14. INCLUDE LABEL.INC
  15. INCLUDE CML.INC
  16. INCLUDE MACRO.INC
  17. INCLUDE HFLAG.INC
  18. HERO_STATE_DISP:
  19. TST.B ST_DEMO_IN(A5)
  20. BNE HSD_BONUS
  21. TST.B IN_BONUS(A5)
  22. BNE HSD_BONUS
  23. TST.B HOW_TO_FLAG(A5)
  24. BNE.S HSD_BONUS
  25. BSR LIFE_DISP
  26. BSR SPIRIT_DISP
  27. RTS
  28. HSD_BONUS:
  29. RTS
  30. LD_BIT:
  31. DC.B 11B
  32. DC.B 10B
  33. DC.B 11B
  34. DC.B 01B
  35. DC.B 11B
  36. DC.B 10B
  37. DC.B 11B
  38. DC.B 01B
  39. BONUS_LIFE:
  40. MOVE.L A6,-(SP)
  41. LEA.L HERO1(A5),A6
  42. MESS_ON
  43. LEA.L LIFE_CH+1(PC),A1
  44. MOVE.L #LIFE_POS_BONUS,(A0)+
  45. MOVE.W #9600H,D4
  46. MOVEQ.L #0,D1
  47. MOVE.B HERO_LIFE(A6),D1
  48. JSR LIFE_DISP_001(PC)
  49. MOVE.L (SP)+,A6
  50. RTS
  51. LIFE_DISP:
  52. MOVEQ.L #111B,D0
  53. AND.W MAIN_COUNT+2(A5),D0
  54. MOVE.B LD_BIT(PC,D0.W),D0
  55. MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D4
  56. BTST.L D4,D0
  57. BEQ LIFE_DISP_9
  58. MOVEQ.L #-1,D0
  59. MOVE.W HERO_LIFE_D(A6),D1
  60. CMP.W HERO_LIFE(A6),D1
  61. BEQ LIFE_DISP_9
  62. BHI.S LIFE_DISP_1
  63. MOVEQ.L #1,D0
  64. LIFE_DISP_1:
  65. ADD.W D0,D1
  66. MOVE.W D1,HERO_LIFE_D(A6)
  67. MESS_ON
  68. LEA.L LIFE_CH(PC),A1
  69. BSR LIFE_POS_SET
  70. LIFE_DISP_001:
  71. CLR.L (A0)+
  72. MOVEQ.L #1,D3
  73. SUBQ.W #2,D1
  74. BPL.S LIFE_DISP_2
  75. MOVEQ.L #0,D1
  76. LIFE_DISP_2:
  77. ADDQ.W #1,D1
  78. MOVEQ.L #00000111B,D2
  79. AND.W D1,D2
  80. ADD.W D2,D2
  81. LSR.W #3,D1
  82. BNE LIFE_DISP_3
  83. MOVE.W #010CH,(A0)+
  84. MOVE.B 0(A1,D2.W),D4
  85. MOVE.W D4,(A0)+
  86. BRA LIFE_DISP_6
  87. LIFE_DISP_3:
  88. MOVE.W #010CH,(A0)+
  89. MOVE.B (A1),D4
  90. MOVE.W D4,(A0)+
  91. ADDQ.W #1,D3
  92. SUBQ.W #1,D1
  93. BEQ LIFE_DISP_4
  94. MOVE.B D1,(A5)
  95. MOVE.W (A5),D0
  96. MOVE.B #0CH,D0
  97. MOVE.W D0,(A0)+
  98. MOVE.B 48(A1),D4
  99. MOVE.W D4,(A0)+
  100. ADD.W D1,D3
  101. LIFE_DISP_4:
  102. CMP.B LIFE_GAGE(A6),D3
  103. BNE LIFE_DISP_5
  104. MOVE.W #10CH,(A0)+
  105. MOVE.B 32(A1,D2.W),D4
  106. MOVE.W D4,(A0)+
  107. BRA LIFE_DISP_8
  108. LIFE_DISP_5:
  109. MOVE.W #10CH,(A0)+
  110. MOVE.B 16(A1,D2.W),D4
  111. MOVE.W D4,(A0)+
  112. LIFE_DISP_6:
  113. MOVE.B LIFE_GAGE(A6),D0
  114. SUB.B D3,D0
  115. SUBQ.B #1,D0
  116. BEQ.S LIFE_DISP_7
  117. MOVE.B D0,(A5)
  118. MOVE.W (A5),D0
  119. MOVE.B #0CH,D0
  120. MOVE.W D0,(A0)+
  121. MOVE.B 16(A1),D4
  122. MOVE.W D4,(A0)+
  123. LIFE_DISP_7:
  124. MOVE.W #10CH,(A0)+
  125. MOVE.B 32(A1),D4
  126. MOVE.W D4,(A0)+
  127. LIFE_DISP_8:
  128. CLR.W (A0)+
  129. MESS_OFF
  130. LIFE_DISP_9:
  131. RTS
  132. LIFE_POS_SET:
  133. TST.W D4
  134. BNE LIFE_POS_SET_1
  135. MOVE.L #LIFE_POS_P1,(A0)+
  136. MOVE.W #9500H,D4
  137. RTS
  138. LIFE_POS_SET_1:
  139. ADDQ.W #1,A1
  140. MOVE.L #LIFE_POS_P2,(A0)+
  141. MOVE.W #9600H,D4
  142. RTS
  143. LIFE_POS_P1:
  144. FIX_AUTO -20H
  145. FIX_ADRS 17,4
  146. FIX_END
  147. LIFE_POS_P2:
  148. FIX_AUTO 20H
  149. FIX_ADRS 22,4
  150. FIX_END
  151. LIFE_POS_BONUS:
  152. FIX_AUTO 20H
  153. FIX_ADRS 12,8
  154. FIX_END
  155. LIFE_CH:
  156. ;first 0-7
  157. DC.B 011H,011H 0 (top full)
  158. DC.B 018H,018H 1
  159. DC.B 017H,017H 2
  160. DC.B 016H,016H 3
  161. DC.B 015H,015H 4
  162. DC.B 014H,014H 5
  163. DC.B 013H,013H 6
  164. DC.B 012H,012H 7
  165. ;middle 0-7
  166. DC.B 010H,010H 0
  167. DC.B 00FH,00FH 1
  168. DC.B 00EH,00EH 2
  169. DC.B 00DH,00DH 3
  170. DC.B 00CH,00CH 4
  171. DC.B 00BH,00BH 5
  172. DC.B 00AH,00AH 6
  173. DC.B 009H,009H 7
  174. ;last 0-7
  175. DC.B 007H,007H 0
  176. DC.B 006H,006H 1
  177. DC.B 005H,005H 2
  178. DC.B 004H,004H 3
  179. DC.B 003H,003H 4
  180. DC.B 002H,002H 5
  181. DC.B 001H,001H 6
  182. DC.B 000H,000H 7
  183. ;middle full
  184. DC.B 008H,008H
  185. SPIRIT_DISP:
  186. MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D4
  187. MOVEQ.L #-1,D0
  188. MOVEQ.L #0,D1
  189. MOVE.B HERO_SPIRIT_D(A6),D1
  190. CMP.B HERO_SPIRIT(A6),D1
  191. BEQ SPIRIT_DISP_9
  192. BHI.S SPIRIT_DISP_1
  193. MOVEQ.L #1,D0
  194. SPIRIT_DISP_1:
  195. ADD.W D0,D1
  196. MOVE.B D1,HERO_SPIRIT_D(A6)
  197. MESS_ON
  198. LEA.L SPIRIT_CH(PC),A1
  199. BSR SPIRIT_POS_SET
  200. BSR SPIRIT_COLOR_SET
  201. CLR.L (A0)+
  202. MOVEQ.L #1,D3
  203. SUBQ.W #2,D1
  204. BPL.S SPIRIT_DISP_2
  205. MOVEQ.L #0,D1
  206. SPIRIT_DISP_2:
  207. ADDQ.W #1,D1
  208. MOVEQ.L #00000111B,D2
  209. AND.W D1,D2
  210. ADD.W D2,D2
  211. LSR.W #3,D1
  212. BNE SPIRIT_DISP_3
  213. MOVE.W #010CH,(A0)+
  214. MOVE.B 0(A1,D2.W),D4
  215. MOVE.W D4,(A0)+
  216. BRA SPIRIT_DISP_6
  217. SPIRIT_DISP_3:
  218. MOVE.W #010CH,(A0)+
  219. MOVE.B (A1),D4
  220. MOVE.W D4,(A0)+
  221. ADDQ.W #1,D3
  222. SUBQ.W #1,D1
  223. BEQ SPIRIT_DISP_4
  224. MOVE.B D1,(A5)
  225. MOVE.W (A5),D0
  226. MOVE.B #0CH,D0
  227. MOVE.W D0,(A0)+
  228. MOVE.B 48(A1),D4
  229. MOVE.W D4,(A0)+
  230. ADD.W D1,D3
  231. SPIRIT_DISP_4:
  232. MOVE.W #10CH,(A0)+
  233. MOVE.B 16(A1,D2.W),D4
  234. MOVE.W D4,(A0)+
  235. SPIRIT_DISP_6:
  236. MOVEQ.L #16,D0
  237. SUB.B D3,D0
  238. BEQ.S SPIRIT_DISP_7
  239. MOVE.B D0,(A5)
  240. MOVE.W (A5),D0
  241. MOVE.B #0CH,D0
  242. MOVE.W D0,(A0)+
  243. MOVE.W #0FFH,(A0)+
  244. SPIRIT_DISP_7:
  245. CLR.W (A0)+
  246. MESS_OFF
  247. SPIRIT_DISP_9:
  248. RTS
  249. SPIRIT_POS_SET:
  250. TST.W D4
  251. BNE SPIRIT_POS_SET_1
  252. MOVE.L #SPIRIT_POS_P1,(A0)+
  253. MOVE.W #0F700H,D4
  254. RTS
  255. SPIRIT_POS_SET_1:
  256. ADDQ.W #1,A1
  257. MOVE.L #SPIRIT_POS_P2,(A0)+
  258. MOVE.W #0F800H,D4
  259. RTS
  260. SPIRIT_COLOR_SET:
  261. LEA.L SPIRIT_RANK(PC),A3
  262. CMP.B (A3),D1
  263. BCS.S SCS_1
  264. SUB.W #1000H,D4
  265. CMP.B 1(A3),D1
  266. BCS.S SCS_1
  267. SUB.W #1000H,D4
  268. SCS_1:
  269. RTS
  270. SPIRIT_POS_P1:
  271. FIX_AUTO -20H
  272. FIX_ADRS 17,5
  273. FIX_END
  274. SPIRIT_POS_P2:
  275. FIX_AUTO 20H
  276. FIX_ADRS 22,5
  277. FIX_END
  278. SPIRIT_CH:
  279. ;first 0-7
  280. DC.B 008H,008H 0 (top full)
  281. DC.B 010H,010H 1
  282. DC.B 00FH,00FH 2
  283. DC.B 00EH,00EH 3
  284. DC.B 00DH,00DH 4
  285. DC.B 00CH,00CH 5
  286. DC.B 00BH,00BH 6
  287. DC.B 00AH,00AH 7
  288. ;middle 0-7
  289. ; DC.B 008H,008H 0
  290. DC.B 01FH,01FH 0
  291. DC.B 007H,007H 1
  292. DC.B 006H,006H 2
  293. DC.B 005H,005H 3
  294. DC.B 004H,004H 4
  295. DC.B 003H,003H 5
  296. DC.B 002H,002H 6
  297. DC.B 001H,001H 7
  298. ;last 0-7
  299. DC.B 007H,007H 0
  300. DC.B 006H,006H 1
  301. DC.B 005H,005H 2
  302. DC.B 004H,004H 3
  303. DC.B 003H,003H 4
  304. DC.B 002H,002H 5
  305. DC.B 001H,001H 6
  306. DC.B 000H,000H 7
  307. ;middle full
  308. DC.B 008H,008H
  309. INCLUDE WORK.INC
  310.