Ok, here it is again.
Thanks
REM ********************
REM Invader type game
REM ********************
REM *** variables ***
DIM xpos(10)
DIM ypos(10)
REM *** initialize screen ***
HIDE MOUSE
SYNC ON
SYNC RATE 150
REM *** load game graphics ***
LOAD BITMAP "D:\bmp\invaders.bmp", 31
LOAD BITMAP "D:\bmp\ship.bmp", 30
GET IMAGE 1, 0, 0, 29, 29
REM *** Main Program Loop ***
DO
row1
row2
ship
ControllerHandler()
SYNC
LOOP
REM *** functions ***
FUNCTION row1
REM create row 1
FOR N = 1 TO 10
REM create bitmap and copy image from source
CREATE BITMAP N, 30, 30
COPY BITMAP 31, 0, 0, 29, 29, N, 0, 0, 29, 29
REM set the starting bitmap position
xpos = 80
ypos = 50
NEXT N
REM draw row 1
FOR N = 1 to 10
REM draw bitmaps
COPY BITMAP N, 0, 0, 29, 29, 0, xpos, ypos, xpos+29, ypos+29
xpos = xpos + 45
NEXT N
ENDFUNCTION
FUNCTION row2
REM create row 2
FOR N = 1 TO 10
REM create bitmap and copy image from source
CREATE BITMAP N, 30, 30
COPY BITMAP 31, 30, 0, 59, 29, N, 0, 0, 29, 29
REM set the starting bitmap position
xpos = 80
ypos = 90
NEXT N
REM draw row 2
FOR N = 1 to 10
REM draw bitmaps
COPY BITMAP N, 0, 0, 29, 29, 0, xpos, ypos, xpos+29, ypos+29
xpos = xpos + 45
NEXT N
ENDFUNCTION
REM Add more invaders later
FUNCTION ship
REM set the mouse cursor sprite
SPRITE 1,320,430,1
SET SPRITE 1,1,1
ENDFUNCTION
FUNCTION ControllerHandler()
SPRITE 1, MOUSEX(), MOUSEY(), 1
ENDFUNCTION