Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

Sprite
[Graphic components]


Detailed Description

sprite graphic objects

Author:
benjamin gerard


Files

file  sprite.lua
 lua sprite


Functions

 sprite_get (var name)
 Get a named sprite.

 sprite (var name, var x, var y, var w, var h, var u1, var v1, var u2, var v2, var texture, var rotate)
 Create a sprite and add it in the list of named sprite.

 sprite_simple (var name, var filename)
 Create a sprite from an image file.

 sprite_draw (var spr, var dl, var x, var y, var z, var sx, var sy)
 Default sprite drawing function.

 sprite_set_color (var spr, var a, var r, var g, var b)
 Default sprite set color function.


Function Documentation

sprite_get var  name  ) 
 

Get a named sprite.

Parameters:
name sprite name.

sprite var  name,
var  x,
var  y,
var  w,
var  h,
var  u1,
var  v1,
var  u2,
var  v2,
var  texture,
var  rotate
 

Create a sprite and add it in the list of named sprite.

Parameters:
name sprite name.
x X coordinate of sprite origine (default 0).
y Y coordinate of sprite origine (default 0).
w Sprite width (optionnal guessed from texture)
h Sprite height (optionnal guessed from texture)
u1 texture left coodinate (optionnal guessed from texture)
v1 texture top coodinate (optionnal guessed from texture)
u2 texture right coodinate (optionnal guessed from texture)
v2 texture bottom coodinate (optionnal guessed from texture)
texture texture-id, texture-name, or texture-file
rotate non nil to perform a -90 degree rotation.
Returns:
sprite object
Return values:
nil Error.

sprite_simple var  name,
var  filename
 

Create a sprite from an image file.

Parameters:
name optionnal sprite name.
filename image file path (can be a texture name too).
Returns:
sprite object
Return values:
nil Error.


dcplaya documentation version 2.0 Generated on November 2004 by doxygen 1.3.6