DQBpPut
SUB

Prototype

DECLARE SUB DQBpPut (BYVAL Layer, BYVAL x, BYVAL y, BYVAL SpriteSeg,
                     BYVAL SpriteOff, BYVAL Pattern)

Parameters

Layer - Layer where to draw the sprite

x - X position of upper left corner of the sprite

y - Y position of upper left corner of the sprite

SpriteSeg - Segment of the array holding the sprite data; use VARSEG

SpriteOff - Offset of the array holding the sprite data; use VARPTR

Pattern - Bit pattern (see below)

Returns

none

Description

Draw a sprite as DQBput, but uses a specified 8-bit pattern to determine which pixel is to be drawn or not. So if the pattern looks like 01010101 (number 85 in decimal format), one pixel will be drawn, and the next one will be skipped, then the process begins again. The pattern wraps until the end of each sprite line, and on every new line it's xored by 255: this means that the same example pattern will look like 10101010 on the second sprite line, and again as 01010101 on the third, etc...

Notes:

By alternating the bit-pattern and drawing sprites quickly using this function, you can achieve translucency-like effects, but without the need of a blender map. Use it wisely!