Back to Contents Previous Next
8. Sprites
FNwimp_measurefile(filepath$,warning%)
Returns the size in bytes needed to store a file in memory prior to using FNwimp_loadfile(), FNwimp_loaddfile(), FNwimp_loadsprites() or FNwimp_loadjpegfile().
Returns -1 if filepath$ not found.
Always use this as opposed to any other form of measurement.
filepath$ = full pathname of spritefile.
warning% - if not 0, a non-fatal warning will be given if filepath$ cannot be found.
(This function is also listed in in other sections)
FNwimp_loadsprites(filepath$,address%,warning%)
Loads a spritefile into a block of memory at address%.
The memory block must have already been created after using FNwimp_measurefile().
Returns the address at which to load the next file (if any) into the same memory block.
filepath$ = full pathname of spritefile.
If warning% is not 0 then a non-fatal error will be given if filepath$ cannot be found.
FNwimp_countsprites(spritearea%)
Returns the number of sprites in a sprite area.
spritearea% = handle of sprite area.
FNwimp_getspritename(spritearea%,spritenumber%)
Returns the name of a sprite in a sprite area, which has been loaded by FNwimp_loadsprites.
spritearea% = handle of sprite area.
spritenumber% = number of sprite in sprite area. First sprite is 1.
FNwimp_getspritesize(spritename$,spritearea%,side%)
Returns the width/height (in OS units) of a sprite in a sprite area, which has been loaded by FNwimp_loadsprites or is in the Wimp sprite pool.
spritename$ = name of sprite.
spritearea% = handle of sprite area containing sprite (0 means ‘in sprite pool’).
If side%=0 then returns width of sprite.
If side%=1 then returns height of sprite.
PROCwimp_savesprites(savepath$,spritearea%)
Saves the contents of a sprite area to a file. The sprites must have been loaded into the spritearea by FNwimp_loadsprites.
savepath$ = full pathname of file to be saved.
spritearea% = handle of sprite area containing sprites.
PROCwimp_rendersprite(spritename$,spritearea%,bx%,by%,minx%,min-y%,maxx%,maxy%,xscale,yscale)
Renders (plots) a sprite on the screen at the specified screen coordinates, using the clipping rectangle.
spritename$ = name of sprite to plot.
spritearea% = 0 if sprite is in Wimp sprite pool, or
spritearea% = handle of sprite area containing sprite, which has been loaded by FNwimp_loadsprites.
bx%,by% = screen coordinates (OS units) at which to put bottom left
corner of sprite.
minx%,miny% = coordinates of bottom left corner of clipping rectangle in screen coordinates (OS units).
maxx%,maxy% = coordinates of top right corner of clipping rectangle in screen coordinates (OS units).
xscale,yscale = respectively, required scaling factors in x and y directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
PROCwimp_renderwindowsprite(window%,spritename$,spritearea%,bx-%,by%,minx%,miny%,maxx%,maxy%,xscale,yscale)
Renders (plots) a sprite in a window at specified work area coordinates. The window must have its auto-redraw flag unset.
window% = handle of window to render sprite in.
spritename$ = name of sprite to render.
spritearea% = 0 if sprite is in Wimp sprite pool, or
spritearea% = handle of sprite area containing sprite, which has been loaded by FNwimp_loadsprites.
bx%,by% = work area coordinates (OS units) of where to put bottom left of sprite.
minx%,miny% = coordinates of bottom left corner of clipping
rectangle in screen coordinates (OS units).
maxx%,maxy% = coordinates of top right corner of clipping rectangle in screen coordinates (OS units).
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
xscale,yscale = respectively, required scaling factors in x and y directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
FNwimp_buildsprite()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF ‘Elixir_03’ for constructing a custom sprite - see Manual Section 2.36 and 3.16.
PROCwimp_setdrawspritegraphiccolour()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF ‘Elixir_03’ for constructing a custom sprite - see Manual Section 2.36 and 3.16.
Intended for use in PROCuser_spritegraphics().
PROCwimp_writedrawspritetext()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF ‘Elixir_03’ for constructing a custom sprite - see Manual Section 2.36 and 3.16.
Intended for use in PROCuser_spritegraphics().
Top of page Back to Contents Previous Next