Advertisement
Guest User

Propopet

a guest
Dec 4th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.68 KB | None | 0 0
  1. CON
  2.  
  3. _clkmode = xtal1 + pll16x
  4. _xinfreq = 5_000_000
  5.  
  6.  
  7. OBJ
  8.  
  9. text : "vga_text"
  10.  
  11. VAR
  12.  
  13. long Hunger
  14. long Poo
  15. long Sleep
  16. long Eat
  17. long Exp
  18. long Function
  19. long Button [32]
  20. long Blurb
  21. long Funct
  22.  
  23. PUB Premain
  24.  
  25. text.start(8)
  26. text.out(00)
  27. cognew(ButtonPub, @Button)
  28.  
  29. Hunger := 0 '0 is not hungry 100 is hungry
  30. Poo := 0 '0 is no need to poo 100 is needs to
  31. Sleep := 0 '0 is not sleepy 100 is sleepy
  32. Exp := 0
  33. Main
  34.  
  35. Pub Main
  36.  
  37. text.out(1)
  38. text.dec(Hunger)
  39. text.out(13)
  40. text.dec(Poo)
  41. text.out(13)
  42. text.dec(Sleep)
  43. text.out(13)
  44. text.dec(Exp)
  45. text.out(13)
  46.  
  47. Repeat 1
  48. Hunger += 2
  49. Poo += 3
  50. Sleep += 1
  51.  
  52. Repeat 1
  53. If Hunger =< 75
  54. StandbyPub
  55. If Hunger > 75
  56. HungerPub
  57.  
  58. Pub MainSecond
  59.  
  60. text.out(1)
  61. text.dec(Hunger)
  62. text.out(13)
  63. text.dec(Poo)
  64. text.out(13)
  65. text.dec(Sleep)
  66. text.out(13)
  67. text.dec(Exp)
  68. text.out(13)
  69.  
  70. Repeat 1
  71. If Poo =< 50
  72. MainThird
  73. If Poo > 50
  74. PooPub
  75.  
  76. Pub MainThird
  77.  
  78. text.out(1)
  79. text.dec(Hunger)
  80. text.out(13)
  81. text.dec(Poo)
  82. text.out(13)
  83. text.dec(Sleep)
  84. text.out(13)
  85. text.dec(Exp)
  86. text.out(13)
  87.  
  88. Repeat 1
  89. If Sleep =< 100
  90. Main
  91. If Sleep > 100
  92. SleepPub
  93.  
  94. Pub StandbyPub
  95.  
  96. text.out(1)
  97. text.dec(Hunger)
  98. text.out(13)
  99. text.dec(Poo)
  100. text.out(13)
  101. text.dec(Sleep)
  102. text.out(13)
  103. text.dec(Exp)
  104. text.out(13)
  105.  
  106. Repeat 1
  107. If Exp =< 30
  108. Function := @VY
  109. If Exp > 30 and Exp =< 100
  110. Function := @Y
  111. If Exp > 100
  112. Function := @A
  113.  
  114. Repeat 2
  115. text.str(string($A,12,$B,7))
  116. text.str(Function)
  117. waitcnt(clkfreq + cnt)
  118. 'text.out(00)
  119. text.str(string($A,12,$B,7))
  120. text.str(Function + 9)
  121. waitcnt(clkfreq + cnt)
  122. 'text.out(00)
  123.  
  124. MainSecond
  125.  
  126. Pub HungerPub
  127.  
  128. Repeat 1
  129. If Exp =< 30
  130. Function := @VYHungry
  131. If Exp > 30 and Exp =< 100
  132. Function := @YHungry
  133. If Exp > 100
  134. Function := @AHungry
  135.  
  136. repeat 2
  137. text.str(string($A,12,$B,7))
  138. text.str(Function)
  139. waitcnt(clkfreq + cnt)
  140. 'text.out(00)
  141. text.str(string($A,12,$B,7))
  142. text.str(Function + 9)
  143. waitcnt(clkfreq + cnt)
  144. 'text.out(00)
  145.  
  146. MainSecond
  147.  
  148. Pub PooPub
  149.  
  150. Repeat 1
  151. If Exp =< 30
  152. Function := @VYPooing
  153. If Exp > 30 and Exp =< 100
  154. Function := @YPooing
  155. If Exp > 100
  156. Function := @APooing
  157.  
  158. repeat 2
  159. text.str(string($A,12,$B,7))
  160. text.str(Function)
  161. waitcnt(clkfreq + cnt)
  162. 'text.out(00)
  163. text.str(string($A,12,$B,7))
  164. text.str(Function + 9)
  165. waitcnt(clkfreq + cnt)
  166. 'text.out(00)
  167.  
  168. MainThird
  169.  
  170. Pub SleepPub
  171.  
  172. Repeat 1
  173. If Exp =< 30
  174. Function := @VYSleeping
  175. If Exp > 30 and Exp =< 100
  176. Function := @YSleeping
  177. If Exp > 100
  178. Function := @ASleeping
  179.  
  180. repeat 2
  181. text.str(string($A,12,$B,7))
  182. text.str(Function)
  183. waitcnt(clkfreq + cnt)
  184. 'text.out(00)
  185. text.str(string($A,12,$B,7))
  186. text.str(Function + 9)
  187. waitcnt(clkfreq + cnt)
  188. 'text.out(00)
  189.  
  190. Main
  191.  
  192. Pub ButtonPub | ButtonPush
  193.  
  194. dira[0..4]~
  195.  
  196. repeat
  197. ButtonPush := ina[0..4]
  198. case ButtonPush
  199. %11110:
  200. Funct := @Zero 'hunger
  201. text.str(string($A,12,$B,9))
  202. text.str(Funct)
  203. WaitPub
  204. ZeroPub
  205. %11101:
  206. Funct := @One 'poo
  207. text.str(string($A,12,$B,9))
  208. text.str(Funct)
  209. WaitPub
  210. OnePub
  211. %11011:
  212. Funct := @Two
  213. text.str(string($A,12,$B,9))
  214. text.str(Funct)
  215. WaitPub
  216. TwoPub
  217. %10111:
  218. Funct := @Three
  219. text.str(string($A,12,$B,9))
  220. text.str(Funct)
  221. WaitPub
  222. ThreePub
  223. %01111:
  224. Funct := @Four
  225. text.str(string($A,12,$B,9))
  226. text.str(Funct)
  227. WaitPub
  228. FourPub
  229.  
  230. Pub WaitPub
  231.  
  232. repeat
  233. until ina[2] == 0
  234. text.str(Funct + 21)
  235. return
  236.  
  237. Pub ZeroPub 'hunger
  238.  
  239. If Exp =< 30
  240. Blurb := @VYEating
  241. If Exp > 30 and Exp =< 100
  242. Blurb := @YEating
  243. If Exp > 100
  244. Blurb := @AEating
  245.  
  246. Hunger := 0
  247. Exp += 5
  248.  
  249. repeat 2
  250. text.str(string($A,12,$B,9))
  251. text.str(Blurb)
  252. waitcnt(clkfreq + cnt)
  253. text.str(string($A,12,$B,9))
  254. text.str(Blurb + 9)
  255. waitcnt(clkfreq + cnt)
  256. text.str(string($A,12,$B,9))
  257. text.str(Blurb + 18)
  258. waitcnt(clkfreq + cnt)
  259. text.str(string($A,12,$B,9))
  260. text.str(Blurb + 27)
  261. waitcnt(clkfreq + cnt)
  262. text.out(00)
  263.  
  264. Pub OnePub 'poo
  265.  
  266. If Exp =< 30
  267. Blurb := @VYPooing
  268. If Exp > 30 and Exp =< 100
  269. Blurb := @YPooing
  270. If Exp > 100
  271. Blurb := @APooing
  272.  
  273. Poo := 0
  274. Exp += 5
  275.  
  276. repeat 2
  277. text.str(string($A,12,$B,9))
  278. text.str(Blurb)
  279. waitcnt(clkfreq + cnt)
  280. text.str(string($A,12,$B,9))
  281. text.str(Blurb + 9)
  282. waitcnt(clkfreq + cnt)
  283. text.out(00)
  284.  
  285. Pub TwoPub 'never mind
  286.  
  287. repeat 2
  288. text.str(string($A,12,$B,9))
  289. text.str(string("Never Mind!"))
  290. waitcnt(clkfreq + cnt)
  291. text.out(00)
  292.  
  293. Pub ThreePub 'sleep
  294.  
  295. If Exp =< 30
  296. Blurb := @VYSleeping
  297. If Exp > 30 and Exp =< 100
  298. Blurb := @YSleeping
  299. If Exp > 100
  300. Blurb := @ASleeping
  301.  
  302. Sleep := 0
  303. Exp += 5
  304.  
  305. repeat 2
  306. text.str(string($A,12,$B,9))
  307. text.str(Blurb)
  308. waitcnt(clkfreq + cnt)
  309. text.str(string($A,12,$B,9))
  310. text.str(Blurb + 9)
  311. waitcnt(clkfreq + cnt)
  312. text.out(00)
  313.  
  314. Pub FourPub 'never mind
  315.  
  316. repeat 2
  317. text.str(string($A,12,$B,9))
  318. text.str(string("Never Mind!"))
  319. waitcnt(clkfreq + cnt)
  320. text.out(00)
  321.  
  322. DAT
  323.  
  324. VY byte ".ô ", 0
  325. VYStandby2 byte " Ô. ", 0
  326. VYHungry byte ".ö ", 0
  327. VYHungry2 byte " Ö. ", 0
  328. VYPooing byte "..õ ", 0
  329. VYPooing2 byte "õ.. ", 0
  330. VYSleeping byte "ó zz ", 0
  331. VYSleeping2 byte " ò zZ ", 0
  332. VYEating byte "ö... ", 0
  333. VYEating2 byte " ö.. ", 0
  334. VYEating3 byte " ö. ", 0
  335. VYEating4 byte " ö ", 0
  336.  
  337. Y byte " ^.^ ", 0
  338. YStandby2 byte "^.^ ", 0
  339. YHungry byte " 'o' ", 0
  340. YHungry2 byte "'.' ", 0
  341. YPooing byte " >.< ", 0
  342. YPooing2 byte "-.< ", 0
  343. YSleeping byte " ~o~ zz ", 0
  344. YSleeping2 byte "~.~ zzZ ", 0
  345. YEating byte "^o^ ooo ", 0
  346. YEating2 byte " ^~^ oo ", 0
  347. YEating3 byte " ^o^ oo ", 0
  348. YEating4 byte " ^~^ o ", 0
  349.  
  350. A byte " >(^.^)>", 0
  351. AStandby2 byte "<(^.^)< ", 0
  352. AHungry byte " ('o') ", 0
  353. AHungry2 byte "('.') ", 0
  354. APooing byte " (>.<) ", 0
  355. APooing2 byte "(-.<) ", 0
  356. ASleeping byte " (~o~)zz", 0
  357. ASleeping2 byte "(~.~)zzZ", 0
  358. AEating byte "(^o^)nom", 0
  359. AEating2 byte "(^~^)NOM", 0
  360. AEating3 byte "(^o^)nom", 0
  361. AEating4 byte "(^~^)NOM", 0
  362.  
  363. Zero byte "Feed Me? ", 0 'down
  364. Zero2 byte "I have been fed! ", 0
  365. One byte "Clean Me? ", 0 'left
  366. One2 byte "I have been cleaned!", 0
  367. Two byte "Never mind! ", 0 'center
  368. Two2 byte "Never mind! ", 0
  369. Three byte "Should I sleep? ", 0 'right
  370. Three2 byte "I have slept! ", 0
  371. Four byte "Never mind! ", 0 'up
  372. Four2 byte "Never mind! ", 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement