Sprite Picture driver for PROforma

This is a small picture driver for Proforma. It allows you to load and display normal Pointer Environment sprites. This can be used to display sprites in the Prowess "loose_menu" types.

The sprites to be displayed are normal Pointer Environment sprites. They must be mode 4 sprites, else drawing will go VERY wrong. The driver itself does NOT check this when a sprite is passed to it - but you CAN ask the driver to see whether it recognizes something as a valid sprite, using the normal PROforma function for this. In that case, it will refuse a mode 8 sprite.

As is usual with PROforma picture driver, when you pass the sprite to the driver, it must be preceded by a 'FileInfo' header, which YOUR application must build. Within that header, the name of the sprite must end in "_sp4", else the driver will not recognize this as a valid sprite, if asked.

There is an example sprite file called 'example_sp4': You can see how this is displayed by making the following HTML file:

img src="example_sp4"

with the angular brackets around this, of course. The ProWesS reader will then load the file, make the FileInfo header, and display the sprite correctly (as it hopefully has done above - if not, put the example_sp4 file in the same directory as this html file, and load it again).

From this example, you can also see the main disadvantage of using sprites: the "pixels" just get bigger as the sprite gets bigger. This would not happen (I think) if the icon was drawn with Proforma commands. However, as you can see from the SBasic example program, this is not always very important, since most sprites will be used for loose items, who rarely change size.

If you want to display sprites other than in the ProWesS loose_menu item type, then you can do it in three ways:

PFPictureDisplay
. If you use this, then the sprite will be drawn so that the xsize of the sprite totally fills the xsiz and the ysiz, which are two of the parameters of this function. This means that the sprite may be distorted compared to what it would be under the Pointer Environment.
SprDraw
This is a support routine for sprite drawing in 'C'. It is contained in the sprdraw_rel file, which should be linked with your program if you use it. it defines the following function:

Error SprDraw(Gstate gstate, char *sprite).

This will make sure that the sprite's aspect ratio is kept constant. The sprite will fill out the current Pagebox as much as possible (provided that the aspect ratio does stay constant).


W. Lenerz 6, rue Daunou 77340 Pontault-Combault (France)

last edited 1996 Nov 14 (wl)