It saves now, but the last 38 pixels get erased to black. That is, the last 6 pixels of the 2nd to last row and the entire last row. Here's the new code:
Code: Select all
DIM TileL(1 To 1024)
' Set segment to the array TileL's segment and load
' the graphic file into TileL.
BLOAD File$, @TileL(1) 'Load the picture
PUT (554, 60), TileL(1) 'Put the picture on screen
FOR Y = 0 TO 31 'Get the picture into an array
FOR X = 0 TO 31
Tile(X, Y) = POINT(554 + X, 60 + Y)
NEXT X
NEXT Y
DrawScreen 'Main program screen
The DrawScreen at the end is the function that draws my main screen (including the picture which gets put into an array).
Code: Select all
DIM TileS(1 TO 1024)
DrawScreen 'Draw the picture to the screen
GET (554, 60)-(586, 92), TileS(1) 'Grab the picture off the screen
' Set segment to the array TileS's segment and store the drawing
' in the file SAMPLE.BMP. Note: 4096 is the number of bytes
' in TileS (4 bytes per array element * 1024).
BSAVE File$, @TileS(1), ubound(TileS)-lbound(TileS)*len(TileS(lbound(TileS))) 'Save the file
PRINT
COLOR 15
PRINT "Saved." 'Print success
WHILE INKEY$ = "": WEND
LOCATE 1, 4
PRINT " " 'Erase message (doesn't seem to work)
Again, DrawScreen draws the main screen, including the picture, so I can GET it into TileS().
-Ninja Bob