wantonman
2012-12-10 20:09:35
hey guys here i have an example that doesnt work… this is my basic script but theres an issue, i thought it was scar but its not working even in simba…
here ill try to elaborate as much as possible
here ill try to elaborate as much as possible
var
buf,img,xpos,ypos:integer;
procedure procedure2(pos,int:integer); //rite here... the int as you can
begin //see , okay well the calculation
pos:=int //does not happen, i can supply
FastDrawTransparent(xpos,ypos,img,buf) //more examples but if you
DrawBitmapDebugImg(buf) //writeln(pos)somewhere in there
end; //you can see nothing happens...
function function1:integer;
var
i:integer;
begin
for i:=37 to 40 do
begin
if IsKeyDown(i)then
result:=i;
end;
end;
procedure procedure1;
begin
case function1 of
37:begin
writeln('1')
procedure2(xpos,xpos-1)
end;
38:begin
writeln('2')
procedure2(ypos,ypos-1)
end;
39:begin
writeln('3')
procedure2(xpos,xpos+1)
end;
40:begin
writeln('4')
procedure2(ypos,ypos-1)
end;
end;
end;
begin
img:=BitmapFromString(10,10,'')
buf:=CreateBitmap(300,300)
FastDrawClear(img,255)
xpos:=150
ypos:=150
displaydebugimgwindow(300,300)
procedure2(xpos,xpos+0)
repeat
procedure1
until IsKeyDown(27)
end.