'############## 'Matrix Script '############## 'Simulates 90s style Full Matrix Line and Terminus Display (Type AEG Krüger) '(c) 17.09.2013 Marcel Kuhnt 'Script Version: 1.0 'Omsi release: 2.0 'Needs: '- Cockpit (Batterietrennschalter) '- IBIS 'NrSpecRandom Seed Area: '971: Anzahl der Fehlerpixel pro Jahr '############################################# 'chura-Krüger (Krüger+) matrix mod '0.5 + e "Sunflower" '############################################# ' This is a modification of the original AEG Krüger matrix script in OMSI 2. ' The original script is copyrighted by Marcel Kuhnt. ' The modified portions of this script are released under CC0 1.0 Universal. ' See http://creativecommons.org/publicdomain/zero/1.0/ for details. ' For further information, consult the readme for the chura-Krüger matrix mod. 'Revision History: '- Marcel Kuhnt 29.09.2012 Created from scratch '- Marcel Kuhnt 17.09.2013 Steckschilder für ausgewählte Ziele '- Marcel Kuhnt 17.09.2013 Seitenschild '- Marcel Kuhnt 13.10.2013 Neuer Seitenschildpfad '- Marcel Kuhnt 20.12.2013 Bugfix: Steckschild-Init '- (No attrib.) 23.03.2014 Krüger+ mod 0.5 "Sunflower" '- (No attrib.) 23.03.2014 School icon in route number fixed '------------------------------------------------------------------------------------------ {macro:Matrix_init} -1 (S.L.Matrix_RefreshCursor) (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) -1 (S.L.matrix_steckschild_Termindex) 0 (S.L.matrix_steckschild_vis) (L.L.Matrix_TerminusXLimit) ! {if} (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit) (C.L.Matrix_NrRightAlign) (S.L.Matrix_NrRightAlign) {endif} (L.L.Matrix_NrMaxStdGlyphWidth) ! {if} 9 (S.L.Matrix_NrMaxStdGlyphWidth) {endif} {end} {trigger:ai_scheduled_settarget} 'Stromversorgung herstellen: 1 (S.L.elec_busbar_main_sw) 1.0 (S.L.elec_V_battery) 'Hier wird die Nummer eingestellt: (L.$.SetLineTo) (S.$.Matrix_Nr) 'Hier wird das Ziel eingestellt: 1 (S.L.elec_busbar_main_sw) (L.L.AI_target_index) s0 (M.V.GetTerminusCode) s1 'Wenn der Terminus-Code größer als 1000 ist, dann bitte Steckschild verwenden: 1000 > l0 6 (M.V.GetTerminusString) "" $= ! && {if} l1 1000 - (S.L.matrix_steckschild_index) l0 (S.L.matrix_steckschild_Termindex) 'Matrix auf 0: 0 (S.L.IBIS_TerminusIndex) s2 {else} l0 (S.L.IBIS_TerminusIndex) s2 l1 1000 % 15000 + (M.V.GetTerminusIndex) s3 0 >= {if} l3 (S.L.IBIS_TerminusIndex) s2 {else} l1 20000 + (M.V.GetTerminusIndex) s3 0 >= {if} l3 (S.L.IBIS_TerminusIndex) s2 {endif} {endif} -1 (S.L.matrix_steckschild_Termindex) -1 (S.L.Matrix_TerminusIndex_Last) 'Wenn der Bitmap-String in Verwendung ist, dann den als Integer interpretieren und Steckschild zusätzlich setzen: l0 6 (M.V.GetTerminusString) $StrToFloat s1 l1 1000 > {if} l1 1000 - (S.L.matrix_steckschild_index) l0 (S.L.matrix_steckschild_Termindex) {endif} {endif} (M.L.matrix_setsteckschild) l2 (M.V.GetTerminusCode) 1000 % (S.L.IBIS_TerminusCode) 1 (S.L.matrix_refresh_seitenschild) {end} '******************************************* ' Trigger für Seitenschild {trigger:matrix_seitenschildklemme_drag} (L.S.mouse_y) -300 / (L.L.matrix_seitenschildklemme) + (S.L.matrix_seitenschildklemme) s0 l0 0 < {if} 0 (S.L.matrix_seitenschildklemme) {endif} l0 0.7 > {if} (L.L.matrix_seitenschild_refresh) 0 = {if} 1 (S.L.matrix_seitenschild_refresh) (T.L.ev_fahrertuer_auf) (L.$.Matrix_Seitenschild) "" $= {if} 1 (S.L.matrix_refresh_seitenschild) {else} "" (S.$.Matrix_Seitenschild) {endif} {endif} {endif} l0 1 > {if} 1 (S.L.matrix_seitenschildklemme) {endif} {end} {trigger:matrix_seitenschildklemme_off} (L.L.matrix_seitenschildklemme) 0.3 > {if} (T.L.ev_fahrertuer_zu) {endif} 0 (S.L.matrix_seitenschildklemme) (S.L.matrix_seitenschild_refresh) {end} '******************************************* ' Trigger für Steckschild {trigger:bus_matrix_change_steckschild} (L.L.matrix_steckschild_index) 1 + (S.L.matrix_steckschild_index) 1000 + (M.V.GetTerminusIndex) (S.L.matrix_steckschild_Termindex) (M.L.matrix_setsteckschild) (M.L.matrix_refreshIntIndex) {end} {macro:matrix_setsteckschild} (L.L.matrix_steckschild_Termindex) s0 0 >= {if} l0 6 (M.V.GetTerminusString) (S.$.Matrix_SchildFrnt) 1 $SetLengthL $StrToFloat 1 max (S.L.matrix_steckschild_vis) "..\..\Anzeigen\SteckSchilder\" (L.$.Matrix_SchildFrnt) $+ (S.$.Matrix_SchildFrnt) {else} 0 (S.L.matrix_steckschild_index) (S.L.matrix_steckschild_vis) "" (S.$.Matrix_SchildFrnt) {endif} {end} {macro:Matrix_frame} '******************************+ ' Terminus-Matrix '******************************+ "BROSE Majuscule 5x3" (M.V.GetFontIndex) (S.L.Font_5x3) "BROSE Majuscule 5x4" (M.V.GetFontIndex) (S.L.Font_5x4) "BROSE Majuscule 5x5" (M.V.GetFontIndex) (S.L.Font_5x5) "BROSE 7x3" (M.V.GetFontIndex) (S.L.Font_7x3) "BROSE 7x4" (M.V.GetFontIndex) (S.L.Font_7x4) "BROSE 7x5" (M.V.GetFontIndex) (S.L.Font_7x5) "BROSE Bold 7x6" (M.V.GetFontIndex) (S.L.Font_7x6B) "BROSE CE 8x3" (M.V.GetFontIndex) (S.L.Font_8x3) "BROSE CE 8x4" (M.V.GetFontIndex) (S.L.Font_8x4) "BROSE CE 8x5" (M.V.GetFontIndex) (S.L.Font_8x5) "BROSE CE Bold 8x6" (M.V.GetFontIndex) (S.L.Font_8x6B) "BROSE CE (8-1)x3" (M.V.GetFontIndex) (S.L.Font_(8-1)x3) "BROSE CE (8-1)x4" (M.V.GetFontIndex) (S.L.Font_(8-1)x4) "BROSE CE (8-1)x5" (M.V.GetFontIndex) (S.L.Font_(8-1)x5) "BROSE CE Bold (8-1)x6" (M.V.GetFontIndex) (S.L.Font_(8-1)x6B) "BROSE CE 10x3" (M.V.GetFontIndex) (S.L.Font_10x3) "BROSE CE 10x4" (M.V.GetFontIndex) (S.L.Font_10x4) "BROSE CE 10x5" (M.V.GetFontIndex) (S.L.Font_10x5) "BROSE CE Bold 10x6" (M.V.GetFontIndex) (S.L.Font_10x6B) "BROSE CE 15x4" (M.V.GetFontIndex) (S.L.Font_15x4) "BROSE CE 15x5" (M.V.GetFontIndex) (S.L.Font_15x5) "BROSE CE 16x6" (M.V.GetFontIndex) (S.L.Font_16x6) "BROSE CE Bold 16x6" (M.V.GetFontIndex) (S.L.Font_16x6B) "BROSE CE Bold 16x7" (M.V.GetFontIndex) (S.L.Font_16x7B) "BROSE CE Bold 16x8" (M.V.GetFontIndex) (S.L.Font_16x8B) "BROSE Chrono 8x5" (M.V.GetFontIndex) (S.L.Font_Chrono) "BROSE Numeric 16x4" (M.V.GetFontIndex) (S.L.Font_Nr_16x4) "BROSE Numeric 16x5" (M.V.GetFontIndex) (S.L.Font_Nr_16x5) "BROSE Numeric 16x6" (M.V.GetFontIndex) (S.L.Font_Nr_16x6) "BROSE Numeric 16x7" (M.V.GetFontIndex) (S.L.Font_Nr_16x7) "BROSE Numeric 16x8" (M.V.GetFontIndex) (S.L.Font_Nr_16x8) "BROSE Numeric 16x11" (M.V.GetFontIndex) (S.L.Font_Nr_16x11) "BROSE Pictogram 16" (M.V.GetFontIndex) (S.L.Font_Icon) (C.L.Matrix_HideScrollingAnimation) (S.L.Matrix_HideScrollingAnimation) ' Custom fonts 0 (S.L.Font_Custom1Ypos) 0 (S.L.Font_Custom2Ypos) 0 (S.L.Font_CustomNrYpos) 14991 (M.V.GetTerminusIndex) s0 l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 0 (M.L.matrix_setFontC1Ypos) (M.V.GetFontIndex) (S.L.Font_Custom1-1) s1 l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 1 (M.L.matrix_setFontC1Ypos) (M.V.GetFontIndex) 1 + 31416 * l1 1 + max 31415 % 1 - (S.L.Font_Custom1-2) s1 l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 2 (M.L.matrix_setFontC1Ypos) (M.V.GetFontIndex) 1 + 92654 * l1 1 + max 92653 % 1 - (S.L.Font_Custom1-3) s1 l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 3 (M.L.matrix_setFontC1Ypos) (M.V.GetFontIndex) 1 + 58980 * l1 1 + max 58979 % 1 - (S.L.Font_Custom1-4) s1 l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 4 (M.L.matrix_setFontC1Ypos) (M.V.GetFontIndex) 1 + 32385 * l1 1 + max 32384 % 1 - (S.L.Font_Custom1-5) s1 14992 (M.V.GetTerminusIndex) s0 l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 0 (M.L.matrix_setFontC2Ypos) (M.V.GetFontIndex) (S.L.Font_Custom2-1) s1 l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 1 (M.L.matrix_setFontC2Ypos) (M.V.GetFontIndex) 1 + 62644 * l1 1 + max 62643 % 1 - (S.L.Font_Custom2-2) s1 l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 2 (M.L.matrix_setFontC2Ypos) (M.V.GetFontIndex) 1 + 38328 * l1 1 + max 38327 % 1 - (S.L.Font_Custom2-3) s1 l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 3 (M.L.matrix_setFontC2Ypos) (M.V.GetFontIndex) 1 + 95029 * l1 1 + max 95028 % 1 - (S.L.Font_Custom2-4) s1 l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 4 (M.L.matrix_setFontC2Ypos) (M.V.GetFontIndex) 1 + 84198 * l1 1 + max 84197 % 1 - (S.L.Font_Custom2-5) s1 14993 (M.V.GetTerminusIndex) s0 l0 0 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 0 (M.L.matrix_setFontNrYpos) (M.V.GetFontIndex) (S.L.Font_CustomNr1) s1 l0 1 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 1 (M.L.matrix_setFontNrYpos) (M.V.GetFontIndex) 1 + 16940 * l1 1 + max 16939 % 1 - (S.L.Font_CustomNr2) s1 l0 2 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 2 (M.L.matrix_setFontNrYpos) (M.V.GetFontIndex) 1 + 93752 * l1 1 + max 93751 % 1 - (S.L.Font_CustomNr3) s1 l0 3 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 3 (M.L.matrix_setFontNrYpos) (M.V.GetFontIndex) 1 + 05821 * l1 1 + max 05820 % 1 - (S.L.Font_CustomNr4) s1 l0 4 (M.V.GetTerminusString) (M.L.Matrix_ProcessCustomFontYpos) 4 (M.L.matrix_setFontNrYpos) (M.V.GetFontIndex) 1 + 97495 * l1 1 + max 97494 % 1 - (S.L.Font_CustomNr5) s1 14994 (M.V.GetTerminusIndex) s0 l0 0 (M.V.GetTerminusString) (M.V.GetFontIndex) (S.L.Font_CustomIcon) (L.L.Matrix_HideScrollingAnimation) {if} (L.L.Matrix_Power) -1 = {if} (M.L.Matrix_DrawingOn) (M.L.Matrix_DrawingOff) 0 (S.L.Matrix_Power) {endif} (L.L.elec_busbar_main) (L.L.Matrix_Power) 0 = && {if} 0 (S.L.Matrix_Nr_Last) 1 (S.L.Matrix_Power) {endif} (L.L.elec_busbar_main) ! (L.L.Matrix_Power) 1 = && {if} (M.L.Matrix_DrawingOn) 1 0 255 255 255 (M.V.STSetColor) 1 0 0 (C.L.Matrix_Width) (C.L.Matrix_PixelFactor) * (C.L.Matrix_Height) (C.L.Matrix_PixelFactor) 2 * * (M.V.STDrawRect) (M.L.Matrix_DrawingOff) 0 (S.L.target_index_int) 0 (M.V.STNewTex) -1 (S.L.Matrix_Power) {endif} {endif} 'Erster Schritt: Linie erstellen: (L.L.IBIS_Linie_Complex) s0 (L.L.Matrix_Nr_Last) = ! || (L.L.elec_busbar_main) && {if} (L.L.Matrix_SpecifyNr) 1 = {if} /-/ (S.L.Matrix_SpecifyNr) {endif} l0 100 / trunc s1 (L.L.IBIS_Linie_Suffix) s4 ' l0: Originalzahl; l1: erste drei Ziffern; l4: letzte zwei Ziffern ' Falls gleich 0, dann gar nix: l1 0 = {if} "" {else} ' Sonst die normale Nummer: l1 trunc $IntToStr {endif} (S.$.Matrix_Nr) ' =============================================================================== ' Falls jetzt die hinteren beiden Ziffern (l2) etwas Interessantes enthalten: ' =============================================================================== l4 1 = {if} "E" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 4 = {if} "[" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 5 = {if} "!" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 6 = {if} "}" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 15 = {if} "#" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 16 = {if} "ÿ" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 17 = {if} "{" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 18 = {if} "]" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} l4 19 = {if} "?" (L.$.Matrix_Nr) 2 $SetLengthR $RemoveSpaces $+ {endif} (C.L.Matrix_UseExtraIBISSuffixes) ! {if} ' Use default IBIS suffixes l4 11 = {if} "D" (L.$.Matrix_Nr) 1 $SetLengthR $+ {endif} l4 12 = {if} "C" (L.$.Matrix_Nr) 1 $SetLengthR $+ {endif} l4 13 = {if} "B" (L.$.Matrix_Nr) 1 $SetLengthR $+ {endif} l4 14 = {if} "A" (L.$.Matrix_Nr) 1 $SetLengthR $+ {endif} {else} ' Use extra IBIS suffixes l4 8 = {if} "0" {endif} l4 66 = {if} (L.$.Matrix_Nr) "Z" $+ {endif} l4 71 = {if} "A" (L.$.Matrix_Nr) $+ {endif} {endif} $RemoveSpaces (S.$.Matrix_Nr) {endif} ' Multi-page display (L.S.TimeGap) (L.L.Matrix_Timer) + (S.L.Matrix_Timer) (C.L.Matrix_PageDuration) >= (L.L.Matrix_TerminusAct) 0 > && l4 70 = l4 97 = || l4 98 = || l4 99 = || ! && {if} (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 15000 >= {if} (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 20000 >= {if} l0 1000 + (M.V.GetTerminusIndex) s1 0 >= {if} l1 (S.L.IBIS_TerminusIndex) {else} l0 21000 >= {if} l0 1000 % 20000 + (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) {endif} {endif} {else} (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 19000 <= l0 1000 + (M.V.GetTerminusIndex) s1 0 >= && {if} l1 (S.L.IBIS_TerminusIndex) {else} l0 1000 % 15000 + (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) {endif} {endif} {else} (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s1 1000 + s0 (M.V.GetTerminusIndex) 0 >= s2 l0 (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) - 1000 % 0 = && {if} l0 (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) {else} l1 1000 >= l1 15000 < && {if} l0 1000 % (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) {endif} {endif} {endif} {endif} 'Zweiter Schritt: Ziel erstellen: (L.L.IBIS_TerminusIndex) 0 < (L.L.IBIS_Linie_Suffix) 70 = (L.L.IBIS_Linie_Suffix) 97 = || (L.L.IBIS_Linie_Suffix) 98 = || ! && {if} (L.L.Matrix_TerminusIndex_Last) (S.L.IBIS_TerminusIndex) {endif} (L.L.IBIS_Linie_Suffix) 70 = (L.L.IBIS_Linie_Suffix) 97 = || (L.L.IBIS_Linie_Suffix) 98 = || (L.L.IBIS_Linie_Suffix) 99 = || ! {if} (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) s0 1000 < l0 20000 + (M.V.GetTerminusIndex) s1 0 >= && {if} l1 (S.L.IBIS_TerminusIndex) {endif} {endif} (L.L.IBIS_TerminusIndex) s0 (L.L.Matrix_TerminusIndex_Last) s1 = ! (L.L.elec_busbar_main) && {if} l0 1 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusL1) l0 2 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusL2) l0 3 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusL3) 0 (S.L.Matrix_L3XLimit) $d 3 $SetLengthR "*IT" $= {if} (C.L.Matrix_Width) (S.L.Matrix_L3XLimit) (L.$.Matrix_TerminusL3) 3 $cutEnd {else} $d 3 $SetLengthR $StrToFloat s2 0 > $d 6 $SetLengthR && 3 $SetLengthL && "*IT" $= && {if} l2 (S.L.Matrix_L3XLimit) (L.$.Matrix_TerminusL3) 6 $cutEnd {else} "" {endif} {endif} (S.$.Matrix_TerminusL3) 'Wenn nur die untere Zeile beschrieben ist, dann diese nach oben und untere leeren: (L.$.Matrix_TerminusL1) "" $= {if} (L.$.Matrix_TerminusL2) (S.$.Matrix_TerminusL1) "" (S.$.Matrix_TerminusL2) {endif} (M.L.Matrix_ResetOptions) (M.L.Matrix_SetOptions) (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) (L.L.Matrix_TerminusIndex_Last) (M.V.GetTerminusCode) - 1000 % (L.L.Matrix_SpecifyNr) 0 >= || {if} 0 (S.L.Matrix_SpecifyNr) {endif} (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (M.L.Matrix_ProcessTerminus) (L.$.Matrix_TerminusL2) "" $= {if} (L.$.Matrix_TerminusL1) (M.L.Matrix_HasDescenderCE) (S.L.Matrix_L1HasDescender) (S.L.Matrix_L1HasDescenderCE) {else} (L.L.Matrix_L1CEMode) {if} (L.$.Matrix_TerminusL1) (M.L.Matrix_HasTallGlyphCE) (S.L.Matrix_L1HasTallGlyphCE) {else} (L.$.Matrix_TerminusL1) (M.L.Matrix_HasDescender) (S.L.Matrix_L1HasDescender) {endif} (L.L.Matrix_L2CEMode) {if} (L.$.Matrix_TerminusL2) (M.L.Matrix_HasTallGlyphCE) (S.L.Matrix_L2HasTallGlyphCE) {endif} {endif} (L.L.Matrix_L3XLimit) ! {if} (L.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL3) (L.L.Matrix_L1HasDescenderCE) (S.L.Matrix_L3HasDescenderCE) {else} (L.$.Matrix_TerminusL3) (M.L.Matrix_HasDescenderCE) (S.L.Matrix_L3HasDescenderCE) {endif} {endif} (L.L.IBIS_Linie_Suffix) 97 = {if} (S.L.Matrix_L1HasDescenderCE) (S.L.Matrix_L3HasDescenderCE) (S.L.Matrix_NrDisabled) "…" (S.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL3) "" (S.$.Matrix_TerminusL2) -97 (S.L.IBIS_TerminusIndex) (M.L.Matrix_ProcessTerminus) {endif} (L.L.IBIS_Linie_Suffix) 98 = {if} (L.S.Time) 0.5 + 86400 % s2 60 / trunc (L.L.Matrix_Clock) 60 / trunc > (L.S.Time) 43200 + (L.L.Matrix_Clock) < || (L.L.IBIS_TerminusIndex) -98 = (L.L.IBIS_TerminusIndex) -198 = || ! || (L.L.Matrix_Timer) 4 >= || {if} (L.S.Year) $IntToStr "-" $+ (L.S.Month) "02" $IntToStrEnh $+ "-" $+ (L.S.Day) "02" $IntToStrEnh $+ (M.V.GetTTBusstopIndex) s3 0 < s4 {if} (S.$.Matrix_TerminusL1) {else} " " $+ {endif} l2 (S.L.Matrix_Clock) 0.5 + 3600 / s0 trunc "02" $IntToStrEnh "." $+ l0 1 % 60 * s1 trunc "02" $IntToStrEnh $+ l4 ! {if} $+ (S.$.Matrix_TerminusL1) {else} " " $+ {endif} (L.S.Weather_Temperature) 99 min -99 max $IntToStr "C" $+ l4 {if} $+ (S.$.Matrix_TerminusL2) {else} " D " $+ l3 (M.V.GetTTBusstopDep) 60 / s1 60 / 24 % trunc "02" $IntToStrEnh $+ "." $+ l1 60 % trunc "02" $IntToStrEnh $+ (S.$.Matrix_TerminusL2) {endif} (L.L.IBIS_TerminusIndex) -98 = {if} -198 (S.L.IBIS_TerminusIndex) {else} -98 (S.L.IBIS_TerminusIndex) {endif} 0 (S.L.Matrix_Timer) {endif} {endif} (L.L.IBIS_Linie_Complex) 97 < (L.L.IBIS_Linie_Complex) 98 > || (L.L.Matrix_TerminusIndex_Last) s1 -70 = l1 -170 = || l1 -97 = || l1 -98 = || l1 -198 = || && {if} "" (S.$.Matrix_Icon) (S.$.Matrix_TerminusL1) (S.$.Matrix_TerminusL2) -1 (S.L.IBIS_TerminusIndex) {endif} (C.L.Matrix_AutoCapitalize) (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) 14900 < && (L.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) 0 > && {if} (L.$.Matrix_TerminusL1) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL1) (L.$.Matrix_TerminusL2) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL2) (L.$.Matrix_TerminusL3) (M.L.Matrix_CapitalizeString) (S.$.Matrix_TerminusL3) {endif} 'Dritter Schritt: Speicherbitmap schreiben: (L.L.IBIS_Linie_Complex) (L.L.Matrix_Nr_Last) = ! (L.L.IBIS_TerminusIndex) s0 (L.L.Matrix_TerminusIndex_Last) s1 = ! || (L.L.elec_busbar_main) && {if} ' if-1-1 (L.L.Matrix_HideScrollingAnimation) {if} (L.L.Matrix_IsDrawing) {if} (M.L.Matrix_DrawingOff) 0 (M.V.STNewTex) {endif} (L.L.Matrix_RefreshCursor) 0 < {if} 0 (M.V.STNewTex) {endif} {endif} l0 (S.L.Matrix_TerminusAct) (L.L.IBIS_Linie_Complex) (S.L.Matrix_Nr_Last) (L.L.IBIS_Linie_Suffix) 99 = ! {if} ' if-1-2 l0 7 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_Bitmapfilename) "" $= {if} ' if-1-3 '3.0 Initialisieren der Bitmap und setzen der Farbe: (L.L.Matrix_HideScrollingAnimation) ! {if} 0 (M.V.STNewTex) {endif} 0 (M.V.STLock) 0 0 255 0 0 (M.V.STSetColor) 'Ab hier gelten folgende Register-Zuordnungen: 'l0 = Fontindex 'l1 = Stringlänge (Pixel) 'l2 = Y-Offset 'l3 = Verfügbare Länge 'l4 = Einzeilig 'l5 = Zentrierungsaufschlag 'l6 = Sperrpixelfaktor 'l7 = (max.) Sperrung (L.$.Matrix_Nr) "" $= (L.L.Matrix_NrDisabled) || {if} ' if-1-4 0 s1 (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos) {else} ' else-1-4 '3.A.0 Sperrpixelfaktor (l6): (L.$.Matrix_Nr) $length 1 - 0 min s6 '3.A.05 Setzen der Maximalbreite: (C.L.Matrix_NrFrontMaxWidth) s3 '3.A.1 Bestimmen des Fonts der Linie (vorne): (L.L.Matrix_SpecifyNr) 1 = {if} (L.$.Matrix_NrSpecified) {else} (L.$.Matrix_Nr) {endif} (S.$.Matrix_NrDisplayed) (L.$.Matrix_NrDisplayed) 1 $SetLengthR $StrToFloat -1 = (L.$.Matrix_NrDisplayed) 2 $SetLengthR 1 $SetLengthL $StrToFloat -1 = ! && (C.L.Matrix_UseSmallNrSuffix) && {if} (L.$.Matrix_NrDisplayed) 1 $SetLengthR (M.L.Matrix_CharToLowerCase) (S.$.Matrix_Nr_Suffix) (L.$.Matrix_NrDisplayed) 1 $cutEnd (L.$.Matrix_Nr_Suffix) $+ (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) 2 $SetLengthL "CE" $= {if} "{" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) 2 $SetLengthL "NE" $= {if} "|" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) 2 $SetLengthL "SB" $= {if} "}" (L.$.Matrix_NrDisplayed) 2 $cutBegin $+ (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) "gh" $= {if} "†" (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) "DB" $= {if} "–" (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) "/^\" $= {if} "—" (S.$.Matrix_NrDisplayed) {endif} (L.$.Matrix_NrDisplayed) 5 $SetLengthR $RemoveSpaces (S.$.Matrix_NrDisplayed) (L.L.Font_CustomMode) 100 / trunc 1 >= {if} ' if-1-5 ' Custom font for route number 0 s7 0 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr1) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 1 = ! && {if} 1 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr2) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 2 = ! && {if} 2 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr3) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 3 = ! && {if} 3 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr4) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 4 = ! && {if} 4 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr5) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {else} ' else-1-5 ' No custom font for route number (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x11) s0 (M.V.TextLength) l6 + s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 10 <= || {if} (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x8) s0 (M.V.TextLength) l6 + s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 7 <= || {if} (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x7) s0 (M.V.TextLength) l6 + s1 l3 > {if} l1 l6 - s1 0 s7 {else} 1 s7 {endif} {else} 1 s7 {endif} {endif} {endif} ' endifelse-1-5 ' l0: Schriftart, l1: Länge in Pixeln '3.A.2 Schreiben: (L.L.Matrix_NrRightAlign) {if} (C.L.Matrix_Width) l1 - 1 - (C.L.Matrix_Width) (C.L.Matrix_NrFrontMinWidth) - min (S.L.Matrix_TerminusXLimit) {else} (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit) {endif} 0 (L.L.Matrix_TerminusXLimit) 1 + (L.L.Matrix_NrRightAlign) * l2 l0 1 0 (L.$.Matrix_NrDisplayed) (M.V.STTextOut) '3.A.3 Bestimmen des Startpunktes des Zieles (Matrix_Xpos): (L.L.Matrix_NrRightAlign) {if} 0 {else} l1 1 + (C.L.Matrix_NrFrontMinWidth) max {endif} (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos) '3.A.4 Bestimmen des Fonts der Linie (seite/hinten): (C.L.Matrix_NrSideMaxWidth) s3 (L.L.Font_CustomMode) 100 / trunc 1 >= {if} ' if-1-6 ' Custom font for route number 0 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr1) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 1 = ! && {if} 1 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr2) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 2 = ! && {if} 2 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr3) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 3 = ! && {if} 3 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr4) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 100 / trunc 4 = ! && {if} 4 (M.L.matrix_getFontNrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_CustomNr5) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {else} ' else-1-6 ' No custom font for route number (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x11) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 10 <= || {if} (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x8) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 7 <= || {if} (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x7) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 6 <= || {if} (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x6) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 5 <= || {if} (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_NrMaxStdGlyphWidth) 4 <= || {if} (L.L.Matrix_NrYpos) s2 (L.$.Matrix_NrDisplayed) (L.L.Font_Nr_16x4) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} {endif} ' l0: Schriftart, l1: Länge in Pixeln '3.A.5 Berechnen der Sperrung: l3 l1 - l6 / trunc 0 min s7 l1 l6 l7 * + s1 '3.A.6 Berechnen des Zentrierungsaufschlages (l5): l3 l1 - 2 / trunc s5 '3.A.7 Schreiben: 0 l5 (C.L.Matrix_Height) l2 + l0 1 0 (L.$.Matrix_NrDisplayed) (M.V.STTextOut) {endif} ' endifelse-1-4 'Schreiben des Zieles Front-Anzeige: 0 (S.L.Matrix_Ypos) (M.L.Matrix_DrawIcon) (L.L.Matrix_Xpos) (L.L.Matrix_FrontTerminusXpos) + (L.$.Matrix_Icon) "" $= + (S.L.Matrix_Xpos) (M.L.Matrix_WriteTerminus) (L.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos) 'Und Schreiben des Zieles Seitenanzeige: 30 (S.L.Matrix_Xpos) (C.L.Matrix_Height) (S.L.Matrix_Ypos) (M.L.Matrix_DrawIcon) 30 (L.L.Matrix_IconPixelLength) + (S.L.Matrix_Xpos) (M.L.Matrix_WriteTerminus) 'Fertig: Unlocken 0 (M.V.STUnlock) {else} ' else-1-3 "..\..\Anzeigen\Krueger\" (L.$.Matrix_Bitmapfilename) $+ 0 (M.V.STLoadTex) $msg {endif} ' endifelse-1-3 (L.L.Matrix_TerminusAct) (S.L.Matrix_TerminusIndex_Last) (M.L.matrix_refreshIntIndex) {endif} ' endif-1-2 'RefreshCursor zurücksetzen: 0 (S.L.Matrix_RefreshCursor) {endif} ' endif-1-1 'Nun sollen die Pixel schrittweise übertragen werden - zunächst mit 1Pixel/Frame: (L.L.elec_busbar_main) (L.L.Matrix_RefreshCursor) 0 >= && {if} 'Locken: 0 (M.V.STLock) (L.L.Matrix_HideScrollingAnimation) ! {if} 1 (M.V.STLock) {endif} 'Sound abspielen: (L.L.Matrix_RefreshCursor) 0 = {if} (L.L.Matrix_HideScrollingAnimation) {if} (M.L.Matrix_DrawingOn) {else} (C.L.Matrix_TerminusChangeSound) {if} (T.L.ev_Matrix_Terminus_change) {endif} {endif} {endif} ' Determine pixel refreshing speed based on settings ' NB1 Best results if the number of pixels per frame is divisible by twice the ' area of the display in pixels (i.e. 3680 in the Krüger matrix) ' NB2 Higher speeds may cause stutters; adjust speed accordingly (C.L.Matrix_PixelRefreshSpeed) 2 <= {if} ' Speed 1: 16 pixels per frame (M.L.Matrix_PixelRefresh16) (C.L.Matrix_PixelRefreshSpeed) 2 = {if} ' Speed 2: 23 pixels per frame (+44%) (M.L.Matrix_PixelRefresh4) (M.L.Matrix_PixelRefresh2) (M.L.Matrix_PixelRefresh) {endif} {else} (C.L.Matrix_PixelRefreshSpeed) 4 <= {if} ' Speed 3: 32 pixels per frame (+39%) (M.L.Matrix_PixelRefresh32) (C.L.Matrix_PixelRefreshSpeed) 4 = {if} ' Speed 4: 46 pixels per frame (+44%) (M.L.Matrix_PixelRefresh8) (M.L.Matrix_PixelRefresh4) (M.L.Matrix_PixelRefresh2) {endif} {else} (C.L.Matrix_PixelRefreshSpeed) 6 <= {if} ' Speed 5: 80 pixels per frame (+74%) (M.L.Matrix_PixelRefresh64) (M.L.Matrix_PixelRefresh16) (C.L.Matrix_PixelRefreshSpeed) {if} ' Speed 6: 115 pixels per frame (+44%) (M.L.Matrix_PixelRefresh32) (M.L.Matrix_PixelRefresh2) (M.L.Matrix_PixelRefresh) {endif} {else} ' Speed 7: 160 pixels per frame (+39%) (M.L.Matrix_PixelRefresh64) (M.L.Matrix_PixelRefresh64) (M.L.Matrix_PixelRefresh32) {endif} {endif} {endif} (L.L.Matrix_Timer) 0.1 >= {if} 0 (S.L.Matrix_Timer) {endif} 'Unlocken: 0 (M.V.STUnlock) (L.L.Matrix_HideScrollingAnimation) ! {if} 1 (M.V.STUnlock) 1 (M.V.STFilter) {endif} {endif} 'Aktualisierung der Code-Tafel: "Linienlisten\" (L.$.yard) "_ANX.jpg" $+ $+ (S.$.Matrix_Linelist) (L.L.matrix_refresh_seitenschild) {if} "..\..\Anzeigen\Seitenschilder\" 2 (M.V.GetDepotStringGlobal) $+ "\" $+ (L.L.Matrix_SpecifyNr) 1 = {if} (L.$.Matrix_NrSpecified) {else} (L.$.Matrix_Nr) {endif} $RemoveSpaces $+ ".bmp" $+ (S.$.Matrix_Seitenschild) 0 (S.L.matrix_refresh_seitenschild) {endif} {end} '*------------------------------------------------------------------------------------------------------------ {macro:Matrix_PixelRefresh64} (M.L.Matrix_PixelRefresh32) (M.L.Matrix_PixelRefresh32) {end} {macro:Matrix_PixelRefresh32} (M.L.Matrix_PixelRefresh16) (M.L.Matrix_PixelRefresh16) {end} {macro:Matrix_PixelRefresh16} (M.L.Matrix_PixelRefresh8) (M.L.Matrix_PixelRefresh8) {end} {macro:Matrix_PixelRefresh8} (M.L.Matrix_PixelRefresh4) (M.L.Matrix_PixelRefresh4) {end} {macro:Matrix_PixelRefresh4} (M.L.Matrix_PixelRefresh2) (M.L.Matrix_PixelRefresh2) {end} {macro:Matrix_PixelRefresh2} (M.L.Matrix_PixelRefresh) (M.L.Matrix_PixelRefresh) {end} {macro:Matrix_PixelRefresh} (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) 2 * >= (L.L.Matrix_RefreshCursor) 0 < || {if} (L.L.IBIS_Linie_Suffix) 99 = {if} (L.L.Matrix_Testcolor) ! (S.L.Matrix_Testcolor) 0 {else} 0 (S.L.Matrix_Timer) (L.L.Matrix_HideScrollingAnimation) {if} (M.L.Matrix_DrawingOn) (M.L.Matrix_DrawingOff) {endif} -1 {endif} (S.L.Matrix_RefreshCursor) {else} 'X und Y berechnen: 'l0: Ebene (vorne/Seite) 'l1: X 'l2: Y (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) / trunc s0 (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) % (C.L.Matrix_Height) / trunc s1 (L.L.Matrix_RefreshCursor) (C.L.Matrix_HxW) % (C.L.Matrix_Height) % s2 'Fehlerpixel berechnen: (L.L.Matrix_RefreshCursor) (M.V.NrSpecRandom) 2 * (L.L.Matrix_Fehlerpixel) / (C.L.Matrix_Fehlerpixel_pro_Jahr) ! 2 * + s6 1 < {if} 255 s7 {else} l6 2 < {if} 0 s7 {else} 'Wenn 99er-Code, dann alles grün: (L.L.IBIS_Linie_Suffix) 99 = {if} (L.L.Matrix_Testcolor) 255 * s7 {else} 'Farbe setzen: 0 l1 l2 l0 (C.L.Matrix_Height) * + (M.V.STReadPixel) 0 (M.V.STGetR) s7 'Inversion: (L.L.Matrix_L1Invert) {if} (L.$.Matrix_TerminusL2) "" $= {if} (C.L.Matrix_Height) s3 {else} (C.L.Matrix_Height) 2 / trunc s3 (L.L.Matrix_L1SmallFont) {if} (C.L.Matrix_Height) 2 / trunc 2 - s3 {else} (L.L.Matrix_L2SmallFont) {if} (C.L.Matrix_Height) 2 / trunc 2 + s3 {endif} {endif} {endif} l2 l3 < l1 (L.L.Matrix_TerminusXpos) >= l0 ! && l1 (L.L.Matrix_TerminusXLimit) < && l1 30 (L.L.Matrix_IconPixelLength) + (L.L.Matrix_L3PixelLength) + >= l0 && || && {if} 255 l7 - s7 {endif} {endif} (L.L.Matrix_L2Invert) {if} (C.L.Matrix_Height) 2 / trunc s3 (L.L.Matrix_L2SmallFont) {if} (C.L.Matrix_Height) 2 / trunc 2 + s3 {else} (L.L.Matrix_L1SmallFont) {if} (C.L.Matrix_Height) 2 / trunc 2 - s3 {endif} {endif} l2 l3 >= l1 (L.L.Matrix_TerminusXpos) >= l0 ! && l1 (L.L.Matrix_TerminusXLimit) < && l1 30 (L.L.Matrix_IconPixelLength) + (L.L.Matrix_L3PixelLength) + >= l0 && || && {if} 255 l7 - s7 {endif} {endif} (L.L.Matrix_L3Invert) {if} (C.L.Matrix_Height) s3 l2 l3 < l1 (L.L.Matrix_TerminusXpos) (L.L.Matrix_L3PixelLength) - >= l1 (L.L.Matrix_TerminusXpos) < && l0 ! && l1 (L.L.Matrix_TerminusXLimit) < && l1 30 >= l1 30 (L.L.Matrix_IconPixelLength) + (L.L.Matrix_L3PixelLength) + < && l0 && || && {if} 255 l7 - s7 {endif} {endif} {endif} {endif} {endif} 'Pixel zeichnen: (L.L.Matrix_HideScrollingAnimation) ! {if} 1 l7 255 255 255 (M.V.STSetColor) 1 l1 (C.L.Matrix_PixelFactor) * s4 l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5 l4 (C.L.Matrix_PixelFactor) + 2 - l5 (C.L.Matrix_PixelFactor) + 2 - (M.V.STDrawRect) {else} 1 l7 96 - 0 max 255 255 255 (M.V.STSetColor) 1 l1 (C.L.Matrix_PixelFactor) * s4 2 + l2 l0 (C.L.Matrix_Height) * + (C.L.Matrix_PixelFactor) * s5 l4 5 + l5 7 + (M.V.STDrawRect) 1 l4 l5 2 + l4 7 + l5 5 + (M.V.STDrawRect) 1 l7 64 - 0 max 255 255 255 (M.V.STSetColor) 1 l4 1 + l5 1 + l4 (C.L.Matrix_PixelFactor) + 2 - l5 (C.L.Matrix_PixelFactor) + 2 - (M.V.STDrawRect) 1 l7 255 255 255 (M.V.STSetColor) 1 l4 2 + l5 2 + l4 (C.L.Matrix_PixelFactor) + 3 - l5 (C.L.Matrix_PixelFactor) + 3 - (M.V.STDrawRect) {endif} 'Cursor verschieben: (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end} {macro:Matrix_WriteTerminus} '3.B.2 Bestimmen der verbliebenen Länge des Zieles vorne (l3): (L.L.Matrix_NrRightAlign) (L.L.Matrix_Ypos) (C.L.Matrix_Height) < && {if} (L.L.Matrix_TerminusXLimit) (L.L.Matrix_Xpos) - s3 {else} (C.L.Matrix_Width) (L.L.Matrix_Xpos) - s3 {endif} '3.B.3 Einzeilig (l4)? (L.$.Matrix_TerminusL2) "" $= s4 '3.B.4 Bestimmen des Fonts der Zeile 1 des Ziels (l0/l1): (L.L.IBIS_Linie_Suffix) 98 = {if} 0 s7 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_Chrono) s0 (M.V.TextLength) s1 {else} (L.L.Matrix_L3XLimit) {if} (L.L.Matrix_Xpos) - 0 max s3 {endif} l4 (L.L.Matrix_L3XLimit) || {if} ' if-2-1 ' Single line (L.L.Font_CustomMode) 10 % 1 >= {if} ' if-2-2 ' Custom single-line fonts 0 s7 0 (M.L.matrix_getFontC1Ypos) s2 (L.$.Matrix_TerminusL3) (L.L.Font_Custom1-1) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 % 1 = ! && {if} 1 (M.L.matrix_getFontC1Ypos) s2 (L.$.Matrix_TerminusL3) (L.L.Font_Custom1-2) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 % 2 = ! && {if} 2 (M.L.matrix_getFontC1Ypos) s2 (L.$.Matrix_TerminusL3) (L.L.Font_Custom1-3) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 % 3 = ! && {if} 3 (M.L.matrix_getFontC1Ypos) s2 (L.$.Matrix_TerminusL3) (L.L.Font_Custom1-4) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 % 4 = ! && {if} 4 (M.L.matrix_getFontC1Ypos) s2 (L.$.Matrix_TerminusL3) (L.L.Font_Custom1-5) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {else} ' else-2-2 ' No custom single-line fonts 0 s7 1 (L.L.Matrix_L3HasDescenderCE) - (L.L.Matrix_LargeFontYpos) + s2 (L.$.Matrix_TerminusL3) (L.L.Font_16x8B) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L3MaxStdGlyphWidth) 7 <= || {if} (L.$.Matrix_TerminusL3) (L.L.Font_16x7B) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L3MaxStdGlyphWidth) 6 <= || {if} 0 s7 0 s2 (L.L.Matrix_L3Bold) {if} (L.$.Matrix_TerminusL3) (L.L.Font_16x6B) {else} (L.$.Matrix_TerminusL3) (L.L.Font_16x6) {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L3MaxStdGlyphWidth) 5 <= || {if} 0 s7 0 s2 (L.$.Matrix_TerminusL3) (L.L.Font_15x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L3MaxStdGlyphWidth) 4 <= || {if} 0 s7 0 s2 (L.$.Matrix_TerminusL3) (L.L.Font_15x4) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} ' endifelse-2-2 {endif} ' endifelse-2-1 (L.L.Matrix_L3XLimit) {if} l1 1 + (L.$.Matrix_Icon) "" $= + (S.L.Matrix_L3PixelLength) (L.$.Matrix_TerminusL3) $length 1 - 0 max s6 l3 l1 - l6 / trunc l7 min s7 l1 l6 l7 * + s1 l3 l1 - 2 / trunc s5 0 (L.L.Matrix_Xpos) (L.L.Matrix_L3Invert) (L.L.Matrix_Ypos) (C.L.Matrix_Height) >= && + (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L3Ypos) + l0 1 0 (L.$.Matrix_TerminusL3) (M.V.STTextOut) (L.L.Matrix_Xpos) l1 + (L.L.Matrix_L3XLimit) min 1 + (S.L.Matrix_Xpos) (L.L.Matrix_NrRightAlign) (L.L.Matrix_Ypos) (C.L.Matrix_Height) < && {if} (L.L.Matrix_TerminusXLimit) (L.L.Matrix_Xpos) - s3 {else} (C.L.Matrix_Width) (L.L.Matrix_Xpos) - s3 {endif} {endif} l4 ! (L.L.Matrix_L3XLimit) || {if} ' if-2-3 ' Two lines (L.L.Font_CustomMode) 10 / 10 % trunc 1 >= {if} ' if-2-4 ' Custom two-line fonts 0 s7 0 (M.L.matrix_getFontC2Ypos) s2 (L.$.Matrix_TerminusL1) (L.L.Font_Custom2-1) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 1 = ! && {if} 1 (M.L.matrix_getFontC2Ypos) s2 (L.$.Matrix_TerminusL1) (L.L.Font_Custom2-2) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 2 = ! && {if} 2 (M.L.matrix_getFontC2Ypos) s2 (L.$.Matrix_TerminusL1) (L.L.Font_Custom2-3) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 3 = ! && {if} 3 (M.L.matrix_getFontC2Ypos) s2 (L.$.Matrix_TerminusL1) (L.L.Font_Custom2-4) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 4 = ! && {if} 4 (M.L.matrix_getFontC2Ypos) s2 (L.$.Matrix_TerminusL1) (L.L.Font_Custom2-5) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {else} ' else-2-4 ' No custom two-line fonts (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) || {if} ' if-2-5 0 s7 (L.L.Matrix_L2SmallFont) {if} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_10x6B) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 5 <= || (L.L.Matrix_L1Bold) ! || {if} (L.$.Matrix_TerminusL1) (L.L.Font_10x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 4 <= || {if} (L.$.Matrix_TerminusL1) (L.L.Font_10x4) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 3 <= || {if} (L.$.Matrix_TerminusL1) (L.L.Font_10x3) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} (L.L.Matrix_L1SmallFont) {if} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_5x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 4 <= || {if} (L.$.Matrix_TerminusL1) (L.L.Font_5x4) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 3 <= || {if} (L.$.Matrix_TerminusL1) (L.L.Font_5x3) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {else} ' else-2-5 0 s7 0 s2 (L.$.Matrix_TerminusL2) "" $= {if} " " (L.$.Matrix_TerminusL1) $+ (L.L.Font_16x6) {else} (L.L.Matrix_L1CEMode) {if} (L.$.Matrix_TerminusL1) (L.L.Matrix_L1HasTallGlyphCE) {if} (L.L.Font_8x6B) {else} (L.L.Font_(8-1)x6B) {endif} {else} (L.L.Matrix_L1HasDescender) ! (L.L.Matrix_L1Invert) || s2 (L.$.Matrix_TerminusL1) (L.L.Font_7x6B) {endif} {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1Bold) ! (L.$.Matrix_TerminusL2) "" $= ! && || (L.L.Matrix_L1MaxStdGlyphWidth) 5 <= || {if} 0 s2 0 s7 (L.$.Matrix_TerminusL2) "" $= {if} (L.$.Matrix_TerminusL1) (L.L.Font_15x5) {else} (L.L.Matrix_L1CEMode) {if} (L.$.Matrix_TerminusL1) (L.L.Matrix_L1HasTallGlyphCE) {if} (L.L.Font_8x5) {else} (L.L.Font_(8-1)x5) {endif} {else} (L.L.Matrix_L1HasDescender) ! (L.L.Matrix_L1Invert) || s2 (L.$.Matrix_TerminusL1) (L.L.Font_7x5) {endif} {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 4 <= || {if} 0 s2 0 s7 (L.$.Matrix_TerminusL2) "" $= {if} (L.$.Matrix_TerminusL1) (L.L.Font_15x4) {else} (L.L.Matrix_L1CEMode) {if} (L.$.Matrix_TerminusL1) (L.L.Matrix_L1HasTallGlyphCE) {if} (L.L.Font_8x4) {else} (L.L.Font_(8-1)x4) {endif} {else} (L.L.Matrix_L1HasDescender) ! (L.L.Matrix_L1Invert) || s2 (L.$.Matrix_TerminusL1) (L.L.Font_7x4) {endif} {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L1MaxStdGlyphWidth) 3 <= || {if} 3 s2 0 s7 (L.$.Matrix_TerminusL2) "" $= {if} (L.$.Matrix_TerminusL1) (L.L.Font_10x3) {else} (L.L.Matrix_L1CEMode) {if} (L.$.Matrix_TerminusL1) (L.L.Matrix_L1HasTallGlyphCE) {if} (L.L.Font_8x3) {else} (L.L.Font_(8-1)x3) {endif} {else} (L.L.Matrix_L1HasDescender) ! (L.L.Matrix_L1Invert) || s2 (L.$.Matrix_TerminusL1) (L.L.Font_7x3) {endif} {endif} s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} ' endifelse-2-5 {endif} ' endifelse-2-4 {endif} ' endifelse-2-3 '3.B.5 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusL1) $length 1 - 0 max s6 '3.B.6 Berechnen der Sperrung: l3 l1 - l6 / trunc l7 min s7 l1 l6 l7 * + s1 '3.B.7 Berechnen des Zentrierungsaufschlages (l5): l3 l1 - 2 / trunc s5 '3.B.8 Schreiben: 0 (L.L.Matrix_Xpos) l5 + (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L1Ypos) + l0 1 0 " " (L.L.Font_16x6) l0 = (L.L.Matrix_L3XLimit) && 2 * $* (L.$.Matrix_TerminusL1) $+ (M.V.STTextOut) '3.C.1 Bestimmen des Fonts der Zeile 2 des Ziels (l0/l1): (L.L.IBIS_Linie_Suffix) 98 = {if} ' if-3-1 0 s7 8 s2 (L.$.Matrix_TerminusL2) (L.L.Font_Chrono) s0 (M.V.TextLength) s1 {else} ' else-3-1 l4 ! {if} ' if-3-2 (L.L.Font_CustomMode) 10 / 10 % trunc 1 >= {if} ' if-3-3 ' Custom two-line fonts 0 s7 0 (M.L.matrix_getFontC2Ypos) 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_Custom2-1) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 1 = ! && {if} 1 (M.L.matrix_getFontC2Ypos) 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_Custom2-2) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 2 = ! && {if} 2 (M.L.matrix_getFontC2Ypos) 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_Custom2-3) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 3 = ! && {if} 3 (M.L.matrix_getFontC2Ypos) 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_Custom2-4) s0 (M.V.TextLength) s1 l3 > (L.L.Font_CustomMode) 10 / 10 % trunc 4 = ! && {if} 4 (M.L.matrix_getFontC2Ypos) 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_Custom2-5) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {else} ' else-3-3 ' No custom two-line fonts (L.L.Matrix_L1SmallFont) (L.L.Matrix_L2SmallFont) || {if} ' if-3-4 0 s7 (L.L.Matrix_L1SmallFont) {if} 6 s2 (L.$.Matrix_TerminusL2) (L.L.Font_10x6B) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 5 <= || (L.L.Matrix_L2Bold) ! || {if} (L.$.Matrix_TerminusL2) (L.L.Font_10x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 4 <= || {if} (L.$.Matrix_TerminusL2) (L.L.Font_10x4) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 3 <= || {if} (L.$.Matrix_TerminusL2) (L.L.Font_10x3) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} (L.L.Matrix_L2SmallFont) {if} 11 s2 (L.$.Matrix_TerminusL2) (L.L.Font_5x5) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 4 <= || {if} (L.$.Matrix_TerminusL2) (L.L.Font_5x4) s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 3 <= || {if} (L.$.Matrix_TerminusL2) (L.L.Font_5x3) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {else} ' else-3-4 0 s7 (L.L.Matrix_L2CEMode) {if} (L.L.Matrix_L1HasTallGlyphCE) (L.L.Matrix_L2HasTallGlyphCE) || 7 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_8x6B) {else} (L.L.Matrix_L1Invert) (L.L.Matrix_L2Invert) || 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_7x6B) {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2Bold) ! || (L.L.Matrix_L2MaxStdGlyphWidth) 5 <= || {if} 0 s7 (L.L.Matrix_L2CEMode) {if} (L.L.Matrix_L1HasTallGlyphCE) (L.L.Matrix_L2HasTallGlyphCE) || 7 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_8x5) {else} (L.L.Matrix_L1Invert) (L.L.Matrix_L2Invert) || 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_7x5) {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 4 <= || {if} 0 s7 (L.L.Matrix_L2CEMode) {if} (L.L.Matrix_L1HasTallGlyphCE) (L.L.Matrix_L2HasTallGlyphCE) || 7 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_8x4) {else} (L.L.Matrix_L1Invert) (L.L.Matrix_L2Invert) || 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_7x4) {endif} s0 (M.V.TextLength) s1 l3 > (L.L.Matrix_L2MaxStdGlyphWidth) 3 <= || {if} 0 s7 (L.L.Matrix_L2CEMode) {if} (L.L.Matrix_L1HasTallGlyphCE) (L.L.Matrix_L2HasTallGlyphCE) || 7 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_8x3) {else} (L.L.Matrix_L1Invert) (L.L.Matrix_L2Invert) || 8 + s2 (L.$.Matrix_TerminusL2) (L.L.Font_7x3) {endif} s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} ' endifelse-3-4 {endif} ' endifelse-3-3 {endif} ' endifelse-3-2 {endif} ' endifelse-3-1 '3.C.2 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusL2) $length 1 - 0 max s6 '3.C.3 Berechnen der Sperrung: l3 l1 - l6 / trunc l7 min s7 l1 l6 l7 * + s1 '3.C.4 Berechnen des Zentrierungsaufschlages (l5): l3 l1 - 2 / trunc s5 '3.C.5 Schreiben: l2 0 (L.L.Matrix_Xpos) l5 + (L.L.Matrix_Ypos) l2 + (L.L.Matrix_L2Ypos) + l0 1 0 (L.$.Matrix_TerminusL2) (M.V.STTextOut) {end} {macro:matrix_refreshIntIndex} (L.L.matrix_steckschild_Termindex) s0 0 >= l0 0 (M.V.GetTerminusString) "" $= ! && {if} l0 {else} (L.L.Matrix_TerminusAct) {endif} (S.L.target_index_int) {end} {macro:Matrix_ResetOptions} "" (S.$.Matrix_Icon) 0 (S.L.Matrix_L1Bold) (S.L.Matrix_L2Bold) (S.L.Matrix_L3Bold) (S.L.Matrix_L1SmallFont) (S.L.Matrix_L2SmallFont) (S.L.Matrix_L1Invert) (S.L.Matrix_L2Invert) (S.L.Matrix_L3Invert) (S.L.Matrix_L1Ypos) (S.L.Matrix_L2Ypos) (S.L.Matrix_L3Ypos) (S.L.Matrix_L1CEMode) (S.L.Matrix_L2CEMode) (S.L.Matrix_L3CEMode) (S.L.Matrix_NrYpos) (S.L.Matrix_LargeFontYpos) (S.L.Matrix_L3PixelLength) (S.L.Matrix_IconXpos) (S.L.Matrix_UseCustomIcon) (S.L.Matrix_FrontTerminusXpos) (S.L.Font_CustomMode) (S.L.Matrix_NrDisabled) (C.L.Matrix_Width) (S.L.Matrix_TerminusXLimit) (C.L.Matrix_NrRightAlign) (S.L.Matrix_NrRightAlign) 9 (S.L.Matrix_NrMaxStdGlyphWidth) (S.L.Matrix_L1MaxStdGlyphWidth) (S.L.Matrix_L2MaxStdGlyphWidth) (S.L.Matrix_L3MaxStdGlyphWidth) {end} {macro:Matrix_ProcessTerminus} (L.L.Matrix_L3XLimit) ! s0 (L.$.Matrix_TerminusL1) "*…" $= {if} "" (S.$.Matrix_TerminusL1) "…" (S.$.Matrix_Icon) {endif} ' Process line 1 ' *^ := Move line 1 up by 1 pixel (L.$.Matrix_TerminusL1) $d 3 $SetLengthR 1 $cutEnd "*^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_L1Ypos) l0 {if} * (S.L.Matrix_L3Ypos) {endif} 3 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *v := Move line 1 down by 1 pixel (L.$.Matrix_TerminusL1) $d 3 $SetLengthR 1 $cutEnd "*v" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L1Ypos) l0 {if} * (S.L.Matrix_L3Ypos) {endif} 3 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *U := Add U-Bahn icon (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*U" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) "U" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *T := Add tram icon (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*T" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) "T" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *S := Add S-Bahn icon (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*S" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) "S" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *SCH := Add school icon (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*SCH" $= {if} 4 $cutEnd (S.$.Matrix_TerminusL1) "s" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *R := Not used (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*R" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *P := Add coffee cup (Pause) icon (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*P" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) "P" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *N^# := Move up route number by # pixels (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*N^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_NrYpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *Nv# := Move down route number by # pixels (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*Nv" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_NrYpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *NMX# := Allow only fonts for route number up to standard width # pixels (L.$.Matrix_TerminusL1) $d 6 $SetLengthR 2 $cutEnd "*NMX" $= $d 2 $SetLengthR && $StrToFloat s1 0 >= && {if} l1 (S.L.Matrix_NrMaxStdGlyphWidth) 6 $cutEnd (S.$.Matrix_TerminusL1) {endif} (L.$.Matrix_TerminusL1) $d 5 $SetLengthR 1 $cutEnd "*NMX" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_NrMaxStdGlyphWidth) 5 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *NH> := Route number on the front display is displayed on the right ' Warning: Overly long terminus lines will be drawn over the route number (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*NH>" $= {if} 1 (S.L.Matrix_NrRightAlign) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *NH< := Route number on the front display is displayed on the left (L.$.Matrix_TerminusL1) $d 4 $SetLengthR "*NH<" $= {if} 0 (S.L.Matrix_NrRightAlign) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *N := Do not display route number (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*N" $= {if} (L.L.Matrix_NrDisabled) ! (S.L.Matrix_NrDisabled) 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *MX# := Allow only fonts up to standard width # pixels (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*MX" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L1MaxStdGlyphWidth) l0 {if} * (S.L.Matrix_L3MaxStdGlyphWidth) {endif} 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *M := Not used (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*M" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *L := Specify route number to be displayed (L.$.Matrix_TerminusL1) $d 1 $SetLengthR "]" $= $d 9 $SetLengthR && 6 $cutEnd "*L[" $= {if} 5 s1 min {endif} $d 8 $SetLengthR && 5 $cutEnd "*L[" $= {if} 4 s1 min {endif} || $d 7 $SetLengthR && 4 $cutEnd "*L[" $= {if} 3 s1 min {endif} || $d 6 $SetLengthR && 3 $cutEnd "*L[" $= {if} 2 s1 min {endif} || $d 5 $SetLengthR && 2 $cutEnd "*L[" $= {if} 1 s1 max {endif} || $d 4 $SetLengthR && 1 $cutEnd "*L[" $= {if} 0 s1 max {endif} || && {if} (L.L.Matrix_SpecifyNr) 0 >= {if} (S.L.Matrix_SpecifyNr) {endif} $d l1 1 + $SetLengthR 1 $cutEnd (S.$.Matrix_NrSpecified) 0 $* $+ l1 4 + $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *K := Use small fonts (height = 5 pixels); upper-case only & no CE support (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*K" $= {if} (L.L.Matrix_L1SmallFont) ! (S.L.Matrix_L1SmallFont) 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *I<# := Move icon # pixels to the left (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*I<" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_IconXpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *I># := Move icon # pixels to the right (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*I>" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_IconXpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *I := Invert line (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*I" $= {if} (L.L.Matrix_L1Invert) ! (S.L.Matrix_L1Invert) 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *G^# := Move up by # pixels, but only if largest font used (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*G^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *Gv# := Move down by # pixels, but only if largest font used (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*Gv" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *F<# := Move terminus display on the front # pixels to the left (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*F<" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *F># := Move terminus display on the front # pixels to the right (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*F>" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *F := Add airport icon (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*F" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL1) "F" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *DB := Add DB (Deutsche Bahn) logo (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*DB" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL1) "D" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *CN := Use custom fonts for route number (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CN" $= {if} "9" $+ (S.$.Matrix_TerminusL1) {endif} ' *CN# := Use custom font # for route number (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*CN" $= {if} $d 1 $SetLengthR $StrToFloat 0 max 100 * (L.L.Font_CustomMode) + (S.L.Font_CustomMode) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *CI := Use custom icons (L.$.Matrix_TerminusL1) 4 $SetLengthR 1 $cutEnd "*CI" $= {if} 1 (S.L.Matrix_UseCustomIcon) (L.$.Matrix_Icon) (L.$.Matrix_TerminusL1) 1 $SetLengthR $+ (S.$.Matrix_Icon) (L.$.Matrix_TerminusL1) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *CF := Use custom fonts for destination (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CF" $= {if} "9" $+ (S.$.Matrix_TerminusL1) {endif} ' *CF# := Use custom font # for destination (L.$.Matrix_TerminusL1) $d 4 $SetLengthR 1 $cutEnd "*CF" $= {if} $d 1 $SetLengthR $StrToFloat 0 max (L.L.Font_CustomMode) + (S.L.Font_CustomMode) 4 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' *CE := Use only fonts supporting Central European characters (except *K) (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*CE" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL1) (L.L.Matrix_L1CEMode) ! (S.L.Matrix_L1CEMode) l0 {if} * (S.L.Matrix_L3CEMode) {endif} {endif} ' *BR := Add British Rail logo (L.$.Matrix_TerminusL1) $d 3 $SetLengthR "*BR" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL1) "B" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *B := Use bold face font for line 1 if space allows (L.$.Matrix_TerminusL1) $d 2 $SetLengthR "*B" $= {if} (L.L.Matrix_L1Bold) ! (S.L.Matrix_L1Bold) l0 {if} * (S.L.Matrix_L3Bold) {endif} 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} ' O405N2 matrix compatibility (L.$.Matrix_TerminusL1) $d 1 s1 $SetLengthR "µ" $= $d 6 s1 $SetLengthR && "#Messe" $= || $d 9 s1 $SetLengthR && "#100Jahre" $= || {if} l1 $cutEnd (S.$.Matrix_TerminusL1) {endif} (L.$.Matrix_TerminusL1) $d 12 $SetLengthR "#Dienstfahrt" $= {if} 12 $cutEnd "Dienstfahrt*I" $+ (S.$.Matrix_TerminusL1) {endif} (L.$.Matrix_TerminusL1) $d 8 $SetLengthR "#Postbus" $= {if} 8 $cutEnd "Postbus" $+ (S.$.Matrix_TerminusL1) {endif} ' Process line 2 ' *^ := Move line 2 up by 1 pixel (L.$.Matrix_TerminusL2) $d 3 $SetLengthR 1 $cutEnd "*^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_L2Ypos) 3 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *v := Move line 2 down by 1 pixel (L.$.Matrix_TerminusL2) $d 3 $SetLengthR 1 $cutEnd "*v" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L2Ypos) 3 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *U := Add U-Bahn icon (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*U" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) "U" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *T := Add tram icon (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*T" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) "T" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *S := Add S-Bahn icon (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*S" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) "S" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *SCH := Add school icon (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*SCH" $= {if} 4 $cutEnd (S.$.Matrix_TerminusL2) "s" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *R := Not used (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*R" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *P := Add coffee cup (Pause) icon (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*P" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) "P" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *N^# := Move up route number by # pixels (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*N^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_NrYpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *Nv# := Move down route number by # pixels (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*Nv" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_NrYpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *NMX# := Allow only fonts for route number up to standard width # pixels (L.$.Matrix_TerminusL2) $d 6 $SetLengthR 2 $cutEnd "*NMX" $= $d 2 $SetLengthR && $StrToFloat s1 0 >= && {if} l1 (S.L.Matrix_NrMaxStdGlyphWidth) 6 $cutEnd (S.$.Matrix_TerminusL2) {endif} (L.$.Matrix_TerminusL2) $d 5 $SetLengthR 1 $cutEnd "*NMX" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_NrMaxStdGlyphWidth) 5 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *NH> := Route number on the front display is displayed on the right ' Warning: Overly long terminus lines will be drawn over the route number (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*NH>" $= {if} 1 (S.L.Matrix_NrRightAlign) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *NH< := Route number on the front display is displayed on the left (L.$.Matrix_TerminusL2) $d 4 $SetLengthR "*NH<" $= {if} 0 (S.L.Matrix_NrRightAlign) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *N := Do not display route number (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*N" $= {if} (L.L.Matrix_NrDisabled) ! (S.L.Matrix_NrDisabled) 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *MX# := Allow only fonts up to standard width # pixels (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*MX" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L2MaxStdGlyphWidth) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *M := Not used (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*M" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *L := Specify route number to be displayed (L.$.Matrix_TerminusL2) $d 1 $SetLengthR "]" $= $d 9 $SetLengthR && 6 $cutEnd "*L[" $= {if} 5 s1 min {endif} $d 8 $SetLengthR && 5 $cutEnd "*L[" $= {if} 4 s1 min {endif} || $d 7 $SetLengthR && 4 $cutEnd "*L[" $= {if} 3 s1 min {endif} || $d 6 $SetLengthR && 3 $cutEnd "*L[" $= {if} 2 s1 min {endif} || $d 5 $SetLengthR && 2 $cutEnd "*L[" $= {if} 1 s1 max {endif} || $d 4 $SetLengthR && 1 $cutEnd "*L[" $= {if} 0 s1 max {endif} || && {if} (L.L.Matrix_SpecifyNr) 0 >= {if} (S.L.Matrix_SpecifyNr) {endif} $d l1 1 + $SetLengthR 1 $cutEnd (S.$.Matrix_NrSpecified) 0 $* $+ l1 4 + $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *K := Use small fonts (height = 5 pixels); upper-case only & no CE support (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*K" $= {if} (L.L.Matrix_L2SmallFont) ! (S.L.Matrix_L2SmallFont) 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *I<# := Move icon # pixels to the left (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*I<" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_IconXpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *I># := Move icon # pixels to the right (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*I>" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_IconXpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *I := Invert line (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*I" $= {if} (L.L.Matrix_L2Invert) ! (S.L.Matrix_L2Invert) 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *G^# := Move up by # pixels, but only if largest font used (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*G^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *Gv# := Move down by # pixels, but only if largest font used (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*Gv" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *F<# := Move terminus display on the front # pixels to the left (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*F<" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *F># := Move terminus display on the front # pixels to the right (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*F>" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *F := Add airport icon (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*F" $= {if} 2 $cutEnd (S.$.Matrix_TerminusL2) "F" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *DB := Add DB (Deutsche Bahn) logo (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*DB" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL2) "D" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *CN := Use custom fonts for route number (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CN" $= {if} "9" $+ (S.$.Matrix_TerminusL2) {endif} ' *CN# := Use custom font # for route number (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*CN" $= {if} (L.L.Font_CustomMode) 100 < {if} $d 1 $SetLengthR $StrToFloat 0 max 100 * (L.L.Font_CustomMode) + (S.L.Font_CustomMode) {endif} 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *CI := Use custom icons (L.$.Matrix_TerminusL2) 4 $SetLengthR 1 $cutEnd "*CI" $= {if} 1 (S.L.Matrix_UseCustomIcon) (L.$.Matrix_Icon) (L.$.Matrix_TerminusL2) 1 $SetLengthR $+ (S.$.Matrix_Icon) (L.$.Matrix_TerminusL2) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *CF := Use custom fonts for destination (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CF" $= {if} "9" $+ (S.$.Matrix_TerminusL2) {endif} ' *CF# := Use custom font # for destination (L.$.Matrix_TerminusL2) $d 4 $SetLengthR 1 $cutEnd "*CF" $= {if} $d 1 $SetLengthR $StrToFloat 0 max 10 * (L.L.Font_CustomMode) + (S.L.Font_CustomMode) 4 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' *CE := Use only fonts supporting Central European characters (except *K) (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*CE" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL2) (L.L.Matrix_L2CEMode) ! (S.L.Matrix_L2CEMode) {endif} ' *BR := Add British Rail logo (L.$.Matrix_TerminusL2) $d 3 $SetLengthR "*BR" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL2) "B" (L.$.Matrix_Icon) $+ (S.$.Matrix_Icon) {endif} ' *B := Use bold face font for line 2 if space allows (L.$.Matrix_TerminusL2) $d 2 $SetLengthR "*B" $= {if} (L.L.Matrix_L2Bold) ! (S.L.Matrix_L2Bold) 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} ' O405N2 matrix compatibility (L.$.Matrix_TerminusL2) $d 1 s1 $SetLengthR "µ" $= $d 6 s1 $SetLengthR && "#Messe" $= || $d 9 s1 $SetLengthR && "#100Jahre" $= || {if} l1 $cutEnd (S.$.Matrix_TerminusL2) {endif} (L.$.Matrix_TerminusL2) $d 12 $SetLengthR "#Dienstfahrt" $= {if} 12 $cutEnd "Dienstfahrt*I" $+ (S.$.Matrix_TerminusL2) {endif} (L.$.Matrix_TerminusL2) $d 8 $SetLengthR "#Postbus" $= {if} 8 $cutEnd "Postbus" $+ (S.$.Matrix_TerminusL2) {endif} ' Process line 3 ' *^ := Move line 3 up by 1 pixel (L.$.Matrix_TerminusL3) $d 3 $SetLengthR 1 $cutEnd "*^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_L3Ypos) 3 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *v := Move line 3 down by 1 pixel (L.$.Matrix_TerminusL3) $d 3 $SetLengthR 1 $cutEnd "*v" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L3Ypos) 3 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *MX# := Allow only fonts up to standard width # pixels (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*MX" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_L3MaxStdGlyphWidth) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *I := Invert line (L.$.Matrix_TerminusL3) $d 2 $SetLengthR "*I" $= {if} (L.L.Matrix_L3Invert) ! (S.L.Matrix_L3Invert) 2 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *G^# := Move up by # pixels, but only if largest font used (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*G^" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *Gv# := Move down by # pixels, but only if largest font used (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*Gv" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_LargeFontYpos) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *F<# := Move terminus display on the front # pixels to the left (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*F<" $= {if} $d 1 $SetLengthR $StrToFloat /-/ (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *F># := Move terminus display on the front # pixels to the right (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*F>" $= {if} $d 1 $SetLengthR $StrToFloat (S.L.Matrix_FrontTerminusXpos) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *CF := Use custom fonts for destination (L.$.Matrix_TerminusL3) $d 3 $SetLengthR "*CF" $= {if} "9" $+ (S.$.Matrix_TerminusL3) {endif} ' *CF# := Use custom font # for destination (L.$.Matrix_TerminusL3) $d 4 $SetLengthR 1 $cutEnd "*CF" $= {if} $d 1 $SetLengthR $StrToFloat 0 max (L.L.Font_CustomMode) + (S.L.Font_CustomMode) 4 $cutEnd (S.$.Matrix_TerminusL3) {endif} ' *CE := Not currently needed for line 3 but kept for consistency (L.$.Matrix_TerminusL3) $d 3 $SetLengthR "*CE" $= {if} 3 $cutEnd (S.$.Matrix_TerminusL3) 1 (S.L.Matrix_L3CEMode) {endif} ' *B := Use bold face font for line 3 if space allows (L.$.Matrix_TerminusL3) $d 2 $SetLengthR "*B" $= {if} (L.L.Matrix_L3Bold) ! (S.L.Matrix_L3Bold) 2 $cutEnd (S.$.Matrix_TerminusL3) {endif} {end} {macro:Matrix_DrawIcon} (L.$.Matrix_Icon) "" $= {if} 0 (S.L.Matrix_IconPixelLength) {else} (L.L.Matrix_Ypos) (C.L.Matrix_Height) < {if} (L.L.Matrix_Xpos) (L.L.Matrix_IconXpos) + (S.L.Matrix_Xpos) {endif} (L.L.Matrix_UseCustomIcon) {if} (L.L.Font_CustomIcon) s0 {else} (L.L.Font_Icon) s0 {endif} 0 (L.L.Matrix_Xpos) s5 (L.L.Matrix_Ypos) l0 1 0 (L.$.Matrix_Icon) (M.V.STTextOut) (L.L.Matrix_Ypos) (C.L.Matrix_Height) < {if} l5 (L.$.Matrix_Icon) l0 (M.V.TextLength) s0 + 1 + (S.L.Matrix_Xpos) (S.L.Matrix_TerminusXpos) l0 1 + (S.L.Matrix_IconPixelLength) {endif} {endif} {end} {macro:Matrix_CapitalizeString} "" (S.$.Matrix_CapStr) $+ (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (M.L.Matrix_CapitalizeStringStep) (L.$.Matrix_CapStr) {end} {macro:Matrix_CapitalizeStringStep} $d $length 1 > {if} $d 2 $SetLengthR $d 1 $SetLengthL $d " " $= $d "-" $= || $d "<" $= || $d "(" $= || $d "+" $= || "/" $= || ! 1 $SetLengthR && {if} (M.L.Matrix_CharToLowerCase) {endif} (L.$.Matrix_CapStr) $+ (S.$.Matrix_CapStr) 0 $* $+ 1 $cutEnd {endif} $d $length 1 = {if} (L.$.Matrix_CapStr) $+ (S.$.Matrix_CapStr) "" 1 $cutEnd {endif} {end} ' Caution: Some characters below may not be visible on some systems {macro:Matrix_CharToLowerCaseCE} (M.L.Matrix_CharToLowerCase) d ! $d "Á" $= && {if} 0 $* $+ "á" {endif} || d ! $d "Â" $= && {if} 0 $* $+ "â" {endif} || d ! $d "Ã" $= && {if} 0 $* $+ "ã" {endif} || d ! $d "¥" $= && {if} 0 $* $+ "¹" {endif} || d ! $d "Æ" $= && {if} 0 $* $+ "æ" {endif} || d ! $d "Ç" $= && {if} 0 $* $+ "ç" {endif} || d ! $d "È" $= && {if} 0 $* $+ "è" {endif} || d ! $d "Ï" $= && {if} 0 $* $+ "ï" {endif} || d ! $d "Ð" $= && {if} 0 $* $+ "ð" {endif} || d ! $d "É" $= && {if} 0 $* $+ "é" {endif} || d ! $d "Ë" $= && {if} 0 $* $+ "ë" {endif} || d ! $d "Ê" $= && {if} 0 $* $+ "ê" {endif} || d ! $d "Ì" $= && {if} 0 $* $+ "ì" {endif} || d ! $d "Í" $= && {if} 0 $* $+ "í" {endif} || d ! $d "Î" $= && {if} 0 $* $+ "î" {endif} || d ! $d "Å" $= && {if} 0 $* $+ "å" {endif} || d ! $d "¼" $= && {if} 0 $* $+ "¾" {endif} || d ! $d "£" $= && {if} 0 $* $+ "³" {endif} || d ! $d "Ñ" $= && {if} 0 $* $+ "ñ" {endif} || d ! $d "Ò" $= && {if} 0 $* $+ "ò" {endif} || d ! $d "Ó" $= && {if} 0 $* $+ "ó" {endif} || d ! $d "Ô" $= && {if} 0 $* $+ "ô" {endif} || d ! $d "Õ" $= && {if} 0 $* $+ "õ" {endif} || d ! $d "À" $= && {if} 0 $* $+ "à" {endif} || d ! $d "Ø" $= && {if} 0 $* $+ "ø" {endif} || d ! $d "Œ" $= && {if} 0 $* $+ "œ" {endif} || d ! $d "ª" $= && {if} 0 $* $+ "º" {endif} || d ! $d "Š" $= && {if} 0 $* $+ "š" {endif} || d ! $d "Þ" $= && {if} 0 $* $+ "þ" {endif} || d ! $d "" $= && {if} 0 $* $+ "" {endif} || d ! $d "Ú" $= && {if} 0 $* $+ "ú" {endif} || d ! $d "Ù" $= && {if} 0 $* $+ "ù" {endif} || d ! $d "Û" $= && {if} 0 $* $+ "û" {endif} || d ! $d "Ý" $= && {if} 0 $* $+ "ý" {endif} || d ! $d "" $= && {if} 0 $* $+ "Ÿ" {endif} || d ! $d "¯" $= && {if} 0 $* $+ "¿" {endif} || d ! $d "Ž" $= && {if} 0 $* $+ "ž" {endif} || {end} {macro:Matrix_CharToLowerCase} 0 d ! $d "A" $= && {if} 0 $* $+ "a" {endif} || d ! $d "B" $= && {if} 0 $* $+ "b" {endif} || d ! $d "C" $= && {if} 0 $* $+ "c" {endif} || d ! $d "D" $= && {if} 0 $* $+ "d" {endif} || d ! $d "E" $= && {if} 0 $* $+ "e" {endif} || d ! $d "F" $= && {if} 0 $* $+ "f" {endif} || d ! $d "G" $= && {if} 0 $* $+ "g" {endif} || d ! $d "H" $= && {if} 0 $* $+ "h" {endif} || d ! $d "I" $= && {if} 0 $* $+ "i" {endif} || d ! $d "J" $= && {if} 0 $* $+ "j" {endif} || d ! $d "K" $= && {if} 0 $* $+ "k" {endif} || d ! $d "L" $= && {if} 0 $* $+ "l" {endif} || d ! $d "M" $= && {if} 0 $* $+ "m" {endif} || d ! $d "N" $= && {if} 0 $* $+ "n" {endif} || d ! $d "O" $= && {if} 0 $* $+ "o" {endif} || d ! $d "P" $= && {if} 0 $* $+ "p" {endif} || d ! $d "Q" $= && {if} 0 $* $+ "q" {endif} || d ! $d "R" $= && {if} 0 $* $+ "r" {endif} || d ! $d "S" $= && {if} 0 $* $+ "s" {endif} || d ! $d "T" $= && {if} 0 $* $+ "t" {endif} || d ! $d "U" $= && {if} 0 $* $+ "u" {endif} || d ! $d "V" $= && {if} 0 $* $+ "v" {endif} || d ! $d "W" $= && {if} 0 $* $+ "w" {endif} || d ! $d "X" $= && {if} 0 $* $+ "x" {endif} || d ! $d "Y" $= && {if} 0 $* $+ "y" {endif} || d ! $d "Z" $= && {if} 0 $* $+ "z" {endif} || d ! $d "Ä" $= && {if} 0 $* $+ "ä" {endif} || d ! $d "Ö" $= && {if} 0 $* $+ "ö" {endif} || d ! $d "Ü" $= && {if} 0 $* $+ "ü" {endif} || {end} {macro:Matrix_CharToUpperCase} 0 d ! $d "a" $= && {if} 0 $* $+ "A" {endif} || d ! $d "b" $= && {if} 0 $* $+ "B" {endif} || d ! $d "c" $= && {if} 0 $* $+ "C" {endif} || d ! $d "d" $= && {if} 0 $* $+ "D" {endif} || d ! $d "e" $= && {if} 0 $* $+ "E" {endif} || d ! $d "f" $= && {if} 0 $* $+ "F" {endif} || d ! $d "g" $= && {if} 0 $* $+ "G" {endif} || d ! $d "h" $= && {if} 0 $* $+ "H" {endif} || d ! $d "i" $= && {if} 0 $* $+ "I" {endif} || d ! $d "j" $= && {if} 0 $* $+ "J" {endif} || d ! $d "k" $= && {if} 0 $* $+ "K" {endif} || d ! $d "l" $= && {if} 0 $* $+ "L" {endif} || d ! $d "m" $= && {if} 0 $* $+ "M" {endif} || d ! $d "n" $= && {if} 0 $* $+ "N" {endif} || d ! $d "o" $= && {if} 0 $* $+ "O" {endif} || d ! $d "p" $= && {if} 0 $* $+ "P" {endif} || d ! $d "q" $= && {if} 0 $* $+ "Q" {endif} || d ! $d "r" $= && {if} 0 $* $+ "R" {endif} || d ! $d "s" $= && {if} 0 $* $+ "S" {endif} || d ! $d "t" $= && {if} 0 $* $+ "T" {endif} || d ! $d "u" $= && {if} 0 $* $+ "U" {endif} || d ! $d "v" $= && {if} 0 $* $+ "V" {endif} || d ! $d "w" $= && {if} 0 $* $+ "W" {endif} || d ! $d "x" $= && {if} 0 $* $+ "X" {endif} || d ! $d "y" $= && {if} 0 $* $+ "Y" {endif} || d ! $d "z" $= && {if} 0 $* $+ "Z" {endif} || d ! $d "ä" $= && {if} 0 $* $+ "Ä" {endif} || d ! $d "ö" $= && {if} 0 $* $+ "Ö" {endif} || d ! $d "ü" $= && {if} 0 $* $+ "Ü" {endif} || {end} {macro:Matrix_DrawingOn} (L.L.Matrix_IsDrawing) ! {if} 1 (M.V.STLock) 1 (S.L.Matrix_IsDrawing) {endif} {end} {macro:Matrix_DrawingOff} (L.L.Matrix_IsDrawing) {if} 1 (M.V.STUnlock) 1 (M.V.STFilter) 0 (S.L.Matrix_IsDrawing) {endif} {end} {macro:Matrix_SetOptions} 14990 (M.V.GetTerminusIndex) s0 0 >= {if} (L.$.Matrix_TerminusL1) l0 0 (M.V.GetTerminusString) $+ (S.$.Matrix_TerminusL1) (L.$.Matrix_TerminusL2) l0 1 (M.V.GetTerminusString) $+ (S.$.Matrix_TerminusL2) {endif} {end} {macro:Matrix_ProcessCustomFontYpos} $d 3 $SetLengthR 1 $cutEnd "*^" $= {if} $d 1 $SetLengthR $StrToFloat 0 max 7 min /-/ 3 $cutEnd {else} $d 3 $SetLengthR 1 $cutEnd "*v" $= {if} $d 1 $SetLengthR $StrToFloat 0 max 7 min 3 $cutEnd {else} 0 {endif} {endif} {end} {macro:matrix_setFontC1Ypos} 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs (L.L.Font_Custom1Ypos) + (S.L.Font_Custom1Ypos) {end} {macro:matrix_setFontC2Ypos} 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs (L.L.Font_Custom2Ypos) + (S.L.Font_Custom2Ypos) {end} {macro:matrix_setFontNrYpos} 2.7725887 * exp * d d 0 < * d 15 % / 8 * - abs (L.L.Font_CustomNrYpos) + (S.L.Font_CustomNrYpos) {end} {macro:matrix_getFontC1Ypos} -2.7725887 * exp (L.L.Font_Custom1Ypos) * trunc 16 % d 8 - sgn /-/ * d 0 < 8 * + {end} {macro:matrix_getFontC2Ypos} -2.7725887 * exp (L.L.Font_Custom2Ypos) * trunc 16 % d 8 - sgn /-/ * d 0 < 8 * + {end} {macro:matrix_getFontNrYpos} -2.7725887 * exp (L.L.Font_CustomNrYpos) * trunc 16 % d 8 - sgn /-/ * d 0 < 8 * + {end} {macro:Matrix_HasDescender} 0 (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || (M.L.Matrix_Descender) || {end} {macro:Matrix_Descender} d ! $d $length 0 = ! && {if} $d $SetLengthL && $d "f" $> {if} * $d "g" $= $d "j" $= || $d "p" $= || $d "q" $= || $d "y" $= || $d "," $= || $d "‚" $= || $d "„" $= || $d "[" $= || "]" $= || {else} 0 $* $+ {endif} 1 $cutBegin {endif} {end} {macro:Matrix_HasDescenderCE} 0 (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || (M.L.Matrix_DescenderCE) || {end} {macro:Matrix_DescenderCE} d ! $d $length 0 = ! && {if} $d $SetLengthL && $d "f" $> {if} * $d "g" $= $d "j" $= || $d "p" $= || $d "q" $= || $d "y" $= || $d "¥" $= || $d "Ç" $= || $d "Ê" $= || $d "ª" $= || $d "Þ" $= || $d "¹" $= || $d "ç" $= || $d "ê" $= || $d "º" $= || $d "þ" $= || "ý" $= || {else} 0 $* $+ {endif} 1 $cutBegin {endif} {end} {macro:Matrix_HasTallGlyphCE} 0 (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || (M.L.Matrix_TallGlyphCE) || {end} {macro:Matrix_TallGlyphCE} d ! $d $length 0 = ! && {if} $d $SetLengthL && $d "‰" $> $d "ß" $< && {if} * $d "Á" $= $d "Â" $= || $d "Ä" $= || $d "Ã" $= || $d "Æ" $= || $d "Ç" $= || $d "Ï" $= || $d "É" $= || $d "Ë" $= || $d "Ì" $= || $d "Í" $= || $d "Î" $= || $d "Å" $= || $d "Ñ" $= || $d "Ò" $= || $d "Ó" $= || $d "Ô" $= || $d "Ö" $= || $d "Õ" $= || $d "À" $= || $d "Ø" $= || $d "Œ" $= || $d "ª" $= || $d "Š" $= || $d "Þ" $= || $d "" $= || $d "Ú" $= || $d "Ü" $= || $d "Ù" $= || $d "Û" $= || $d "Ý" $= || $d "" $= || $d "¯" $= || "Ž" $= || {else} 0 $* $+ {endif} 1 $cutBegin {endif} {end}