lua/wrappers/game/lua_map.cpp
/**
	 * Sets the size of the map. This destorys the old map data.
	 *
	 * @param integer width The new width.
	 * @param integer height The new height.
	 * @returns am.map This
	 */
Sets the size of the map. This destorys the old map data.
@param integer width The new width.
@param integer height The new height.
Sets the size of the map . This destorys the old map data . @param integer width The new width . @param integer height The new height .
int Map_map_size(lua_State *lua)
	{
		Map *map = castUData<Map>(lua, 1);
		if (map)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushinteger(lua, map->getMapWidth());
				lua_pushinteger(lua, map->getMapHeight());
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				map->setMapSize(lua_tointeger(lua, 2), lua_tointeger(lua, 3));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "map_size", "integer width, integer height");
		}
		return LuaState::expectedContext(lua, "map_size", "am.map");
	}
int Map_map_size ( lua_State * lua ) { Map * map = castUData < Map > ( lua , 1 ) ; if ( map ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushinteger ( lua , map -> getMapWidth ( ) ) ; lua_pushinteger ( lua , map -> getMapHeight ( ) ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { map -> setMapSize ( lua_tointeger ( lua , 2 ) , lua_tointeger ( lua , 3 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the size of the map.
Sets the size of the map .