BSEL.SRC 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. ************************************************************************
  2. * *
  3. * 044 [RYUUKO NO KEN] *
  4. * BONUS STAGE *
  5. * by S.OKADA from 92/06/16 Tue 16:30 *
  6. * *
  7. ************************************************************************
  8. XDEF INIT_BONUS_STG
  9. XDEF INIT_BONUS3
  10. XDEF PM_MATO
  11. XDEF AFTER_BONUS_0
  12. XDEF START_MAKE
  13. XREF ?A5
  14. ;by BONUS
  15. XREF INIT_BONUS_STG0,BEER_NECK
  16. ;by STORY
  17. XREF STAGE_TIME_DEC
  18. XREF GAME_OBJ_MAP,LEVER_SET_GAME
  19. ;by PHASE
  20. XREF ACTIVE_TRIGER
  21. ;by GAME_DSP
  22. XREF GAME_TIME_DISP
  23. XREF NUMBER_MESS
  24. ;by DEMO_CML
  25. XREF DEMO_OBJ_MAP
  26. ;by MESSAGE
  27. XREF MESS_SET,MESS_SET_INNER,FLAME_WRITE,FLAME_CLR
  28. XREF FLAME_WRITED,FLAME_CLRD
  29. ;by LANG
  30. XREF LANG_SET,LANG_SET_INNER
  31. ;by GAME_SUB
  32. XREF LWORK_DEAD
  33. SECT GAME,,C
  34. INCLUDE SYS.INC
  35. INCLUDE NEO_GEO.INC
  36. INCLUDE LABEL.INC
  37. INCLUDE HERO_TBL.INC
  38. INCLUDE ACT_No.INC
  39. INCLUDE CTRL_No.INC
  40. INCLUDE HERO_STP.INC
  41. INCLUDE MACRO.INC
  42. INCLUDE EASY_MAC.INC
  43. INCLUDE SMACRO.INC
  44. INCLUDE SCODE.INC
  45. START_MAKE:
  46. PCHILD LW_D7,P_FIGHT,C_FIGHT,160,80H,020H,0
  47. MOVE.B #0,ACT_COUNT(A0)
  48. MOVE.W #0F0FH,BIG_X(A0)
  49. RTS
  50. INIT_BONUS3:
  51. MOVE.W #7FFFH,COLOR_BUFFER+1FFEH(A5)
  52. COLOR_COMMAND
  53. PALETTE 000H,00H,PG_SET+BASE_COLOR
  54. PALETTE 0FFH,00H,BASE_COLOR
  55. PALETTE_END
  56. SOUND #S_KAKIN
  57. SOUND #S_BONUS3
  58. MOVE.W #31H,D0
  59. JSR.S MESS_SET clear
  60. MOVE.W #6EH,D0
  61. JSR.S MESS_SET title
  62. SEC_TIMER_SET 2,WORD_TIMER
  63. END_NEXT 1,BONUS3_0
  64. BONUS3_0:
  65. SEC_TIMER WORD_TIMER
  66. NEXT_CHECK BCS,2,BONUS3_1
  67. MOVE.W #S_HITSAT,D0
  68. JSR.S SET_BGM
  69. MOVE.W #6FH,D0
  70. JSR.S MESS_SET
  71. CLR.W BONUS3_USE(A5)
  72. MOVE.W #1,FLAME_COUNT(A5)
  73. MOVE.W #0,FLAME_TYPE(A5)
  74. MOVE.W #7000H+20H*22+6,FLAME_POS(A5)
  75. JSR.S FLAME_WRITED
  76. BSR BONUS3_NORMA_GET
  77. MOVE.W D0,BONUS3_NORMA(A5)
  78. BSR BONUS3_NORMA_WRITE
  79. MOVE.B #30H,STAGE_TIME(A5)
  80. MOVE.B SECOND_VALUE(A5),STAGE_TIME+1(A5)
  81. JSR GAME_TIME_DISP
  82. MOVE.W #0,COLOR_BUFFER+1FFEH(A5)
  83. COLOR_COMMAND
  84. PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
  85. PALETTE 020H,28H,PG_SET+FADE_IN+CC_SPEED3
  86. PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
  87. PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
  88. PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
  89. PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
  90. PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
  91. PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
  92. PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
  93. PALETTE 0F0H,29H,PG_SET+FADE_IN+CC_SPEED3
  94. PALETTE 0FFH,00H,BASE_COLOR
  95. PALETTE_END
  96. LEA.L HERO1(A5),A6
  97. LEA.L HERO2(A5),A0
  98. TST.W STORY_PLAYER(A5)
  99. BEQ.S INIT_BONUS3_1
  100. EXG.L A0,A6
  101. INIT_BONUS3_1:
  102. MOVE.W #60H,X_POSITION(A6)
  103. MOVE.W #280H,X_POSITION(A0)
  104. JSR HERO_1st
  105. MOVE.W #70H,Y_POSITION(A6)
  106. MOVE.W #70H,Y_POSITION(A4)
  107. BCLR.B #0,ACT_ATTR(A4)
  108. MOVE.W #190,BACK2+BIG_X(A5) Blim
  109. MOVE.W #0,BACK2+Wx(A5)
  110. MOVE.W #200H,BACK2+WxRIGHT(A5)
  111. MOVE.W #28H,BACK2+Wy(A5)
  112. CLR.L BACK2+Z_POSITION(A5)
  113. LEA.L GAME_OBJ_MAP(PC),A0
  114. JSR.S OBJ_MAP_SET
  115. LEA.L MLWORK1(A5),A6
  116. CLR.L WINDOW_X(A5)
  117. CLR.L WINDOW_Y(A5)
  118. PCHILD WORK_N0,P_EASY,C_BONUS3_BACK,0,0,1,0
  119. PCHILD WORK_N1,P_MATO,C_MATO,110H,2FH,2,0
  120. CLR.W AY(A0)
  121. MOVE.B #1,BONUS_STATE_ON(A5)
  122. RTS
  123. BONUS3_1:
  124. PAL_WAIT 0FFH
  125. MOVE.W #0,FLAME_COUNT(A5)
  126. MOVE.W #3,FLAME_END(A5)
  127. MOVE.W #0,FLAME_TYPE(A5)
  128. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  129. SEC_TIMER_SET 2,WORD_TIMER
  130. END_NEXT 2,BONUS3_2
  131. BONUS3_2:
  132. SEC_TIMER WORD_TIMER
  133. JSR.S FLAME_WRITE
  134. NEXT_CHECK BEQ,3,BONUS3_3
  135. MOVE.W #76*3,D0
  136. JSR.S LANG_SET
  137. RTS
  138. BONUS3_3:
  139. SEC_TIMER WORD_TIMER
  140. NEXT_CHECK BCS,4,BONUS3_5
  141. ; MOVE.W #0,FLAME_END(A5)
  142. ; RTS
  143. BONUS3_4:
  144. ; JSR.S FLAME_CLR
  145. ; NEXT_CHECK BEQ,5,BONUS3_5
  146. MOVE.W #2,D0
  147. JSR.S MESS_SET
  148. JSR START_MAKE(PC)
  149. RTS
  150. BONUS3_5:
  151. JSR STAGE_TIME_DEC(PC)
  152. TST.B STAGE_TIME(A5)
  153. BEQ BONUS3_TIME_OVER
  154. JSR LEVER_SET_GAME(PC)
  155. LEA.L HERO1(A5),A6
  156. TST.W STORY_PLAYER(A5)
  157. BEQ.S BONUS3_5_1
  158. LEA.L HERO2(A5),A6
  159. BONUS3_5_1:
  160. MOVE.W PLAY_LEVER+PLAYER_OFFSET(A6),PLAY_LEVER(A6)
  161. MOVE.B PLAY_LEVER+2+PLAYER_OFFSET(A6),PLAY_LEVER+2(A6)
  162. JSR LM_HERO
  163. MOVE.L X_POSITION(A4),D0
  164. ADD.L VX(A4),D0
  165. SWAP D0
  166. CMP.W #40H,D0
  167. BLE B3_PN
  168. CMP.W #100H,D0
  169. BLE B3_PN_1
  170. B3_PN:
  171. CLR.L VX(A4)
  172. B3_PN_1:
  173. LEA.L (A6),A3
  174. LEA.L MLWORK1(A5),A6
  175. MOVEP.W TAMA_No(A3),D0
  176. CLR.B D0
  177. LEA.L 0(A5,D0.W),A0
  178. CMP.W #P_SP2,TYPE(A0)
  179. BNE.S B3_NEXT
  180. TST.B HIT_FLAG(A0)
  181. BMI.S B3_NEXT
  182. TST.W ACT_No(A0)
  183. BPL.S B3_NEXT
  184. CMP.W #108H,REL_X(A0)
  185. BLT.S B3_NEXT
  186. JSR B3_HIT(PC)
  187. B3_NEXT:
  188. RTS
  189. BONUS3_TIME_OVER:
  190. MOVE.B #00100000B,BONUS_DI(A5)
  191. END_NEXT 61,BONUS3_61
  192. BONUS3_61:
  193. JSR B3_HERO_STOP(PC)
  194. NEXT_CHECK BEQ,71,BONUS3_71
  195. MOVE.W #3,FLAME_COUNT(A5)
  196. MOVE.W #0,FLAME_END(A5)
  197. MOVE.W #0,FLAME_TYPE(A5)
  198. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  199. LEA.L (A0),A6
  200. MOVE.W #CTRL_LOS,D4
  201. JSR CTRL_CHANGE
  202. LEA.L MLWORK1(A5),A6
  203. MOVE.W #71H,D0
  204. JSR.S MESS_SET
  205. RTS
  206. BONUS3_6:
  207. JSR B3_HERO_STOP(PC)
  208. NEXT_CHECK BEQ,7,BONUS3_7
  209. MOVE.W #3,FLAME_COUNT(A5)
  210. MOVE.W #0,FLAME_END(A5)
  211. MOVE.W #0,FLAME_TYPE(A5)
  212. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  213. LEA.L (A0),A6
  214. MOVE.W #CTRL_WIN,D4
  215. JSR CTRL_CHANGE
  216. LEA.L MLWORK1(A5),A6
  217. MOVE.W #70H,D0
  218. JSR.S MESS_SET
  219. RTS
  220. BONUS3_71:
  221. BONUS3_7:
  222. JSR B3_HERO_STOP(PC)
  223. JSR.S FLAME_CLR
  224. NEXT_CHECK BEQ,7,BONUS3_701
  225. SEC_TIMER_SET 2,WORD_TIMER
  226. RTS
  227. BONUS3_701:
  228. JSR B3_HERO_STOP(PC)
  229. SEC_TIMER WORD_TIMER
  230. NEXT_CHECK BCS,8,BONUS3_8
  231. MOVE.W #72H,D0
  232. JSR.S MESS_SET
  233. BONUS3_8:
  234. MOVE.W BONUS3_USE(A5),D0
  235. MULU #1000,D0
  236. MOVE.L D0,SCORE_TOTAL(A5)
  237. AFTER_BONUS_0:
  238. MOVE.L SCORE_TOTAL(A5),D1
  239. BEQ AFTER_NO_BONUS_0
  240. MOVE.W #96H,D0
  241. JSR.S NUMBER_MESS
  242. MOVE.B #40,BYTE_TIMER(A6)
  243. END_NEXT 1,AFTER_BONUS_1
  244. AFTER_BONUS_1:
  245. JSR.S ACTIVE_TRIGER
  246. BTST.L #B_A_BUTTON,D2
  247. BNE.S AFTER_BONUS_1_1
  248. SUBQ.B #1,BYTE_TIMER(A6)
  249. BEQ.S AFTER_BONUS_1_1
  250. RTS
  251. AFTER_BONUS_1_1:
  252. AB1_1_2:
  253. MOVE.L #10000,D0
  254. MOVE.L #10000H,D3
  255. MOVE.L SCORE_TOTAL(A5),D1
  256. CMP.L D0,D1
  257. BHI TW1_2
  258. MOVE.L #1000,D0
  259. MOVE.L #1000H,D3
  260. CMP.L D0,D1
  261. BHI TW1_2
  262. MOVE.L #100,D0
  263. MOVE.L #100H,D3
  264. CMP.L D0,D1
  265. BHI TW1_2
  266. MOVE.L #10,D0
  267. MOVE.L #10H,D3
  268. CMP.L D0,D1
  269. BHI TW1_2
  270. MOVE.L #1,D0
  271. MOVE.L #1,D3
  272. TW1_2:
  273. MOVE.L D3,REG_D0(A5)
  274. SUB.L D0,D1
  275. MOVE.L D1,SCORE_TOTAL(A5)
  276. LEA.L HERO1(A5),A0
  277. TST.W STORY_PLAYER(A5)
  278. BEQ.S TW1_3
  279. LEA.L HERO2(A5),A0
  280. TW1_3:
  281. LEA.L HERO_SCORE+4(A0),A0
  282. LEA.L REG_D0+4(A5),A1
  283. SUB.W D0,D0
  284. ABCD.B -(A1),-(A0)
  285. ABCD.B -(A1),-(A0)
  286. ABCD.B -(A1),-(A0)
  287. ABCD.B -(A1),-(A0)
  288. TST.L D1
  289. BEQ.S TW1_4
  290. BTST.L #B_A_BUTTON,D2
  291. BNE AB1_1_2
  292. TW1_4:
  293. MOVE.W #96H,D0
  294. JSR.S NUMBER_MESS
  295. SOUND #S_COUNT
  296. MOVE.B #6,BYTE_TIMER(A6)
  297. TST.L SCORE_TOTAL(A5)
  298. BEQ SET_AFTER_BONUS_11
  299. RTS
  300. AFTER_NO_BONUS_0:
  301. MOVE.W #95H,D0
  302. JSR.S MESS_SET
  303. SEC_TIMER_SET 1,WORD_TIMER
  304. END_NEXT 10,AFTER_BONUS_10
  305. AFTER_BONUS_10:
  306. JSR.S ACTIVE_TRIGER
  307. BTST.L #B_A_BUTTON,D2
  308. BNE.S SET_AFTER_BONUS_11
  309. SEC_TIMER WORD_TIMER
  310. NEXT_CHECK BCS,11,AFTER_BONUS_11
  311. MOVE.W #0,FLAME_COUNT(A5)
  312. MOVE.W #3,FLAME_END(A5)
  313. MOVE.W #0,FLAME_TYPE(A5)
  314. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  315. RTS
  316. AFTER_BONUS_11:
  317. JSR.S FLAME_WRITE
  318. NEXT_CHECK BEQ,12,AFTER_BONUS_12
  319. MOVE.W BONUS_No(A5),D3
  320. BTST.B #0,BONUS_WIN(A5)
  321. BNE.S AB11_1
  322. MOVEQ.L #3,D3
  323. AB11_1:
  324. ADD.W D3,D3
  325. LEA.L HERO1(A5),A0
  326. TST.W STORY_PLAYER(A5)
  327. BEQ.S AB11_2
  328. LEA.L HERO2(A5),A0
  329. AB11_2:
  330. ADD.W HERO_TYPE(A0),D3
  331. ADD.W D3,D3
  332. ADD.W D3,D3
  333. MOVE.W AF_MESS(PC,D3.W),D0
  334. JSR.S LANG_SET
  335. MOVE.W AF_MESS+2(PC,D3.W),D0
  336. JSR.S LANG_SET
  337. SEC_TIMER_SET 2,WORD_TIMER
  338. RTS
  339. AF_MESS:
  340. DC.W 77*3,79*3,94*3,79*3
  341. DC.W 78*3,79*3,95*3,79*3
  342. DC.W 80*3,81*3,96*3,81*3
  343. DC.W 82*3,84*3,83*3,84*3
  344. AFTER_BONUS_12:
  345. JSR.S ACTIVE_TRIGER
  346. BTST.L #B_A_BUTTON,D2
  347. BNE.S SPA_MESS_0
  348. SEC_TIMER WORD_TIMER
  349. BCS.S SPA_MESS_0
  350. RTS
  351. SPA_MESS_0:
  352. BTST.B #1,BONUS_WIN(A5)
  353. BEQ BONUS_END
  354. JSR.S PWORK_INIT
  355. JSR.S LWORK_DEAD
  356. LEA.L HERO1(A5),A6
  357. LEA.L HERO2(A5),A0
  358. TST.W STORY_PLAYER(A5)
  359. BEQ.S SPA_MESS_000
  360. EXG.L A0,A6
  361. SPA_MESS_000:
  362. MOVE.W HERO_TYPE(A6),BONUS_HERO(A5)
  363. MOVE.W #160,X_POSITION(A6)
  364. MOVE.W #280H,X_POSITION(A0)
  365. JSR HERO_1st
  366. MOVE.W #0100H,BACK2+BIG_X(A5) Blim
  367. MOVE.W #0,BACK2+Wx(A5)
  368. MOVE.W #320,BACK2+WxRIGHT(A5)
  369. MOVE.W #10H,BACK2+Wy(A5)
  370. CLR.L BACK2+Z_POSITION(A5)
  371. LEA.L MLWORK1(A5),A6
  372. LEA.L DEMO_OBJ_MAP(PC),A0
  373. JSR.S OBJ_MAP_SET
  374. COLOR_COMMAND
  375. PALETTE 000H,00H,PG_SET+BASE_COLOR
  376. PALETTE 080H,20H,PG_SET+BASE_COLOR
  377. PALETTE 090H,21H,PG_SET+BASE_COLOR
  378. PALETTE 0D0H,25H,PG_SET+BASE_COLOR
  379. PALETTE 0E0H,26H,PG_SET+BASE_COLOR
  380. PALETTE 0F0H,27H,PG_SET+BASE_COLOR
  381. PALETTE_END
  382. MOVE.W #31H,D0
  383. JSR.S MESS_SET
  384. MOVE.W #2,FLAME_COUNT(A5)
  385. MOVE.W #0,FLAME_TYPE(A5)
  386. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  387. JSR.S FLAME_WRITED
  388. JSR SPA_MESS_SET
  389. MOVE.W #60,WORD_TIMER(A6)
  390. END_NEXT 1,SPA_MESS_1
  391. SPA_MESS_1:
  392. BSR SPA_MESS_CUT
  393. BSR BONUS_HERO_DISP
  394. CLR.L VX(A0)
  395. CLR.L VX(A4)
  396. SUBQ.W #1,WORD_TIMER(A6)
  397. NEXT_CHECK BEQ,2,SPA_MESS_2
  398. LEA.L (A0),A6
  399. MOVE.W HOW_SPA_No(A5),D0
  400. ADD.W D0,D0
  401. MOVE.W BONUS_CTRL(PC,D0.W),D4
  402. JSR CTRL_CHANGE
  403. LEA.L MLWORK1(A5),A6
  404. MOVE.W #65,WORD_TIMER(A6)
  405. RTS
  406. BONUS_CTRL:
  407. DC.W 40H,41H,42H
  408. SPA_MESS_2:
  409. BSR SPA_MESS_CUT
  410. BSR BONUS_HERO_DISP
  411. CLR.L VX(A0)
  412. CLR.L VX(A4)
  413. SUBQ.W #1,WORD_TIMER(A6)
  414. NEXT_CHECK BEQ,3,SPA_MESS_3
  415. BTST.B #6,ACT_No(A4)
  416. BEQ.S SPA_MESS_2_1
  417. MOVE.L ADRS1(A4),A1
  418. MOVE.W (A1)+,HERO_ACT_No(A0)
  419. MOVE.L A1,ADRS1(A4)
  420. MOVE.B #-1,MASTER_REQUEST(A4)
  421. CMP.W #2,HOW_SPA_No(A5)
  422. BNE.S SPA_MESS_2_1
  423. SOUND #S_100RETU
  424. SPA_MESS_2_1:
  425. RTS
  426. SPA_MESS_3:
  427. BSR SPA_MESS_CUT
  428. JSR B3_HERO_STOP(PC)
  429. NEXT_CHECK BEQ,4,SPA_MESS_4
  430. MOVE.W #120,WORD_TIMER(A6)
  431. RTS
  432. SPA_MESS_4:
  433. SUBQ.W #1,WORD_TIMER(A6)
  434. BEQ.S BONUS_END
  435. RTS
  436. BONUS_END:
  437. ADDQ.W #1,STORY_STAGE(A5)
  438. MOVE.W #0,ROUND_No(A5)
  439. MOVE.W #0,SUB_STEP(A5)
  440. MOVE.B #01110000B,D0
  441. AND.B PHASE+1(A5),D0
  442. OR.B #10000111B,D0
  443. MOVE.B D0,PHASE+1(A5)
  444. RTS
  445. SPA_MESS_CUT:
  446. JSR.S ACTIVE_TRIGER
  447. BTST.L #B_A_BUTTON,D2
  448. BNE.S SMC_1
  449. RTS
  450. SMC_1:
  451. ADDQ.L #4,SP
  452. MOVE.W #6FH*2,D0 100RETU_STOP
  453. JSR.S SET_SOUND
  454. JMP BONUS_END(PC)
  455. SPA_MESS_RND:
  456. DC.B 0,0,0,0,0,0
  457. DC.B 1,1,1,1,1
  458. DC.B 2,2,2,2,2
  459. SPA_MESS_SET:
  460. JSR.S RAND8
  461. AND.W #00001111B,D0
  462. MOVE.B SPA_MESS_RND(PC,D0.W),D0
  463. MOVE.W D0,HOW_SPA_No(A5)
  464. ADD.W D0,D0
  465. ADD.W BONUS_HERO(A5),D0
  466. ADD.W D0,D0
  467. ADD.W D0,D0
  468. MOVE.L CONT_SPAD(PC,D0.W),A2
  469. SPA_MESS_SET_1:
  470. MOVE.W (A2)+,D0
  471. BEQ.S SPA_MESS_SET_2
  472. JSR.S LANG_SET
  473. BRA.S SPA_MESS_SET_1
  474. SPA_MESS_SET_2:
  475. RTS
  476. CONT_SPAD:
  477. DC.L SPA1_P1,SPA1_P2
  478. DC.L SPA3,SPA3
  479. DC.L SPA2_P1,SPA2_P2
  480. SPA1_P1 DC.W 85*3,86*3,0
  481. SPA1_P2 DC.W 85*3,87*3,0
  482. SPA2_P1 DC.W 88*3,89*3,0
  483. SPA2_P2 DC.W 88*3,90*3,0
  484. SPA3 DC.W 91*3,0
  485. BONUS_HERO_DISP:
  486. LEA.L HERO1(A5),A6
  487. TST.W STORY_PLAYER(A5)
  488. BEQ.S B3_HERO_STOP_1
  489. LEA.L HERO2(A5),A6
  490. B3_HERO_STOP_1:
  491. CLR.W PLAY_LEVER(A6)
  492. CLR.B PLAY_LEVER+2(A6)
  493. JSR LM_HERO
  494. BSET.B #ACTAT_SET,ACT_ATTR(A4)
  495. LEA.L (A6),A0
  496. LEA.L MLWORK1(A5),A6
  497. RTS
  498. B3_HERO_STOP:
  499. BSR BONUS_HERO_DISP
  500. MOVE.L X_POSITION(A4),D0
  501. ADD.L VX(A4),D0
  502. SWAP D0
  503. CMP.W #40H,D0
  504. BLE B3_PNS
  505. CMP.W #100H,D0
  506. BLE B3_PNS_1
  507. B3_PNS:
  508. CLR.L VX(A4)
  509. B3_PNS_1:
  510. CMP.B #HERO_STOP_STEP,STEP1(A0)
  511. RTS
  512. B3_HIT:
  513. OR.B #80H,HIT_FLAG(A0)
  514. AND.W #7FFFH,ACT_No(A0)
  515. ADDQ.W #1,BONUS3_USE(A5)
  516. SUBQ.W #1,BONUS3_NORMA(A5)
  517. BSR BONUS3_NORMA_WRITE
  518. CMP.W #1,BONUS3_NORMA(A5)
  519. BNE.S B3_HIT_00
  520. MOVE.B #2,BONUS_WIN(A5)
  521. B3_HIT_00:
  522. SUB_WORK WORK_N1,A0,0
  523. TST.W BONUS3_NORMA(A5)
  524. BEQ B3_NORMA_END
  525. SOUND #S_BIYON
  526. MOVE.B #1,ACT_DEC(A0)
  527. MOVE.B #0,ACT_COUNT(A0)
  528. MOVE.B #-1,ACT_TIMER(A0)
  529. RTS
  530. B3_NORMA_END:
  531. MOVE.B #1,HAOH_USE(A5)
  532. MOVE.B #0FFH,BONUS_WIN(A5)
  533. MOVE.W #C_MATOB,ACT_No(A0)
  534. MOVE.B #1,ACT_DEC(A0)
  535. MOVE.B #-1,ACT_COUNT(A0)
  536. MOVE.B #-1,ACT_TIMER(A0)
  537. MOVE.B #00100000B,BONUS_DI(A5)
  538. STEP_SAVE 6,BONUS3_6
  539. RTS
  540. BONUS3_NORMA_WRITE:
  541. MOVE.W #92*3,D0
  542. JSR.S LANG_SET
  543. MOVE.W BONUS3_NORMA(A5),D0
  544. ADD.W #34H,D0
  545. JSR.S MESS_SET
  546. RTS
  547. BONUS3_NORMA_GET:
  548. MOVE.W LEVEL_TEMP(A5),D0
  549. MOVE.B B3ND(PC,D0.W),D0
  550. RTS
  551. B3ND:
  552. DC.B 5,5,6,6,7,7,8,9
  553. PM_MATO:
  554. JSR MATO_SUB(PC)
  555. JSR.S GET_REL_POS
  556. JSR.S NEXT_ACTION
  557. JSR.S SORT_SET
  558. BCLR.B #7,ACT_FLAG(A6)
  559. BNE.S MATOB_MAKE
  560. RTS
  561. MATOB_MAKE:
  562. SOUND #S_H_KOWASU
  563. PCHILD WORK_N0,P_MATO,C_MATOB,110H,2FH+60H,3,0
  564. MOVE.B #0,ACT_COUNT(A0)
  565. MOVE.W #5,VX(A0)
  566. MOVE.W #5,VY(A0)
  567. PCHILD WORK_N0,P_MATO,C_MATOB,110H+10H,2FH+50H,4,0
  568. MOVE.B #1,ACT_COUNT(A0)
  569. MOVE.W #5,VX(A0)
  570. MOVE.W #0,VY(A0)
  571. PCHILD WORK_N0,P_MATO,C_MATOB,110H,2FH+30H,5,0
  572. MOVE.B #2,ACT_COUNT(A0)
  573. MOVE.W #5,VX(A0)
  574. MOVE.W #-1,VY(A0)
  575. PCHILD WORK_N0,P_MATO,C_MATOB,110H+20H,2FH+60H,6,0
  576. MOVE.B #3,ACT_COUNT(A0)
  577. MOVE.W #3,VX(A0)
  578. MOVE.W #6,VY(A0)
  579. PCHILD WORK_N0,P_MATO,C_MATOB,110H+20H,2FH+40H,7,0
  580. MOVE.B #3,ACT_COUNT(A0)
  581. MOVE.W #4,VX(A0)
  582. MOVE.W #5,VY(A0)
  583. RTS
  584. MATO_SUB:
  585. MOVE.W VX(A6),D0
  586. ADD.W X_POSITION(A6),D0
  587. CMP.W #-100,D0
  588. BLE MATO_END
  589. CMP.W #320+100,D0
  590. BGE MATO_END
  591. MOVE.W D0,X_POSITION(A6)
  592. MOVE.L VY(A6),D0
  593. ADD.L Y_POSITION(A6),D0
  594. CMP.L #-800000H,D0
  595. BLE MATO_END
  596. MOVE.L D0,Y_POSITION(A6)
  597. RTS
  598. MATO_END:
  599. CLR.W TYPE(A6)
  600. ADDQ.L #4,SP
  601. RTS
  602. INIT_BONUS_STG:
  603. CLR.B BONUS_DI(A5)
  604. CLR.B BONUS_STATE_ON(A5)
  605. CLR.B BONUS_WIN(A5)
  606. MOVE.L #1,HERO1+HERO_SCORE_D(A5)
  607. MOVE.L #1,HERO2+HERO_SCORE_D(A5)
  608. AND.B #01111111B,PHASE+1(A5)
  609. MOVE.B #1,IN_BONUS(A5)
  610. LEA.L MLWORK1(A5),A6
  611. MOVE.W #3,BONUS_No(A5)
  612. MOVE.W #0H,COLOR_BUFFER+1FFEH(A5)
  613. COLOR_COMMAND
  614. PALETTE 000H,00H,PG_SET+BASE_COLOR
  615. PALETTE 080H,20H,PG_SET+BASE_COLOR
  616. PALETTE 0D0H,25H,PG_SET+BASE_COLOR
  617. PALETTE 0E0H,26H,PG_SET+BASE_COLOR
  618. PALETTE 0FFH,00H,BASE_COLOR
  619. PALETTE_END
  620. OBJ_MAP DEMO_OBJ_MAP
  621. CLR.L WINDOW_X(A5)
  622. CLR.L WINDOW_Y(A5)
  623. MOVE.W #31H,D0
  624. JSR.S MESS_SET
  625. MOVE.W #S_BGM_STOP,D0
  626. JSR.S SET_BGM
  627. STEP_SAVE 0,BONUS_SEL_0
  628. RTS
  629. BONUS_SEL_0:
  630. PAL_WAIT 0FFH
  631. MOVE.W #33H,D0
  632. JSR.S MESS_SET
  633. SOUND #S_BONUSGAME
  634. MOVE.W #S_BONUSME,D0
  635. JSR.S SET_BGM
  636. SEC_TIMER_SET 1,WORD_TIMER
  637. END_NEXT 1,BONUS_SEL_1
  638. BONUS_SEL_1:
  639. SEC_TIMER WORD_TIMER
  640. NEXT_CHECK BCS,2,BONUS_SEL_2
  641. SEC_TIMER_SET 9,WORD_TIMER
  642. MOVE.W #S_BONUS,D0
  643. JSR.S SET_BGM
  644. PCHILD WORK_N0,P_EASY,C_BONUS_SEL,20H,0B8H,1,0
  645. PCHILD WORK_N1,P_EASY,C_BONUS_SEL,78H,0B8H,1,0
  646. MOVE.B #0,ACT_COUNT(A0)
  647. PCHILD WORK_N2,P_EASY,C_BONUS_SEL,0D0H,0B8H,1,0
  648. MOVE.B #1,ACT_COUNT(A0)
  649. MOVE.W #31H,D0
  650. JSR.S MESS_SET
  651. MOVE.W #64H,D0
  652. JSR.S MESS_SET
  653. MOVE.W #6BH,D0
  654. JSR.S MESS_SET
  655. TST.B HAOH_USE(A5)
  656. BEQ.S BONUS_SEL_101
  657. MOVE.W #6DH,D0
  658. JSR.S MESS_SET
  659. BONUS_SEL_101:
  660. BSR BONUS_SEL_MESS
  661. MOVE.W BONUS_No(A5),D0
  662. JSR BONUS_CURSOR_WR(PC)
  663. RTS
  664. BONUS_SEL_2:
  665. MOVE.W #6BH,D0
  666. JSR.S MESS_SET
  667. SEC_TIMER WORD_TIMER
  668. TST.B WORD_TIMER(A6)
  669. BEQ BONUS_SEL_END
  670. CMP.B #6,WORD_TIMER(A6)
  671. BNE.S BSEL_202
  672. CMP.W #3,BONUS_No(A5)
  673. BNE.S BSEL_202
  674. MOVE.W #0,BONUS_No(A5)
  675. BSR BONUS_SEL_MESS
  676. BSEL_202:
  677. JSR.S ACTIVE_TRIGER
  678. BTST.L #B_A_BUTTON,D2
  679. BNE BONUS_SEL_END
  680. AND.W #00001100B,D2
  681. ADD.W BONUS_No(A5),D2
  682. ADD.W D2,D2
  683. TST.B HAOH_USE(A5)
  684. BEQ.S BONUS_SEL_200
  685. ADD.W #32,D2
  686. BONUS_SEL_200:
  687. MOVE.W BONUS_SEL_MOVE(PC,D2.W),D4
  688. BMI BONUS_SEL_BLINK
  689. MOVE.W BONUS_No(A5),D0
  690. BSR BONUS_CURSOR_CL
  691. MOVE.W D4,D0
  692. MOVE.W D4,BONUS_No(A5)
  693. BSR BONUS_CURSOR_WR
  694. BSR BONUS_SEL_MESS
  695. SOUND #S_SENTAKU
  696. BONUS_SEL_201:
  697. RTS
  698. BONUS_SEL_MOVE:
  699. DC.W -1,-1,-1,-1
  700. DC.W -1,00,01,-1
  701. DC.W 01,02,-1,01
  702. DC.W -1,-1,-1,-1
  703. DC.W -1,-1,-1,-1
  704. DC.W -1,00,01,-1
  705. DC.W 01,-1,-1,01
  706. DC.W -1,-1,-1,-1
  707. BONUS_SEL_END:
  708. SOUND #S_KETTEI
  709. MOVE.W BONUS_No(A5),D0
  710. BSR BONUS_CURSOR_WR
  711. CMP.W #3,BONUS_No(A5)
  712. BNE.S BONUS_SEL_END_1
  713. MOVE.W #0,BONUS_No(A5)
  714. BSR BONUS_SEL_MESS
  715. BONUS_SEL_END_1:
  716. MOVE.B #90,BYTE_TIMER(A6)
  717. END_NEXT 3,BONUS_SEL_3
  718. BONUS_SEL_3:
  719. SUBQ.B #1,BYTE_TIMER(A6)
  720. BNE.S BONUS_SEL_301
  721. MOVE.W #31H,D0
  722. JSR.S MESS_SET
  723. SUB_WORK WORK_N0,A0,0
  724. CLR.W TYPE(A0)
  725. SUB_WORK WORK_N1,A0,0
  726. CLR.W TYPE(A0)
  727. SUB_WORK WORK_N2,A0,0
  728. CLR.W TYPE(A0)
  729. MOVE.W #S_BGM_STOP,D0
  730. JSR.S SET_BGM
  731. JSR INIT_BONUS_STG0(PC)
  732. BONUS_SEL_301:
  733. RTS
  734. BONUS_SEL_BLINK:
  735. MOVE.W BONUS_No(A5),D0
  736. MOVEQ.L #00000011B,D1
  737. AND.B MAIN_COUNT+3(A5),D1
  738. BEQ.S BONUS_CURSOR_CL
  739. BONUS_CURSOR_WR:
  740. ADD.W #65H,D0
  741. JSR.S MESS_SET
  742. MOVE.W #69H,D0
  743. JSR.S MESS_SET
  744. RTS
  745. BONUS_CURSOR_CL:
  746. ADD.W #65H,D0
  747. JSR.S MESS_SET
  748. MOVE.W #6AH,D0
  749. JSR.S MESS_SET
  750. RTS
  751. BONUS_SEL_MESS:
  752. MOVE.W #2,FLAME_COUNT(A5)
  753. MOVE.W #0,FLAME_TYPE(A5)
  754. MOVE.W #7000H+20H*3+24,FLAME_POS(A5)
  755. JSR.S FLAME_WRITED
  756. MOVE.W BONUS_No(A5),D0
  757. ADD.W D0,D0
  758. MOVE.W BONUS_SEL_MD(PC,D0.W),D0
  759. JSR.S LANG_SET
  760. CMP.W #2,BONUS_No(A5)
  761. BNE BONUS_SEL_MESS_1
  762. BSR BONUS3_NORMA_GET
  763. ADD.W #34H,D0
  764. JSR.S MESS_SET
  765. BONUS_SEL_MESS_1:
  766. RTS
  767. BONUS_SEL_MD:
  768. DC.W 71*3,73*3,75*3,70*3
  769. INCLUDE WORK.INC
  770.