CreateSprite |
Top Previous Next |
Syntax POINTER = CreateSprite(width as INT,height as INT,frames as INT, OPT bSystemRam as INT) Description Creates a blank sprite for direct buffer writing. Parameters width - width of sprite height - height of sprite frames - number of frames the image will contain bSystemRam - Optional. If TRUE then creates the sprite in system memory instead of video memory. Return value A pointer to the created sprite. Remarks Always check the return value. The frames parameter specifies how many frame your image will have using the total width supplied. It must be equal to frame width * frames = width so to specify 5 frames and a frame width of 64 with a height of 64 the function would be CreateSprite(320,64,5) See Also: FREESPRITE, LOADSPRITE, LOCKSPRITE, UNLOCKSPRITE Example usage goodguy = CreateSprite(320,64,5) |