1996 function lc_placegirder(L : Plua_State) : LongInt; Cdecl; |
1996 function lc_placegirder(L : Plua_State) : LongInt; Cdecl; |
1997 var placed: boolean; |
1997 var placed: boolean; |
1998 begin |
1998 begin |
1999 placed:= false; |
1999 placed:= false; |
2000 if CheckLuaParameterCount(L, 3, 'PlaceGirder', 'x, y, frameIdx') then |
2000 if CheckLuaParameterCount(L, 3, 'PlaceGirder', 'x, y, frameIdx') then |
2001 placed:= TryPlaceOnLand( |
2001 placed:= TryPlaceOnLandSimple( |
2002 lua_tointeger(L, 1) - SpritesData[sprAmGirder].Width div 2, |
2002 lua_tointeger(L, 1) - SpritesData[sprAmGirder].Width div 2, |
2003 lua_tointeger(L, 2) - SpritesData[sprAmGirder].Height div 2, |
2003 lua_tointeger(L, 2) - SpritesData[sprAmGirder].Height div 2, |
2004 sprAmGirder, lua_tointeger(L, 3), true, false); |
2004 sprAmGirder, lua_tointeger(L, 3), true, false); |
2005 |
2005 |
2006 lua_pushboolean(L, placed); |
2006 lua_pushboolean(L, placed); |