Page 1 of 1

Dot Flag

Posted: Thu Feb 19, 2015 1:22 am
by DrChip
REM Dot Flag v.5
REM iPhone 6 Plus / 8.3 b1
' I stink at mapping the dots below.
' please post your creations.
' you can adjust x/y grid and make
' your own creation. Enjoy!

graphics
sw=screen_width()
sh=screen_height()
pi=3.1415

'read the object
DIM b(20, 20)
FOR y = 1 TO 13
FOR x = 1 TO 8
READ b(x, y)
NEXT x
NEXT y

loop:
refresh off
graphics clear 0,0,0
FOR i = 0 TO 15
mm1 = mm1 + 0.001
s1 = SIN(mm1) * 32
fill COLOR (i * 4 + s1)/255, (i * 2 + 32)/255, (s1 + 64)/255
fill RECT 0, (i * 32) to sw, (i * 32 + 32)
NEXT i

FOR y = 1 TO 13
FOR x = 1 TO 8
mm2 = mm2 + 0.05
s2 = SIN(mm2) * 16
xx = ((x * 32) + s2) + sw/32
yy = ((y * 32) + s2) + sh/32
IF b(x, y) = 1 THEN
fill COLOR (x * 32 + y)/255, (x * 32 + y)/255, 0
end if
IF b(x, y) = 2 THEN
fill COLOR 0, 0, (x * 32 + 64 + y)/255
end if
IF b(x, y) = 3 THEN
fill COLOR (x * 16 + 64 + y)/255, 0, 0
END IF
IF b(x, y) > 0 THEN
fill RECT (xx - 8), (yy - 8) to (xx + 8), (yy + 8)
END IF
NEXT x
NEXT y
pause .1
refresh on
GOTO loop

obj:
'3
DATA 3, 3, 3, 3, 1, 0, 1, 1 '1
DATA 3, 0, 3, 3, 1, 1, 0, 1 '2
DATA 3, 3, 0, 3, 2, 2, 2, 2 '3
DATA 1, 1, 1, 0, 0, 0, 2, 0 '4
DATA 0, 1, 0, 1, 2, 2, 2, 2 '5
DATA 1, 1 ,1, 0, 1, 1, 1, 0 '6
DATA 3, 0, 3, 3, 1, 1, 1, 1 '7
DATA 3, 3, 0, 3, 3, 3, 3, 3 '8
DATA 1, 1, 0, 1, 0, 3, 0, 3 '9
DATA 0, 3, 3, 0, 3, 0, 3, 3 '10
DATA 3, 0, 0, 3, 0, 0, 0, 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