09-08-2005, 07:01 AM
For some reason when i run this code and then press escape at the end it freezes and i have to go into task manager to quit the prog.
Code:
xlmt=100
ylmt=63
dim pic(xlmt*ylmt)
dim prev(xlmt*ylmt)
screen 18,32
paint (0,0),&HFF00FF 'mask color for direct color mode
bload "c:\freebasic\test2.bmp"
get (1,1)-(xlmt,ylmt),pic
cls
bload "C:\freebasic\test.bmp"
xlmt=int(xlmt)/2:ylmt=int(ylmt/2)
x=xlmt:y=ylmt
get (x-xlmt,y-ylmt)-(x+xlmt,y+ylmt),prev
do
a$=inkey$
if x-xlmt<=0 then xchg=1
if x+xlmt>=640 then xchg=-1
if y-ylmt<=0 then ychg=1
if y+ylmt>=480 then ychg=-1
put (x-xlmt,y-ylmt),prev,trans
x=x+xchg
y=y+ychg
get (x-xlmt,y-ylmt)-(x+xlmt,y+ylmt),prev
put(x-xlmt,y-ylmt),pic,trans
sleep 10
loop until a$=chr$(27)
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless