Post by Admin on Apr 13, 2020 14:12:52 GMT
This is for testing on cross platform but at the moment only works properly on BBC Basic For Windows.
When it works on a specific BBCSDL platform, I will mention the platform on a list HERE:
When it works on a specific BBCSDL platform, I will mention the platform on a list HERE:
MODE 8
REM lets construct the arrow interface color test:
REM resetrgb is not necessary unless you are working with palettes
REM it will be a part of things later and will be very necessary when mixing base colors and palettes
PROCresetrgb
r=0:xx=0:yy=0
xx=100:yy=100
REPEAT
REM (x,y,angle,color)
PROCarrow(xx,110,90,RND(15))
PROCarrow(110,yy,270,RND(15))
PROCarrow(110,yy+10,0,RND(15))
PROCarrow(100,yy,180,RND(15))
UNTIL FALSE
END
DEF PROCarrow(x,y,angle,c)
PROCt("x",x):PROCt("y",y)
REM PROCt("m",100)
PROCt("a",angle)
PROCt("d",1)
PROCt("c",15)
PROCt("f",25)
PROCt("r",90)
PROCt("f",5)
PROCt("l",135)
PROCt("f",25)
PROCt("l",90)
PROCt("f",25)
PROCt("l",135)
PROCt("f",5)
PROCt("r",90)
PROCt("f",25)
PROCt("l",90)
PROCt("f",25)
PROCt("l",98)
PROCt("u",0)
PROCt("f",15)
REM PROCt("d",0)
PROCt("p",c)
ENDPROC
DEFPROCt(mess$,amt)
PRIVATE angle,x,y,pen$,dracol,sz
IF sz<1 THEN sz=1
GCOL dracol
IF pen$="" THEN pen$="down"
IF mess$="a" THEN angle=amt
IF mess$= "r" THEN angle=angle - amt
IF mess$= "l" THEN angle=angle + amt
IF mess$= "f" THEN VDU 23,23,sz|:PROC_turtle(amt,angle,pen$,x,y)
IF mess$= "u" THEN pen$="up"
IF mess$= "d" THEN pen$="down"
IF mess$= "p" THEN
GCOL 128+POINT(x,y)
GCOL amt:FILL x,y
ENDIF
IF mess$= "c" THEN IF amt=16 THEN amt=0
IF mess$= "c" THEN GCOL amt:dracol=amt
IF mess$= "s" THEN sz=amt
VDU 23,23,sz|
IF mess$= "m" THEN
x=amt:y=amt
pen$="move"
ENDIF
IF mess$="x" THEN x=amt:pen$="move"
IF mess$="y" THEN y=amt: pen$="move"
PROC_turtle(0,angle,pen$,x,y)
ENDPROC
DEFPROC_turtle(coun,angle,pen$,RETURN x,RETURN y)
PRIVATE sx,sy
IF pen$="move" THEN sx=x:sy=y
IF pen$="up" OR pen$="down" THEN
sx+=coun*COS(RAD(angle))
sy+=coun*SIN(RAD(angle))
IF pen$="down" THEN LINE x,y,sx,sy
ENDIF
x=sx:y=sy
ENDPROC
DEFPROCresetrgb
COLOUR 0,0,0,0 :COLOUR 1,200,0,0 :COLOUR 2,000,200,000
COLOUR 3,200,200,000:COLOUR 4,000,000,200:COLOUR 5,200,000,200
COLOUR 6,000,200,200:COLOUR 7,200,200,200:COLOUR 8,056,056,056
COLOUR 9,248,056,056:COLOUR 10,056,248,056:COLOUR 11,248,248,056
COLOUR 12,056,056,248:COLOUR 13,248,056,248:COLOUR 14,056,248,248
COLOUR 15,248,248,248
ENDPROC