Advertisement
Guest User

Uncharted TI Source

a guest
Sep 9th, 2011
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 7.63 KB | None | 0 0
  1. :.UC
  2. :
  3. :
  4. :
  5. :Fix 5
  6. :
  7. :10*256→X
  8. :5*256→Y
  9. :0→U→V→D+15→S
  10. :0→J→F
  11. :0{L1+600}r
  12. :0{L1+602}r
  13. :
  14. :0{L2}r
  15. :0{L2+2}r
  16. :
  17. :
  18. :ClrDraw
  19. :ClrDrawr
  20. :sub(SMP
  21. :
  22. :Repeat getKey(15)
  23. :
  24. :
  25. :sub(DOA
  26. :
  27. :If {L1+602}
  28. :{L1+602}→H
  29. :For(G,H,3
  30. :sub(DOA
  31. :End
  32. :0{L1+600}r
  33. :0{L1+602}
  34. :End
  35. :
  36. :End
  37. :Return
  38. :
  39. :Lbl DOA
  40. :
  41. :RecallPic
  42. :sub(A
  43. :sub(RCK
  44. :sub(BOX
  45. :sub(SAP
  46. :sub(ENE
  47. :sub(PH1
  48. :sub(KEY
  49. :sub(DPL
  50. :sub(BUL
  51. :sub(FIR
  52. :
  53. :If {L1+602}
  54. :Circle({L1+600}+1,{L1+601}+1,rand^4+2
  55. :For(A,0,3
  56. :Horizontal +
  57. :End
  58. :Circle({L1+600},{L1+601},rand^8+1
  59. :DispGraph
  60. :For(A,0,7
  61. :Horizontal -
  62. :End
  63. :DispGraph
  64. :For(A,0,3
  65. :Horizontal +
  66. :End
  67. :End
  68. :
  69. :If getKey(9)
  70. :While getKey(9):End
  71. :Text(5,5,"Paused"
  72. :DispGraph
  73. :Repeat getKey(9):End
  74. :While getKey(9):End
  75. :End
  76. :
  77. :DispGraphClrDraw
  78. :Return
  79. :
  80. :
  81. :[E0E06070E0000000E0E070E0B0000000]→Str1E
  82. :Lbl ENE
  83. :
  84. :
  85. :
  86. :
  87. :
  88. :Return
  89. :
  90. :Lbl SAP
  91. :For(A,0,7
  92. :(A*2+L1+140)→B
  93. :If {B}
  94. :
  95. :If F
  96. :If {L2+2}({B+1}-1) and ({L2+2}({B+1}+6))
  97. :If {L2+1}=({B}-3) or ({L2+1}=({B}+6))
  98. :{B}{L1+600}
  99. :{B+1}{L1+601}
  100. :2{L1+602}
  101. :0{B}r
  102. :End:End:End
  103. :
  104. :Pt-On({B},{B+1},[709898F870000000]
  105. :End:End
  106. :Return
  107. :
  108. :
  109. :Lbl RCK
  110. :For(A,0,3
  111. :(A*16+L1+76)→B
  112. :If {B+1}
  113. :If F=1
  114. :If ({L2+2}({B+3}-1)) and ({L2+2}({B+3}+5)
  115. :If ({L2+1}=({B+1}-3)) or ({L2+1}=({B+1}+6))
  116. :1{B+8}
  117. :32{B+4}r
  118. :32{B+6}r
  119. :!If {B+9}-1
  120. :24{B+10}
  121. :Else!If {B+9}-3
  122. :0{B+4}r
  123. :End
  124. :End:End:End
  125. :
  126. :If {B+8}
  127. :{B}r+{B+4}r→{B}r
  128. :{B+2}r+{B+6}r→{B+2}r
  129. :!If {B+9}
  130. :{B+4}r+4{B+4}r:{B+6}r-2{B+6}r
  131. :Else!If {B+9}-1
  132. :{B+4}r+6{B+4}r
  133. :Else!If {B+9}-2
  134. :{B+4}r+12{B+4}r
  135. :{B+6}r-12{B+6}r
  136. :Else!If {B+9}-3
  137. :{B+6}r-8{B+6}r
  138. :End
  139. :
  140. :If (pxl-Test({B+1}+3,{B+3}-1)0) or (pxl-Test({B+1}+4,{B+3}-1)0) or (pxl-Test({B+1}+5,{B+3})0) or (pxl-Test({B+1}+5,{B+3}+1)0)
  141. :{B+1}{L1+600}
  142. :{B+3}{L1+601}
  143. :1{L1+602}
  144. :For(C,0,5
  145. :!If {C*2+L1+64}
  146. :{B+1}{C*2+L1+64}
  147. :{B+3}{C*2+L1+65}
  148. :6→C
  149. :End
  150. :End
  151. :0{B}r:0{B+2}r
  152. :End
  153. :
  154. :
  155. :End
  156. :
  157. :!If {B+9}-1
  158. :
  159. :If {B+10}=8 and ({B+8}0)
  160. :1{B+10}
  161. :For(C,0,5
  162. :!If {C*2+L1+64}
  163. :{B+1}-1{C*2+L1+64}
  164. :{B+3}+1{C*2+L1+65}
  165. :6→C
  166. :End:End
  167. :Else
  168. :{B+10}+1{B+10}
  169. :End
  170. :Else!If {B+9}-3
  171. :If {B+8}
  172. :!If rand^4
  173. :{B+1}+2{L1+600}
  174. :{B+3}+4{L1+601}
  175. :3{L1+602}
  176. :End:End:End
  177. :
  178. :!If {B+8}
  179. :!If {B+9}
  180. :Pt-On({B+1},{B+3},[382858B050000000]
  181. :Else!If {B+9}-1
  182. :Pt-On({B+1},{B+3},[783878E8A0000000]
  183. :Else!If {B+9}-2
  184. :Pt-On({B+1},{B+3},[003050B050000000]
  185. :Else!If {B+9}-3
  186. :Pt-On({B+1},{B+3},[2050505070000000]
  187. :End
  188. :Else!If {B+8}-1
  189. :!If {B+9}
  190. :Pt-On({B+1},{B+3},[382858A040000000]
  191. :Else!If {B+9}-1
  192. :Pt-On({B+1},{B+3},[20F0F8F020000000]
  193. :Else!If {B+9}-2
  194. :Pt-On({B+1},{B+3},[1828502000000000]
  195. :Else!If {B+9}-3
  196. :Pt-On({B+1},{B+3},[2050505070000000]
  197. :End
  198. :
  199. :For(I,0,2
  200. :Pxl-Change(rand^3+({B+1}-2),rand^3+({B+3}+4))
  201. :End
  202. :
  203. :End
  204. :
  205. :End
  206. :End
  207. :Return
  208. :
  209. :Lbl A
  210. :X/256{L5}
  211. :Y/256{L5+1}
  212. :Return
  213. :
  214. :
  215. :[20B050A8F8000000486070D8F8000000205070B8F8000000207068B8F8000000285058B0F8000000A050D058F800000000306898F80000000060B048F800000000306898F80000000060B048F8000000]→Str3F
  216. :Lbl FIR
  217. :For(A,0,5
  218. :If {A*2+L1+64}
  219. :Pt-Change({A*2+L1+64},{A*2+L1+65},rand^8*8+Str3F
  220. :End:End
  221. :For(A,0,5
  222. :(A*2+L1+64)→B
  223. :If {B}
  224. :
  225. :If rand^128=1
  226. :0{B}
  227. :End
  228. :
  229. :!If pxl-Test({B}+2,{B+1}+5)
  230. :{B+1}+1{B+1}
  231. :ElseIf rand^32=1
  232. :If pxl-Test({B}-1,{B+1}+4)=0 and (rand^2=1)
  233. :For(C,0,5
  234. :(C*2+L1+64)→E
  235. :If C=A
  236. :Goto 002
  237. :End
  238. :!If {E}
  239. :{B}-5{E}
  240. :{B+1}{E+1}
  241. :10→C
  242. :End
  243. :Lbl 002
  244. :End
  245. :ElseIf pxl-Test({B}+5,{B+1}+4)=0
  246. :For(C,0,5
  247. :(C*2+L1+64}→E
  248. :If C=A
  249. :Goto 003
  250. :End
  251. :!If {E}
  252. :{B}+5{E}
  253. :{B+1}{E+1}
  254. :10→C
  255. :End
  256. :Lbl 003
  257. :End
  258. :
  259. :End
  260. :End
  261. :
  262. :End
  263. :End
  264. :Return
  265. :
  266. :Lbl BUL
  267. :If getKey(55) and (F=0)
  268. :→F
  269. :If D
  270. :{L5}-1{L2+1}
  271. :1{L2+3}
  272. :Else
  273. :{L5}+4{L2+1}
  274. :0{L2+3}
  275. :End
  276. :{L5+1}+2{L2+2}
  277. :End
  278. :
  279. :If {L2+1}0 and (F=1)
  280. :!If {L2+3}
  281. :!If pxl-Test({L2+1}+2,{L2+2})
  282. :{L2+1}+1{L2+1}
  283. :Else
  284. :2→F:End
  285. :Else
  286. :!If pxl-Test({L2+1}-1,{L2+2})
  287. :{L2+1}-1{L2+1}
  288. :Else
  289. :2→F:End
  290. :End
  291. :
  292. :Goto 004
  293. :End
  294. :
  295. :
  296. :
  297. :If F=2
  298. :3→F
  299. :If {L2+3}
  300. :32{L2+4}r
  301. :{L2+1}+1{L2+1}
  302. :Else
  303. :32{L2+4}r
  304. :{L2+1}-1{L2+1}
  305. :End
  306. :
  307. :{L2+2}{L2+3}
  308. :0{L2+2}
  309. :0{L2+6}r
  310. :End
  311. :
  312. :If F=3
  313. :
  314. :If {L2+4}r>>0
  315. :If ((pxl-Test({L2+1}+2,{L2+3})=0) and (pxl-Test({L2+1}+2,{L2+3}+1)=0))
  316. :{L2}r+{L2+4}{L2}r:End
  317. :ElseIf {L2+4}r<<0
  318. :If ((pxl-Test({L2+1}-1,{L2+3})=0) and (pxl-Test({L2+1}-1,{L2+3}+1)=0))
  319. :{L2}r+{L2+4}r→{L2}r:End
  320. :Else
  321. :({L2+4}r//2)→{L2+4}r
  322. :End
  323. :
  324. :If pxl-Test({L2+1},{L2+3}+2)=0 and (pxl-Test({L2+1}+1,{L2+3}+2)=0)
  325. :{L2+6}r+3{L2+6}r
  326. :Else
  327. :If {L2+4}r>>0
  328. :{L2+4}r-1{L2+4}r
  329. :ElseIf {L2+4}r<<0
  330. :{L2+4}r+1{L2+4}r
  331. :End
  332. :
  333. :({L2+6}r//2)→{L2+6}r
  334. :End
  335. :{L2+2}r+{L2+6}r→{L2+2}r
  336. :
  337. :Lbl 004
  338. :End
  339. :
  340. :If F=1
  341. :Pt-On({L2+1},{L2+2},[C0C0000000000000])
  342. :ElseIf F=3
  343. :Pt-On({L2+1},{L2+3},[C0C0000000000000])
  344. :End
  345. :
  346. :
  347. :Return
  348. :
  349. :
  350. :
  351. :
  352. :[0000000000000000F888F888F8000000D8F870F8F8000000F8F80000F8000000]→Str2
  353. :
  354. :Lbl BOX
  355. :For(A,0,3
  356. :If {A*16+L1}r
  357. :Pt-On({A*16+L1+1},{A*16+L1+3},{A*16+L1+8}*8+Str2
  358. :End:End
  359. :
  360. :For(A,0,3
  361. :(A*16+L1)→B
  362. :If {B}r
  363. :
  364. :If ({L5+1})<({B+3}+5) and (({L5+1})>({B+3}-5)
  365. :If ({L5}+5)={B+1} and (D=0) and (getKey(3))
  366. :U+1{B+4}r
  367. :ElseIf ({L5})=({B+1}+6) and (D=1) and (getKey(2))
  368. :U-1{B+4}r
  369. :End:End
  370. :
  371. :
  372. :If pxl-Test({B+1},{B+3}+5)0 or (pxl-Test({B+1}+4,{B+3}+5)0) or (pxl-Test({B+1}+2,{B+3}+5)0)
  373. :0{B+6}r
  374. :If {B+4}r>>0
  375. :{B+4}r-1{B+4}r
  376. :ElseIf {B+4}r<<0
  377. :{B+4}r+1{B+4}r
  378. :End
  379. :Else
  380. :{B+6}r+2{B+6}r
  381. :End
  382. :
  383. :{B+6}r+{B+2}r→{B+2}r
  384. :
  385. :
  386. :If {B+4}r>>0 and ((pxl-Test({B+1}+5,{B+3})=0) or (pxl-Test({B+1}+5,{B+3}+4)=0))
  387. :{B}r+{B+4}r→{B}r
  388. :ElseIf {B+4}r<<0 and ((pxl-Test({B+1}-1,{B+3})=0) or (pxl-Test({B+1}-1,{B+3}+4)=0))
  389. :{B}r+{B+4}r→{B}r
  390. :Else
  391. :({B+4}r//2)→{B+4}r
  392. :End
  393. :
  394. :End:End
  395. :Return
  396. :
  397. :Lbl KEY
  398. :If getKey(54) and (J≠0)
  399. :Y-256→Y
  400. :64→V
  401. :End
  402. :If getKey(2) and (U>>128)
  403. :→D
  404. :U-2→U
  405. :DS<(S,15):End
  406. :ElseIf getKey(3) and (U<<128)
  407. :-1→D
  408. :U+2→U
  409. :DS<(S,15):End
  410. :End
  411. :Return
  412. :
  413. :Lbl PH1
  414. :
  415. :
  416. :If U>>0 and ((pxl-Test({L5}+4,{L5+1})=0) and (pxl-Test({L5}+4,Y{L5+1}+4)=0)) and (pxl-Test({L5}+4,{L5+1}+2)=0)
  417. :U+X→X
  418. :ElseIf U<<0 and ((pxl-Test({L5}-1,{L5+1})=0) and (pxl-Test({L5}-1,{L5+1}+4)=0)) and (pxl-Test({L5}-1,{L5+1}+2)=0)
  419. :U+X→X
  420. :Else
  421. :(U//2)→U
  422. :End
  423. :
  424. :sub(A
  425. :
  426. :If X<<(3*256)
  427. :3*256→X
  428. :(U//2)→U
  429. :ElseIf X>>(90*256)
  430. :89*256→X
  431. :(U//2)→U
  432. :End
  433. :
  434. :If pxl-Test({L5},{L5+1}+5) or (pxl-Test({L5}+1,{L5+1}+5)) or (pxl-Test({L5}+2,{L5+1}+5)) or (pxl-Test({L5}+3,{L5+1}+5))
  435. :0→V
  436. :If U>>0
  437. :U-1→U
  438. :ElseIf U<<0
  439. :U+1→U
  440. :End
  441. :(V//2)→V
  442. :1→J
  443. :Else
  444. :0→J
  445. :V+2→V
  446. :
  447. :End
  448. :
  449. :sub(A
  450. :
  451. :If (pxl-Test({L5},{L5+1}-1)=0) and (pxl-Test({L5}+1,{L5+1}-1)=0) and (pxl-Test({L5}+2,{L5+1}-1)=0) and (pxl-Test({L5}+3,{L5+1}-1)=0)
  452. :
  453. :Else
  454. :abs(V)→V
  455. :End
  456. :
  457. :
  458. :Y+V→Y
  459. :sub(A
  460. :
  461. :If F=3
  462. :If ({L2+1}({L5}-1)) and ({L2+1}({L5}+4))
  463. :If ({L2+3}({L5+1}-1)) and ({L2+3}({L5+1}+5))
  464. :0→F
  465. :End:End:End
  466. :
  467. :Return
  468. :
  469. :
  470. :Lbl SMP
  471. :ref(0,0,96,64
  472. :rref(3,3,90,50
  473. :rref(0,56,96,8
  474. :0{L1}
  475. :Fill(L1,64
  476. :
  477. :0{L1+64}
  478. :Fill(L1+64,12
  479. :
  480. :0{L1+76}
  481. :Fill(L1+76,64
  482. :
  483. :0{L1+140}
  484. :Fill(L1+140,16
  485. :70{L1+140}
  486. :42{L1+141}
  487. :
  488. :0{L1+156}
  489. :Fill(L1+156,14
  490. :20{L1+164}
  491. :3{L1+165}
  492. :20{L1+157}
  493. :35{L1+159}
  494. :
  495. :StorePic
  496. :Return
  497. :
  498. :
  499. :[6050E070D0000000605060E06000000060A070E0B000000060A0607060000000]→Str1P
  500. :
  501. :
  502. :Lbl DPL
  503. :!If getKey(0)
  504. :If (U≠0) or (J=0)
  505. :1→S
  506. :Else
  507. :15→S
  508. :End:End
  509. :
  510. :Pt-On({L5},{L5+1},D*16+(S/8*8)+Str1P
  511. :
  512. :Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement