'############## 'Matrix Script '############## 'Simuliert eine Vollmatrix in FlipDot und LED von BROSE und BUSE/apricot '(c) Marcel Kuhnt (Krueger Script) '(c) 2023 Neoplan VEST '(c) 2024 Lenn 'Script Version: 1.0 'Omsi release: 2.0 'Needs: '- Cockpit (Batterietrennschalter) '- IBIS 'NrSpecRandom Seed Area: '971: Anzahl der Fehlerpixel pro Jahr '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 '- Neoplan VEST 11.02.2023 Umwandlung von AEG/Krueger auf BROSE '- Lenn 03.10.2024 Diverse Erweiterungen in Funktionen und Setvars '- Lenn 13.10.2024 PrintBitmap hinzugefügt für LED ohne Flipdot Animation '- Lenn 03.11.2024 Modulare Auflösungen, z.B. vorne 19- und an der Seite 16-zeilig '- Lenn 24.11.2024 Skript soweit fertig :D '------------------------------------------------------------------------------------------ {trigger:Front_up} 'Erhöhe Matrix_Type_Front um 1, wenn größer als 8 -> 0 (L.L.Matrix_Type_Front) 1 + (S.L.Matrix_Type_Front) 8 > {if} 0 (S.L.Matrix_Type_Front) {endif} 'Initialisiere die Anzeige neu, damit keine Probleme mit der alten Auflösung entstehen (M.L.Matrix_init) {end} {trigger:Front_down} (L.L.Matrix_Type_Front) 1 - (S.L.Matrix_Type_Front) 0 < {if} 8 (S.L.Matrix_Type_Front) {endif} (M.L.Matrix_init) {end} {trigger:Seite_up} (L.L.Matrix_Type_Seite) 1 + (S.L.Matrix_Type_Seite) 11 > {if} 0 (S.L.Matrix_Type_Seite) {endif} (M.L.Matrix_init) {end} {trigger:Seite_down} (L.L.Matrix_Type_Seite) 1 - (S.L.Matrix_Type_Seite) 0 < {if} 11 (S.L.Matrix_Type_Seite) {endif} (M.L.Matrix_init) {end} {trigger:DescStyle} (L.L.Matrix_DescenderStyle) 0 = {if} 1 {else} 0 {endif} (S.L.Matrix_DescenderStyle) (M.L.Matrix_init) {end} {trigger:Pixelabstand} (L.L.Matrix_Pixelabstand) 0 = {if} 1 {else} 0 {endif} (S.L.Matrix_Pixelabstand) (M.L.Matrix_init) {end} {trigger:BS210_LEDs} (L.L.Matrix_BS210_LED) 0 = {if} 1 {else} 0 {endif} (S.L.Matrix_BS210_LED) (M.L.Matrix_Options) {end} {trigger:BS310_LEDs_up} (L.L.Matrix_LED_Color) 1 + (S.L.Matrix_LED_Color) 2 > {if} 0 (S.L.Matrix_LED_Color) {endif} (M.L.Matrix_init) {end} {trigger:BS310_LEDs_down} (L.L.Matrix_LED_Color) 1 - (S.L.Matrix_LED_Color) 0 < {if} 2 (S.L.Matrix_LED_Color) {endif} (M.L.Matrix_init) {end} {trigger:vis_config_switch} (L.L.vis_BUSE_BROSE_config) 0 = {if} 1 {else} 0 {endif} (S.L.vis_BUSE_BROSE_config) {end} {macro:Matrix_init} 'RefreshCursor 0 = Startposition 0 (S.L.Matrix_RefreshCursor) 'Initialisiere die ST1 neu 1 (M.V.STNewTex) 'Berechne die Fehlerpixel (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) 'Setze Steckschilder zurück -1 (S.L.matrix_steckschild_Termindex) 0 (S.L.matrix_steckschild_vis) 'Setze Matrix_Modul zurück (LED Anzeige) 0 (S.L.Matrix_Modul) 'Setze Auflösungen und/oder andere Optionen fest (M.L.Matrix_Options) {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 > {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 -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) (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 ST3 Zeichensatz initialisieren 'Font Index: 'A0 ST3_0-19px 'A1 ST3_1-16px 'A2 ST3_2-15px 'A3 ST3_3-15px 'A4 ST3_4-13px 'A5 ST3_5-10px 'A6 ST3_6-7px 'A7 ST3_7-7px 'A9 ST3_9-7px "BROSE F0" (M.V.GetFontIndex) (S.L.Font_A0) "BROSE F1" (M.V.GetFontIndex) (S.L.Font_A1) "BROSE F2" (M.V.GetFontIndex) (S.L.Font_A2) "BROSE F3" (M.V.GetFontIndex) (S.L.Font_A3) "BROSE F4" (M.V.GetFontIndex) (S.L.Font_A4) "BROSE F5" (M.V.GetFontIndex) (S.L.Font_A5) "BROSE F6" (M.V.GetFontIndex) (S.L.Font_A6) "BROSE F7" (M.V.GetFontIndex) (S.L.Font_A7) "BROSE F9" (M.V.GetFontIndex) (S.L.Font_A9) (L.L.elec_busbar_main) (L.L.elec_busbar_main_old) ! {if} 1 (S.L.LED_clear_signal) {endif} (L.L.elec_busbar_main) (S.L.elec_busbar_main_old) 'Wechselziele: 'Timer mit Konstante (std = 3) (L.S.TimeGap) (L.L.Matrix_Timer) + (S.L.Matrix_Timer) (C.L.Matrix_WechselzielIntervall) 0.1 + >= (L.L.IBIS_TerminusIndex) (L.L.Matrix_TerminusIndex_Last) = && (L.L.Matrix_TerminusAct) 0 > && {if} (L.L.Matrix_TerminusAct) (M.V.GetTerminusCode) s0 1000 < {if} l0 (S.L.Matrix_TerminusCode_Original) l0 10000 + s0 {else} l0 1000 + s0 {endif} l0 (M.V.GetTerminusIndex) s1 0 >= {if} l1 (S.L.IBIS_TerminusIndex) s0 {else} (L.L.Matrix_TerminusCode_Original) (M.V.GetTerminusIndex) (S.L.IBIS_TerminusIndex) s0 {endif} {endif} 'Erster Schritt: Linie erstellen: (L.L.IBIS_Linie_Complex) s0 (L.L.Matrix_Nr_Last) = ! (L.L.elec_busbar_main) && {if} 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} "" 0 (S.L.Matrix_InvertL) {else} ' Sonst die normale Nummer: l1 trunc $IntToStr 0 (S.L.Matrix_InvertL) {endif} (S.$.Matrix_Nr) 'Besonderheit bei BROSE, Standard wird die 1. Platine f?r Linie Reserviert, aber beim Bestimmten Suffix wird diese bem Ziel mitgenutzt. (L.L.IBIS_Linie_Suffix) 90 = {if} 1 (S.L.lE90) {else} 0 (S.L.lE90) {endif} ' =============================================================================== ' Falls jetzt die hinteren beiden Ziffern (l2) etwas Interessantes enthalten: ' =============================================================================== (L.$.Matrix_Nr) "gh" $= {if} "#" {endif} (L.$.Matrix_Nr) "DB" $= {if} "^" {endif} l4 1 = {if} "E" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 2 = {if} "" {endif} l4 3 = {if} "#" {endif} l4 4 = {if} (L.$.Matrix_Nr) "N" $+ {endif} l4 5 = l4 24 = || {if} "S" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 6 = {if} "A" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 9 = {if} (L.$.Matrix_Nr) "E" $+ {endif} l4 10 = {if} (L.$.Matrix_Nr) "\" $+ {endif} l4 11 = {if} "D" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 12 = {if} "C" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 13 = {if} "B" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 14 = {if} (L.$.Matrix_Nr) "A" $+ {endif} l4 15 = {if} "N" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 23 = {if} (L.$.Matrix_Nr) "S" $+ {endif} ' 24 s.o. bei 5! l4 25 = {if} "U" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 26 = {if} "U" {endif} l4 27 = {if} "M" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 28 = {if} "M" {endif} l4 29 = {if} "BVG" 1 (S.L.Matrix_InvertL) {endif} l4 30 = {if} "S" {endif} l4 32 = {if} (L.$.Matrix_Nr) "M" $+ {endif} l4 35 = {if} "N" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 36 = {if} "X" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 38 = {if} "[" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 39 = {if} "]" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 40 = {if} "|" (L.$.Matrix_Nr) 2 $SetLengthR $+ {endif} l4 41 = {if} "1" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 42 = {if} "2" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 43 = {if} "3" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 44 = {if} "4" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 45 = {if} "5" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 46 = {if} "6" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 47 = {if} "7" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 48 = {if} "8" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} l4 49 = {if} "9" (L.$.Matrix_Nr) 3 $SetLengthR $+ {endif} $RemoveSpaces (S.$.Matrix_Nr) {endif} 'Zweiter Schritt: Ziel erstellen: (L.L.IBIS_TerminusIndex) s0 (L.L.Matrix_TerminusIndex_Last) s1 = ! (L.L.elec_busbar_main) && {if} 'Hofdatei Strings 1 und 2 (ANNAX 1 und 2) l0 1 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusL1) l0 2 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusL2) 'Wenn String 15 (LAWO Cooper Seite 1) NICHT leer ist, dann... l0 15 (M.V.GetTerminusString) "" $= ! {if} ' Nimm diese Strings und setze sie auf Seitenziel l0 15 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusRL1) l0 16 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusRL2) {else} ' Sonst guck, ob String 3 (Seite) beschrieben ist l0 3 (M.V.GetTerminusString) "" $= ! {if} ' Nimm diesen String und setze ihn auf Seitenziel l0 3 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_TerminusRL1) "" (S.$.Matrix_TerminusRL2) {else} ' Wenn gar kein Seitentext gesetzt ist, dann nimm den Fronttext und kopier ihn rüber (L.$.Matrix_TerminusL1) (S.$.Matrix_TerminusRL1) (L.$.Matrix_TerminusL2) (S.$.Matrix_TerminusRL2) {endif} {endif} '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} (L.$.Matrix_TerminusRL1) "" $= {if} (L.$.Matrix_TerminusRL2) (S.$.Matrix_TerminusRL1) "" (S.$.Matrix_TerminusRL2) {endif} 'Zielfeld invertierung 0 (S.L.Matrix_InvertL1) (S.L.Matrix_InvertL2) (L.$.Matrix_TerminusL1) 2 $SetLengthR "*I" 0 $= {if} 1 (S.L.Matrix_InvertL1) (L.$.Matrix_TerminusL1) 2 $cutEnd (S.$.Matrix_TerminusL1) {endif} (L.$.Matrix_TerminusL2) 2 $SetLengthR "*I" 0 $= {if} 1 (S.L.Matrix_InvertL2) (L.$.Matrix_TerminusL2) 2 $cutEnd (S.$.Matrix_TerminusL2) {endif} (L.$.Matrix_TerminusL2) "" $= {if} (L.L.Matrix_InvertL1) (S.L.Matrix_InvertL2) {endif} 0 (S.L.Matrix_InvertRL1) (S.L.Matrix_InvertRL2) (L.$.Matrix_TerminusRL1) 2 $SetLengthR "*I" 0 $= {if} 1 (S.L.Matrix_InvertRL1) (L.$.Matrix_TerminusRL1) 2 $cutEnd (S.$.Matrix_TerminusRL1) {endif} (L.$.Matrix_TerminusRL2) 2 $SetLengthR "*I" 0 $= {if} 1 (S.L.Matrix_InvertRL2) (L.$.Matrix_TerminusRL2) 2 $cutEnd (S.$.Matrix_TerminusRL2) {endif} (L.$.Matrix_TerminusRL2) "" $= {if} (L.L.Matrix_InvertRL1) (S.L.Matrix_InvertRL2) {endif} ' Sonderzeichen 98 soll die IBIS-Adressen anzeigen (L.L.IBIS_Linie_Suffix) 98 = {if} "Adr. 1" (S.$.Matrix_TerminusL1) "Adr. 2" (S.$.Matrix_TerminusRL1) "\" (S.$.Matrix_Nr) {endif} {endif} (L.L.LED_clear_signal) 1 = {if} (L.L.Matrix_LED_Front) 1 = {if} 0 0 0 0 (M.V.STSetColor) 1 (M.V.STLock) 1 0 0 1007 151 (M.V.STDrawRect) 1 (M.V.STUnlock) 1 (M.V.STFilter) {endif} (L.L.Matrix_LED_Seite) 1 = {if} 0 0 0 0 (M.V.STSetColor) 1 (M.V.STLock) 1 0 152 1119 303 (M.V.STDrawRect) 1 (M.V.STUnlock) 1 (M.V.STFilter) {endif} 0 (S.L.LED_clear_signal) {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} '?berpr?fen auf Unterl?nge. Falls vorhanden Font H?her oder durch ein niedrigere Font ersetzen (WrieTerminus) (L.$.Matrix_TerminusL2) "" $= {if} (M.L.Matrix_CheckDescenderL1) {else} (M.L.Matrix_CheckDescenderL2) {endif} (L.$.Matrix_TerminusRL2) "" $= {if} (M.L.Matrix_CheckDescenderRL1) {else} (M.L.Matrix_CheckDescenderRL2) {endif} l0 (S.L.Matrix_TerminusAct) (L.L.IBIS_Linie_Complex) (S.L.Matrix_Nr_Last) (L.L.IBIS_Linie_Suffix) 99 = ! {if} l0 7 (M.V.GetTerminusString) $RemoveSpaces (S.$.Matrix_Bitmapfilename) "" $= {if} '3.0 Initialisieren der Bitmap und setzen der Farbe: 0 (M.V.STNewTex) 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 '######################################## 'Ab hier 19er H?he '######################################## (L.$.Matrix_Nr) "" $= {if} 0 s1 (S.L.Matrix_Xpos) {else} '3.A.0 Sperrpixelfaktor (l6): (L.$.Matrix_Nr) $length 1 - 0 max s6 '3.A.05 Setzen der Maximalbreite: 28 s3 '3.A.1 Bestimmen des Fonts der Linie (vorne): '19er Anzeigen (L.L.Matrix_Height_Front) 16 = ! {if} 0 s2 (L.$.Matrix_Nr) (L.L.Font_A0) s0 (M.V.TextLength) s1 l3 > {if} 2 s2 (L.$.Matrix_Nr) (L.L.Font_A4) s0 (M.V.TextLength) s1 {endif} {else} '16er Anzeigen 0 s2 (L.$.Matrix_Nr) (L.L.Font_A1) s0 (M.V.TextLength) s1 l3 > {if} 0 s2 (L.$.Matrix_Nr) (L.L.Font_A4) s0 (M.V.TextLength) s1 {endif} {endif} '3.A.2 Berechnen der Sperrung: ' Wenn die Linie mindestens dreistellig ist -> Nur einen Pixel Abstand (L.$.Matrix_Nr) $length 3 >= {if} l3 l1 - l6 / trunc 0 min s7 {else} l3 l1 - l6 / trunc 1 min s7 {endif} l1 l6 l7 * + s1 '3.A.3 Berechnen des Zentrierungsaufschlages (l5): l3 l1 - 2 / trunc s5 ' l0: Schriftart, l1: L?nge in Pixeln '3.A.2 Schreiben: 0 l5 0 l2 + l0 2 l7 (L.$.Matrix_Nr) (M.V.STTextOut) '3.A.3 Bestimmen des Startpunktes des Zieles (Matrix_Xpos): l1 0 + (S.L.Matrix_Xpos) '3.A.4 Bestimmen des Fonts der Linie (seite/hinten): (L.L.Matrix_Height_Seite) 16 = ! {if} 0 s2 (L.$.Matrix_Nr) (L.L.Font_A0) s0 (M.V.TextLength) s1 l3 > {if} 2 s2 (L.$.Matrix_Nr) (L.L.Font_A4) s0 (M.V.TextLength) s1 {endif} {else} 0 s2 (L.$.Matrix_Nr) (L.L.Font_A1) s0 (M.V.TextLength) s1 l3 > {if} 0 s2 (L.$.Matrix_Nr) (L.L.Font_A4) s0 (M.V.TextLength) s1 {endif} {endif} ' l0: Schriftart, l1: Länge in Pixeln '3.A.5 Berechnen der Sperrung: (L.$.Matrix_Nr) $length 3 >= {if} l3 l1 - l6 / trunc 0 min s7 {else} l3 l1 - l6 / trunc 1 min s7 {endif} l1 l6 l7 * + s1 '3.A.6 Berechnen des Zentrierungsaufschlages (l5): l3 l1 - 2 / trunc s5 '3.A.7 Schreiben: '19er Anzeigen (L.L.Matrix_Height_Seite) 19 = {if} 0 l5 19 l2 + l0 2 l7 (L.$.Matrix_Nr) (M.V.STTextOut) {else} 0 l5 22 l2 + l0 2 l7 (L.$.Matrix_Nr) (M.V.STTextOut) {endif} {endif} 'Schreiben des Zieles Front-Anzeige: (L.L.lE90) 0 = {if} ' Ohne Linienfeldbenutzung 0 (S.L.Matrix_Ypos) 28 (S.L.Matrix_Xpos) (M.L.Matrix_WriteTerminus) {else} ' Linie wird ausgeblendet und daf?r wird das Zielbereich auf den Linienabschnitt verwendet 0 (S.L.Matrix_Ypos) 0 (S.L.Matrix_Xpos) (M.L.Matrix_WriteTerminus) {endif} 'Und Schreiben des Zieles Seitenanzeige: 28 (S.L.Matrix_Xpos) 'Dass die 19 hardgecoded ist, ist beabsichtigt ;) 19 (S.L.Matrix_Ypos) (M.L.Matrix_WriteTerminus_Rechts) 'Fertig: Unlocken 0 (M.V.STUnlock) {else} "..\..\Anzeigen\BUSE_BROSE\" (L.$.Matrix_Bitmapfilename) $+ 0 (M.V.STLoadTex) {endif} (L.L.Matrix_TerminusAct) (S.L.Matrix_TerminusIndex_Last) (M.L.matrix_refreshIntIndex) {endif} 'RefreshCursor zur?cksetzen: 0 (S.L.Matrix_RefreshCursor) {endif} '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) 1 (M.V.STLock) 'Wenn wir LED haben, dann nimm PrintBitmap, damit es ohne Flipdot-Animation übertragen wird (L.L.Matrix_LED) 1 = {if} (M.L.Matrix_PrintBitmap) (L.L.Matrix_Modul) 1 + (S.L.Matrix_Modul) (L.L.Matrix_Modul) 2 > {if} 0 (S.L.Matrix_Timer) 0 (M.V.STUnlock) 1 (M.V.STUnlock) 1 (M.V.STFilter) 'Ist gewollt! 1 (M.V.STUnlock) 1 (M.V.STUnlock) 1 (M.V.STFilter) 0 (S.L.Matrix_Modul) 0 (S.L.Matrix_RefreshCursor) {endif} {else} 'Sound abspielen: ' (L.L.Matrix_RefreshCursor) 0 = ' {if} ' (T.L.ev_Matrix_Terminus_change) ' {endif} 'BROSE Geschwindigkeit (L.L.Matrix_Type_Front) 2 = (L.L.Matrix_Type_Front) 5 = || (L.L.Matrix_Type_Front) 8 = || {if} (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) {else} (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) (M.L.Matrix_PixelRefresh_x3) {endif} {endif} 'Unlocken: 0 (S.L.Matrix_Timer) 0 (M.V.STUnlock) 1 (M.V.STUnlock) 1 (M.V.STFilter) {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.$.Matrix_Nr) $RemoveSpaces $+ ".bmp" $+ (S.$.Matrix_Seitenschild) 0 (S.L.matrix_refresh_seitenschild) {endif} 'Setzen der Lightmapfarbe bei der BS210 (gruen oder amber) mit Variable lights_stand (L.L.lights_stand) {if} (L.L.Matrix_BS210_LED) 1 = {if} 0 (S.L.Matrix_LightMap_green) 1 (S.L.Matrix_LightMap_amber) {else} 0 (S.L.Matrix_LightMap_amber) 1 (S.L.Matrix_LightMap_green) {endif} {else} 0 (S.L.Matrix_LightMap_amber) 0 (S.L.Matrix_LightMap_green) {endif} {end} '*------------------------------------------------------------------------------------------------------------ {macro:Matrix_PixelRefresh_x3} ' 3 Anzeigen gleichzeitig umschalten ' Erste Anzeige umschalten: 0 s0 (M.L.Matrix_PixelRefresh) ' Zweite Anzeige umschalten: (L.L.Matrix_RefreshCursor) 1 - (S.L.Matrix_RefreshCursor) 1 s0 (M.L.Matrix_PixelRefresh) ' Zweite Anzeige umschalten: '(L.L.Matrix_RefreshCursor) 1 - (S.L.Matrix_RefreshCursor) '2 s0 '(M.L.Matrix_PixelRefresh) {end} {macro:Matrix_WriteTerminus} '3.B.2 Bestimmen der verbliebenen L?nge des Zieles vorne (l3): (L.L.Matrix_Width_Front) (L.L.Matrix_Xpos) - s3 '3.B.3 Einzeilig (l4)? (L.$.Matrix_TerminusL2) "" $= s4 '3.B.4 Bestimmen des Fonts der Zeile 1 des Ziels (l0/l1): (L.L.Matrix_Height_Front) 16 = ! {if} l4 {if} 2 s7 (L.L.Matrix_TerminusL1HasDescender) 1 = {if} (L.L.Matrix_DescenderStyle) 1 = {if} 2 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} {else} 2 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 (L.L.Matrix_TerminusL1HasDescender) 1 = {if} (L.L.Matrix_DescenderStyle) 1 = {if} 3 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} {else} 2 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 3 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A5) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 6 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 6 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 6 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} {endif} {else} 2 s7 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 0 s2 2 s7 (L.$.Matrix_TerminusL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} 'AB HIER 16 ZEILIG {else} l4 {if} 2 s7 (L.L.Matrix_TerminusL1HasDescender) 1 = {if} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 (L.L.Matrix_TerminusL1HasDescender) 1 = {if} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 1 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 3 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A5) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} {endif} {else} 2 s7 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 0 s2 (L.$.Matrix_TerminusL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 0 s2 2 s7 (L.$.Matrix_TerminusL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} '3.B.5 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusL1) $length 1 - 0 max s6 '3.B.6 Berechnen der Sperrung: 'Wenn Pixelabstand in Const = 1, dann Pixelabstand nach Standard Formatierung 'Wenn Pixelabstand in Const = 0, dann Pixelabstand immer 1 px (L.L.Matrix_Pixelabstand) 1 = {if} l7 s7 {else} 0 s7 {endif} 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 + l0 2 l7 (L.$.Matrix_TerminusL1) (M.V.STTextOut) '3.C.1 Bestimmen des Fonts der Zeile 2 des Ziels (l0/l1): (L.L.Matrix_Height_Front) 16 = ! {if} l4 ! {if} 2 s7 10 s2 (L.$.Matrix_TerminusL2) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 10 s2 (L.$.Matrix_TerminusL2) (L.L.Font_A7) s0 (M.V.TextLength) s1 {endif} {endif} {else} 'AB HIER 16 ZEILIG l4 ! {if} 2 s7 8 s2 (L.$.Matrix_TerminusL2) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 8 s2 (L.$.Matrix_TerminusL2) (L.L.Font_A7) s0 (M.V.TextLength) s1 {endif} {endif} {endif} '3.C.2 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusL2) $length 1 - 0 max s6 '3.C.3 Berechnen der Sperrung: 'Wenn Pixelabstand in Const = 1, dann Pixelabstand nach Standard Formatierung 'Wenn Pixelabstand in Const = 0, dann Pixelabstand immer 1 px (L.L.Matrix_Pixelabstand) 1 = {if} l7 s7 {else} 0 s7 {endif} 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: 0 (L.L.Matrix_Xpos) l5 + (L.L.Matrix_Ypos) l2 + l0 2 l7 (L.$.Matrix_TerminusL2) (M.V.STTextOut) {end} {macro:Matrix_WriteTerminus_Rechts} '3.B.2 Bestimmen der verbliebenen L?nge des Zieles vorne (l3): (L.L.Matrix_Width_Seite) (L.L.Matrix_Xpos) - s3 '3.B.3 Einzeilig (l4)? (L.$.Matrix_TerminusRL2) "" $= s4 '3.B.4 Bestimmen des Fonts der Zeile 1 des Ziels (l0/l1): (L.L.Matrix_Height_Seite) 16 = ! {if} l4 {if} 2 s7 (L.L.Matrix_TerminusRL1HasDescender) 1 = {if} (L.L.Matrix_DescenderStyle) 1 = {if} 2 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} {else} 2 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 (L.L.Matrix_TerminusRL1HasDescender) 1 = {if} (L.L.Matrix_DescenderStyle) 1 = {if} 2 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 0 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} {else} 2 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 2 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A5) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} {endif} {else} 2 s7 0 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 0 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 0 s2 2 s7 (L.$.Matrix_TerminusRL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {else} 'AB HIER 16 ZEILIG l4 {if} 2 s7 (L.L.Matrix_TerminusRL1HasDescender) 1 = {if} 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A2) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 (L.L.Matrix_TerminusRL1HasDescender) 1 = {if} 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 {else} 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A3) s0 (M.V.TextLength) s1 {endif} l3 > {if} 2 s7 4 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A4) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 5 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A5) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 7 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 7 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 7 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} {endif} {endif} {else} 2 s7 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 3 s2 (L.$.Matrix_TerminusRL1) (L.L.Font_A7) s0 (M.V.TextLength) s1 l3 > {if} 3 s2 2 s7 (L.$.Matrix_TerminusRL1) (L.L.Font_A9) s0 (M.V.TextLength) s1 {endif} {endif} {endif} {endif} '3.B.5 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusRL1) $length 1 - 0 max s6 '3.B.6 Berechnen der Sperrung: 'Wenn Pixelabstand in Const = 1, dann Pixelabstand nach Standard Formatierung 'Wenn Pixelabstand in Const = 0, dann Pixelabstand immer 1 px (L.L.Matrix_Pixelabstand) 1 = {if} l7 s7 {else} 0 s7 {endif} 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 + l0 2 l7 (L.$.Matrix_TerminusRL1) (M.V.STTextOut) '3.C.1 Bestimmen des Fonts der Zeile 2 des Ziels (l0/l1): (L.L.Matrix_Height_Seite) 16 = ! {if} l4 ! {if} 2 s7 10 s2 (L.$.Matrix_TerminusRL2) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 10 s2 (L.$.Matrix_TerminusRL2) (L.L.Font_A7) s0 (M.V.TextLength) s1 {endif} {endif} {else} l4 ! {if} 2 s7 11 s2 (L.$.Matrix_TerminusRL2) (L.L.Font_A6) s0 (M.V.TextLength) s1 l3 > {if} 2 s7 11 s2 (L.$.Matrix_TerminusRL2) (L.L.Font_A7) s0 (M.V.TextLength) s1 {endif} {endif} {endif} '3.C.2 Berechnen des Sperrpixelfaktors: (Anzahl der Buchstaben, l6) (L.$.Matrix_TerminusRL2) $length 1 - 0 max s6 '3.C.3 Berechnen der Sperrung: 'Wenn Pixelabstand in Const = 1, dann Pixelabstand nach Standard Formatierung 'Wenn Pixelabstand in Const = 0, dann Pixelabstand immer 1 px (L.L.Matrix_Pixelabstand) 1 = {if} l7 s7 {else} 0 s7 {endif} 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: 0 (L.L.Matrix_Xpos) l5 + (L.L.Matrix_Ypos) l2 + l0 2 l7 (L.$.Matrix_TerminusRL2) (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_CheckDescenderL1} 0 (S.L.Matrix_TerminusL1HasDescender) 1 (S.L.Matrix_RefreshCursor) (M.L.Matrix_CheckDescender3) (M.L.Matrix_CheckDescender3) (M.L.Matrix_CheckDescender3) 0 (S.L.Matrix_RefreshCursor) {end} {macro:Matrix_CheckDescender3} (M.L.Matrix_CheckDescender2) (M.L.Matrix_CheckDescender2) {end} {macro:Matrix_CheckDescender2} (M.L.Matrix_CheckDescender1) (M.L.Matrix_CheckDescender1) {end} {macro:Matrix_CheckDescender1} (M.L.Matrix_CheckDescender0) (M.L.Matrix_CheckDescender0) {end} {macro:Matrix_CheckDescender0} (L.$.Matrix_TerminusL1) $length s7 (L.L.Matrix_RefreshCursor) >= {if} l7 (L.L.Matrix_RefreshCursor) - s7 (L.$.Matrix_TerminusL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "g" $= (L.$.Matrix_TerminusL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "j" $= || (L.$.Matrix_TerminusL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "p" $= || (L.$.Matrix_TerminusL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "q" $= || (L.$.Matrix_TerminusL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "y" $= || {if} 1 (S.L.Matrix_TerminusL1HasDescender) {endif} (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end} 'Das ganze nochmal f?r die untere Zeile {macro:Matrix_CheckDescenderL2} 0 (S.L.Matrix_TerminusL2HasDescender) 1 (S.L.Matrix_RefreshCursor) (M.L.Matrix_CheckDescender3L2) (M.L.Matrix_CheckDescender3L2) (M.L.Matrix_CheckDescender3L2) 0 (S.L.Matrix_RefreshCursor) {end} {macro:Matrix_CheckDescender3L2} (M.L.Matrix_CheckDescender2L2) (M.L.Matrix_CheckDescender2L2) {end} {macro:Matrix_CheckDescender2L2} (M.L.Matrix_CheckDescender1L2) (M.L.Matrix_CheckDescender1L2) {end} {macro:Matrix_CheckDescender1L2} (M.L.Matrix_CheckDescender0L2) (M.L.Matrix_CheckDescender0L2) {end} {macro:Matrix_CheckDescender0L2} (L.$.Matrix_TerminusL2) $length s7 (L.L.Matrix_RefreshCursor) >= {if} l7 (L.L.Matrix_RefreshCursor) - s7 (L.$.Matrix_TerminusL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "g" $= (L.$.Matrix_TerminusL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "j" $= || (L.$.Matrix_TerminusL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "p" $= || (L.$.Matrix_TerminusL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "q" $= || (L.$.Matrix_TerminusL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "y" $= || {if} 1 (S.L.Matrix_TerminusL2HasDescender) {endif} (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end} {macro:Matrix_CheckDescenderRL1} 0 (S.L.Matrix_TerminusRL1HasDescender) 1 (S.L.Matrix_RefreshCursor) (M.L.Matrix_CheckDescenderR3) (M.L.Matrix_CheckDescenderR3) (M.L.Matrix_CheckDescenderR3) 0 (S.L.Matrix_RefreshCursor) {end} {macro:Matrix_CheckDescenderR3} (M.L.Matrix_CheckDescenderR2) (M.L.Matrix_CheckDescenderR2) {end} {macro:Matrix_CheckDescenderR2} (M.L.Matrix_CheckDescenderR1) (M.L.Matrix_CheckDescenderR1) {end} {macro:Matrix_CheckDescenderR1} (M.L.Matrix_CheckDescenderR0) (M.L.Matrix_CheckDescenderR0) {end} {macro:Matrix_CheckDescenderR0} (L.$.Matrix_TerminusRL1) $length s7 (L.L.Matrix_RefreshCursor) >= {if} l7 (L.L.Matrix_RefreshCursor) - s7 (L.$.Matrix_TerminusRL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "g" $= (L.$.Matrix_TerminusRL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "j" $= || (L.$.Matrix_TerminusRL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "p" $= || (L.$.Matrix_TerminusRL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "q" $= || (L.$.Matrix_TerminusRL1) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "y" $= || {if} 1 (S.L.Matrix_TerminusRL1HasDescender) {endif} (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end} 'Das ganze nochmal f?r die untere Zeile {macro:Matrix_CheckDescenderRL2} 0 (S.L.Matrix_TerminusRL2HasDescender) 1 (S.L.Matrix_RefreshCursor) (M.L.Matrix_CheckDescenderR3L2) (M.L.Matrix_CheckDescenderR3L2) (M.L.Matrix_CheckDescenderR3L2) 0 (S.L.Matrix_RefreshCursor) {end} {macro:Matrix_CheckDescenderR3L2} (M.L.Matrix_CheckDescenderR2L2) (M.L.Matrix_CheckDescenderR2L2) {end} {macro:Matrix_CheckDescenderR2L2} (M.L.Matrix_CheckDescenderR1L2) (M.L.Matrix_CheckDescenderR1L2) {end} {macro:Matrix_CheckDescenderR1L2} (M.L.Matrix_CheckDescenderR0L2) (M.L.Matrix_CheckDescenderR0L2) {end} {macro:Matrix_CheckDescenderR0L2} (L.$.Matrix_TerminusRL2) $length s7 (L.L.Matrix_RefreshCursor) >= {if} l7 (L.L.Matrix_RefreshCursor) - s7 (L.$.Matrix_TerminusRL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "g" $= (L.$.Matrix_TerminusRL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "j" $= || (L.$.Matrix_TerminusRL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "p" $= || (L.$.Matrix_TerminusRL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "q" $= || (L.$.Matrix_TerminusRL2) (L.L.Matrix_RefreshCursor) 1 - $cutBegin l7 $cutEnd "y" $= || {if} 1 (S.L.Matrix_TerminusRL2HasDescender) {endif} (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end} {macro:Matrix_Options} (L.L.Matrix_Type_Front) 0 = (L.L.Matrix_Type_Front) 1 = || (L.L.Matrix_Type_Front) 2 = || {if} 126 (S.L.Matrix_Width_Front) 19 (S.L.Matrix_Height_Front) * (S.L.Matrix_HxW_Front) 0 (S.L.Matrix_Res_Front) {endif} (L.L.Matrix_Type_Front) 3 = (L.L.Matrix_Type_Front) 4 = || (L.L.Matrix_Type_Front) 5 = || {if} 112 (S.L.Matrix_Width_Front) 19 (S.L.Matrix_Height_Front) * (S.L.Matrix_HxW_Front) 1 (S.L.Matrix_Res_Front) {endif} (L.L.Matrix_Type_Front) 6 = (L.L.Matrix_Type_Front) 7 = || (L.L.Matrix_Type_Front) 8 = || {if} 112 (S.L.Matrix_Width_Front) 16 (S.L.Matrix_Height_Front) * (S.L.Matrix_HxW_Front) 2 (S.L.Matrix_Res_Front) {endif} (L.L.Matrix_Type_Front) 1 = (L.L.Matrix_Type_Front) 4 = || (L.L.Matrix_Type_Front) 7 = || {if} 1 (S.L.Matrix_LED) 1 (S.L.Matrix_LED_Front) {else} 0 (S.L.Matrix_LED) {endif} (L.L.Matrix_Type_Seite) 1 = (L.L.Matrix_Type_Seite) 4 = || (L.L.Matrix_Type_Seite) 7 = || (L.L.Matrix_Type_Seite) 10 = || {if} 1 (S.L.Matrix_LED) 1 (S.L.Matrix_LED_Seite) {else} 0 (S.L.Matrix_LED) {endif} 'Seite (L.L.Matrix_Type_Seite) 0 = (L.L.Matrix_Type_Seite) 1 = || (L.L.Matrix_Type_Seite) 2 = || {if} 140 (S.L.Matrix_Width_Seite) 19 (S.L.Matrix_Height_Seite) * (S.L.Matrix_HxW_Seite) 0 (S.L.Matrix_Res_Seite) {endif} (L.L.Matrix_Type_Seite) 3 = (L.L.Matrix_Type_Seite) 4 = || (L.L.Matrix_Type_Seite) 5 = || {if} 112 (S.L.Matrix_Width_Seite) 19 (S.L.Matrix_Height_Seite) * (S.L.Matrix_HxW_Seite) 1 (S.L.Matrix_Res_Seite) {endif} '16 zeilig (L.L.Matrix_Type_Seite) 6 = (L.L.Matrix_Type_Seite) 7 = || (L.L.Matrix_Type_Seite) 8 = || {if} 140 (S.L.Matrix_Width_Seite) 16 (S.L.Matrix_Height_Seite) * (S.L.Matrix_HxW_Seite) 2 (S.L.Matrix_Res_Seite) {endif} (L.L.Matrix_Type_Seite) 9 = (L.L.Matrix_Type_Seite) 10 = || (L.L.Matrix_Type_Seite) 11 = || {if} 112 (S.L.Matrix_Width_Seite) 16 (S.L.Matrix_Height_Seite) * (S.L.Matrix_HxW_Seite) 3 (S.L.Matrix_Res_Seite) {endif} (L.L.Matrix_Type_Seite) s6 l6 0 = l6 3 = || {if} 0 s7 {endif} l6 1 = l6 4 = || {if} 1 s7 {endif} l6 2 = l6 5 = || {if} 2 s7 {endif} l6 6 = l6 9 = || {if} 3 s7 {endif} l6 7 = l6 10 = || {if} 4 s7 {endif} l6 8 = l6 11 = || {if} 5 s7 {endif} l7 (S.L.Matrix_Type_Heck) 'Setzen der LED Farbe bei der BS310 (orange oder weiss) "BUSE_BROSE\" (L.L.Matrix_LED_Color) 0 = {if} "BUSE_LED_voll" {endif} (L.L.Matrix_LED_Color) 1 = {if} "BUSE_LED_voll_white" {endif} (L.L.Matrix_LED_Color) 2 = {if} "BUSE_LED_voll_green" {endif} $+ ".dds" $+ (S.$.BS310_Color) 'Kleiner Abschnitt vom Konfigurationszeddel (L.L.Matrix_DescenderStyle) 0 = {if} "BUSE_BROSE\checkbox_off" {else} "BUSE_BROSE\checkbox_on" {endif} ".dds" $+ (S.$.Checkbox_DescStyle) (L.L.Matrix_Pixelabstand) 0 = {if} "BUSE_BROSE\checkbox_off" {else} "BUSE_BROSE\checkbox_on" {endif} ".dds" $+ (S.$.Checkbox_Pixelabstand) (L.L.Matrix_Type_Front) $IntToStr (S.$.Nr_Matrix_Type_Front) (L.L.Matrix_Type_Seite) $IntToStr (S.$.Nr_Matrix_Type_Seite) (L.L.Matrix_BS210_LED) $IntToStr (S.$.Nr_Matrix_BS210_LED) (L.L.Matrix_LED_Color) $IntToStr (S.$.Nr_Matrix_BS310_LED) 1 (S.L.Refresh_Strings) {end} {macro:Matrix_PrintBitmap} 0 (S.L.Matrix_RefreshCursor) (L.L.Matrix_Modul) 0 = {if} (L.L.Matrix_Res_Front) 0 = {if} 0 s0 ' Linie: 532 Pixel -> 1000010100 -> 2, 4, 9 (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel4) ' Ziel: 1862 -> 11101000110 -> 1, 2, 6, 8, 9, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel64) (M.L.Matrix_PrintBitmapPixel4) {endif} (L.L.Matrix_Res_Front) 1 = {if} 0 s0 ' Linie: 532 Pixel -> 1000010100 -> 2, 4, 9 (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel4) ' Ziel: 1596 -> 11000111100 -> 2, 3, 4, 5, 9, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel32) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel8) (M.L.Matrix_PrintBitmapPixel4) {endif} (L.L.Matrix_Res_Front) 2 = {if} 0 s0 ' Linie: 448 Pixel -> 111000000 -> 6, 7, 8 (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel128) (M.L.Matrix_PrintBitmapPixel64) ' Ziel: 1344 -> 10101011000 -> 3, 4, 6, 8, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel64) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel8) {endif} {endif} (L.L.Matrix_Modul) 1 = {if} (L.L.Matrix_Res_Seite) 0 = {if} 1 s0 ' Linie: 532 Pixel -> 1000010100 -> 2, 4, 9 (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel4) ' Seite: 2128 -> 100001110000 -> 4, 5, 6, 11 (M.L.Matrix_PrintBitmapPixel2048) (M.L.Matrix_PrintBitmapPixel64) (M.L.Matrix_PrintBitmapPixel32) (M.L.Matrix_PrintBitmapPixel16) {endif} (L.L.Matrix_Res_Seite) 1 = {if} 1 s0 ' Linie: 532 Pixel -> 1000010100 -> 2, 4, 9 (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel4) ' Seite: 1596 -> 11000111100 -> 2, 3, 4, 5, 9, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel32) (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel8) (M.L.Matrix_PrintBitmapPixel4) {endif} (L.L.Matrix_Res_Seite) 2 = {if} 1 s0 ' Linie: 448 Pixel -> 111000000 -> 6, 7, 8 (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel128) (M.L.Matrix_PrintBitmapPixel64) ' Seite: 1792 -> 11100000000 -> 8, 9, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel256) {endif} (L.L.Matrix_Res_Seite) 3 = {if} ' Linie: 448 Pixel -> 111000000 -> 6, 7, 8 (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel128) (M.L.Matrix_PrintBitmapPixel64) ' Seite: 1344 Pixel -> 10101000000 -> 6, 8, 10 (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel64) {endif} {endif} {end} {macro:Matrix_PrintBitmapPixel2048} (M.L.Matrix_PrintBitmapPixel1024) (M.L.Matrix_PrintBitmapPixel1024) {end} {macro:Matrix_PrintBitmapPixel1024} (M.L.Matrix_PrintBitmapPixel512) (M.L.Matrix_PrintBitmapPixel512) {end} {macro:Matrix_PrintBitmapPixel512} (M.L.Matrix_PrintBitmapPixel256) (M.L.Matrix_PrintBitmapPixel256) {end} {macro:Matrix_PrintBitmapPixel256} (M.L.Matrix_PrintBitmapPixel128) (M.L.Matrix_PrintBitmapPixel128) {end} {macro:Matrix_PrintBitmapPixel128} (M.L.Matrix_PrintBitmapPixel64) (M.L.Matrix_PrintBitmapPixel64) {end} {macro:Matrix_PrintBitmapPixel64} (M.L.Matrix_PrintBitmapPixel32) (M.L.Matrix_PrintBitmapPixel32) {end} {macro:Matrix_PrintBitmapPixel32} (M.L.Matrix_PrintBitmapPixel16) (M.L.Matrix_PrintBitmapPixel16) {end} {macro:Matrix_PrintBitmapPixel16} (M.L.Matrix_PrintBitmapPixel8) (M.L.Matrix_PrintBitmapPixel8) {end} {macro:Matrix_PrintBitmapPixel8} (M.L.Matrix_PrintBitmapPixel4) (M.L.Matrix_PrintBitmapPixel4) {end} {macro:Matrix_PrintBitmapPixel4} (M.L.Matrix_PrintBitmapPixel2) (M.L.Matrix_PrintBitmapPixel2) {end} {macro:Matrix_PrintBitmapPixel2} (M.L.Matrix_PixelRefresh) (M.L.Matrix_PixelRefresh) {end} {macro:Matrix_PixelRefresh} l0 0 = {if} (L.L.Matrix_Height_Front) (S.L.Matrix_Height_act) (L.L.Matrix_HxW_Front) (S.L.Matrix_HxW_act) {endif} l0 1 = {if} (L.L.Matrix_Height_Seite) (S.L.Matrix_Height_act) (L.L.Matrix_HxW_Seite) (S.L.Matrix_HxW_act) {endif} (L.L.Matrix_RefreshCursor) (L.L.Matrix_HxW_Front) >= (L.L.Matrix_RefreshCursor) (L.L.Matrix_HxW_Seite) >= && (L.L.Matrix_RefreshCursor) 0 < || {if} (L.L.IBIS_Linie_Suffix) 99 = {if} (L.L.Matrix_Testcolor) ! (S.L.Matrix_Testcolor) 0 {else} -1 {endif} (S.L.Matrix_RefreshCursor) {else} 'X und Y berechnen: 'l0: Ebene (vorne/Seite) 'l1: X 'l2: Y (L.L.Matrix_RefreshCursor) (L.L.Matrix_HxW_act) % (L.L.Matrix_Height_act) / trunc s1 (L.L.Matrix_RefreshCursor) (L.L.Matrix_HxW_act) % (L.L.Matrix_Height_act) % s2 'Fehlerpixel berechnen: (L.L.Matrix_RefreshCursor) (M.V.NrSpecRandom) 2 * (L.L.Matrix_Fehlerpixel) / 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: (L.L.Matrix_Height_act) 19 = {if} 0 l1 l2 l0 19 * + (M.V.STReadPixel) {else} 0 l1 l2 l0 22 * + (M.V.STReadPixel) {endif} 0 (M.V.STGetR) s7 '?berpr?fe ob nur das Zielfeld betroffen ist oder die Komplette Anzeige (L.L.lE90) 1 = {if} ' Wurde am IBIS lE90 ausgew?hlt, dann das Linienfeld auf der Frontanzeige mit invertieren. Seite nicht, da abgesetzte Linie ist. l0 0 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL1) && && && l0 0 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL2) && && && || l1 0 >= && l0 1 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL1) && && && l0 1 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL2) && && && || l1 28 >= && || {else} ' Ansonsten das Linienfeld nicht invertieren l0 0 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL1) && && && l0 0 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL2) && && && || l1 28 >= && l0 1 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL1) && && && l0 1 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL2) && && && || l1 28 >= && || {endif} {if} l7 255 = {if} 0 s7 {else} 255 s7 {endif} {endif} ' Soll bei bestimmte Liniendarstellung das Linienfeld invertieren? l0 0 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL) && && && l0 0 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL) && && && || l1 27 <= && l0 1 = l2 0 >= l2 10 <= (L.L.Matrix_InvertL) && && && l0 1 = l2 11 >= l2 18 <= (L.L.Matrix_InvertL) && && && || l1 27 <= && || {if} l7 255 = {if} 0 s7 {else} 255 s7 {endif} {endif} {endif} {endif} {endif} 1 l7 255 255 255 (M.V.STSetColor) 'Pixel zeichnen: (L.L.Matrix_Height_act) 19 = {if} 19 s6 {endif} (L.L.Matrix_Height_act) 16 = {if} 22 s6 {endif} 1 l1 (C.L.Matrix_PixelFactor) * s4 l2 l0 l6 * + (C.L.Matrix_PixelFactor) * s5 l4 (C.L.Matrix_PixelFactor) + 2 - l5 (C.L.Matrix_PixelFactor) + 2 - (M.V.STDrawRect) 'Cursor verschieben: (L.L.Matrix_RefreshCursor) 1 + (S.L.Matrix_RefreshCursor) {endif} {end}