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:
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).
last edited 1996 Nov 14 (wl)