The reason it doesn't work is your code is a bit dodgy!
POINT returns a DWORD value. Depending on graphics card and resolution and depth, the value of black is different. You need to use RGBR, RGBG and RGBB to work out if it is black.
Here is modified code that works like a dream on my pc.
POINT is a fairly slow command and so using it twice in same command is a bad idea. Better to store in a variable (which has been defined as a DWORD), and then use the variable (I have used 'col').
Rem Project: Bombardier Wars
Rem Created: 8/23/2004 6:31:35 PM
Rem ***** Main Source File *****
sync on
sync rate 0
rem load image "media/levels/testlevel.bmp",3
load image "media/levels/testlevel.bmp",1
load image "media/backround1.bmp",2
type terraintype
exist as integer
color as dword
endtype
global dim terrain(640,480) as terraintype
type explosiontype
x as integer
y as integer
radius as integer
power as integer
exist as integer
endtype
global explosion as explosiontype
type backroundtype
x as integer
y as integer
color as dword
endtype
col as dword
global dim back(640,480) as backroundtype
global hold=0
global updateterrain=0
paste image 1,0,0
sync
lock pixels
for x=1 to 640
for y=21 to 480
col=point(x,y)
if rgbr(col)+rgbg(col)+rgbb(col) > 0
terrain(x,y).color=col
terrain(x,y).exist=1
endif
next y
next x
unlock pixels
paste image 2,0,0
sync
lock pixels
for x=1 to 640
for y=21 to 480
col=point(x,y)
if rgbr(col)+rgbg(col)+rgbb(col) > 0
back(x,y).color=col
endif
next y
next x
unlock pixels
do
paste image 2,0,0
lock pixels
update_explosions()
update_terrain()
if scancode()>1 and scancode()<12
explosion.radius=(scancode()-1)*3
endif
sync
loop
function update_terrain()
if explosion.exist=1
for x=(explosion.x-(explosion.radius)) to (explosion.x+(explosion.radius))
for y=(explosion.y-(explosion.radius)) to (explosion.y+(explosion.radius))
if terrain(x,y).exist=1
if sqrt(((x-explosion.x)^2)+((y-explosion.y)^2))<explosion.radius
terrain(x,y).exist=0
dot x,y,back(x,y).color
endif
endif
next y
next x
explosion.exist=0
repeat
action=0
for x=(explosion.x-explosion.radius) to (explosion.x+explosion.radius)
for y=(explosion.y+explosion.radius) to 21 step -1
if terrain(x,y).exist=1
if terrain(x,y+1).exist=0 and (y+1)<(481)
terrain(x,y).exist=0
dot x,y,back(x,y).color
terrain(x,y+1).exist=1
terrain(x,y+1).color=terrain(x,y).color
action=1
endif
endif
next y
next x
if action=0 then done=1
if action=1
for x=1 to 640
for y=21 to 480
if terrain(x,y).exist=1
dot x,y,terrain(x,y).color
endif
next y
next x
unlock pixels
sync
lock pixels
endif
until done=1
done=0
action=0
endif
for x=1 to 640
for y=21 to 480
if terrain(x,y).exist=1
dot x,y,terrain(x,y).color
endif
next y
next x
unlock pixels
endfunction
function update_explosions()
if mouseclick()=1 and hold=0
explosion.exist=1
explosion.power=5
explosion.radius=40
explosion.x=mousex()
explosion.y=mousey()
hold=1
endif
if mouseclick()=0 then hold=0
endfunction
Boo!