MATERIAL* mtl_complexsprite =
{
effect = "complexsprite.fx";
}
action myAction ()
{
my->material = mtl_create();
effect_cpy(my->material, mtl_complexsprite);
// ...copy other parameters from mtl_complexsprite...
// load bitmaps from file or the like
while (!my->destroyed)
{
// gets bitmap for current rotation and animation
BMAP* b = getMyBitmap(my);
// assign to shader
my->material->skin1 = b;
// shady shade shade!
wait(1);
}
ptr_remove(my->material);
ptr_remove(my);
}