Add files via upload
|
@ -0,0 +1,16 @@
|
|||
mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR)
|
||||
|
||||
find_library(CURL_LIBRARY NAMES curl libcurl)
|
||||
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
|
||||
|
||||
if(WIN32)
|
||||
# If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
|
||||
if(NOT VCPKG_APPLOCAL_DEPS)
|
||||
find_file(CURL_DLL NAMES libcurl-4.dll libcurl.dll
|
||||
DOC "Path to the cURL DLL (for installation)")
|
||||
mark_as_advanced(CURL_DLL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
|
|
@ -0,0 +1,27 @@
|
|||
option(ENABLE_SYSTEM_GMP "Use GMP from system" TRUE)
|
||||
mark_as_advanced(GMP_LIBRARY GMP_INCLUDE_DIR)
|
||||
set(USE_SYSTEM_GMP FALSE)
|
||||
|
||||
if(ENABLE_SYSTEM_GMP)
|
||||
find_library(GMP_LIBRARY NAMES gmp)
|
||||
find_path(GMP_INCLUDE_DIR NAMES gmp.h)
|
||||
|
||||
if(GMP_LIBRARY AND GMP_INCLUDE_DIR)
|
||||
message (STATUS "Using GMP provided by system.")
|
||||
set(USE_SYSTEM_GMP TRUE)
|
||||
else()
|
||||
message (STATUS "Detecting GMP from system failed.")
|
||||
endif()
|
||||
else()
|
||||
message (STATUS "Detecting GMP from system disabled! (ENABLE_SYSTEM_GMP=0)")
|
||||
endif()
|
||||
|
||||
if(NOT USE_SYSTEM_GMP)
|
||||
message(STATUS "Using bundled mini-gmp library.")
|
||||
set(GMP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/gmp)
|
||||
set(GMP_LIBRARY gmp)
|
||||
add_subdirectory(lib/gmp)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARY GMP_INCLUDE_DIR)
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
set(CUSTOM_GETTEXT_PATH "${PROJECT_SOURCE_DIR}/../../gettext"
|
||||
CACHE FILEPATH "path to custom gettext")
|
||||
|
||||
find_path(GETTEXT_INCLUDE_DIR
|
||||
NAMES libintl.h
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/include"
|
||||
DOC "GetText include directory")
|
||||
|
||||
find_program(GETTEXT_MSGFMT
|
||||
NAMES msgfmt
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/bin"
|
||||
DOC "Path to msgfmt")
|
||||
|
||||
set(GETTEXT_REQUIRED_VARS GETTEXT_INCLUDE_DIR GETTEXT_MSGFMT)
|
||||
|
||||
if(APPLE)
|
||||
find_library(GETTEXT_LIBRARY
|
||||
NAMES libintl.a
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/lib"
|
||||
DOC "GetText library")
|
||||
|
||||
find_library(ICONV_LIBRARY
|
||||
NAMES libiconv.dylib
|
||||
PATHS "/usr/lib"
|
||||
DOC "IConv library")
|
||||
set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_LIBRARY ICONV_LIBRARY)
|
||||
endif(APPLE)
|
||||
|
||||
# Modern Linux, as well as OSX, does not require special linking because
|
||||
# GetText is part of glibc.
|
||||
# TODO: check the requirements on other BSDs and older Linux
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
set(GETTEXT_LIB_NAMES
|
||||
libintl.lib intl.lib libintl3.lib intl3.lib)
|
||||
else()
|
||||
set(GETTEXT_LIB_NAMES
|
||||
libintl.dll.a intl.dll.a libintl3.dll.a intl3.dll.a)
|
||||
endif()
|
||||
find_library(GETTEXT_LIBRARY
|
||||
NAMES ${GETTEXT_LIB_NAMES}
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/lib"
|
||||
DOC "GetText library")
|
||||
find_file(GETTEXT_DLL
|
||||
NAMES libintl.dll intl.dll libintl3.dll intl3.dll
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib"
|
||||
DOC "gettext *intl*.dll")
|
||||
find_file(GETTEXT_ICONV_DLL
|
||||
NAMES libiconv2.dll
|
||||
PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib"
|
||||
DOC "gettext *iconv*.lib")
|
||||
set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_DLL GETTEXT_ICONV_DLL)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GettextLib DEFAULT_MSG ${GETTEXT_REQUIRED_VARS})
|
||||
|
||||
|
||||
if(GETTEXTLIB_FOUND)
|
||||
# BSD variants require special linkage as they don't use glibc
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
|
||||
set(GETTEXT_LIBRARY "intl")
|
||||
endif()
|
||||
|
||||
set(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
|
||||
set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
|
||||
set(GETTEXT_MO_DEST_PATH ${LOCALEDIR}/<locale>/LC_MESSAGES)
|
||||
file(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*")
|
||||
list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot)
|
||||
list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES timestamp)
|
||||
macro(SET_MO_PATHS _buildvar _destvar _locale)
|
||||
string(REPLACE "<locale>" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH})
|
||||
string(REPLACE "<locale>" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH})
|
||||
endmacro()
|
||||
endif()
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
mark_as_advanced(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL)
|
||||
set(IRRLICHT_SOURCE_DIR "" CACHE PATH "Path to irrlicht source directory (optional)")
|
||||
|
||||
|
||||
# Find include directory
|
||||
|
||||
if(NOT IRRLICHT_SOURCE_DIR STREQUAL "")
|
||||
set(IRRLICHT_SOURCE_DIR_INCLUDE
|
||||
"${IRRLICHT_SOURCE_DIR}/include"
|
||||
)
|
||||
|
||||
set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a Irrlicht Irrlicht.lib)
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-visualstudio")
|
||||
set(IRRLICHT_LIBRARY_NAMES Irrlicht.lib)
|
||||
else()
|
||||
set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-gcc")
|
||||
set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a libIrrlicht.dll.a)
|
||||
endif()
|
||||
else()
|
||||
set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Linux")
|
||||
set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a)
|
||||
endif()
|
||||
|
||||
find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
|
||||
PATHS
|
||||
${IRRLICHT_SOURCE_DIR_INCLUDE}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(IRRLICHT_LIBRARY NAMES ${IRRLICHT_LIBRARY_NAMES}
|
||||
PATHS
|
||||
${IRRLICHT_SOURCE_DIR_LIBS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
else()
|
||||
find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
|
||||
PATHS
|
||||
/usr/local/include/irrlicht
|
||||
/usr/include/irrlicht
|
||||
/system/develop/headers/irrlicht #Haiku
|
||||
PATH_SUFFIXES "include/irrlicht"
|
||||
)
|
||||
|
||||
find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/system/develop/lib # Haiku
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# On Windows, find the DLL for installation
|
||||
if(WIN32)
|
||||
# If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
|
||||
if(NOT VCPKG_APPLOCAL_DEPS)
|
||||
if(MSVC)
|
||||
set(IRRLICHT_COMPILER "VisualStudio")
|
||||
else()
|
||||
set(IRRLICHT_COMPILER "gcc")
|
||||
endif()
|
||||
find_file(IRRLICHT_DLL NAMES Irrlicht.dll
|
||||
PATHS
|
||||
"${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}"
|
||||
DOC "Path of the Irrlicht dll (for installation)"
|
||||
)
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Look for JSONCPP if asked to.
|
||||
# We use a bundled version by default because some distros ship versions of
|
||||
# JSONCPP that cause segfaults and other memory errors when we link with them.
|
||||
# See https://github.com/minetest/minetest/issues/1793
|
||||
|
||||
mark_as_advanced(JSON_LIBRARY JSON_INCLUDE_DIR)
|
||||
option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JSONCPP. May cause segfaults and other memory errors!" FALSE)
|
||||
|
||||
if(ENABLE_SYSTEM_JSONCPP)
|
||||
find_library(JSON_LIBRARY NAMES jsoncpp)
|
||||
find_path(JSON_INCLUDE_DIR json/allocator.h PATH_SUFFIXES jsoncpp)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Json DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR)
|
||||
|
||||
if(JSON_FOUND)
|
||||
message(STATUS "Using system JSONCPP library.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT JSON_FOUND)
|
||||
message(STATUS "Using bundled JSONCPP library.")
|
||||
set(JSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp)
|
||||
set(JSON_LIBRARY jsoncpp)
|
||||
add_subdirectory(lib/jsoncpp)
|
||||
endif()
|
|
@ -0,0 +1,28 @@
|
|||
# Look for Lua library to use
|
||||
# This selects LuaJIT by default
|
||||
|
||||
option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE)
|
||||
set(USE_LUAJIT FALSE)
|
||||
option(REQUIRE_LUAJIT "Require LuaJIT support" FALSE)
|
||||
if(REQUIRE_LUAJIT)
|
||||
set(ENABLE_LUAJIT TRUE)
|
||||
endif()
|
||||
if(ENABLE_LUAJIT)
|
||||
find_package(LuaJIT)
|
||||
if(LUAJIT_FOUND)
|
||||
set(USE_LUAJIT TRUE)
|
||||
message (STATUS "Using LuaJIT provided by system.")
|
||||
elseif(REQUIRE_LUAJIT)
|
||||
message(FATAL_ERROR "LuaJIT not found whereas REQUIRE_LUAJIT=\"TRUE\" is used.\n"
|
||||
"To continue, either install LuaJIT or do not use REQUIRE_LUAJIT=\"TRUE\".")
|
||||
endif()
|
||||
else()
|
||||
message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)")
|
||||
endif()
|
||||
|
||||
if(NOT USE_LUAJIT)
|
||||
message(STATUS "LuaJIT not found, using bundled Lua.")
|
||||
set(LUA_LIBRARY lua)
|
||||
set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/src)
|
||||
add_subdirectory(lib/lua)
|
||||
endif()
|
|
@ -0,0 +1,62 @@
|
|||
# Locate LuaJIT library
|
||||
# This module defines
|
||||
# LUAJIT_FOUND, if false, do not try to link to Lua
|
||||
# LUA_INCLUDE_DIR, where to find lua.h
|
||||
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
|
||||
#
|
||||
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
|
||||
|
||||
FIND_PATH(LUA_INCLUDE_DIR luajit.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include/luajit-5_1-2.1 include/luajit-5_1-2.0 include luajit
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
# Test if running on vcpkg toolchain
|
||||
if(DEFINED VCPKG_TARGET_TRIPLET AND DEFINED VCPKG_APPLOCAL_DEPS)
|
||||
# On vcpkg luajit is 'lua51' and normal lua is 'lua'
|
||||
FIND_LIBRARY(LUA_LIBRARY
|
||||
NAMES lua51
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
else()
|
||||
FIND_LIBRARY(LUA_LIBRARY
|
||||
NAMES luajit-5.1
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
|
||||
FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")
|
||||
|
||||
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
||||
UNSET(lua_version_str)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
|
||||
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
|
|
@ -0,0 +1,204 @@
|
|||
#.rst:
|
||||
# FindNcursesw
|
||||
# ------------
|
||||
#
|
||||
# Find the ncursesw (wide ncurses) include file and library.
|
||||
#
|
||||
# Based on FindCurses.cmake which comes with CMake.
|
||||
#
|
||||
# Checks for ncursesw first. If not found, it then executes the
|
||||
# regular old FindCurses.cmake to look for for ncurses (or curses).
|
||||
#
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ``CURSES_FOUND``
|
||||
# True if curses is found.
|
||||
# ``NCURSESW_FOUND``
|
||||
# True if ncursesw is found.
|
||||
# ``CURSES_INCLUDE_DIRS``
|
||||
# The include directories needed to use Curses.
|
||||
# ``CURSES_LIBRARIES``
|
||||
# The libraries needed to use Curses.
|
||||
# ``CURSES_HAVE_CURSES_H``
|
||||
# True if curses.h is available.
|
||||
# ``CURSES_HAVE_NCURSES_H``
|
||||
# True if ncurses.h is available.
|
||||
# ``CURSES_HAVE_NCURSES_NCURSES_H``
|
||||
# True if ``ncurses/ncurses.h`` is available.
|
||||
# ``CURSES_HAVE_NCURSES_CURSES_H``
|
||||
# True if ``ncurses/curses.h`` is available.
|
||||
# ``CURSES_HAVE_NCURSESW_NCURSES_H``
|
||||
# True if ``ncursesw/ncurses.h`` is available.
|
||||
# ``CURSES_HAVE_NCURSESW_CURSES_H``
|
||||
# True if ``ncursesw/curses.h`` is available.
|
||||
#
|
||||
# Set ``CURSES_NEED_NCURSES`` to ``TRUE`` before the
|
||||
# ``find_package(Ncursesw)`` call if NCurses functionality is required.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2001-2014 Kitware, Inc.
|
||||
# modifications: Copyright 2015 kahrl <kahrl@gmx.net>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
# nor the names of their contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# The above copyright and license notice applies to distributions of
|
||||
# CMake in source and binary form. Some source files contain additional
|
||||
# notices of original copyright by their contributors; see each source
|
||||
# for details. Third-party software packages supplied with CMake under
|
||||
# compatible licenses provide their own copyright notices documented in
|
||||
# corresponding subdirectories.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# CMake was initially developed by Kitware with the following sponsorship:
|
||||
#
|
||||
# * National Library of Medicine at the National Institutes of Health
|
||||
# as part of the Insight Segmentation and Registration Toolkit (ITK).
|
||||
#
|
||||
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
|
||||
# Visualization Initiative.
|
||||
#
|
||||
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
|
||||
# National Institutes of Health through the NIH Roadmap for Medical Research,
|
||||
# Grant U54 EB005149.
|
||||
#
|
||||
# * Kitware, Inc.
|
||||
#=============================================================================
|
||||
|
||||
include(CheckLibraryExists)
|
||||
|
||||
find_library(CURSES_NCURSESW_LIBRARY NAMES ncursesw
|
||||
DOC "Path to libncursesw.so or .lib or .a")
|
||||
|
||||
set(CURSES_USE_NCURSES FALSE)
|
||||
set(CURSES_USE_NCURSESW FALSE)
|
||||
|
||||
if(CURSES_NCURSESW_LIBRARY)
|
||||
set(CURSES_USE_NCURSES TRUE)
|
||||
set(CURSES_USE_NCURSESW TRUE)
|
||||
endif()
|
||||
|
||||
if(CURSES_USE_NCURSESW)
|
||||
get_filename_component(_cursesLibDir "${CURSES_NCURSESW_LIBRARY}" PATH)
|
||||
get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)
|
||||
|
||||
find_path(CURSES_INCLUDE_PATH
|
||||
NAMES ncursesw/ncurses.h ncursesw/curses.h ncurses.h curses.h
|
||||
HINTS "${_cursesParentDir}/include"
|
||||
)
|
||||
|
||||
# Previous versions of FindCurses provided these values.
|
||||
if(NOT DEFINED CURSES_LIBRARY)
|
||||
set(CURSES_LIBRARY "${CURSES_NCURSESW_LIBRARY}")
|
||||
endif()
|
||||
|
||||
CHECK_LIBRARY_EXISTS("${CURSES_NCURSESW_LIBRARY}"
|
||||
cbreak "" CURSES_NCURSESW_HAS_CBREAK)
|
||||
if(NOT CURSES_NCURSESW_HAS_CBREAK)
|
||||
find_library(CURSES_EXTRA_LIBRARY tinfo HINTS "${_cursesLibDir}"
|
||||
DOC "Path to libtinfo.so or .lib or .a")
|
||||
find_library(CURSES_EXTRA_LIBRARY tinfo )
|
||||
endif()
|
||||
|
||||
# Report whether each possible header name exists in the include directory.
|
||||
if(NOT DEFINED CURSES_HAVE_NCURSESW_NCURSES_H)
|
||||
if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h")
|
||||
set(CURSES_HAVE_NCURSESW_NCURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h")
|
||||
else()
|
||||
set(CURSES_HAVE_NCURSESW_NCURSES_H "CURSES_HAVE_NCURSESW_NCURSES_H-NOTFOUND")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED CURSES_HAVE_NCURSESW_CURSES_H)
|
||||
if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/curses.h")
|
||||
set(CURSES_HAVE_NCURSESW_CURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/curses.h")
|
||||
else()
|
||||
set(CURSES_HAVE_NCURSESW_CURSES_H "CURSES_HAVE_NCURSESW_CURSES_H-NOTFOUND")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED CURSES_HAVE_NCURSES_H)
|
||||
if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses.h")
|
||||
set(CURSES_HAVE_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses.h")
|
||||
else()
|
||||
set(CURSES_HAVE_NCURSES_H "CURSES_HAVE_NCURSES_H-NOTFOUND")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED CURSES_HAVE_CURSES_H)
|
||||
if(EXISTS "${CURSES_INCLUDE_PATH}/curses.h")
|
||||
set(CURSES_HAVE_CURSES_H "${CURSES_INCLUDE_PATH}/curses.h")
|
||||
else()
|
||||
set(CURSES_HAVE_CURSES_H "CURSES_HAVE_CURSES_H-NOTFOUND")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}"
|
||||
DOC "Path to libform.so or .lib or .a")
|
||||
find_library(CURSES_FORM_LIBRARY form )
|
||||
|
||||
# Need to provide the *_LIBRARIES
|
||||
set(CURSES_LIBRARIES ${CURSES_LIBRARY})
|
||||
|
||||
if(CURSES_EXTRA_LIBRARY)
|
||||
set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(CURSES_FORM_LIBRARY)
|
||||
set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY})
|
||||
endif()
|
||||
|
||||
# Provide the *_INCLUDE_DIRS result.
|
||||
set(CURSES_INCLUDE_DIRS ${CURSES_INCLUDE_PATH})
|
||||
set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) # compatibility
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ncursesw DEFAULT_MSG
|
||||
CURSES_LIBRARY CURSES_INCLUDE_PATH)
|
||||
set(CURSES_FOUND ${NCURSESW_FOUND})
|
||||
|
||||
else()
|
||||
find_package(Curses)
|
||||
set(NCURSESW_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
CURSES_INCLUDE_PATH
|
||||
CURSES_CURSES_LIBRARY
|
||||
CURSES_NCURSES_LIBRARY
|
||||
CURSES_NCURSESW_LIBRARY
|
||||
CURSES_EXTRA_LIBRARY
|
||||
CURSES_FORM_LIBRARY
|
||||
)
|
|
@ -0,0 +1,74 @@
|
|||
#-------------------------------------------------------------------
|
||||
# The contents of this file are placed in the public domain. Feel
|
||||
# free to make use of it in any way you like.
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# - Try to find OpenGLES and EGL
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES2_FOUND - system has OpenGLES
|
||||
# OPENGLES2_INCLUDE_DIR - the GL include directory
|
||||
# OPENGLES2_LIBRARIES - Link these to use OpenGLES
|
||||
#
|
||||
# EGL_FOUND - system has EGL
|
||||
# EGL_INCLUDE_DIR - the EGL include directory
|
||||
# EGL_LIBRARIES - Link these to use EGL
|
||||
|
||||
# Win32 and Apple are not tested!
|
||||
# Linux tested and works
|
||||
|
||||
if(WIN32)
|
||||
find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h)
|
||||
find_library(OPENGLES2_LIBRARY libGLESv2)
|
||||
elseif(APPLE)
|
||||
create_search_paths(/Developer/Platforms)
|
||||
findpkg_framework(OpenGLES2)
|
||||
set(OPENGLES2_LIBRARY "-framework OpenGLES")
|
||||
else()
|
||||
# Unix
|
||||
find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
|
||||
PATHS /usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/usr/X11R6/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
find_library(OPENGLES2_LIBRARY
|
||||
NAMES GLESv2
|
||||
PATHS /opt/graphics/OpenGL/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OPENGLES2 DEFAULT_MSG OPENGLES2_LIBRARY OPENGLES2_INCLUDE_DIR)
|
||||
|
||||
find_path(EGL_INCLUDE_DIR EGL/egl.h
|
||||
PATHS /usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/usr/X11R6/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
find_library(EGL_LIBRARY
|
||||
NAMES EGL
|
||||
PATHS /opt/graphics/OpenGL/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARY})
|
||||
set(EGL_LIBRARIES ${EGL_LIBRARY})
|
||||
|
||||
mark_as_advanced(
|
||||
OPENGLES2_INCLUDE_DIR
|
||||
OPENGLES2_LIBRARY
|
||||
EGL_INCLUDE_DIR
|
||||
EGL_LIBRARY
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
mark_as_advanced(SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
|
||||
|
||||
find_path(SQLITE3_INCLUDE_DIR sqlite3.h)
|
||||
|
||||
find_library(SQLITE3_LIBRARY NAMES sqlite3)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SQLite3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# - Find vorbis
|
||||
# Find the native vorbis includes and libraries
|
||||
#
|
||||
# VORBIS_INCLUDE_DIR - where to find vorbis.h, etc.
|
||||
# OGG_INCLUDE_DIR - where to find ogg/ogg.h, etc.
|
||||
# VORBIS_LIBRARIES - List of libraries when using vorbis(file).
|
||||
# VORBIS_FOUND - True if vorbis found.
|
||||
|
||||
if(NOT GP2XWIZ)
|
||||
if(VORBIS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(VORBIS_FIND_QUIETLY TRUE)
|
||||
endif(VORBIS_INCLUDE_DIR)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
# MSVC built ogg/vorbis may be named ogg_static and vorbis_static
|
||||
find_library(OGG_LIBRARY NAMES ogg ogg_static)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static)
|
||||
find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static)
|
||||
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Vorbis DEFAULT_MSG
|
||||
OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR
|
||||
OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
|
||||
else(NOT GP2XWIZ)
|
||||
find_path(VORBIS_INCLUDE_DIR tremor/ivorbisfile.h)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis_dec)
|
||||
find_package_handle_standard_args(Vorbis DEFAULT_MSG
|
||||
VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
|
||||
endif(NOT GP2XWIZ)
|
||||
|
||||
if(VORBIS_FOUND)
|
||||
if(NOT GP2XWIZ)
|
||||
set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}
|
||||
${OGG_LIBRARY})
|
||||
else(NOT GP2XWIZ)
|
||||
set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
|
||||
endif(NOT GP2XWIZ)
|
||||
else(VORBIS_FOUND)
|
||||
set(VORBIS_LIBRARIES)
|
||||
endif(VORBIS_FOUND)
|
||||
|
||||
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR)
|
||||
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Always run during 'make'
|
||||
|
||||
if(DEVELOPMENT_BUILD)
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(VERSION_GITHASH)
|
||||
set(VERSION_GITHASH "${VERSION_STRING}-${VERSION_GITHASH}")
|
||||
execute_process(COMMAND git diff-index --quiet HEAD
|
||||
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}"
|
||||
RESULT_VARIABLE IS_DIRTY)
|
||||
if(IS_DIRTY)
|
||||
set(VERSION_GITHASH "${VERSION_GITHASH}-dirty")
|
||||
endif()
|
||||
message(STATUS "*** Detected Git version ${VERSION_GITHASH} ***")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT VERSION_GITHASH)
|
||||
set(VERSION_GITHASH "${VERSION_STRING}")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
${GENERATE_VERSION_SOURCE_DIR}/cmake_config_githash.h.in
|
||||
${GENERATE_VERSION_BINARY_DIR}/cmake_config_githash.h)
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# Project properties
|
||||
PROJECT_NAME = @PROJECT_NAME_CAPITALIZED@
|
||||
PROJECT_NUMBER = @VERSION_STRING@
|
||||
PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/misc/minetest.svg
|
||||
|
||||
# Parsing
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
SORT_MEMBERS_CTORS_1ST = YES
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
BUILTIN_STL_SUPPORT = YES
|
||||
PREDEFINED = "USE_SPATIAL=1" \
|
||||
"USE_LEVELDB=1" \
|
||||
"USE_REDIS=1" \
|
||||
"USE_SOUND=1" \
|
||||
"USE_CURL=1" \
|
||||
"USE_FREETYPE=1" \
|
||||
"USE_GETTEXT=1"
|
||||
|
||||
# Input
|
||||
RECURSIVE = YES
|
||||
STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/src
|
||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/doc/main_page.dox \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/src/
|
||||
|
||||
# Dot graphs
|
||||
HAVE_DOT = @DOXYGEN_DOT_FOUND@
|
||||
CALL_GRAPH = YES
|
||||
CALLER_GRAPH = YES
|
||||
MAX_DOT_GRAPH_DEPTH = 3
|
||||
DOT_MULTI_TARGETS = YES
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
|
||||
# Output
|
||||
GENERATE_LATEX = NO
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
SEARCHENGINE = YES
|
||||
DISABLE_INDEX = YES
|
||||
GENERATE_TREEVIEW = YES
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
HTML_TIMESTAMP = YES
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
Minetest: Android version
|
||||
=========================
|
||||
|
||||
Controls
|
||||
--------
|
||||
The Android port doesn't support everything you can do on PC due to the
|
||||
limited capabilities of common devices. What can be done is described
|
||||
below:
|
||||
|
||||
While you're playing the game normally (that is, no menu or inventory is
|
||||
shown), the following controls are available:
|
||||
* Look around: touch screen and slide finger
|
||||
* double tap: place a node or use selected item
|
||||
* long tap: dig node
|
||||
* touch shown buttons: press button
|
||||
* Buttons:
|
||||
** left upper corner: chat
|
||||
** right lower corner: jump
|
||||
** right lower corner: crouch
|
||||
** left lower corner: walk/step...
|
||||
left up right
|
||||
down
|
||||
** left lower corner: display inventory
|
||||
|
||||
When a menu or inventory is displayed:
|
||||
* double tap outside menu area: close menu
|
||||
* tap on an item stack: select that stack
|
||||
* tap on an empty slot: if you selected a stack already, that stack is placed here
|
||||
* drag and drop: touch stack and hold finger down, move the stack to another
|
||||
slot, tap another finger while keeping first finger on screen
|
||||
--> places a single item from dragged stack into current (first touched) slot
|
||||
|
||||
Special settings
|
||||
----------------
|
||||
There are some settings especially useful for Android users. Minetest's config
|
||||
file can usually be found at /mnt/sdcard/Minetest.
|
||||
|
||||
* gui_scaling: this is a user-specified scaling factor for the GUI- In case
|
||||
main menu is too big or small on your device, try changing this
|
||||
value.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
In order to build, your PC has to be set up to build Minetest in the usual
|
||||
manner (see the regular Minetest documentation for how to get this done).
|
||||
In addition to what is required for Minetest in general, you will need the
|
||||
following software packages. The version number in parenthesis denotes the
|
||||
version that was tested at the time this README was drafted; newer/older
|
||||
versions may or may not work.
|
||||
|
||||
* Android SDK 29
|
||||
* Android NDK r21
|
||||
* Android Studio 3 [optional]
|
||||
|
||||
Additionally, you'll need to have an Internet connection available on the
|
||||
build system, as the Android build will download some source packages.
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
The new build system Minetest Android is fully functional and is designed to
|
||||
speed up and simplify the work, as well as adding the possibility of
|
||||
cross-platform build.
|
||||
You can use `./gradlew assemblerelease` or `./gradlew assembledebug` from the
|
||||
command line or use Android Studio and click the build button.
|
||||
|
||||
When using gradlew, the newest NDK will be downloaded and installed
|
||||
automatically. Or you can create a `local.properties` file and specify
|
||||
`sdk.dir` and `ndk.dir` yourself.
|
||||
|
||||
* In order to make a release build you'll have to have a keystore setup to sign
|
||||
the resulting apk package. How this is done is not part of this README. There
|
||||
are different tutorials on the web explaining how to do it
|
||||
- choose one yourself.
|
||||
|
||||
* Once your keystore is setup, enter build/android subdirectory and create a new
|
||||
file "ant.properties" there. Add following lines to that file:
|
||||
|
||||
> key.store=<path to your keystore>
|
||||
> key.alias=Minetest
|
|
@ -0,0 +1,101 @@
|
|||
# Builtin Entities
|
||||
Minetest registers two entities by default: Falling nodes and dropped items.
|
||||
This document describes how they behave and what you can do with them.
|
||||
|
||||
## Falling node (`__builtin:falling_node`)
|
||||
|
||||
This entity is created by `minetest.check_for_falling` in place of a node
|
||||
with the special group `falling_node=1`. Falling nodes can also be created
|
||||
artificially with `minetest.spawn_falling_node`.
|
||||
|
||||
Needs manual initialization when spawned using `/spawnentity`.
|
||||
|
||||
Default behaviour:
|
||||
|
||||
* Falls down in a straight line (gravity = `movement_gravity` setting)
|
||||
* Collides with `walkable` node
|
||||
* Collides with all physical objects except players
|
||||
* If the node group `float=1` is set, it also collides with liquid nodes
|
||||
* When it hits a solid (=`walkable`) node, it will try to place itself as a
|
||||
node, replacing the node above.
|
||||
* If the falling node cannot replace the destination node, it is dropped.
|
||||
* If the destination node is a leveled node (`paramtype2="leveled"`) of the
|
||||
same node name, the levels of both are summed.
|
||||
|
||||
### Entity fields
|
||||
|
||||
* `set_node(self, node[, meta])`
|
||||
* Function to initialize the falling node
|
||||
* `node` and `meta` are explained below.
|
||||
* The `meta` argument is optional.
|
||||
* `node`: Node table of the node (`name`, `param1`, `param2`) that this
|
||||
entity represents. Read-only.
|
||||
* `meta`: Node metadata of the falling node. Will be used when the falling
|
||||
nodes tries to place itself as a node. Read-only.
|
||||
|
||||
### Rendering / supported nodes
|
||||
|
||||
Falling nodes have visuals to look as close as possible to the original node.
|
||||
This works for most drawtypes, but there are limitations.
|
||||
|
||||
Supported drawtypes:
|
||||
|
||||
* `normal`
|
||||
* `signlike`
|
||||
* `torchlike`
|
||||
* `nodebox`
|
||||
* `raillike`
|
||||
* `glasslike`
|
||||
* `glasslike_framed`
|
||||
* `glasslike_framed_optional`
|
||||
* `allfaces`
|
||||
* `allfaces_optional`
|
||||
* `firelike`
|
||||
* `mesh`
|
||||
* `fencelike`
|
||||
* `liquid`
|
||||
* `airlike` (not pointable)
|
||||
|
||||
Other drawtypes still kinda work, but they might look weird.
|
||||
|
||||
Supported `paramtype2` values:
|
||||
|
||||
* `wallmounted`
|
||||
* `facedir`
|
||||
* `colorwallmounted`
|
||||
* `colorfacedir`
|
||||
* `color`
|
||||
|
||||
## Dropped item stack (`__builtin:item`)
|
||||
|
||||
This is an item stack in a collectable form.
|
||||
|
||||
Common cases that spawn a dropped item:
|
||||
|
||||
* Item dropped by player
|
||||
* The root node of a node with the group `attached_node=1` is removed
|
||||
* `minetest.add_item` is called
|
||||
|
||||
Needs manual initialization when spawned using `/spawnentity`.
|
||||
|
||||
### Behavior
|
||||
|
||||
* Players can collect it by punching
|
||||
* Lifespan is defined by the setting `item_entity_ttl`
|
||||
* Slides on `slippery` nodes
|
||||
* Subject to gravity (uses `movement_gravity` setting)
|
||||
* Collides with `walkable` nodes
|
||||
* Does not collide physical objects
|
||||
* When it's inside a solid (`walkable=true`) node, it tries to escape to a
|
||||
neighboring non-solid (`walkable=false`) node
|
||||
|
||||
### Entity fields
|
||||
|
||||
* `set_item(self, item)`:
|
||||
* Function to initialize the dropped item
|
||||
* `item` (type `ItemStack`) specifies the item to represent
|
||||
* `age`: Age in seconds. Behaviour according to the setting `item_entity_ttl`
|
||||
* `itemstring`: Itemstring of the item that this item entity represents.
|
||||
Read-only.
|
||||
|
||||
Other fields are for internal use only.
|
|
@ -0,0 +1,174 @@
|
|||
Formspec toolkit api 0.0.3
|
||||
==========================
|
||||
|
||||
Formspec toolkit is a set of functions to create basic ui elements.
|
||||
|
||||
|
||||
File: fst/ui.lua
|
||||
----------------
|
||||
|
||||
ui.lua adds base ui interface to add additional components to.
|
||||
|
||||
ui.add(component) -> returns name of added component
|
||||
^ add component to ui
|
||||
^ component: component to add
|
||||
|
||||
ui.delete(component) -> true/false if a component was deleted or not
|
||||
^ remove a component from ui
|
||||
^ component: component to delete
|
||||
|
||||
ui.set_default(name)
|
||||
^ set component to show if not a single component is set visible
|
||||
^ name: name of component to set as default
|
||||
|
||||
ui.find_by_name(name) --> returns component or nil
|
||||
^ find a component within ui
|
||||
^ name: name of component to look for
|
||||
|
||||
File: fst/tabview.lua
|
||||
---------------------
|
||||
|
||||
tabview_create(name, size, tabheaderpos) --> returns tabview component
|
||||
^ create a new tabview component
|
||||
^ name: name of tabview (has to be unique per ui)
|
||||
^ size: size of tabview
|
||||
{
|
||||
x,
|
||||
y
|
||||
}
|
||||
^ tabheaderpos: upper left position of tabheader (relative to upper left fs corner)
|
||||
{
|
||||
x,
|
||||
y
|
||||
}
|
||||
|
||||
Class reference tabview:
|
||||
|
||||
methods:
|
||||
- add_tab(tab)
|
||||
^ add a tab to this tabview
|
||||
^ tab:
|
||||
{
|
||||
name = "tabname", -- name of tab to create
|
||||
caption = "tab caption", -- text to show for tab header
|
||||
cbf_button_handler = function(tabview, fields, tabname, tabdata), -- callback for button events
|
||||
--TODO cbf_events = function(tabview, event, tabname), -- callback for events
|
||||
cbf_formspec = function(tabview, name, tabdata), -- get formspec
|
||||
tabsize =
|
||||
{
|
||||
x, -- x width
|
||||
y -- y height
|
||||
}, -- special size for this tab (only relevant if no parent for tabview set)
|
||||
on_change = function(type,old_tab,new_tab) -- called on tab chang, type is "ENTER" or "LEAVE"
|
||||
}
|
||||
- set_autosave_tab(value)
|
||||
^ tell tabview to automatically save current tabname as "tabview_name"_LAST
|
||||
^ value: true/false
|
||||
- set_tab(name)
|
||||
^ set's tab to tab named "name", returns true/false on success
|
||||
^ name: name of tab to set
|
||||
- set_global_event_handler(handler)
|
||||
^ set a handler to be called prior calling tab specific event handler
|
||||
^ handler: function(tabview,event) --> returns true to finish event processing false to continue
|
||||
- set_global_button_handler(handler)
|
||||
^ set a handler to be called prior calling tab specific button handler
|
||||
^ handler: function(tabview,fields) --> returns true to finish button processing false to continue
|
||||
- set_parent(parent)
|
||||
^ set parent to attach tabview to. TV's with parent are hidden if their parent
|
||||
is hidden and they don't set their specified size.
|
||||
^ parent: component to attach to
|
||||
- show()
|
||||
^ show tabview
|
||||
- hide()
|
||||
^ hide tabview
|
||||
- delete()
|
||||
^ delete tabview
|
||||
- set_fixed_size(state)
|
||||
^ true/false set to fixed size, variable size
|
||||
|
||||
File: fst/dialog.lua
|
||||
---------------------
|
||||
Only one dialog can be shown at a time. If a dialog is closed it's parent is
|
||||
gonna be activated and shown again.
|
||||
|
||||
dialog_create(name, cbf_formspec, cbf_button_handler, cbf_events)
|
||||
^ create a dialog component
|
||||
^ name: name of component (unique per ui)
|
||||
^ cbf_formspec: function to be called to get formspec
|
||||
function(dialogdata)
|
||||
^ cbf_button_handler: function to handle buttons
|
||||
function(dialog, fields)
|
||||
^ cbf_events: function to handle events
|
||||
function(dialog, event)
|
||||
|
||||
messagebox(name, message)
|
||||
^ creates a message dialog
|
||||
|
||||
Class reference dialog:
|
||||
|
||||
methods:
|
||||
- set_parent(parent)
|
||||
^ set parent to attach a dialog to
|
||||
^ parent: component to attach to
|
||||
- show()
|
||||
^ show dialog
|
||||
- hide()
|
||||
^ hide dialog
|
||||
- delete()
|
||||
^ delete dialog from ui
|
||||
|
||||
members:
|
||||
- data
|
||||
^ variable data attached to this dialog
|
||||
- parent
|
||||
^ parent component to return to on exit
|
||||
|
||||
File: fst/buttonbar.lua
|
||||
-----------------------
|
||||
|
||||
buttonbar_create(name, cbf_buttonhandler, pos, orientation, size)
|
||||
^ create a buttonbar
|
||||
^ name: name of component (unique per ui)
|
||||
^ cbf_buttonhandler: function to be called on button pressed
|
||||
function(buttonbar,buttonname,buttondata)
|
||||
^ pos: position relative to upper left of current shown formspec
|
||||
{
|
||||
x,
|
||||
y
|
||||
}
|
||||
^ orientation: "vertical" or "horizontal"
|
||||
^ size: size of bar
|
||||
{
|
||||
width,
|
||||
height
|
||||
}
|
||||
|
||||
Class reference buttonbar:
|
||||
|
||||
methods:
|
||||
- add_button(btn_id, caption, button_image)
|
||||
- set_parent(parent)
|
||||
^ set parent to attach a buttonbar to
|
||||
^ parent: component to attach to
|
||||
- show()
|
||||
^ show buttonbar
|
||||
- hide()
|
||||
^ hide buttonbar
|
||||
- delete()
|
||||
^ delete buttonbar from ui
|
||||
|
||||
Developer doc:
|
||||
==============
|
||||
Skeleton for any component:
|
||||
{
|
||||
name = "some id", -- unique id
|
||||
type = "toplevel", -- type of component
|
||||
-- toplevel: component can be show without additional components
|
||||
-- addon: component is an addon to be shown along toplevel component
|
||||
hide = function(this) end, -- called to hide the component
|
||||
show = function(this) end, -- called to show the component
|
||||
delete = function(this) end, -- called to delete component from ui
|
||||
handle_buttons = function(this,fields) -- called upon button press
|
||||
handle_events = function(this,event) -- called upon event reception
|
||||
get_formspec = function(this) -- has to return formspec to be displayed
|
||||
}
|
|
@ -0,0 +1,502 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
|
@ -0,0 +1,8 @@
|
|||
/** @mainpage The Minetest engine internal documentation
|
||||
|
||||
Welcome to the Minetest engine Doxygen documentation site!\n
|
||||
This page documents the internal structure of the Minetest engine's C++ code.\n
|
||||
Use the tree view at the left to navigate.
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
Minetest Lua Mainmenu API Reference 5.4.0
|
||||
=========================================
|
||||
|
||||
Introduction
|
||||
-------------
|
||||
|
||||
The main menu is defined as a formspec by Lua in builtin/mainmenu/
|
||||
Description of formspec language to show your menu is in lua_api.txt
|
||||
|
||||
|
||||
Callbacks
|
||||
---------
|
||||
|
||||
core.button_handler(fields): called when a button is pressed.
|
||||
^ fields = {name1 = value1, name2 = value2, ...}
|
||||
core.event_handler(event)
|
||||
^ event: "MenuQuit", "KeyEnter", "ExitButton" or "EditBoxEnter"
|
||||
|
||||
|
||||
Gamedata
|
||||
--------
|
||||
|
||||
The "gamedata" table is read when calling core.start(). It should contain:
|
||||
{
|
||||
playername = <name>,
|
||||
password = <password>,
|
||||
address = <IP/adress>,
|
||||
port = <port>,
|
||||
selected_world = <index>, -- 0 for client mode
|
||||
singleplayer = <true/false>,
|
||||
}
|
||||
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
core.start()
|
||||
core.close()
|
||||
core.get_min_supp_proto()
|
||||
^ returns the minimum supported network protocol version
|
||||
core.get_max_supp_proto()
|
||||
^ returns the maximum supported network protocol version
|
||||
core.open_url(url)
|
||||
^ opens the URL in a web browser, returns false on failure.
|
||||
^ Must begin with http:// or https://
|
||||
core.get_version() (possible in async calls)
|
||||
^ returns current core version
|
||||
|
||||
|
||||
Filesystem
|
||||
----------
|
||||
|
||||
core.get_builtin_path()
|
||||
^ returns path to builtin root
|
||||
core.create_dir(absolute_path) (possible in async calls)
|
||||
^ absolute_path to directory to create (needs to be absolute)
|
||||
^ returns true/false
|
||||
core.delete_dir(absolute_path) (possible in async calls)
|
||||
^ absolute_path to directory to delete (needs to be absolute)
|
||||
^ returns true/false
|
||||
core.copy_dir(source,destination,keep_soure) (possible in async calls)
|
||||
^ source folder
|
||||
^ destination folder
|
||||
^ keep_source DEFAULT true --> if set to false source is deleted after copying
|
||||
^ returns true/false
|
||||
core.extract_zip(zipfile,destination) [unzip within path required]
|
||||
^ zipfile to extract
|
||||
^ destination folder to extract to
|
||||
^ returns true/false
|
||||
core.sound_play(spec, looped) -> handle
|
||||
^ spec = SimpleSoundSpec (see lua-api.txt)
|
||||
^ looped = bool
|
||||
core.sound_stop(handle)
|
||||
core.get_video_drivers()
|
||||
^ get list of video drivers supported by engine (not all modes are guaranteed to work)
|
||||
^ returns list of available video drivers' settings name and 'friendly' display name
|
||||
^ e.g. { {name="opengl", friendly_name="OpenGL"}, {name="software", friendly_name="Software Renderer"} }
|
||||
^ first element of returned list is guaranteed to be the NULL driver
|
||||
core.get_mapgen_names([include_hidden=false]) -> table of map generator algorithms
|
||||
registered in the core (possible in async calls)
|
||||
core.get_cache_path() -> path of cache
|
||||
|
||||
|
||||
HTTP Requests
|
||||
-------------
|
||||
|
||||
* core.download_file(url, target) (possible in async calls)
|
||||
* url to download, and target to store to
|
||||
* returns true/false
|
||||
* `minetest.get_http_api()` (possible in async calls)
|
||||
* returns `HTTPApiTable` containing http functions.
|
||||
* The returned table contains the functions `fetch_sync`, `fetch_async` and
|
||||
`fetch_async_get` described below.
|
||||
* Function only exists if minetest server was built with cURL support.
|
||||
* `HTTPApiTable.fetch_sync(HTTPRequest req)`: returns HTTPRequestResult
|
||||
* Performs given request synchronously
|
||||
* `HTTPApiTable.fetch_async(HTTPRequest req)`: returns handle
|
||||
* Performs given request asynchronously and returns handle for
|
||||
`HTTPApiTable.fetch_async_get`
|
||||
* `HTTPApiTable.fetch_async_get(handle)`: returns HTTPRequestResult
|
||||
* Return response data for given asynchronous HTTP request
|
||||
|
||||
### `HTTPRequest` definition
|
||||
|
||||
Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
|
||||
|
||||
{
|
||||
url = "http://example.org",
|
||||
|
||||
timeout = 10,
|
||||
-- Timeout for connection in seconds. Default is 3 seconds.
|
||||
|
||||
post_data = "Raw POST request data string" OR {field1 = "data1", field2 = "data2"},
|
||||
-- Optional, if specified a POST request with post_data is performed.
|
||||
-- Accepts both a string and a table. If a table is specified, encodes
|
||||
-- table as x-www-form-urlencoded key-value pairs.
|
||||
-- If post_data is not specified, a GET request is performed instead.
|
||||
|
||||
user_agent = "ExampleUserAgent",
|
||||
-- Optional, if specified replaces the default minetest user agent with
|
||||
-- given string
|
||||
|
||||
extra_headers = { "Accept-Language: en-us", "Accept-Charset: utf-8" },
|
||||
-- Optional, if specified adds additional headers to the HTTP request.
|
||||
-- You must make sure that the header strings follow HTTP specification
|
||||
-- ("Key: Value").
|
||||
|
||||
multipart = boolean
|
||||
-- Optional, if true performs a multipart HTTP request.
|
||||
-- Default is false.
|
||||
}
|
||||
|
||||
### `HTTPRequestResult` definition
|
||||
|
||||
Passed to `HTTPApiTable.fetch` callback. Returned by
|
||||
`HTTPApiTable.fetch_async_get`.
|
||||
|
||||
{
|
||||
completed = true,
|
||||
-- If true, the request has finished (either succeeded, failed or timed
|
||||
-- out)
|
||||
|
||||
succeeded = true,
|
||||
-- If true, the request was successful
|
||||
|
||||
timeout = false,
|
||||
-- If true, the request timed out
|
||||
|
||||
code = 200,
|
||||
-- HTTP status code
|
||||
|
||||
data = "response"
|
||||
}
|
||||
|
||||
|
||||
Formspec
|
||||
--------
|
||||
|
||||
core.update_formspec(formspec)
|
||||
core.get_table_index(tablename) -> index
|
||||
^ can also handle textlists
|
||||
core.formspec_escape(string) -> string
|
||||
^ escapes characters [ ] \ , ; that can not be used in formspecs
|
||||
core.explode_table_event(string) -> table
|
||||
^ returns e.g. {type="CHG", row=1, column=2}
|
||||
^ type: "INV" (no row selected), "CHG" (selected) or "DCL" (double-click)
|
||||
core.explode_textlist_event(string) -> table
|
||||
^ returns e.g. {type="CHG", index=1}
|
||||
^ type: "INV" (no row selected), "CHG" (selected) or "DCL" (double-click)
|
||||
core.set_formspec_prepend(formspec)
|
||||
^ string to be added to every mainmenu formspec, to be used for theming.
|
||||
|
||||
|
||||
GUI
|
||||
---
|
||||
|
||||
core.set_background(type, texturepath,[tile],[minsize])
|
||||
^ type: "background", "overlay", "header" or "footer"
|
||||
^ tile: tile the image instead of scaling (background only)
|
||||
^ minsize: minimum tile size, images are scaled to at least this size prior
|
||||
^ doing tiling (background only)
|
||||
core.set_clouds(<true/false>)
|
||||
core.set_topleft_text(text)
|
||||
core.show_keys_menu()
|
||||
core.show_path_select_dialog(formname, caption, is_file_select)
|
||||
^ shows a path select dialog
|
||||
^ formname is base name of dialog response returned in fields
|
||||
^ -if dialog was accepted "_accepted"
|
||||
^ will be added to fieldname containing the path
|
||||
^ -if dialog was canceled "_cancelled"
|
||||
^ will be added to fieldname value is set to formname itself
|
||||
^ if `is_file_select` is `true`, a file and not a folder will be selected
|
||||
^ returns nil or selected file/folder
|
||||
core.get_screen_info()
|
||||
^ returns {
|
||||
density = <screen density 0.75,1.0,2.0,3.0 ... (dpi)>,
|
||||
display_width = <width of display>,
|
||||
display_height = <height of display>,
|
||||
window_width = <current window width>,
|
||||
window_height = <current window height>
|
||||
}
|
||||
|
||||
|
||||
Content and Packages
|
||||
--------------------
|
||||
|
||||
Content - an installed mod, modpack, game, or texture pack (txt)
|
||||
Package - content which is downloadable from the content db, may or may not be installed.
|
||||
|
||||
* core.get_modpath() (possible in async calls)
|
||||
* returns path to global modpath
|
||||
* core.get_clientmodpath() (possible in async calls)
|
||||
* returns path to global client-side modpath
|
||||
* core.get_gamepath() (possible in async calls)
|
||||
* returns path to global gamepath
|
||||
* core.get_texturepath() (possible in async calls)
|
||||
* returns path to default textures
|
||||
* core.get_game(index)
|
||||
* returns:
|
||||
|
||||
{
|
||||
id = <id>,
|
||||
path = <full path to game>,
|
||||
gamemods_path = <path>,
|
||||
name = <name of game>,
|
||||
menuicon_path = <full path to menuicon>,
|
||||
author = "author",
|
||||
DEPRECATED:
|
||||
addon_mods_paths = {[1] = <path>,},
|
||||
}
|
||||
|
||||
* core.get_games() -> table of all games in upper format (possible in async calls)
|
||||
* core.get_content_info(path)
|
||||
* returns
|
||||
|
||||
{
|
||||
name = "name of content",
|
||||
type = "mod" or "modpack" or "game" or "txp",
|
||||
description = "description",
|
||||
author = "author",
|
||||
path = "path/to/content",
|
||||
depends = {"mod", "names"}, -- mods only
|
||||
optional_depends = {"mod", "names"}, -- mods only
|
||||
}
|
||||
|
||||
|
||||
Favorites
|
||||
---------
|
||||
|
||||
core.get_favorites(location) -> list of favorites (possible in async calls)
|
||||
^ location: "local" or "online"
|
||||
^ returns {
|
||||
[1] = {
|
||||
clients = <number of clients/nil>,
|
||||
clients_max = <maximum number of clients/nil>,
|
||||
version = <server version/nil>,
|
||||
password = <true/nil>,
|
||||
creative = <true/nil>,
|
||||
damage = <true/nil>,
|
||||
pvp = <true/nil>,
|
||||
description = <server description/nil>,
|
||||
name = <server name/nil>,
|
||||
address = <address of server/nil>,
|
||||
port = <port>
|
||||
clients_list = <array of clients/nil>
|
||||
mods = <array of mods/nil>
|
||||
},
|
||||
...
|
||||
}
|
||||
core.delete_favorite(id, location) -> success
|
||||
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
core.debug(line) (possible in async calls)
|
||||
^ Always printed to stderr and logfile (print() is redirected here)
|
||||
core.log(line) (possible in async calls)
|
||||
core.log(loglevel, line) (possible in async calls)
|
||||
^ loglevel one of "error", "action", "info", "verbose"
|
||||
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
core.settings:set(name, value)
|
||||
core.settings:get(name) -> string or nil (possible in async calls)
|
||||
core.settings:set_bool(name, value)
|
||||
core.settings:get_bool(name) -> bool or nil (possible in async calls)
|
||||
core.settings:save() -> nil, save all settings to config file
|
||||
|
||||
For a complete list of methods of the Settings object see
|
||||
[lua_api.txt](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt)
|
||||
|
||||
|
||||
Worlds
|
||||
------
|
||||
|
||||
core.get_worlds() -> list of worlds (possible in async calls)
|
||||
^ returns {
|
||||
[1] = {
|
||||
path = <full path to world>,
|
||||
name = <name of world>,
|
||||
gameid = <gameid of world>,
|
||||
},
|
||||
}
|
||||
core.create_world(worldname, gameid)
|
||||
core.delete_world(index)
|
||||
|
||||
|
||||
Helpers
|
||||
-------
|
||||
|
||||
core.get_us_time()
|
||||
^ returns time with microsecond precision
|
||||
core.gettext(string) -> string
|
||||
^ look up the translation of a string in the gettext message catalog
|
||||
fgettext_ne(string, ...)
|
||||
^ call core.gettext(string), replace "$1"..."$9" with the given
|
||||
^ extra arguments and return the result
|
||||
fgettext(string, ...) -> string
|
||||
^ same as fgettext_ne(), but calls core.formspec_escape before returning result
|
||||
core.parse_json(string[, nullvalue]) -> something (possible in async calls)
|
||||
^ see core.parse_json (lua_api.txt)
|
||||
dump(obj, dumped={})
|
||||
^ Return object serialized as a string
|
||||
string:split(separator)
|
||||
^ eg. string:split("a,b", ",") == {"a","b"}
|
||||
string:trim()
|
||||
^ eg. string.trim("\n \t\tfoo bar\t ") == "foo bar"
|
||||
core.is_yes(arg) (possible in async calls)
|
||||
^ returns whether arg can be interpreted as yes
|
||||
minetest.encode_base64(string) (possible in async calls)
|
||||
^ Encodes a string in base64.
|
||||
minetest.decode_base64(string) (possible in async calls)
|
||||
^ Decodes a string encoded in base64.
|
||||
|
||||
|
||||
Async
|
||||
-----
|
||||
|
||||
core.handle_async(async_job,parameters,finished)
|
||||
^ execute a function asynchronously
|
||||
^ async_job is a function receiving one parameter and returning one parameter
|
||||
^ parameters parameter table passed to async_job
|
||||
^ finished function to be called once async_job has finished
|
||||
^ the result of async_job is passed to this function
|
||||
|
||||
Limitations of Async operations
|
||||
-No access to global lua variables, don't even try
|
||||
-Limited set of available functions
|
||||
e.g. No access to functions modifying menu like core.start,core.close,
|
||||
core.show_path_select_dialog
|
||||
|
||||
|
||||
Background music
|
||||
----------------
|
||||
|
||||
The main menu supports background music.
|
||||
It looks for a `main_menu` sound in `$USER_PATH/sounds`. The same naming
|
||||
conventions as for normal sounds apply.
|
||||
This means the player can add a custom sound.
|
||||
It will be played in the main menu (gain = 1.0), looped.
|
|
@ -0,0 +1,134 @@
|
|||
.TH minetest 6 "2 February 2019" "" ""
|
||||
|
||||
.SH NAME
|
||||
minetest, minetestserver \- Multiplayer infinite-world block sandbox
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B minetest
|
||||
[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR]
|
||||
[\fBCOMMON OPTIONS\fR]
|
||||
[\fBWORLD PATH\fR]
|
||||
|
||||
.B minetestserver
|
||||
[\fBSERVER OPTIONS\fR]
|
||||
[\fBCOMMON OPTIONS\fR]
|
||||
[\fBWORLD PATH\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B Minetest is one of the first InfiniMiner/Minecraft(/whatever) inspired games
|
||||
(started October 2010), with a goal of taking the survival multiplayer gameplay
|
||||
in a slightly different direction.
|
||||
.PP
|
||||
The main design philosophy is to keep it technically simple, stable and
|
||||
portable. It will be kept lightweight enough to run on fairly old hardware.
|
||||
|
||||
.SH COMMON OPTIONS
|
||||
.TP
|
||||
.B \-\-help
|
||||
Print allowed options and exit
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print version information and exit
|
||||
.TP
|
||||
.B \-\-config <value>
|
||||
Load configuration from specified file
|
||||
.TP
|
||||
.B \-\-logfile <value>
|
||||
Set logfile path ('' for no logging)
|
||||
.TP
|
||||
.B \-\-info
|
||||
Print more information to console
|
||||
.TP
|
||||
.B \-\-verbose
|
||||
Print even more information to console
|
||||
.TP
|
||||
.B \-\-trace
|
||||
Print enormous amounts of information to console
|
||||
.TP
|
||||
.B \-\-quiet
|
||||
Print only errors to console
|
||||
.TP
|
||||
.B \-\-color <value>
|
||||
Colorize the logs ('always', 'never' or 'auto'), defaults to 'auto'
|
||||
.TP
|
||||
.B \-\-gameid <value> | list
|
||||
Set gameid or list available ones
|
||||
.TP
|
||||
.B \-\-worldname <value>
|
||||
Set world path by name
|
||||
.TP
|
||||
.B \-\-world <value>
|
||||
Set world path
|
||||
.TP
|
||||
.B \-\-worldlist path | name | both
|
||||
Get list of worlds ('path' lists paths, 'name' lists names, 'both' lists both)
|
||||
.TP
|
||||
.B \-\-map\-dir <value>
|
||||
Same as \-\-world (deprecated)
|
||||
.TP
|
||||
.B \-\-port <value>
|
||||
Set network port (UDP) to use
|
||||
.TP
|
||||
.B \-\-run\-unittests
|
||||
Run unit tests and exit
|
||||
|
||||
.SH CLIENT OPTIONS
|
||||
.TP
|
||||
.B \-\-address <value>
|
||||
Address to connect to
|
||||
.TP
|
||||
.B \-\-go
|
||||
Disable main menu
|
||||
.TP
|
||||
.B \-\-name <value>
|
||||
Set player name
|
||||
.TP
|
||||
.B \-\-password <value>
|
||||
Set password
|
||||
.TP
|
||||
.B \-\-password\-file <value>
|
||||
Set password from contents of file
|
||||
.TP
|
||||
.B \-\-random\-input
|
||||
Enable random user input, for testing (client only)
|
||||
.TP
|
||||
.B \-\-videomodes
|
||||
List available video modes (client only)
|
||||
.TP
|
||||
.B \-\-speedtests
|
||||
Run speed tests
|
||||
|
||||
.SH SERVER OPTIONS
|
||||
.TP
|
||||
.B \-\-migrate <value>
|
||||
Migrate from current map backend to another. Possible values are sqlite3,
|
||||
leveldb, redis, postgresql, and dummy.
|
||||
.TP
|
||||
.B \-\-migrate-auth <value>
|
||||
Migrate from current auth backend to another. Possible values are sqlite3,
|
||||
leveldb, and files.
|
||||
.TP
|
||||
.B \-\-migrate-players <value>
|
||||
Migrate from current players backend to another. Possible values are sqlite3,
|
||||
leveldb, postgresql, dummy, and files.
|
||||
.TP
|
||||
.B \-\-terminal
|
||||
Display an interactive terminal over ncurses during execution.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B MINETEST_SUBGAME_PATH
|
||||
Colon delimited list of directories to search for games.
|
||||
|
||||
.SH BUGS
|
||||
Please report all bugs at https://github.com/minetest/minetest/issues.
|
||||
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
Perttu Ahola <celeron55@gmail.com> and contributors.
|
||||
.PP
|
||||
This man page was originally written by
|
||||
Juhani Numminen <juhaninumminen0@gmail.com>.
|
||||
|
||||
.SH WWW
|
||||
http://www.minetest.net/
|
|
@ -0,0 +1,2 @@
|
|||
.so man6/minetest.6
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# Patch Python-Markdown
|
||||
MARKDOWN_FILE=$(pip show markdown | awk '/Location/ { print $2 }')/markdown/extensions/codehilite.py
|
||||
patch -N -r - $MARKDOWN_FILE lua_highlight.patch || true
|
||||
|
||||
# Split lua_api.txt on top level headings
|
||||
cat ../lua_api.txt | csplit -sz -f docs/section - '/^=/-1' '{*}'
|
||||
|
||||
cat > mkdocs.yml << EOF
|
||||
site_name: Minetest API Documentation
|
||||
theme:
|
||||
name: readthedocs
|
||||
highlightjs: False
|
||||
extra_css:
|
||||
- css/code_styles.css
|
||||
- css/extra.css
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: True
|
||||
- codehilite
|
||||
plugins:
|
||||
- search:
|
||||
separator: '[\s\-\.\(]+'
|
||||
nav:
|
||||
- "Home": index.md
|
||||
EOF
|
||||
|
||||
mv docs/section00 docs/index.md
|
||||
|
||||
for f in docs/section*
|
||||
do
|
||||
title=$(head -1 $f)
|
||||
fname=$(echo $title | tr '[:upper:]' '[:lower:]')
|
||||
fname=$(echo $fname | sed 's/ /-/g')
|
||||
fname=$(echo $fname | sed "s/'//g").md
|
||||
mv $f docs/$fname
|
||||
echo "- \"$title\": $fname" >> mkdocs.yml
|
||||
done
|
||||
|
||||
mkdocs build --site-dir ../../public
|
|
@ -0,0 +1,68 @@
|
|||
.codehilite .hll { background-color: #ffffcc }
|
||||
.codehilite .c { color: #408080; font-style: italic } /* Comment */
|
||||
/* .codehilite .err { border: 1px solid #FF0000 } /* Error */
|
||||
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
|
||||
.codehilite .o { color: #666666 } /* Operator */
|
||||
.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
|
||||
.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
||||
.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
|
||||
.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
|
||||
.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
|
||||
.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
|
||||
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.codehilite .ge { font-style: italic } /* Generic.Emph */
|
||||
.codehilite .gr { color: #FF0000 } /* Generic.Error */
|
||||
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.codehilite .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.codehilite .go { color: #888888 } /* Generic.Output */
|
||||
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
||||
.codehilite .gs { font-weight: bold } /* Generic.Strong */
|
||||
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
||||
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
||||
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
||||
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
|
||||
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
||||
.codehilite .kt { color: #B00040 } /* Keyword.Type */
|
||||
.codehilite .m { color: #666666 } /* Literal.Number */
|
||||
.codehilite .s { color: #BA2121 } /* Literal.String */
|
||||
.codehilite .na { color: #7D9029 } /* Name.Attribute */
|
||||
.codehilite .nb { color: #008000 } /* Name.Builtin */
|
||||
.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
||||
.codehilite .no { color: #880000 } /* Name.Constant */
|
||||
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
|
||||
.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
|
||||
.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
|
||||
.codehilite .nf { color: #0000FF } /* Name.Function */
|
||||
.codehilite .nl { color: #A0A000 } /* Name.Label */
|
||||
.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
||||
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
||||
.codehilite .nv { color: #19177C } /* Name.Variable */
|
||||
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
||||
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.codehilite .mb { color: #666666 } /* Literal.Number.Bin */
|
||||
.codehilite .mf { color: #666666 } /* Literal.Number.Float */
|
||||
.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
|
||||
.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
|
||||
.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
|
||||
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
|
||||
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
|
||||
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
|
||||
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
||||
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
||||
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
|
||||
.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
||||
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
||||
.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
|
||||
.codehilite .sx { color: #008000 } /* Literal.String.Other */
|
||||
.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
|
||||
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
|
||||
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
|
||||
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
||||
.codehilite .fm { color: #0000FF } /* Name.Function.Magic */
|
||||
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
|
||||
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
|
||||
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
|
||||
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
|
||||
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
|
|
@ -0,0 +1,15 @@
|
|||
/* Fix partly obscured last TOC element */
|
||||
.wy-menu {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Use Minetest green instead of blue */
|
||||
.wy-nav-content a {
|
||||
color: hsl(100, 40%, 40%);
|
||||
}
|
||||
.wy-nav-content a:hover {
|
||||
color: hsl(100, 30%, 30%);
|
||||
}
|
||||
.wy-side-nav-search, .wy-nav-top, .wy-menu-vertical a:active {
|
||||
background: hsl(100, 40%, 40%);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../../../../misc/minetest-icon.ico
|
|
@ -0,0 +1,9 @@
|
|||
@@ -75,7 +75,7 @@
|
||||
css_class="codehilite", lang=None, style='default',
|
||||
noclasses=False, tab_length=4, hl_lines=None, use_pygments=True):
|
||||
self.src = src
|
||||
- self.lang = lang
|
||||
+ self.lang = "lua"
|
||||
self.linenums = linenums
|
||||
self.guess_lang = guess_lang
|
||||
self.css_class = css_class
|
After Width: | Height: | Size: 341 KiB |
|
@ -0,0 +1,110 @@
|
|||
Minetest protocol (incomplete, early draft):
|
||||
Updated 2011-06-18
|
||||
|
||||
A custom protocol over UDP.
|
||||
Integers are big endian.
|
||||
Refer to connection.{h,cpp} for further reference.
|
||||
|
||||
Initialization:
|
||||
- A dummy reliable packet with peer_id=PEER_ID_INEXISTENT=0 is sent to the server:
|
||||
- Actually this can be sent without the reliable packet header, too, i guess,
|
||||
but the sequence number in the header allows the sender to re-send the
|
||||
packet without accidentally getting a double initialization.
|
||||
- Packet content:
|
||||
# Basic header
|
||||
u32 protocol_id = PROTOCOL_ID = 0x4f457403
|
||||
u16 sender_peer_id = PEER_ID_INEXISTENT = 0
|
||||
u8 channel = 0
|
||||
# Reliable packet header
|
||||
u8 type = TYPE_RELIABLE = 3
|
||||
u16 seqnum = SEQNUM_INITIAL = 65500
|
||||
# Original packet header
|
||||
u8 type = TYPE_ORIGINAL = 1
|
||||
# And no actual payload.
|
||||
- Server responds with something like this:
|
||||
- Packet content:
|
||||
# Basic header
|
||||
u32 protocol_id = PROTOCOL_ID = 0x4f457403
|
||||
u16 sender_peer_id = PEER_ID_INEXISTENT = 0
|
||||
u8 channel = 0
|
||||
# Reliable packet header
|
||||
u8 type = TYPE_RELIABLE = 3
|
||||
u16 seqnum = SEQNUM_INITIAL = 65500
|
||||
# Control packet header
|
||||
u8 type = TYPE_CONTROL = 0
|
||||
u8 controltype = CONTROLTYPE_SET_PEER_ID = 1
|
||||
u16 peer_id_new = assigned peer id to client (other than 0 or 1)
|
||||
- Then the connection can be disconnected by sending:
|
||||
- Packet content:
|
||||
# Basic header
|
||||
u32 protocol_id = PROTOCOL_ID = 0x4f457403
|
||||
u16 sender_peer_id = whatever was gotten in CONTROLTYPE_SET_PEER_ID
|
||||
u8 channel = 0
|
||||
# Control packet header
|
||||
u8 type = TYPE_CONTROL = 0
|
||||
u8 controltype = CONTROLTYPE_DISCO = 3
|
||||
|
||||
- Here's a quick untested connect-disconnect done in PHP:
|
||||
# host: ip of server (use gethostbyname(hostname) to get from a dns name)
|
||||
# port: port of server
|
||||
function check_if_minetestserver_up($host, $port)
|
||||
{
|
||||
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||
$timeout = array("sec" => 1, "usec" => 0);
|
||||
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $timeout);
|
||||
$buf = "\x4f\x45\x74\x03\x00\x00\x00\x03\xff\xdc\x01";
|
||||
socket_sendto($socket, $buf, strlen($buf), 0, $host, $port);
|
||||
$buf = socket_read($socket, 1000);
|
||||
if($buf != "")
|
||||
{
|
||||
# We got a reply! read the peer id from it.
|
||||
$peer_id = substr($buf, 9, 2);
|
||||
|
||||
# Disconnect
|
||||
$buf = "\x4f\x45\x74\x03".$peer_id."\x00\x00\x03";
|
||||
socket_sendto($socket, $buf, strlen($buf), 0, $host, $port);
|
||||
socket_close($socket);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
- Here's a Python script for checking if a minetest server is up, confirmed working
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import sys, time, socket
|
||||
|
||||
address = ""
|
||||
port = 30000
|
||||
if len(sys.argv) <= 1:
|
||||
print("Usage: %s <address>" % sys.argv[0])
|
||||
exit()
|
||||
if ":" in sys.argv[1]:
|
||||
address = sys.argv[1].split(":")[0]
|
||||
try:
|
||||
port = int(sys.argv[1].split(":")[1])
|
||||
except ValueError:
|
||||
print("Please specify a valid port")
|
||||
exit()
|
||||
else:
|
||||
address = sys.argv[1]
|
||||
|
||||
try:
|
||||
start = time.time()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
sock.settimeout(2.0)
|
||||
buf = b"\x4f\x45\x74\x03\x00\x00\x00\x01"
|
||||
sock.sendto(buf, (address, port))
|
||||
data, addr = sock.recvfrom(1000)
|
||||
if data:
|
||||
peer_id = data[12:14]
|
||||
buf = b"\x4f\x45\x74\x03" + peer_id + b"\x00\x00\x03"
|
||||
sock.sendto(buf, (address, port))
|
||||
sock.close()
|
||||
end = time.time()
|
||||
print("%s is up (%0.5fms)" % (sys.argv[1], end - start))
|
||||
else:
|
||||
print("%s seems to be down " % sys.argv[1])
|
||||
except Exception as err:
|
||||
print("%s seems to be down (%s) " % (sys.argv[1], str(err)))
|
|
@ -0,0 +1,259 @@
|
|||
Minetest Texture Pack Reference
|
||||
===============================
|
||||
|
||||
Texture packs allow you to replace textures provided by a mod with your own
|
||||
textures.
|
||||
|
||||
Texture pack directory structure
|
||||
--------------------------------
|
||||
|
||||
textures
|
||||
|-- Texture Pack
|
||||
| |-- texture_pack.conf
|
||||
| |-- screenshot.png
|
||||
| |-- description.txt
|
||||
| |-- override.txt
|
||||
| |-- your_texture_1.png
|
||||
| |-- your_texture_2.png
|
||||
`-- Another Texture Pack
|
||||
|
||||
### Texture Pack
|
||||
This is a directory containing the entire contents of a single texture pack.
|
||||
It can be chosen more or less freely and will also become the name of the
|
||||
texture pack. The name must not be “base”.
|
||||
|
||||
### `texture_pack.conf`
|
||||
A key-value config file with the following keys:
|
||||
|
||||
* `title` - human readable title
|
||||
* `description` - short description, shown in the content tab
|
||||
|
||||
### `description.txt`
|
||||
**Deprecated**, you should use texture_pack.conf instead.
|
||||
|
||||
A file containing a short description of the texture pack to be shown in the
|
||||
content tab.
|
||||
|
||||
### `screenshot.png`
|
||||
A preview image showing an in-game screenshot of this texture pack; it will be
|
||||
shown in the texture packs tab. It should have an aspect ratio of 3:2 and a
|
||||
minimum size of 300×200 pixels.
|
||||
|
||||
### `your_texture_1.png`, `your_texture_2.png`, etc.
|
||||
Any other PNG files will be interpreted as textures. They must have the same
|
||||
names as the textures they are supposed to override. For example, to override
|
||||
the apple texture of Minetest Game, add a PNG file named `default_apple.png`.
|
||||
|
||||
The custom textures do not necceessarily require the same size as their
|
||||
originals, but this might be required for a few particular textures. When
|
||||
unsure, just test your texture pack in-game.
|
||||
|
||||
Texture modifiers
|
||||
-----------------
|
||||
|
||||
See lua_api.txt for texture modifiers
|
||||
|
||||
Special textures
|
||||
----------------
|
||||
|
||||
These texture names are hardcoded into the engine but can also be overwritten
|
||||
by texture packs. All existing fallback textures can be found in the directory
|
||||
`textures/base/pack`.
|
||||
|
||||
### Gameplay textures
|
||||
|
||||
* `bubble.png`: the bubble texture when the player is drowning
|
||||
(default size: 12×12)
|
||||
* `bubble_gone.png`: like `bubble.png`, but denotes lack of breath
|
||||
(transparent by default, same size as bubble.png)
|
||||
|
||||
* `crack_anylength.png`: node overlay texture when digging
|
||||
|
||||
* `crosshair.png`
|
||||
* the crosshair texture in the center of the screen. The settings
|
||||
`crosshair_color` and `crosshair_alpha` are used to create a cross
|
||||
when no texture is found.
|
||||
|
||||
* `object_crosshair.png`
|
||||
* the crosshair seen when pointing at an object. The settings
|
||||
`crosshair_color` and `crosshair_alpha` are used to create a cross
|
||||
when no texture is found.
|
||||
|
||||
* `halo.png`: used for the node highlighting mesh
|
||||
|
||||
* `heart.png`: used to display the health points of the player
|
||||
(default size: 12×12)
|
||||
* `heart_gone.png`: like `heart.png`, but denotes lack of health points
|
||||
(transparent by default, same size as heart.png)
|
||||
|
||||
* `minimap_mask_round.png`: round minimap mask, white gets replaced by the map
|
||||
* `minimap_mask_square.png`: mask used for the square minimap
|
||||
* `minimap_overlay_round.png`: overlay texture for the round minimap
|
||||
* `minimap_overlay_square.png`: overlay texture for the square minimap
|
||||
* `no_texture_airlike.png`: fallback inventory image for airlike nodes
|
||||
* `object_marker_red.png`: texture for players on the minimap
|
||||
* `player_marker.png`: texture for the own player on the square minimap
|
||||
|
||||
* `player.png`: front texture of the 2D upright sprite player
|
||||
* `player_back.png`: back texture of the 2D upright sprite player
|
||||
|
||||
* `progress_bar.png`: foreground texture of the loading screen's progress bar
|
||||
* `progress_bar_bg.png`: background texture of the loading screen's progress bar
|
||||
|
||||
* `moon.png`: texture of the moon. Default texture is generated by Minetest
|
||||
* `moon_tonemap.png`: tonemap to be used when `moon.png` was found
|
||||
* `sun.png`: texture of the sun. Default texture is generated by Minetest
|
||||
* `sun_tonemap.png`: tonemap to be used when `sun.png` was found
|
||||
* `sunrisebg.png`: shown sky texture when the sun rises
|
||||
|
||||
* `smoke_puff.png`: texture used when an object died by punching
|
||||
|
||||
* `unknown_item.png`: shown texture when an item definition was not found
|
||||
* `unknown_node.png`: shown texture when a node definition was not found
|
||||
* `unknown_object.png`: shown texture when an entity definition was not found
|
||||
|
||||
* `wieldhand.png`: texture of the wieldhand
|
||||
|
||||
Note: The default textures of `player.png`, `player_back.png` and `wieldhand.png`
|
||||
are placeholders intended to be overwritten by the game.
|
||||
|
||||
### Mainmenu textures
|
||||
|
||||
* `menu_bg.png`: used as mainmenu background when the clouds are disabled
|
||||
* `menu_header.png`: header texture when no texture pack is selected
|
||||
|
||||
* `no_screenshot.png`
|
||||
* texture when no screenshot was found for a texture pack or mod
|
||||
|
||||
* `server_flags_creative.png`: icon for creative servers
|
||||
* `server_flags_damage.png`: icon for enabled damage on servers
|
||||
* `server_flags_favorite.png`: icon for your favorite servers
|
||||
* `server_flags_pvp.png`: icon for enabled PvP on servers
|
||||
|
||||
### Android textures
|
||||
|
||||
* `down_arrow.png`
|
||||
* `left_arrow.png`
|
||||
* `right_arrow.png`
|
||||
* `up_arrow.png`
|
||||
|
||||
* `drop_btn.png`
|
||||
* `fast_btn.png`
|
||||
* `fly_btn.png`
|
||||
* `jump_btn.png`
|
||||
* `noclip_btn.png`
|
||||
|
||||
* `camera_btn.png`
|
||||
* `chat_btn.png`
|
||||
* `inventory_btn.png`
|
||||
* `rangeview_btn.png`
|
||||
|
||||
* `debug_btn.png`
|
||||
* `gear_icon.png`
|
||||
* `rare_controls.png`
|
||||
|
||||
Texture Overrides
|
||||
-----------------
|
||||
|
||||
You can override the textures of nodes and items from a
|
||||
texture pack using texture overrides. To do this, create one or
|
||||
more files in a texture pack called override.txt
|
||||
|
||||
Each line in an override.txt file is a rule. It consists of
|
||||
|
||||
itemname target texture
|
||||
|
||||
For example,
|
||||
|
||||
default:dirt_with_grass sides default_stone.png
|
||||
|
||||
or
|
||||
|
||||
default:sword_steel inventory my_steel_sword.png
|
||||
|
||||
You can list multiple targets on one line as a comma-separated list:
|
||||
|
||||
default:tree top,bottom my_special_tree.png
|
||||
|
||||
You can use texture modifiers, as usual:
|
||||
|
||||
default:dirt_with_grass sides default_stone.png^[brighten
|
||||
|
||||
Finally, if a line is empty or starts with '#' it will be considered
|
||||
a comment and not read as a rule. You can use this to better organize
|
||||
your override.txt files.
|
||||
|
||||
Here are targets you can choose from:
|
||||
|
||||
| target | behavior |
|
||||
|---------------|---------------------------------------------------|
|
||||
| left | x- face |
|
||||
| right | x+ face |
|
||||
| front | z- face |
|
||||
| back | z+ face |
|
||||
| top | y+ face |
|
||||
| bottom | y- face |
|
||||
| sides | x-, x+, z-, z+ faces |
|
||||
| all | All faces. You can also use '*' instead of 'all'. |
|
||||
| special1 | The first entry in the special_tiles list |
|
||||
| special2 | The second entry in the special_tiles list |
|
||||
| special3 | The third entry in the special_tiles list |
|
||||
| special4 | The fourth entry in the special_tiles list |
|
||||
| special5 | The fifth entry in the special_tiles list |
|
||||
| special6 | The sixth entry in the special_tiles list |
|
||||
| inventory | The inventory texture |
|
||||
| wield | The texture used when held by the player |
|
||||
|
||||
Nodes support all targets, but other items only support 'inventory'
|
||||
and 'wield'.
|
||||
|
||||
### Using the special targets
|
||||
|
||||
The special* targets only apply to specific drawtypes:
|
||||
|
||||
* `flowingliquid`: special1 sets the top texture, special2 sets the side texture
|
||||
* `allfaces_optional`: special1 is used by simple mode, see below
|
||||
* `glasslike_framed`: When containing a liquid, special1 sets the liquid texture
|
||||
* `glasslike_framed_optional`: Same as `glasslike_framed`
|
||||
* `plantlike_rooted`: special1 sets the plant's texture
|
||||
|
||||
Designing leaves textures for the leaves rendering options
|
||||
----------------------------------------------------------
|
||||
|
||||
Minetest has three modes for rendering leaves nodes if the node has the
|
||||
`allfaces_optional` drawtype.
|
||||
|
||||
### Fancy
|
||||
|
||||
Uses the texture specified in the `tiles` nodedef field.
|
||||
The texture should have some transparent pixels and be in the RGBA format so
|
||||
that the transparent pixels can have color information.
|
||||
Faces of every leaves node are rendered even if they are inside a solid volume
|
||||
of leaves; this gives a dense appearance.
|
||||
|
||||
### Opaque
|
||||
|
||||
Uses the texture specified in `tiles` but makes it opaque by converting each
|
||||
transparent pixel into an opaque pixel that uses the color information of that
|
||||
transparent pixel.
|
||||
Due to this the `tiles` texture format must be RGBA not 'indexed alpha' to allow
|
||||
each transparent pixel to have color information.
|
||||
|
||||
The colors of the transparent pixels should be set for a good appearance in
|
||||
`opaque` mode. This can be done by painting the pixels the desired colors then
|
||||
erasing them. Then when saving the texture, use the 'save color information from
|
||||
transparent pixels' option (or equivalent).
|
||||
|
||||
### Simple
|
||||
|
||||
Uses the texture specified in the `special_tiles` nodedef field if it exists, if
|
||||
not, the `tiles` texture.
|
||||
The `special_tiles` texture should have fewer transparent pixels than the
|
||||
`tiles` texture and be in the 'indexed alpha' format.
|
||||
|
||||
This mode is between the other two in terms of appearance and rendering load.
|
||||
The nodes are rendered using the `glasslike` drawtype, only showing the surface
|
||||
faces for any solid volume of leaves, not the internal faces.
|
||||
Due to this the `tiles` texture might appear lacking in density, so optionally a
|
||||
`special_tiles` texture can be used to provide a texture with fewer transparent
|
||||
pixels for a denser appearance.
|
|
@ -0,0 +1,564 @@
|
|||
=============================
|
||||
Minetest World Format 22...27
|
||||
=============================
|
||||
|
||||
This applies to a world format carrying the block serialization version
|
||||
22...27, used at least in
|
||||
- 0.4.dev-20120322 ... 0.4.dev-20120606 (22...23)
|
||||
- 0.4.0 (23)
|
||||
- 24 was never released as stable and existed for ~2 days
|
||||
- 27 was added in 0.4.15-dev
|
||||
|
||||
The block serialization version does not fully specify every aspect of this
|
||||
format; if compliance with this format is to be checked, it needs to be
|
||||
done by detecting if the files and data indeed follows it.
|
||||
|
||||
Files
|
||||
======
|
||||
Everything is contained in a directory, the name of which is freeform, but
|
||||
often serves as the name of the world.
|
||||
|
||||
Currently the authentication and ban data is stored on a per-world basis.
|
||||
It can be copied over from an old world to a newly created world.
|
||||
|
||||
World
|
||||
|-- auth.txt ----- Authentication data
|
||||
|-- auth.sqlite -- Authentication data (SQLite alternative)
|
||||
|-- env_meta.txt - Environment metadata
|
||||
|-- ipban.txt ---- Banned ips/users
|
||||
|-- map_meta.txt - Map metadata
|
||||
|-- map.sqlite --- Map data
|
||||
|-- players ------ Player directory
|
||||
| |-- player1 -- Player file
|
||||
| '-- Foo ------ Player file
|
||||
`-- world.mt ----- World metadata
|
||||
|
||||
auth.txt
|
||||
---------
|
||||
Contains authentication data, player per line.
|
||||
<name>:<password hash>:<privilege1,...>
|
||||
|
||||
Legacy format (until 0.4.12) of password hash is <name><password> SHA1'd,
|
||||
in the base64 encoding.
|
||||
|
||||
Format (since 0.4.13) of password hash is #1#<salt>#<verifier>, with the
|
||||
parts inside <> encoded in the base64 encoding.
|
||||
<verifier> is an RFC 2945 compatible SRP verifier,
|
||||
of the given salt, password, and the player's name lowercased,
|
||||
using the 2048-bit group specified in RFC 5054 and the SHA-256 hash function.
|
||||
|
||||
Example lines:
|
||||
- Player "celeron55", no password, privileges "interact" and "shout":
|
||||
celeron55::interact,shout
|
||||
- Player "Foo", password "bar", privilege "shout", with a legacy password hash:
|
||||
foo:iEPX+SQWIR3p67lj/0zigSWTKHg:shout
|
||||
- Player "Foo", password "bar", privilege "shout", with a 0.4.13 pw hash:
|
||||
foo:#1#hPpy4O3IAn1hsNK00A6wNw#Kpu6rj7McsrPCt4euTb5RA5ltF7wdcWGoYMcRngwDi11cZhPuuR9i5Bo7o6A877TgcEwoc//HNrj9EjR/CGjdyTFmNhiermZOADvd8eu32FYK1kf7RMC0rXWxCenYuOQCG4WF9mMGiyTPxC63VAjAMuc1nCZzmy6D9zt0SIKxOmteI75pAEAIee2hx4OkSXRIiU4Zrxo1Xf7QFxkMY4x77vgaPcvfmuzom0y/fU1EdSnZeopGPvzMpFx80ODFx1P34R52nmVl0W8h4GNo0k8ZiWtRCdrJxs8xIg7z5P1h3Th/BJ0lwexpdK8sQZWng8xaO5ElthNuhO8UQx1l6FgEA:shout
|
||||
- Player "bar", no password, no privileges:
|
||||
bar::
|
||||
|
||||
auth.sqlite
|
||||
------------
|
||||
Contains authentification data as an SQLite database. This replaces auth.txt
|
||||
above when auth_backend is set to "sqlite3" in world.mt .
|
||||
|
||||
This database contains two tables "auth" and "user_privileges":
|
||||
|
||||
CREATE TABLE `auth` (
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
`name` VARCHAR(32) UNIQUE,
|
||||
`password` VARCHAR(512),
|
||||
`last_login` INTEGER
|
||||
);
|
||||
CREATE TABLE `user_privileges` (
|
||||
`id` INTEGER,
|
||||
`privilege` VARCHAR(32),
|
||||
PRIMARY KEY (id, privilege)
|
||||
CONSTRAINT fk_id FOREIGN KEY (id) REFERENCES auth (id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
The "name" and "password" fields of the auth table are the same as the auth.txt
|
||||
fields (with modern password hash). The "last_login" field is the last login
|
||||
time as a unix time stamp.
|
||||
|
||||
The "user_privileges" table contains one entry per privilege and player.
|
||||
A player with "interact" and "shout" privileges will have two entries, one
|
||||
with privilege="interact" and the second with privilege="shout".
|
||||
|
||||
env_meta.txt
|
||||
-------------
|
||||
Simple global environment variables.
|
||||
Example content (added indentation):
|
||||
game_time = 73471
|
||||
time_of_day = 19118
|
||||
EnvArgsEnd
|
||||
|
||||
ipban.txt
|
||||
----------
|
||||
Banned IP addresses and usernames.
|
||||
Example content (added indentation):
|
||||
123.456.78.9|foo
|
||||
123.456.78.10|bar
|
||||
|
||||
map_meta.txt
|
||||
-------------
|
||||
Simple global map variables.
|
||||
Example content (added indentation):
|
||||
seed = 7980462765762429666
|
||||
[end_of_params]
|
||||
|
||||
map.sqlite
|
||||
-----------
|
||||
Map data.
|
||||
See Map File Format below.
|
||||
|
||||
player1, Foo
|
||||
-------------
|
||||
Player data.
|
||||
Filename can be anything.
|
||||
See Player File Format below.
|
||||
|
||||
world.mt
|
||||
---------
|
||||
World metadata.
|
||||
Example content (added indentation and - explanations):
|
||||
gameid = mesetint - name of the game
|
||||
enable_damage = true - whether damage is enabled or not
|
||||
creative_mode = false - whether creative mode is enabled or not
|
||||
backend = sqlite3 - which DB backend to use for blocks (sqlite3, dummy, leveldb, redis, postgresql)
|
||||
player_backend = sqlite3 - which DB backend to use for player data
|
||||
readonly_backend = sqlite3 - optionally readonly seed DB (DB file _must_ be located in "readonly" subfolder)
|
||||
server_announce = false - whether the server is publicly announced or not
|
||||
load_mod_<mod> = false - whether <mod> is to be loaded in this world
|
||||
auth_backend = files - which DB backend to use for authentication data
|
||||
|
||||
Player File Format
|
||||
===================
|
||||
|
||||
- Should be pretty self-explanatory.
|
||||
- Note: position is in nodes * 10
|
||||
|
||||
Example content (added indentation):
|
||||
hp = 11
|
||||
name = celeron55
|
||||
pitch = 39.77
|
||||
position = (-5231.97,15,1961.41)
|
||||
version = 1
|
||||
yaw = 101.37
|
||||
PlayerArgsEnd
|
||||
List main 32
|
||||
Item default:torch 13
|
||||
Item default:pick_steel 1 50112
|
||||
Item experimental:tnt
|
||||
Item default:cobble 99
|
||||
Item default:pick_stone 1 13104
|
||||
Item default:shovel_steel 1 51838
|
||||
Item default:dirt 61
|
||||
Item default:rail 78
|
||||
Item default:coal_lump 3
|
||||
Item default:cobble 99
|
||||
Item default:leaves 22
|
||||
Item default:gravel 52
|
||||
Item default:axe_steel 1 2045
|
||||
Item default:cobble 98
|
||||
Item default:sand 61
|
||||
Item default:water_source 94
|
||||
Item default:glass 2
|
||||
Item default:mossycobble
|
||||
Item default:pick_steel 1 64428
|
||||
Item animalmaterials:bone
|
||||
Item default:sword_steel
|
||||
Item default:sapling
|
||||
Item default:sword_stone 1 10647
|
||||
Item default:dirt 99
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
EndInventoryList
|
||||
List craft 9
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
EndInventoryList
|
||||
List craftpreview 1
|
||||
Empty
|
||||
EndInventoryList
|
||||
List craftresult 1
|
||||
Empty
|
||||
EndInventoryList
|
||||
EndInventory
|
||||
|
||||
Map File Format
|
||||
================
|
||||
|
||||
Minetest maps consist of MapBlocks, chunks of 16x16x16 nodes.
|
||||
|
||||
In addition to the bulk node data, MapBlocks stored on disk also contain
|
||||
other things.
|
||||
|
||||
History
|
||||
--------
|
||||
We need a bit of history in here. Initially Minetest stored maps in a
|
||||
format called the "sectors" format. It was a directory/file structure like
|
||||
this:
|
||||
sectors2/XXX/ZZZ/YYYY
|
||||
For example, the MapBlock at (0,1,-2) was this file:
|
||||
sectors2/000/ffd/0001
|
||||
|
||||
Eventually Minetest outgrow this directory structure, as filesystems were
|
||||
struggling under the amount of files and directories.
|
||||
|
||||
Large servers seriously needed a new format, and thus the base of the
|
||||
current format was invented, suggested by celeron55 and implemented by
|
||||
JacobF.
|
||||
|
||||
SQLite3 was slammed in, and blocks files were directly inserted as blobs
|
||||
in a single table, indexed by integer primary keys, oddly mangled from
|
||||
coordinates.
|
||||
|
||||
Today we know that SQLite3 allows multiple primary keys (which would allow
|
||||
storing coordinates separately), but the format has been kept unchanged for
|
||||
that part. So, this is where it has come.
|
||||
</history>
|
||||
|
||||
So here goes
|
||||
-------------
|
||||
map.sqlite is an sqlite3 database, containing a single table, called
|
||||
"blocks". It looks like this:
|
||||
|
||||
CREATE TABLE `blocks` (`pos` INT NOT NULL PRIMARY KEY,`data` BLOB);
|
||||
|
||||
The key
|
||||
--------
|
||||
"pos" is created from the three coordinates of a MapBlock using this
|
||||
algorithm, defined here in Python:
|
||||
|
||||
def getBlockAsInteger(p):
|
||||
return int64(p[2]*16777216 + p[1]*4096 + p[0])
|
||||
|
||||
def int64(u):
|
||||
while u >= 2**63:
|
||||
u -= 2**64
|
||||
while u <= -2**63:
|
||||
u += 2**64
|
||||
return u
|
||||
|
||||
It can be converted the other way by using this code:
|
||||
|
||||
def getIntegerAsBlock(i):
|
||||
x = unsignedToSigned(i % 4096, 2048)
|
||||
i = int((i - x) / 4096)
|
||||
y = unsignedToSigned(i % 4096, 2048)
|
||||
i = int((i - y) / 4096)
|
||||
z = unsignedToSigned(i % 4096, 2048)
|
||||
return x,y,z
|
||||
|
||||
def unsignedToSigned(i, max_positive):
|
||||
if i < max_positive:
|
||||
return i
|
||||
else:
|
||||
return i - 2*max_positive
|
||||
|
||||
The blob
|
||||
---------
|
||||
The blob is the data that would have otherwise gone into the file.
|
||||
|
||||
See below for description.
|
||||
|
||||
MapBlock serialization format
|
||||
==============================
|
||||
NOTE: Byte order is MSB first (big-endian).
|
||||
NOTE: Zlib data is in such a format that Python's zlib at least can
|
||||
directly decompress.
|
||||
|
||||
u8 version
|
||||
- map format version number, see serialisation.h for the latest number
|
||||
|
||||
u8 flags
|
||||
- Flag bitmasks:
|
||||
- 0x01: is_underground: Should be set to 0 if there will be no light
|
||||
obstructions above the block. If/when sunlight of a block is updated
|
||||
and there is no block above it, this value is checked for determining
|
||||
whether sunlight comes from the top.
|
||||
- 0x02: day_night_differs: Whether the lighting of the block is different
|
||||
on day and night. Only blocks that have this bit set are updated when
|
||||
day transforms to night.
|
||||
- 0x04: lighting_expired: Not used in version 27 and above. If true,
|
||||
lighting is invalid and should be updated. If you can't calculate
|
||||
lighting in your generator properly, you could try setting this 1 to
|
||||
everything and setting the uppermost block in every sector as
|
||||
is_underground=0. I am quite sure it doesn't work properly, though.
|
||||
- 0x08: generated: True if the block has been generated. If false, block
|
||||
is mostly filled with CONTENT_IGNORE and is likely to contain eg. parts
|
||||
of trees of neighboring blocks.
|
||||
|
||||
u16 lighting_complete
|
||||
- Added in version 27.
|
||||
- This contains 12 flags, each of them corresponds to a direction.
|
||||
- Indicates if the light is correct at the sides of a map block.
|
||||
Lighting may not be correct if the light changed, but a neighbor
|
||||
block was not loaded at that time.
|
||||
If these flags are false, Minetest will automatically recompute light
|
||||
when both this block and its required neighbor are loaded.
|
||||
- The bit order is:
|
||||
nothing, nothing, nothing, nothing,
|
||||
night X-, night Y-, night Z-, night Z+, night Y+, night X+,
|
||||
day X-, day Y-, day Z-, day Z+, day Y+, day X+.
|
||||
Where 'day' is for the day light bank, 'night' is for the night
|
||||
light bank.
|
||||
The 'nothing' bits should be always set, as they will be used
|
||||
to indicate if direct sunlight spreading is finished.
|
||||
- Example: if the block at (0, 0, 0) has
|
||||
lighting_complete = 0b1111111111111110,
|
||||
then Minetest will correct lighting in the day light bank when
|
||||
the block at (1, 0, 0) is also loaded.
|
||||
|
||||
u8 content_width
|
||||
- Number of bytes in the content (param0) fields of nodes
|
||||
if map format version <= 23:
|
||||
- Always 1
|
||||
if map format version >= 24:
|
||||
- Always 2
|
||||
|
||||
u8 params_width
|
||||
- Number of bytes used for parameters per node
|
||||
- Always 2
|
||||
|
||||
zlib-compressed node data:
|
||||
if content_width == 1:
|
||||
- content:
|
||||
u8[4096]: param0 fields
|
||||
u8[4096]: param1 fields
|
||||
u8[4096]: param2 fields
|
||||
if content_width == 2:
|
||||
- content:
|
||||
u16[4096]: param0 fields
|
||||
u8[4096]: param1 fields
|
||||
u8[4096]: param2 fields
|
||||
- The location of a node in each of those arrays is (z*16*16 + y*16 + x).
|
||||
|
||||
zlib-compressed node metadata list
|
||||
- content:
|
||||
if map format version <= 22:
|
||||
u16 version (=1)
|
||||
u16 count of metadata
|
||||
foreach count:
|
||||
u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
|
||||
u16 type_id
|
||||
u16 content_size
|
||||
u8[content_size] content of metadata. Format depends on type_id, see below.
|
||||
if map format version >= 23:
|
||||
u8 version -- Note: type was u16 for map format version <= 22
|
||||
-- = 1 for map format version < 28
|
||||
-- = 2 since map format version 28
|
||||
u16 count of metadata
|
||||
foreach count:
|
||||
u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
|
||||
u32 num_vars
|
||||
foreach num_vars:
|
||||
u16 key_len
|
||||
u8[key_len] key
|
||||
u32 val_len
|
||||
u8[val_len] value
|
||||
u8 is_private -- only for version >= 2. 0 = not private, 1 = private
|
||||
serialized inventory
|
||||
|
||||
- Node timers
|
||||
if map format version == 23:
|
||||
u8 unused version (always 0)
|
||||
if map format version == 24: (NOTE: Not released as stable)
|
||||
u8 nodetimer_version
|
||||
if nodetimer_version == 0:
|
||||
(nothing else)
|
||||
if nodetimer_version == 1:
|
||||
u16 num_of_timers
|
||||
foreach num_of_timers:
|
||||
u16 timer position (z*16*16 + y*16 + x)
|
||||
s32 timeout*1000
|
||||
s32 elapsed*1000
|
||||
if map format version >= 25:
|
||||
-- Nothing right here, node timers are serialized later
|
||||
|
||||
u8 static object version:
|
||||
- Always 0
|
||||
|
||||
u16 static_object_count
|
||||
|
||||
foreach static_object_count:
|
||||
u8 type (object type-id)
|
||||
s32 pos_x_nodes * 10000
|
||||
s32 pos_y_nodes * 10000
|
||||
s32 pos_z_nodes * 10000
|
||||
u16 data_size
|
||||
u8[data_size] data
|
||||
|
||||
u32 timestamp
|
||||
- Timestamp when last saved, as seconds from starting the game.
|
||||
- 0xffffffff = invalid/unknown timestamp, nothing should be done with the time
|
||||
difference when loaded
|
||||
|
||||
u8 name-id-mapping version
|
||||
- Always 0
|
||||
|
||||
u16 num_name_id_mappings
|
||||
|
||||
foreach num_name_id_mappings
|
||||
u16 id
|
||||
u16 name_len
|
||||
u8[name_len] name
|
||||
|
||||
- Node timers
|
||||
if map format version == 25:
|
||||
u8 length of the data of a single timer (always 2+4+4=10)
|
||||
u16 num_of_timers
|
||||
foreach num_of_timers:
|
||||
u16 timer position (z*16*16 + y*16 + x)
|
||||
s32 timeout*1000
|
||||
s32 elapsed*1000
|
||||
|
||||
EOF.
|
||||
|
||||
Format of nodes
|
||||
----------------
|
||||
A node is composed of the u8 fields param0, param1 and param2.
|
||||
|
||||
if map format version <= 23:
|
||||
The content id of a node is determined as so:
|
||||
- If param0 < 0x80,
|
||||
content_id = param0
|
||||
- Otherwise
|
||||
content_id = (param0<<4) + (param2>>4)
|
||||
if map format version >= 24:
|
||||
The content id of a node is param0.
|
||||
|
||||
The purpose of param1 and param2 depend on the definition of the node.
|
||||
|
||||
The name-id-mapping
|
||||
--------------------
|
||||
The mapping maps node content ids to node names.
|
||||
|
||||
Node metadata format for map format versions <= 22
|
||||
---------------------------------------------------
|
||||
The node metadata are serialized depending on the type_id field.
|
||||
|
||||
1: Generic metadata
|
||||
serialized inventory
|
||||
u32 len
|
||||
u8[len] text
|
||||
u16 len
|
||||
u8[len] owner
|
||||
u16 len
|
||||
u8[len] infotext
|
||||
u16 len
|
||||
u8[len] inventory drawspec
|
||||
u8 allow_text_input (bool)
|
||||
u8 removal_disabled (bool)
|
||||
u8 enforce_owner (bool)
|
||||
u32 num_vars
|
||||
foreach num_vars
|
||||
u16 len
|
||||
u8[len] name
|
||||
u32 len
|
||||
u8[len] value
|
||||
|
||||
14: Sign metadata
|
||||
u16 text_len
|
||||
u8[text_len] text
|
||||
|
||||
15: Chest metadata
|
||||
serialized inventory
|
||||
|
||||
16: Furnace metadata
|
||||
TBD
|
||||
|
||||
17: Locked Chest metadata
|
||||
u16 len
|
||||
u8[len] owner
|
||||
serialized inventory
|
||||
|
||||
Static objects
|
||||
---------------
|
||||
Static objects are persistent freely moving objects in the world.
|
||||
|
||||
Object types:
|
||||
1: Test object
|
||||
2: Item
|
||||
3: Rat (obsolete)
|
||||
4: Oerkki (obsolete)
|
||||
5: Firefly (obsolete)
|
||||
6: MobV2 (obsolete)
|
||||
7: LuaEntity
|
||||
|
||||
1: Item:
|
||||
u8 version
|
||||
version 0:
|
||||
u16 len
|
||||
u8[len] itemstring
|
||||
|
||||
7: LuaEntity:
|
||||
u8 compatibility_byte (always 1)
|
||||
u16 len
|
||||
u8[len] entity name
|
||||
u32 len
|
||||
u8[len] static data
|
||||
s16 hp
|
||||
s32 velocity.x * 10000
|
||||
s32 velocity.y * 10000
|
||||
s32 velocity.z * 10000
|
||||
s32 yaw * 1000
|
||||
if PROTOCOL_VERSION >= 37:
|
||||
u8 version2 (=1)
|
||||
s32 pitch * 1000
|
||||
s32 roll * 1000
|
||||
|
||||
Itemstring format
|
||||
------------------
|
||||
eg. 'default:dirt 5'
|
||||
eg. 'default:pick_wood 21323'
|
||||
eg. '"default:apple" 2'
|
||||
eg. 'default:apple'
|
||||
- The wear value in tools is 0...65535
|
||||
- There are also a number of older formats that you might stumble upon:
|
||||
eg. 'node "default:dirt" 5'
|
||||
eg. 'NodeItem default:dirt 5'
|
||||
eg. 'ToolItem WPick 21323'
|
||||
|
||||
Inventory serialization format
|
||||
-------------------------------
|
||||
- The inventory serialization format is line-based
|
||||
- The newline character used is "\n"
|
||||
- The end condition of a serialized inventory is always "EndInventory\n"
|
||||
- All the slots in a list must always be serialized.
|
||||
|
||||
Example (format does not include "---"):
|
||||
---
|
||||
List foo 4
|
||||
Item default:sapling
|
||||
Item default:sword_stone 1 10647
|
||||
Item default:dirt 99
|
||||
Empty
|
||||
EndInventoryList
|
||||
List bar 9
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
Empty
|
||||
EndInventoryList
|
||||
EndInventory
|
||||
---
|
|
@ -0,0 +1,2 @@
|
|||
Arimo - Apache License, version 2.0
|
||||
Arimo-Regular.ttf: Digitized data copyright (c) 2010-2012 Google Corporation.
|
|
@ -0,0 +1,2 @@
|
|||
Cousine - Apache License, version 2.0
|
||||
Cousine-Regular.ttf: Digitized data copyright (c) 2010-2012 Google Corporation.
|
|
@ -0,0 +1,13 @@
|
|||
Copyright (C) 2012 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 186 KiB |
After Width: | Height: | Size: 196 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 50 KiB |