Esempio n. 1
0
static int Lclone(lua_State *L)			/** clone(c) */
{
 MT *c=Pget(L,1);
 MT *d=Pnew(L);
 *d=*c;
 return 1;
}
Esempio n. 2
0
static int Lnew(lua_State *L)			/** new([seed]) */
{
 long seed=luaL_optlong(L,1,SEED);
 MT *c=Pnew(L);
 init_genrand(c,seed);
 return 1;
}
Esempio n. 3
0
File: lgpc.c Progetto: LuaDist/lgpc
static int Pclip(lua_State *L, int op)
{
 gpc_polygon *p=Pget(L,1);
 gpc_polygon *q=Pget(L,2);
 gpc_polygon *r=Pnew(L);
 gpc_polygon_clip(op,p,q,r);
 return 1;
}
Esempio n. 4
0
File: lgpc.c Progetto: LuaDist/lgpc
static int Lstrip(lua_State *L)			/** strip(p) */
{
 gpc_tristrip s;
 gpc_polygon *p=Pget(L,1);
 gpc_polygon *r=Pnew(L);
 gpc_polygon_to_tristrip(p,&s);
 r->num_contours=s.num_strips;
 r->contour=s.strip;
 return 1;
}
Esempio n. 5
0
static int Lnew(lua_State *L)			/** new() */
{
 MD5_CTX *c=Pnew(L);
 MD5Init(c);
 return 1;
}
Esempio n. 6
0
File: lgpc.c Progetto: LuaDist/lgpc
static int Lnew(lua_State *L)			/** new() */
{
 Pnew(L);
 return 1;
}