View.Set ("position:centre;centre,graphics:750;500,offscreenonly")
colorback (black)
cls
% This controls maple
var x:int:=0
var y:int:=0
var charr1:array char of boolean
var rr1:int
var bg2:int
procedure DN1
View.Set ("offscreenonly")
% Maple goes right
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_RIGHT_ARROW) then
cls
x:=x+5
rr1:=Pic.FileNew ("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
delay (10)
View.Update
end if
% Maple goes up
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_UP_ARROW) then
cls
y:=y+5
rr1:=Pic.FileNew ("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
delay (10)
View.Update
end if
% Maple goes up
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_DOWN_ARROW) then
cls
y:=y-5
rr1:=Pic.FileNew ("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
delay (10)
View.Update
end if
% Maple goes left
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_LEFT_ARROW) then
cls
x:=x-5
rr1:=Pic.FileNew ("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
delay (10)
View.Update
end if
% Maple punches
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_ENTER) then
cls
rr1:=Pic.FileNew("Punch.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
View.Update
delay (100)
cls
rr1:=Pic.FileNew("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
View.Update
end if
% Maple points
Input.KeyDown (charr1)
locate (4,1)
if charr1 (KEY_BACKSPACE) then
cls
rr1:=Pic.FileNew("point.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
View.Update
delay (100)
cls
rr1:=Pic.FileNew("stance.bmp")
Pic.Draw(rr1,x,y,picMerge)
Pic.Free(rr1)
View.Update
end if
end DN1
loop
DN1
end loop
%end of maple control
|