Advertisement
Guest User

Untitled

a guest
Feb 6th, 2017
782
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 158.35 KB | None | 0 0
  1. '##############
  2. 'Matrix Script
  3. '##############
  4.  
  5. 'Simulates 90s style Full Matrix Line and Terminus Display (Type AEG Krüger)
  6.  
  7. '(c) 17.09.2013 Marcel Kuhnt
  8.  
  9. 'Script Version: 1.0
  10. 'Omsi release: 2.0
  11.  
  12. 'Needs:
  13. '- Cockpit (Batterietrennschalter)
  14. '- IBIS
  15.  
  16. 'NrSpecRandom Seed Area:
  17. '971: Anzahl der Fehlerpixel pro Jahr
  18.  
  19.  
  20. '#############################################
  21. 'chura-Krüger (Krüger+) matrix mod
  22. '0.6 "Coloratura"
  23. '#############################################
  24.  
  25. ' This is a modification of the original AEG Krüger matrix script in OMSI 2.
  26. ' The original script is copyrighted by Marcel Kuhnt.
  27. ' The modified portions of this script are released under CC0 1.0 Universal.
  28. ' See http://creativecommons.org/publicdomain/zero/1.0/ for details.
  29. ' For further information, consult the readme for the chura-Krüger matrix mod.
  30.  
  31.  
  32. 'Revision History:
  33. '- Marcel Kuhnt 29.09.2012 Created from scratch
  34. '- Marcel Kuhnt 17.09.2013 Steckschilder für ausgewählte Ziele
  35. '- Marcel Kuhnt 17.09.2013 Seitenschild
  36. '- Marcel Kuhnt 13.10.2013 Neuer Seitenschildpfad
  37. '- Marcel Kuhnt 20.12.2013 Bugfix: Steckschild-Init
  38. '- 0.5 23.03.2014 Krüger+ mod 0.5 "Sunflower"
  39. '- 0.5 + eps 23.03.2014 School icon in route number fixed
  40. '- 0.6 - eps 24.06.2014 Release 0.6: LED 230×32 matrix option
  41. '- 0.6 - eps/4 30.06.2014 Change in AI display scrolling speed
  42. '------------------------------------------------------------------------------------------
  43.  
  44.  
  45. {macro:Matrix_init}
  46. 0 (S.L.Matrix_TerminusIndex_Last)
  47. 0 (S.L.Matrix_Nr_Last)
  48. " @ @ " (S.$.Matrix_Terminus)
  49. " " (S.$.Matrix_Nr)
  50. -1 (S.L.Matrix_RefreshCursor)
  51. (L.S.Year) (C.L.Matrix_Baujahr) - 0.01 max (C.L.Matrix_Fehlerpixel_pro_Jahr) * 971 (M.V.NrSpecRandom) 1 + * (S.L.Matrix_Fehlerpixel)
  52.  
  53. -1 (S.L.matrix_steckschild_Termindex)
  54. 0 (S.L.matrix_steckschild_vis)
  55.  
  56. (L.L.Matrix_TerminusXLimit) !
  57. {if}
  58. (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit)
  59. (C.L.Matrix_NrRightAlign) (S.L.Matrix_NrRightAlign)
  60. {endif}
  61.  
  62. (C.L.Matrix_UseExtraIBISSuffixes)
  63. {if}
  64. (S.L.Matrix_IBISNrMode)
  65. {endif}
  66.  
  67. 8 (C.L.Matrix_PixelFactor) / (S.L.Matrix_Res)
  68.  
  69. (L.L.Matrix_NrMaxStdGlyphWidth) !
  70. {if}
  71. 15 (L.L.Matrix_Res) * 6 - (S.L.Matrix_NrMaxStdGlyphWidth)
  72. {endif}
  73.  
  74. (C.L.Matrix_PixelRefreshSpeed) (S.L.Matrix_PixelRefreshSpeed)
  75. (C.L.Matrix_PageDuration) (S.L.Matrix_PageDuration)
  76. (C.L.Matrix_LEDHue) (S.L.Matrix_LEDHue)
  77. (C.L.Matrix_LEDSaturation) (S.L.Matrix_LEDSaturation)
  78. (C.L.Matrix_LEDBrightness) (S.L.Matrix_LEDBrightness)
  79. (C.L.Matrix_LEDBGHue) (S.L.Matrix_LEDBGHue)
  80. (C.L.Matrix_LEDBGSaturation) (S.L.Matrix_LEDBGSaturation)
  81. (C.L.Matrix_LEDBGBrightness) (S.L.Matrix_LEDBGBrightness)
  82.  
  83. (C.L.Matrix_LED) (S.L.Matrix_LED)
  84. {if}
  85. (C.L.Matrix_LEDMonochrome) (S.L.Matrix_LEDMonochrome)
  86. (M.L.Matrix_LEDResetColours)
  87. {else}
  88. 0 (S.L.Matrix_LEDMonochrome)
  89. {endif}
  90. {end}
  91.  
  92. {trigger:ai_scheduled_settarget}
  93. (M.L.Vollmatrix-AI-Setting)
  94. {end}
  95.  
  96. {macro:Vollmatrix-AI-Setting}
  97. 'Stromversorgung herstellen:
  98. 1 (S.L.elec_busbar_main_sw)
  99. 1.0 (S.L.elec_V_battery)
  100.  
  101. 'Hier wird die Nummer eingestellt:
  102. (L.$.SetLineTo) (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  103.  
  104. 'Hier wird das Ziel eingestellt:
  105. 1 (S.L.elec_busbar_main_sw)
  106.  
  107. (L.L.AI_target_index) s0 (M.V.GetTerminusCode) s1
  108. 'Wenn der Terminus-Code größer als 1000 ist, dann bitte Steckschild verwenden:
  109. 1000 >
  110. l0 6 (M.V.GetTerminusString) "" $= ! &&
  111. {if}
  112. l1 1000 - (S.L.matrix_steckschild_index)
  113. l0 (S.L.matrix_steckschild_Termindex)
  114. 'Matrix auf 0:
  115. 0 (S.L.IBIS_TerminusIndex) s2
  116. {else}
  117. l0 (S.L.IBIS_TerminusIndex) s2
  118. l1 1000 % 15000 + (M.V.GetTerminusIndex) s3 0 >=
  119. {if}
  120. l3 (S.L.IBIS_TerminusIndex) s2
  121. {else}
  122. l1 20000 + (M.V.GetTerminusIndex) s3 0 >=
  123. {if}
  124. l3 (S.L.IBIS_TerminusIndex) s2
  125. {endif}
  126. {endif}
  127. -1 (S.L.matrix_steckschild_Termindex)
  128. -1 (S.L.Matrix_TerminusIndex_Last)
  129.  
  130. (L.L.Matrix_Res) 1 = {if} 4 {else} 1 {endif} (S.L.Matrix_PixelRefreshSpeed)
  131. (L.L.Matrix_Res) 1 = {if} 0.75 {else} 0.25 {endif}
  132. 163 (M.V.NrSpecRandom) + (S.L.Matrix_PageDuration)
  133.  
  134. 'Wenn der Bitmap-String in Verwendung ist, dann den als Integer interpretieren und Steckschild zusätzlich setzen:
  135. l0 6 (M.V.GetTerminusString) $StrToFloat s1
  136. l1 1000 >
  137. {if}
  138. l1 1000 - (S.L.matrix_steckschild_index)
  139. l0 (S.L.matrix_steckschild_Termindex)
  140. {endif}
  141.  
  142. {endif}
  143. (M.L.matrix_setsteckschild)
  144.  
  145. l2 (M.V.GetTerminusCode) 1000 % (S.L.IBIS_TerminusCode)
  146.  
  147. 1 (S.L.matrix_refresh_seitenschild)
  148. {end}
  149.  
  150.  
  151.  
  152.  
  153. '*******************************************
  154. ' Trigger für Seitenschild
  155.  
  156. {trigger:matrix_seitenschildklemme_drag}
  157. (L.S.mouse_y) -300 / (L.L.matrix_seitenschildklemme) + (S.L.matrix_seitenschildklemme) s0
  158. l0 0 <
  159. {if}
  160. 0 (S.L.matrix_seitenschildklemme)
  161. {endif}
  162. l0 0.7 >
  163. {if}
  164. (L.L.matrix_seitenschild_refresh) 0 =
  165. {if}
  166. 1 (S.L.matrix_seitenschild_refresh)
  167. (T.L.ev_fahrertuer_auf)
  168. (L.$.Matrix_Seitenschild) "" $=
  169. {if}
  170. 1 (S.L.matrix_refresh_seitenschild)
  171. {else}
  172. "" (S.$.Matrix_Seitenschild)
  173. {endif}
  174. {endif}
  175. {endif}
  176. l0 1 >
  177. {if}
  178. 1 (S.L.matrix_seitenschildklemme)
  179. {endif}
  180. {end}
  181.  
  182. {trigger:matrix_seitenschildklemme_off}
  183. (L.L.matrix_seitenschildklemme)
  184. 0.3 >
  185. {if}
  186. (T.L.ev_fahrertuer_zu)
  187. {endif}
  188. 0 (S.L.matrix_seitenschildklemme)
  189. (S.L.matrix_seitenschild_refresh)
  190. {end}
  191.  
  192. '*******************************************
  193. ' Trigger für Steckschild
  194.  
  195. {trigger:bus_matrix_change_steckschild}
  196. (L.L.matrix_steckschild_index) 1 + (S.L.matrix_steckschild_index)
  197. 1000 + (M.V.GetTerminusIndex) (S.L.matrix_steckschild_Termindex)
  198.  
  199. (M.L.matrix_setsteckschild)
  200. (M.L.matrix_refreshIntIndex)
  201. {end}
  202.  
  203. {macro:matrix_setsteckschild}
  204. (L.L.matrix_steckschild_Termindex) s0
  205. 0 >=
  206. {if}
  207. l0 6 (M.V.GetTerminusString) (S.$.Matrix_SchildFrnt)
  208. 1 $SetLengthL $StrToFloat 1 max (S.L.matrix_steckschild_vis)
  209. "..\..\Anzeigen\SteckSchilder\" (L.$.Matrix_SchildFrnt) $+ (S.$.Matrix_SchildFrnt)
  210. {else}
  211. 0 (S.L.matrix_steckschild_index) (S.L.matrix_steckschild_vis)
  212. "" (S.$.Matrix_SchildFrnt)
  213. {endif}
  214. {end}
  215.  
  216.  
  217. {macro:Matrix_frame}
  218.  
  219. '******************************+
  220. ' Terminus-Matrix
  221. '******************************+
  222.  
  223. (L.L.Matrix_Res) 1 =
  224. {if}
  225. "churafont CE 5x4 P" (M.V.GetFontIndex) (S.L.Font_5x3/10x5)
  226. "churafont CE 5x4 P" (M.V.GetFontIndex) (S.L.Font_5x4/10x6B)
  227. "churafont CE 5x4 P" (M.V.GetFontIndex) (S.L.Font_5x5/10x8B) (S.L.Font_5x5/12x8B)
  228. "churafont 7x3" (M.V.GetFontIndex) (S.L.Font_7x3/14x6)
  229. "churafont 7x4" (M.V.GetFontIndex) (S.L.Font_7x4/14x8B)
  230. "churafont 7x5" (M.V.GetFontIndex) (S.L.Font_7x5/14x8B)
  231. "churafont Bold 7x6" (M.V.GetFontIndex) (S.L.Font_7x6B/14x10H)
  232. "churafont CE 8x4 P" (M.V.GetFontIndex) (S.L.Font_8x3/14x6)
  233. "churafont CE 8x4 P" (M.V.GetFontIndex) (S.L.Font_8x4/14x8B)
  234. "churafont CE 8x5 P" (M.V.GetFontIndex) (S.L.Font_8x5/14x8B)
  235. "churafont CE Bold 8x6 P" (M.V.GetFontIndex) (S.L.Font_8x6B/14x10H)
  236. "churafont CE (8-1)x4 P" (M.V.GetFontIndex) (S.L.Font_(8-1)x3/14x6)
  237. "churafont CE (8-1)x4 P" (M.V.GetFontIndex) (S.L.Font_(8-1)x4/14x8B)
  238. "churafont CE (8-1)x5 P" (M.V.GetFontIndex) (S.L.Font_(8-1)x5/14x8B)
  239. "churafont CE Bold (8-1)x6 P" (M.V.GetFontIndex) (S.L.Font_(8-1)x6B/14x10H)
  240. "churafont CE 8x4 P" (M.V.GetFontIndex) (S.L.Font_10x3/18x7)
  241. "churafont CE 8x5 P" (M.V.GetFontIndex) (S.L.Font_10x4/18x8)
  242. "churafont CE Bold 8x6 P" (M.V.GetFontIndex) (S.L.Font_10x5/18x10)
  243. "churafont CE Bold 10x6 P" (M.V.GetFontIndex) (S.L.Font_10x6B/18x12B) (S.L.Font_10x6B/18x10B)
  244. "churafont CE (8+7)x5 P" (M.V.GetFontIndex) (S.L.Font_15x4/32x8) (S.L.Font_15x4/18x8)
  245. "churafont CE Bold (10+5)x6 P" (M.V.GetFontIndex) (S.L.Font_16x5/32x10) (S.L.Font_16x5/18x10)
  246. "churafont CE Bold 16x6 P" (M.V.GetFontIndex) (S.L.Font_16x6/32x14) (S.L.Font_16x6/18x12B)
  247. "churafont CE Bold 16x6 P" (M.V.GetFontIndex) (S.L.Font_16x6B/32x10B)
  248. "churafont CE Bold 16x7 P" (M.V.GetFontIndex) (S.L.Font_16x7B/32x12B)
  249. "churafont CE Bold 16x8 P" (M.V.GetFontIndex) (S.L.Font_16x8B/32x16B)
  250. "churafont Chrono 8x5" (M.V.GetFontIndex) (S.L.Font_Chrono)
  251. "churafont Numeric 16x4 P" (M.V.GetFontIndex) (S.L.Font_Nr_16x4/20x9)
  252. "churafont Numeric 16x5 P" (M.V.GetFontIndex) (S.L.Font_Nr_16x5/20x9)
  253. "churafont Numeric 16x7 P" (M.V.GetFontIndex) (S.L.Font_Nr_16x6/26x11)
  254. "churafont Numeric 16x7 P" (M.V.GetFontIndex) (S.L.Font_Nr_16x7/30x16)
  255. "churafont Numeric 16x9 P" (M.V.GetFontIndex) (S.L.Font_Nr_16x8/32x16)
  256. "churafont Numeric 16x11" (M.V.GetFontIndex) (S.L.Font_Nr_16x11/32x24)
  257. "churafont Pictogram 16" (M.V.GetFontIndex) (S.L.Font_Icon)
  258. {endif}
  259.  
  260. (L.L.Matrix_Res) 2 =
  261. {if}
  262. "churafont++ 10x5" (M.V.GetFontIndex) (S.L.Font_5x3/10x5)
  263. "churafont++ 10x6 Bold" (M.V.GetFontIndex) (S.L.Font_5x4/10x6B)
  264. "churafont++ 10x8 Bold" (M.V.GetFontIndex) (S.L.Font_5x5/10x8B)
  265. "churafont++ 12x8 Bold" (M.V.GetFontIndex) (S.L.Font_5x5/12x8B)
  266. "churafont++ 14x6" (M.V.GetFontIndex) (S.L.Font_7x3/14x6) (S.L.Font_8x3/14x6)
  267. (S.L.Font_(8-1)x3/14x6)
  268. "churafont++ 14x8 Bold" (M.V.GetFontIndex) (S.L.Font_7x4/14x8B) (S.L.Font_8x4/14x8B)
  269. (S.L.Font_(8-1)x4/14x8B)
  270. "churafont++ 14x8 Bold" (M.V.GetFontIndex) (S.L.Font_7x5/14x8B) (S.L.Font_8x5/14x8B)
  271. (S.L.Font_(8-1)x5/14x8B)
  272. "churafont++ 14x10 Heavy" (M.V.GetFontIndex) (S.L.Font_7x6B/14x10H) (S.L.Font_8x6B/14x10H)
  273. (S.L.Font_(8-1)x6B/14x10H)
  274. "churafont++ 18x7" (M.V.GetFontIndex) (S.L.Font_10x3/18x7)
  275. "churafont++ 18x8" (M.V.GetFontIndex) (S.L.Font_10x4/18x8) (S.L.Font_15x4/18x8)
  276. "churafont++ 18x10" (M.V.GetFontIndex) (S.L.Font_10x5/18x10) (S.L.Font_16x5/18x10)
  277. "churafont++ 18x10 Bold" (M.V.GetFontIndex) (S.L.Font_10x6B/18x10B)
  278. "churafont++ 18x12 Bold" (M.V.GetFontIndex) (S.L.Font_10x6B/18x12B) (S.L.Font_16x6/18x12B)
  279. "churafont++ 32x8" (M.V.GetFontIndex) (S.L.Font_15x4/32x8)
  280. "churafont++ 32x10" (M.V.GetFontIndex) (S.L.Font_16x5/32x10)
  281. "churafont++ 32x14" (M.V.GetFontIndex) (S.L.Font_16x6/32x14)
  282. "churafont++ 32x10 Bold" (M.V.GetFontIndex) (S.L.Font_16x6B/32x10B)
  283. "churafont++ 32x12 Bold" (M.V.GetFontIndex) (S.L.Font_16x7B/32x12B)
  284. "churafont++ 32x16 Bold" (M.V.GetFontIndex) (S.L.Font_16x8B/32x16B)
  285. "churafont++ Chrono 16x8" (M.V.GetFontIndex) (S.L.Font_Chrono)
  286. "churafont++ Numeric 20x9" (M.V.GetFontIndex) (S.L.Font_Nr_16x4/20x9) (S.L.Font_Nr_16x5/20x9)
  287. "churafont++ Numeric 26x11" (M.V.GetFontIndex) (S.L.Font_Nr_16x6/26x11)
  288. "churafont++ Numeric 30x16" (M.V.GetFontIndex) (S.L.Font_Nr_16x7/30x16)
  289. "churafont++ Numeric 32x16" (M.V.GetFontIndex) (S.L.Font_Nr_16x8/32x16)
  290. "churafont++ Numeric 32x24" (M.V.GetFontIndex) (S.L.Font_Nr_16x11/32x24)
  291. "churafont++ Pictogram 32" (M.V.GetFontIndex) (S.L.Font_Icon)
  292. {endif}
  293.  
  294. "churafont++ Auxiliary 1" (M.V.GetFontIndex) (S.L.Font_Aux_1)
  295. "churafont++ Auxiliary 2" (M.V.GetFontIndex) (S.L.Font_Aux_2)
  296.  
  297. (C.L.Matrix_HideScrollingAnimation) (S.L.Matrix_HideScrollingAnimation)
  298.  
  299. ' Custom fonts
  300.  
  301. 0 (S.L.Font_Custom1Ypos)
  302. 0 (S.L.Font_Custom2Ypos)
  303. 0 (S.L.Font_CustomNrYpos)
  304.  
  305. 14991 (M.V.GetTerminusIndex) s0
  306. (L.L.Matrix_Res) 2 = s6
  307. {if}
  308. 14996 (M.V.GetTerminusIndex) d -1 = !
  309. {if}
  310. * s0 0 s6
  311. {endif}
  312. {endif}
  313. l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  314. 0 (M.L.matrix_setFontC1Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  315. (S.L.Font_Custom1-1) s1
  316. l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  317. 1 (M.L.matrix_setFontC1Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  318. 1 + 31416 * l1 1 + max 31415 % 1 - (S.L.Font_Custom1-2) s1
  319. l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  320. 2 (M.L.matrix_setFontC1Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  321. 1 + 92654 * l1 1 + max 92653 % 1 - (S.L.Font_Custom1-3) s1
  322. l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  323. 3 (M.L.matrix_setFontC1Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  324. 1 + 58980 * l1 1 + max 58979 % 1 - (S.L.Font_Custom1-4) s1
  325. l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  326. 4 (M.L.matrix_setFontC1Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  327. 1 + 32385 * l1 1 + max 32384 % 1 - (S.L.Font_Custom1-5) s1
  328.  
  329. 14992 (M.V.GetTerminusIndex) s0
  330. (L.L.Matrix_Res) 2 = s6
  331. {if}
  332. 14997 (M.V.GetTerminusIndex) d -1 = !
  333. {if}
  334. * s0 0 s6
  335. {endif}
  336. {endif}
  337. l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  338. 0 (M.L.matrix_setFontC2Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  339. (S.L.Font_Custom2-1) s1
  340. l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  341. 1 (M.L.matrix_setFontC2Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  342. 1 + 62644 * l1 1 + max 62643 % 1 - (S.L.Font_Custom2-2) s1
  343. l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  344. 2 (M.L.matrix_setFontC2Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  345. 1 + 38328 * l1 1 + max 38327 % 1 - (S.L.Font_Custom2-3) s1
  346. l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  347. 3 (M.L.matrix_setFontC2Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  348. 1 + 95029 * l1 1 + max 95028 % 1 - (S.L.Font_Custom2-4) s1
  349. l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  350. 4 (M.L.matrix_setFontC2Ypos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  351. 1 + 84198 * l1 1 + max 84197 % 1 - (S.L.Font_Custom2-5) s1
  352.  
  353. 14993 (M.V.GetTerminusIndex) s0
  354. (L.L.Matrix_Res) 2 = s6
  355. {if}
  356. 14998 (M.V.GetTerminusIndex) d -1 = !
  357. {if}
  358. * s0 0 s6
  359. {endif}
  360. {endif}
  361. l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  362. 0 (M.L.matrix_setFontNrYpos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  363. (S.L.Font_CustomNr1) s1
  364. l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  365. 1 (M.L.matrix_setFontNrYpos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  366. 1 + 16940 * l1 1 + max 16939 % 1 - (S.L.Font_CustomNr2) s1
  367. l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  368. 2 (M.L.matrix_setFontNrYpos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  369. 1 + 93752 * l1 1 + max 93751 % 1 - (S.L.Font_CustomNr3) s1
  370. l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  371. 3 (M.L.matrix_setFontNrYpos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  372. 1 + 05821 * l1 1 + max 05820 % 1 - (S.L.Font_CustomNr4) s1
  373. l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos)
  374. 4 (M.L.matrix_setFontNrYpos) l6 {if} "++" $+ {endif} (M.V.GetFontIndex)
  375. 1 + 97495 * l1 1 + max 97494 % 1 - (S.L.Font_CustomNr5) s1
  376.  
  377. 14994 (M.V.GetTerminusIndex) s0
  378. (L.L.Matrix_Res) 2 = s6
  379. {if}
  380. 14999 (M.V.GetTerminusIndex) d -1 = !
  381. {if}
  382. * s0 0 s6
  383. {endif}
  384. {endif}
  385. l0 0 (M.V.GetTerminusString) l6 {if} "++" $+ {endif}
  386. (M.V.GetFontIndex) (S.L.Font_CustomIcon)
  387.  
  388. (L.L.Matrix_HideScrollingAnimation) (L.L.Matrix_LED) &&
  389. {if}
  390. (L.L.Matrix_Power) -1 =
  391. {if}
  392. (M.L.Matrix_DrawingOn) (M.L.Matrix_DrawingOff)
  393. 0 (S.L.Matrix_Power)
  394. {endif}
  395.  
  396. (L.L.elec_busbar_main) (L.L.Matrix_Power) 0 = &&
  397. {if}
  398. 0 (S.L.Matrix_Nr_Last)
  399. 1 (S.L.Matrix_Power)
  400. {endif}
  401.  
  402. (L.L.elec_busbar_main) (L.L.Matrix_Power) 2 = &&
  403. {if}
  404. (M.L.Matrix_DrawingOn) (M.L.Matrix_DrawingOff)
  405. 1 (S.L.Matrix_Power)
  406. {endif}
  407.  
  408. (L.L.elec_busbar_main) ! (L.L.Matrix_Power) 1 >= &&
  409. {if}
  410. ' (M.L.Matrix_ClearMatrix)
  411. ' 0 (M.V.STNewTex)
  412. -1 (S.L.Matrix_Power)
  413. {endif}
  414. {endif}
  415.  
  416.  
  417. 'Erster Schritt: Linie erstellen:
  418.  
  419. (L.L.IBIS_Linie_Complex) s0 (L.L.Matrix_Nr_Last) = ! ||
  420. (L.L.elec_busbar_main) &&
  421. {if}
  422.  
  423. l0 0 =
  424. {if}
  425. 0 (S.L.IBIS_Route)
  426. -1 (S.L.IBIS_RouteIndex)
  427. 0 (S.L.IBIS_TerminusCode)
  428. 0 (S.L.IBIS_TerminusIndex)
  429. "" (S.$.IBIS_terminus_name)
  430. 0 (S.L.IBIS_busstop_index)
  431. "" (S.$.IBIS_cabindisplay)
  432. 0 (S.L.IBIS_busstop)
  433. 0 (S.L.IBIS_busstop_entwerter_soll)
  434. 0 (S.L.IBIS_busstop_entwerter_ist)
  435. "" (S.$.act_busstop)
  436. "" (S.$.IBIS)
  437. "" (S.$.IBIS_busstop_name)
  438. 0 (S.L.IBIS_mode)
  439. {endif}
  440.  
  441. (L.L.Matrix_SpecifyNr) 1 =
  442. {if}
  443. /-/ (S.L.Matrix_SpecifyNr)
  444. {endif}
  445.  
  446. l0 100 / trunc s1
  447. (L.L.IBIS_Linie_Suffix) s4
  448. ' l0: Originalzahl; l1: erste drei Ziffern; l4: letzte zwei Ziffern
  449.  
  450. ' Falls gleich 0, dann gar nix:
  451. l1 0 =
  452. {if}
  453. ""
  454. {else}
  455. ' Sonst die normale Nummer:
  456. l1 trunc $IntToStr
  457. {endif}
  458.  
  459. ' ===============================================================================
  460. ' Falls jetzt die hinteren beiden Ziffern (l2) etwas Interessantes enthalten:
  461. ' ===============================================================================
  462. (L.L.Matrix_IBISNrMode) 2 = !
  463. {if}
  464. (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  465.  
  466. l4 1 =
  467. {if}
  468. "E" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  469. {endif}
  470. l4 2 =
  471. {if}
  472. "/^\"
  473. {endif}
  474. l4 3 =
  475. {if}
  476. "gh "
  477. {endif}
  478. l4 4 =
  479. {if}
  480. (L.$.Matrix_Nr) 2 $SetLengthR "N" $+
  481. {endif}
  482. l4 5 = l4 24 = ||
  483. {if}
  484. "S" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  485. {endif}
  486. l4 6 =
  487. {if}
  488. "A" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  489. {endif}
  490. l4 9 =
  491. {if}
  492. "E" (L.$.Matrix_Nr) 1 $SetLengthR $+
  493. {endif}
  494. l4 10 =
  495. {if}
  496. (L.$.Matrix_Nr) "E" $+
  497. {endif}
  498. l4 23 =
  499. {if}
  500. "S" (L.$.Matrix_Nr) 1 $SetLengthR $+
  501. {endif}
  502. ' 24 s.o. bei 5!
  503. l4 25 =
  504. {if}
  505. "U" (L.$.Matrix_Nr) 1 $SetLengthR $+
  506. {endif}
  507. l4 26 =
  508. {if}
  509. "U" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  510. {endif}
  511. l4 27 =
  512. {if}
  513. "M" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  514. {endif}
  515. l4 28 =
  516. {if}
  517. "M" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  518. {endif}
  519. l4 29 =
  520. {if}
  521. "BVG"
  522. {endif}
  523. l4 30 =
  524. {if}
  525. (L.$.Matrix_Nr) "S" $+
  526. {endif}
  527. l4 31 =
  528. {if}
  529. (L.$.Matrix_Nr) "U" $+
  530. {endif}
  531. l4 32 =
  532. {if}
  533. (L.$.Matrix_Nr) "M" $+
  534. {endif}
  535. l4 35 =
  536. {if}
  537. "N" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  538. {endif}
  539. l4 36 =
  540. {if}
  541. "X" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+
  542. {endif}
  543. {endif}
  544. l4 69 =
  545. {if}
  546. l1 (S.L.Matrix_IBISNrMode)
  547. {endif}
  548. l4 70 = l4 99 = ||
  549. {if}
  550. ""
  551. {endif}
  552.  
  553. l4 95 =
  554. {if}
  555. "#"
  556. {endif}
  557. l4 95 = !
  558. (L.$.Matrix_Nr) "#" $= &&
  559. {if}
  560. ""
  561. {endif}
  562.  
  563. l4 97 =
  564. {if}
  565. ""
  566. {endif}
  567. l4 97 = !
  568. (L.$.Matrix_Nr) "…" $= &&
  569. {if}
  570. ""
  571. {endif}
  572. l4 98 =
  573. {if}
  574. "€"
  575. {endif}
  576. l4 98 = !
  577. (L.$.Matrix_Nr) "€" $= &&
  578. {if}
  579. ""
  580. {endif}
  581. (L.L.Matrix_IBISNrMode) !
  582. {if}
  583. ' Use default IBIS suffixes
  584. l4 11 =
  585. {if}
  586. "D" (L.$.Matrix_Nr) 1 $SetLengthR $+
  587. {endif}
  588. l4 12 =
  589. {if}
  590. "C" (L.$.Matrix_Nr) 1 $SetLengthR $+
  591. {endif}
  592. l4 13 =
  593. {if}
  594. "B" (L.$.Matrix_Nr) 1 $SetLengthR $+
  595. {endif}
  596. l4 14 =
  597. {if}
  598. "A" (L.$.Matrix_Nr) 1 $SetLengthR $+
  599. {endif}
  600. l4 15 =
  601. {if}
  602. "N" (L.$.Matrix_Nr) 1 $SetLengthR $+
  603. {endif}
  604. {else}
  605. ' Use extra IBIS suffixes
  606. (L.L.Matrix_IBISNrMode) 1 =
  607. {if}
  608. l4 8 =
  609. {if}
  610. "0"
  611. {endif}
  612. l4 11 =
  613. {if}
  614. "1" l1 "03" $IntToStrEnh $+
  615. {endif}
  616. l4 12 =
  617. {if}
  618. "2" l1 "03" $IntToStrEnh $+
  619. {endif}
  620. l4 13 =
  621. {if}
  622. "3" l1 "03" $IntToStrEnh $+
  623. {endif}
  624. l4 14 =
  625. {if}
  626. "4" l1 "03" $IntToStrEnh $+
  627. {endif}
  628. l4 15 =
  629. {if}
  630. "5" l1 "03" $IntToStrEnh $+
  631. {endif}
  632. l4 16 =
  633. {if}
  634. "6" l1 "03" $IntToStrEnh $+
  635. {endif}
  636. l4 17 =
  637. {if}
  638. "7" l1 "03" $IntToStrEnh $+
  639. {endif}
  640. l4 18 =
  641. {if}
  642. "8" l1 "03" $IntToStrEnh $+
  643. {endif}
  644. l4 19 =
  645. {if}
  646. "9" l1 "03" $IntToStrEnh $+
  647. {endif}
  648. l4 20 =
  649. {if}
  650. l1 "02" $IntToStrEnh
  651. {endif}
  652. l4 21 =
  653. {if}
  654. l1 "03" $IntToStrEnh
  655. {endif}
  656. l4 22 =
  657. {if}
  658. l1 "04" $IntToStrEnh
  659. {endif}
  660. l4 37 =
  661. {if}
  662. "CE" (L.$.Matrix_Nr) $+
  663. {endif}
  664. l4 38 =
  665. {if}
  666. "NE" (L.$.Matrix_Nr) $+
  667. {endif}
  668. l4 39 =
  669. {if}
  670. "SB" (L.$.Matrix_Nr) $+
  671. {endif}
  672. l4 40 =
  673. {if}
  674. "DB"
  675. {endif}
  676. l4 41 =
  677. {if}
  678. (L.$.Matrix_Nr) "A" $+
  679. {endif}
  680. l4 42 =
  681. {if}
  682. (L.$.Matrix_Nr) "B" $+
  683. {endif}
  684. l4 43 =
  685. {if}
  686. (L.$.Matrix_Nr) "C" $+
  687. {endif}
  688. l4 44 =
  689. {if}
  690. (L.$.Matrix_Nr) "D" $+
  691. {endif}
  692. l4 45 =
  693. {if}
  694. (L.$.Matrix_Nr) "E" $+
  695. {endif}
  696. l4 46 =
  697. {if}
  698. (L.$.Matrix_Nr) "F" $+
  699. {endif}
  700. l4 47 =
  701. {if}
  702. (L.$.Matrix_Nr) "G" $+
  703. {endif}
  704. l4 48 =
  705. {if}
  706. (L.$.Matrix_Nr) "H" $+
  707. {endif}
  708. l4 49 =
  709. {if}
  710. (L.$.Matrix_Nr) "I" $+
  711. {endif}
  712. l4 50 =
  713. {if}
  714. (L.$.Matrix_Nr) "J" $+
  715. {endif}
  716. l4 51 =
  717. {if}
  718. (L.$.Matrix_Nr) "K" $+
  719. {endif}
  720. l4 52 =
  721. {if}
  722. (L.$.Matrix_Nr) "L" $+
  723. {endif}
  724. l4 53 =
  725. {if}
  726. (L.$.Matrix_Nr) "M" $+
  727. {endif}
  728. l4 54 =
  729. {if}
  730. (L.$.Matrix_Nr) "N" $+
  731. {endif}
  732. l4 55 =
  733. {if}
  734. (L.$.Matrix_Nr) "O" $+
  735. {endif}
  736. l4 56 =
  737. {if}
  738. (L.$.Matrix_Nr) "P" $+
  739. {endif}
  740. l4 57 =
  741. {if}
  742. (L.$.Matrix_Nr) "Q" $+
  743. {endif}
  744. l4 58 =
  745. {if}
  746. (L.$.Matrix_Nr) "R" $+
  747. {endif}
  748. l4 59 =
  749. {if}
  750. (L.$.Matrix_Nr) "S" $+
  751. {endif}
  752. l4 60 =
  753. {if}
  754. (L.$.Matrix_Nr) "T" $+
  755. {endif}
  756. l4 61 =
  757. {if}
  758. (L.$.Matrix_Nr) "U" $+
  759. {endif}
  760. l4 62 =
  761. {if}
  762. (L.$.Matrix_Nr) "V" $+
  763. {endif}
  764. l4 63 =
  765. {if}
  766. (L.$.Matrix_Nr) "W" $+
  767. {endif}
  768. l4 64 =
  769. {if}
  770. (L.$.Matrix_Nr) "X" $+
  771. {endif}
  772. l4 65 =
  773. {if}
  774. (L.$.Matrix_Nr) "Y" $+
  775. {endif}
  776. l4 66 =
  777. {if}
  778. (L.$.Matrix_Nr) "Z" $+
  779. {endif}
  780. l4 71 =
  781. {if}
  782. "A" (L.$.Matrix_Nr) $+
  783. {endif}
  784. l4 72 =
  785. {if}
  786. "B" (L.$.Matrix_Nr) $+
  787. {endif}
  788. l4 73 =
  789. {if}
  790. "C" (L.$.Matrix_Nr) $+
  791. {endif}
  792. l4 74 =
  793. {if}
  794. "D" (L.$.Matrix_Nr) $+
  795. {endif}
  796. l4 75 =
  797. {if}
  798. "E" (L.$.Matrix_Nr) $+
  799. {endif}
  800. l4 76 =
  801. {if}
  802. "F" (L.$.Matrix_Nr) $+
  803. {endif}
  804. l4 77 =
  805. {if}
  806. "G" (L.$.Matrix_Nr) $+
  807. {endif}
  808. l4 78 =
  809. {if}
  810. "H" (L.$.Matrix_Nr) $+
  811. {endif}
  812. l4 79 =
  813. {if}
  814. "I" (L.$.Matrix_Nr) $+
  815. {endif}
  816. l4 80 =
  817. {if}
  818. "J" (L.$.Matrix_Nr) $+
  819. {endif}
  820. l4 81 =
  821. {if}
  822. "K" (L.$.Matrix_Nr) $+
  823. {endif}
  824. l4 82 =
  825. {if}
  826. "L" (L.$.Matrix_Nr) $+
  827. {endif}
  828. l4 83 =
  829. {if}
  830. "M" (L.$.Matrix_Nr) $+
  831. {endif}
  832. l4 84 =
  833. {if}
  834. "N" (L.$.Matrix_Nr) $+
  835. {endif}
  836. l4 85 =
  837. {if}
  838. "O" (L.$.Matrix_Nr) $+
  839. {endif}
  840. l4 86 =
  841. {if}
  842. "P" (L.$.Matrix_Nr) $+
  843. {endif}
  844. l4 87 =
  845. {if}
  846. "Q" (L.$.Matrix_Nr) $+
  847. {endif}
  848. l4 88 =
  849. {if}
  850. "R" (L.$.Matrix_Nr) $+
  851. {endif}
  852. l4 89 =
  853. {if}
  854. "S" (L.$.Matrix_Nr) $+
  855. {endif}
  856. l4 90 =
  857. {if}
  858. "T" (L.$.Matrix_Nr) $+
  859. {endif}
  860. l4 91 =
  861. {if}
  862. "U" (L.$.Matrix_Nr) $+
  863. {endif}
  864. l4 92 =
  865. {if}
  866. "V" (L.$.Matrix_Nr) $+
  867. {endif}
  868. l4 93 =
  869. {if}
  870. "W" (L.$.Matrix_Nr) $+
  871. {endif}
  872. l4 94 =
  873. {if}
  874. "X" (L.$.Matrix_Nr) $+
  875. {endif}
  876. l4 95 =
  877. {if}
  878. "Y" (L.$.Matrix_Nr) $+
  879. {endif}
  880. l4 96 =
  881. {if}
  882. "Z" (L.$.Matrix_Nr) $+
  883. {endif}
  884. {else}
  885. "" (L.$.Matrix_Nr)
  886. l4 1 =
  887. {if}
  888. "A"
  889. {endif}
  890. l4 2 =
  891. {if}
  892. "B"
  893. {endif}
  894. l4 3 =
  895. {if}
  896. "C"
  897. {endif}
  898. l4 4 =
  899. {if}
  900. "D"
  901. {endif}
  902. l4 5 =
  903. {if}
  904. "E"
  905. {endif}
  906. l4 6 =
  907. {if}
  908. "F"
  909. {endif}
  910. l4 7 =
  911. {if}
  912. "G"
  913. {endif}
  914. l4 8 =
  915. {if}
  916. "H"
  917. {endif}
  918. l4 9 =
  919. {if}
  920. "I"
  921. {endif}
  922. l4 10 =
  923. {if}
  924. "J"
  925. {endif}
  926. l4 11 =
  927. {if}
  928. "K"
  929. {endif}
  930. l4 12 =
  931. {if}
  932. "L"
  933. {endif}
  934. l4 13 =
  935. {if}
  936. "M"
  937. {endif}
  938. l4 14 =
  939. {if}
  940. "N"
  941. {endif}
  942. l4 15 =
  943. {if}
  944. "O"
  945. {endif}
  946. l4 16 =
  947. {if}
  948. "P"
  949. {endif}
  950. l4 17 =
  951. {if}
  952. "Q"
  953. {endif}
  954. l4 18 =
  955. {if}
  956. "R"
  957. {endif}
  958. l4 19 =
  959. {if}
  960. "S"
  961. {endif}
  962. l4 20 =
  963. {if}
  964. "T"
  965. {endif}
  966. l4 21 =
  967. {if}
  968. "U"
  969. {endif}
  970. l4 22 =
  971. {if}
  972. "V"
  973. {endif}
  974. l4 23 =
  975. {if}
  976. "W"
  977. {endif}
  978. l4 24 =
  979. {if}
  980. "X"
  981. {endif}
  982. l4 25 =
  983. {if}
  984. "Y"
  985. {endif}
  986. l4 26 =
  987. {if}
  988. "Z"
  989. {endif}
  990. l4 80 =
  991. {if}
  992. "0"
  993. {endif}
  994. l4 81 =
  995. {if}
  996. "1"
  997. {endif}
  998. l4 82 =
  999. {if}
  1000. "2"
  1001. {endif}
  1002. l4 83 =
  1003. {if}
  1004. "3"
  1005. {endif}
  1006. l4 84 =
  1007. {if}
  1008. "4"
  1009. {endif}
  1010. l4 85 =
  1011. {if}
  1012. "5"
  1013. {endif}
  1014. l4 86 =
  1015. {if}
  1016. "6"
  1017. {endif}
  1018. l4 87 =
  1019. {if}
  1020. "7"
  1021. {endif}
  1022. l4 88 =
  1023. {if}
  1024. "8"
  1025. {endif}
  1026. l4 89 =
  1027. {if}
  1028. "9"
  1029. {endif}
  1030. l4 0 = !
  1031. {if}
  1032. $+ (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  1033. l4 30 =
  1034. {if}
  1035. $cutEnd (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  1036. {endif}
  1037. l4 90 =
  1038. {if}
  1039. "" (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  1040. {endif}
  1041. {else}
  1042. (L.$.Matrix_Nr)
  1043. {endif}
  1044. {endif}
  1045. {endif}
  1046. $RemoveSpaces (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
  1047. {endif}
  1048.  
  1049. ' Multi-page display
  1050. (L.S.TimeGap) (L.L.Matrix_Timer) + (S.L.Matrix_Timer) (L.L.Matrix_PageDuration) >=
  1051. (L.L.Matrix_TerminusAct) 0 > &&
  1052. l4 69 = l4 70 = || l4 95 = || l4 97 = || l4 98 = || l4 99 = || ! &&
  1053. {if}
  1054. (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 15000 >=
  1055. {if}
  1056. (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 20000 >=
  1057. {if}
  1058. l0 1000 + (M.V.GetTerminusIndex) s1 0 >=
  1059. {if}
  1060. l1 (S.L.IBIS_TerminusIndex)
  1061. {else}
  1062. l0 21000 >=
  1063. {if}
  1064. l0 1000 % 20000 + (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex)
  1065. {endif}
  1066. {endif}
  1067. {else}
  1068. (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 19000 <=
  1069. l0 1000 + (M.V.GetTerminusIndex) s1 0 >= &&
  1070. {if}
  1071. l1 (S.L.IBIS_TerminusIndex)
  1072. {else}
  1073. l0 1000 % 15000 + (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex)
  1074. {endif}
  1075. {endif}
  1076. {else}
  1077. (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s1 1000 + s0 (M.V.GetTerminusIndex) 0 >= s2
  1078. l0 (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) - 1000 % 0 = &&
  1079. {if}
  1080. l0 (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex)
  1081. {else}
  1082. l1 1000 >=
  1083. l1 15000 < &&
  1084. {if}
  1085. l0 1000 % (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex)
  1086. {endif}
  1087. {endif}
  1088.  
  1089. {endif}
  1090. {endif}
  1091.  
  1092. 'Zweiter Schritt: Ziel erstellen:
  1093.  
  1094.  
  1095. (L.L.IBIS_TerminusIndex) 0 <
  1096. (L.L.IBIS_Linie_Suffix) 69 =
  1097. (L.L.IBIS_Linie_Suffix) 70 = ||
  1098. (L.L.IBIS_Linie_Suffix) 95 = ||
  1099. (L.L.IBIS_Linie_Suffix) 97 = ||
  1100. (L.L.IBIS_Linie_Suffix) 98 = || ! &&
  1101. {if}
  1102. (L.L.Matrix_TerminusIndex_Last) (S.L.IBIS_TerminusIndex)
  1103. {endif}
  1104.  
  1105. (L.L.IBIS_Linie_Suffix) 69 =
  1106. (L.L.IBIS_Linie_Suffix) 70 = ||
  1107. (L.L.IBIS_Linie_Suffix) 95 = ||
  1108. (L.L.IBIS_Linie_Suffix) 97 = ||
  1109. (L.L.IBIS_Linie_Suffix) 98 = ||
  1110. (L.L.IBIS_Linie_Suffix) 99 = || !
  1111. {if}
  1112. (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) s0 1000 <
  1113. l0 20000 + (M.V.GetTerminusIndex) s1 0 >= &&
  1114. {if}
  1115. l1 (S.L.IBIS_TerminusIndex)
  1116. {endif}
  1117. {endif}
  1118.  
  1119. (L.L.IBIS_TerminusIndex) s0 (L.L.Matrix_TerminusIndex_Last) = !
  1120. (L.L.elec_busbar_main) &&
  1121. {if}
  1122. (L.L.Matrix_LED)
  1123. {if}
  1124. "..\..\Anzeigen\Krueger\230x32\palettes\" (L.$.yard) $+ ".bmp" $+
  1125. 6 (M.V.STLoadTex)
  1126. {endif}
  1127.  
  1128. l0 1 (M.V.GetTerminusString) $RemoveSpaces (M.L.Matrix_ProcessAlt)
  1129. 1 (M.L.Matrix_ProcessGoTo) (S.$.Matrix_TerminusL1)
  1130. l0 2 (M.V.GetTerminusString) $RemoveSpaces (M.L.Matrix_ProcessAlt)
  1131. 2 (M.L.Matrix_ProcessGoTo) (S.$.Matrix_TerminusL2)
  1132. l0 3 (M.V.GetTerminusString) $RemoveSpaces (M.L.Matrix_ProcessAlt)
  1133. 3 (M.L.Matrix_ProcessGoTo) (S.$.Matrix_TerminusL3)
  1134.  
  1135. 'Wenn nur die untere Zeile beschrieben ist, dann diese nach oben und untere leeren:
  1136. (L.$.Matrix_TerminusL1) "" $=
  1137. {if}
  1138. (L.$.Matrix_TerminusL2) (S.$.Matrix_TerminusL1)
  1139. "" (S.$.Matrix_TerminusL2)
  1140. {endif}
  1141.  
  1142. (M.L.Matrix_ResetOptions) (M.L.Matrix_SetOptions)
  1143.  
  1144. (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode)
  1145. (L.L.Matrix_TerminusIndex_Last) (M.V.GetTerminusCode) - 1000 %
  1146. (L.L.Matrix_SpecifyNr) 0 >= ||
  1147. {if}
  1148. 0 (S.L.Matrix_SpecifyNr)
  1149. {endif}
  1150.  
  1151. 0 (S.L.Matrix_L3XLimit)
  1152.  
  1153. (L.$.Matrix_TerminusL3) $d "" $= !
  1154. {if}
  1155. (L.L.Font_Aux_2) (M.V.TextLength)
  1156. (S.L.Matrix_CmdCount) 150 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1157. (L.L.Matrix_CmdCount) 300 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1158. (L.L.Matrix_CmdCount) 450 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1159. (L.L.Matrix_CmdCount) 600 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1160. (L.L.Matrix_CmdCount) 750 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1161. (L.L.Matrix_CmdCount) 900 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1162. (L.L.Matrix_CmdCount) 1050 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1163. (L.L.Matrix_CmdCount) 1200 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1164. (L.L.Matrix_CmdCount) 1350 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1165. (L.L.Matrix_CmdCount) 1500 >= {if} (M.L.Matrix_ProcessTerminusL3) {endif}
  1166. {endif}
  1167.  
  1168. (L.$.Matrix_TerminusL2) $d "" $= !
  1169. {if}
  1170. (L.L.Font_Aux_2) (M.V.TextLength)
  1171. (S.L.Matrix_CmdCount) 150 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1172. (L.L.Matrix_CmdCount) 300 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1173. (L.L.Matrix_CmdCount) 450 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1174. (L.L.Matrix_CmdCount) 600 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1175. (L.L.Matrix_CmdCount) 750 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1176. (L.L.Matrix_CmdCount) 900 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1177. (L.L.Matrix_CmdCount) 1050 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1178. (L.L.Matrix_CmdCount) 1200 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1179. (L.L.Matrix_CmdCount) 1350 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1180. (L.L.Matrix_CmdCount) 1500 >= {if} (M.L.Matrix_ProcessTerminusL2) {endif}
  1181. {endif}
  1182.  
  1183. (L.$.Matrix_TerminusL1) $d "" $= !
  1184. {if}
  1185. (L.L.Font_Aux_2) (M.V.TextLength)
  1186. (S.L.Matrix_CmdCount) 150 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1187. (L.L.Matrix_CmdCount) 300 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1188. (L.L.Matrix_CmdCount) 450 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1189. (L.L.Matrix_CmdCount) 600 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1190. (L.L.Matrix_CmdCount) 750 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1191. (L.L.Matrix_CmdCount) 900 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1192. (L.L.Matrix_CmdCount) 1050 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1193. (L.L.Matrix_CmdCount) 1200 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1194. (L.L.Matrix_CmdCount) 1350 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1195. (L.L.Matrix_CmdCount) 1500 >= {if} (M.L.Matrix_ProcessTerminusL1) {endif}
  1196. {endif}
  1197.  
  1198. (L.$.Matrix_Nr) "" $=
  1199. (L.$.Matrix_NrSpecified) "" $= (L.L.Matrix_SpecifyNr) && ||
  1200. {if}
  1201. 0 (S.L.Matrix_NrBGHue) (S.L.Matrix_NrBGSaturation) (S.L.Matrix_NrBGBrightness)
  1202. {endif}
  1203.  
  1204. (L.$.Matrix_TerminusL2) "" $=
  1205. {if}
  1206. (L.$.Matrix_TerminusL1) (M.L.Matrix_HasDescenderCE) (S.L.Matrix_L1HasDescender) (S.L.Matrix_L1HasDescenderCE)
  1207. {else}
  1208. (L.L.Matrix_L1CEMode)
  1209. {if}
  1210. (L.$.Matrix_TerminusL1) (M.L.Matrix_HasTallGlyphCE) (S.L.Matrix_L1HasTallGlyphCE)
  1211. {else}
  1212. (L.$.Matrix_TerminusL1) (M.L.Matrix_HasDescender) (S.L.Matrix_L1HasDescender)
  1213. {endif}
  1214. (L.L.Matrix_L2CEMode)
  1215. {if}
  1216. (L.$.Matrix_TerminusL2) (M.L.Matrix_HasTallGlyphCE) (S.L.Matrix_L2HasTallGlyphCE)
  1217. {else}
  1218. (L.$.Matrix_TerminusL2) (M.L.Matrix_HasDescender) (S.L.Matrix_L2HasDescender)
  1219. {endif}
  1220. {endif}
  1221.  
  1222. (L.L.Matrix_L3XLimit) !
  1223. {if}
  1224. (L.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL3)
  1225. (L.L.Matrix_L1HasDescenderCE) (S.L.Matrix_L3HasDescenderCE)
  1226. {else}
  1227. (L.$.Matrix_TerminusL3) (M.L.Matrix_HasDescenderCE) (S.L.Matrix_L3HasDescenderCE)
  1228. {endif}
  1229. {endif}
  1230.  
  1231. (L.L.IBIS_Linie_Suffix) 95 =
  1232. {if}
  1233. (M.L.petla_pauza)
  1234. {endif}
  1235.  
  1236. (L.L.IBIS_Linie_Suffix) 97 =
  1237. {if}
  1238. (S.L.Matrix_L1HasDescenderCE) (S.L.Matrix_L3HasDescenderCE)
  1239. (S.L.Matrix_NrDisabled)
  1240. "*…" (S.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL3)
  1241. "" (S.$.Matrix_TerminusL2)
  1242. (C.L.Matrix_Width) (L.L.Font_Icon) "…" (M.V.TextLength) - 2 / trunc (S.L.Matrix_IconXpos)
  1243. -97 (S.L.IBIS_TerminusIndex) (M.L.Matrix_ProcessTerminusL1)
  1244. {endif}
  1245.  
  1246. (L.L.IBIS_Linie_Suffix) 98 =
  1247. {if}
  1248. (L.S.Time) 0.5 + 86400 % s2 60 / trunc (L.L.Matrix_Clock) 60 / trunc >
  1249. (L.S.Time) 43200 + (L.L.Matrix_Clock) < ||
  1250. (L.L.IBIS_TerminusIndex) -98 =
  1251. (L.L.IBIS_TerminusIndex) -198 = || ! ||
  1252. (L.L.Matrix_Timer) 4 >= ||
  1253. {if}
  1254. (L.S.Year) $IntToStr "-" $+
  1255. (L.S.Month) "02" $IntToStrEnh $+ "-" $+
  1256. (L.S.Day) "02" $IntToStrEnh $+
  1257. (M.V.GetTTBusstopIndex) s3 0 < s4
  1258. {if}
  1259. (S.$.Matrix_TerminusL1)
  1260. {else}
  1261. " " $+
  1262. {endif}
  1263. l2 (S.L.Matrix_Clock) 0.5 + 3600 / s0 trunc "02" $IntToStrEnh "." $+
  1264. l0 1 % 60 * s1 trunc "02" $IntToStrEnh $+
  1265. l4 !
  1266. {if}
  1267. $+ (S.$.Matrix_TerminusL1)
  1268. {else}
  1269. " " $+
  1270. {endif}
  1271. (L.S.Weather_Temperature) 99 min -99 max $IntToStr "C" $+
  1272. l4
  1273. {if}
  1274. $+ (S.$.Matrix_TerminusL2)
  1275. {else}
  1276. " D " $+
  1277. l3 (M.V.GetTTBusstopDep) 60 / s1 60 / 24 % trunc "02" $IntToStrEnh $+ "." $+
  1278. l1 60 % trunc "02" $IntToStrEnh $+
  1279. (S.$.Matrix_TerminusL2)
  1280. {endif}
  1281. (L.L.IBIS_TerminusIndex) -98 =
  1282. {if}
  1283. -198 (S.L.IBIS_TerminusIndex)
  1284. {else}
  1285. -98 (S.L.IBIS_TerminusIndex)
  1286. {endif}
  1287. 0 (S.L.Matrix_Timer)
  1288. {endif}
  1289. {endif}
  1290.  
  1291.  
  1292. (L.L.IBIS_Linie_Complex) 97 <
  1293. (L.L.IBIS_Linie_Complex) 98 > ||
  1294. (L.L.Matrix_TerminusIndex_Last) s1 -69 =
  1295. l1 -70 = ||
  1296. l1 -170 = ||
  1297. l1 -95 = ||
  1298. l1 -195 = ||
  1299. l1 -97 = ||
  1300. l1 -98 = ||
  1301. l1 -198 = || &&
  1302. {if}
  1303. "" (S.$.Matrix_Icon) (S.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL2)
  1304. -1 (S.L.IBIS_TerminusIndex)
  1305. {endif}
  1306.  
  1307. (C.L.Matrix_AutoCapitalize)
  1308. (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) 14900 < &&
  1309. (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) 0 > &&
  1310. {if}
  1311. (L.$.Matrix_TerminusL1) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL1)
  1312. (L.$.Matrix_TerminusL2) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL2)
  1313. (L.$.Matrix_TerminusL3) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL3)
  1314. {endif}
  1315.  
  1316. 'Dritter Schritt: Speicherbitmap schreiben:
  1317.  
  1318. (L.L.IBIS_Linie_Complex) (L.L.Matrix_Nr_Last) = !
  1319. (L.L.IBIS_TerminusIndex) s0 (L.L.Matrix_TerminusIndex_Last) s1 = ! ||
  1320. (L.L.elec_busbar_main) &&
  1321. {if}
  1322. ' if-1-1
  1323. (L.L.Matrix_HideScrollingAnimation)
  1324. {if}
  1325. (L.L.Matrix_IsDrawing)
  1326. {if}
  1327. (M.L.Matrix_DrawingOff)
  1328. 0 (M.V.STNewTex)
  1329. {endif}
  1330.  
  1331. (L.L.Matrix_RefreshCursor) 0 <
  1332. {if}
  1333. 0 (M.V.STNewTex)
  1334. {endif}
  1335. {endif}
  1336.  
  1337. l0 (S.L.Matrix_TerminusAct)
  1338. (L.L.IBIS_Linie_Complex) (S.L.Matrix_Nr_Last)
  1339. (L.L.IBIS_Linie_Suffix) 69 = !
  1340. (L.L.IBIS_Linie_Suffix) 99 = ! &&
  1341. {if}
  1342. ' if-1-2
  1343. 0 (S.L.Matrix_BmpFullColour)
  1344. l0 7 (M.V.GetTerminusString) $RemoveSpaces
  1345. (M.L.Matrix_MonochromeAlt) (M.L.Matrix_MultiColourAlt) (M.L.Matrix_MonochromeAlt)
  1346. (S.$.Matrix_Bitmapfilename)
  1347. "" $=
  1348. {if}
  1349. ' if-1-3
  1350.  
  1351. '3.0 Initialisieren der Bitmap und setzen der Farbe:
  1352.  
  1353. (L.L.Matrix_HideScrollingAnimation) !
  1354. {if}
  1355. 0 (M.V.STNewTex)
  1356. {endif}
  1357. 0 (M.V.STLock)
  1358.  
  1359. 0
  1360. 0
  1361. 255
  1362. 0
  1363. 0
  1364. (M.V.STSetColor)
  1365.  
  1366.  
  1367. 'Ab hier gelten folgende Register-Zuordnungen:
  1368. 'l0 = Fontindex
  1369. 'l1 = Stringlänge (Pixel)
  1370. 'l2 = Y-Offset
  1371. 'l3 = Verfügbare Länge
  1372. 'l4 = Einzeilig
  1373. 'l5 = Zentrierungsaufschlag
  1374. 'l6 =
  1375. 'l7 = (max.) Sperrung
  1376.  
  1377.  
  1378.  
  1379. (L.$.Matrix_Nr) "" $=
  1380. (L.$.Matrix_NrSpecified) "" $=
  1381. (L.L.Matrix_SpecifyNr) 1 = && ||
  1382. (L.L.Matrix_NrDisabled) ||
  1383. {if}
  1384. ' if-1-4
  1385. 0 s1 (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos) (S.L.Matrix_NrPixelLength)
  1386. {else}
  1387. ' else-1-4
  1388.  
  1389. '3.A.0 Inverted number margin:
  1390. (L.L.Matrix_NrInvert) (L.L.Matrix_Invert) ||
  1391. (L.L.Matrix_NrBGBrightness) 0.05 >= || (L.L.Matrix_Res) * s6
  1392. '3.A.05 Setzen der Maximalbreite:
  1393. (C.L.Matrix_NrFrontMaxWidth) l6 2 * - s3
  1394. '3.A.1 Bestimmen des Fonts der Linie (vorne):
  1395. (L.L.Matrix_SpecifyNr) 1 =
  1396. {if}
  1397. (L.$.Matrix_NrSpecified)
  1398. {else}
  1399. (L.$.Matrix_Nr)
  1400. {endif}
  1401. (S.$.Matrix_NrDisplayed)
  1402. (L.$.Matrix_NrDisplayed) 1 $SetLengthR $StrToFloat -1 =
  1403. (L.$.Matrix_NrDisplayed) 2 $SetLengthR 1 $SetLengthL $StrToFloat -1 = ! &&
  1404. (C.L.Matrix_UseSmallNrSuffix) &&
  1405. {if}
  1406. (L.$.Matrix_NrDisplayed) 1 $SetLengthR (M.L.Matrix_CharToLowerCase) (S.$.Matrix_Nr_Suffix)
  1407. (L.$.Matrix_NrDisplayed) 1 $cutEnd (L.$.Matrix_Nr_Suffix) $+ (S.$.Matrix_NrDisplayed)
  1408. {endif}
  1409. (L.$.Matrix_NrDisplayed) 2 $SetLengthL "CE" $=
  1410. {if}
  1411. "{" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed)
  1412. {endif}
  1413. (L.$.Matrix_NrDisplayed) 2 $SetLengthL "NE" $=
  1414. {if}
  1415. "|" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed)
  1416. {endif}
  1417. (L.$.Matrix_NrDisplayed) 2 $SetLengthL "SB" $=
  1418. {if}
  1419. "}" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed)
  1420. {endif}
  1421. (L.$.Matrix_NrDisplayed) "gh" $=
  1422. {if}
  1423. "†" (S.$.Matrix_NrDisplayed)
  1424. {endif}
  1425. (L.$.Matrix_NrDisplayed) "DB" $=
  1426. {if}
  1427. "–" (S.$.Matrix_NrDisplayed)
  1428. {endif}
  1429. (L.$.Matrix_NrDisplayed) "/^\" $=
  1430. {if}
  1431. "—" (S.$.Matrix_NrDisplayed)
  1432. {endif}
  1433.  
  1434. (L.$.Matrix_NrDisplayed) 5 $SetLengthR $RemoveSpaces (S.$.Matrix_NrDisplayed)
  1435.  
  1436. (L.L.Font_CustomMode) 100 / trunc 1 >=
  1437. {if}
  1438. ' if-1-5
  1439. ' Custom font for route number
  1440. 0 s7
  1441. (L.$.Matrix_NrDisplayed) (S.$.Matrix_InputLine)
  1442.  
  1443. (L.L.Font_CustomNr1) (S.L.Matrix_FontSel1)
  1444. (L.L.Font_CustomNr2) (S.L.Matrix_FontSel2)
  1445. (L.L.Font_CustomNr3) (S.L.Matrix_FontSel3)
  1446. (L.L.Font_CustomNr4) (S.L.Matrix_FontSel4)
  1447. (L.L.Font_CustomNr5) (S.L.Matrix_FontSel5)
  1448.  
  1449. (L.L.Font_CustomMode) 100 / trunc 1 = ! (S.L.Matrix_FontCond1)
  1450. (L.L.Font_CustomMode) 100 / trunc 2 = ! (S.L.Matrix_FontCond2)
  1451. (L.L.Font_CustomMode) 100 / trunc 3 = ! (S.L.Matrix_FontCond3)
  1452. (L.L.Font_CustomMode) 100 / trunc 4 = ! (S.L.Matrix_FontCond4)
  1453.  
  1454. 0 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos1)
  1455. 1 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos2)
  1456. 2 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos3)
  1457. 3 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos4)
  1458. 4 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos5)
  1459.  
  1460. 15 (M.L.Matrix_FontSel)
  1461. {else}
  1462. ' else-1-5
  1463. ' No custom font for route number
  1464. (L.$.Matrix_NrDisplayed) (S.$.Matrix_InputLine)
  1465.  
  1466. (L.L.Font_Nr_16x11/32x24) (S.L.Matrix_FontSel1)
  1467. (L.L.Font_Nr_16x8/32x16) (S.L.Matrix_FontSel2)
  1468. (L.L.Font_Nr_16x7/30x16) (S.L.Matrix_FontSel3)
  1469.  
  1470. (L.L.Font_Nr_16x11/32x24) (L.$.Matrix_NrDisplayed) (M.V.TextLength)
  1471. (L.L.Matrix_Res) sqr +
  1472. (L.$.Matrix_Icon) "" $=
  1473. {if}
  1474. *
  1475. {else}
  1476. +
  1477. (L.L.Matrix_UseCustomIcon)
  1478. {if}
  1479. * (L.L.Font_CustomIcon)
  1480. {else}
  1481. + (L.L.Font_Icon)
  1482. {endif}
  1483. (L.$.Matrix_Icon) (M.V.TextLength) + (L.L.Matrix_Res) +
  1484. {endif}
  1485. (L.$.Matrix_TerminusL2) "" $=
  1486. {if}
  1487. *
  1488. (L.L.Matrix_L3XLimit) 0 >
  1489. {if}
  1490. *
  1491. (L.L.Matrix_L1Bold) {if} * (L.L.Font_16x6/18x12B) {else} + (L.L.Font_16x5/18x10) {endif}
  1492. {else}
  1493. +
  1494. (L.L.Font_16x8B/32x16B)
  1495. {endif}
  1496. (L.$.Matrix_TerminusL1) (M.V.TextLength) +
  1497. {else}
  1498. +
  1499. (L.L.Matrix_L2SmallFont) (L.L.Matrix_L1SmallFont) ! &&
  1500. {if}
  1501. *
  1502. (L.L.Matrix_L1Bold) {if} * (L.L.Font_10x6B/18x12B) {else} + (L.L.Font_10x5/18x10) {endif}
  1503. (L.$.Matrix_TerminusL1) (M.V.TextLength)
  1504. {else}
  1505. +
  1506. (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) ! &&
  1507. {if}
  1508. *
  1509. (L.L.Matrix_L2Bold) {if} * (L.L.Font_10x6B/18x12B) {else} + (L.L.Font_10x5/18x10) {endif}
  1510. (L.$.Matrix_TerminusL2) (M.V.TextLength)
  1511. {else}
  1512. +
  1513. (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) &&
  1514. {if}
  1515. * (L.L.Font_5x5/12x8B) (L.$.Matrix_TerminusL1) (M.V.TextLength)
  1516. (L.L.Font_5x5/12x8B) (L.$.Matrix_TerminusL2) (M.V.TextLength) max
  1517. {else}
  1518. +
  1519. (L.L.Matrix_L1Bold) {if} * (L.L.Font_8x6B/14x10H) {else} + (L.L.Font_8x5/14x8B) {endif}
  1520. (L.$.Matrix_TerminusL1) (M.V.TextLength)
  1521. (L.L.Matrix_L2Bold) {if} * (L.L.Font_8x6B/14x10H) {else} + (L.L.Font_8x5/14x8B) {endif}
  1522. (L.$.Matrix_TerminusL2) (M.V.TextLength) max
  1523. {endif}
  1524. {endif}
  1525. {endif}
  1526. {endif}
  1527. (L.L.Matrix_L3XLimit) 0 >
  1528. {if}
  1529. * (L.L.Font_16x8B/32x16B) (L.$.Matrix_TerminusL3) (M.V.TextLength)
  1530. {endif}
  1531. +
  1532. (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode)
  1533. (L.L.Matrix_TerminusIndex_Last) (M.V.GetTerminusCode)
  1534. - 1000 %
  1535. {if}
  1536. d - + (S.L.Matrix_TerminusMaxLength)
  1537. {else}
  1538. + (L.L.Matrix_TerminusMaxLength) max (S.L.Matrix_TerminusMaxLength)
  1539. {endif}
  1540. (C.L.Matrix_Width) >=
  1541. (L.L.Matrix_NrMaxStdGlyphWidth) 13 (L.L.Matrix_Res) * 2 - < ||
  1542. (L.L.Matrix_NrForceLargeFont) ! &&
  1543. (S.L.Matrix_FontCond1)
  1544. (L.L.Matrix_NrMaxStdGlyphWidth) 8 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond2)
  1545. 3 (M.L.Matrix_FontSel)
  1546. (L.L.Matrix_NrYpos) s2
  1547. {endif}
  1548. ' endifelse-1-5
  1549.  
  1550.  
  1551. ' l0: Schriftart, l1: Länge in Pixeln
  1552.  
  1553. '3.A.2 Schreiben:
  1554.  
  1555. l6
  1556. {if}
  1557. l6 2 * l1 + (C.L.Matrix_NrFrontMinWidth) <
  1558. {if}
  1559. (C.L.Matrix_NrFrontMinWidth) l1 - 2 / trunc s6
  1560. {endif}
  1561. l6 2 * l1 + s1
  1562. {endif}
  1563. l1 (S.L.Matrix_NrPixelLength)
  1564.  
  1565. (L.L.Matrix_NrRightAlign)
  1566. {if}
  1567. (C.L.Matrix_Width) l1 - (L.L.Matrix_Res) -
  1568. (C.L.Matrix_Width) (C.L.Matrix_NrFrontMinWidth) - min
  1569. 2 -
  1570. (S.L.Matrix_TerminusXLimit)
  1571. {else}
  1572. (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit)
  1573. {endif}
  1574.  
  1575. (L.L.Matrix_Res) 2 = {if} 0 s2 {endif}
  1576.  
  1577. 0
  1578. (L.L.Matrix_TerminusXLimit) (L.L.Matrix_Res) + (L.L.Matrix_NrRightAlign) * l6 +
  1579. l2
  1580. l0
  1581. 1
  1582. 0
  1583. (L.$.Matrix_NrDisplayed)
  1584. (M.V.STTextOut)
  1585.  
  1586. '3.A.3 Bestimmen des Startpunktes des Zieles (Matrix_Xpos):
  1587. (L.L.Matrix_NrRightAlign)
  1588. {if}
  1589. 0
  1590. {else}
  1591. l1 (L.L.Matrix_Res) sqr + (C.L.Matrix_NrFrontMinWidth) max
  1592. {endif}
  1593. (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos)
  1594.  
  1595. '3.A.4 Bestimmen des Fonts der Linie (seite/hinten):
  1596.  
  1597. (C.L.Matrix_NrSideMaxWidth) s3
  1598.  
  1599. (L.L.Font_CustomMode) 100 / trunc 1 >=
  1600. {if}
  1601. ' if-1-6
  1602. ' Custom font for route number
  1603. 0 s7
  1604. (L.$.Matrix_NrDisplayed) (S.$.Matrix_InputLine)
  1605.  
  1606. (L.L.Font_CustomNr1) (S.L.Matrix_FontSel1)
  1607. (L.L.Font_CustomNr2) (S.L.Matrix_FontSel2)
  1608. (L.L.Font_CustomNr3) (S.L.Matrix_FontSel3)
  1609. (L.L.Font_CustomNr4) (S.L.Matrix_FontSel4)
  1610. (L.L.Font_CustomNr5) (S.L.Matrix_FontSel5)
  1611.  
  1612. (L.L.Font_CustomMode) 100 / trunc 1 = ! (S.L.Matrix_FontCond1)
  1613. (L.L.Font_CustomMode) 100 / trunc 2 = ! (S.L.Matrix_FontCond2)
  1614. (L.L.Font_CustomMode) 100 / trunc 3 = ! (S.L.Matrix_FontCond3)
  1615. (L.L.Font_CustomMode) 100 / trunc 4 = ! (S.L.Matrix_FontCond4)
  1616.  
  1617. 0 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos1)
  1618. 1 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos2)
  1619. 2 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos3)
  1620. 3 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos4)
  1621. 4 (M.L.matrix_getFontNrYpos) (S.L.Matrix_FontYPos5)
  1622.  
  1623. 15 (M.L.Matrix_FontSel)
  1624. {else}
  1625. ' else-1-6
  1626. ' No custom font for route number
  1627. 0 s7
  1628. (L.$.Matrix_NrDisplayed) (S.$.Matrix_InputLine)
  1629.  
  1630. (L.L.Font_Nr_16x11/32x24) (S.L.Matrix_FontSel1)
  1631. (L.L.Font_Nr_16x8/32x16) (S.L.Matrix_FontSel2)
  1632. (L.L.Font_Nr_16x7/30x16) (S.L.Matrix_FontSel3)
  1633. (L.L.Font_Nr_16x6/26x11) (S.L.Matrix_FontSel4)
  1634. (L.L.Font_Nr_16x5/20x9) (S.L.Matrix_FontSel5)
  1635. (L.L.Font_Nr_16x4/20x9) (S.L.Matrix_FontSel6)
  1636.  
  1637. (L.L.Matrix_NrMaxStdGlyphWidth) 13 (L.L.Matrix_Res) * 2 - < (S.L.Matrix_FontCond1)
  1638. (L.L.Matrix_NrMaxStdGlyphWidth) 8 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond2)
  1639. (L.L.Matrix_NrMaxStdGlyphWidth) 9 (L.L.Matrix_Res) * 2 - < (S.L.Matrix_FontCond3)
  1640. (L.L.Matrix_NrMaxStdGlyphWidth) 5 (L.L.Matrix_Res) * 1 + < (S.L.Matrix_FontCond4)
  1641. (L.L.Matrix_NrMaxStdGlyphWidth) 4 (L.L.Matrix_Res) * 1 + < (S.L.Matrix_FontCond5)
  1642.  
  1643. 6 (M.L.Matrix_FontSel)
  1644. (L.L.Matrix_NrYpos) s2
  1645. {endif}
  1646.  
  1647.  
  1648. ' l0: Schriftart, l1: Länge in Pixeln
  1649.  
  1650. '3.A.5 Berechnen der Sperrung:
  1651. l3 l1 - l6 / trunc 0 min s7
  1652. l1 l6 l7 * + s1
  1653. '3.A.6 Berechnen des Zentrierungsaufschlages (l5):
  1654. l3 l1 - 2 / trunc s5
  1655.  
  1656. '3.A.7 Schreiben:
  1657. (L.L.Matrix_Res) 2 = {if} 0 s2 {endif}
  1658.  
  1659. 0
  1660. l5
  1661. (C.L.Matrix_Height) l2 (L.L.Matrix_Res) * +
  1662. l0
  1663. 1
  1664. 0
  1665. (L.$.Matrix_NrDisplayed)
  1666. (M.V.STTextOut)
  1667. {endif}
  1668. ' endifelse-1-4
  1669.  
  1670. 'Schreiben des Zieles Front-Anzeige:
  1671.  
  1672. 0 (S.L.Matrix_Ypos)
  1673.  
  1674. (M.L.Matrix_DrawIcon)
  1675. (L.L.Matrix_Xpos) (L.L.Matrix_FrontTerminusXpos) + (L.$.Matrix_Icon) "" $= +
  1676. (S.L.Matrix_Xpos)
  1677. (M.L.Matrix_WriteTerminus)
  1678.  
  1679. (L.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos)
  1680.  
  1681. 'Und Schreiben des Zieles Seitenanzeige:
  1682.  
  1683. (C.L.Matrix_ZielSideStartX) (S.L.Matrix_Xpos)
  1684. (C.L.Matrix_Height) (S.L.Matrix_Ypos)
  1685.  
  1686. (M.L.Matrix_DrawIcon)
  1687.  
  1688. (C.L.Matrix_ZielSideStartX) (L.L.Matrix_IconPixelLength) + (S.L.Matrix_Xpos)
  1689.  
  1690. (M.L.Matrix_WriteTerminus)
  1691.  
  1692. 'Fertig: Unlocken
  1693.  
  1694.  
  1695. 0 (M.V.STUnlock)
  1696.  
  1697. {else}
  1698. ' else-1-3
  1699. "..\..\Anzeigen\Krueger\"
  1700. (L.L.Matrix_Res) 2 =
  1701. {if}
  1702. "230x32\" $+
  1703. {endif}
  1704. (L.$.Matrix_Bitmapfilename) $+ 0 (M.V.STLoadTex) $msg
  1705. (L.L.Matrix_Res) 2 =
  1706. {if}
  1707. 0 (M.V.STLock)
  1708. 0 251 3 (M.V.STReadPixel) 0 (M.V.STGetR)
  1709. 128 >= (S.L.Matrix_BmpFullColour)
  1710. 0 (M.V.STUnlock)
  1711. {endif}
  1712. {endif}
  1713. ' endifelse-1-3
  1714. (L.L.Matrix_TerminusAct) (S.L.Matrix_TerminusIndex_Last)
  1715. (M.L.matrix_refreshIntIndex)
  1716. {endif}
  1717. ' endif-1-2
  1718. 'RefreshCursor zurücksetzen:
  1719. 0 (S.L.Matrix_RefreshCursor)
  1720. {endif}
  1721. ' endif-1-1
  1722.  
  1723.  
  1724.  
  1725. 'Nun sollen die Pixel schrittweise übertragen werden - zunächst mit 1Pixel/Frame:
  1726.  
  1727.  
  1728.  
  1729. (L.L.elec_busbar_main)
  1730. (L.L.Matrix_RefreshCursor) 0 >= &&
  1731. {if}
  1732.  
  1733. 'Locken:
  1734. 0 (M.V.STLock)
  1735. (L.L.Matrix_HideScrollingAnimation) !
  1736. {if}
  1737. (M.L.Matrix_DrawingOn)
  1738. {endif}
  1739.  
  1740.  
  1741. 'Sound abspielen:
  1742.  
  1743. (L.L.Matrix_RefreshCursor) 0 =
  1744. {if}
  1745. (L.L.Matrix_HideScrollingAnimation)
  1746. {if}
  1747. (M.L.Matrix_DrawingOn)
  1748. ' Wait 3 frames for texture to become fully locked before starting to draw
  1749. (L.L.Matrix_Wait) 1 + 3 % (S.L.Matrix_Wait)
  1750. {else}
  1751. (C.L.Matrix_TerminusChangeSound)
  1752. {if}
  1753. (T.L.ev_Matrix_Terminus_change)
  1754. {endif}
  1755. {endif}
  1756. {endif}
  1757.  
  1758. (L.L.Matrix_RefreshCursor) 0 =
  1759. {if}
  1760. (L.L.Matrix_Wait) !
  1761. (L.L.Matrix_Res) 2 = &&
  1762. (L.L.Matrix_HideScrollingAnimation) &&
  1763. {if}
  1764. (M.L.Matrix_DrawBG)
  1765. {endif}
  1766. {endif}
  1767.  
  1768. ' Determine pixel refreshing speed based on settings
  1769. ' NB1 Best results if the number of pixels per frame is divisible by twice the
  1770. ' area of the display in pixels (i.e. 3680 in the Krüger matrix)
  1771. ' NB2 Higher speeds may cause stutters; adjust speed accordingly
  1772. (M.L.Matrix_SetElementCoords)
  1773. (L.L.Matrix_RefreshCursor) 0 >
  1774. (L.L.Matrix_Wait) ! ||
  1775. {if}
  1776.  
  1777. (L.L.Matrix_PixelRefreshSpeed) 2 <=
  1778. {if}
  1779. ' Speed 1: 16 pixels per frame
  1780. (M.L.Matrix_PixelRefresh16)
  1781. (L.L.Matrix_PixelRefreshSpeed) 2 =
  1782. {if}
  1783. ' Speed 2: 23 pixels per frame (+44%)
  1784. (M.L.Matrix_PixelRefresh4)
  1785. (M.L.Matrix_PixelRefresh2)
  1786. (M.L.Matrix_PixelRefresh)
  1787. {endif}
  1788. {else}
  1789. (L.L.Matrix_PixelRefreshSpeed) 4 <=
  1790. {if}
  1791. ' Speed 3: 32 pixels per frame (+39%)
  1792. (M.L.Matrix_PixelRefresh32)
  1793. (L.L.Matrix_PixelRefreshSpeed) 4 =
  1794. {if}
  1795. ' Speed 4: 46 pixels per frame (+44%)
  1796. (M.L.Matrix_PixelRefresh8)
  1797. (M.L.Matrix_PixelRefresh4)
  1798. (M.L.Matrix_PixelRefresh2)
  1799. {endif}
  1800. {else}
  1801. (L.L.Matrix_PixelRefreshSpeed) 6 <=
  1802. {if}
  1803. ' Speed 5: 80 pixels per frame (+74%)
  1804. (M.L.Matrix_PixelRefresh64)
  1805. (M.L.Matrix_PixelRefresh16)
  1806. (L.L.Matrix_PixelRefreshSpeed)
  1807. {if}
  1808. ' Speed 6: 115 pixels per frame (+44%)
  1809. (M.L.Matrix_PixelRefresh32)
  1810. (M.L.Matrix_PixelRefresh2)
  1811. (M.L.Matrix_PixelRefresh)
  1812. {endif}
  1813. {else}
  1814. ' Speed 7: 160 pixels per frame (+39%)
  1815. (M.L.Matrix_PixelRefresh64)
  1816. (M.L.Matrix_PixelRefresh64)
  1817. (M.L.Matrix_PixelRefresh32)
  1818. {endif}
  1819. {endif}
  1820. {endif}
  1821.  
  1822. {endif}
  1823.  
  1824. (L.L.Matrix_Timer) 0.1 >=
  1825. {if}
  1826. 0 (S.L.Matrix_Timer)
  1827. {endif}
  1828.  
  1829. 'Unlocken:
  1830.  
  1831. 0 (M.V.STUnlock)
  1832. (L.L.Matrix_HideScrollingAnimation) !
  1833. {if}
  1834. (M.L.Matrix_DrawingOff)
  1835. {endif}
  1836. {endif}
  1837.  
  1838. 'Aktualisierung der Code-Tafel:
  1839.  
  1840. "Linienlisten\" (L.$.yard) "_ANX.jpg" $+ $+ (S.$.Matrix_Linelist)
  1841.  
  1842. (L.L.matrix_refresh_seitenschild)
  1843. {if}
  1844. "..\..\Anzeigen\Seitenschilder\" 2 (M.V.GetDepotStringGlobal) $+ "\" $+
  1845. (L.L.Matrix_SpecifyNr) 1 =
  1846. {if}
  1847. (L.$.Matrix_NrSpecified)
  1848. {else}
  1849. (L.$.Matrix_Nr)
  1850. {endif}
  1851. $RemoveSpaces $+ ".bmp" $+ (S.$.Matrix_Seitenschild)
  1852. 0 (S.L.matrix_refresh_seitenschild)
  1853. {endif}
  1854.  
  1855. {end}
  1856.  
  1857.  
  1858.  
  1859. '*------------------------------------------------------------------------------------------------------------
  1860.  
  1861. {macro:Matrix_ClearMatrix}
  1862. (M.L.Matrix_DrawingOn)
  1863. 1 (M.L.Matrix_ClearTexture)
  1864. 2 (M.L.Matrix_ClearTexture)
  1865. 3 (M.L.Matrix_ClearTexture)
  1866. 4 (M.L.Matrix_ClearTexture)
  1867. 5 (M.L.Matrix_ClearTexture)
  1868. (M.L.Matrix_DrawingOff)
  1869. {end}
  1870.  
  1871. {macro:Matrix_ClearTexture}
  1872. s6
  1873. 0
  1874. 255
  1875. 255
  1876. 255
  1877. (M.V.STSetColor)
  1878.  
  1879. l6
  1880. 0
  1881. 0
  1882. (C.L.Matrix_Width) (C.L.Matrix_PixelFactor) *
  1883. (C.L.Matrix_Height) (C.L.Matrix_PixelFactor) 2 * *
  1884. (M.V.STDrawRect)
  1885. {end}
  1886.  
  1887. {macro:Matrix_PixelRefresh64}
  1888. (M.L.Matrix_PixelRefresh32)
  1889. (M.L.Matrix_PixelRefresh32)
  1890. {end}
  1891.  
  1892. {macro:Matrix_PixelRefresh32}
  1893. (M.L.Matrix_PixelRefresh16)
  1894. (M.L.Matrix_PixelRefresh16)
  1895. {end}
  1896.  
  1897. {macro:Matrix_PixelRefresh16}
  1898. (M.L.Matrix_PixelRefresh8)
  1899. (M.L.Matrix_PixelRefresh8)
  1900. {end}
  1901.  
  1902. {macro:Matrix_PixelRefresh8}
  1903. (M.L.Matrix_PixelRefresh4)
  1904. (M.L.Matrix_PixelRefresh4)
  1905. {end}
  1906.  
  1907. {macro:Matrix_PixelRefresh4}
  1908. (M.L.Matrix_PixelRefresh2)
  1909. (M.L.Matrix_PixelRefresh2)
  1910. {end}
  1911.  
  1912. {macro:Matrix_PixelRefresh2}
  1913. (M.L.Matrix_PixelRefresh)
  1914. (M.L.Matrix_PixelRefresh)
  1915. {end}
  1916.  
  1917. {macro:Matrix_PixelRefresh}
  1918. (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) 2 * >=
  1919. (L.L.Matrix_RefreshCursor) 0 < ||
  1920. {if}
  1921. (L.L.IBIS_Linie_Suffix) 99 =
  1922. {if}
  1923. (L.L.Matrix_Testcolor) ! (S.L.Matrix_Testcolor)
  1924. 0
  1925. {else}
  1926. 0 (S.L.Matrix_Timer)
  1927. (L.L.Matrix_HideScrollingAnimation) (L.L.Matrix_RefreshCursor) 0 >= &&
  1928. {if}
  1929. (M.L.Matrix_DrawingOn) (M.L.Matrix_DrawingOff)
  1930. 2 (S.L.Matrix_Power)
  1931. {endif}
  1932. -1
  1933. {endif}
  1934. (S.L.Matrix_RefreshCursor)
  1935. {else}
  1936.  
  1937.  
  1938. 'X und Y berechnen:
  1939. 'l0: Ebene (vorne/Seite)
  1940. 'l1: X
  1941. 'l2: Y
  1942.  
  1943. (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) / trunc s0
  1944. (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) % (C.L.Matrix_Height) / trunc s1
  1945. (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) % (C.L.Matrix_Height) % s2
  1946.  
  1947. 'Fehlerpixel berechnen:
  1948. (L.L.Matrix_RefreshCursor) (M.V.NrSpecRandom) 2 *
  1949. (L.L.Matrix_Fehlerpixel) / (C.L.Matrix_Fehlerpixel_pro_Jahr) ! 2 * + s6
  1950. 1 <
  1951. {if}
  1952. 255 s7
  1953. {else}
  1954. l6 2 <
  1955. {if}
  1956. 0 s7
  1957. {else}
  1958. 'Wenn 99er-Code, dann alles grün:
  1959. (L.L.IBIS_Linie_Suffix) 99 =
  1960. {if}
  1961. (L.L.Matrix_Testcolor) 255 * s7
  1962. {else}
  1963. 'Farbe setzen:
  1964. 0
  1965. l1
  1966. l2 l0 (C.L.Matrix_Height) * + s4
  1967. (M.V.STReadPixel)
  1968.  
  1969. 0 (M.V.STGetR) s7 (S.L.Matrix_PixelR)
  1970. (L.L.Matrix_Res) 2 =
  1971. (L.$.Matrix_Bitmapfilename) "" $= (L.L.Matrix_BmpFullColour) ! || &&
  1972. {if}
  1973. l7 0 > 16 * s7
  1974.  
  1975. 0
  1976. l1
  1977. l4 1 +
  1978. (M.V.STReadPixel)
  1979. 0 (M.V.STGetR) 0 > 32 * l7 + s7
  1980.  
  1981. 0
  1982. l1
  1983. l4 2 +
  1984. (M.V.STReadPixel)
  1985. 0 (M.V.STGetR) 0 > 64 * l7 + s7
  1986.  
  1987. 0
  1988. l1
  1989. l4 3 +
  1990. (M.V.STReadPixel)
  1991. 0 (M.V.STGetR) 0 > 128 * l7 + s7
  1992. {endif}
  1993. (L.$.Matrix_Bitmapfilename) "" $=
  1994. {if}
  1995. 'Inversion:
  1996. (M.L.Matrix_IsInL1) (S.L.Matrix_IsInL1)
  1997. (M.L.Matrix_IsInL2) (S.L.Matrix_IsInL2)
  1998. (M.L.Matrix_IsInL3) (S.L.Matrix_IsInL3)
  1999. (M.L.Matrix_IsInIcon) (S.L.Matrix_IsInIcon)
  2000. (M.L.Matrix_IsInNr) (S.L.Matrix_IsInNr)
  2001.  
  2002. (L.L.Matrix_L1Invert)
  2003. {if}
  2004. (L.L.Matrix_IsInL1)
  2005. {if}
  2006. 255 l7 - s7
  2007. {endif}
  2008. {endif}
  2009.  
  2010. (L.L.Matrix_L2Invert)
  2011. {if}
  2012. (L.L.Matrix_IsInL2)
  2013. {if}
  2014. 255 l7 - s7
  2015. {endif}
  2016. {endif}
  2017.  
  2018. (L.L.Matrix_L3Invert)
  2019. {if}
  2020. (L.L.Matrix_IsInL3)
  2021. {if}
  2022. 255 l7 - s7
  2023. {endif}
  2024. {endif}
  2025.  
  2026. (L.L.Matrix_IconInvert)
  2027. {if}
  2028. (L.L.Matrix_IsInIcon)
  2029. {if}
  2030. 255 l7 - s7
  2031. {endif}
  2032. {endif}
  2033.  
  2034. (L.L.Matrix_NrInvert)
  2035. {if}
  2036. (L.L.Matrix_IsInNr)
  2037. {if}
  2038. 255 l7 - s7
  2039. {endif}
  2040. {endif}
  2041.  
  2042. (L.L.Matrix_Invert)
  2043. {if}
  2044. 255 l7 - s7
  2045. {endif}
  2046. {endif}
  2047. {endif}
  2048. {endif}
  2049. {endif}
  2050.  
  2051. 'Pixel zeichnen:
  2052.  
  2053. (L.L.Matrix_Res) 1 =
  2054. {if}
  2055. 1
  2056. l7
  2057. 128
  2058. 0
  2059. 0
  2060. (M.V.STSetColor)
  2061.  
  2062. 1
  2063. l1 (C.L.Matrix_PixelFactor) * s4
  2064. l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5
  2065. l4 (C.L.Matrix_PixelFactor) + 2 -
  2066. l5 (C.L.Matrix_PixelFactor) + 2 -
  2067. (M.V.STDrawRect)
  2068. {endif}
  2069.  
  2070. (L.L.Matrix_Res) 2 =
  2071. {if}
  2072. (L.$.Matrix_Bitmapfilename) "" $=
  2073. (L.L.Matrix_BmpFullColour) ! ||
  2074. (L.L.Matrix_LEDMonochrome) ||
  2075. {if}
  2076. l7 16 / trunc s6
  2077. (L.L.Matrix_HideScrollingAnimation) ! ||
  2078. {if}
  2079. (M.L.Matrix_DrawColour4LED)
  2080. {endif}
  2081. {else}
  2082. (M.L.Matrix_DrawColour1LED)
  2083. 0
  2084. l1
  2085. l2 1 + s2 l0 (C.L.Matrix_Height) * +
  2086. (M.V.STReadPixel)
  2087. (M.L.Matrix_DrawColour1LED)
  2088. 0
  2089. l1
  2090. l2 1 + s2 l0 (C.L.Matrix_Height) * +
  2091. (M.V.STReadPixel)
  2092. (M.L.Matrix_DrawColour1LED)
  2093. 0
  2094. l1
  2095. l2 1 + s2 l0 (C.L.Matrix_Height) * +
  2096. (M.V.STReadPixel)
  2097. (M.L.Matrix_DrawColour1LED)
  2098. l2 3 - s2
  2099. {endif}
  2100. {endif}
  2101.  
  2102. 'Cursor verschieben:
  2103. (L.L.Matrix_RefreshCursor) (L.L.Matrix_Res) sqr + (S.L.Matrix_RefreshCursor)
  2104. {endif}
  2105. {end}
  2106.  
  2107. {macro:Matrix_WriteTerminus}
  2108.  
  2109.  
  2110. '3.B.2 Bestimmen der verbliebenen Länge des Zieles vorne (l3):
  2111.  
  2112. (L.L.Matrix_NrRightAlign) (L.L.Matrix_Ypos) (C.L.Matrix_Height) < &&
  2113. {if}
  2114. (L.L.Matrix_TerminusXLimit) (L.L.Matrix_Xpos) - s3
  2115. {else}
  2116. (C.L.Matrix_Width) (L.L.Matrix_Xpos) - s3
  2117. {endif}
  2118.  
  2119. '3.B.3 Einzeilig (l4)?
  2120. (L.$.Matrix_TerminusL2) "" $= s4
  2121.  
  2122. '3.B.4 Bestimmen des Fonts der Zeile 1 des Ziels (l0/l1):
  2123.  
  2124. (L.L.IBIS_Linie_Suffix) 98 =
  2125. {if}
  2126. 0 s7
  2127. 0 s2
  2128. (L.$.Matrix_TerminusL1) (L.L.Font_Chrono) s0 (M.V.TextLength) s1
  2129. {else}
  2130. (L.L.Matrix_L3XLimit)
  2131. {if}
  2132. (L.L.Matrix_Xpos) - 0 max s3
  2133. {endif}
  2134. l4 (L.L.Matrix_L3XLimit) ||
  2135. {if}
  2136. ' if-2-1
  2137. ' Single line
  2138. (L.L.Font_CustomMode) 10 % 1 >=
  2139. {if}
  2140. ' if-2-2
  2141. ' Custom single-line fonts
  2142. 0 s7
  2143. (L.$.Matrix_TerminusL3) (S.$.Matrix_InputLine)
  2144.  
  2145. (L.L.Font_Custom1-1) (S.L.Matrix_FontSel1)
  2146. (L.L.Font_Custom1-2) (S.L.Matrix_FontSel2)
  2147. (L.L.Font_Custom1-3) (S.L.Matrix_FontSel3)
  2148. (L.L.Font_Custom1-4) (S.L.Matrix_FontSel4)
  2149. (L.L.Font_Custom1-5) (S.L.Matrix_FontSel5)
  2150.  
  2151. (L.L.Font_CustomMode) 10 % 1 = ! (S.L.Matrix_FontCond1)
  2152. (L.L.Font_CustomMode) 10 % 2 = ! (S.L.Matrix_FontCond2)
  2153. (L.L.Font_CustomMode) 10 % 3 = ! (S.L.Matrix_FontCond3)
  2154. (L.L.Font_CustomMode) 10 % 4 = ! (S.L.Matrix_FontCond4)
  2155.  
  2156. 0 (M.L.matrix_getFontC1Ypos) (S.L.Matrix_FontYPos1)
  2157. 1 (M.L.matrix_getFontC1Ypos) (S.L.Matrix_FontYPos2)
  2158. 2 (M.L.matrix_getFontC1Ypos) (S.L.Matrix_FontYPos3)
  2159. 3 (M.L.matrix_getFontC1Ypos) (S.L.Matrix_FontYPos4)
  2160. 4 (M.L.matrix_getFontC1Ypos) (S.L.Matrix_FontYPos5)
  2161.  
  2162. 15 (M.L.Matrix_FontSel)
  2163. {else}
  2164. ' else-2-2
  2165. ' No custom single-line fonts
  2166. 0 s7
  2167. (L.$.Matrix_TerminusL3) (S.$.Matrix_InputLine)
  2168.  
  2169. (L.L.Font_16x8B/32x16B) (S.L.Matrix_FontSel1)
  2170. (L.L.Matrix_L3Bold)
  2171. {if}
  2172. (L.L.Font_16x7B/32x12B) (S.L.Matrix_FontSel2)
  2173. (L.L.Font_16x6B/32x10B) (S.L.Matrix_FontSel3)
  2174. {else}
  2175. (L.L.Font_16x6/32x14) (S.L.Matrix_FontSel2) (S.L.Matrix_FontSel3)
  2176. {endif}
  2177. (L.L.Font_16x5/32x10) (S.L.Matrix_FontSel4)
  2178. (L.L.Font_15x4/32x8) (S.L.Matrix_FontSel5)
  2179.  
  2180. (L.L.Matrix_L3MaxStdGlyphWidth) 8 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond1)
  2181. (L.L.Matrix_L3Bold)
  2182. {if}
  2183. (L.L.Matrix_L3MaxStdGlyphWidth) 5 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond2)
  2184. (L.L.Matrix_L3MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond3)
  2185. {else}
  2186. (L.L.Matrix_L3MaxStdGlyphWidth) 8 (L.L.Matrix_Res) * 2 - < (S.L.Matrix_FontCond2) (S.L.Matrix_FontCond3)
  2187. {endif}
  2188. (L.L.Matrix_L3MaxStdGlyphWidth) 5 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond4)
  2189.  
  2190. 1 (L.L.Matrix_L3HasDescenderCE) - (L.L.Matrix_LargeFontYpos) + (S.L.Matrix_FontYPos1)
  2191. (L.L.Matrix_L3Bold) * (S.L.Matrix_FontYPos2)
  2192. 0 (S.L.Matrix_FontYPos3) 0 (S.L.Matrix_FontYPos4) (S.L.Matrix_FontYPos5)
  2193. 5 (M.L.Matrix_FontSel)
  2194. {endif}
  2195. ' endifelse-2-2
  2196. {endif}
  2197. ' endifelse-2-1
  2198.  
  2199. (L.L.Matrix_L3XLimit)
  2200. {if}
  2201. l1 1 + (L.$.Matrix_Icon) "" $= + (S.L.Matrix_L3PixelLength)
  2202. (L.$.Matrix_TerminusL3) $length 1 - 0 max s6
  2203. l3 l1 - l6 / trunc l7 min s7
  2204. l1 l6 l7 * + s1
  2205. l3 l1 - 2 / trunc s5
  2206.  
  2207. (L.L.Matrix_Res) 2 = {if} 0 s2 {endif}
  2208.  
  2209. 0
  2210. (L.L.Matrix_L3XLimit) (C.L.Matrix_Width) <
  2211. {if}
  2212. *
  2213. l5 (L.L.Matrix_Xpos) +
  2214. {else}
  2215. +
  2216. (L.L.Matrix_Xpos) (L.L.Matrix_L3Invert) (L.L.Matrix_Ypos) (C.L.Matrix_Height) >= && +
  2217. {endif}
  2218. (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L3Ypos) +
  2219. l0
  2220. 1
  2221. 0
  2222. (L.$.Matrix_TerminusL3)
  2223. (M.V.STTextOut)
  2224. (L.L.Matrix_L3XLimit) (C.L.Matrix_Width) <
  2225. {if}
  2226. (L.L.Matrix_L3XLimit) (S.L.Matrix_Xpos)
  2227. {else}
  2228. (L.L.Matrix_Xpos) l1 + (L.L.Matrix_L3XLimit) min 1 + (S.L.Matrix_Xpos)
  2229. {endif}
  2230. (L.L.Matrix_NrRightAlign) (L.L.Matrix_Ypos) (C.L.Matrix_Height) < &&
  2231. {if}
  2232. (L.L.Matrix_TerminusXLimit) (L.L.Matrix_Xpos) - s3
  2233. {else}
  2234. (C.L.Matrix_Width) (L.L.Matrix_Xpos) - s3
  2235. {endif}
  2236. {endif}
  2237.  
  2238. l4 ! (L.L.Matrix_L3XLimit) ||
  2239. {if}
  2240. ' if-2-3
  2241. ' Two lines
  2242. (L.L.Font_CustomMode) 10 / 10 % trunc 1 >=
  2243. {if}
  2244. ' if-2-4
  2245. ' Custom two-line fonts
  2246. 0 s7
  2247. (L.$.Matrix_TerminusL1) (S.$.Matrix_InputLine)
  2248.  
  2249. (L.L.Font_Custom2-1) (S.L.Matrix_FontSel1)
  2250. (L.L.Font_Custom2-2) (S.L.Matrix_FontSel2)
  2251. (L.L.Font_Custom2-3) (S.L.Matrix_FontSel3)
  2252. (L.L.Font_Custom2-4) (S.L.Matrix_FontSel4)
  2253. (L.L.Font_Custom2-5) (S.L.Matrix_FontSel5)
  2254.  
  2255. (L.L.Font_CustomMode) 10 / 10 % trunc 1 = ! (S.L.Matrix_FontCond1)
  2256. (L.L.Font_CustomMode) 10 / 10 % trunc 2 = ! (S.L.Matrix_FontCond2)
  2257. (L.L.Font_CustomMode) 10 / 10 % trunc 3 = ! (S.L.Matrix_FontCond3)
  2258. (L.L.Font_CustomMode) 10 / 10 % trunc 4 = ! (S.L.Matrix_FontCond4)
  2259.  
  2260. 0 (M.L.matrix_getFontC2Ypos) (S.L.Matrix_FontYPos1)
  2261. 1 (M.L.matrix_getFontC2Ypos) (S.L.Matrix_FontYPos2)
  2262. 2 (M.L.matrix_getFontC2Ypos) (S.L.Matrix_FontYPos3)
  2263. 3 (M.L.matrix_getFontC2Ypos) (S.L.Matrix_FontYPos4)
  2264. 4 (M.L.matrix_getFontC2Ypos) (S.L.Matrix_FontYPos5)
  2265.  
  2266. 15 (M.L.Matrix_FontSel)
  2267. {else}
  2268. ' else-2-4
  2269. ' No custom two-line fonts
  2270. (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) ||
  2271. {if}
  2272. ' if-2-5
  2273. 0 s7
  2274. (L.$.Matrix_TerminusL1) (S.$.Matrix_InputLine)
  2275.  
  2276. (L.L.Matrix_L2SmallFont)
  2277. {if}
  2278. (L.L.Matrix_Res) 1 =
  2279. {if}
  2280. (L.L.Font_10x6B/18x12B) (S.L.Matrix_FontSel1)
  2281. (L.L.Font_10x5/18x10) (S.L.Matrix_FontSel2)
  2282. (L.L.Font_10x4/18x8) (S.L.Matrix_FontSel3)
  2283. (L.L.Font_10x3/18x7) (S.L.Matrix_FontSel4)
  2284. (L.L.Matrix_L1MaxStdGlyphWidth) 6 < (L.L.Matrix_L1Bold) ! || (S.L.Matrix_FontCond1)
  2285. (L.L.Matrix_L1MaxStdGlyphWidth) 5 < (S.L.Matrix_FontCond2)
  2286. (L.L.Matrix_L1MaxStdGlyphWidth) 4 < (S.L.Matrix_FontCond3)
  2287. 4 (M.L.Matrix_FontSel)
  2288. {else}
  2289. (L.L.Font_10x6B/18x12B) (S.L.Matrix_FontSel1)
  2290. (L.L.Font_10x6B/18x10B) (S.L.Matrix_FontSel2)
  2291. (L.L.Font_10x5/18x10) (S.L.Matrix_FontSel3)
  2292. (L.L.Font_10x4/18x8) (S.L.Matrix_FontSel4)
  2293. (L.L.Font_10x3/18x7) (S.L.Matrix_FontSel5)
  2294. (L.L.Matrix_L1MaxStdGlyphWidth) 12 < (L.L.Matrix_L1Bold) ! || (S.L.Matrix_FontCond1)
  2295. (L.L.Matrix_L1MaxStdGlyphWidth) 10 < (L.L.Matrix_L1Bold) ! || (S.L.Matrix_FontCond2)
  2296. (L.L.Matrix_L1MaxStdGlyphWidth) 10 < (S.L.Matrix_FontCond3)
  2297. (L.L.Matrix_L1MaxStdGlyphWidth) 8 < (S.L.Matrix_FontCond4)
  2298. 5 (M.L.Matrix_FontSel)
  2299. {endif}
  2300. 0 s2
  2301. {endif}
  2302. (L.L.Matrix_L1SmallFont)
  2303. {if}
  2304. (L.L.Font_5x5/12x8B) (S.L.Matrix_FontSel1)
  2305. (L.L.Font_5x5/10x8B) (S.L.Matrix_FontSel2)
  2306. (L.L.Font_5x4/10x6B) (S.L.Matrix_FontSel3)
  2307. (L.L.Font_5x3/10x5) (S.L.Matrix_FontSel4)
  2308.  
  2309. (L.L.Matrix_L1MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + <
  2310. (L.L.Matrix_L1Invert) || (L.L.Matrix_L1BGBrightness) || (S.L.Matrix_FontCond1)
  2311. (L.L.Matrix_L1MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond2)
  2312. (L.L.Matrix_L1MaxStdGlyphWidth) 2 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond3)
  2313. 4 (M.L.Matrix_FontSel)
  2314. 0 s2
  2315. {endif}
  2316. {else}
  2317. ' else-2-5
  2318. 0 s7
  2319. (L.$.Matrix_TerminusL1) (S.$.Matrix_InputLine)
  2320.  
  2321. (L.$.Matrix_TerminusL2) "" $=
  2322. {if}
  2323. (L.L.Font_16x6/18x12B) (S.L.Matrix_FontSel1)
  2324. (L.L.Font_16x5/18x10) (S.L.Matrix_FontSel2)
  2325. (L.L.Font_15x4/18x8) (S.L.Matrix_FontSel3)
  2326. (L.L.Font_10x3/18x7) (S.L.Matrix_FontSel4)
  2327.  
  2328. 0 (S.L.Matrix_FontYPos1) (S.L.Matrix_FontYPos2) (S.L.Matrix_FontYPos3) (S.L.Matrix_FontYPos4)
  2329. (L.L.Matrix_Res) 1 = {if} 3 (S.L.Matrix_FontYPos4) {endif}
  2330. (L.L.Matrix_L1MaxStdGlyphWidth) 6 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond1)
  2331. (L.L.Matrix_L1MaxStdGlyphWidth) 5 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond2)
  2332. (L.L.Matrix_L1MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond3)
  2333. {else}
  2334. (L.L.Matrix_L1CEMode)
  2335. {if}
  2336. (L.L.Matrix_L1HasTallGlyphCE)
  2337. {if}
  2338. (L.L.Font_8x6B/14x10H) (S.L.Matrix_FontSel1)
  2339. (L.L.Font_8x5/14x8B) (S.L.Matrix_FontSel2)
  2340. (L.L.Font_8x4/14x8B) (S.L.Matrix_FontSel3)
  2341. (L.L.Font_8x3/14x6) (S.L.Matrix_FontSel4)
  2342. {else}
  2343. (L.L.Font_(8-1)x6B/14x10H) (S.L.Matrix_FontSel1)
  2344. (L.L.Font_(8-1)x5/14x8B) (S.L.Matrix_FontSel2)
  2345. (L.L.Font_(8-1)x4/14x8B) (S.L.Matrix_FontSel3)
  2346. (L.L.Font_(8-1)x3/14x6) (S.L.Matrix_FontSel4)
  2347. {endif}
  2348. {else}
  2349. (L.L.Font_7x6B/14x10H) (S.L.Matrix_FontSel1)
  2350. (L.L.Font_7x5/14x8B) (S.L.Matrix_FontSel2)
  2351. (L.L.Font_7x4/14x8B) (S.L.Matrix_FontSel3)
  2352. (L.L.Font_7x3/14x6) (S.L.Matrix_FontSel4)
  2353.  
  2354. (L.L.Matrix_L1HasDescender) ! (L.L.Matrix_L1Invert) ||
  2355. (L.L.Matrix_Invert) || (L.L.Matrix_Res) 1 = &&
  2356. (S.L.Matrix_FontYPos1) (S.L.Matrix_FontYPos2)
  2357. (S.L.Matrix_FontYPos3) (S.L.Matrix_FontYPos4)
  2358. {endif}
  2359. (L.L.Matrix_L1Bold) !
  2360. (L.L.Matrix_L1MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * 2 + < || (S.L.Matrix_FontCond1)
  2361. (L.L.Matrix_L1MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond2)
  2362. (L.L.Matrix_L1MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond3)
  2363. {endif}
  2364.  
  2365. 4 (M.L.Matrix_FontSel)
  2366. (L.$.Matrix_TerminusL2) "" $= ! (L.L.Matrix_L1CEMode) &&
  2367. {if}
  2368. 0 s2
  2369. {endif}
  2370. {endif}
  2371. ' endifelse-2-5
  2372. {endif}
  2373. ' endifelse-2-4
  2374. {endif}
  2375. ' endifelse-2-3
  2376. {endif}
  2377.  
  2378. '3.B.5 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6)
  2379. (L.$.Matrix_TerminusL1) $length 1 - 0 max s6
  2380. '3.B.6 Berechnen der Sperrung:
  2381. l3 l1 - l6 / trunc l7 min s7
  2382. l1 l6 l7 * + s1
  2383. '3.B.7 Berechnen des Zentrierungsaufschlages (l5):
  2384. l3 l1 - 2 / trunc s5
  2385. '3.B.8 Schreiben:
  2386. (L.L.Matrix_Res) 2 =
  2387. {if}
  2388. (L.L.Matrix_L1Invert) (L.L.Matrix_Invert) ||
  2389. (L.L.Matrix_L1BGBrightness) || (L.L.Matrix_L1HasDescenderCE) ! && l4 ! &&
  2390. {if}
  2391. 1 s2
  2392. {else}
  2393. 0 s2
  2394. {endif}
  2395. (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) ||
  2396. {if}
  2397. 0 s2
  2398. (L.L.Matrix_L1Invert) (L.L.Matrix_Invert) || (L.L.Matrix_L1BGBrightness) ||
  2399. {if}
  2400. 1 s2
  2401. {endif}
  2402. {endif}
  2403. (L.$.Matrix_TerminusL2) "" $= (L.L.Matrix_L3XLimit) &&
  2404. {if}
  2405. 8 s2
  2406. {endif}
  2407. {endif}
  2408.  
  2409. 0
  2410. (L.L.Matrix_Xpos) l5 +
  2411. (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L1Ypos) +
  2412. l0
  2413. 1
  2414. 0
  2415. ' " " (L.L.Font_16x6/32x14) l0 = (L.L.Matrix_L3XLimit) && 2 * $* (L.$.Matrix_TerminusL1) $+
  2416. (L.$.Matrix_TerminusL1)
  2417. (M.V.STTextOut)
  2418.  
  2419.  
  2420.  
  2421.  
  2422. '3.C.1 Bestimmen des Fonts der Zeile 2 des Ziels (l0/l1):
  2423.  
  2424. (L.L.IBIS_Linie_Suffix) 98 =
  2425. {if}
  2426. ' if-3-1
  2427. 0 s7
  2428. (C.L.Matrix_Height) 2 / s2
  2429. (L.$.Matrix_TerminusL2) (L.L.Font_Chrono) s0 (M.V.TextLength) s1
  2430. {else}
  2431. ' else-3-1
  2432. l4 !
  2433. {if}
  2434. ' if-3-2
  2435. (L.L.Font_CustomMode) 10 / 10 % trunc 1 >=
  2436. {if}
  2437. ' if-3-3
  2438. ' Custom two-line fonts
  2439. 0 s7
  2440. (L.$.Matrix_TerminusL2) (S.$.Matrix_InputLine)
  2441.  
  2442. (L.L.Font_Custom2-1) (S.L.Matrix_FontSel1)
  2443. (L.L.Font_Custom2-2) (S.L.Matrix_FontSel2)
  2444. (L.L.Font_Custom2-3) (S.L.Matrix_FontSel3)
  2445. (L.L.Font_Custom2-4) (S.L.Matrix_FontSel4)
  2446. (L.L.Font_Custom2-5) (S.L.Matrix_FontSel5)
  2447.  
  2448. (L.L.Font_CustomMode) 10 / 10 % trunc 1 = ! (S.L.Matrix_FontCond1)
  2449. (L.L.Font_CustomMode) 10 / 10 % trunc 2 = ! (S.L.Matrix_FontCond2)
  2450. (L.L.Font_CustomMode) 10 / 10 % trunc 3 = ! (S.L.Matrix_FontCond3)
  2451. (L.L.Font_CustomMode) 10 / 10 % trunc 4 = ! (S.L.Matrix_FontCond4)
  2452.  
  2453. 0 (M.L.matrix_getFontC2Ypos) (C.L.Matrix_Height) 2 / + (S.L.Matrix_FontYPos1)
  2454. 1 (M.L.matrix_getFontC2Ypos) (C.L.Matrix_Height) 2 / + (S.L.Matrix_FontYPos2)
  2455. 2 (M.L.matrix_getFontC2Ypos) (C.L.Matrix_Height) 2 / + (S.L.Matrix_FontYPos3)
  2456. 3 (M.L.matrix_getFontC2Ypos) (C.L.Matrix_Height) 2 / + (S.L.Matrix_FontYPos4)
  2457. 4 (M.L.matrix_getFontC2Ypos) (C.L.Matrix_Height) 2 / + (S.L.Matrix_FontYPos5)
  2458.  
  2459. 15 (M.L.Matrix_FontSel)
  2460. {else}
  2461. ' else-3-3
  2462. ' No custom two-line fonts
  2463. (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) ||
  2464. {if}
  2465. ' if-3-4
  2466. 0 s7
  2467. (L.$.Matrix_TerminusL2) (S.$.Matrix_InputLine)
  2468. (L.L.Matrix_L1SmallFont)
  2469. {if}
  2470. (L.L.Matrix_Res) 1 =
  2471. {if}
  2472. (L.L.Font_10x6B/18x12B) (S.L.Matrix_FontSel1)
  2473. (L.L.Font_10x5/18x10) (S.L.Matrix_FontSel2)
  2474. (L.L.Font_10x4/18x8) (S.L.Matrix_FontSel3)
  2475. (L.L.Font_10x3/18x7) (S.L.Matrix_FontSel4)
  2476. (L.L.Matrix_L2MaxStdGlyphWidth) 5 <= (L.L.Matrix_L2Bold) ! || (S.L.Matrix_FontCond1)
  2477. (L.L.Matrix_L2MaxStdGlyphWidth) 4 <= (S.L.Matrix_FontCond2)
  2478. (L.L.Matrix_L2MaxStdGlyphWidth) 3 <= (S.L.Matrix_FontCond3)
  2479. 4 (M.L.Matrix_FontSel)
  2480. {else}
  2481. (L.L.Font_10x6B/18x12B) (S.L.Matrix_FontSel1)
  2482. (L.L.Font_10x6B/18x10B) (S.L.Matrix_FontSel2)
  2483. (L.L.Font_10x5/18x10) (S.L.Matrix_FontSel3)
  2484. (L.L.Font_10x4/18x8) (S.L.Matrix_FontSel4)
  2485. (L.L.Font_10x3/18x7) (S.L.Matrix_FontSel5)
  2486. (L.L.Matrix_L2MaxStdGlyphWidth) 10 <= (L.L.Matrix_L2Bold) ! || (S.L.Matrix_FontCond1)
  2487. (L.L.Matrix_L2MaxStdGlyphWidth) 10 <= (L.L.Matrix_L2Bold) ! || (S.L.Matrix_FontCond2)
  2488. (L.L.Matrix_L2MaxStdGlyphWidth) 8 <= (S.L.Matrix_FontCond3)
  2489. (L.L.Matrix_L2MaxStdGlyphWidth) 7 <= (S.L.Matrix_FontCond4)
  2490. 5 (M.L.Matrix_FontSel)
  2491. {endif}
  2492. (C.L.Matrix_Height) 8 / 3 * s2
  2493. {endif}
  2494. (L.L.Matrix_L2SmallFont)
  2495. {if}
  2496. (L.L.Font_5x5/12x8B) (S.L.Matrix_FontSel1)
  2497. (L.L.Font_5x5/10x8B) (S.L.Matrix_FontSel2)
  2498. (L.L.Font_5x4/10x6B) (S.L.Matrix_FontSel3)
  2499. (L.L.Font_5x3/10x5) (S.L.Matrix_FontSel4)
  2500.  
  2501. (L.L.Matrix_L2MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + <
  2502. (L.L.Matrix_L2Invert) || (L.L.Matrix_L2BGBrightness) || (S.L.Matrix_FontCond1)
  2503. (L.L.Matrix_L2MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond2)
  2504. (L.L.Matrix_L2MaxStdGlyphWidth) 2 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond3)
  2505. 4 (M.L.Matrix_FontSel)
  2506. (C.L.Matrix_Height) 16 / 11 * s2
  2507. {endif}
  2508. {else}
  2509. ' else-3-4
  2510. 0 s7
  2511. (L.$.Matrix_TerminusL2) (S.$.Matrix_InputLine)
  2512. (L.L.Matrix_L2CEMode)
  2513. {if}
  2514. (L.L.Font_8x6B/14x10H) (S.L.Matrix_FontSel1)
  2515. (L.L.Font_8x5/14x8B) (S.L.Matrix_FontSel2)
  2516. (L.L.Font_8x4/14x8B) (S.L.Matrix_FontSel3)
  2517. (L.L.Font_8x3/14x6) (S.L.Matrix_FontSel4)
  2518.  
  2519. (L.L.Matrix_L1HasTallGlyphCE)
  2520. (L.L.Matrix_L2HasTallGlyphCE) || (C.L.Matrix_Height) 16 / 7 * +
  2521. (S.L.Matrix_FontYPos1) (S.L.Matrix_FontYPos2)
  2522. (S.L.Matrix_FontYPos3) (S.L.Matrix_FontYPos4)
  2523. {else}
  2524. (L.L.Font_7x6B/14x10H) (S.L.Matrix_FontSel1)
  2525. (L.L.Font_7x5/14x8B) (S.L.Matrix_FontSel2)
  2526. (L.L.Font_7x4/14x8B) (S.L.Matrix_FontSel3)
  2527. (L.L.Font_7x3/14x6) (S.L.Matrix_FontSel4)
  2528.  
  2529. (L.L.Matrix_L1Invert) (L.L.Matrix_L2Invert) || (C.L.Matrix_Height) 2 / +
  2530. (S.L.Matrix_FontYPos1) (S.L.Matrix_FontYPos2)
  2531. (S.L.Matrix_FontYPos3) (S.L.Matrix_FontYPos4)
  2532. {endif}
  2533. (L.L.Matrix_L2Bold) !
  2534. (L.L.Matrix_L2MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * 2 + < || (S.L.Matrix_FontCond1)
  2535. (L.L.Matrix_L2MaxStdGlyphWidth) 3 (L.L.Matrix_Res) * 2 + < (S.L.Matrix_FontCond2)
  2536. (L.L.Matrix_L2MaxStdGlyphWidth) 4 (L.L.Matrix_Res) * < (S.L.Matrix_FontCond3)
  2537. 4 (M.L.Matrix_FontSel)
  2538. {endif}
  2539. ' endifelse-3-4
  2540. {endif}
  2541. ' endifelse-3-3
  2542. {endif}
  2543. ' endifelse-3-2
  2544. {endif}
  2545. ' endifelse-3-1
  2546.  
  2547. '3.C.2 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6)
  2548. (L.$.Matrix_TerminusL2) $length 1 - 0 max s6
  2549. '3.C.3 Berechnen der Sperrung:
  2550. l3 l1 - l6 / trunc l7 min s7
  2551. l1 l6 l7 * + s1
  2552. '3.C.4 Berechnen des Zentrierungsaufschlages (l5):
  2553. l3 l1 - 2 / trunc s5
  2554. '3.C.5 Schreiben:
  2555. (L.L.Matrix_Res) 2 =
  2556. {if}
  2557. (L.L.Matrix_L2Invert) (L.L.Matrix_L2BGBrightness) || (L.L.Matrix_L2HasDescender) ! &&
  2558. {if}
  2559. 17 s2
  2560. {else}
  2561. 16 s2
  2562. {endif}
  2563. (L.L.Matrix_L1SmallFont)
  2564. {if}
  2565. (L.L.Matrix_L1Invert) (L.L.Matrix_L1BGBrightness) || (L.L.Matrix_L2Invert) (L.L.Matrix_L2BGBrightness) || ! &&
  2566. {if}
  2567. 14 s2
  2568. {else}
  2569. 13 s2
  2570. {endif}
  2571. {endif}
  2572. (L.L.Matrix_L2SmallFont)
  2573. {if}
  2574. (L.L.Matrix_L1Invert) (L.L.Matrix_L1BGBrightness) || (L.L.Matrix_L2Invert) (L.L.Matrix_L2BGBrightness) || ! &&
  2575. {if}
  2576. 22 s2
  2577. {else}
  2578. 21 s2
  2579. {endif}
  2580. l0 (L.L.Font_5x5/12x8B) =
  2581. {if}
  2582. l2 1 - s2
  2583. {endif}
  2584. {endif}
  2585. {endif}
  2586.  
  2587. l2
  2588. 0
  2589. (L.L.Matrix_Xpos) l5 +
  2590. (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L2Ypos) +
  2591. l0
  2592. 1
  2593. 0
  2594. (L.$.Matrix_TerminusL2)
  2595. (M.V.STTextOut)
  2596.  
  2597.  
  2598. {endif}
  2599.  
  2600.  
  2601. {end}
  2602.  
  2603. {macro:matrix_refreshIntIndex}
  2604. (L.L.matrix_steckschild_Termindex) s0 0 >=
  2605. l0 0 (M.V.GetTerminusString) "" $= ! &&
  2606. {if}
  2607. l0
  2608. {else}
  2609. (L.L.Matrix_TerminusAct)
  2610. {endif}
  2611. (S.L.target_index_int)
  2612. {end}
  2613.  
  2614. {macro:Matrix_ResetOptions}
  2615. "" (S.$.Matrix_Icon)
  2616. 0 (S.L.Matrix_L1Bold) (S.L.Matrix_L2Bold) (S.L.Matrix_L3Bold)
  2617. (S.L.Matrix_L1SmallFont) (S.L.Matrix_L2SmallFont)
  2618. (S.L.Matrix_L1Invert) (S.L.Matrix_L2Invert) (S.L.Matrix_L3Invert)
  2619. (S.L.Matrix_IconInvert) (S.L.Matrix_NrInvert) (S.L.Matrix_Invert)
  2620. (S.L.Matrix_L1Ypos) (S.L.Matrix_L2Ypos) (S.L.Matrix_L3Ypos)
  2621. (S.L.Matrix_L1CEMode) (S.L.Matrix_L2CEMode) (S.L.Matrix_L3CEMode)
  2622. (S.L.Matrix_NrYpos) (S.L.Matrix_NrForceLargeFont) (S.L.Matrix_LargeFontYpos)
  2623. (S.L.Matrix_L3PixelLength) (S.L.Matrix_IconXpos) (S.L.Matrix_UseCustomIcon)
  2624. (S.L.Matrix_FrontTerminusXpos) (S.L.Font_CustomMode) (S.L.Matrix_NrDisabled)
  2625. (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit)
  2626. (C.L.Matrix_NrRightAlign) (S.L.Matrix_NrRightAlign)
  2627. (M.L.Matrix_LEDResetColours)
  2628. 15 (L.L.Matrix_Res) * 6 - (S.L.Matrix_L1MaxStdGlyphWidth) (S.L.Matrix_L2MaxStdGlyphWidth)
  2629. (S.L.Matrix_L3MaxStdGlyphWidth) (S.L.Matrix_NrMaxStdGlyphWidth)
  2630. {end}
  2631.  
  2632. {macro:Matrix_ProcessTerminusL1}
  2633. (L.L.Matrix_L3XLimit) ! s0
  2634.  
  2635. (L.$.Matrix_TerminusL1) "*…" $=
  2636. {if}
  2637. "" (S.$.Matrix_TerminusL1)
  2638. "…" (S.$.Matrix_Icon)
  2639. {endif}
  2640.  
  2641. ' Process line 1
  2642. ' *^## := Move line up by ## pixels
  2643. (L.$.Matrix_TerminusL1) "*^" (M.L.Matrix_IsNextCmd)
  2644. {if}
  2645. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_L1Ypos)
  2646. l0 {if} * (S.L.Matrix_L3Ypos) {endif}
  2647. 2 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2648. {endif}
  2649. ' *v## := Move line down by ## pixels
  2650. (L.$.Matrix_TerminusL1) "*v" (M.L.Matrix_IsNextCmd)
  2651. {if}
  2652. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L1Ypos)
  2653. l0 {if} * (S.L.Matrix_L3Ypos) {endif}
  2654. 2 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2655. {endif}
  2656. ' *U := Add U-Bahn icon
  2657. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*U" $=
  2658. {if}
  2659. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2660. "U" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2661. {endif}
  2662. ' *T := Add tram icon
  2663. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*T" $=
  2664. {if}
  2665. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2666. "T" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2667. {endif}
  2668. ' *S := Add S-Bahn icon
  2669. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*S" $=
  2670. {if}
  2671. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2672. "S" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2673. {endif}
  2674. ' *SCH := Add school icon
  2675. (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*SCH" $=
  2676. {if}
  2677. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2678. "s" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2679. {endif}
  2680. ' *R := Not used
  2681. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*R" $=
  2682. {if}
  2683. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2684. {endif}
  2685. ' *P := Add coffee cup (Pause) icon
  2686. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*P" $=
  2687. {if}
  2688. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2689. "P" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2690. {endif}
  2691. ' *N^# := Move up route number by ## pixels
  2692. (L.$.Matrix_TerminusL1) "*N^" (M.L.Matrix_IsNextCmd)
  2693. {if}
  2694. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_NrYpos)
  2695. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2696. {endif}
  2697. ' *Nv# := Move down route number by ## pixels
  2698. (L.$.Matrix_TerminusL1) "*Nv" (M.L.Matrix_IsNextCmd)
  2699. {if}
  2700. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_NrYpos)
  2701. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2702. {endif}
  2703. ' *NMX## := Allow only fonts for route number up to standard width # pixels
  2704. (L.$.Matrix_TerminusL1) "*NMX" (M.L.Matrix_IsNextCmd)
  2705. {if}
  2706. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_NrMaxStdGlyphWidth)
  2707. 4 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2708. {endif}
  2709. ' *NI := Invert route number
  2710. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*NI" $=
  2711. {if}
  2712. (L.L.Matrix_NrInvert) ! (S.L.Matrix_NrInvert)
  2713. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2714. {endif}
  2715. ' *NH> := Route number on the front display is displayed on the right
  2716. ' Warning: Overly long terminus lines will be drawn over the route number
  2717. (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*NH>" $=
  2718. {if}
  2719. 1 (S.L.Matrix_NrRightAlign)
  2720. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2721. {endif}
  2722. ' *NH< := Route number on the front display is displayed on the left
  2723. (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*NH<" $=
  2724. {if}
  2725. 0 (S.L.Matrix_NrRightAlign)
  2726. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2727. {endif}
  2728. ' *NG := Force large route number font
  2729. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*NG" $=
  2730. {if}
  2731. $d 4 $SetLengthR "**NG" $=
  2732. {if}
  2733. (L.L.Matrix_Res) 2 =
  2734. {if}
  2735. (L.L.Matrix_NrForceLargeFont) ! (S.L.Matrix_NrForceLargeFont)
  2736. {endif}
  2737. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2738. {else}
  2739. (L.L.Matrix_NrForceLargeFont) ! (S.L.Matrix_NrForceLargeFont)
  2740. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2741. {endif}
  2742. {endif}
  2743. ' *N := Do not display route number
  2744. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*N" $=
  2745. {if}
  2746. (L.L.Matrix_NrDisabled) ! (S.L.Matrix_NrDisabled)
  2747. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2748. {endif}
  2749. ' *MX## := Allow only fonts up to standard width # pixels
  2750. (L.$.Matrix_TerminusL1) "*MX" (M.L.Matrix_IsNextCmd)
  2751. {if}
  2752. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L1MaxStdGlyphWidth)
  2753. l0 {if} * (S.L.Matrix_L3MaxStdGlyphWidth) {endif}
  2754. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2755. {endif}
  2756. ' *MI := Invert matrix
  2757. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*MI" $=
  2758. {if}
  2759. (L.L.Matrix_Invert) ! (S.L.Matrix_Invert)
  2760. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2761. {endif}
  2762. ' *M := Not used
  2763. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*M" $=
  2764. {if}
  2765. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2766. {endif}
  2767. ' *K := Use small fonts; **K := Use small fonts if using 230x32 matrix
  2768. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*K" $=
  2769. {if}
  2770. $d 3 $SetLengthR "**K" $=
  2771. {if}
  2772. (L.L.Matrix_Res) 2 =
  2773. {if}
  2774. (L.L.Matrix_L1SmallFont) ! (S.L.Matrix_L1SmallFont)
  2775. {endif}
  2776. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2777. {else}
  2778. (L.L.Matrix_L1SmallFont) ! (S.L.Matrix_L1SmallFont)
  2779. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2780. {endif}
  2781. {endif}
  2782. ' *I<## := Move icon ## pixels to the left
  2783. (L.$.Matrix_TerminusL1) "*I<" (M.L.Matrix_IsNextCmd)
  2784. {if}
  2785. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_IconXpos)
  2786. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2787. {endif}
  2788. ' *I>## := Move icon ## pixels to the right
  2789. (L.$.Matrix_TerminusL1) "*I>" (M.L.Matrix_IsNextCmd)
  2790. {if}
  2791. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_IconXpos)
  2792. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2793. {endif}
  2794. ' *I := Invert line; **I := Invert line if using 230x32 matrix
  2795. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*I" $=
  2796. {if}
  2797. $d 3 $SetLengthR "**I" $=
  2798. {if}
  2799. (L.L.Matrix_Res) 2 =
  2800. {if}
  2801. (L.L.Matrix_L1Invert) ! (S.L.Matrix_L1Invert)
  2802. {endif}
  2803. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2804. {else}
  2805. (L.L.Matrix_L1Invert) ! (S.L.Matrix_L1Invert)
  2806. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2807. {endif}
  2808. {endif}
  2809. ' *G^## := Move up by ## pixels, but only if largest font used
  2810. (L.$.Matrix_TerminusL1) "*G^" (M.L.Matrix_IsNextCmd)
  2811. {if}
  2812. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_LargeFontYpos)
  2813. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2814. {endif}
  2815. ' *Gv## := Move down by ## pixels, but only if largest font used
  2816. (L.$.Matrix_TerminusL1) "*Gv" (M.L.Matrix_IsNextCmd)
  2817. {if}
  2818. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_LargeFontYpos)
  2819. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2820. {endif}
  2821. ' *F<## := Move terminus display on the front ## pixels to the left
  2822. (L.$.Matrix_TerminusL1) "*F<" (M.L.Matrix_IsNextCmd)
  2823. {if}
  2824. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_FrontTerminusXpos)
  2825. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2826. {endif}
  2827. ' *F>## := Move terminus display on the front ## pixels to the right
  2828. (L.$.Matrix_TerminusL1) "*F>" (M.L.Matrix_IsNextCmd)
  2829. {if}
  2830. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_FrontTerminusXpos)
  2831. 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2832. {endif}
  2833. ' *F := Add airport icon
  2834. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*F" $=
  2835. {if}
  2836. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2837. "F" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2838. {endif}
  2839. ' *DB := Add DB (Deutsche Bahn) logo
  2840. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*DB" $=
  2841. {if}
  2842. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2843. "D" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2844. {endif}
  2845. ' *CN := Use custom fonts for route number
  2846. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CN" $=
  2847. {if}
  2848. "9" $+ (S.$.Matrix_TerminusL1)
  2849. {endif}
  2850. ' *CN# := Use custom font # for route number
  2851. (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*CN" $=
  2852. {if}
  2853. $d 1 $SetLengthR $StrToFloat 0 max 100 *
  2854. (L.L.Font_CustomMode) + (S.L.Font_CustomMode)
  2855. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2856. {endif}
  2857. ' *CI := Use custom icons
  2858. (L.$.Matrix_TerminusL1) 4 $SetLengthR 1 $cutEnd "*CI" $=
  2859. {if}
  2860. 1 (S.L.Matrix_UseCustomIcon)
  2861. (L.$.Matrix_Icon) (L.$.Matrix_TerminusL1) 1 $SetLengthR $+ (S.$.Matrix_Icon)
  2862. (L.$.Matrix_TerminusL1) 4 $cutEnd (S.$.Matrix_TerminusL1)
  2863. {endif}
  2864. ' *CF := Use custom fonts for destination
  2865. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CF" $=
  2866. {if}
  2867. "9" $+ (S.$.Matrix_TerminusL1)
  2868. {endif}
  2869. ' *CF# := Use custom font # for destination
  2870. (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*CF" $=
  2871. {if}
  2872. $d 1 $SetLengthR $StrToFloat 0 max
  2873. (L.L.Font_CustomMode) + (S.L.Font_CustomMode)
  2874. 4 $cutEnd (S.$.Matrix_TerminusL1)
  2875. {endif}
  2876. ' *CE := Use only fonts supporting Central European characters (except *K)
  2877. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CE" $=
  2878. {if}
  2879. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2880. (L.L.Matrix_L1CEMode) ! (S.L.Matrix_L1CEMode)
  2881. l0 {if} * (S.L.Matrix_L3CEMode) {endif}
  2882. {endif}
  2883. ' *BR := Add British Rail logo
  2884. (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*BR" $=
  2885. {if}
  2886. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2887. "B" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  2888. {endif}
  2889. ' *B := Use bold face font; **B := Use bold face font if using 230x32 matrix
  2890. (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*B" $=
  2891. {if}
  2892. $d 3 $SetLengthR "**B" $=
  2893. {if}
  2894. (L.L.Matrix_Res) 2 >=
  2895. {if}
  2896. (L.L.Matrix_L1Bold) ! (S.L.Matrix_L1Bold)
  2897. l0 {if} * (S.L.Matrix_L3Bold) {endif}
  2898. {endif}
  2899. 3 $cutEnd (S.$.Matrix_TerminusL1)
  2900. {else}
  2901. (L.L.Matrix_L1Bold) ! (S.L.Matrix_L1Bold)
  2902. l0 {if} * (S.L.Matrix_L3Bold) {endif}
  2903. 2 $cutEnd (S.$.Matrix_TerminusL1)
  2904. {endif}
  2905. {endif}
  2906. ' O405N2 matrix compatibility
  2907. (L.$.Matrix_TerminusL1) $d 1 s1 $SetLengthR "µ" $=
  2908. $d 6 s1 $SetLengthR && "#Messe" $= ||
  2909. $d 9 s1 $SetLengthR && "#100Jahre" $= ||
  2910. {if}
  2911. l1 $cutEnd (S.$.Matrix_TerminusL1)
  2912. {endif}
  2913. (L.$.Matrix_TerminusL1) $d 12 $SetLengthR "#Dienstfahrt" $=
  2914. {if}
  2915. 12 $cutEnd "Dienstfahrt*I" $+ (S.$.Matrix_TerminusL1)
  2916. {endif}
  2917. (L.$.Matrix_TerminusL1) $d 8 $SetLengthR "#Postbus" $=
  2918. {if}
  2919. 8 $cutEnd "Postbus" $+ (S.$.Matrix_TerminusL1)
  2920. {endif}
  2921.  
  2922. (L.$.Matrix_TerminusL1) 1 $SetLengthR "]" $=
  2923. {if}
  2924. ' *NC := Route number colour
  2925. (L.$.Matrix_TerminusL1) "*NC[" (M.L.Matrix_IsNextCmd)
  2926. $d 1 $SetLengthR && "]" $= &&
  2927. {if}
  2928. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  2929. {if}
  2930. (M.L.Matrix_ProcessColourCmd)
  2931. (L.L.Matrix_Temp0) (S.L.Matrix_NrHue)
  2932. (L.L.Matrix_Temp1) (S.L.Matrix_NrSaturation)
  2933. (L.L.Matrix_Temp2) (S.L.Matrix_NrBrightness)
  2934. {endif}
  2935. (L.$.Matrix_TerminusL1) 4 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2936. {endif}
  2937. ' *NBGC := Route number background colour
  2938. (L.$.Matrix_TerminusL1) "*NBGC[" (M.L.Matrix_IsNextCmd)
  2939. $d 1 $SetLengthR && "]" $= &&
  2940. {if}
  2941. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  2942. {if}
  2943. (M.L.Matrix_ProcessColourCmd)
  2944. {endif}
  2945. (L.$.Matrix_TerminusL1) 6 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2946. $length (L.L.Matrix_LED) && (L.L.Matrix_LEDMonochrome) ! &&
  2947. {if}
  2948. (L.L.Matrix_Temp0) (S.L.Matrix_NrBGHue)
  2949. (L.L.Matrix_Temp1) (S.L.Matrix_NrBGSaturation)
  2950. (L.L.Matrix_Temp2) (S.L.Matrix_NrBGBrightness)
  2951. {endif}
  2952. {endif}
  2953. ' *L := Specify route number to be displayed
  2954. (L.$.Matrix_TerminusL1) "*L[" (M.L.Matrix_IsNextCmd)
  2955. $d 1 $SetLengthR && "]" $= &&
  2956. {if}
  2957. (L.L.Matrix_SpecifyNr) 0 >=
  2958. {if}
  2959. (S.L.Matrix_SpecifyNr)
  2960. {endif}
  2961. $d l1 $SetLengthR 1 $cutEnd (S.$.Matrix_NrSpecified) 0 $* $+
  2962. l1 3 + $cutEnd (S.$.Matrix_TerminusL1)
  2963. {endif}
  2964. ' *IC := Icon colour
  2965. (L.$.Matrix_TerminusL1) "*IC[" (M.L.Matrix_IsNextCmd)
  2966. $d 1 $SetLengthR && "]" $= &&
  2967. {if}
  2968. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  2969. {if}
  2970. (M.L.Matrix_ProcessColourCmd)
  2971. (L.L.Matrix_Temp0) (S.L.Matrix_IconHue)
  2972. (L.L.Matrix_Temp1) (S.L.Matrix_IconSaturation)
  2973. (L.L.Matrix_Temp2) (S.L.Matrix_IconBrightness)
  2974. {endif}
  2975. (L.$.Matrix_TerminusL1) 4 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2976. {endif}
  2977. ' *IBGC := Icon colour
  2978. (L.$.Matrix_TerminusL1) "*IBGC[" (M.L.Matrix_IsNextCmd)
  2979. $d 1 $SetLengthR && "]" $= &&
  2980. {if}
  2981. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  2982. {if}
  2983. (M.L.Matrix_ProcessColourCmd)
  2984. (L.L.Matrix_Temp0) (S.L.Matrix_IconBGHue)
  2985. (L.L.Matrix_Temp1) (S.L.Matrix_IconBGSaturation)
  2986. (L.L.Matrix_Temp2) (S.L.Matrix_IconBGBrightness)
  2987. {endif}
  2988. (L.$.Matrix_TerminusL1) 6 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  2989. {endif}
  2990. ' *DC := Display colour
  2991. (L.$.Matrix_TerminusL1) "*DC[" (M.L.Matrix_IsNextCmd)
  2992. $d 1 $SetLengthR && "]" $= &&
  2993. {if}
  2994. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  2995. {if}
  2996. (M.L.Matrix_ProcessColourCmd)
  2997. (L.L.Matrix_Temp0) (S.L.Matrix_LEDHue)
  2998. (L.L.Matrix_Temp1) (S.L.Matrix_LEDSaturation)
  2999. (L.L.Matrix_Temp2) (S.L.Matrix_LEDBrightness)
  3000. (M.L.Matrix_LEDResetColours)
  3001. {endif}
  3002. (L.$.Matrix_TerminusL1) 4 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  3003. {endif}
  3004. ' *DBGC := Display background colour
  3005. (L.$.Matrix_TerminusL1) "*DBGC[" (M.L.Matrix_IsNextCmd)
  3006. $d 1 $SetLengthR && "]" $= &&
  3007. {if}
  3008. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3009. {if}
  3010. (M.L.Matrix_ProcessColourCmd)
  3011. (L.L.Matrix_Temp0) (S.L.Matrix_LEDBGHue)
  3012. (L.L.Matrix_Temp1) (S.L.Matrix_LEDBGSaturation)
  3013. (L.L.Matrix_Temp2) (S.L.Matrix_LEDBGBrightness)
  3014. (M.L.Matrix_LEDResetColours)
  3015. {else}
  3016. (L.L.Matrix_Invert) ! (S.L.Matrix_Invert)
  3017. {endif}
  3018. (L.$.Matrix_TerminusL1) 6 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  3019. {endif}
  3020. ' *C := line text colour
  3021. (L.$.Matrix_TerminusL1) "*C[" (M.L.Matrix_IsNextCmd)
  3022. $d 1 $SetLengthR && "]" $= &&
  3023. {if}
  3024. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3025. {if}
  3026. (M.L.Matrix_ProcessColourCmd)
  3027. (L.L.Matrix_Temp0) (S.L.Matrix_L1Hue)
  3028. (L.L.Matrix_Temp1) (S.L.Matrix_L1Saturation)
  3029. (L.L.Matrix_Temp2) (S.L.Matrix_L1Brightness)
  3030. l0
  3031. {if}
  3032. (L.L.Matrix_L1Hue) (S.L.Matrix_L3Hue)
  3033. (L.L.Matrix_L1Saturation) (S.L.Matrix_L3Saturation)
  3034. (L.L.Matrix_L1Brightness) (S.L.Matrix_L3Brightness)
  3035. {endif}
  3036. {endif}
  3037. (L.$.Matrix_TerminusL1) 3 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  3038. {endif}
  3039. ' *BGC := line background colour
  3040. (L.$.Matrix_TerminusL1) "*BGC[" (M.L.Matrix_IsNextCmd)
  3041. $d 1 $SetLengthR && "]" $= &&
  3042. {if}
  3043. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3044. {if}
  3045. (M.L.Matrix_ProcessColourCmd)
  3046. (L.L.Matrix_Temp0) (S.L.Matrix_L1BGHue)
  3047. (L.L.Matrix_Temp1) (S.L.Matrix_L1BGSaturation)
  3048. (L.L.Matrix_Temp2) (S.L.Matrix_L1BGBrightness)
  3049. l0
  3050. {if}
  3051. (L.L.Matrix_L1BGHue) (S.L.Matrix_L3BGHue)
  3052. (L.L.Matrix_L1BGSaturation) (S.L.Matrix_L3BGSaturation)
  3053. (L.L.Matrix_L1BGBrightness) (S.L.Matrix_L3BGBrightness)
  3054. {endif}
  3055. {else}
  3056. (L.L.Matrix_L1Invert) ! (S.L.Matrix_L1Invert)
  3057. {endif}
  3058. (L.$.Matrix_TerminusL1) 5 l1 + $cutEnd (S.$.Matrix_TerminusL1)
  3059. {endif}
  3060. {endif}
  3061. {end}
  3062.  
  3063. {macro:Matrix_ProcessTerminusL2}
  3064. ' Process line 2
  3065. ' *^## := Move line up by ## pixels
  3066. (L.$.Matrix_TerminusL2) "*^" (M.L.Matrix_IsNextCmd)
  3067. {if}
  3068. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_L2Ypos)
  3069. 2 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3070. {endif}
  3071. ' *v## := Move line down by ## pixels
  3072. (L.$.Matrix_TerminusL2) "*v" (M.L.Matrix_IsNextCmd)
  3073. {if}
  3074. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L2Ypos)
  3075. 2 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3076. {endif}
  3077. ' *U := Add U-Bahn icon
  3078. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*U" $=
  3079. {if}
  3080. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3081. "U" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3082. {endif}
  3083. ' *T := Add tram icon
  3084. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*T" $=
  3085. {if}
  3086. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3087. "T" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3088. {endif}
  3089. ' *S := Add S-Bahn icon
  3090. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*S" $=
  3091. {if}
  3092. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3093. "S" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3094. {endif}
  3095. ' *SCH := Add school icon
  3096. (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*SCH" $=
  3097. {if}
  3098. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3099. "s" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3100. {endif}
  3101. ' *R := Not used
  3102. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*R" $=
  3103. {if}
  3104. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3105. {endif}
  3106. ' *P := Add coffee cup (Pause) icon
  3107. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*P" $=
  3108. {if}
  3109. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3110. "P" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3111. {endif}
  3112. ' *N^# := Move up route number by ## pixels
  3113. (L.$.Matrix_TerminusL2) "*N^" (M.L.Matrix_IsNextCmd)
  3114. {if}
  3115. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_NrYpos)
  3116. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3117. {endif}
  3118. ' *Nv# := Move down route number by ## pixels
  3119. (L.$.Matrix_TerminusL2) "*Nv" (M.L.Matrix_IsNextCmd)
  3120. {if}
  3121. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_NrYpos)
  3122. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3123. {endif}
  3124. ' *NMX## := Allow only fonts for route number up to standard width # pixels
  3125. (L.$.Matrix_TerminusL2) "*NMX" (M.L.Matrix_IsNextCmd)
  3126. {if}
  3127. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_NrMaxStdGlyphWidth)
  3128. 4 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3129. {endif}
  3130. ' *NI := Invert route number
  3131. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*NI" $=
  3132. {if}
  3133. (L.L.Matrix_NrInvert) ! (S.L.Matrix_NrInvert)
  3134. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3135. {endif}
  3136. ' *NH> := Route number on the front display is displayed on the right
  3137. ' Warning: Overly long terminus lines will be drawn over the route number
  3138. (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*NH>" $=
  3139. {if}
  3140. 1 (S.L.Matrix_NrRightAlign)
  3141. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3142. {endif}
  3143. ' *NH< := Route number on the front display is displayed on the left
  3144. (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*NH<" $=
  3145. {if}
  3146. 0 (S.L.Matrix_NrRightAlign)
  3147. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3148. {endif}
  3149. ' *NG := Force large route number font
  3150. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*NG" $=
  3151. {if}
  3152. $d 4 $SetLengthR "**NG" $=
  3153. {if}
  3154. (L.L.Matrix_Res) 2 =
  3155. {if}
  3156. (L.L.Matrix_NrForceLargeFont) ! (S.L.Matrix_NrForceLargeFont)
  3157. {endif}
  3158. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3159. {else}
  3160. (L.L.Matrix_NrForceLargeFont) ! (S.L.Matrix_NrForceLargeFont)
  3161. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3162. {endif}
  3163. {endif}
  3164. ' *N := Do not display route number
  3165. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*N" $=
  3166. {if}
  3167. (L.L.Matrix_NrDisabled) ! (S.L.Matrix_NrDisabled)
  3168. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3169. {endif}
  3170. ' *MX# := Allow only fonts up to standard width # pixels
  3171. (L.$.Matrix_TerminusL2) "*MX" (M.L.Matrix_IsNextCmd)
  3172. {if}
  3173. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L2MaxStdGlyphWidth)
  3174. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3175. {endif}
  3176. ' *MI := Invert matrix
  3177. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*MI" $=
  3178. {if}
  3179. (L.L.Matrix_Invert) ! (S.L.Matrix_Invert)
  3180. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3181. {endif}
  3182. ' *M := Not used
  3183. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*M" $=
  3184. {if}
  3185. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3186. {endif}
  3187. ' *K := Use small fonts; **K := Use small fonts if using 230x32 matrix
  3188. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*K" $=
  3189. {if}
  3190. $d 3 $SetLengthR "**K" $=
  3191. {if}
  3192. (L.L.Matrix_Res) 2 >=
  3193. {if}
  3194. (L.L.Matrix_L2SmallFont) ! (S.L.Matrix_L2SmallFont)
  3195. {endif}
  3196. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3197. {else}
  3198. (L.L.Matrix_L2SmallFont) ! (S.L.Matrix_L2SmallFont)
  3199. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3200. {endif}
  3201. {endif}
  3202. ' *I<## := Move icon ## pixels to the left
  3203. (L.$.Matrix_TerminusL2) "*I<" (M.L.Matrix_IsNextCmd)
  3204. {if}
  3205. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_IconXpos)
  3206. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3207. {endif}
  3208. ' *I>## := Move icon ## pixels to the right
  3209. (L.$.Matrix_TerminusL2) "*I>" (M.L.Matrix_IsNextCmd)
  3210. {if}
  3211. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_IconXpos)
  3212. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3213. {endif}
  3214. ' *I := Invert line; **I := Invert line if using 230x32 matrix
  3215. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*I" $=
  3216. {if}
  3217. $d 3 $SetLengthR "**I" $=
  3218. {if}
  3219. (L.L.Matrix_Res) 2 =
  3220. {if}
  3221. (L.L.Matrix_L2Invert) ! (S.L.Matrix_L2Invert)
  3222. {endif}
  3223. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3224. {else}
  3225. (L.L.Matrix_L2Invert) ! (S.L.Matrix_L2Invert)
  3226. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3227. {endif}
  3228. {endif}
  3229. ' *G^## := Move up by ## pixels, but only if largest font used
  3230. (L.$.Matrix_TerminusL2) "*G^" (M.L.Matrix_IsNextCmd)
  3231. {if}
  3232. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_LargeFontYpos)
  3233. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3234. {endif}
  3235. ' *Gv## := Move down by ## pixels, but only if largest font used
  3236. (L.$.Matrix_TerminusL2) "*Gv" (M.L.Matrix_IsNextCmd)
  3237. {if}
  3238. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_LargeFontYpos)
  3239. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3240. {endif}
  3241. ' *F<## := Move terminus display on the front ## pixels to the left
  3242. (L.$.Matrix_TerminusL2) "*F<" (M.L.Matrix_IsNextCmd)
  3243. {if}
  3244. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_FrontTerminusXpos)
  3245. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3246. {endif}
  3247. ' *F>## := Move terminus display on the front ## pixels to the right
  3248. (L.$.Matrix_TerminusL2) "*F>" (M.L.Matrix_IsNextCmd)
  3249. {if}
  3250. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_FrontTerminusXpos)
  3251. 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3252. {endif}
  3253. ' *F := Add airport icon
  3254. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*F" $=
  3255. {if}
  3256. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3257. "F" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3258. {endif}
  3259. ' *DB := Add DB (Deutsche Bahn) logo
  3260. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*DB" $=
  3261. {if}
  3262. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3263. "D" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3264. {endif}
  3265. ' *CN := Use custom fonts for route number
  3266. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CN" $=
  3267. {if}
  3268. "9" $+ (S.$.Matrix_TerminusL2)
  3269. {endif}
  3270. ' *CN# := Use custom font # for route number
  3271. (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*CN" $=
  3272. {if}
  3273. (L.L.Font_CustomMode) 100 <
  3274. {if}
  3275. $d 1 $SetLengthR $StrToFloat 0 max 100 *
  3276. (L.L.Font_CustomMode) + (S.L.Font_CustomMode)
  3277. {endif}
  3278. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3279. {endif}
  3280. ' *CI := Use custom icons
  3281. (L.$.Matrix_TerminusL2) 4 $SetLengthR 1 $cutEnd "*CI" $=
  3282. {if}
  3283. 1 (S.L.Matrix_UseCustomIcon)
  3284. (L.$.Matrix_Icon) (L.$.Matrix_TerminusL2) 1 $SetLengthR $+ (S.$.Matrix_Icon)
  3285. (L.$.Matrix_TerminusL2) 4 $cutEnd (S.$.Matrix_TerminusL2)
  3286. {endif}
  3287. ' *CF := Use custom fonts for destination
  3288. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CF" $=
  3289. {if}
  3290. "9" $+ (S.$.Matrix_TerminusL2)
  3291. {endif}
  3292. ' *CF# := Use custom font # for destination
  3293. (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*CF" $=
  3294. {if}
  3295. $d 1 $SetLengthR $StrToFloat 0 max 10 *
  3296. (L.L.Font_CustomMode) + (S.L.Font_CustomMode)
  3297. 4 $cutEnd (S.$.Matrix_TerminusL2)
  3298. {endif}
  3299. ' *CE := Use only fonts supporting Central European characters (except *K)
  3300. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CE" $=
  3301. {if}
  3302. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3303. (L.L.Matrix_L2CEMode) ! (S.L.Matrix_L2CEMode)
  3304. {endif}
  3305. ' *BR := Add British Rail logo
  3306. (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*BR" $=
  3307. {if}
  3308. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3309. "B" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon)
  3310. {endif}
  3311. ' *B := Use bold face font; **B := Use bold face font if using 230x32 matrix
  3312. (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*B" $=
  3313. {if}
  3314. $d 3 $SetLengthR "**B" $=
  3315. {if}
  3316. (L.L.Matrix_Res) 2 >=
  3317. {if}
  3318. (L.L.Matrix_L2Bold) ! (S.L.Matrix_L2Bold)
  3319. {endif}
  3320. 3 $cutEnd (S.$.Matrix_TerminusL2)
  3321. {else}
  3322. (L.L.Matrix_L2Bold) ! (S.L.Matrix_L2Bold)
  3323. 2 $cutEnd (S.$.Matrix_TerminusL2)
  3324. {endif}
  3325. {endif}
  3326. ' O405N2 matrix compatibility
  3327. (L.$.Matrix_TerminusL2) $d 1 s1 $SetLengthR "µ" $=
  3328. $d 6 s1 $SetLengthR && "#Messe" $= ||
  3329. $d 9 s1 $SetLengthR && "#100Jahre" $= ||
  3330. {if}
  3331. l1 $cutEnd (S.$.Matrix_TerminusL2)
  3332. {endif}
  3333. (L.$.Matrix_TerminusL2) $d 12 $SetLengthR "#Dienstfahrt" $=
  3334. {if}
  3335. 12 $cutEnd "Dienstfahrt*I" $+ (S.$.Matrix_TerminusL2)
  3336. {endif}
  3337. (L.$.Matrix_TerminusL2) $d 8 $SetLengthR "#Postbus" $=
  3338. {if}
  3339. 8 $cutEnd "Postbus" $+ (S.$.Matrix_TerminusL2)
  3340. {endif}
  3341.  
  3342. (L.$.Matrix_TerminusL2) 1 $SetLengthR "]" $=
  3343. {if}
  3344. ' *NC := Route number colour
  3345. (L.$.Matrix_TerminusL2) "*NC[" (M.L.Matrix_IsNextCmd)
  3346. $d 1 $SetLengthR && "]" $= &&
  3347. {if}
  3348. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3349. {if}
  3350. (M.L.Matrix_ProcessColourCmd)
  3351. (L.L.Matrix_Temp0) (S.L.Matrix_NrHue)
  3352. (L.L.Matrix_Temp1) (S.L.Matrix_NrSaturation)
  3353. (L.L.Matrix_Temp2) (S.L.Matrix_NrBrightness)
  3354. {endif}
  3355. (L.$.Matrix_TerminusL2) 4 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3356. {endif}
  3357. ' *NBGC := Route number colour
  3358. (L.$.Matrix_TerminusL2) "*NBGC[" (M.L.Matrix_IsNextCmd)
  3359. $d 1 $SetLengthR && "]" $= &&
  3360. {if}
  3361. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3362. {if}
  3363. (M.L.Matrix_ProcessColourCmd)
  3364. {endif}
  3365. (L.$.Matrix_TerminusL2) 6 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3366. $length (L.L.Matrix_LED) && (L.L.Matrix_LEDMonochrome) ! &&
  3367. {if}
  3368. (L.L.Matrix_Temp0) (S.L.Matrix_NrBGHue)
  3369. (L.L.Matrix_Temp1) (S.L.Matrix_NrBGSaturation)
  3370. (L.L.Matrix_Temp2) (S.L.Matrix_NrBGBrightness)
  3371. {endif}
  3372. {endif}
  3373. ' *L := Specify route number to be displayed
  3374. (L.$.Matrix_TerminusL2) "*L[" (M.L.Matrix_IsNextCmd)
  3375. $d 1 $SetLengthR && "]" $= &&
  3376. {if}
  3377. (L.L.Matrix_SpecifyNr) 0 >=
  3378. {if}
  3379. (S.L.Matrix_SpecifyNr)
  3380. {endif}
  3381. $d l1 $SetLengthR 1 $cutEnd (S.$.Matrix_NrSpecified) 0 $* $+
  3382. l1 3 + $cutEnd (S.$.Matrix_TerminusL2)
  3383. {endif}
  3384. ' *IC := Icon colour
  3385. (L.$.Matrix_TerminusL2) "*IC[" (M.L.Matrix_IsNextCmd)
  3386. $d 1 $SetLengthR && "]" $= &&
  3387. {if}
  3388. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3389. {if}
  3390. (M.L.Matrix_ProcessColourCmd)
  3391. (L.L.Matrix_Temp0) (S.L.Matrix_IconHue)
  3392. (L.L.Matrix_Temp1) (S.L.Matrix_IconSaturation)
  3393. (L.L.Matrix_Temp2) (S.L.Matrix_IconBrightness)
  3394. {endif}
  3395. (L.$.Matrix_TerminusL2) 4 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3396. {endif}
  3397. ' *IBGC := Icon colour
  3398. (L.$.Matrix_TerminusL2) "*IBGC[" (M.L.Matrix_IsNextCmd)
  3399. $d 1 $SetLengthR && "]" $= &&
  3400. {if}
  3401. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3402. {if}
  3403. (M.L.Matrix_ProcessColourCmd)
  3404. (L.L.Matrix_Temp0) (S.L.Matrix_IconBGHue)
  3405. (L.L.Matrix_Temp1) (S.L.Matrix_IconBGSaturation)
  3406. (L.L.Matrix_Temp2) (S.L.Matrix_IconBGBrightness)
  3407. {endif}
  3408. (L.$.Matrix_TerminusL2) 6 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3409. {endif}
  3410. ' *DC := Display colour
  3411. (L.$.Matrix_TerminusL2) "*DC[" (M.L.Matrix_IsNextCmd)
  3412. $d 1 $SetLengthR && "]" $= &&
  3413. {if}
  3414. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3415. {if}
  3416. (M.L.Matrix_ProcessColourCmd)
  3417. (L.L.Matrix_Temp0) (S.L.Matrix_LEDHue)
  3418. (L.L.Matrix_Temp1) (S.L.Matrix_LEDSaturation)
  3419. (L.L.Matrix_Temp2) (S.L.Matrix_LEDBrightness)
  3420. (M.L.Matrix_LEDResetColours)
  3421. {endif}
  3422. (L.$.Matrix_TerminusL2) 4 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3423. {endif}
  3424. ' *DBGC := Display background colour
  3425. (L.$.Matrix_TerminusL2) "*DBGC[" (M.L.Matrix_IsNextCmd)
  3426. $d 1 $SetLengthR && "]" $= &&
  3427. {if}
  3428. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3429. {if}
  3430. (M.L.Matrix_ProcessColourCmd)
  3431. (L.L.Matrix_Temp0) (S.L.Matrix_LEDBGHue)
  3432. (L.L.Matrix_Temp1) (S.L.Matrix_LEDBGSaturation)
  3433. (L.L.Matrix_Temp2) (S.L.Matrix_LEDBGBrightness)
  3434. (M.L.Matrix_LEDResetColours)
  3435. {else}
  3436. (L.L.Matrix_Invert) ! (S.L.Matrix_Invert)
  3437. {endif}
  3438. (L.$.Matrix_TerminusL2) 6 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3439. {endif}
  3440. ' *C := line text colour
  3441. (L.$.Matrix_TerminusL2) "*C[" (M.L.Matrix_IsNextCmd)
  3442. $d 1 $SetLengthR && "]" $= &&
  3443. {if}
  3444. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3445. {if}
  3446. (M.L.Matrix_ProcessColourCmd)
  3447. (L.L.Matrix_Temp0) (S.L.Matrix_L2Hue)
  3448. (L.L.Matrix_Temp1) (S.L.Matrix_L2Saturation)
  3449. (L.L.Matrix_Temp2) (S.L.Matrix_L2Brightness)
  3450. {endif}
  3451. (L.$.Matrix_TerminusL2) 3 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3452. {endif}
  3453. ' *BGC := line background colour
  3454. (L.$.Matrix_TerminusL2) "*BGC[" (M.L.Matrix_IsNextCmd)
  3455. $d 1 $SetLengthR && "]" $= &&
  3456. {if}
  3457. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3458. {if}
  3459. (M.L.Matrix_ProcessColourCmd)
  3460. (L.L.Matrix_Temp0) (S.L.Matrix_L2BGHue)
  3461. (L.L.Matrix_Temp1) (S.L.Matrix_L2BGSaturation)
  3462. (L.L.Matrix_Temp2) (S.L.Matrix_L2BGBrightness)
  3463. {else}
  3464. (L.L.Matrix_L2Invert) ! (S.L.Matrix_L2Invert)
  3465. {endif}
  3466. (L.$.Matrix_TerminusL2) 5 l1 + $cutEnd (S.$.Matrix_TerminusL2)
  3467. {endif}
  3468. {endif}
  3469. {end}
  3470.  
  3471. {macro:Matrix_ProcessTerminusL3}
  3472. ' Process line 3
  3473. ' *^## := Move line up by ## pixels
  3474. (L.$.Matrix_TerminusL3) "*^" (M.L.Matrix_IsNextCmd)
  3475. {if}
  3476. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_L3Ypos)
  3477. 2 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3478. {endif}
  3479. ' *v## := Move line down by ## pixels
  3480. (L.$.Matrix_TerminusL3) "*v" (M.L.Matrix_IsNextCmd)
  3481. {if}
  3482. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L3Ypos)
  3483. 2 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3484. {endif}
  3485. ' *MX## := Allow only fonts up to standard width # pixels
  3486. (L.$.Matrix_TerminusL3) "*MX" (M.L.Matrix_IsNextCmd)
  3487. {if}
  3488. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L3MaxStdGlyphWidth)
  3489. 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3490. {endif}
  3491. ' *IT### := Activate line 3 with X-coordinate limit ###
  3492. (L.$.Matrix_TerminusL3) "*IT" (M.L.Matrix_IsNextCmd)
  3493. {if}
  3494. l1
  3495. {if}
  3496. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_L3XLimit)
  3497. {else}
  3498. (C.L.Matrix_Width) (S.L.Matrix_L3XLimit)
  3499. {endif}
  3500. (L.$.Matrix_TerminusL3) 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3501. {endif}
  3502. ' *I := Invert line; **I := Invert line if using 230x32 matrix
  3503. (L.$.Matrix_TerminusL3) $d 2 $SetLengthR "*I" $=
  3504. {if}
  3505. $d 3 $SetLengthR "**I" $=
  3506. {if}
  3507. (L.L.Matrix_Res) 2 =
  3508. {if}
  3509. (L.L.Matrix_L3Invert) ! (S.L.Matrix_L3Invert)
  3510. {endif}
  3511. 3 $cutEnd (S.$.Matrix_TerminusL3)
  3512. {else}
  3513. (L.L.Matrix_L3Invert) ! (S.L.Matrix_L3Invert)
  3514. 2 $cutEnd (S.$.Matrix_TerminusL3)
  3515. {endif}
  3516. {endif}
  3517. ' *G^## := Move up by ## pixels, but only if largest font used
  3518. (L.$.Matrix_TerminusL3) "*G^" (M.L.Matrix_IsNextCmd)
  3519. {if}
  3520. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_LargeFontYpos)
  3521. 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3522. {endif}
  3523. ' *Gv## := Move down by ## pixels, but only if largest font used
  3524. (L.$.Matrix_TerminusL3) "*Gv" (M.L.Matrix_IsNextCmd)
  3525. {if}
  3526. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_LargeFontYpos)
  3527. 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3528. {endif}
  3529. ' *F<## := Move terminus display on the front ## pixels to the left
  3530. (L.$.Matrix_TerminusL3) "*F<" (M.L.Matrix_IsNextCmd)
  3531. {if}
  3532. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) /-/ (S.L.Matrix_FrontTerminusXpos)
  3533. 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3534. {endif}
  3535. ' *F>## := Move terminus display on the front ## pixels to the right
  3536. (L.$.Matrix_TerminusL3) "*F>" (M.L.Matrix_IsNextCmd)
  3537. {if}
  3538. $d l1 $SetLengthR (M.L.Matrix_GetArgValue) (S.L.Matrix_FrontTerminusXpos)
  3539. 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3540. {endif}
  3541. ' *CF := Use custom fonts for destination
  3542. (L.$.Matrix_TerminusL3) $d 3 $SetLengthR "*CF" $=
  3543. {if}
  3544. "9" $+ (S.$.Matrix_TerminusL3)
  3545. {endif}
  3546. ' *CF# := Use custom font # for destination
  3547. (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*CF" $=
  3548. {if}
  3549. $d 1 $SetLengthR $StrToFloat 0 max
  3550. (L.L.Font_CustomMode) + (S.L.Font_CustomMode)
  3551. 4 $cutEnd (S.$.Matrix_TerminusL3)
  3552. {endif}
  3553. ' *CE := Not currently needed for line 3 but kept for consistency
  3554. (L.$.Matrix_TerminusL3) $d 3 $SetLengthR "*CE" $=
  3555. {if}
  3556. 3 $cutEnd (S.$.Matrix_TerminusL3)
  3557. 1 (S.L.Matrix_L3CEMode)
  3558. {endif}
  3559. ' *B := Use bold face font; **B := Use bold face font if using 230x32 matrix
  3560. (L.$.Matrix_TerminusL3) $d 2 $SetLengthR "*B" $=
  3561. {if}
  3562. $d 3 $SetLengthR "**B" $=
  3563. {if}
  3564. (L.L.Matrix_Res) 2 >=
  3565. {if}
  3566. (L.L.Matrix_L3Bold) ! (S.L.Matrix_L3Bold)
  3567. {endif}
  3568. 3 $cutEnd (S.$.Matrix_TerminusL3)
  3569. {else}
  3570. (L.L.Matrix_L3Bold) ! (S.L.Matrix_L3Bold)
  3571. 2 $cutEnd (S.$.Matrix_TerminusL3)
  3572. {endif}
  3573. {endif}
  3574.  
  3575. (L.$.Matrix_TerminusL3) 1 $SetLengthR "]" $=
  3576. {if}
  3577. ' *C := line text colour
  3578. (L.$.Matrix_TerminusL3) "*C[" (M.L.Matrix_IsNextCmd)
  3579. {if}
  3580. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3581. {if}
  3582. (M.L.Matrix_ProcessColourCmd)
  3583. (L.L.Matrix_Temp0) (S.L.Matrix_L3Hue)
  3584. (L.L.Matrix_Temp1) (S.L.Matrix_L3Saturation)
  3585. (L.L.Matrix_Temp2) (S.L.Matrix_L3Brightness)
  3586. {endif}
  3587. (L.$.Matrix_TerminusL3) 3 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3588. {endif}
  3589. ' *BGC := line background colour
  3590. (L.$.Matrix_TerminusL3) "*BGC[" (M.L.Matrix_IsNextCmd)
  3591. {if}
  3592. (L.L.Matrix_LED) (L.L.Matrix_LEDMonochrome) ! &&
  3593. {if}
  3594. (M.L.Matrix_ProcessColourCmd)
  3595. (L.L.Matrix_Temp0) (S.L.Matrix_L3BGHue)
  3596. (L.L.Matrix_Temp1) (S.L.Matrix_L3BGSaturation)
  3597. (L.L.Matrix_Temp2) (S.L.Matrix_L3BGBrightness)
  3598. {else}
  3599. (L.L.Matrix_L3Invert) ! (S.L.Matrix_L3Invert)
  3600. {endif}
  3601. (L.$.Matrix_TerminusL3) 5 l1 + $cutEnd (S.$.Matrix_TerminusL3)
  3602. {endif}
  3603. {endif}
  3604. {end}
  3605.  
  3606. {macro:Matrix_ProcessColourCmd}
  3607. $d l1 $SetLengthR 1 $cutEnd
  3608. l1 3 <=
  3609. {if}
  3610. $d $StrToFloat 0 >=
  3611. {if}
  3612. 6 (M.V.STLock)
  3613. $d $StrToFloat 1 - s4
  3614. 6
  3615. l4 4 % 59 * 50 +
  3616. l4 4 / trunc 4 % 43 * 90 +
  3617. (M.V.STReadPixel)
  3618. 6 (M.V.STGetR) s3
  3619. 6 (M.V.STGetG) s4
  3620. 6 (M.V.STGetB) s5
  3621. 6 (M.V.STUnlock)
  3622. l3 l4 l5 (M.L.Matrix_RGB2Hue) (S.L.Matrix_Temp0)
  3623. l3 l4 l5 (M.L.Matrix_RGB2Saturation) (S.L.Matrix_Temp1)
  3624. l3 l4 l5 max max 255 / (S.L.Matrix_Temp2)
  3625. {else}
  3626. (M.L.Matrix_LEDStandardColours)
  3627. (S.L.Matrix_Temp0) d - +
  3628. (S.L.Matrix_Temp1) d - +
  3629. (S.L.Matrix_Temp2)
  3630. {endif}
  3631. {else}
  3632. l1 5 =
  3633. {if}
  3634. $d 1 $SetLengthL "H" $=
  3635. {if}
  3636. $d 1 $cutBegin $StrToFloat 360 % 0 max (S.L.Matrix_Temp0)
  3637. {endif}
  3638. $d 1 $SetLengthL "S" $=
  3639. {if}
  3640. $d 1 $cutBegin $StrToFloat 100 / 1 min 0 max (S.L.Matrix_Temp1)
  3641. {endif}
  3642. $d 1 $SetLengthL "V" $=
  3643. {if}
  3644. $d 1 $cutBegin $StrToFloat 100 / 1 min 0 max (S.L.Matrix_Temp2)
  3645. {endif}
  3646. {else}
  3647. (M.L.Matrix_RGBHex2Dec)
  3648. l3 l4 l5 (M.L.Matrix_RGB2Hue) (S.L.Matrix_Temp0)
  3649. l3 l4 l5 (M.L.Matrix_RGB2Saturation) (S.L.Matrix_Temp1)
  3650. l3 l4 l5 max max 255 / (S.L.Matrix_Temp2)
  3651. {endif}
  3652. {endif}
  3653. {end}
  3654.  
  3655. {macro:Matrix_DrawIcon}
  3656. (L.$.Matrix_Icon) "" $=
  3657. {if}
  3658. 0 (S.L.Matrix_IconPixelLength)
  3659. {else}
  3660. (L.L.Matrix_Ypos) (C.L.Matrix_Height) <
  3661. {if}
  3662. (L.L.Matrix_Xpos) (L.L.Matrix_IconXpos) + (S.L.Matrix_Xpos)
  3663. {endif}
  3664. (L.L.Matrix_UseCustomIcon)
  3665. {if}
  3666. (L.L.Font_CustomIcon) s0
  3667. {else}
  3668. (L.L.Font_Icon) s0
  3669. {endif}
  3670. 0
  3671. (L.L.Matrix_Xpos) s5
  3672. (L.L.Matrix_Ypos)
  3673. l0
  3674. 1
  3675. 0
  3676. (L.$.Matrix_Icon)
  3677. (M.V.STTextOut)
  3678. (L.L.Matrix_Ypos) (C.L.Matrix_Height) <
  3679. {if}
  3680. l5 (L.$.Matrix_Icon) l0 (M.V.TextLength) s0 + (L.L.Matrix_Res) + (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos)
  3681. l0 (L.L.Matrix_Res) + (S.L.Matrix_IconPixelLength)
  3682. {endif}
  3683. {endif}
  3684. {end}
  3685.  
  3686. {macro:Matrix_FontSelReset}
  3687. "" (S.$.Matrix_InputLine)
  3688. 0 (S.L.Matrix_FontSel1) (S.L.Matrix_FontSel2) (S.L.Matrix_FontSel3)
  3689. (S.L.Matrix_FontSel4) (S.L.Matrix_FontSel5) (S.L.Matrix_FontSel6)
  3690. {end}
  3691.  
  3692. {macro:Matrix_FontSel}
  3693. (S.L.Matrix_FontSels)
  3694.  
  3695. (L.L.Matrix_FontYPos1) s2
  3696. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel1) s0 (M.V.TextLength) s1
  3697. l3 >
  3698. (L.L.Matrix_FontCond1) (L.L.Matrix_FontSels) 10 >= {if} && && {else} || || {endif}
  3699. (L.L.Matrix_FontSels) 10 % 1 > &&
  3700. {if}
  3701. (L.L.Matrix_FontYPos2) s2
  3702. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel2) s0 (M.V.TextLength) s1
  3703. l3 >
  3704. (L.L.Matrix_FontCond2) (L.L.Matrix_FontSels) 10 >= {if} && && {else} || || {endif}
  3705. (L.L.Matrix_FontSels) 10 % 2 > &&
  3706. {if}
  3707. (L.L.Matrix_FontYPos3) s2
  3708. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel3) s0 (M.V.TextLength) s1
  3709. l3 >
  3710. (L.L.Matrix_FontCond3) (L.L.Matrix_FontSels) 10 >= {if} && && {else} || || {endif}
  3711. (L.L.Matrix_FontSels) 10 % 3 > &&
  3712. {if}
  3713. (L.L.Matrix_FontYPos4) s2
  3714. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel4) s0 (M.V.TextLength) s1
  3715. l3 >
  3716. (L.L.Matrix_FontCond4) (L.L.Matrix_FontSels) 10 >= {if} && && {else} || || {endif}
  3717. (L.L.Matrix_FontSels) 10 % 4 > &&
  3718. {if}
  3719. (L.L.Matrix_FontYPos5) s2
  3720. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel5) s0 (M.V.TextLength) s1
  3721. l3 >
  3722. (L.L.Matrix_FontCond5) (L.L.Matrix_FontSels) 10 >= {if} && && {else} || || {endif}
  3723. (L.L.Matrix_FontSels) 10 % 5 > &&
  3724. {if}
  3725. (L.L.Matrix_FontYPos6) s2
  3726. (L.$.Matrix_InputLine) (L.L.Matrix_FontSel6) s0 (M.V.TextLength) s1
  3727. {endif}
  3728. {endif}
  3729. {endif}
  3730. {endif}
  3731. {endif}
  3732. {end}
  3733.  
  3734. {macro:Matrix_SetElementCoords}
  3735. ' Reset coordinates
  3736. 0
  3737. (S.L.Matrix_UpperL1_Xmin) (S.L.Matrix_UpperL2_Xmin) (S.L.Matrix_UpperL3_Xmin) (S.L.Matrix_UpperIcon_Xmin)
  3738. (S.L.Matrix_UpperL1_Xmax) (S.L.Matrix_UpperL2_Xmax) (S.L.Matrix_UpperL3_Xmax) (S.L.Matrix_UpperIcon_Xmax)
  3739. (S.L.Matrix_LowerL1_Xmin) (S.L.Matrix_LowerL2_Xmin) (S.L.Matrix_LowerL3_Xmin) (S.L.Matrix_LowerIcon_Xmin)
  3740. (S.L.Matrix_LowerL1_Xmax) (S.L.Matrix_LowerL2_Xmax) (S.L.Matrix_LowerL3_Xmax) (S.L.Matrix_LowerIcon_Xmax)
  3741.  
  3742. (S.L.Matrix_L1_Ymin) (S.L.Matrix_L2_Ymin) (S.L.Matrix_L3_Ymin) (S.L.Matrix_Icon_Ymin)
  3743. (S.L.Matrix_L1_Ymax) (S.L.Matrix_L2_Ymax) (S.L.Matrix_L3_Ymax) (S.L.Matrix_Icon_Ymax)
  3744.  
  3745. ' Define x-coordinates
  3746. (L.L.Matrix_TerminusXpos)
  3747. (S.L.Matrix_UpperL1_Xmin)
  3748. (S.L.Matrix_UpperL2_Xmin)
  3749. 1 - (S.L.Matrix_UpperL3_Xmax)
  3750. 1 + (L.L.Matrix_L3PixelLength) -
  3751. (S.L.Matrix_UpperL3_Xmin)
  3752. 1 - (S.L.Matrix_UpperIcon_Xmax)
  3753. 1 + (L.L.Matrix_IconPixelLength) -
  3754. (S.L.Matrix_UpperIcon_Xmin)
  3755. (L.L.Matrix_TerminusXLimit) 1 -
  3756. (S.L.Matrix_UpperL1_Xmax)
  3757. (S.L.Matrix_UpperL2_Xmax)
  3758. (C.L.Matrix_ZielSideStartX)
  3759. (S.L.Matrix_LowerIcon_Xmin)
  3760. (L.L.Matrix_IconPixelLength) + 1 -
  3761. (S.L.Matrix_LowerIcon_Xmax)
  3762. 1 + (S.L.Matrix_LowerL3_Xmin)
  3763. (L.L.Matrix_L3PixelLength) +
  3764. (S.L.Matrix_LowerL1_Xmin)
  3765. (S.L.Matrix_LowerL2_Xmin)
  3766. 1 - (S.L.Matrix_LowerL3_Xmax)
  3767. (C.L.Matrix_Width) 1 -
  3768. (S.L.Matrix_LowerL1_Xmax)
  3769. (S.L.Matrix_LowerL2_Xmax)
  3770.  
  3771. ' Define y-coordinates
  3772. (L.$.Matrix_TerminusL2) "" $=
  3773. {if}
  3774. (C.L.Matrix_Height) 1 - (S.L.Matrix_L1_Ymax)
  3775. {else}
  3776. (L.L.Matrix_L1SmallFont)
  3777. {if}
  3778. (C.L.Matrix_Height) 2 / trunc 2 (L.L.Matrix_Res) * -
  3779. (S.L.Matrix_L2_Ymin)
  3780. 1 - (S.L.Matrix_L1_Ymax)
  3781. {else}
  3782. (L.L.Matrix_L2SmallFont)
  3783. {if}
  3784. (C.L.Matrix_Height) 2 / trunc 2 (L.L.Matrix_Res) * +
  3785. (S.L.Matrix_L2_Ymin)
  3786. 1 - (S.L.Matrix_L1_Ymax)
  3787. {else}
  3788. (C.L.Matrix_Height) 2 / trunc
  3789. (S.L.Matrix_L2_Ymin)
  3790. 1 - (S.L.Matrix_L1_Ymax)
  3791. {endif}
  3792. {endif}
  3793. (C.L.Matrix_Height) 1 - (S.L.Matrix_L2_Ymax)
  3794. {endif}
  3795. (C.L.Matrix_Height) 1 - (S.L.Matrix_L3_Ymax) (S.L.Matrix_Icon_Ymax)
  3796. {end}
  3797.  
  3798. {macro:Matrix_IsInL1}
  3799. l2 (L.L.Matrix_L1_Ymin) >= l2 (L.L.Matrix_L1_Ymax) <= &&
  3800. {if}
  3801. l1 (L.L.Matrix_UpperL1_Xmin) >= l1 (L.L.Matrix_UpperL1_Xmax) <= && l0 ! &&
  3802. l1 (L.L.Matrix_LowerL1_Xmin) >= l1 (L.L.Matrix_LowerL1_Xmax) <= && l0 && ||
  3803. {else}
  3804. 0
  3805. {endif}
  3806. {end}
  3807.  
  3808. {macro:Matrix_IsInL2}
  3809. l2 (L.L.Matrix_L2_Ymin) >= l2 (L.L.Matrix_L2_Ymax) <= &&
  3810. {if}
  3811. l1 (L.L.Matrix_UpperL2_Xmin) >= l1 (L.L.Matrix_UpperL2_Xmax) <= && l0 ! &&
  3812. l1 (L.L.Matrix_LowerL2_Xmin) >= l1 (L.L.Matrix_LowerL2_Xmax) <= && l0 && ||
  3813. {else}
  3814. 0
  3815. {endif}
  3816. {end}
  3817.  
  3818. {macro:Matrix_IsInL3}
  3819. l2 (L.L.Matrix_L3_Ymin) >= l2 (L.L.Matrix_L3_Ymax) <= &&
  3820. {if}
  3821. l1 (L.L.Matrix_UpperL3_Xmin) >= l1 (L.L.Matrix_UpperL3_Xmax) <= && l0 ! &&
  3822. l1 (L.L.Matrix_LowerL3_Xmin) >= l1 (L.L.Matrix_LowerL3_Xmax) <= && l0 && ||
  3823. {else}
  3824. 0
  3825. {endif}
  3826. {end}
  3827.  
  3828. {macro:Matrix_IsInIcon}
  3829. l2 (L.L.Matrix_Icon_Ymin) >= l2 (L.L.Matrix_Icon_Ymax) <= &&
  3830. {if}
  3831. l1 (L.L.Matrix_UpperIcon_Xmin) >= l1 (L.L.Matrix_UpperIcon_Xmax) <= && l0 ! &&
  3832. l1 (L.L.Matrix_LowerIcon_Xmin) >= l1 (L.L.Matrix_LowerIcon_Xmax) <= && l0 && ||
  3833. {else}
  3834. 0
  3835. {endif}
  3836. {end}
  3837.  
  3838. {macro:Matrix_IsInNr}
  3839. l0 !
  3840. {if}
  3841. (L.L.Matrix_NrRightAlign)
  3842. {if}
  3843. l1 (L.L.Matrix_TerminusXLimit) >=
  3844. {else}
  3845. l1 (L.L.Matrix_NrPixelLength) 1 - <=
  3846. {endif}
  3847. {else}
  3848. l1 (C.L.Matrix_NrSideMaxWidth) 1 - <=
  3849. {endif}
  3850. {end}
  3851.  
  3852. {macro:Matrix_ProcessGoTo}
  3853. s3
  3854. $d 6 $cutBegin 1 $cutEnd $StrToFloat s2 0 >=
  3855. {if}
  3856. $d 6 $cutEnd 6 $SetLengthR "*GOTO[" $=
  3857. 1 $SetLengthR && "]" $= &&
  3858. l2 65536 < &&
  3859. {if}
  3860. l2 (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) s2
  3861. s0 1 (M.V.GetTerminusString) $RemoveSpaces
  3862. (M.L.Matrix_ProcessAlt) (S.$.Matrix_TerminusL1)
  3863. l0 2 (M.V.GetTerminusString) $RemoveSpaces
  3864. (M.L.Matrix_ProcessAlt) (S.$.Matrix_TerminusL2)
  3865. l0 3 (M.V.GetTerminusString) $RemoveSpaces
  3866. (M.L.Matrix_ProcessAlt) (S.$.Matrix_TerminusL3)
  3867. l2 l3 (M.V.GetTerminusString) $RemoveSpaces (M.L.Matrix_ProcessAlt)
  3868. {endif}
  3869. {endif}
  3870. {end}
  3871.  
  3872. {macro:Matrix_ProcessAlt}
  3873. (M.L.Matrix_FlipDotAlt) (M.L.Matrix_LEDAlt) (M.L.Matrix_FlipDotAlt)
  3874. (M.L.Matrix_MonochromeAlt) (M.L.Matrix_MultiColourAlt) (M.L.Matrix_MonochromeAlt)
  3875. (M.L.Matrix_FlipDotAlt) (M.L.Matrix_LEDAlt) (M.L.Matrix_FlipDotAlt)
  3876. {end}
  3877.  
  3878. {macro:Matrix_FlipDotAlt}
  3879. "{{" "*FLIP}}" (L.L.Matrix_LED) ! (M.L.Matrix_SelectAlt)
  3880. {end}
  3881.  
  3882. {macro:Matrix_LEDAlt}
  3883. "{{" "*LED}}" (L.L.Matrix_LED) (M.L.Matrix_SelectAlt)
  3884. {end}
  3885.  
  3886. {macro:Matrix_MonochromeAlt}
  3887. "{{" "*MONO}}" (L.L.Matrix_LEDMonochrome) (L.L.Matrix_LED) && (M.L.Matrix_SelectAlt)
  3888. {end}
  3889.  
  3890. {macro:Matrix_MultiColourAlt}
  3891. "{{" "*POLY}}" (L.L.Matrix_LEDMonochrome) ! (L.L.Matrix_LED) && (M.L.Matrix_SelectAlt)
  3892. {end}
  3893.  
  3894. {macro:Matrix_SelectAlt}
  3895. (S.L.Matrix_Temp2)
  3896. (S.$.Matrix_Temp1) $length (S.L.Matrix_Temp1) 0 $* $+
  3897. (S.$.Matrix_Temp0) $length (S.L.Matrix_Temp0) 0 $* $+
  3898. $d (L.L.Matrix_Temp1) $SetLengthR (L.$.Matrix_Temp1) $=
  3899. {if}
  3900. -1 s5
  3901. $d (L.L.Matrix_Temp1) $cutEnd $length s7
  3902. (L.L.Matrix_Temp0) s6
  3903. $d l6 $SetLengthR && (L.$.Matrix_Temp0) $= {if} 0 s5 max {else}
  3904. $d 1 l6 + $SetLengthR && 1 $cutEnd (L.$.Matrix_Temp0) $= 1 l7 <= && {if} s5 {else}
  3905. $d 2 l6 + $SetLengthR && 2 $cutEnd (L.$.Matrix_Temp0) $= 2 l7 <= && {if} 2 s5 min {else}
  3906. $d 3 l6 + $SetLengthR && 3 $cutEnd (L.$.Matrix_Temp0) $= 3 l7 <= && {if} 3 s5 min {else}
  3907. $d 4 l6 + $SetLengthR && 4 $cutEnd (L.$.Matrix_Temp0) $= 4 l7 <= && {if} 4 s5 min {else}
  3908. $d 5 l6 + $SetLengthR && 5 $cutEnd (L.$.Matrix_Temp0) $= 5 l7 <= && {if} 5 s5 min {else}
  3909. $d 6 l6 + $SetLengthR && 6 $cutEnd (L.$.Matrix_Temp0) $= 6 l7 <= && {if} 6 s5 min {else}
  3910. $d 7 l6 + $SetLengthR && 7 $cutEnd (L.$.Matrix_Temp0) $= 7 l7 <= && {if} 7 s5 min {else}
  3911. $d 8 l6 + $SetLengthR && 8 $cutEnd (L.$.Matrix_Temp0) $= 8 l7 <= && {if} 8 s5 min {else}
  3912. $d 9 l6 + $SetLengthR && 9 $cutEnd (L.$.Matrix_Temp0) $= 9 l7 <= && {if} 9 s5 min {else}
  3913. $d 10 l6 + $SetLengthR && 10 $cutEnd (L.$.Matrix_Temp0) $= 10 l7 <= && {if} 10 s5 min {else}
  3914. $d 11 l6 + $SetLengthR && 11 $cutEnd (L.$.Matrix_Temp0) $= 11 l7 <= && {if} 11 s5 min {else}
  3915. $d 12 l6 + $SetLengthR && 12 $cutEnd (L.$.Matrix_Temp0) $= 12 l7 <= && {if} 12 s5 min {else}
  3916. $d 13 l6 + $SetLengthR && 13 $cutEnd (L.$.Matrix_Temp0) $= 13 l7 <= && {if} 13 s5 min {else}
  3917. $d 14 l6 + $SetLengthR && 14 $cutEnd (L.$.Matrix_Temp0) $= 14 l7 <= && {if} 14 s5 min {else}
  3918. $d 15 l6 + $SetLengthR && 15 $cutEnd (L.$.Matrix_Temp0) $= 15 l7 <= && {if} 15 s5 min {else}
  3919. $d 16 l6 + $SetLengthR && 16 $cutEnd (L.$.Matrix_Temp0) $= 16 l7 <= && {if} 16 s5 min {else}
  3920. $d 17 l6 + $SetLengthR && 17 $cutEnd (L.$.Matrix_Temp0) $= 17 l7 <= && {if} 17 s5 min {else}
  3921. $d 18 l6 + $SetLengthR && 18 $cutEnd (L.$.Matrix_Temp0) $= 18 l7 <= && {if} 18 s5 min {else}
  3922. $d 19 l6 + $SetLengthR && 19 $cutEnd (L.$.Matrix_Temp0) $= 19 l7 <= && {if} 19 s5 min {else}
  3923. $d 20 l6 + $SetLengthR && 20 $cutEnd (L.$.Matrix_Temp0) $= 20 l7 <= && {if} 20 s5 min {else}
  3924. $d $length 20 l6 + > {if}
  3925. $d 21 l6 + $SetLengthR && 21 $cutEnd (L.$.Matrix_Temp0) $= 21 l7 <= && {if} 21 s5 min {else}
  3926. $d 22 l6 + $SetLengthR && 22 $cutEnd (L.$.Matrix_Temp0) $= 22 l7 <= && {if} 22 s5 min {else}
  3927. $d 23 l6 + $SetLengthR && 23 $cutEnd (L.$.Matrix_Temp0) $= 23 l7 <= && {if} 23 s5 min {else}
  3928. $d 24 l6 + $SetLengthR && 24 $cutEnd (L.$.Matrix_Temp0) $= 24 l7 <= && {if} 24 s5 min {else}
  3929. $d 25 l6 + $SetLengthR && 25 $cutEnd (L.$.Matrix_Temp0) $= 25 l7 <= && {if} 25 s5 min {else}
  3930. $d 26 l6 + $SetLengthR && 26 $cutEnd (L.$.Matrix_Temp0) $= 26 l7 <= && {if} 26 s5 min {else}
  3931. $d 27 l6 + $SetLengthR && 27 $cutEnd (L.$.Matrix_Temp0) $= 27 l7 <= && {if} 27 s5 min {else}
  3932. $d 28 l6 + $SetLengthR && 28 $cutEnd (L.$.Matrix_Temp0) $= 28 l7 <= && {if} 28 s5 min {else}
  3933. $d 29 l6 + $SetLengthR && 29 $cutEnd (L.$.Matrix_Temp0) $= 29 l7 <= && {if} 29 s5 min {else}
  3934. $d 30 l6 + $SetLengthR && 30 $cutEnd (L.$.Matrix_Temp0) $= 30 l7 <= && {if} 30 s5 min {else}
  3935. $d $length 30 l6 + > {if}
  3936. $d 31 l6 + $SetLengthR && 31 $cutEnd (L.$.Matrix_Temp0) $= 31 l7 <= && {if} 31 s5 min {else}
  3937. $d 32 l6 + $SetLengthR && 32 $cutEnd (L.$.Matrix_Temp0) $= 32 l7 <= && {if} 32 s5 min {else}
  3938. $d 33 l6 + $SetLengthR && 33 $cutEnd (L.$.Matrix_Temp0) $= 33 l7 <= && {if} 33 s5 min {else}
  3939. $d 34 l6 + $SetLengthR && 34 $cutEnd (L.$.Matrix_Temp0) $= 34 l7 <= && {if} 34 s5 min {else}
  3940. $d 35 l6 + $SetLengthR && 35 $cutEnd (L.$.Matrix_Temp0) $= 35 l7 <= && {if} 35 s5 min {else}
  3941. $d 36 l6 + $SetLengthR && 36 $cutEnd (L.$.Matrix_Temp0) $= 36 l7 <= && {if} 36 s5 min {else}
  3942. $d 37 l6 + $SetLengthR && 37 $cutEnd (L.$.Matrix_Temp0) $= 37 l7 <= && {if} 37 s5 min {else}
  3943. $d 38 l6 + $SetLengthR && 38 $cutEnd (L.$.Matrix_Temp0) $= 38 l7 <= && {if} 38 s5 min {else}
  3944. $d 39 l6 + $SetLengthR && 39 $cutEnd (L.$.Matrix_Temp0) $= 39 l7 <= && {if} 39 s5 min {else}
  3945. $d 40 l6 + $SetLengthR && 40 $cutEnd (L.$.Matrix_Temp0) $= 40 l7 <= && {if} 40 s5 min {else}
  3946. $d $length 40 l6 + > {if}
  3947. $d 41 l6 + $SetLengthR && 41 $cutEnd (L.$.Matrix_Temp0) $= 41 l7 <= && {if} 41 s5 min {else}
  3948. $d 42 l6 + $SetLengthR && 42 $cutEnd (L.$.Matrix_Temp0) $= 42 l7 <= && {if} 42 s5 min {else}
  3949. $d 43 l6 + $SetLengthR && 43 $cutEnd (L.$.Matrix_Temp0) $= 43 l7 <= && {if} 43 s5 min {else}
  3950. $d 44 l6 + $SetLengthR && 44 $cutEnd (L.$.Matrix_Temp0) $= 44 l7 <= && {if} 44 s5 min {else}
  3951. $d 45 l6 + $SetLengthR && 45 $cutEnd (L.$.Matrix_Temp0) $= 45 l7 <= && {if} 45 s5 min {else}
  3952. $d 46 l6 + $SetLengthR && 46 $cutEnd (L.$.Matrix_Temp0) $= 46 l7 <= && {if} 46 s5 min {else}
  3953. $d 47 l6 + $SetLengthR && 47 $cutEnd (L.$.Matrix_Temp0) $= 47 l7 <= && {if} 47 s5 min {else}
  3954. $d 48 l6 + $SetLengthR && 48 $cutEnd (L.$.Matrix_Temp0) $= 48 l7 <= && {if} 48 s5 min {else}
  3955. $d 49 l6 + $SetLengthR && 49 $cutEnd (L.$.Matrix_Temp0) $= 49 l7 <= && {if} 49 s5 min {else}
  3956. $d 50 l6 + $SetLengthR && 50 $cutEnd (L.$.Matrix_Temp0) $= 50 l7 <= && {if} 50 s5 min {else}
  3957. $d $length 50 l6 + > {if}
  3958. $d 51 l6 + $SetLengthR && 51 $cutEnd (L.$.Matrix_Temp0) $= 51 l7 <= && {if} 51 s5 min {else}
  3959. $d 52 l6 + $SetLengthR && 52 $cutEnd (L.$.Matrix_Temp0) $= 52 l7 <= && {if} 52 s5 min {else}
  3960. $d 53 l6 + $SetLengthR && 53 $cutEnd (L.$.Matrix_Temp0) $= 53 l7 <= && {if} 53 s5 min {else}
  3961. $d 54 l6 + $SetLengthR && 54 $cutEnd (L.$.Matrix_Temp0) $= 54 l7 <= && {if} 54 s5 min {else}
  3962. $d 55 l6 + $SetLengthR && 55 $cutEnd (L.$.Matrix_Temp0) $= 55 l7 <= && {if} 55 s5 min {else}
  3963. $d 56 l6 + $SetLengthR && 56 $cutEnd (L.$.Matrix_Temp0) $= 56 l7 <= && {if} 56 s5 min {else}
  3964. $d 57 l6 + $SetLengthR && 57 $cutEnd (L.$.Matrix_Temp0) $= 57 l7 <= && {if} 57 s5 min {else}
  3965. $d 58 l6 + $SetLengthR && 58 $cutEnd (L.$.Matrix_Temp0) $= 58 l7 <= && {if} 58 s5 min {else}
  3966. $d 59 l6 + $SetLengthR && 59 $cutEnd (L.$.Matrix_Temp0) $= 59 l7 <= && {if} 59 s5 min {else}
  3967. $d 60 l6 + $SetLengthR && 60 $cutEnd (L.$.Matrix_Temp0) $= 60 l7 <= && {if} 60 s5 min {else}
  3968. $d $length 60 l6 + > {if}
  3969. $d 61 l6 + $SetLengthR && 61 $cutEnd (L.$.Matrix_Temp0) $= 61 l7 <= && {if} 61 s5 min {else}
  3970. $d 62 l6 + $SetLengthR && 62 $cutEnd (L.$.Matrix_Temp0) $= 62 l7 <= && {if} 62 s5 min {else}
  3971. $d 63 l6 + $SetLengthR && 63 $cutEnd (L.$.Matrix_Temp0) $= 63 l7 <= && {if} 63 s5 min {else}
  3972. $d 64 l6 + $SetLengthR && 64 $cutEnd (L.$.Matrix_Temp0) $= 64 l7 <= && {if} 64 s5 min {else}
  3973. $d 65 l6 + $SetLengthR && 65 $cutEnd (L.$.Matrix_Temp0) $= 65 l7 <= && {if} 65 s5 min {else}
  3974. $d 66 l6 + $SetLengthR && 66 $cutEnd (L.$.Matrix_Temp0) $= 66 l7 <= && {if} 66 s5 min {else}
  3975. $d 67 l6 + $SetLengthR && 67 $cutEnd (L.$.Matrix_Temp0) $= 67 l7 <= && {if} 67 s5 min {else}
  3976. $d 68 l6 + $SetLengthR && 68 $cutEnd (L.$.Matrix_Temp0) $= 68 l7 <= && {if} 68 s5 min {else}
  3977. $d 69 l6 + $SetLengthR && 69 $cutEnd (L.$.Matrix_Temp0) $= 69 l7 <= && {if} 69 s5 min {else}
  3978. $d 70 l6 + $SetLengthR && 70 $cutEnd (L.$.Matrix_Temp0) $= 70 l7 <= && {if} 70 s5 min
  3979. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3980. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3981. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3982. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3983. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3984. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3985. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3986. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3987. {endif} {endif} {endif} {endif} {endif} {endif} {endif} {endif}
  3988. {endif} {endif} {endif} {endif}
  3989. l5 0 >=
  3990. {if}
  3991. (L.L.Matrix_Temp2)
  3992. {if}
  3993. l5 $SetLengthR
  3994. {else}
  3995. l5 2 + $cutEnd
  3996. {endif}
  3997. $RemoveSpaces
  3998. {else}
  3999. 0 $* $+
  4000. {endif}
  4001. {endif}
  4002. {end}
  4003.  
  4004. ' Processes commands in the form of "command arg1[,arg2]", where arg1 and arg2
  4005. ' has either one or two digits, e.g. *I>3,7 or *I>12,5 or *I>0,10
  4006. ' Used in conjunction with the macro Matrix_GetArgValue
  4007. {macro:Matrix_IsNextCmd}
  4008. 0 s1 +
  4009. (S.$.Matrix_Temp0) $length s7 0 $* $+
  4010. $d 8 l7 + $SetLengthR && 8 $cutEnd (L.$.Matrix_Temp0) $= {if} 8 s1 min {endif}
  4011. $d 7 l7 + $SetLengthR && 7 $cutEnd (L.$.Matrix_Temp0) $= {if} 7 s1 min {endif} ||
  4012. $d 6 l7 + $SetLengthR && 6 $cutEnd (L.$.Matrix_Temp0) $= {if} 6 s1 min {endif} ||
  4013. $d 5 l7 + $SetLengthR && 5 $cutEnd (L.$.Matrix_Temp0) $= {if} 5 s1 min {endif} ||
  4014. $d 4 l7 + $SetLengthR && 4 $cutEnd (L.$.Matrix_Temp0) $= {if} 4 s1 min {endif} ||
  4015. $d 3 l7 + $SetLengthR && 3 $cutEnd (L.$.Matrix_Temp0) $= {if} 3 s1 min {endif} ||
  4016. $d 2 l7 + $SetLengthR && 2 $cutEnd (L.$.Matrix_Temp0) $= {if} 2 s1 min {endif} ||
  4017. $d 1 l7 + $SetLengthR && 1 $cutEnd (L.$.Matrix_Temp0) $= {if} s1 {endif} ||
  4018. $d l7 $SetLengthR && (L.$.Matrix_Temp0) $= {if} 0 s1 max {endif} ||
  4019. $d l1 $SetLengthR d - + (L.L.Font_Aux_2) (M.V.TextLength) 150 < &&
  4020. {end}
  4021.  
  4022. {macro:Matrix_GetArgValue}
  4023. $d $length 3 >=
  4024. $d $StrToFloat 0 < &&
  4025. {if}
  4026. $d 1 $cutBegin 1 $SetLengthL * "," $=
  4027. $d 2 $cutBegin 1 $SetLengthL * "," $= 2 * +
  4028. $d 3 $cutBegin 1 $SetLengthL * "," $= 3 * +
  4029. (L.L.Matrix_Res) 1 =
  4030. {if}
  4031. * $SetLengthL $StrToFloat
  4032. {else}
  4033. (L.L.Matrix_Res) 2 =
  4034. {if}
  4035. * + 1 + $cutBegin $StrToFloat
  4036. {endif}
  4037. {endif}
  4038. {else}
  4039. $StrToFloat (L.L.Matrix_Res) *
  4040. {endif}
  4041. 0 $* $+
  4042. {end}
  4043.  
  4044. {macro:Matrix_LEDResetColours}
  4045. (L.L.Matrix_LED)
  4046. {if}
  4047. (L.L.Matrix_LEDHue) (S.L.Matrix_L1Hue) (S.L.Matrix_L2Hue) (S.L.Matrix_L3Hue)
  4048. (S.L.Matrix_IconHue) (S.L.Matrix_NrHue)
  4049. (L.L.Matrix_LEDSaturation) (S.L.Matrix_L1Saturation) (S.L.Matrix_L2Saturation)
  4050. (S.L.Matrix_L3Saturation) (S.L.Matrix_IconSaturation) (S.L.Matrix_NrSaturation)
  4051. (L.L.Matrix_LEDBrightness) (S.L.Matrix_L1Brightness) (S.L.Matrix_L2Brightness)
  4052. (S.L.Matrix_L3Brightness) (S.L.Matrix_IconBrightness) (S.L.Matrix_NrBrightness)
  4053.  
  4054. (L.L.Matrix_LEDBGHue) (S.L.Matrix_L1BGHue) (S.L.Matrix_L2BGHue) (S.L.Matrix_L3BGHue)
  4055. (S.L.Matrix_IconBGHue) (S.L.Matrix_NrBGHue)
  4056. (L.L.Matrix_LEDBGSaturation) (S.L.Matrix_L1BGSaturation) (S.L.Matrix_L2BGSaturation)
  4057. (S.L.Matrix_L3BGSaturation) (S.L.Matrix_IconBGSaturation) (S.L.Matrix_NrBGSaturation)
  4058. (L.L.Matrix_LEDBGBrightness) (S.L.Matrix_L1BGBrightness) (S.L.Matrix_L2BGBrightness)
  4059. (S.L.Matrix_L3BGBrightness) (S.L.Matrix_IconBGBrightness) (S.L.Matrix_NrBGBrightness)
  4060.  
  4061. (C.L.Matrix_LEDMonochrome) !
  4062. {if}
  4063. (C.L.Matrix_L1Hue) d -1 = ! {if} * (S.L.Matrix_L1Hue) {endif}
  4064. (C.L.Matrix_L2Hue) d -1 = ! {if} * (S.L.Matrix_L2Hue) {endif}
  4065. (C.L.Matrix_L3Hue) d -1 = ! {if} * (S.L.Matrix_L3Hue) {endif}
  4066. (C.L.Matrix_IconHue) d -1 = ! {if} * (S.L.Matrix_IconHue) {endif}
  4067. (C.L.Matrix_NrHue) d -1 = ! {if} * (S.L.Matrix_NrHue) {endif}
  4068. (C.L.Matrix_L1Saturation) d -1 = ! {if} * (S.L.Matrix_L1Saturation) {endif}
  4069. (C.L.Matrix_L2Saturation) d -1 = ! {if} * (S.L.Matrix_L2Saturation) {endif}
  4070. (C.L.Matrix_L3Saturation) d -1 = ! {if} * (S.L.Matrix_L3Saturation) {endif}
  4071. (C.L.Matrix_IconSaturation) d -1 = ! {if} * (S.L.Matrix_IconSaturation) {endif}
  4072. (C.L.Matrix_NrSaturation) d -1 = ! {if} * (S.L.Matrix_NrSaturation) {endif}
  4073. (C.L.Matrix_L1Brightness) d -1 = ! {if} * (S.L.Matrix_L1Brightness) {endif}
  4074. (C.L.Matrix_L2Brightness) d -1 = ! {if} * (S.L.Matrix_L2Brightness) {endif}
  4075. (C.L.Matrix_L3Brightness) d -1 = ! {if} * (S.L.Matrix_L3Brightness) {endif}
  4076. (C.L.Matrix_IconBrightness) d -1 = ! {if} * (S.L.Matrix_IconBrightness) {endif}
  4077. (C.L.Matrix_NrBrightness) d -1 = ! {if} * (S.L.Matrix_NrBrightness) {endif}
  4078.  
  4079. (C.L.Matrix_L1BGHue) d -1 = ! {if} * (S.L.Matrix_L1BGHue) {endif}
  4080. (C.L.Matrix_L2BGHue) d -1 = ! {if} * (S.L.Matrix_L2BGHue) {endif}
  4081. (C.L.Matrix_L3BGHue) d -1 = ! {if} * (S.L.Matrix_L3BGHue) {endif}
  4082. (C.L.Matrix_IconBGHue) d -1 = ! {if} * (S.L.Matrix_IconBGHue) {endif}
  4083. (C.L.Matrix_NrBGHue) d -1 = ! {if} * (S.L.Matrix_NrBGHue) {endif}
  4084. (C.L.Matrix_L1BGSaturation) d -1 = ! {if} * (S.L.Matrix_L1BGSaturation) {endif}
  4085. (C.L.Matrix_L2BGSaturation) d -1 = ! {if} * (S.L.Matrix_L2BGSaturation) {endif}
  4086. (C.L.Matrix_L3BGSaturation) d -1 = ! {if} * (S.L.Matrix_L3BGSaturation) {endif}
  4087. (C.L.Matrix_IconBGSaturation) d -1 = ! {if} * (S.L.Matrix_IconBGSaturation) {endif}
  4088. (C.L.Matrix_NrBGSaturation) d -1 = ! {if} * (S.L.Matrix_NrBGSaturation) {endif}
  4089. (C.L.Matrix_L1BGBrightness) d -1 = ! {if} * (S.L.Matrix_L1BGBrightness) {endif}
  4090. (C.L.Matrix_L2BGBrightness) d -1 = ! {if} * (S.L.Matrix_L2BGBrightness) {endif}
  4091. (C.L.Matrix_L3BGBrightness) d -1 = ! {if} * (S.L.Matrix_L3BGBrightness) {endif}
  4092. (C.L.Matrix_IconBGBrightness) d -1 = ! {if} * (S.L.Matrix_IconBGBrightness) {endif}
  4093. (C.L.Matrix_NrBGBrightness) d -1 = ! {if} * (S.L.Matrix_NrBGBrightness) {endif}
  4094. {endif}
  4095. {endif}
  4096. {end}
  4097.  
  4098. {macro:Matrix_LEDStandardColours}
  4099. 0 s3 s4 s5
  4100. ' Code Hue Sat Val
  4101. $d "AZ" $= {if} 210 s3 1 s4 1 s5 {endif}
  4102. $d "BL" $= {if} 240 s3 1 s4 1 s5 {endif}
  4103. $d "BK" $= {if} 0 s3 0 s4 0 s5 {endif}
  4104. $d "CG" $= {if} 90 s3 1 s4 1 s5 {endif}
  4105. $d "CP" $= {if} 0 s3 0.5 s4 1 s5 {endif}
  4106. $d "CY" $= {if} 180 s3 1 s4 1 s5 {endif}
  4107. $d "EB" $= {if} 180 s3 0.5 s4 1 s5 {endif}
  4108. $d "FP" $= {if} 300 s3 0.5 s4 1 s5 {endif}
  4109. $d "GR" $= {if} 120 s3 1 s4 0.5 s5 {endif}
  4110. $d "GY" $= {if} 0 s3 0 s4 0.5 s5 {endif}
  4111. $d "KH" $= {if} 60 s3 0.5 s4 1 s5 {endif}
  4112. $d "LG" $= {if} 120 s3 0.5 s4 1 s5 {endif}
  4113. $d "LM" $= {if} 120 s3 1 s4 1 s5 {endif}
  4114. $d "MG" $= {if} 300 s3 1 s4 1 s5 {endif}
  4115. $d "MR" $= {if} 0 s3 1 s4 0.5 s5 {endif}
  4116. $d "NV" $= {if} 240 s3 1 s4 0.5 s5 {endif}
  4117. $d "OL" $= {if} 60 s3 1 s4 0.5 s5 {endif}
  4118. $d "OR" $= {if} 30 s3 1 s4 1 s5 {endif}
  4119. $d "PP" $= {if} 300 s3 1 s4 0.5 s5 {endif}
  4120. $d "RD" $= {if} 0 s3 1 s4 1 s5 {endif}
  4121. $d "RS" $= {if} 330 s3 1 s4 1 s5 {endif}
  4122. $d "SB" $= {if} 240 s3 0.5 s4 1 s5 {endif}
  4123. $d "SG" $= {if} 150 s3 1 s4 1 s5 {endif}
  4124. $d "TL" $= {if} 180 s3 1 s4 0.5 s5 {endif}
  4125. $d "VL" $= {if} 270 s3 1 s4 1 s5 {endif}
  4126. $d "YL" $= {if} 60 s3 1 s4 1 s5 {endif}
  4127. $d "WH" $= {if} 0 s3 0 s4 1 s5 {endif}
  4128. l5 l4 l3
  4129. {end}
  4130.  
  4131. {macro:Matrix_DrawBG}
  4132. (C.L.Matrix_LEDBGHue) (C.L.Matrix_LEDBGSaturation) (C.L.Matrix_LEDBGBrightness)
  4133. 0 0 (C.L.Matrix_Width) 1 - (C.L.Matrix_Height) 2 * 1 -
  4134. (M.L.Matrix_DrawBGRect)
  4135.  
  4136. (L.L.Matrix_L1BGHue) (L.L.Matrix_L1BGSaturation) (L.L.Matrix_L1BGBrightness)
  4137. (L.L.Matrix_UpperL1_Xmin) (L.L.Matrix_L1_Ymin) (L.L.Matrix_UpperL1_Xmax) (L.L.Matrix_L1_Ymax)
  4138. (M.L.Matrix_DrawBGRect)
  4139.  
  4140. (L.L.Matrix_L1BGHue) (L.L.Matrix_L1BGSaturation) (L.L.Matrix_L1BGBrightness)
  4141. (L.L.Matrix_LowerL1_Xmin) (L.L.Matrix_L1_Ymin) (C.L.Matrix_Height) + (L.L.Matrix_LowerL1_Xmax) (L.L.Matrix_L1_Ymax) (C.L.Matrix_Height) +
  4142. (M.L.Matrix_DrawBGRect)
  4143.  
  4144. (L.L.Matrix_L2BGHue) (L.L.Matrix_L2BGSaturation) (L.L.Matrix_L2BGBrightness)
  4145. (L.L.Matrix_UpperL2_Xmin) (L.L.Matrix_L2_Ymin) (L.L.Matrix_UpperL2_Xmax) (L.L.Matrix_L2_Ymax)
  4146. (M.L.Matrix_DrawBGRect)
  4147.  
  4148. (L.L.Matrix_L2BGHue) (L.L.Matrix_L2BGSaturation) (L.L.Matrix_L2BGBrightness)
  4149. (L.L.Matrix_LowerL2_Xmin) (L.L.Matrix_L2_Ymin) (C.L.Matrix_Height) + (L.L.Matrix_LowerL2_Xmax) (L.L.Matrix_L2_Ymax) (C.L.Matrix_Height) +
  4150. (M.L.Matrix_DrawBGRect)
  4151.  
  4152. (L.L.Matrix_L3BGHue) (L.L.Matrix_L3BGSaturation) (L.L.Matrix_L3BGBrightness)
  4153. (L.L.Matrix_UpperL3_Xmin) (L.L.Matrix_L3_Ymin) (L.L.Matrix_UpperL3_Xmax) (L.L.Matrix_L3_Ymax)
  4154. (M.L.Matrix_DrawBGRect)
  4155.  
  4156. (L.L.Matrix_L3BGHue) (L.L.Matrix_L3BGSaturation) (L.L.Matrix_L3BGBrightness)
  4157. (L.L.Matrix_LowerL3_Xmin) (L.L.Matrix_L3_Ymin) (C.L.Matrix_Height) + (L.L.Matrix_LowerL3_Xmax) (L.L.Matrix_L3_Ymax) (C.L.Matrix_Height) +
  4158. (M.L.Matrix_DrawBGRect)
  4159.  
  4160. (L.L.Matrix_IconBGHue) (L.L.Matrix_IconBGSaturation) (L.L.Matrix_IconBGBrightness)
  4161. (L.L.Matrix_UpperIcon_Xmin) (L.L.Matrix_Icon_Ymin) (L.L.Matrix_UpperIcon_Xmax) (L.L.Matrix_Icon_Ymax)
  4162. (M.L.Matrix_DrawBGRect)
  4163.  
  4164. (L.L.Matrix_IconBGHue) (L.L.Matrix_IconBGSaturation) (L.L.Matrix_IconBGBrightness)
  4165. (L.L.Matrix_LowerIcon_Xmin) (L.L.Matrix_Icon_Ymin) (C.L.Matrix_Height) + (L.L.Matrix_LowerIcon_Xmax) (L.L.Matrix_Icon_Ymax) (C.L.Matrix_Height) +
  4166. (M.L.Matrix_DrawBGRect)
  4167.  
  4168. (L.L.Matrix_NrBGHue) (L.L.Matrix_NrBGSaturation) (L.L.Matrix_NrBGBrightness)
  4169. (L.L.Matrix_NrRightAlign)
  4170. {if}
  4171. * (L.L.Matrix_TerminusXLimit) 0 (C.L.Matrix_Width) 1 - (C.L.Matrix_Height) 1 -
  4172. {else}
  4173. 0 (L.L.Matrix_NrPixelLength) 1 - (C.L.Matrix_Height) 1 -
  4174. {endif}
  4175. (M.L.Matrix_DrawBGRect)
  4176.  
  4177. (L.L.Matrix_NrBGHue) (L.L.Matrix_NrBGSaturation) (L.L.Matrix_NrBGBrightness)
  4178. 0 (C.L.Matrix_Height) (C.L.Matrix_NrSideMaxWidth) 1 - (C.L.Matrix_Height) 2 * 1 -
  4179. (M.L.Matrix_DrawBGRect)
  4180. {end}
  4181.  
  4182. {macro:Matrix_DrawBGRect}
  4183. 4 * 3 + (S.L.Matrix_Temp3) d - +
  4184. 4 * 3 + (S.L.Matrix_Temp2) d - +
  4185. 4 * (S.L.Matrix_Temp1) d - +
  4186. 4 * (S.L.Matrix_Temp0) d - +
  4187. (S.L.Matrix_PixelBGBrightness) d - +
  4188. (S.L.Matrix_PixelBGSaturation) d - +
  4189. (S.L.Matrix_PixelBGHue)
  4190.  
  4191. 1 (L.L.Matrix_PixelBGSaturation) - 255 * (L.L.Matrix_PixelBGBrightness) *
  4192. 0 max 255 min
  4193. s6
  4194. 5 l6 l6 l6 l6 (M.V.STSetColor)
  4195. 5 (L.L.Matrix_Temp0) (L.L.Matrix_Temp1) (L.L.Matrix_Temp2) (L.L.Matrix_Temp3) (M.V.STDrawRect)
  4196.  
  4197. (L.L.Matrix_PixelBGHue) 300 > (L.L.Matrix_PixelBGHue) 120 < ||
  4198. {if}
  4199. * 255 (L.L.Matrix_PixelBGBrightness) sqr *
  4200. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4201. {endif}
  4202. s6
  4203. 1 l6 l6 l6 l6 (M.V.STSetColor)
  4204. 1 (L.L.Matrix_Temp0) (L.L.Matrix_Temp1) (L.L.Matrix_Temp2) (L.L.Matrix_Temp3) (M.V.STDrawRect)
  4205.  
  4206. (L.L.Matrix_PixelBGHue) 30 > (L.L.Matrix_PixelBGHue) 210 < &&
  4207. {if}
  4208. * (L.L.Matrix_PixelBGHue) 330 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4209. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4210. {endif}
  4211. s6
  4212. 2 l6 l6 l6 l6 (M.V.STSetColor)
  4213. 2 (L.L.Matrix_Temp0) (L.L.Matrix_Temp1) (L.L.Matrix_Temp2) (L.L.Matrix_Temp3) (M.V.STDrawRect)
  4214.  
  4215. (L.L.Matrix_PixelBGHue) 120 > (L.L.Matrix_PixelBGHue) 300 < &&
  4216. {if}
  4217. * (L.L.Matrix_PixelBGHue) 240 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4218. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4219. {endif}
  4220. s6
  4221. 3 l6 l6 l6 l6 (M.V.STSetColor)
  4222. 3 (L.L.Matrix_Temp0) (L.L.Matrix_Temp1) (L.L.Matrix_Temp2) (L.L.Matrix_Temp3) (M.V.STDrawRect)
  4223.  
  4224. (L.L.Matrix_PixelBGHue) 210 > (L.L.Matrix_PixelBGHue) 30 < ||
  4225. {if}
  4226. * (L.L.Matrix_PixelBGHue) 150 + 360 % 17 * 6 /
  4227. 210 (L.L.Matrix_PixelBGHue) 180 + 360 % - 17 * 6 / min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4228. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4229. {endif}
  4230. s6
  4231. 4 l6 l6 l6 l6 (M.V.STSetColor)
  4232. 4 (L.L.Matrix_Temp0) (L.L.Matrix_Temp1) (L.L.Matrix_Temp2) (L.L.Matrix_Temp3) (M.V.STDrawRect)
  4233. {end}
  4234.  
  4235. {macro:Matrix_DrawColour4LED}
  4236. (L.L.Matrix_IsInL1)
  4237. {if}
  4238. (L.L.Matrix_L1Hue) (L.L.Matrix_L1Saturation)
  4239. (L.L.Matrix_L1Brightness)
  4240. (L.L.Matrix_L1BGHue) (L.L.Matrix_L1BGSaturation)
  4241. (L.L.Matrix_L1BGBrightness) (M.L.Matrix_DrawHSV4LED)
  4242. {else}
  4243. (L.L.Matrix_IsInL2)
  4244. {if}
  4245. (L.L.Matrix_L2Hue) (L.L.Matrix_L2Saturation)
  4246. (L.L.Matrix_L2Brightness)
  4247. (L.L.Matrix_L2BGHue) (L.L.Matrix_L2BGSaturation)
  4248. (L.L.Matrix_L2BGBrightness) (M.L.Matrix_DrawHSV4LED)
  4249. {else}
  4250. (L.L.Matrix_IsInL3)
  4251. {if}
  4252. (L.L.Matrix_L3Hue) (L.L.Matrix_L3Saturation)
  4253. (L.L.Matrix_L3Brightness)
  4254. (L.L.Matrix_L3BGHue) (L.L.Matrix_L3BGSaturation)
  4255. (L.L.Matrix_L3BGBrightness) (M.L.Matrix_DrawHSV4LED)
  4256. {else}
  4257. (L.L.Matrix_IsInIcon)
  4258. {if}
  4259. (L.L.Matrix_IconHue) (L.L.Matrix_IconSaturation)
  4260. (L.L.Matrix_IconBrightness)
  4261. (L.L.Matrix_IconBGHue) (L.L.Matrix_IconBGSaturation)
  4262. (L.L.Matrix_IconBGBrightness) (M.L.Matrix_DrawHSV4LED)
  4263. {else}
  4264. (L.L.Matrix_IsInNr)
  4265. {if}
  4266. (L.L.Matrix_NrHue) (L.L.Matrix_NrSaturation)
  4267. (L.L.Matrix_NrBrightness)
  4268. (L.L.Matrix_NrBGHue) (L.L.Matrix_NrBGSaturation)
  4269. (L.L.Matrix_NrBGBrightness) (M.L.Matrix_DrawHSV4LED)
  4270. {else}
  4271. (L.L.Matrix_LEDHue) (L.L.Matrix_LEDSaturation)
  4272. (L.L.Matrix_LEDBrightness)
  4273. (C.L.Matrix_LEDBGHue) (C.L.Matrix_LEDBGSaturation)
  4274. (C.L.Matrix_LEDBGBrightness) (M.L.Matrix_DrawHSV4LED)
  4275. {endif}
  4276. {endif}
  4277. {endif}
  4278. {endif}
  4279. {endif}
  4280. {end}
  4281.  
  4282. {macro:Matrix_DrawColour1LED}
  4283. 0 (M.V.STGetR) (S.L.Matrix_PixelR)
  4284. 0 (M.V.STGetG) (S.L.Matrix_PixelG)
  4285. 0 (M.V.STGetB) (S.L.Matrix_PixelB)
  4286. (L.L.Matrix_PixelR) (L.L.Matrix_PixelG) (L.L.Matrix_PixelB)
  4287. (M.L.Matrix_RGB2Hue) (S.L.Matrix_PixelHue)
  4288. (L.L.Matrix_PixelR) (L.L.Matrix_PixelG) (L.L.Matrix_PixelB)
  4289. (M.L.Matrix_RGB2Saturation) (S.L.Matrix_PixelSaturation)
  4290. (L.L.Matrix_PixelR) (L.L.Matrix_PixelG) (L.L.Matrix_PixelB)
  4291. max max 255 / (S.L.Matrix_PixelBrightness)
  4292. (M.L.Matrix_DrawHSV1LED)
  4293. {end}
  4294.  
  4295. {macro:Matrix_DrawHSV4LED}
  4296. (S.L.Matrix_PixelBGBrightness) d - +
  4297. (S.L.Matrix_PixelBGSaturation) d - +
  4298. (S.L.Matrix_PixelBGHue) d - +
  4299. (S.L.Matrix_PixelBrightness) d - +
  4300. (S.L.Matrix_PixelSaturation) d - +
  4301. (S.L.Matrix_PixelHue)
  4302.  
  4303. (L.L.Matrix_HideScrollingAnimation)
  4304. {if}
  4305. 1 (L.L.Matrix_PixelSaturation) - 255 * (L.L.Matrix_PixelBrightness) *
  4306. 0 max 255 min
  4307. 5 (M.L.Matrix_Draw4LED)
  4308.  
  4309. (L.L.Matrix_PixelHue) 300 > (L.L.Matrix_PixelHue) 120 < ||
  4310. {if}
  4311. * 255 (L.L.Matrix_PixelBrightness) sqr *
  4312. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4313. {endif}
  4314. 1 (M.L.Matrix_Draw4LED)
  4315.  
  4316. (L.L.Matrix_PixelHue) 30 > (L.L.Matrix_PixelHue) 210 < &&
  4317. {if}
  4318. * (L.L.Matrix_PixelHue) 330 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4319. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4320. {endif}
  4321. 2 (M.L.Matrix_Draw4LED)
  4322.  
  4323. (L.L.Matrix_PixelHue) 120 > (L.L.Matrix_PixelHue) 300 < &&
  4324. {if}
  4325. * (L.L.Matrix_PixelHue) 240 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4326. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4327. {endif}
  4328. 3 (M.L.Matrix_Draw4LED)
  4329.  
  4330. (L.L.Matrix_PixelHue) 210 > (L.L.Matrix_PixelHue) 30 < ||
  4331. {if}
  4332. * (L.L.Matrix_PixelHue) 150 + 360 % 17 * 6 /
  4333. 210 (L.L.Matrix_PixelHue) 180 + 360 % - 17 * 6 / min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4334. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4335. {endif}
  4336. 4 (M.L.Matrix_Draw4LED)
  4337. {else}
  4338. 1 (L.L.Matrix_PixelSaturation) - 255 * (L.L.Matrix_PixelBrightness) *
  4339. 0 max 255 min
  4340. 1 (L.L.Matrix_PixelBGSaturation) - 255 * (L.L.Matrix_PixelBGBrightness) *
  4341. 0 max 255 min
  4342. 5 (M.L.Matrix_Draw4LED)
  4343. (L.L.Matrix_PixelHue) 300 > (L.L.Matrix_PixelHue) 120 < ||
  4344. {if}
  4345. * 255 (L.L.Matrix_PixelBrightness) sqr *
  4346. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4347. {endif}
  4348. (L.L.Matrix_PixelBGHue) 300 > (L.L.Matrix_PixelBGHue) 120 < ||
  4349. {if}
  4350. * 255 (L.L.Matrix_PixelBGBrightness) sqr *
  4351. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4352. {endif}
  4353. 1 (M.L.Matrix_Draw4LED)
  4354.  
  4355. (L.L.Matrix_PixelHue) 30 > (L.L.Matrix_PixelHue) 210 < &&
  4356. {if}
  4357. * (L.L.Matrix_PixelHue) 330 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4358. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4359. {endif}
  4360. (L.L.Matrix_PixelBGHue) 30 > (L.L.Matrix_PixelBGHue) 210 < &&
  4361. {if}
  4362. * (L.L.Matrix_PixelBGHue) 330 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4363. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4364. {endif}
  4365. 2 (M.L.Matrix_Draw4LED)
  4366.  
  4367. (L.L.Matrix_PixelHue) 120 > (L.L.Matrix_PixelHue) 300 < &&
  4368. {if}
  4369. * (L.L.Matrix_PixelHue) 240 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4370. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4371. {endif}
  4372. (L.L.Matrix_PixelBGHue) 120 > (L.L.Matrix_PixelBGHue) 300 < &&
  4373. {if}
  4374. * (L.L.Matrix_PixelBGHue) 240 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4375. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4376. {endif}
  4377. 3 (M.L.Matrix_Draw4LED)
  4378.  
  4379. (L.L.Matrix_PixelHue) 210 > (L.L.Matrix_PixelHue) 30 < ||
  4380. {if}
  4381. * (L.L.Matrix_PixelHue) 150 + 360 % 17 * 6 /
  4382. 210 (L.L.Matrix_PixelHue) 180 + 360 % - 17 * 6 / min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4383. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4384. {endif}
  4385. (L.L.Matrix_PixelBGHue) 210 > (L.L.Matrix_PixelBGHue) 30 < ||
  4386. {if}
  4387. * (L.L.Matrix_PixelBGHue) 150 + 360 % 17 * 6 /
  4388. 210 (L.L.Matrix_PixelBGHue) 180 + 360 % - 17 * 6 / min (L.L.Matrix_PixelBGBrightness) sqr * 0 max 255 min
  4389. (L.L.Matrix_PixelBGSaturation) 0.05 >= *
  4390. {endif}
  4391. 4 (M.L.Matrix_Draw4LED)
  4392. {endif}
  4393. {end}
  4394.  
  4395. {macro:Matrix_Draw4LED}
  4396. s3 d - +
  4397. (L.L.Matrix_HideScrollingAnimation)
  4398. {if}
  4399. * s7
  4400. {if}
  4401. l3
  4402. l6 2 % l7 *
  4403. 0
  4404. 0
  4405. 0
  4406. (M.V.STSetColor)
  4407.  
  4408. l3
  4409. l1 (C.L.Matrix_PixelFactor) * s4
  4410. l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5
  4411. l4 3 +
  4412. l5 3 +
  4413. (M.V.STDrawRect)
  4414.  
  4415. l3
  4416. l6 4 % 2 >= l7 *
  4417. 0
  4418. 0
  4419. 0
  4420. (M.V.STSetColor)
  4421.  
  4422. l3
  4423. l4
  4424. l5 4 +
  4425. l4 3 +
  4426. l5 7 +
  4427. (M.V.STDrawRect)
  4428.  
  4429. l3
  4430. l6 8 % 4 >= l7 *
  4431. 0
  4432. 0
  4433. 0
  4434. (M.V.STSetColor)
  4435.  
  4436. l3
  4437. l4
  4438. l5 8 +
  4439. l4 3 +
  4440. l5 11 +
  4441. (M.V.STDrawRect)
  4442.  
  4443. l3
  4444. l6 8 >= l7 *
  4445. 255
  4446. 255
  4447. 255
  4448. (M.V.STSetColor)
  4449.  
  4450. l3
  4451. l4
  4452. l5 12 +
  4453. l4 3 +
  4454. l5 15 +
  4455. (M.V.STDrawRect)
  4456. {endif}
  4457. {else}
  4458. +
  4459. 256 * + s7
  4460. {if}
  4461. l3
  4462. l6 2 % {if} * l7 256 % {else} + l7 256 / trunc {endif}
  4463. 255
  4464. 255
  4465. 255
  4466. (M.V.STSetColor)
  4467.  
  4468. l3
  4469. l1 (C.L.Matrix_PixelFactor) * s4
  4470. l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5
  4471. l4 3 +
  4472. l5 3 +
  4473. (M.V.STDrawRect)
  4474.  
  4475. l3
  4476. l6 4 % 2 >= {if} * l7 256 % {else} + l7 256 / trunc {endif}
  4477. 255
  4478. 255
  4479. 255
  4480. (M.V.STSetColor)
  4481.  
  4482. l3
  4483. l4
  4484. l5 4 +
  4485. l4 3 +
  4486. l5 7 +
  4487. (M.V.STDrawRect)
  4488.  
  4489. l3
  4490. l6 8 % 4 >= {if} * l7 256 % {else} + l7 256 / trunc {endif}
  4491. 255
  4492. 255
  4493. 255
  4494. (M.V.STSetColor)
  4495.  
  4496. l3
  4497. l4
  4498. l5 8 +
  4499. l4 3 +
  4500. l5 11 +
  4501. (M.V.STDrawRect)
  4502.  
  4503. l3
  4504. l6 8 >= {if} * l7 256 % {else} + l7 256 / trunc {endif}
  4505. 255
  4506. 255
  4507. 255
  4508. (M.V.STSetColor)
  4509.  
  4510. l3
  4511. l4
  4512. l5 12 +
  4513. l4 3 +
  4514. l5 15 +
  4515. (M.V.STDrawRect)
  4516. {endif}
  4517. {endif}
  4518. {end}
  4519.  
  4520. {macro:Matrix_DrawHSV1LED}
  4521. (L.L.Matrix_PixelSaturation) 0.1 <
  4522. {if}
  4523. 0 1 (M.L.Matrix_Draw1LED)
  4524. 0 2 (M.L.Matrix_Draw1LED)
  4525. 0 3 (M.L.Matrix_Draw1LED)
  4526. 0 4 (M.L.Matrix_Draw1LED)
  4527. 255 (L.L.Matrix_PixelBrightness) * 0 max 255 min 5 (M.L.Matrix_Draw1LED)
  4528. {else}
  4529. 1 (L.L.Matrix_PixelSaturation) - 255 * (L.L.Matrix_PixelBrightness) *
  4530. 0 max 255 min 5 (M.L.Matrix_Draw1LED)
  4531. (L.L.Matrix_PixelHue) 300 > (L.L.Matrix_PixelHue) 120 < ||
  4532. {if}
  4533. 255 (L.L.Matrix_PixelBrightness) sqr *
  4534. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4535. {else}
  4536. 0
  4537. {endif}
  4538. 1 (M.L.Matrix_Draw1LED)
  4539. (L.L.Matrix_PixelHue) 30 > (L.L.Matrix_PixelHue) 210 < &&
  4540. {if}
  4541. (L.L.Matrix_PixelHue) 330 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4542. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4543. {else}
  4544. 0
  4545. {endif}
  4546. 2 (M.L.Matrix_Draw1LED)
  4547. (L.L.Matrix_PixelHue) 120 > (L.L.Matrix_PixelHue) 300 < &&
  4548. {if}
  4549. (L.L.Matrix_PixelHue) 240 + 360 % 17 * 6 / 255 min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4550. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4551. {else}
  4552. 0
  4553. {endif}
  4554. 3 (M.L.Matrix_Draw1LED)
  4555. (L.L.Matrix_PixelHue) 210 > (L.L.Matrix_PixelHue) 30 < ||
  4556. {if}
  4557. (L.L.Matrix_PixelHue) 150 + 360 % 17 * 6 /
  4558. 210 (L.L.Matrix_PixelHue) 180 + 360 % - 17 * 6 / min (L.L.Matrix_PixelBrightness) sqr * 0 max 255 min
  4559. (L.L.Matrix_PixelSaturation) 0.05 >= *
  4560. {else}
  4561. 0
  4562. {endif}
  4563. 4 (M.L.Matrix_Draw1LED)
  4564. {endif}
  4565. {end}
  4566.  
  4567. {macro:Matrix_Draw1LED}
  4568. s3 d - + s7
  4569.  
  4570. l3
  4571. l7
  4572. (L.L.Matrix_PixelR)
  4573. (L.L.Matrix_PixelG)
  4574. (L.L.Matrix_PixelB)
  4575. (M.V.STSetColor)
  4576.  
  4577. l3
  4578. l1 (C.L.Matrix_PixelFactor) * s4
  4579. l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5
  4580. l4 3 +
  4581. l5 3 +
  4582. (M.V.STDrawRect)
  4583. {end}
  4584.  
  4585. {macro:Matrix_RGBHex2Dec}
  4586. (L.L.Font_Aux_1) s7
  4587. $d 1 $SetLengthL l7 (M.V.TextLength) 16 * s3
  4588. $d 2 $SetLengthL 1 $cutBegin l7 (M.V.TextLength) l3 + s3
  4589. $d 3 $SetLengthL 2 $cutBegin l7 (M.V.TextLength) 16 * s4
  4590. $d 3 $SetLengthR 2 $cutEnd l7 (M.V.TextLength) l4 + s4
  4591. $d 2 $SetLengthR 1 $cutEnd l7 (M.V.TextLength) 16 * s5
  4592. 1 $SetLengthR l7 (M.V.TextLength) l5 + s5
  4593. l3 l4 l5
  4594. {end}
  4595.  
  4596. {macro:Matrix_RGB2Hue}
  4597. s5 d - + s4 d - + s3
  4598. 2 l3 * l4 - l5 - s6
  4599. l4 l5 - 1.7320508 * s7
  4600. {if}
  4601. l7 sqr l6 sqr + sqrt l6 - l7 / arctan 2 *
  4602. pi / 180 * 360 + 360 %
  4603. {else}
  4604. 180
  4605. {endif}
  4606. {end}
  4607.  
  4608. {macro:Matrix_RGB2Saturation}
  4609. s5 d - + s4 d - + s3
  4610. l3 l4 max l5 max s6
  4611. l3 l4 min l5 min s7
  4612. l6 l7 -
  4613. {if}
  4614. l6 /
  4615. {endif}
  4616. {end}
  4617.  
  4618. {macro:Matrix_CapitalizeString}
  4619. "" (S.$.Matrix_CapStr) $+
  4620. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4621. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4622. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4623. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4624. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4625. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4626. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4627. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4628. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4629. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4630. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4631. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4632. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4633. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4634. (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep)
  4635. (L.$.Matrix_CapStr)
  4636. {end}
  4637.  
  4638. {macro:Matrix_CapitalizeStringStep}
  4639. $d $length 1 >
  4640. {if}
  4641. $d 2 $SetLengthR $d 1 $SetLengthL
  4642. $d " " $= $d "-" $= || $d "<" $= || $d "(" $= || $d "+" $= || "/" $= || !
  4643. 1 $SetLengthR &&
  4644. {if}
  4645. (M.L.Matrix_CharToLowerCase)
  4646. {endif}
  4647. (L.$.Matrix_CapStr) $+ (S.$.Matrix_CapStr) 0 $* $+
  4648. 1 $cutEnd
  4649. {endif}
  4650. $d $length 1 =
  4651. {if}
  4652. (L.$.Matrix_CapStr) $+ (S.$.Matrix_CapStr) ""
  4653. 1 $cutEnd
  4654. {endif}
  4655. {end}
  4656.  
  4657. ' Caution: Some characters below may not be visible on some systems
  4658. {macro:Matrix_CharToLowerCaseCE}
  4659. (M.L.Matrix_CharToLowerCase)
  4660. d ! $d "Á" $= && {if} 0 $* $+ "á" {endif} || d ! $d "Â" $= && {if} 0 $* $+ "â" {endif} ||
  4661. d ! $d "Ă" $= && {if} 0 $* $+ "ă" {endif} || d ! $d "Ą" $= && {if} 0 $* $+ "ą" {endif} ||
  4662. d ! $d "Ć" $= && {if} 0 $* $+ "ć" {endif} || d ! $d "Ç" $= && {if} 0 $* $+ "ç" {endif} ||
  4663. d ! $d "Č" $= && {if} 0 $* $+ "č" {endif} || d ! $d "Ď" $= && {if} 0 $* $+ "ď" {endif} ||
  4664. d ! $d "Đ" $= && {if} 0 $* $+ "đ" {endif} || d ! $d "É" $= && {if} 0 $* $+ "é" {endif} ||
  4665. d ! $d "Ë" $= && {if} 0 $* $+ "ë" {endif} || d ! $d "Ę" $= && {if} 0 $* $+ "ę" {endif} ||
  4666. d ! $d "Ě" $= && {if} 0 $* $+ "ě" {endif} || d ! $d "Í" $= && {if} 0 $* $+ "í" {endif} ||
  4667. d ! $d "Î" $= && {if} 0 $* $+ "î" {endif} || d ! $d "Ĺ" $= && {if} 0 $* $+ "ĺ" {endif} ||
  4668. d ! $d "Ľ" $= && {if} 0 $* $+ "ľ" {endif} || d ! $d "Ł" $= && {if} 0 $* $+ "ł" {endif} ||
  4669. d ! $d "Ń" $= && {if} 0 $* $+ "ń" {endif} || d ! $d "Ň" $= && {if} 0 $* $+ "ň" {endif} ||
  4670. d ! $d "Ó" $= && {if} 0 $* $+ "ó" {endif} || d ! $d "Ô" $= && {if} 0 $* $+ "ô" {endif} ||
  4671. d ! $d "Ő" $= && {if} 0 $* $+ "ő" {endif} || d ! $d "Ŕ" $= && {if} 0 $* $+ "ŕ" {endif} ||
  4672. d ! $d "Ř" $= && {if} 0 $* $+ "ř" {endif} || d ! $d "Ś" $= && {if} 0 $* $+ "ś" {endif} ||
  4673. d ! $d "Ş" $= && {if} 0 $* $+ "ş" {endif} || d ! $d "Š" $= && {if} 0 $* $+ "š" {endif} ||
  4674. d ! $d "Ţ" $= && {if} 0 $* $+ "ţ" {endif} || d ! $d "Ť" $= && {if} 0 $* $+ "ť" {endif} ||
  4675. d ! $d "Ú" $= && {if} 0 $* $+ "ú" {endif} || d ! $d "Ů" $= && {if} 0 $* $+ "ů" {endif} ||
  4676. d ! $d "Ű" $= && {if} 0 $* $+ "ű" {endif} || d ! $d "Ý" $= && {if} 0 $* $+ "ý" {endif} ||
  4677. d ! $d "Ź" $= && {if} 0 $* $+ "ź" {endif} || d ! $d "Ż" $= && {if} 0 $* $+ "ż" {endif} ||
  4678. d ! $d "Ž" $= && {if} 0 $* $+ "ž" {endif} ||
  4679. {end}
  4680.  
  4681. {macro:Matrix_CharToLowerCase}
  4682. 0
  4683. d ! $d "A" $= && {if} 0 $* $+ "a" {endif} || d ! $d "B" $= && {if} 0 $* $+ "b" {endif} ||
  4684. d ! $d "C" $= && {if} 0 $* $+ "c" {endif} || d ! $d "D" $= && {if} 0 $* $+ "d" {endif} ||
  4685. d ! $d "E" $= && {if} 0 $* $+ "e" {endif} || d ! $d "F" $= && {if} 0 $* $+ "f" {endif} ||
  4686. d ! $d "G" $= && {if} 0 $* $+ "g" {endif} || d ! $d "H" $= && {if} 0 $* $+ "h" {endif} ||
  4687. d ! $d "I" $= && {if} 0 $* $+ "i" {endif} || d ! $d "J" $= && {if} 0 $* $+ "j" {endif} ||
  4688. d ! $d "K" $= && {if} 0 $* $+ "k" {endif} || d ! $d "L" $= && {if} 0 $* $+ "l" {endif} ||
  4689. d ! $d "M" $= && {if} 0 $* $+ "m" {endif} || d ! $d "N" $= && {if} 0 $* $+ "n" {endif} ||
  4690. d ! $d "O" $= && {if} 0 $* $+ "o" {endif} || d ! $d "P" $= && {if} 0 $* $+ "p" {endif} ||
  4691. d ! $d "Q" $= && {if} 0 $* $+ "q" {endif} || d ! $d "R" $= && {if} 0 $* $+ "r" {endif} ||
  4692. d ! $d "S" $= && {if} 0 $* $+ "s" {endif} || d ! $d "T" $= && {if} 0 $* $+ "t" {endif} ||
  4693. d ! $d "U" $= && {if} 0 $* $+ "u" {endif} || d ! $d "V" $= && {if} 0 $* $+ "v" {endif} ||
  4694. d ! $d "W" $= && {if} 0 $* $+ "w" {endif} || d ! $d "X" $= && {if} 0 $* $+ "x" {endif} ||
  4695. d ! $d "Y" $= && {if} 0 $* $+ "y" {endif} || d ! $d "Z" $= && {if} 0 $* $+ "z" {endif} ||
  4696. d ! $d "Ä" $= && {if} 0 $* $+ "ä" {endif} || d ! $d "Ö" $= && {if} 0 $* $+ "ö" {endif} ||
  4697. d ! $d "Ü" $= && {if} 0 $* $+ "ü" {endif} ||
  4698. {end}
  4699.  
  4700. {macro:Matrix_CharToUpperCase}
  4701. 0
  4702. d ! $d "a" $= && {if} 0 $* $+ "A" {endif} || d ! $d "b" $= && {if} 0 $* $+ "B" {endif} ||
  4703. d ! $d "c" $= && {if} 0 $* $+ "C" {endif} || d ! $d "d" $= && {if} 0 $* $+ "D" {endif} ||
  4704. d ! $d "e" $= && {if} 0 $* $+ "E" {endif} || d ! $d "f" $= && {if} 0 $* $+ "F" {endif} ||
  4705. d ! $d "g" $= && {if} 0 $* $+ "G" {endif} || d ! $d "h" $= && {if} 0 $* $+ "H" {endif} ||
  4706. d ! $d "i" $= && {if} 0 $* $+ "I" {endif} || d ! $d "j" $= && {if} 0 $* $+ "J" {endif} ||
  4707. d ! $d "k" $= && {if} 0 $* $+ "K" {endif} || d ! $d "l" $= && {if} 0 $* $+ "L" {endif} ||
  4708. d ! $d "m" $= && {if} 0 $* $+ "M" {endif} || d ! $d "n" $= && {if} 0 $* $+ "N" {endif} ||
  4709. d ! $d "o" $= && {if} 0 $* $+ "O" {endif} || d ! $d "p" $= && {if} 0 $* $+ "P" {endif} ||
  4710. d ! $d "q" $= && {if} 0 $* $+ "Q" {endif} || d ! $d "r" $= && {if} 0 $* $+ "R" {endif} ||
  4711. d ! $d "s" $= && {if} 0 $* $+ "S" {endif} || d ! $d "t" $= && {if} 0 $* $+ "T" {endif} ||
  4712. d ! $d "u" $= && {if} 0 $* $+ "U" {endif} || d ! $d "v" $= && {if} 0 $* $+ "V" {endif} ||
  4713. d ! $d "w" $= && {if} 0 $* $+ "W" {endif} || d ! $d "x" $= && {if} 0 $* $+ "X" {endif} ||
  4714. d ! $d "y" $= && {if} 0 $* $+ "Y" {endif} || d ! $d "z" $= && {if} 0 $* $+ "Z" {endif} ||
  4715. d ! $d "ä" $= && {if} 0 $* $+ "Ä" {endif} || d ! $d "ö" $= && {if} 0 $* $+ "Ö" {endif} ||
  4716. d ! $d "ü" $= && {if} 0 $* $+ "Ü" {endif} ||
  4717. {end}
  4718.  
  4719. {macro:Matrix_DrawingOn}
  4720. (L.L.Matrix_IsDrawing) !
  4721. {if}
  4722. 1 (M.V.STLock)
  4723. (L.L.Matrix_LED)
  4724. {if}
  4725. 2 (M.V.STLock) 3 (M.V.STLock) 4 (M.V.STLock) 5 (M.V.STLock)
  4726. {endif}
  4727. 1 (S.L.Matrix_IsDrawing)
  4728. {endif}
  4729. {end}
  4730.  
  4731. {macro:Matrix_DrawingOff}
  4732. (L.L.Matrix_IsDrawing)
  4733. {if}
  4734. 1 (M.V.STUnlock) 1 (M.V.STFilter)
  4735. (L.L.Matrix_LED)
  4736. {if}
  4737. 2 (M.V.STUnlock) 3 (M.V.STUnlock) 4 (M.V.STUnlock) 5 (M.V.STUnlock)
  4738. 2 (M.V.STFilter) 3 (M.V.STFilter) 4 (M.V.STFilter) 5 (M.V.STFilter)
  4739. {endif}
  4740. 0 (S.L.Matrix_IsDrawing)
  4741. {endif}
  4742. {end}
  4743.  
  4744. {macro:Matrix_SetOptions}
  4745. 14990 (M.V.GetTerminusIndex) s0
  4746. 0 >=
  4747. {if}
  4748. (L.$.Matrix_TerminusL1) l0 0 (M.V.GetTerminusString) $+
  4749. (S.$.Matrix_TerminusL1)
  4750. (L.$.Matrix_TerminusL2) l0 1 (M.V.GetTerminusString) $+
  4751. (S.$.Matrix_TerminusL2)
  4752. {endif}
  4753. {end}
  4754.  
  4755. {macro:Matrix_ProcessCustomFontYpos}
  4756. $d 3 $SetLengthR 1 $cutEnd "*^" $=
  4757. {if}
  4758. $d 1 $SetLengthR $StrToFloat 0 max 7 min /-/
  4759. 3 $cutEnd
  4760. {else}
  4761. $d 3 $SetLengthR 1 $cutEnd "*v" $=
  4762. {if}
  4763. $d 1 $SetLengthR $StrToFloat 0 max 7 min
  4764. 3 $cutEnd
  4765. {else}
  4766. 0
  4767. {endif}
  4768. {endif}
  4769. {end}
  4770.  
  4771. {macro:matrix_setFontC1Ypos}
  4772. 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs
  4773. (L.L.Font_Custom1Ypos) + (S.L.Font_Custom1Ypos)
  4774. {end}
  4775.  
  4776. {macro:matrix_setFontC2Ypos}
  4777. 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs
  4778. (L.L.Font_Custom2Ypos) + (S.L.Font_Custom2Ypos)
  4779. {end}
  4780.  
  4781. {macro:matrix_setFontNrYpos}
  4782. 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs
  4783. (L.L.Font_CustomNrYpos) + (S.L.Font_CustomNrYpos)
  4784. {end}
  4785.  
  4786. {macro:matrix_getFontC1Ypos}
  4787. -2.7725887 * exp (L.L.Font_Custom1Ypos) *
  4788. trunc 16 % d 8 - sgn /-/ * d 0 < 8 * +
  4789. {end}
  4790.  
  4791. {macro:matrix_getFontC2Ypos}
  4792. -2.7725887 * exp (L.L.Font_Custom2Ypos) *
  4793. trunc 16 % d 8 - sgn /-/ * d 0 < 8 * +
  4794. {end}
  4795.  
  4796. {macro:matrix_getFontNrYpos}
  4797. -2.7725887 * exp (L.L.Font_CustomNrYpos) *
  4798. trunc 16 % d 8 - sgn /-/ * d 0 < 8 * +
  4799. {end}
  4800.  
  4801. {macro:Matrix_HasDescender}
  4802. 0
  4803. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4804. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4805. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4806. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4807. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4808. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4809. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4810. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4811. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4812. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4813. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4814. (M.L.Matrix_Descender) || (M.L.Matrix_Descender) ||
  4815. {end}
  4816.  
  4817. {macro:Matrix_Descender}
  4818. d ! $d $length 0 = ! &&
  4819. {if}
  4820. $d $SetLengthL &&
  4821. $d "f" $>
  4822. {if}
  4823. * $d "g" $= $d "j" $= || $d "p" $= || $d "q" $= || $d "y" $= ||
  4824. $d "," $= || $d "‚" $= || $d "„" $= || $d "[" $= || "]" $= ||
  4825. {else}
  4826. 0 $* $+
  4827. {endif}
  4828. 1 $cutBegin
  4829. {endif}
  4830. {end}
  4831.  
  4832. {macro:Matrix_HasDescenderCE}
  4833. 0
  4834. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4835. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4836. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4837. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4838. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4839. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4840. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4841. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4842. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4843. (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) ||
  4844. {end}
  4845.  
  4846. {macro:Matrix_DescenderCE}
  4847. d ! $d $length 0 = ! &&
  4848. {if}
  4849. $d $SetLengthL &&
  4850. $d "f" $>
  4851. {if}
  4852. * $d "g" $= $d "j" $= || $d "p" $= || $d "q" $= || $d "y" $= ||
  4853. $d "Ą" $= || $d "Ç" $= || $d "Ę" $= || $d "Ş" $= || $d "Ţ" $= ||
  4854. $d "ą" $= || $d "ç" $= || $d "ę" $= || $d "ş" $= || $d "ţ" $= ||
  4855. "ý" $= ||
  4856. {else}
  4857. 0 $* $+
  4858. {endif}
  4859. 1 $cutBegin
  4860. {endif}
  4861. {end}
  4862.  
  4863. {macro:Matrix_HasTallGlyphCE}
  4864. 0
  4865. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4866. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4867. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4868. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4869. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4870. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4871. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4872. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4873. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4874. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4875. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4876. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4877. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4878. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4879. (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) ||
  4880. {end}
  4881.  
  4882. {macro:Matrix_TallGlyphCE}
  4883. d ! $d $length 0 = ! &&
  4884. {if}
  4885. $d $SetLengthL &&
  4886. $d "‰" $>
  4887. $d "ß" $< &&
  4888. {if}
  4889. * $d "Á" $= $d "Â" $= || $d "Ä" $= || $d "Ă" $= || $d "Ć" $= ||
  4890. $d "Ç" $= || $d "Ď" $= || $d "É" $= || $d "Ë" $= || $d "Ě" $= ||
  4891. $d "Í" $= || $d "Î" $= || $d "Ĺ" $= || $d "Ń" $= || $d "Ň" $= ||
  4892. $d "Ó" $= || $d "Ô" $= || $d "Ö" $= || $d "Ő" $= || $d "Ŕ" $= ||
  4893. $d "Ř" $= || $d "Ś" $= || $d "Ş" $= || $d "Š" $= || $d "Ţ" $= ||
  4894. $d "Ť" $= || $d "Ú" $= || $d "Ü" $= || $d "Ů" $= || $d "Ű" $= ||
  4895. $d "Ý" $= || $d "Ź" $= || $d "Ż" $= || "Ž" $= ||
  4896. {else}
  4897. 0 $* $+
  4898. {endif}
  4899. 1 $cutBegin
  4900. {endif}
  4901. {end}
  4902.  
  4903. {macro:Matrix_HasCharCE}
  4904. 0
  4905. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4906. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4907. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4908. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4909. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4910. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4911. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4912. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4913. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4914. (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) || (M.L.Matrix_CharIsCE) ||
  4915. {end}
  4916.  
  4917. {macro:Matrix_CharIsCE}
  4918. d ! $d $length 0 = ! &&
  4919. {if}
  4920. $d $SetLengthL &&
  4921. $d "ą" $=> $d "ţ" $<= &&
  4922. {if}
  4923. * $d "»" $= $d "˝" $= || $d "Ä" $= || $d "Ö" $= || $d "×" $= ||
  4924. $d "Ü" $= || $d "ß" $= || $d "ä" $= || $d "ö" $= || $d "÷" $= ||
  4925. "ü" $= || !
  4926. {else}
  4927. +
  4928. $d "Š" $>= $d "ł" $<= &&
  4929. {if}
  4930. * $d "Š" $=
  4931. $d "Ś" $>= $d "Ź" $<= && ||
  4932. $d "š" $= ||
  4933. $d "ś" $>= $d "ź" $<= && ||
  4934. $d "Ł" $= || $d "Ą" $= || $d "Ş" $= || $d "Ż" $= || "ł" $= ||
  4935. {else}
  4936. 0 $* $+
  4937. {endif}
  4938. {endif}
  4939. 1 $cutBegin
  4940. {endif}
  4941. {end}
  4942.  
  4943. {macro:petla_pauza}
  4944.  
  4945. (L.L.elec_busbar_main)
  4946. {if}
  4947. (L.L.czas_loop) (L.S.Timegap) + (S.L.czas_loop)
  4948. {else}
  4949. 0 (S.L.czas_loop)
  4950. {endif}
  4951.  
  4952. (L.L.czas_loop) 2 >
  4953. {if}
  4954. (L.L.czas_wysw) 1 + (S.L.czas_wysw)
  4955. 0 (S.L.czas_loop)
  4956. {endif}
  4957.  
  4958. (L.L.elec_Busbar_main)
  4959. {if}
  4960. (L.L.czas_wysw) 1 =
  4961. {if}
  4962. (L.L.IBIS_TerminusIndex) s1 0 = !
  4963. {if}
  4964. (S.L.Matrix_NrDisabled)
  4965. "Odjazd za " (L.$.czas_odjazdu) $+ " minut." $+ (S.$.Matrix_TerminusL2)
  4966. "" (S.$.Matrix_TerminusL1)
  4967. "" (S.$.Matrix_TerminusL3)
  4968. {else}
  4969. (L.L.czas_wysw) 1 + (S.L.czas_wysw)
  4970. {endif}
  4971. {else}
  4972. (L.L.czas_wysw) 2 =
  4973. {if}
  4974. "tu kierunek" (S.$.Matrix_TerminusL2)
  4975. "" (S.$.Matrix_TerminusL1)
  4976. "" (S.$.Matrix_TerminusL3)
  4977. {endif}
  4978. {endif}
  4979. {else}
  4980. "" (S.$.PamiecNr)
  4981. {endif}
  4982.  
  4983. {end}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement