CapsAdmin

Untitled

May 24th, 2011
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. void Push(Vec3 var)
  2. {    
  3.    Vec3 *ubox = (Vec3 *)lua_newuserdata(lua->L, sizeof(Vec3));
  4.    *ubox = var;
  5.    luaL_getmetatable(lua->L, meta_name);
  6.    lua_setmetatable(lua->L, -2);
  7. }
  8.  
  9. Vec3 *Get(int index)
  10. {
  11.    Vec3 var = *(Vec3 *)luaL_checkudata(L, 1, "Vec3");
  12.    return var;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment