Guest User

Untitled

a guest
Jan 12th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. // Combined C++/Lua constructor
  2. WallItem::WallItem(lua_State *L)
  3. {
  4.    mObjectTypeNumber = WallItemTypeNumber;
  5.    mWidth = Barrier::DEFAULT_BARRIER_WIDTH;
  6.    mAlreadyAdded = false;
  7.  
  8.    setNewGeometry(geomPolyLine);
  9.    
  10.    if(L)
  11.    {
  12.       static LuaFunctionArgList constructorArgList = { {{ END }, { GEOM, INT, END }}, 2 };
  13.       S32 profile = checkArgList(L, constructorArgList, "WallItem", "constructor");
  14.       if(profile == 1)
  15.       {
  16.          setPos(getPointOrXY(L, 1));
  17.          setWidth(getInt(L, 2));
  18.       }
  19.    }
  20.  
  21.    LUAW_CONSTRUCTOR_INITIALIZATIONS;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment