Advertisement
Guest User

JumpmanBLU20130902_2.bas

a guest
Sep 3rd, 2013
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.19 KB | None | 0 0
  1. rem batari Basic Program
  2. rem started 12/22/2011 9:06:04 PM by Visual bB Version 1.0.0.565
  3. rem *****************************************************
  4. bank 1
  5. temp1 = temp1
  6.  
  7. set tv ntsc
  8. set kernel DPC+
  9. set smartbranching on
  10. set optimization inlinerand
  11. const font=tiny
  12.  
  13. goto MAIN bank2
  14.  
  15. rem *****************************************************
  16. bank 2
  17. rem *****************************************************
  18. temp1 = temp1
  19.  
  20. MAIN
  21.  
  22. dim xp= a.b
  23. dim yp=c.d
  24. dim bar2y = i.j
  25. dim direc = k
  26. dim print_row = l
  27. dim current_col = m
  28. dim current_bit = n
  29. dim current_byte = o
  30. dim ds_index = p
  31. dim byte_ptr = q
  32. dim lo_pointer = r
  33. dim current_row = s
  34. dim duration = y
  35. u = 0
  36. f = 0
  37. dim grav=v.w
  38. player0y = 176 : player1y = 176
  39. dim flag=z
  40. dim C0_Duration = l
  41. dim C0_Counter = m
  42. dim C1_Duration = n
  43. dim C1_Counter = o
  44. dim BitOp_C0 = p
  45. dim BitOp_C1 = q
  46. dim BitOp0_C0_FireB = p
  47. dim BitOp0_C1_JoyU = q
  48. dim BitOp1_C1_JoyD = q
  49. dim BitOp2_C1_JoyL = q
  50. dim BitOp3_C1_JoyR = q
  51. dim BitOp4_C1_JoyU = q
  52. dim BitOp_Allpurpose_01 = y
  53. dim BitOp0_Debounce_Reset = t
  54. duration = 1
  55. x = 0: z = 0
  56. dim sc1 = score
  57. dim sc2 = score+1
  58. dim sc3 = score+2
  59. scorecolors:
  60. $08
  61. $96
  62. $98
  63. $96
  64. $98
  65. $96
  66. $98
  67. end
  68.  
  69.  
  70.  
  71. rem *** a variable to switch frames of the picture
  72. dim bmp_48x2_1_index = e
  73.  
  74. rem *** a variable to color each frame of the picture
  75. dim bmp_48x2_1_color = g
  76.  
  77. rem *** a frame counter
  78. dim frame = f
  79.  
  80. rem *** The selected game number. The game selection minikernel displays
  81. rem *** this variable
  82. dim gamenumber=h
  83.  
  84. rem *** this debounce variable is used to slow down the game number selection
  85. dim swdebounce=t
  86.  
  87. bkcolors:
  88. $00
  89. end
  90. goto MAIN4 bank4
  91.  
  92. rem *****************************************************
  93. bank 3
  94. rem *****************************************************
  95. temp1 = temp1
  96.  
  97. rem *****************************************************
  98. bank 4
  99. rem *****************************************************
  100. temp1 = temp1
  101.  
  102. MAIN4
  103.  
  104. rem * Volume off
  105. AUDV0=0 : AUDV1=0
  106.  
  107. player2y = 186 : player4y = 186 : player5y = 186 : player6y = 186 : player7y = 186 : player8y = 186 : player9y = 186
  108. player3x = 16
  109. player3y = 26
  110. h=1: direc = 1
  111. grav=35.0
  112. bar2y = 56.0
  113. xp = 17: yp = 156
  114.  
  115. pfcolors:
  116. $94
  117. $BA
  118. $BA
  119. $BA
  120. $BA
  121. $BA
  122. $BA
  123. $BA
  124. $BA
  125. $BA
  126. $BA
  127. $BA
  128. $BA
  129. $00
  130. $BE
  131. $96
  132. $92
  133. $92
  134. $24
  135. $24
  136. $24
  137. $24
  138. $24
  139. $24
  140. $24
  141. $24
  142. $24
  143. $24
  144. $24
  145. $00
  146. $24
  147. $BE
  148. $96
  149. $92
  150. $92
  151. $24
  152. $24
  153. $24
  154. $24
  155. $24
  156. $24
  157. $24
  158. $24
  159. $24
  160. $24
  161. $24
  162. $24
  163. $00
  164. $24
  165. $BE
  166. $96
  167. $92
  168. $92
  169. $24
  170. $24
  171. $24
  172. $24
  173. $24
  174. $24
  175. $24
  176. $24
  177. $24
  178. $24
  179. $24
  180. $00
  181. $24
  182. $BE
  183. $96
  184. $92
  185. $92
  186. $24
  187. $24
  188. $24
  189. $24
  190. $24
  191. $24
  192. $24
  193. $24
  194. $24
  195. $24
  196. $24
  197. $24
  198. $24
  199. $24
  200. $BE
  201. $96
  202. $92
  203. $92
  204. end
  205.  
  206. WritePF4
  207. print_row = 0: current_col = 0
  208. for ds_index = 0 to 3
  209. for byte_ptr = 0 to 175
  210. current_bit = $80
  211. on ds_index goto DCASE40 DCASE41 DCASE42 DCASE43
  212. DCASE40 current_byte = L4_0[byte_ptr] : goto BIT_LOOP4
  213. DCASE41 current_byte = L4_1[byte_ptr] : goto BIT_LOOP4
  214. DCASE42 current_byte = L4_2[byte_ptr] : goto BIT_LOOP4
  215. DCASE43 current_byte = L4_3[byte_ptr]
  216. BIT_LOOP4
  217. if current_byte & current_bit then pfpixel current_col print_row on else pfpixel current_col print_row off
  218. current_col = current_col + 1: current_col = current_col & $1F
  219. current_bit = current_bit / 2
  220. if current_bit then goto BIT_LOOP4
  221. if byte_ptr & $03 = 3 then print_row = print_row + 1
  222. next
  223. next
  224.  
  225. data L4_0
  226. %00000111,%11111111,%11111111,%00000000
  227. %00000000,%10000000,%00001000,%00000000
  228. %00000000,%00000000,%00000000,%00000000
  229. %00000000,%10000000,%00001000,%00000000
  230. %00000000,%00000000,%00000000,%00000000
  231. %00000000,%10000000,%00001000,%00000000
  232. %00000000,%00000000,%00000000,%00000000
  233. %00000000,%10000000,%00001000,%00000000
  234. %00000000,%00000000,%00000000,%00000000
  235. %00000000,%10000000,%00001000,%00000000
  236. %00000000,%00000000,%00000000,%00000000
  237. %00000000,%10000000,%00001000,%00000000
  238. %00000000,%00000000,%00000000,%00000000
  239. %00000000,%10000000,%00001000,%00000000
  240. %00000000,%00000000,%00000000,%00000000
  241. %00000000,%10000000,%00001000,%00000000
  242. %00000000,%00000000,%00000000,%00000000
  243. %00000000,%10000000,%00001000,%00000000
  244. %00000000,%00000000,%00000000,%00000000
  245. %00000000,%10000000,%00001000,%00000000
  246. %00000000,%00000000,%00000000,%00000000
  247. %00000000,%10000000,%00001000,%00000000
  248. %00000000,%00000000,%00000000,%00000000
  249. %00000000,%10000000,%00001000,%00000000
  250. %00000000,%00000000,%00000000,%00000000
  251. %00000000,%10000000,%00001000,%00000000
  252. %00000000,%00000000,%00000000,%00000000
  253. %00000000,%10000000,%00001000,%00000000
  254. %00001001,%00000000,%00000100,%10000000
  255. %00000000,%00000000,%00000000,%00000000
  256. %00000010,%00000000,%00000010,%00000000
  257. %00001111,%11111111,%11111111,%10000000
  258. %00001010,%10101010,%10101010,%10000000
  259. %00001010,%10101010,%10101010,%10000000
  260. %00001010,%10101010,%10101010,%10000000
  261. %00001111,%11111111,%11111111,%10000000
  262. %00000000,%00000000,%00000000,%00000000
  263. %00000000,%00000000,%00000000,%00000000
  264. %00001001,%00000000,%00000100,%10000000
  265. %00000000,%00000000,%00000000,%00000000
  266. %00000000,%00000000,%00000000,%00000000
  267. %00000000,%00000000,%00000000,%00000000
  268. %00001001,%00000000,%00000100,%10000000
  269. %00000000,%00000000,%00000000,%00000000
  270. end
  271. data L4_1
  272. %00000000,%00000000,%00000000,%00000000
  273. %00000000,%00000000,%00000000,%00000000
  274. %00001001,%00000000,%00000100,%10000000
  275. %00000000,%00000000,%00000000,%00000000
  276. %00000000,%00000000,%00000000,%00000000
  277. %00000000,%00000000,%00000000,%00000000
  278. %00001001,%00000000,%00000100,%10000000
  279. %00000000,%00000000,%00000000,%00000000
  280. %00000000,%00000000,%00000000,%00000000
  281. %00000000,%00000000,%00000000,%00000000
  282. %00001001,%00000000,%00000100,%10000000
  283. %00000000,%00000000,%00000000,%00000000
  284. %00000000,%00000000,%00000000,%00000000
  285. %00000000,%00000000,%00000000,%00000000
  286. %00001001,%00000000,%00000100,%10000000
  287. %00000000,%00000000,%00000000,%00000000
  288. %00010000,%00000010,%00000000,%01000000
  289. %00000000,%00000000,%00000000,%00000000
  290. %00001001,%00000000,%00000100,%10000000
  291. %00000000,%00000000,%00000000,%00000000
  292. %00000010,%00000000,%00000010,%00000000
  293. %00000010,%00000000,%00000010,%00000000
  294. %00011111,%11111111,%11111111,%11000000
  295. %00001010,%10101010,%10101010,%10000000
  296. %00001010,%10101010,%10101010,%10000000
  297. %00001010,%10101010,%10101010,%10000000
  298. %00011111,%11111111,%11111111,%11000000
  299. %00000000,%00000000,%00000000,%00000000
  300. %00000000,%00000000,%00000000,%00000000
  301. %00010000,%00000010,%00000000,%01000000
  302. %00000000,%00000000,%00000000,%00000000
  303. %00000000,%00000000,%00000000,%00000000
  304. %00000000,%00000000,%00000000,%00000000
  305. %00010000,%00000010,%00000000,%01000000
  306. %00000000,%00000000,%00000000,%00000000
  307. %00000000,%00000000,%00000000,%00000000
  308. %00000000,%00000000,%00000000,%00000000
  309. %00010000,%00000010,%00000000,%01000000
  310. %00000000,%00000000,%00000000,%00000000
  311. %00000000,%00000000,%00000000,%00000000
  312. %00000000,%00000000,%00000000,%00000000
  313. %00010000,%00000010,%00000000,%01000000
  314. %00000000,%00000000,%00000000,%00000000
  315. %00000000,%00000000,%00000000,%00000000
  316. end
  317. data L4_2
  318. %00000000,%00000000,%00000000,%00000000
  319. %00010000,%00000010,%00000000,%01000000
  320. %00000000,%00000000,%00000000,%00000000
  321. %00000000,%00000000,%00000000,%00000000
  322. %00000000,%00000000,%00000000,%00000000
  323. %00010000,%00000010,%00000000,%01000000
  324. %00000000,%00000000,%00000000,%00000000
  325. %00100000,%01000000,%00010000,%00100000
  326. %00000000,%00000000,%00000000,%00000000
  327. %00010000,%00000010,%00000000,%01000000
  328. %00000000,%00000000,%00000000,%00000000
  329. %00000000,%00000000,%00000000,%00000000
  330. %00000010,%00000000,%00000010,%00000000
  331. %00111111,%11111111,%11111111,%11100000
  332. %00101010,%10101010,%10101010,%10100000
  333. %00101010,%10101010,%10101010,%10100000
  334. %00101010,%10101010,%10101010,%10100000
  335. %00111111,%11111111,%11111111,%11100000
  336. %00000000,%00000000,%00000000,%00000000
  337. %00000000,%00000000,%00000000,%00000000
  338. %00100000,%01000000,%00010000,%00100000
  339. %00000000,%00000000,%00000000,%00000000
  340. %00000000,%00000000,%00000000,%00000000
  341. %00000000,%00000000,%00000000,%00000000
  342. %00100000,%01000000,%00010000,%00100000
  343. %00000000,%00000000,%00000000,%00000000
  344. %00000000,%00000000,%00000000,%00000000
  345. %00000000,%00000000,%00000000,%00000000
  346. %00100000,%01000000,%00010000,%00100000
  347. %00000000,%00000000,%00000000,%00000000
  348. %00000000,%00000000,%00000000,%00000000
  349. %00000000,%00000000,%00000000,%00000000
  350. %00100000,%01000000,%00010000,%00100000
  351. %00000000,%00000000,%00000000,%00000000
  352. %00000000,%00000000,%00000000,%00000000
  353. %00000000,%00000000,%00000000,%00000000
  354. %00100000,%01000000,%00010000,%00100000
  355. %00000000,%00000000,%00000000,%00000000
  356. %00000000,%00000000,%00000000,%00000000
  357. %00000000,%00000000,%00000000,%00000000
  358. %00100000,%01000000,%00010000,%00100000
  359. %00000000,%00000000,%00000000,%00000000
  360. %01000000,%00000010,%00000000,%00010000
  361. %00000000,%00000000,%00000000,%00000000
  362. end
  363. data L4_3
  364. %00100000,%01000000,%00010000,%00100000
  365. %00000000,%00000000,%00000000,%00000000
  366. %00000010,%00000000,%00000010,%00000000
  367. %00000010,%00000000,%00000010,%00000000
  368. %01111111,%11111111,%11111111,%11110000
  369. %00101010,%10101010,%10101010,%10100000
  370. %00101010,%10101010,%10101010,%10100000
  371. %00101010,%10101010,%10101010,%10100000
  372. %01111111,%11111111,%11111111,%11110000
  373. %00000000,%00000000,%00000000,%00000000
  374. %00000000,%00000000,%00000000,%00000000
  375. %01000000,%00000010,%00000000,%00010000
  376. %00000000,%00000000,%00000000,%00000000
  377. %00000000,%00000000,%00000000,%00000000
  378. %00000000,%00000000,%00000000,%00000000
  379. %01000000,%00000010,%00000000,%00010000
  380. %00000000,%00000000,%00000000,%00000000
  381. %00000000,%00000000,%00000000,%00000000
  382. %00000000,%00000000,%00000000,%00000000
  383. %01000000,%00000010,%00000000,%00010000
  384. %00000000,%00000000,%00000000,%00000000
  385. %00000000,%00000000,%00000000,%00000000
  386. %00000000,%00000000,%00000000,%00000000
  387. %01000000,%00000010,%00000000,%00010000
  388. %00000000,%00000000,%00000000,%00000000
  389. %00000000,%00000000,%00000000,%00000000
  390. %00000000,%00000000,%00000000,%00000000
  391. %01000000,%00000010,%00000000,%00010000
  392. %00000000,%00000000,%00000000,%00000000
  393. %00000000,%00000000,%00000000,%00000000
  394. %00000000,%00000000,%00000000,%00000000
  395. %01000000,%00000010,%00000000,%00010000
  396. %00000000,%00000000,%00000000,%00000000
  397. %00000000,%00000000,%00000000,%00000000
  398. %00000000,%00000000,%00000000,%00000000
  399. %01000000,%00000010,%00000000,%00010000
  400. %00000000,%00000000,%00000000,%00000000
  401. %00000000,%00000000,%00000000,%00000000
  402. %00000000,%00000000,%00000000,%00000000
  403. %11111111,%11111111,%11111111,%11111000
  404. %10101010,%10101010,%10101010,%10101000
  405. %10101010,%10101010,%10101010,%10101000
  406. %10101010,%10101010,%10101010,%10101000
  407. %11111111,%11111111,%11111111,%11111000
  408. %00000000,%00000000,%00000000,%00000000
  409. end
  410. rem Clear all
  411. C0_Duration=0: C0_Counter=0: C1_Duration=0: C1_Counter=0: BitOp_C0=0: BitOp_C1=0: BitOp_Allpurpose_01=0
  412. BitOp0_Debounce_Reset{0} = 1
  413.  
  414. Main_loop4
  415.  
  416. if joy0fire then pfvline 6 30 35 flip
  417.  
  418. ; REM Hammers and/or Breadsticks
  419. ; REM set missile 1 color with COLUM1
  420. COLUM1 = $2A
  421. NUSIZ3 = $00 ; missile 1 pixel wide $0x
  422. missile1height = 10: ballheight = 10
  423. if h{0} then missile1x = 24 : missile1y = 74: ballx= 71: bally=39
  424. if h{1} then missile1x = 71: missile1y = 39: ballx= 24: bally=74
  425.  
  426. Main_loop4_In
  427.  
  428. player3color:
  429. $26
  430. $28
  431. $2C
  432. $2A
  433. $2C
  434. $2A
  435. $28
  436. $2A
  437. $28
  438. $26
  439. $26
  440. end
  441.  
  442. FireL4_14
  443. player3:
  444. %01001100
  445. %10011110
  446. %00011110
  447. %10110100
  448. %11110100
  449. %11111110
  450. %11111110
  451. %11111110
  452. %01111110
  453. %01111100
  454. %00111000
  455.  
  456. end
  457.  
  458. if h{3} then player3:
  459. %00101100
  460. %01011110
  461. %00011110
  462. %01110100
  463. %01110100
  464. %01111110
  465. %01111111
  466. %01111111
  467. %00111111
  468. %00111110
  469. %00011100
  470. end
  471.  
  472. player0x = xp: player0y = yp
  473.  
  474. rem ****************************************************************
  475. rem *
  476. rem * Puts temp4 in the three score digits on the left side.
  477. rem *
  478. rem ````````````````````````````````````````````````````````````````
  479. rem ` Replace "player0x" with whatever you need to check.
  480. rem `
  481. temp4 = player0x
  482.  
  483. sc1 = 0 : sc2 = sc2 & 15
  484. if temp4 >= 100 then sc1 = sc1 + 16 : temp4 = temp4 - 100
  485. if temp4 >= 100 then sc1 = sc1 + 16 : temp4 = temp4 - 100
  486. if temp4 >= 50 then sc1 = sc1 + 5 : temp4 = temp4 - 50
  487. if temp4 >= 30 then sc1 = sc1 + 3 : temp4 = temp4 - 30
  488. if temp4 >= 20 then sc1 = sc1 + 2 : temp4 = temp4 - 20
  489. if temp4 >= 10 then sc1 = sc1 + 1 : temp4 = temp4 - 10
  490. sc2 = (temp4 * 4 * 4) | sc2
  491.  
  492.  
  493.  
  494. rem ****************************************************************
  495. rem *
  496. rem * Puts temp4 in the three score digits on the right side.
  497. rem *
  498. rem ````````````````````````````````````````````````````````````````
  499. rem ` Replace "player0y" with whatever you need to check.
  500. rem `
  501. temp4 = player0y
  502.  
  503. sc2 = sc2 & 240 : sc3 = 0
  504. if temp4 >= 100 then sc2 = sc2 + 1 : temp4 = temp4 - 100
  505. if temp4 >= 100 then sc2 = sc2 + 1 : temp4 = temp4 - 100
  506. if temp4 >= 50 then sc3 = sc3 + 80 : temp4 = temp4 - 50
  507. if temp4 >= 30 then sc3 = sc3 + 48 : temp4 = temp4 - 30
  508. if temp4 >= 20 then sc3 = sc3 + 32 : temp4 = temp4 - 20
  509. if temp4 >= 10 then sc3 = sc3 + 16 : temp4 = temp4 - 10
  510. sc3 = sc3 | temp4
  511.  
  512.  
  513. NUSIZ3 = $00: NUSIZ6 = $00
  514.  
  515.  
  516. player7x = 0: player7y = 44 ; Princess offscreen
  517.  
  518. rem if yp<22 then player7x = 40: player7y = 0
  519. rem
  520. NUSIZ8 = $05: NUSIZ9 = $05
  521. rem if joy0right then xp=xp+0.5 : REFP0 = 0
  522. rem if joy0left then xp=xp-0.5 : REFP0 = 8
  523. rem if xp < 30 && yp > 130 then xp = 30
  524. rem if xp > 100 && yp > 130 then xp = 100
  525. rem if joy0left then gosub Mario034
  526. rem if joy0right then gosub Mario034
  527. rem
  528.  
  529. rem bar2y = bar2y + grav
  530. grav = grav - 0.75
  531. grav = grav + direc
  532. player3x = grav
  533. player3y = bar2y
  534. if player3x > 122 then direc = 255: bar2y = bar2y + 35.0
  535. if player3x < 34 then direc = 1: bar2y = bar2y + 35.0
  536. if player3y > 154 then bar2y = 56
  537. h=h+1
  538.  
  539. NUSIZ8{3}=1
  540. if h{6} then goto mad4 else continue4
  541.  
  542. mad4
  543. player8x = player8x + 14
  544. NUSIZ8{3} = 0
  545. player9x = player9x - 18
  546. NUSIZ9{3} = 1
  547. continue4
  548.  
  549. rem if collision(playfield,player0) then yp=yp-0.1
  550.  
  551.  
  552. rem if collision(player1,playfield) then bar2y = bar2y - 1
  553. rem
  554.  
  555. rem if !collision(playfield,player3) then b3y=b3y-0.12
  556. rem if collision(playfield,player1) then b3y=b3y-0.12
  557. rem
  558.  
  559.  
  560.  
  561.  
  562.  
  563. player8-9color:
  564. $24
  565. $22
  566. $22
  567. $22
  568. $24
  569. $22
  570. $22
  571. $22
  572. $24
  573. $22
  574. $22
  575. $22
  576. $22
  577. $22
  578. $22
  579. $22
  580. $22
  581. $22
  582. $22
  583. $22
  584. $22
  585. $22
  586. $24
  587. $22
  588. $22
  589. $24
  590. $22
  591. $24
  592. $22
  593. $24
  594. end
  595.  
  596. KongMadBLU4
  597. player9:
  598. %10000100
  599. %11001110
  600. %11000111
  601. %00101011
  602. %10000011
  603. %01010111
  604. %11110111
  605. %10101110
  606. %01011100
  607. %11111110
  608. %01011110
  609. %00111110
  610. %11111100
  611. %11111100
  612. %00011000
  613. %11101000
  614. %11101000
  615. %10101000
  616. %11101000
  617. %00011000
  618. %10111100
  619. %01111100
  620. %10111100
  621. %11111100
  622. %01111000
  623. %01011000
  624. %00111100
  625. %00000000
  626. %00111100
  627. %00011110
  628. end
  629.  
  630.  
  631. KongMad24
  632. player8:
  633. %11000000
  634. %11100000
  635. %11100000
  636. %10010000
  637. %01000000
  638. %10101000
  639. %01111000
  640. %11010000
  641. %10101100
  642. %11111110
  643. %10101110
  644. %00011011
  645. %11110111
  646. %11100111
  647. %10001111
  648. %01111111
  649. %01101111
  650. %01001110
  651. %01110000
  652. %10001100
  653. %11011110
  654. %10111111
  655. %01011111
  656. %11111111
  657. %00101110
  658. %00011100
  659. %00011110
  660. %00001111
  661. %00000000
  662. %00000000
  663. end
  664. if joy0right then flag{0} = 1
  665. if joy0left then flag{0} = 0
  666. if flag{0} then REFP0 = 0
  667. if !flag{0} then REFP0 = 8
  668. if joy0right then xp=xp+0.25
  669. if joy0left then xp=xp-0.25
  670.  
  671. rem ________________________
  672. rem bottom L/R boundary
  673. if xp < 11 && yp > 121 then xp = 11
  674. if xp > 129 && yp > 121 then xp = 129
  675. if yp > 156 then yp = 156
  676. if yp = 122 && joy0left then yp = 121
  677. if yp = 122 && joy0right then yp = 121
  678. if yp = 87 && joy0left then yp = 86
  679. if yp = 87 && joy0right then yp = 86
  680. if yp = 52 && joy0left then yp = 51
  681. if yp = 52 && joy0right then yp = 51
  682.  
  683. if joy0up || joy0down then gosub checkladder
  684. if joy0right then gosub Mario034
  685. if joy0left then gosub Mario034
  686. if joy0fire then player0color:
  687. $42
  688. $42
  689. $4A
  690. $4A
  691. $4A
  692. $4A
  693. $4A
  694. $86
  695. $86
  696. $86
  697. $42
  698. $42
  699. $42
  700. end
  701.  
  702. if joy0fire then player0:
  703. %00111100
  704. %01111111
  705. %00001010
  706. %01011111
  707. %01011011
  708. %00110000
  709. %00011110
  710. %11101010
  711. %11111101
  712. %00011101
  713. %01111111
  714. %11110111
  715. %11000000
  716. end
  717.  
  718. DF0FRACINC = 255 : DF1FRACINC = 255 : DF2FRACINC = 255 : DF3FRACINC = 255 : DF4FRACINC = 255
  719. DF6FRACINC=0
  720.  
  721.  
  722. if BitOp_C1 then goto Skip_Walk4
  723. if joy0right then BitOp_C1 = 0 : C1_Duration = 1 : C1_Counter = 0 : BitOp3_C1_JoyR{3} = 1 : goto Skip_Walk4
  724. if joy0left then BitOp_C1 = 0 : C1_Duration = 1 : C1_Counter = 0 : BitOp2_C1_JoyL{2} = 1 : goto Skip_Walk4
  725. if joy0up then BitOp_C1 = 0 : C1_Duration = 1 : C1_Counter = 0 : BitOp4_C1_JoyU{4} = 1 : goto Skip_Walk4
  726.  
  727. Skip_Walk4
  728.  
  729. if BitOp_C0 then goto Skip_Ditty4
  730. if h > 0 then BitOp_C0 = 0 : C0_Duration = 1 : C0_Counter = 0 : BitOp0_C0_FireB{0} =1 : goto Skip_Ditty4
  731. Skip_Ditty4
  732. drawscreen
  733.  
  734. player0color:
  735. $42
  736. $42
  737. $4A
  738. $4A
  739. $4A
  740. $4A
  741. $4A
  742. $86
  743. $86
  744. $86
  745. $42
  746. $42
  747. $42
  748. $86
  749. $86
  750. end
  751.  
  752. player0:
  753. %01111000
  754. %11111110
  755. %00010100
  756. %10111110
  757. %10110110
  758. %01100000
  759. %00111100
  760. %01111000
  761. %01010100
  762. %01111100
  763. %10111100
  764. %11111100
  765. %11011000
  766. %11011100
  767. %11111100
  768. end
  769.  
  770. if joy0left then REFP0 = 8
  771. rem player7x = 40: player7y = 176
  772. player8x = 58
  773. player9x = 74
  774. player8y = 2: player9y = 2
  775.  
  776. NUSIZ8{3}=1
  777.  
  778. if !BitOp_C1 then goto SoundReturn4Ch1
  779. C1_Duration = C1_Duration - 1
  780. if C1_Duration > 0 then goto SoundReturn4Ch1
  781. if BitOp3_C1_JoyR{3} then goto GetWalk4
  782. if BitOp2_C1_JoyL{2} then goto GetWalk4
  783. if BitOp4_C1_JoyU{4} then goto GetWalk4
  784.  
  785.  
  786. SoundReturn4Ch1
  787.  
  788. if !BitOp_C0 then goto SoundReturn4Ch0
  789. C0_Duration = C0_Duration - 1
  790. if C0_Duration > 0 then goto SoundReturn4Ch0
  791. if BitOp0_C0_FireB{0} then goto GetDitty4
  792.  
  793. SoundReturn4Ch0
  794.  
  795. if !switchreset then BitOp0_Debounce_Reset{0} = 0: goto Skip_Main_Reset4
  796. if BitOp0_Debounce_Reset{0} then goto Skip_Main_Reset4
  797. reboot
  798.  
  799. Skip_Main_Reset4
  800.  
  801. rem if collision(playfield,player0) then gosub Climb4
  802. rem
  803. goto Main_loop4
  804.  
  805. checkladder
  806. if !collision(playfield,player0) then return thisbank ; Not touching ladder, fuggetaboutit
  807.  
  808. rem Climbing and X adjusting code. Thanks to bogax!
  809. for u = 0 to 3
  810. temp3 = yp - ydat[u]
  811. if joy0down then temp3 = temp3 + 1
  812. if temp3 >= 35 then nxty
  813. temp1 = u * 4 : temp2 = temp1 + 3
  814. for f = temp1 to temp2
  815. if !xdat[f] then nxty
  816. temp3 = xp - xdat[f]
  817. mk1
  818. if temp3 < 5 then Climb4Plus
  819. next
  820. nxty
  821. next
  822. return thisbank
  823.  
  824. Climb4Plus
  825. a = newx[f] : b = 0
  826.  
  827. Climb4
  828. rem if xp = 20 || 90 || 120 then ClimbOK
  829. rem return
  830. rem
  831. rem ClimbOK
  832. if joy0up then yp=yp-0.25
  833. if joy0down then yp=yp+0.25
  834.  
  835. player0color:
  836. $42
  837. $42
  838. $42
  839. $00
  840. $4A
  841. $4A
  842. $4A
  843. $86
  844. $86
  845. $86
  846. $42
  847. $42
  848. $42
  849. $86
  850. $86
  851. end
  852. player0:
  853. %01111100
  854. %11111110
  855. %11111110
  856. %00111100
  857. %10000010
  858. %01111101
  859. %00111111
  860. %01111111
  861. %11011010
  862. %11111110
  863. %01111111
  864. %11111111
  865. %11111110
  866. %01111100
  867. %00110000
  868. end
  869. if h{3} then REFP0 = 8
  870. if !h{3} then REFP0 = 0
  871. return thisbank
  872.  
  873.  
  874. data ydat
  875. 122, 87, 52, 17
  876. end
  877.  
  878. data xdat
  879. 16, 68, 120, 0
  880. 20, 48, 88, 116
  881. 24, 68, 112, 0
  882. 28, 40, 96, 108
  883. end
  884.  
  885. data newx
  886. 18, 70, 122, 0
  887. 22, 50, 90, 118
  888. 26, 70, 114, 0
  889. 30, 42, 98, 110
  890. end
  891.  
  892. Mario034
  893. if h{2} then player0:
  894. %01111000
  895. %11111110
  896. %00010100
  897. %10111110
  898. %10110110
  899. %01100000
  900. %00111100
  901. %01111011
  902. %11010111
  903. %11111100
  904. %00111100
  905. %11111100
  906. %11101000
  907. %10011000
  908. %00011100
  909. end
  910.  
  911. Mario024
  912. if h{1} then player0:
  913. %01111000
  914. %11111110
  915. %00010100
  916. %10111110
  917. %10110110
  918. %01100000
  919. %00111100
  920. %11111000
  921. %11010111
  922. %01111111
  923. %00111100
  924. %01111101
  925. %11111111
  926. %11000011
  927. %10000000
  928. end
  929. if h{3} then player0:
  930. %01111000
  931. %11111110
  932. %00010100
  933. %10111110
  934. %10110110
  935. %01100000
  936. %00111100
  937. %01111000
  938. %01010100
  939. %01111100
  940. %10111100
  941. %11111100
  942. %11011000
  943. %11011100
  944. %11111100
  945. end
  946. return
  947.  
  948.  
  949.  
  950.  
  951. rem bL2R4
  952. rem
  953. rem player3x = 16+h: player3y = bar2y+grav
  954. rem h=h+1
  955. rem grav = grav + 0.12
  956. rem return
  957. rem
  958. rem bR2L4
  959. rem
  960. rem player3x=90-h: player3y = bar2y+grav
  961. rem h=h+1
  962. rem grav = grav + 0.12
  963. rem return
  964. rem
  965. rem Fall4
  966. rem player3y = player3y + 15
  967. rem return
  968. rem
  969. ; *****************************************************
  970. ; * Walk Sound
  971. ; *****************************************************
  972. GetWalk4
  973. if walkData4[C1_Counter] = 255 then goto C1_Sound_Done_2554
  974. AUDV1 = walkData4[C1_Counter] : C1_Counter = C1_Counter + 1
  975. AUDC1 = walkData4[C1_Counter] : C1_Counter = C1_Counter + 1
  976. AUDF1 = walkData4[C1_Counter] : C1_Counter = C1_Counter + 1
  977. C1_Duration = walkData4[C1_Counter] : C1_Counter = C1_Counter + 1
  978. goto SoundReturn4Ch1
  979.  
  980. GetDitty4
  981. if Ditty_Data4[C0_Counter] = 255 then goto C0_Sound_Done_2554
  982. AUDV0 = Ditty_Data4[C0_Counter] : C0_Counter = C0_Counter + 1
  983. rem AUDC0 = Ditty_Data4[C0_Counter] : C0_Counter = C0_Counter + 1
  984. AUDC0 = 6
  985. AUDF0 = Ditty_Data4[C0_Counter] : C0_Counter = C0_Counter + 1
  986. C0_Duration = Ditty_Data4[C0_Counter] : C0_Counter = C0_Counter + 1
  987. goto SoundReturn4Ch0
  988.  
  989. rem * Music Data Block
  990. rem *****************************************************
  991. rem * Explanation:
  992. rem * v - volume (0 to 15)
  993. rem * c - control [a.k.a. tone, voice, and distortion] (0 to 15)
  994. rem * f - frequency (0 to 31)
  995. rem * d - duration
  996.  
  997. data walkData4
  998. 3,14,1
  999. 1
  1000. 2,14,0
  1001. 1
  1002. 1,14,1
  1003. 1
  1004. 6,6,1
  1005. 1
  1006. 2,1,0
  1007. 1
  1008. 1,12,0
  1009. 1
  1010. 0,0,0
  1011. 7
  1012. 255
  1013. end
  1014.  
  1015. C1_Sound_Done_2554
  1016. C1_Duration = 1 : C1_Counter = 0 : BitOp_C1 = 0 : AUDV1=0 : goto SoundReturn4Ch1
  1017.  
  1018. data Ditty_Data4
  1019. 4,11
  1020. 5
  1021. 0,0
  1022. 9
  1023. 4,14
  1024. 5
  1025. 0,0
  1026. 2
  1027. 4,14
  1028. 5
  1029. 0,0
  1030. 2
  1031. 255
  1032. end
  1033.  
  1034. C0_Sound_Done_2554
  1035. C0_Duration = 1 : C0_Counter = 0 : BitOp_C0 = 0 : AUDV0=0 : goto SoundReturn4Ch0
  1036.  
  1037. rem *****************************************************
  1038. bank 5
  1039. rem *****************************************************
  1040. temp1 = temp1
  1041.  
  1042. rem *****************************************************
  1043. bank 6
  1044. rem *****************************************************
  1045. temp1 = temp1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement