DECLARE SUB DQBget (BYVAL Layer, BYVAL x1, BYVAL y1, BYVAL x2, BYVAL y2,
BYVAL SpriteSeg, BYVAL SpriteOff)
Layer - Layer where to get the sprite
x1 - Upper left corner x coordinate
y1 - Upper left corner y coordinate
x2 - Lower right corner x coordinate
y2 - Lower right corner y coordinate
SpriteSeg - Segment of the array where to store the sprite; use VARSEG
SpriteOff - Offset of the array where to store the sprite; use VARPTR
none
Gets a sprite from the given layer in the box (x1,y1)-(x2,y2) and places the data into specified array. Array must be dimensioned as (((Width*Height)*2)+4) INTEGERs; you can use the DQBsize function and divide the result by 2 to retrieve the size of your array without worring about this formula. Sprites get with DQBget can be then used by DQBput to create animations.
DQBget is not affected by the clipping box. Also, it must be x1<x2 and y1<y2. This routine is optimized if your sprite width is a multiple of 4 or 2. Several sprites can be stored into the same array; just pass the sprite with a different index. In addition, the format of DQBget and DQBput is compatible with the one of GET and PUT, so you can use them with the same sprite arrays. See also DQBfPut, DQBsPut, DQBrPut and DQBbPut
See DQBput example