DQBsize
FUNCTION

Prototype

DECLARE FUNCTION DQBsize (BYVAL x1, BYVAL y1, BYVAL x2, BYVAL y2)

Parameters

x1 - Upper left corner x coordinate

y1 - Upper left corner y coordinate

x2 - Lower right corner x coordinate

y2 - Lower right corner y coordinate

Returns

An INTEGER value holding the sprite size in bytes

Description

DQBsize returns the number of bytes needed to store the image contained into the box given by (x1,y1)-(x2,y2) with DQBget. This value can be then used to dimension arrays to store the sprite data for the DQBget and DQBput routines. Remember that the array is made of INTEGERs while this function returns the number of bytes; just divide its result by 2 to obtain the array dimension.

Notes:

This function can be useful when storing several sprites into the same array, to know the exact offset of each frame.

Example

See DQBput example