Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
34
Task/Animation/FreeBASIC/animation.freebasic
Normal file
34
Task/Animation/FreeBASIC/animation.freebasic
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
DIM C AS STRING = "Hello World! ", SIZE AS USHORT = LEN(C)
|
||||
DIM DIRECTION AS BYTE = 0
|
||||
DIM AS INTEGER X, Y, BTNS
|
||||
DIM BUTHELD AS BYTE = 0
|
||||
|
||||
SCREEN 12
|
||||
|
||||
DO
|
||||
LOCATE 1, 1
|
||||
PRINT C
|
||||
|
||||
GETMOUSE X, Y, , BTNS
|
||||
|
||||
IF BTNS <> 0 THEN
|
||||
IF BUTHELD = 0 THEN 'remember if it was pressed, to not react
|
||||
BUTHELD = 1 'every frame on the mouse being just held
|
||||
IF (X >= 0 AND X < SIZE * 8) AND (Y >= 0 AND Y < 16) THEN
|
||||
DIRECTION = 1 - DIRECTION
|
||||
END IF
|
||||
END IF
|
||||
ELSE
|
||||
BUTHELD = 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