Advertisement
jargon

ps5fb parsecfg.bas

Aug 16th, 2020 (edited)
1,810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #lang "fblite"
  2. Option GoSub
  3.  
  4. sub parsecfg(Key as string,Value as string)
  5.  
  6.     call debugviewer(Key+"="+Value)
  7.  
  8. 10000 'parse configuration file
  9. 10001 select case ucase(Key)
  10.  
  11. 10100 'integers
  12.  
  13. 'define _macro_
  14. 'ifdef _macro_
  15.     ' Special statements for debugging
  16. 'endif
  17.  
  18. #define _macro_
  19. #ifdef _macro_
  20. 10101 case is = "WD":WD=val(Value):exit select
  21. #endif
  22.  
  23. #define _macro_
  24. #ifdef _macro_
  25. 10102 case is = "MP":MP=val(Value):exit select
  26. #endif
  27.  
  28. #define _macro_
  29. #ifdef _macro_
  30. 10103 case is = "XP":XP=val(Value):exit select
  31. #endif
  32.  
  33. #define _macro_
  34. #ifdef _macro_
  35. 10104 case is = "YP":YP=val(Value):exit select
  36. #endif
  37.  
  38. #define _macro_
  39. #ifdef _macro_
  40. 10105 case is = "PS":PS=val(Value):exit select
  41. #endif
  42.  
  43. #define _macro_
  44. #ifdef _macro_
  45. 10106 case is = "XX":XX=val(Value):exit select
  46. #endif
  47.  
  48. #define _macro_
  49. #ifdef _macro_
  50. 10107 case is = "YY":YY=val(Value):exit select '
  51. #endif
  52.  
  53. #define _macro_
  54. #ifdef _macro_
  55. 10108 case is = "TT":TT=val(Value):exit select '
  56. #endif
  57.  
  58. #define _macro_
  59. #ifdef _macro_
  60. 10109 case is = "RI":RI=val(Value):exit select
  61. #endif
  62.  
  63. #define _macro_
  64. #ifdef _macro_
  65. 10110 case is = "T1":T1=val(Value):exit select
  66. #endif
  67.  
  68. #define _macro_
  69. #ifdef _macro_
  70. 10111 case is = "T2":T2=val(Value):exit select
  71. #endif
  72.  
  73. #define _macro_
  74. #ifdef _macro_
  75. 10112 case is = "PL":PL=val(Value):exit select
  76. #endif
  77.  
  78. #define _macro_
  79. #ifdef _macro_
  80. 10113 case is = "PC":PC=val(Value):exit select
  81. #endif
  82.  
  83. #define _macro_
  84. #ifdef _macro_
  85. 10114 case is = "T":T=val(Value):exit select
  86. #endif
  87.  
  88. #define _macro_
  89. #ifdef _macro_
  90. 10115 case is = "AA":AA=val(Value):exit select
  91. #endif
  92.  
  93. #define _macro_
  94. #ifdef _macro_
  95. 10116 case is = "DD":DD=val(Value):exit select
  96. #endif
  97.  
  98. #define _macro_
  99. #ifdef _macro_
  100. 10117 case is = "XS":XS=val(Value):exit select
  101. #endif
  102.  
  103. #define _macro_
  104. #ifdef _macro_
  105. 10118 case is = "YS":YS=val(Value):exit select
  106. #endif
  107.  
  108. #define _macro_
  109. #ifdef _macro_
  110. 10119 case is = "TTT":TTT=val(Value):exit select
  111. #endif
  112.  
  113. #define _macro_
  114. #ifdef _macro_
  115. 10120 case is = "XX1":XX1=val(Value):exit select
  116. #endif
  117.  
  118. #define _macro_
  119. #ifdef _macro_
  120. 10121 case is = "YY1":YY1=val(Value):exit select
  121. #endif
  122.  
  123. #define _macro_
  124. #ifdef _macro_
  125. 10122 case is = "XX2":XX2=val(Value):exit select
  126. #endif
  127.  
  128. #define _macro_
  129. #ifdef _macro_
  130. 10123 case is = "YY2":YY2=val(Value):exit select
  131. #endif
  132.  
  133. #define _macro_
  134. #ifdef _macro_
  135. 10124 case is = "X1":X1=val(Value):exit select
  136. #endif
  137.  
  138. #define _macro_
  139. #ifdef _macro_
  140. 10125 case is = "Y1":Y1=val(Value):exit select
  141. #endif
  142.  
  143. #define _macro_
  144. #ifdef _macro_
  145. 10126 case is = "X2":X2=val(Value):exit select
  146. #endif
  147.  
  148. #define _macro_
  149. #ifdef _macro_
  150. 10127 case is = "Y2":Y2=val(Value):exit select
  151. #endif
  152.  
  153. #define _macro_
  154. #ifdef _macro_
  155. 10128 case is = "F":F=val(Value):exit select
  156. #endif
  157.  
  158. #define _macro_
  159. #ifdef _macro_
  160. 10129 case is = "PG0":PG0=val(Value):exit select
  161. #endif
  162.  
  163. #define _macro_
  164. #ifdef _macro_
  165. 10130 case is = "PG1":PG1=val(Value):exit select
  166. #endif
  167.  
  168. #define _macro_
  169. #ifdef _macro_
  170. 10131 case is = "PG2":PG2=val(Value):exit select
  171. #endif
  172.  
  173. #define _macro_
  174. #ifdef _macro_
  175. 10132 case is = "PG3":PG3=val(Value):exit select
  176. #endif
  177.  
  178. #define _macro_
  179. #ifdef _macro_
  180. 10133 case is = "PG4":PG4=val(Value):exit select
  181. #endif
  182.  
  183. #define _macro_
  184. #ifdef _macro_
  185. 10134 case is = "DC":DC=val(Value):exit select
  186. #endif
  187.  
  188. #define _macro_
  189. #ifdef _macro_
  190. 10135 case is = "ADCT":ADCT=val(Value):exit select
  191. #endif
  192.  
  193. #define _macro_
  194. #ifdef _macro_
  195. 10136 case is = "RSCT":RSCT=val(Value):exit select
  196. #endif
  197.  
  198. 10200 'strings
  199.  
  200. #define _macro_
  201. #ifdef _macro_
  202. 10201 case is = "FL":FL=Value:exit select
  203. #endif
  204.  
  205. #define _macro_
  206. #ifdef _macro_
  207. 10202 case is = "F1":F1=Value:exit select
  208. #endif
  209.  
  210. #define _macro_
  211. #ifdef _macro_
  212. 10203 case is = "NM":NM=Value:exit select
  213. #endif
  214.  
  215. #define _macro_
  216. #ifdef _macro_
  217. 10204 case is = "F2":F2=Value:exit select
  218. #endif
  219.  
  220. #define _macro_
  221. #ifdef _macro_
  222. '10205 case is = "RS":RS=Value:exit select
  223. #endif
  224.  
  225. #define _macro_
  226. #ifdef _macro_
  227. 10206 case is = "CM":CM=Value:exit select
  228. #endif
  229.  
  230. #define _macro_
  231. #ifdef _macro_
  232. 10207 case is = "C":C=Value:exit select
  233. #endif
  234.  
  235. #define _macro_
  236. #ifdef _macro_
  237. 10208 case is = "PCS":PCS=Value:exit select
  238. #endif
  239.  
  240. #define _macro_
  241. #ifdef _macro_
  242. 10209 case is = "M":M=Value:exit select
  243. #endif
  244.  
  245. #define _macro_
  246. #ifdef _macro_
  247. 10210 case is = "MF":MF=Value:exit select
  248. #endif
  249.  
  250. #define _macro_
  251. #ifdef _macro_
  252. 10211 case is = "MX":MX=Value:exit select
  253. #endif
  254.  
  255. #define _macro_
  256. #ifdef _macro_
  257. 10212 case is = "V":V=Value:exit select
  258. #endif
  259.  
  260. #define _macro_
  261. #ifdef _macro_
  262. 10213 case is = "VF":VF=Value:exit select
  263. #endif
  264.  
  265. #define _macro_
  266. #ifdef _macro_
  267. '10214 case is = "SP":SP=Value:exit select
  268. #endif
  269.  
  270. #define _macro_
  271. #ifdef _macro_
  272. 10215 case is = "BS":BS=Value:exit select
  273. #endif
  274.  
  275. #define _macro_
  276. #ifdef _macro_
  277. 10216 case is = "FS":FS=Value:exit select
  278. #endif
  279.  
  280. #define _macro_
  281. #ifdef _macro_
  282. '10217 case is = "PA":PA=Value:exit select
  283. #endif
  284.  
  285. #define _macro_
  286. #ifdef _macro_
  287. 10218 case is = "LNS":LNS=Value:exit select
  288. #endif
  289.  
  290. #define _macro_
  291. #ifdef _macro_
  292. 10219 case is = "L":L=Value:exit select
  293. #endif
  294.  
  295. #define _macro_
  296. #ifdef _macro_
  297. 10220 case is = "US":US=Value:exit select
  298. #endif
  299.  
  300. #define _macro_
  301. #ifdef _macro_
  302. 10222 case is = "AAX":AAX=Value:exit select
  303. #endif
  304.  
  305. #define _macro_
  306. #ifdef _macro_
  307. 10223 case is = "AAY":AAY=Value:exit select
  308. #endif
  309.  
  310. 10300 'key strokes
  311.  
  312. #define _macro_
  313. #ifdef _macro_
  314. 10301 case is = "KBKS":KBKS=string$(1,chr$(val(Value))):exit select
  315. #endif
  316.  
  317. #define _macro_
  318. #ifdef _macro_
  319. 10302 case is = "KTAB":KTAB=string$(1,chr$(val(Value))):exit select
  320. #endif
  321.  
  322. #define _macro_
  323. #ifdef _macro_
  324. 10303 case is = "KESC":KESC=string$(1,chr$(val(Value))):exit select
  325. #endif
  326.  
  327. #define _macro_
  328. #ifdef _macro_
  329. 10304 case is = "KSPC":KSPC=string$(1,chr$(val(Value))):exit select
  330. #endif
  331.  
  332. #define _macro_
  333. #ifdef _macro_
  334. 10305 case is = "LB":    LB=string$(1,chr$(val(Value))):exit select
  335. #endif
  336.  
  337. #define _macro_
  338. #ifdef _macro_
  339. 10306 case is = "PA":    PA=string$(1,chr$(val(Value))):exit select
  340. #endif
  341.  
  342. #define _macro_
  343. #ifdef _macro_
  344. 10307 case is = "RB":    RB=string$(1,chr$(val(Value))):exit select
  345. #endif
  346.  
  347. #define _macro_
  348. #ifdef _macro_
  349. 10308 case is = "SP":    SP=string$(1,chr$(val(Value))):exit select
  350. #endif
  351.  
  352. 10400 'Tasks
  353.  
  354. #define _macro_
  355. #ifdef _macro_
  356. 10401 case is = "SCMainLoad":       SCTasks(SCMainLoad)=Value:  exit select
  357. #endif
  358.  
  359. #define _macro_
  360. #ifdef _macro_
  361. 10402 case is = "SCMainOpen":       SCTasks(SCMainOpen)=Value:  exit select
  362. #endif
  363.  
  364. #define _macro_
  365. #ifdef _macro_
  366. 10403 case is = "SCMainWait":       SCTasks(SCMainWait)=Value:  exit select
  367. #endif
  368.  
  369. #define _macro_
  370. #ifdef _macro_
  371. 10404 case is = "SCMainKeys":       SCTasks(SCMainKeys)=Value:  exit select
  372. #endif
  373.  
  374. #define _macro_
  375. #ifdef _macro_
  376. 10405 case is = "SCMainExit":       SCTasks(SCMainExit)=Value:  exit select
  377. #endif
  378.  
  379. #define _macro_
  380. #ifdef _macro_
  381. 10406 case is = "SCMainCode":       SCTasks(SCMainCode)=Value:  exit select
  382. #endif
  383.  
  384.  
  385. 10500 'Graphics
  386.  
  387. #define _macro_
  388. #ifdef _macro_
  389. 10501 case is = "Resolution.X":         Resolution.X=val(Value):        exit select
  390. #endif
  391.  
  392. #define _macro_
  393. #ifdef _macro_
  394. 10502 case is = "Resolution.Y":         Resolution.X=val(Value):        exit select
  395. #endif
  396.  
  397. #define _macro_
  398. #ifdef _macro_
  399. 10503 case is = "Resolution.Depth":     Resolution.Depth=val(Value):    exit select
  400. #endif
  401.  
  402. #define _macro_
  403. #ifdef _macro_
  404. 10504 case is = "Resolution.Pages":     Resolution.Pages=val(Value):    exit select
  405. #endif
  406.  
  407. 10600 'debug
  408.  
  409. #define _macro_
  410. #ifdef _macro_
  411. 10604 case is = "debug":    debug=val(Value):   exit select
  412. #endif
  413.  
  414. 10900 end select
  415. end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement