(Last updated on 07 March 2004)
| IMPORTANT NOTES ABOUT THE NEW VERSION This
new release of SpriteControl as had a significant amount
of changes and modifications applied. Changed LoadAnimImage3D()
now has an extra framesY parameter to allow loading of
images where the animation is laid out in both colums AND
rows. ModifyText3D no
longer needs to know the texture of the sprite. spritecamera -
handle of the main camera created by the SpriteGraphics3D
command Removed SpritePivotZoom. See
CameraZoom3D New Commands SpriteGraphics3D -
for easy setting up of the 3d display |
By Syntax Error - config2000 AT hotmail.com
A set of 26 commands and functions for manipulating 3d quad sprites just like you would with 2D images.
> Display 'pixel-perfect' 3d sprites just like 2d images *THANKS
TO SKIDRACER*
> Use 2D screen coordinates for positioning
> Resize in pixel dimensions
> Rotate / Fade / Re-color /Alpha
> Works with any 3D graphics resolution
> Any camera zoom ratio >=1
> Easy to load and position the sprites
> Functions & commands similar in operation to 2d
counterparts
| SpriteGraphics3D
width,height[,depth][,viewmode][,pivotdistance#] EndGraphics3D piv=CreateSpritePivot(maincamera[,distance#]) CameraZoom3D camera,zoomratio# sprite=CreateImage3D([width][,height][,parent]) sprite=LoadImage3D(file$[,flags][,parent]) sprite=LoadAnimImage3D(file$,frames[,flags][,parent]) sprite=GrabImage3D(x,y,w,h[,parent]) sprite=CopyImage3D(existingsprite) sprite=Text3D(x,y,text$[,flags][,parent]) ModifyText3D sprite,x,y,text$[,flags] DrawImage3D sprite,x,y[,frame][,z#] ResizeImage3D sprite,width,height FlipImage3D sprite[,horizontalflag][,verticalflag] RotateImage3D sprite,angle# HandleImage3D sprite,xoffset#,yoffset# MidHandle3D sprite hx#=ImageXHandle3D(sprite) hy#=ImageYHandle3D(sprite) w=ImageWidth3D(sprite) h=ImageHeight3D(sprite) result=ImagesOverlap3D(sprite1,sprite2[,overlap1][,overlap2]) MaskImage3D sprite,red,green,blue[,totalframes] newsprite=ImageToSprite(existingimage) FreeImage3D sprite texture=GetSpriteTexture(sprite) |
The zip Includes plenty of examples demonstrating most the
commands/functions.
Documentation is also included.
You can read the online docs here. These are also inlcuded in the download.
By installing the Docs Pak you will have instant help for each
of the SpriteControl functions.
Plus, all of the commands are recognised by Blitz (
highlighted/capitalised).
Also, the F1 help function works as well!
** Note 1: You need the latest version of Blitz3D with the userlibs feature for this to work.
Refer to the installation notes in the Docs Pak folder which is included in the zip
| Include "Sprite Control.bb" | ; the include |
| SpriteGraphics3D width,height | ; set 3d display + camera + sprite pivot |
| myimage=LoadImage3D("example.bmp") | ; load example image |
| Repeat | |
| ; .. do 3d stuff | |
| DrawImage3D myimage,MouseX(),MouseY() | ; draw the sprite at mouse coordinates |
| RenderWorld | ; render the 3d world |
| ; .. draw 2d stuff here | |
| Flip | ; flip the buffers |
| Until KeyHit(1) | ; until ESC key is pressed |
| End | ; end program |