Advertisement
Guest User

Zenfur

a guest
Aug 18th, 2009
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.22 KB | None | 0 0
  1. def Swarm := 0
  2. def Inn := 1
  3. def Hospital := 2
  4. def Racetrack := 3
  5. def Pool := 4
  6. def Camp := 5
  7. def School := 6
  8. def Tower := 7
  9. def Wall := 11
  10.  
  11. def Level0Construction := 0
  12. def Level0Completed := 1
  13. def Level1Construction := 2
  14. def Level1Completed := 3
  15. def Level2Construction := 4
  16. def Level2Completed := 5
  17.  
  18. def buildingsCount := engine.buildingsCount
  19.  
  20. \# general team getter
  21.  
  22. def teamsCount := engine.teamsCount
  23. def isAlive := engine.isTeamAlive
  24.  
  25. \# more defines for engine
  26.  
  27. def PrimaryObjective := 0
  28. def SecondaryObjective := 1
  29. def InvalidObjective := 2
  30.  
  31. \# general game getter
  32.  
  33.  
  34.  
  35. \# game gui
  36.  
  37. def show := gui.showScriptText
  38. def showTr := gui.showScriptTextTr
  39. def hide := gui.hideScriptText
  40.  
  41.  
  42.  
  43. \# wait on game variables
  44.  
  45. def wait(x) := if (x > 0) {
  46. yield()
  47. wait(x - 1)
  48. }
  49. 0:0: ExecutionBlock
  50. 6:16: DecNode(Worker,1)
  51. 6:15: ConstNode NativeValue<int>(0x8466c60) = 0
  52. 7:18: DecNode(Explorer,1)
  53. 7:17: ConstNode NativeValue<int>(0x8466c60) = 1
  54. 8:17: DecNode(Warrior,1)
  55. 8:16: ConstNode NativeValue<int>(0x8466c60) = 2
  56. 10:36: DecNode(unitsCount,1)
  57. 10:36: SelectNode(unitsCount)
  58. 10:19: DefLookupNode(engine)
  59. 12:21: DecNode(AbilityWalk,1)
  60. 12:20: ConstNode NativeValue<int>(0x8466c60) = 3
  61. 13:21: DecNode(AbilitySwim,1)
  62. 13:20: ConstNode NativeValue<int>(0x8466c60) = 4
  63. 14:20: DecNode(AbilityFly,1)
  64. 14:19: ConstNode NativeValue<int>(0x8466c60) = 5
  65. 15:22: DecNode(AbilityBuild,1)
  66. 15:21: ConstNode NativeValue<int>(0x8466c60) = 6
  67. 16:24: DecNode(AbilityHarvest,1)
  68. 16:23: ConstNode NativeValue<int>(0x8466c60) = 7
  69. 17:28: DecNode(AbilityAttackSpeed,1)
  70. 17:27: ConstNode NativeValue<int>(0x8466c60) = 8
  71. 18:31: DecNode(AbilityAttackStrength,1)
  72. 18:30: ConstNode NativeValue<int>(0x8466c60) = 9
  73. 19:32: DecNode(AbilityMagicAttackAir,1)
  74. 19:30: ConstNode NativeValue<int>(0x8466c60) = 10
  75. 20:35: DecNode(AbilityMagicAttackGround,1)
  76. 20:33: ConstNode NativeValue<int>(0x8466c60) = 11
  77. 22:51: DecNode(unitsUpgradeCount,1)
  78. 22:51: SelectNode(unitsUpgradesCount)
  79. 22:26: DefLookupNode(engine)
  80. 26:15: DecNode(Swarm,1)
  81. 26:14: ConstNode NativeValue<int>(0x8466c60) = 0
  82. 27:13: DecNode(Inn,1)
  83. 27:12: ConstNode NativeValue<int>(0x8466c60) = 1
  84. 28:18: DecNode(Hospital,1)
  85. 28:17: ConstNode NativeValue<int>(0x8466c60) = 2
  86. 29:19: DecNode(Racetrack,1)
  87. 29:18: ConstNode NativeValue<int>(0x8466c60) = 3
  88. 30:14: DecNode(Pool,1)
  89. 30:13: ConstNode NativeValue<int>(0x8466c60) = 4
  90. 31:14: DecNode(Camp,1)
  91. 31:13: ConstNode NativeValue<int>(0x8466c60) = 5
  92. 32:16: DecNode(School,1)
  93. 32:15: ConstNode NativeValue<int>(0x8466c60) = 6
  94. 33:15: DecNode(Tower,1)
  95. 33:14: ConstNode NativeValue<int>(0x8466c60) = 7
  96. 34:15: DecNode(Wall,1)
  97. 34:13: ConstNode NativeValue<int>(0x8466c60) = 11
  98. 36:28: DecNode(Level0Construction,1)
  99. 36:27: ConstNode NativeValue<int>(0x8466c60) = 0
  100. 37:25: DecNode(Level0Completed,1)
  101. 37:24: ConstNode NativeValue<int>(0x8466c60) = 1
  102. 38:28: DecNode(Level1Construction,1)
  103. 38:27: ConstNode NativeValue<int>(0x8466c60) = 2
  104. 39:25: DecNode(Level1Completed,1)
  105. 39:24: ConstNode NativeValue<int>(0x8466c60) = 3
  106. 40:28: DecNode(Level2Construction,1)
  107. 40:27: ConstNode NativeValue<int>(0x8466c60) = 4
  108. 41:25: DecNode(Level2Completed,1)
  109. 41:24: ConstNode NativeValue<int>(0x8466c60) = 5
  110. 43:44: DecNode(buildingsCount,1)
  111. 43:44: SelectNode(buildingsCount)
  112. 43:23: DefLookupNode(engine)
  113. 47:36: DecNode(teamsCount,1)
  114. 47:36: SelectNode(teamsCount)
  115. 47:19: DefLookupNode(engine)
  116. 48:34: DecNode(isAlive,1)
  117. 48:34: SelectNode(isTeamAlive)
  118. 48:16: DefLookupNode(engine)
  119. 52:26: DecNode(PrimaryObjective,1)
  120. 52:25: ConstNode NativeValue<int>(0x8466c60) = 0
  121. 53:28: DecNode(SecondaryObjective,1)
  122. 53:27: ConstNode NativeValue<int>(0x8466c60) = 1
  123. 54:26: DecNode(InvalidObjective,1)
  124. 54:25: ConstNode NativeValue<int>(0x8466c60) = 2
  125. 62:31: DecNode(show,1)
  126. 62:31: SelectNode(showScriptText)
  127. 62:13: DefLookupNode(gui)
  128. 63:35: DecNode(showTr,1)
  129. 63:35: SelectNode(showScriptTextTr)
  130. 63:15: DefLookupNode(gui)
  131. 64:31: DecNode(hide,1)
  132. 64:31: SelectNode(hideScriptText)
  133. 64:13: DefLookupNode(gui)
  134. 73:2: DecNode(wait,1)
  135. 73:2: FunNode
  136. 70:10: ValPatternNode(x)
  137. 73:2: ApplyNode
  138. 70:27: ApplyNode
  139. 70:16: DefLookupNode(if)
  140. 70:22: ApplyNode
  141. 70:22: SelectNode(>)
  142. 70:20: DefLookupNode(x)
  143. 70:24: ConstNode NativeValue<int>(0x8466c60) = 0
  144. 70:27: ExecutionBlock
  145. 71:9: ApplyNode
  146. 71:2: DefLookupNode(yield)
  147. 71:7: ConstNode Value(0x848c8a0)
  148. 72:13: ApplyNode
  149. 72:2: DefLookupNode(wait)
  150. 72:9: ApplyNode
  151. 72:9: SelectNode(-)
  152. 72:7: DefLookupNode(x)
  153. 72:11: ConstNode NativeValue<int>(0x8466c60) = 1
  154.  
  155. Value(0x848c8a0)
  156.  
  157. 0:0: ExecutionBlock
  158.  
  159. glob2: libgag/src/BinaryStream.cpp:107: virtual std::string GAGCore::BinaryInputStream::readText(const char*): Assertion `len < 1024*1024' failed.
  160. Przerwane
  161. zenfur@bluelight:/usr/local/share$
  162. zenfur@bluelight:/usr/local/share$ glob2
  163. zenfur@bluelight:/usr/local/share$ glob2
  164. * Loading data/usl/Language/Runtime/Control.usl
  165. def if (cond) := {
  166. def ifTrue (trueVal) := [
  167. def else(_) := trueVal
  168. ]
  169. def ifFalse (_) := [
  170. def else(falseVal) := falseVal
  171. ]
  172. cond select (ifTrue, ifFalse)
  173. }
  174.  
  175. def while (cond) (def body) := {
  176. if (cond) {
  177. body
  178. while (cond) (body)
  179. }
  180. }
  181.  
  182. 0:0: ExecutionBlock
  183. 9:2: DecNode(if,1)
  184. 9:2: FunNode
  185. 1:9: ValPatternNode(cond)
  186. 1:18: ExecutionBlock
  187. 4:3: DecNode(ifTrue,1)
  188. 4:3: FunNode
  189. 2:14: ValPatternNode(trueVal)
  190. 2:26: RecordBlock
  191. 3:25: DecNode(else,1)
  192. 3:25: FunNode
  193. 3:12: IgnorePatternNode
  194. 3:18: DefLookupNode(trueVal)
  195. 7:3: DecNode(ifFalse,1)
  196. 7:3: FunNode
  197. 5:15: IgnorePatternNode
  198. 5:21: RecordBlock
  199. 6:33: DecNode(else,1)
  200. 6:33: FunNode
  201. 6:12: ValPatternNode(falseVal)
  202. 6:25: DefLookupNode(falseVal)
  203. 8:7: ApplyNode
  204. 8:7: SelectNode(select)
  205. 8:2: DefLookupNode(cond)
  206. 8:14: RecordBlock
  207. 8:15: DefLookupNode(ifTrue)
  208. 8:23: DefLookupNode(ifFalse)
  209. 16:2: DecNode(while,1)
  210. 16:2: FunNode
  211. 11:12: ValPatternNode(cond)
  212. 16:2: FunNode
  213. 11:19: DefPatternNode(body)
  214. 11:32: ExecutionBlock
  215. 15:3: ApplyNode
  216. 12:12: ApplyNode
  217. 12:2: DefLookupNode(if)
  218. 12:6: DefLookupNode(cond)
  219. 12:12: ExecutionBlock
  220. 13:3: DefLookupNode(body)
  221. 14:22: ApplyNode
  222. 14:16: ApplyNode
  223. 14:3: DefLookupNode(while)
  224. 14:10: DefLookupNode(cond)
  225. 14:17: DefLookupNode(body)
  226.  
  227. Value(0x848c8a0)
  228. * Loading data/usl/Language/Runtime/Classes.usl
  229. def abstract := () \# TODO: throw an exception
  230.  
  231. def interface(singleton) := singleton.prototype
  232.  
  233.  
  234. 0:0: ExecutionBlock
  235. 2:1: DecNode(abstract,1)
  236. 1:17: ConstNode Value(0x848c8a0)
  237. 3:48: DecNode(interface,1)
  238. 3:48: FunNode
  239. 3:15: ValPatternNode(singleton)
  240. 3:48: SelectNode(prototype)
  241. 3:29: DefLookupNode(singleton)
  242.  
  243. Value(0x848c8a0)
  244. * Loading data/usl/Language/Runtime/If.usl
  245. val true := [
  246. def select (ifTrue, _) := ifTrue
  247. def not := false
  248. def and(that) := that
  249. def or (_) := true
  250. def xor (that) := that select (false, true)
  251. ]
  252.  
  253. val false := [
  254. def select (_, ifFalse) := ifFalse
  255. def not := true
  256. def and (that) := false
  257. def or (that) := that
  258. def xor (that) := that select (true, false)
  259. ]
  260.  
  261.  
  262. 0:0: ExecutionBlock
  263. 7:2: DecNode(true,2)
  264. 1:13: RecordBlock
  265. 2:34: DecNode(select,1)
  266. 2:34: FunNode
  267. 2:13: TuplePatternNode
  268. 2:14: ValPatternNode(ifTrue)
  269. 2:22: IgnorePatternNode
  270. 2:28: DefLookupNode(ifTrue)
  271. 3:18: DecNode(not,1)
  272. 3:13: DefLookupNode(false)
  273. 4:23: DecNode(and,1)
  274. 4:23: FunNode
  275. 4:10: ValPatternNode(that)
  276. 4:19: DefLookupNode(that)
  277. 5:20: DecNode(or,1)
  278. 5:20: FunNode
  279. 5:10: IgnorePatternNode
  280. 5:16: DefLookupNode(true)
  281. 6:45: DecNode(xor,1)
  282. 6:45: FunNode
  283. 6:11: ValPatternNode(that)
  284. 6:25: ApplyNode
  285. 6:25: SelectNode(select)
  286. 6:20: DefLookupNode(that)
  287. 6:32: RecordBlock
  288. 6:33: DefLookupNode(false)
  289. 6:40: DefLookupNode(true)
  290. 15:2: DecNode(false,2)
  291. 9:14: RecordBlock
  292. 10:36: DecNode(select,1)
  293. 10:36: FunNode
  294. 10:13: TuplePatternNode
  295. 10:14: IgnorePatternNode
  296. 10:17: ValPatternNode(ifFalse)
  297. 10:29: DefLookupNode(ifFalse)
  298. 11:17: DecNode(not,1)
  299. 11:13: DefLookupNode(true)
  300. 12:25: DecNode(and,1)
  301. 12:25: FunNode
  302. 12:11: ValPatternNode(that)
  303. 12:20: DefLookupNode(false)
  304. 13:23: DecNode(or,1)
  305. 13:23: FunNode
  306. 13:10: ValPatternNode(that)
  307. 13:19: DefLookupNode(that)
  308. 14:45: DecNode(xor,1)
  309. 14:45: FunNode
  310. 14:11: ValPatternNode(that)
  311. 14:25: ApplyNode
  312. 14:25: SelectNode(select)
  313. 14:20: DefLookupNode(that)
  314. 14:32: RecordBlock
  315. 14:33: DefLookupNode(true)
  316. 14:39: DefLookupNode(false)
  317.  
  318. Scope(0x875f070)
  319. * Loading data/usl/Glob2/Runtime/Game.usl
  320. \# wrappers around native interface to get shorter calls
  321.  
  322.  
  323. \# units getter
  324.  
  325. def Worker := 0
  326. def Explorer := 1
  327. def Warrior := 2
  328.  
  329. def unitsCount := engine.unitsCount
  330.  
  331. def AbilityWalk := 3
  332. def AbilitySwim := 4
  333. def AbilityFly := 5
  334. def AbilityBuild := 6
  335. def AbilityHarvest := 7
  336. def AbilityAttackSpeed := 8
  337. def AbilityAttackStrength := 9
  338. def AbilityMagicAttackAir := 10
  339. def AbilityMagicAttackGround := 11
  340.  
  341. def unitsUpgradeCount := engine.unitsUpgradesCount
  342.  
  343. \# buildings getter
  344.  
  345. def Swarm := 0
  346. def Inn := 1
  347. def Hospital := 2
  348. def Racetrack := 3
  349. def Pool := 4
  350. def Camp := 5
  351. def School := 6
  352. def Tower := 7
  353. def Wall := 11
  354.  
  355. def Level0Construction := 0
  356. def Level0Completed := 1
  357. def Level1Construction := 2
  358. def Level1Completed := 3
  359. def Level2Construction := 4
  360. def Level2Completed := 5
  361.  
  362. def buildingsCount := engine.buildingsCount
  363.  
  364. \# general team getter
  365.  
  366. def teamsCount := engine.teamsCount
  367. def isAlive := engine.isTeamAlive
  368.  
  369. \# more defines for engine
  370.  
  371. def PrimaryObjective := 0
  372. def SecondaryObjective := 1
  373. def InvalidObjective := 2
  374.  
  375. \# general game getter
  376.  
  377.  
  378.  
  379. \# game gui
  380.  
  381. def show := gui.showScriptText
  382. def showTr := gui.showScriptTextTr
  383. def hide := gui.hideScriptText
  384.  
  385.  
  386.  
  387. \# wait on game variables
  388.  
  389. def wait(x) := if (x > 0) {
  390. yield()
  391. wait(x - 1)
  392. }
  393. 0:0: ExecutionBlock
  394. 6:16: DecNode(Worker,1)
  395. 6:15: ConstNode NativeValue<int>(0x8466c60) = 0
  396. 7:18: DecNode(Explorer,1)
  397. 7:17: ConstNode NativeValue<int>(0x8466c60) = 1
  398. 8:17: DecNode(Warrior,1)
  399. 8:16: ConstNode NativeValue<int>(0x8466c60) = 2
  400. 10:36: DecNode(unitsCount,1)
  401. 10:36: SelectNode(unitsCount)
  402. 10:19: DefLookupNode(engine)
  403. 12:21: DecNode(AbilityWalk,1)
  404. 12:20: ConstNode NativeValue<int>(0x8466c60) = 3
  405. 13:21: DecNode(AbilitySwim,1)
  406. 13:20: ConstNode NativeValue<int>(0x8466c60) = 4
  407. 14:20: DecNode(AbilityFly,1)
  408. 14:19: ConstNode NativeValue<int>(0x8466c60) = 5
  409. 15:22: DecNode(AbilityBuild,1)
  410. 15:21: ConstNode NativeValue<int>(0x8466c60) = 6
  411. 16:24: DecNode(AbilityHarvest,1)
  412. 16:23: ConstNode NativeValue<int>(0x8466c60) = 7
  413. 17:28: DecNode(AbilityAttackSpeed,1)
  414. 17:27: ConstNode NativeValue<int>(0x8466c60) = 8
  415. 18:31: DecNode(AbilityAttackStrength,1)
  416. 18:30: ConstNode NativeValue<int>(0x8466c60) = 9
  417. 19:32: DecNode(AbilityMagicAttackAir,1)
  418. 19:30: ConstNode NativeValue<int>(0x8466c60) = 10
  419. 20:35: DecNode(AbilityMagicAttackGround,1)
  420. 20:33: ConstNode NativeValue<int>(0x8466c60) = 11
  421. 22:51: DecNode(unitsUpgradeCount,1)
  422. 22:51: SelectNode(unitsUpgradesCount)
  423. 22:26: DefLookupNode(engine)
  424. 26:15: DecNode(Swarm,1)
  425. 26:14: ConstNode NativeValue<int>(0x8466c60) = 0
  426. 27:13: DecNode(Inn,1)
  427. 27:12: ConstNode NativeValue<int>(0x8466c60) = 1
  428. 28:18: DecNode(Hospital,1)
  429. 28:17: ConstNode NativeValue<int>(0x8466c60) = 2
  430. 29:19: DecNode(Racetrack,1)
  431. 29:18: ConstNode NativeValue<int>(0x8466c60) = 3
  432. 30:14: DecNode(Pool,1)
  433. 30:13: ConstNode NativeValue<int>(0x8466c60) = 4
  434. 31:14: DecNode(Camp,1)
  435. 31:13: ConstNode NativeValue<int>(0x8466c60) = 5
  436. 32:16: DecNode(School,1)
  437. 32:15: ConstNode NativeValue<int>(0x8466c60) = 6
  438. 33:15: DecNode(Tower,1)
  439. 33:14: ConstNode NativeValue<int>(0x8466c60) = 7
  440. 34:15: DecNode(Wall,1)
  441. 34:13: ConstNode NativeValue<int>(0x8466c60) = 11
  442. 36:28: DecNode(Level0Construction,1)
  443. 36:27: ConstNode NativeValue<int>(0x8466c60) = 0
  444. 37:25: DecNode(Level0Completed,1)
  445. 37:24: ConstNode NativeValue<int>(0x8466c60) = 1
  446. 38:28: DecNode(Level1Construction,1)
  447. 38:27: ConstNode NativeValue<int>(0x8466c60) = 2
  448. 39:25: DecNode(Level1Completed,1)
  449. 39:24: ConstNode NativeValue<int>(0x8466c60) = 3
  450. 40:28: DecNode(Level2Construction,1)
  451. 40:27: ConstNode NativeValue<int>(0x8466c60) = 4
  452. 41:25: DecNode(Level2Completed,1)
  453. 41:24: ConstNode NativeValue<int>(0x8466c60) = 5
  454. 43:44: DecNode(buildingsCount,1)
  455. 43:44: SelectNode(buildingsCount)
  456. 43:23: DefLookupNode(engine)
  457. 47:36: DecNode(teamsCount,1)
  458. 47:36: SelectNode(teamsCount)
  459. 47:19: DefLookupNode(engine)
  460. 48:34: DecNode(isAlive,1)
  461. 48:34: SelectNode(isTeamAlive)
  462. 48:16: DefLookupNode(engine)
  463. 52:26: DecNode(PrimaryObjective,1)
  464. 52:25: ConstNode NativeValue<int>(0x8466c60) = 0
  465. 53:28: DecNode(SecondaryObjective,1)
  466. 53:27: ConstNode NativeValue<int>(0x8466c60) = 1
  467. 54:26: DecNode(InvalidObjective,1)
  468. 54:25: ConstNode NativeValue<int>(0x8466c60) = 2
  469. 62:31: DecNode(show,1)
  470. 62:31: SelectNode(showScriptText)
  471. 62:13: DefLookupNode(gui)
  472. 63:35: DecNode(showTr,1)
  473. 63:35: SelectNode(showScriptTextTr)
  474. 63:15: DefLookupNode(gui)
  475. 64:31: DecNode(hide,1)
  476. 64:31: SelectNode(hideScriptText)
  477. 64:13: DefLookupNode(gui)
  478. 73:2: DecNode(wait,1)
  479. 73:2: FunNode
  480. 70:10: ValPatternNode(x)
  481. 73:2: ApplyNode
  482. 70:27: ApplyNode
  483. 70:16: DefLookupNode(if)
  484. 70:22: ApplyNode
  485. 70:22: SelectNode(>)
  486. 70:20: DefLookupNode(x)
  487. 70:24: ConstNode NativeValue<int>(0x8466c60) = 0
  488. 70:27: ExecutionBlock
  489. 71:9: ApplyNode
  490. 71:2: DefLookupNode(yield)
  491. 71:7: ConstNode Value(0x848c8a0)
  492. 72:13: ApplyNode
  493. 72:2: DefLookupNode(wait)
  494. 72:9: ApplyNode
  495. 72:9: SelectNode(-)
  496. 72:7: DefLookupNode(x)
  497. 72:11: ConstNode NativeValue<int>(0x8466c60) = 1
  498.  
  499. Value(0x848c8a0)
  500.  
  501. 0:0: ExecutionBlock
  502.  
  503. glob2: libgag/src/BinaryStream.cpp:107: virtual std::string GAGCore::BinaryInputStream::readText(const char*): Assertion `len < 1024*1024' failed.
  504. Przerwane
  505.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement