GAME_DSP.SRC 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  1. ;
  2. ;
  3. ; *** 044 ART OF FIGT GAME DISPLAY ***
  4. ;
  5. ;
  6. XDEF GAME_START_DISP,GAME_START_CL
  7. XDEF GAME_TIME_DISP,TIME_OVER_DISP,TIME_OVER_CL
  8. XDEF WINNER_DISP,DEMO_TITLE_SET,DKO_DISP
  9. XDEF PM_HERO_DISP
  10. XDEF SCORE_DISP
  11. XDEF INIT_STORY_CONTINUE,STORY_CONTINUE
  12. XDEF INIT_VS_CONTINUE,VS_CONTINUE
  13. XDEF INIT_GAME_OVER,GAME_OVER
  14. XDEF NUMBER_MESS,BCD_BIN
  15. XDEF PM_FIGHT
  16. XDEF LM_HITAREA,PM_HITAREA
  17. XREF ?A5
  18. ;by GAME_SUB
  19. XREF LWORK_DEAD
  20. ;by ACT_SUB
  21. XREF REDUCTION_MOVE
  22. ;by MESSAGE
  23. XREF MESS_SET,MESS_SET_INNER,FLAME_WRITE,FLAME_CLR
  24. XREF FLAME_WRITED,FLAME_CLRD
  25. ;by LANG
  26. XREF LANG_SET,LANG_SET_INNER
  27. ;by DEMO_CML
  28. XREF DEMO_OBJ_MAP
  29. XREF MASTER_CHECK
  30. ;by PHASE
  31. XREF ACTIVE_TRIGER
  32. SECT GAME,,C
  33. INCLUDE SYS.INC
  34. INCLUDE NEO_GEO.INC
  35. INCLUDE LABEL.INC
  36. INCLUDE EASY_MAC.INC
  37. INCLUDE MACRO.INC
  38. INCLUDE HFLAG.INC
  39. C_SEL_DISP EQU 13H
  40. C_PLAY_FACE EQU 003BH
  41. C_FIGHT EQU 60H
  42. C_HITAREA EQU 0061H
  43. HA_SET:
  44. LEA.L MLWORK1(A5),A6
  45. LCHILD WORK_N3,L_HITAREA,LM_HITAREA1_0
  46. LCHILD WORK_N3,L_HITAREA,LM_HITAREA2_0
  47. RTS
  48. LM_HITAREA:
  49. EASY_START
  50. LM_HITAREA1_0:
  51. MOVE.L #PM_ADRS1,VX(A6)
  52. MOVE.L #HERO1,VY(A6)
  53. MOVE.B #P1_START,VZ(A6)
  54. MOVE.W #97H,AX(A6)
  55. BRA.S LM_HITAREA_0
  56. LM_HITAREA2_0:
  57. MOVE.L #PM_ADRS2,VX(A6)
  58. MOVE.L #HERO2,VY(A6)
  59. MOVE.B #P2_START,VZ(A6)
  60. MOVE.W #98H,AX(A6)
  61. LM_HITAREA_0:
  62. BSR HIT_CHILD
  63. BSR HITN_SET
  64. END_NEXT 1,LM_HITAREA_1
  65. LM_HITAREA_1:
  66. MOVE.L VY(A6),A0
  67. MOVE.L Y_POSITION(A0),D7
  68. MOVE.B VZ(A6),D0
  69. AND.B INPUT_S+1(A5),D0
  70. BEQ.S LHA_2
  71. ADDQ.W #1,LW_D0(A6)
  72. BSR HITN_SET
  73. LHA_2:
  74. MOVE.W LW_D0(A6),D0
  75. ADD.W D0,D0
  76. ADD.W D0,D0
  77. MOVE.L VX(A6),A4
  78. MOVE.L 0(A4,D0.W),A4
  79. MOVE.L HIT_UPPER(A4),D5
  80. MOVE.L HIT_LEFT(A4),D6
  81. SUB_WORK WORK_N0,A1,0
  82. SUB_WORK WORK_N1,A2,0
  83. SUB_WORK WORK_N2,A3,0
  84. SUB_WORK WORK_N3,A0,0
  85. BTST.B #ACTAT_FLIP,ACT_ATTR(A4)
  86. BEQ.S LHA_3
  87. SWAP D6
  88. EXG.L A1,A2
  89. EXG.L A3,A0
  90. LHA_3:
  91. MOVE.L D7,Y_POSITION(A1)
  92. MOVE.L D7,Y_POSITION(A2)
  93. MOVE.L D7,Y_POSITION(A3)
  94. MOVE.L D7,Y_POSITION(A0)
  95. MOVE.W D6,X_POSITION(A2)
  96. MOVE.W D6,X_POSITION(A0)
  97. SWAP D6
  98. MOVE.W D6,X_POSITION(A1)
  99. MOVE.W D6,X_POSITION(A3)
  100. MOVE.W D5,Z_POSITION(A3)
  101. MOVE.W D5,Z_POSITION(A0)
  102. SWAP D5
  103. MOVE.W D5,Z_POSITION(A1)
  104. MOVE.W D5,Z_POSITION(A2)
  105. RTS
  106. HITN_SET:
  107. AND.W #111B,LW_D0(A6)
  108. MOVE.W AX(A6),D0
  109. JSR.S MESS_SET
  110. MOVE.W #99H,D0
  111. ADD.W LW_D0(A6),D0
  112. JSR.S MESS_SET
  113. RTS
  114. HIT_CHILD:
  115. PCHILD WORK_N0,P_HITAREA,C_HITAREA,0,0,0E4H,0
  116. PCHILD WORK_N1,P_HITAREA,C_HITAREA,0,0,0E4H,0
  117. MOVE.B #0,ACT_COUNT(A0)
  118. PCHILD WORK_N2,P_HITAREA,C_HITAREA,0,0,0E4H,0
  119. MOVE.B #1,ACT_COUNT(A0)
  120. PCHILD WORK_N3,P_HITAREA,C_HITAREA,0,0,0E4H,0
  121. MOVE.B #2,ACT_COUNT(A0)
  122. RTS
  123. PM_ADRS1:
  124. DC.L 109000H G
  125. DC.L 109100H W
  126. DC.L 109200H H
  127. DC.L 109300H B1
  128. DC.L 109400H B2
  129. DC.L 109500H A
  130. DC.L 109600H BS
  131. DC.L 109600H BS
  132. PM_ADRS2:
  133. DC.L 10A000H G
  134. DC.L 10A100H W
  135. DC.L 10A200H H
  136. DC.L 10A300H B1
  137. DC.L 10A400H B2
  138. DC.L 10A500H A
  139. DC.L 10A600H BS
  140. DC.L 10A600H BS
  141. PM_HITAREA:
  142. JSR.S REDUCTION_MOVE
  143. MOVE.W #0FFFFH,BIG_X(A6)
  144. JSR.S NEXT_ACTION
  145. JSR.S SORT_SET
  146. RTS
  147. DEMO_TITLE_SET:
  148. BTST.B #6,PHASE+1(A5)
  149. BEQ.S DTS_2
  150. LEA.L MLWORK2(A5),A6
  151. PCHILD WORK_N0,P_EASY,C_PLAY_FACE,320-68H,48H,0E4H,0
  152. MOVEQ.L #9,D0
  153. TST.B COUNTRY_CODE(A5)
  154. BEQ.S DTS_1
  155. MOVEQ.L #10,D0
  156. DTS_1:
  157. MOVE.B D0,ACT_COUNT(A0)
  158. DTS_2:
  159. RTS
  160. PM_FIGHT:
  161. JSR MASTER_CHECK
  162. BSR PM_FIGHT_SUB
  163. JSR.S GET_REL_POS
  164. JSR.S NEXT_ACTION
  165. JSR.S SORT_SET
  166. RTS
  167. PM_FIGHT_SUB:
  168. CMP.B #0FFH,BIG_X(A6)
  169. BEQ.S PM_FIGHT_2
  170. ADD.B #10H,BIG_X(A6)
  171. ADD.B #10H,BIG_Y(A6)
  172. CMP.B #0FFH,BIG_X(A6)
  173. BNE.S PM_FIGHT_1
  174. MOVE.B #30,BYTE_TIMER(A6)
  175. PM_FIGHT_1:
  176. RTS
  177. PM_FIGHT_2:
  178. SUBQ.B #1,BYTE_TIMER(A6)
  179. BNE.S PM_FIGHT_1
  180. ADDQ.L #4,SP
  181. CLR.W TYPE(A6)
  182. RTS
  183. NUMBER_MESS:
  184. ; in) D0 forward message No
  185. ; D1 number
  186. DIVU #10000,D1
  187. MOVE.B D1,CAL_MESS+80H(A5)
  188. CLR.W D1
  189. SWAP D1
  190. DIVU #1000,D1
  191. MOVE.B D1,CAL_MESS+81H(A5)
  192. CLR.W D1
  193. SWAP D1
  194. DIVU #100,D1
  195. MOVE.B D1,CAL_MESS+82H(A5)
  196. CLR.W D1
  197. SWAP D1
  198. DIVU #10,D1
  199. MOVE.B D1,CAL_MESS+83H(A5)
  200. SWAP D1
  201. MOVE.B D1,CAL_MESS+84H(A5)
  202. NUMBER_MESS_1:
  203. LEA.L CAL_MESS+80H(A5),A1
  204. LEA.L CAL_MESS(A5),A0
  205. MOVE.L #301000AH,(A0)+ FIX_FORMAT.W NUM,10
  206. MOVE.W #7,(A0)+ FIX_DIRECT_DATA
  207. MOVEQ.L #0,D1
  208. MOVEQ.L #4-1,D7
  209. NUMBER_MESS_2:
  210. MOVE.B (A1),D1
  211. BNE.S NUMBER_MESS_10
  212. MOVE.L #00FF00FFH,(A0)+
  213. ADDQ.L #1,A1
  214. DBRA D7,NUMBER_MESS_2
  215. NUMBER_MESS_10:
  216. ADDQ.W #1,D7
  217. NUMBER_MESS_11:
  218. MOVE.B (A1)+,D1
  219. ADD.W D1,D1
  220. MOVE.W KNJ_NUM(PC,D1.W),D2
  221. MOVE.W D2,(A0)+
  222. ADDQ.W #1,D2
  223. MOVE.W D2,(A0)+
  224. DBRA D7,NUMBER_MESS_11
  225. MOVE.W #114H,(A0)+ FIX_NEXT 0,1
  226. MOVE.W #7,(A0)+ FIX_DIRECT_DATA
  227. LEA.L CAL_MESS+6(A5),A1
  228. MOVEQ.L #10-1,D7
  229. NUMBER_MESS_20:
  230. MOVE.W (A1)+,D1
  231. CMP.W #0FFH,D1
  232. BEQ.S NUMBER_MESS_21
  233. ADD.W #100H,D1
  234. NUMBER_MESS_21:
  235. MOVE.W D1,(A0)+
  236. DBRA D7,NUMBER_MESS_20
  237. CLR.W (A0)+ FIX_END
  238. MESS_ON
  239. JSR.S MESS_SET_INNER
  240. MOVE.L #CAL_MESS,(A0)+
  241. MESS_OFF
  242. RTS
  243. KNJ_NUM:
  244. DC.W 2362H,2364H,2366H,2368H,236AH,236CH,236EH,2370H,2372H,2374H
  245. BCD_BIN:
  246. MOVE.B BCD_BIN_DATA(PC,D1.W),D1
  247. RTS
  248. BCD_BIN_DATA:
  249. DC.B 00,01,02,03,04,05,06,07,08,09,01,01,01,01,01,01
  250. DC.B 10,11,12,13,14,15,16,17,18,19,11,11,11,11,11,11
  251. DC.B 20,21,22,23,24,25,26,27,28,29,21,21,21,21,21,21
  252. DC.B 30,31,32,33,34,35,36,37,38,39,31,31,31,31,31,31
  253. DC.B 40,41,42,43,44,45,46,47,48,49,41,41,41,41,41,41
  254. DC.B 50,51,52,53,54,55,56,57,58,59,51,51,51,51,51,51
  255. DC.B 60,61,62,63,64,65,66,67,68,69,61,61,61,61,61,61
  256. DC.B 70,71,72,73,74,75,76,77,78,79,71,71,71,71,71,71
  257. DC.B 80,81,82,83,84,85,86,87,88,89,81,81,81,81,81,81
  258. DC.B 90,91,92,93,94,95,96,97,98,99,91,91,91,91,91,91
  259. KIMURA:
  260. MOVE.L ANOTHER_PLAYER(A3),A1
  261. MOVE.W HERO_TYPE+HERO_OFFSET(A3),D0
  262. CMP.W HERO_TYPE+HERO_OFFSET(A1),D0
  263. BNE.S KIMURA_1
  264. TST.W PLAYER_No(A3)
  265. BEQ.S KIMURA_1
  266. MOVE.B IRO_ADD(PC,D0.W),PALETTE_ADD(A0)
  267. KIMURA_1:
  268. RTS
  269. IRO_ADD:
  270. ; 1 2 1 2 3 4 5 6 7 8
  271. DC.B 1,1,1,1,1,1,1,1,29H,40H
  272. INIT_VS_CONTINUE:
  273. BTST.B #5,PHASE+1(A5)
  274. BNE NO_CONT_OVER_1
  275. TST.B DRAW_FLAG(A5)
  276. BNE NO_CONT_OVER_1
  277. AND.B #10111111B,START_FLAG2(A5)
  278. JSR.S PWORK_INIT
  279. JSR.S LWORK_DEAD
  280. LEA.L MLWORK1(A5),A6
  281. OBJ_MAP DEMO_OBJ_MAP
  282. CLR.L WINDOW_X(A5)
  283. CLR.L WINDOW_Y(A5)
  284. COLOR_COMMAND
  285. PALETTE 000H,00H,PG_SET+BASE_COLOR
  286. PALETTE 080H,20H,PG_SET+BASE_COLOR
  287. PALETTE 090H,21H,PG_SET+BASE_COLOR
  288. PALETTE 0C0H,24H,PG_SET+BASE_COLOR
  289. PALETTE 0D0H,25H,PG_SET+BASE_COLOR
  290. PALETTE 0F0H,27H,PG_SET+BASE_COLOR
  291. PALETTE_END
  292. PCHILD WORK_N0,P_EASY,C_SEL_DISP,60H,50H,1,0
  293. MOVE.L WIN_PLAYER(A5),A3
  294. BSR KIMURA
  295. SUB.B D0,D0
  296. MOVEQ.L #1,D1
  297. MOVE.B HERO_BEAT+HERO_OFFSET(A3),D0
  298. ABCD.B D1,D0
  299. MOVE.B D0,HERO_BEAT+HERO_OFFSET(A3)
  300. MOVE.W PLAYER_No(A3),OLD_VS(A5)
  301. MOVE.W HERO_TYPE+HERO_OFFSET(A3),D0
  302. SUBQ.W #1,D0
  303. MOVE.B D0,ACT_COUNT(A0)
  304. MOVE.L ANOTHER_PLAYER(A3),A4
  305. CLR.B HERO_BEAT+HERO_OFFSET(A4)
  306. CLR.L HERO_SCORE+HERO_OFFSET(A4)
  307. MOVE.W PLAYER_No(A4),D0
  308. LEA.L PLAYER_MODE(A5),A0
  309. MOVE.B #2,0(A0,D0.W)
  310. CLR.B PLAYER_STATE(A4)
  311. BCLR.B D0,PHASE(A5)
  312. MOVE.W #31H,D0 clear
  313. JSR.S MESS_SET
  314. MOVE.W #2,FLAME_COUNT(A5)
  315. MOVE.W #0,FLAME_TYPE(A5)
  316. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  317. JSR.S FLAME_WRITED
  318. MOVE.W #84H,D0
  319. JSR.S MESS_SET
  320. MOVE.W #59*3,D0 wait challenger
  321. JSR.S LANG_SET
  322. MOVE.W HERO_TYPE+HERO_OFFSET(A3),D0
  323. ADD.W D0,D0
  324. ADD.W HERO_TYPE+HERO_OFFSET(A3),D0
  325. ADD.W #60*3,D0
  326. JSR.S LANG_SET
  327. MOVE.W #133H*2,D0
  328. JSR.S SET_BGM
  329. SEC_TIMER_SET 9,WORD_TIMER
  330. BSR CONT_COUNT_DISP
  331. AND.B #01111111B,PHASE+1(A5)
  332. END_NEXT 0,VS_CONT_00
  333. RTS
  334. VS_CONTINUE:
  335. LEA.L MLWORK1(A5),A6
  336. EASY_START
  337. VS_CONT_00:
  338. AND.B #00000011B,START_FLAG2(A5)
  339. JSR ACTIVE_TRIGER
  340. BTST.L #B_A_BUTTON,D2
  341. BEQ.S VS_CONT_1
  342. MOVE.B #1,WORD_TIMER+1(A6)
  343. VS_CONT_1:
  344. MOVE.B WORD_TIMER(A6),D0
  345. SEC_TIMER WORD_TIMER
  346. BCS NO_CONT_OVER_VS
  347. CMP.B WORD_TIMER(A6),D0
  348. BNE CONT_COUNT_DISP
  349. RTS
  350. NO_CONT_OVER_VS:
  351. MOVE.L WIN_PLAYER(A5),A0
  352. MOVE.W PLAYER_No(A0),STORY_PLAYER(A5)
  353. MOVE.L ANOTHER_PLAYER(A0),A1
  354. TST.B MVS_FLAG(A5)
  355. BNE.S NCOV_1
  356. MOVE.W PLAYER_No(A1),D0
  357. LEA.L PLAYER_MODE(A5),A0
  358. MOVE.B #0,0(A0,D0.W)
  359. LEA.L HOME_CREDIT(A5),A0
  360. TST.B 0(A0,D0.W)
  361. BNE.S NCOV_1
  362. BSET.B #BPS_START_DI,PLAYER_STATE(A1)
  363. NCOV_1:
  364. MOVE.W #2,FLAME_COUNT(A5)
  365. JSR.S FLAME_WRITED
  366. MOVE.W #145*3,D0
  367. JSR.S LANG_SET
  368. MOVE.W #60,WORD_TIMER(A6)
  369. END_NEXT 2,VS_CONT_RET
  370. VS_CONT_RET:
  371. SUBQ.W #1,WORD_TIMER(A6)
  372. BEQ.S VS_RET_ST
  373. RTS
  374. VS_RET_ST:
  375. MOVE.B #00100000B,D0
  376. AND.B PHASE+1(A5),D0
  377. OR.B #10000010B,D0 story player select
  378. MOVE.B D0,PHASE+1(A5)
  379. RTS
  380. INIT_STORY_CONTINUE:
  381. BSR CONT_CHECK
  382. BEQ NO_CONT_OVER
  383. JSR.S PWORK_INIT
  384. JSR.S LWORK_DEAD
  385. LEA.L MLWORK1(A5),A6
  386. OBJ_MAP DEMO_OBJ_MAP
  387. CLR.L WINDOW_X(A5)
  388. CLR.L WINDOW_Y(A5)
  389. COLOR_COMMAND
  390. PALETTE 000H,00H,PG_SET+BASE_COLOR
  391. PALETTE 080H,20H,PG_SET+BASE_COLOR
  392. PALETTE 090H,21H,PG_SET+BASE_COLOR
  393. PALETTE 0F0H,27H,PG_SET+BASE_COLOR
  394. PALETTE_END
  395. LEA.L PLAYER1(A5),A4
  396. MOVE.W STORY_PLAYER(A5),D0
  397. BEQ.S ISC_1
  398. LEA.L PLAYER2(A5),A4
  399. ISC_1:
  400. LEA.L PLAYER_MODE(A5),A0
  401. MOVE.B #2,0(A0,D0.W)
  402. CLR.B PLAYER_STATE(A4)
  403. CLR.B HERO_BEAT+HERO_OFFSET(A4)
  404. MOVE.L ANOTHER_PLAYER(A4),A0
  405. OR.B #PS_START_DI,PLAYER_STATE(A0)
  406. MOVE.W #31H,D0 clear
  407. JSR.S MESS_SET
  408. MOVE.W #26H,D0 cont
  409. JSR.S MESS_SET
  410. MOVE.W #2,FLAME_COUNT(A5)
  411. MOVE.W #0,FLAME_TYPE(A5)
  412. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  413. JSR.S FLAME_WRITED
  414. BSR HOW_MESS_SET
  415. PCHILD WORK_N0,P_EASY,C_SEL_DISP,60H,50H,1,0
  416. MOVE.W HERO_TYPE+HERO_OFFSET(A4),D0
  417. ADD.W #10-1,D0
  418. MOVE.B D0,ACT_COUNT(A0)
  419. MOVE.W #133H*2,D0
  420. JSR.S SET_BGM
  421. SEC_TIMER_SET 9,WORD_TIMER
  422. BSR CONT_COUNT_DISP
  423. AND.B #01111111B,PHASE+1(A5)
  424. RTS
  425. HOW_MESS_SET:
  426. MOVEQ.L #00001110B,D0
  427. AND.B HOW_MESS_No(A5),D0
  428. MOVE.W CONT_HOWD(PC,D0.W),D0
  429. JSR.S LANG_SET
  430. ADDQ.B #2,HOW_MESS_No(A5)
  431. RTS
  432. CONT_HOWD:
  433. DC.W 99*3,100*3,104*3,105*3,106*3,107*3,108*3,109*3
  434. STORY_CONTINUE:
  435. LEA.L MLWORK1(A5),A6
  436. AND.B #00000011B,START_FLAG2(A5)
  437. JSR ACTIVE_TRIGER
  438. BTST.L #B_A_BUTTON,D2
  439. BEQ.S ST_CONT_1
  440. MOVE.B #1,WORD_TIMER+1(A6)
  441. ST_CONT_1:
  442. MOVE.B WORD_TIMER(A6),D0
  443. SEC_TIMER WORD_TIMER
  444. BCS NO_CONT_OVER
  445. CMP.B WORD_TIMER(A6),D0
  446. BNE.S CONT_COUNT_DISP
  447. RTS
  448. CONT_COUNT_DISP:
  449. MOVEQ.L #27H,D0 cont 0
  450. ADD.B WORD_TIMER(A6),D0
  451. JSR.S MESS_SET
  452. SOUND #1BH*2 ;S_CONTINYU
  453. RTS
  454. CONT_CHECK:
  455. TST.B MVS_FLAG(A5)
  456. BNE CONT_CHECK_MVS
  457. MOVE.W STORY_PLAYER(A5),D0
  458. LEA.L HOME_CREDIT(A5),A0
  459. TST.B 0(A0,D0.W)
  460. RTS
  461. CONT_CHECK_MVS:
  462. TST.B GAME_DIP+SD_CONTINUE(A5)
  463. RTS
  464. NO_CONT_OVER:
  465. MOVEQ.L #00110000B,D0
  466. AND.B PHASE+1(A5),D0
  467. OR.B #10000101B,D0
  468. MOVE.B D0,PHASE+1(A5)
  469. OR.B #PS_START_DI,PLAYER_STATE+PLAYER1(A5)
  470. OR.B #PS_START_DI,PLAYER_STATE+PLAYER2(A5)
  471. MOVE.W #303H,PLAYER_MODE(A5)
  472. RTS
  473. NO_CONT_OVER_1:
  474. MOVEQ.L #00110000B,D0
  475. AND.B PHASE+1(A5),D0
  476. OR.B #10000100B,D0
  477. MOVE.B D0,PHASE+1(A5)
  478. OR.B #PS_START_DI,PLAYER_STATE+PLAYER1(A5)
  479. OR.B #PS_START_DI,PLAYER_STATE+PLAYER2(A5)
  480. MOVE.W #303H,PLAYER_MODE(A5)
  481. RTS
  482. INIT_GAME_OVER:
  483. MOVE.W #17DH*2,D0 S_OVER
  484. JSR.S SET_BGM
  485. OR.B #PS_START_DI,PLAYER_STATE+PLAYER1(A5)
  486. OR.B #PS_START_DI,PLAYER_STATE+PLAYER2(A5)
  487. MOVE.W #303H,PLAYER_MODE(A5)
  488. JSR.S PWORK_INIT
  489. JSR.S LWORK_DEAD
  490. LEA.L MLWORK1(A5),A6
  491. COLOR_COMMAND
  492. PALETTE 000H,00H,PG_SET+BASE_COLOR
  493. PALETTE 0F0H,27H,PG_SET+BASE_COLOR
  494. PALETTE_END
  495. MOVE.W #31H,D0 clear
  496. JSR.S MESS_SET
  497. MOVE.W #32H,D0
  498. JSR.S MESS_SET
  499. OBJ_MAP DEMO_OBJ_MAP
  500. CLR.L WINDOW_X(A5)
  501. CLR.L WINDOW_Y(A5)
  502. SEC_TIMER_SET 3,WORD_TIMER
  503. AND.B #01111111B,PHASE+1(A5)
  504. RTS
  505. GAME_OVER:
  506. LEA.L MLWORK1(A5),A6
  507. SEC_TIMER WORD_TIMER
  508. BCC.S GAME_OVER_1
  509. MOVEQ.L #01110000B,D0
  510. AND.B PHASE+1(A5),D0
  511. OR.B #43H,D0
  512. MOVE.B D0,PHASE+1(A5)
  513. GAME_OVER_1:
  514. RTS
  515. SCORE_DISP:
  516. BTST.B #4,PHASE+1(A5)
  517. BNE BEAT_DISP
  518. LEA.L HERO1(A5),A1
  519. MOVE.W #54H,D0
  520. BSR SCORE_DISP_SUB
  521. LEA.L HERO2(A5),A1
  522. MOVE.W #55H,D0
  523. SCORE_DISP_SUB:
  524. BTST.B #6,PHASE+1(A5)
  525. BNE HERO_COND_DISP
  526. BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A1)
  527. BEQ HERO_COND_DISP
  528. MOVE.L HERO_SCORE(A1),D1
  529. CMP.L HERO_SCORE_D(A1),D1
  530. BEQ SDS_2
  531. MOVE.L D1,HERO_SCORE_D(A1)
  532. JSR.S MESS_SET
  533. CMP.L HI_SCORE(A5),D1
  534. BLS.S SDS_1
  535. MOVE.L D1,HI_SCORE(A5)
  536. SDS_1:
  537. MOVE.W #53H,D0
  538. JSR.S MESS_SET
  539. SDS_2:
  540. RTS
  541. HERO_COND_DISP:
  542. BTST.B #6,PHASE+1(A5)
  543. BNE.S HCD_0
  544. BTST.B #BPS_START_DI,PLAYER_STATE+PLAYER_OFFSET(A1)
  545. BNE HERO_COND_OVER
  546. TST.B START_FLAG2(A5)
  547. BNE HERO_COND_WAIT
  548. HCD_0:
  549. MOVEQ.L #1FH,D0
  550. AND.W MAIN_COUNT+2(A5),D0
  551. BNE HCD_END
  552. CLR.B HERO_STATE_ON(A1)
  553. MOVE.W PLAYER_No+PLAYER_OFFSET(A1),D1
  554. BTST.B #5,MAIN_COUNT+3(A5)
  555. BEQ HCWV
  556. JSR.S PLAYABLE
  557. MOVE.B D0,D2
  558. MOVE.W #89H,D0
  559. BTST.L D1,D2
  560. BEQ.S HCD_1
  561. ADDQ.W #2,D0
  562. HCD_1:
  563. ADD.W D1,D0
  564. JSR.S MESS_SET
  565. HCD_END:
  566. RTS
  567. HCWV:
  568. MOVE.W #8DH,D0
  569. ADD.W D1,D0
  570. JSR.S MESS_SET
  571. MOVE.W #59*3,D0
  572. JSR.S LANG_SET
  573. RTS
  574. HERO_COND_OVER:
  575. MOVE.W #85H,D0
  576. BSR HC_SUB
  577. RTS
  578. HERO_COND_WAIT:
  579. MOVE.W #87H,D0
  580. HC_SUB:
  581. MOVEQ.L #1FH,D1
  582. AND.W MAIN_COUNT+2(A5),D1
  583. BEQ.S HC_SUB_0
  584. MOVE.W #93H,D0
  585. CMP.W #18H,D1
  586. BEQ.S HC_SUB_1
  587. RTS
  588. HC_SUB_0:
  589. BTST.B #5,MAIN_COUNT+3(A5)
  590. BEQ.S HC_SUB_1
  591. MOVE.W #0ABH,D0
  592. HC_SUB_1:
  593. ADD.W PLAYER_No+PLAYER_OFFSET(A1),D0
  594. JSR.S MESS_SET
  595. RTS
  596. BEAT_DISP:
  597. TST.B HERO1+HERO_STATE_ON(A5)
  598. BNE.S BEAT_DISP_1
  599. MOVE.B #1,HERO1+HERO_STATE_ON(A5)
  600. MOVE.B #1,HERO2+HERO_STATE_ON(A5)
  601. MOVE.W #93*3,D0
  602. JSR.S LANG_SET
  603. BEAT_DISP_1:
  604. RTS
  605. GAME_START_DISP:
  606. MESS_ON
  607. MOVE.W #31H,D0 clear
  608. JSR.S MESS_SET_INNER
  609. ; MOVE.W #57H,D0 ready
  610. ; JSR.S MESS_SET_INNER
  611. JSR ROUND_DISP(PC)
  612. MOVE.W #23H,D0 face
  613. JSR.S MESS_SET_INNER
  614. MOVE.W #17H,D0
  615. JSR.S MESS_SET_INNER
  616. MOVE.W #24H,D0
  617. JSR.S MESS_SET_INNER
  618. MOVE.W #17H,D0
  619. JSR.S MESS_SET_INNER
  620. MOVE.W HERO1+HERO_TYPE(A5),D0
  621. ADD.W D0,D0
  622. ADD.W #0D6H,D0
  623. JSR.S MESS_SET_INNER
  624. MOVE.W HERO2+HERO_TYPE(A5),D0
  625. ADD.W D0,D0
  626. ADD.W #0D7H,D0
  627. JSR.S MESS_SET_INNER
  628. MESS_OFF
  629. JSR WIN_CUP_DISP(PC)
  630. JSR GAME_TIME_DISP(PC)
  631. MOVE.B #HA_ON,D0
  632. AND.B DEBUG_DIP1(A5),D0
  633. BEQ.S GSD_1
  634. BTST.B #4,PHASE+1(A5)
  635. BNE HA_SET
  636. GSD_1:
  637. RTS
  638. GAME_START_CL:
  639. MOVE.W #125H*2,D0 FIGHT
  640. JSR.S SET_SOUND
  641. MOVE.W #1*2,D0 S_WAIT1
  642. JSR.S SET_SOUND
  643. MOVE.W #125H*2,D0 FIGHT
  644. JSR.S SET_SOUND
  645. BSR RE_BGM
  646. MOVE.W #59H,D0
  647. JSR.S MESS_SET
  648. PCHILD LW_D7,P_FIGHT,C_FIGHT,160,88H,0E2H,0
  649. MOVE.W #0F0FH,BIG_X(A0)
  650. RTS
  651. RE_BGM:
  652. MOVE.W AREA_No(A5),D0
  653. ADD.W D0,D0
  654. MOVE.W RE_BGMD-2(PC,D0.W),D0
  655. JSR.S SET_BGM
  656. RTS
  657. RE_BGMD:
  658. DC.W 0DH*2 1
  659. DC.W 0EH*2 2
  660. DC.W 0EH*2 2
  661. DC.W 0FH*2 3
  662. DC.W 10H*2 4
  663. DC.W 10H*2 4
  664. DC.W 11H*2 5
  665. DC.W 12H*2 6
  666. DC.W 12H*2 6
  667. DC.W 13H*2 7
  668. DC.W 14H*2 8
  669. GAME_TIME_DISP:
  670. MESS_ON
  671. MOVE.W #3EH,D0
  672. JSR.S MESS_SET_INNER
  673. MOVE.B STAGE_TIME(A5),D0
  674. LSR.B #4,D0
  675. AND.W #0FH,D0
  676. ADD.W #3FH,D0
  677. JSR.S MESS_SET_INNER
  678. MOVEQ.L #0FH,D0
  679. AND.B STAGE_TIME(A5),D0
  680. ADD.W #49H,D0
  681. JSR.S MESS_SET_INNER
  682. MESS_OFF
  683. RTS
  684. TIME_OVER_CL:
  685. MOVE.W #0D5H,D0
  686. JSR.S MESS_SET
  687. RTS
  688. TIME_OVER_DISP:
  689. MOVE.W #5AH,D0
  690. JSR.S MESS_SET
  691. RTS
  692. DKO_DISP:
  693. MOVE.W #58H,D0
  694. JSR.S MESS_SET
  695. RTS
  696. WINNER_DISP:
  697. MOVE.W #13EH*2,D0
  698. JSR.S SET_SOUND S_POINT
  699. JSR WIN_CUP_DISP(PC)
  700. MOVE.L WIN_PLAYER(A5),A1
  701. BTST.B #4,PHASE+1(A5)
  702. BNE WINNER_VS
  703. MOVE.W #5BH,D0
  704. BTST.B #BPS_COM_FLAG,PLAYER_STATE(A1)
  705. BNE.S WINNER_DISP_1
  706. MOVE.W #83H,D0
  707. WINNER_DISP_1:
  708. JSR.S MESS_SET
  709. RTS
  710. WINNER_VS:
  711. MOVE.W #5CH,D0
  712. ADD.W PLAYER_No(A1),D0
  713. JSR.S MESS_SET
  714. RTS
  715. ROUND_DISP:
  716. MOVE.W MAX_ROUND(A5),D0
  717. MOVE.W ROUND_No(A5),D1
  718. BNE.S ROUND_DISP_1
  719. CMP.W #1,D0
  720. BEQ ROUND_DISP_3
  721. ROUND_DISP_1:
  722. SUB.W D1,D0
  723. CMP.W #1,D0
  724. BHI.S ROUND_DISP_3
  725. BEQ.S ROUND_DISP_2
  726. MOVEQ.L #5,D1
  727. BRA.S ROUND_DISP_3
  728. ROUND_DISP_2:
  729. MOVEQ.L #4,D1
  730. ROUND_DISP_3:
  731. MOVE.W D1,ROUND_DISP_No(A5)
  732. MOVE.W #7DH,D0
  733. ADD.W D1,D0
  734. JSR.S MESS_SET_INNER
  735. ADD.W D1,D1
  736. MOVE.W ROUND_NAME(PC,D1.W),D0
  737. MOVE.W D0,-(SP)
  738. JSR.S SET_SOUND
  739. MOVE.W #1*2,D0 S_WAIT1
  740. JSR.S SET_SOUND
  741. MOVE.W (SP)+,D0
  742. JSR.S SET_SOUND
  743. RTS
  744. ROUND_NAME:
  745. DC.W 13AH*2
  746. DC.W 13BH*2
  747. DC.W 13CH*2
  748. DC.W 13DH*2
  749. DC.W 10BH*2
  750. DC.W 10CH*2
  751. WIN_CUP_DISP:
  752. LEA.L PLAYER1(A5),A1
  753. BSR PROUND_DISP_SUB
  754. LEA.L PLAYER2(A5),A1
  755. PROUND_DISP_SUB:
  756. MOVEP.W WORK_N2+HERO_OFFSET(A1),D0
  757. CLR.B D0
  758. LEA.L 0(A5,D0.W),A0
  759. MOVE.W WIN_ROUND(A1),D0
  760. ADD.W D0,D0
  761. ADD.W PLAYER_No(A1),D0
  762. ADD.W D0,D0
  763. ADD.W D0,D0
  764. MOVE.W PROUND_MESS(PC,D0.W),REL_X(A0)
  765. MOVE.B PROUND_MESS+3(PC,D0.W),ACT_COUNT(A0)
  766. MOVE.B #1,ACT_DEC(A0)
  767. RTS
  768. PROUND_MESS:
  769. DC.W 40H,-1,320-40H,-1
  770. DC.W 40H,01,320-40H,01
  771. DC.W 48H,05,320-48H,05
  772. DC.W 50H,09,320-50H,09
  773. PM_HERO_DISP:
  774. TST.B ST_DEMO_IN(A5)
  775. BNE.S PM_HERO_DISP_1
  776. TST.B IN_BONUS(A5)
  777. BNE.S PM_HERO_DISP_1
  778. JSR.S NEXT_ACTION
  779. JSR.S SORT_SET
  780. PM_HERO_DISP_1:
  781. RTS
  782. INCLUDE WORK.INC
  783.