Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
33
Task/Animation/FreeBASIC/animation.basic
Normal file
33
Task/Animation/FreeBASIC/animation.basic
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
DIM C AS STRING = "Hello World! ", SIZE AS USHORT = LEN(C)
|
||||
DIM DIRECTION AS BYTE = 0
|
||||
DIM AS INTEGER X, Y, BTNS
|
||||
DIM HELD AS BYTE = 0
|
||||
|
||||
SCREEN 19
|
||||
|
||||
DO
|
||||
LOCATE 1, 1
|
||||
PRINT C
|
||||
|
||||
GETMOUSE X, Y, , BTNS
|
||||
|
||||
IF BTNS <> 0 AND HELD = 0 THEN
|
||||
'remember if it was pressed, to not react every frame
|
||||
HELD = 1
|
||||
IF X >= 0 AND X < SIZE * 8 AND Y >= 0 AND Y < 16 THEN
|
||||
DIRECTION = 1 - DIRECTION
|
||||
END IF
|
||||
ELSE
|
||||
HELD = 0
|
||||
END IF
|
||||
|
||||
IF INKEY = CHR(255) + CHR(107) THEN EXIT DO
|
||||
|
||||
IF DIRECTION = 0 THEN
|
||||
C = RIGHT(C, 1) + LEFT(C, SIZE - 1)
|
||||
ELSE
|
||||
C = RIGHT(C, SIZE - 1) + LEFT(C, 1)
|
||||
END IF
|
||||
|
||||
SLEEP 100, 1
|
||||
LOOP
|
||||
Loading…
Add table
Add a link
Reference in a new issue