'##############
'Terminus Script
'##############

'Controls Roller Blind Displays

'(c) 15.07.2012 Rüdiger Hülsmann

'Script Version: 1.0
'Omsi release: 2.0

'Needs:
'- none

'Revision History:
'- Rüdiger Hülsmann	15.07.2012	Erstellt
'- M+R			18.07.2012	Aus Fallblatt hergeleitet


'--------------------------------------------------------------------------------


{trigger:ai_scheduled_settarget}

	(L.L.AI_target_index) (S.L.target_index_int) (S.L.Rollband_soll)
{end}



{macro:Rollband_Frame}



	(L.L.Rollband_soll) (L.L.Rollband_ist) = !
	{if}
		(L.L.Rollband_soll) (L.L.Rollband_ist) > 2 * 1 - s0

		(L.L.Rollband_pos_aktu) (L.S.Timegap) 1 * + (S.L.Rollband_pos_aktu)
		1.0 >
		{if}
			0 (S.L.Rollband_pos_aktu)
			(L.L.Rollband_ist) 1 + (S.L.Rollband_ist)
			(M.L.Rollband_TexLoad)
		{else}
			0.0 <
			{if}
				1 (S.L.Rollband_pos_aktu)
				(L.L.Rollband_ist) 1 - (S.L.Rollband_ist)
				(M.L.Rollband_TexLoad)
			{endif}
		{endif}

		(L.L.Rollband_pos_aktu) (S.L.Debug_5) 1 - (S.L.Rollband_pos_neu)
	{endif}
{end}

{macro:Rollband_TexLoad}
	"..\..\Anzeigen\A3\" (L.L.Rollband_ist) 2 (M.V.GetTerminusString) $+ (S.$.Rollband_aktu)
	"..\..\Anzeigen\A3\" (L.L.Rollband_ist) 1 + 2 (M.V.GetTerminusString) $+ (S.$.Rollband_neu)
{end}