Loading & Drawing BSV files in QBasicThe following is a subroutine from the file BLD.BAS that automatically dimensions an integer (2 byte per element) array to the correct size, by looking at the length of the BSV file (in bytes) and removing the 7-byte BSV header information (see Appendix: the QBasic BSV format). It then loads the BSV file using the normal method. 'Note: the
'$DYNAMIC meta-instruction is needed in main program The array can then be drawn on the screen using the QBasic PUT command, or drawn transparently (using color 0) with the following code: DEFINT A-Z SUB gPUT (i(), ix,
iy) For more information about drawing BSV images, see www.qb45.com If the BSV file was generated using a different palette file than the default screen 13h one, then see the loading PAL files page. BSV Babel is copyright Trelsoft freeware. |