[r3]: / trunk / RetroGames / Pong / CustomFunctionBlocks / POU_INCREMENT_LIMIT / svnobj  Maximize  Restore  History

Download this file

12 lines (11 with data), 3.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
IF (xSetup OR iIncr <> iIncr_Old) THEN
	iY_Old := iY_In;
	iY_Out := iHeight / 2 - 50;
	xSetup := FALSE;
END_IF
IF (iY_In > iY_Old) THEN
	iY_Out := iY_Out + (iY_In - iY_Old)*iIncr;
	iY_Out : INT := iHeight/2 -50; // 50 is half the size of the boards
VAR
	iY_Old : INT := iY_In;
	iIncr_Old : INT;