aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
Commit message (Collapse)AuthorAge
* Add STATIC_LOCALEDIR to BUILD_INFO and move it to version.cppsfan52020-04-27
|
* Android: add Android Studio support, completely redone java part (#9066)Maksim2020-04-15
|
* Update version correctly again (#6462)SmallJoker2017-09-26
| | | | | | | * Update version correctly again Partial revert of PR 6331 * It doesn't update automatically
* Add build date to minetest --version and increase readability (#6331)you2017-09-03
|
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan52015-04-27
|
* Revert "Only lowercase project name at compile time"sfan52015-04-27
| | | | This reverts commit 3be9787e64362b8a5020746220c65abbe31f8097.
* Only lowercase project name at compile timeShadowNinja2015-04-21
|
* Fix Android build-related bugsCraig Robbins2015-03-29
| | | | E.g. Sound and freetype always being disabled, redefinition of pre-processor directives
* Clean up and tweak build systemShadowNinja2015-03-27
| | | | | | | | | | | | | | | | * Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
* serialize.h: use machine native byte swapping if available, fall-back to ↵Rafael Reilova2014-11-21
| | | | | | | | | | | | | | | | | | | | | previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000() nodemetadata.cpp, nodetimer.cpp optimzation: simpler deserialize node position method staticobject.cpp: cleanup: use util/serialize.h inlines instead of its own de/serialization serialize.cpp: minor optimization/cleanup: avoid generation of unneeded string temporary CMakeLists.txt, cmake_config.h.in: detection of endian.h config.h: added HAVE_ENDIAN_H Commits due to feedback squashed Signed-off-by: Craig Robbins <kde.psych@gmail.com>
* Fix android build using hardcoded path for data instead of using the one ↵sapier2014-10-01
| | | | | | fetched by android api on init. Fix android missing version information
* Don't include cmake_config_githash.h into files that don't need itsfan52014-07-25
|
* Add support for Android 2.3+sapier2014-06-29
| | | | | | | | | | | | | There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
* Add redis database backendSfan52014-04-16
|
* Make config honor build system specified config definessapier2014-04-09
|
* Improved win32 file version informationsapier2014-03-02
|
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
|
* Show git hash in version string at top left corner of windowKahrl2013-09-28
|
* Add dummy and LevelDB database backendsIlya Zhuravlev2013-09-09
|
* Add Freetype supportIlya Zhuravlev2013-02-14
|
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
|
* Improve build configuration optionsPerttu Ahola2012-07-23
|
* Build configuration fixes/improvements on WindowsPerttu Ahola2012-03-25
|
* Update/fix/improve config.h and cmake_config.h.inPerttu Ahola2012-03-24
|
* Sanitize GETTEXT usage macrosGiuseppe Bilotta2011-07-24
| | | | | | | Now the user-level option is called ENABLE_GETTEXT, and USE_GETTEXT is only set to true if gettext was enabled and found. This simplifies all check to USE_GETTEXT only rather than the double checks for it being enabled and found.
* Place project name and gettext use in configGiuseppe Bilotta2011-07-24
|
* made old build system to work too. the cmake one doesn't make working ↵Perttu Ahola2011-01-18
binaries for some computers. --HG-- rename : src/config.h.in => src/cmake_config.h.in
top of stack lua_settable(L, -3); return true; } void ScriptApiEntity::luaentity_Activate(u16 id, const std::string &staticdata, u32 dtime_s) { SCRIPTAPI_PRECHECKHEADER verbosestream << "scriptapi_luaentity_activate: id=" << id << std::endl; int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // Get on_activate function lua_getfield(L, -1, "on_activate"); if (!lua_isnil(L, -1)) { luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self lua_pushlstring(L, staticdata.c_str(), staticdata.size()); lua_pushinteger(L, dtime_s); setOriginFromTable(object); PCALL_RES(lua_pcall(L, 3, 0, error_handler)); } else { lua_pop(L, 1); } lua_pop(L, 2); // Pop object and error handler } void ScriptApiEntity::luaentity_Remove(u16 id) { SCRIPTAPI_PRECHECKHEADER verbosestream << "scriptapi_luaentity_rm: id=" << id << std::endl; // Get core.luaentities table lua_getglobal(L, "core"); lua_getfield(L, -1, "luaentities"); luaL_checktype(L, -1, LUA_TTABLE); int objectstable = lua_gettop(L); // Set luaentities[id] = nil lua_pushnumber(L, id); // Push id lua_pushnil(L); lua_settable(L, objectstable); lua_pop(L, 2); // pop luaentities, core } std::string ScriptApiEntity::luaentity_GetStaticdata(u16 id) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_get_staticdata: id="<<id<<std::endl; int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // Get get_staticdata function lua_getfield(L, -1, "get_staticdata"); if (lua_isnil(L, -1)) { lua_pop(L, 2); // Pop entity and get_staticdata return ""; } luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self setOriginFromTable(object); PCALL_RES(lua_pcall(L, 1, 1, error_handler)); lua_remove(L, object); lua_remove(L, error_handler); size_t len = 0; const char *s = lua_tolstring(L, -1, &len); lua_pop(L, 1); // Pop static data return std::string(s, len); } void ScriptApiEntity::luaentity_GetProperties(u16 id, ObjectProperties *prop) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_get_properties: id="<<id<<std::endl; // Get core.luaentities[id] luaentity_get(L, id); // Set default values that differ from ObjectProperties defaults prop->hp_max = 10; /* Read stuff */ prop->hp_max = getintfield_default(L, -1, "hp_max", 10); getboolfield(L, -1, "physical", prop->physical); getboolfield(L, -1, "collide_with_objects", prop->collideWithObjects); getfloatfield(L, -1, "weight", prop->weight); lua_getfield(L, -1, "collisionbox"); if (lua_istable(L, -1)) prop->collisionbox = read_aabb3f(L, -1, 1.0); lua_pop(L, 1); getstringfield(L, -1, "visual", prop->visual); getstringfield(L, -1, "mesh", prop->mesh); // Deprecated: read object properties directly read_object_properties(L, -1, prop); // Read initial_properties lua_getfield(L, -1, "initial_properties"); read_object_properties(L, -1, prop); lua_pop(L, 1); } void ScriptApiEntity::luaentity_Step(u16 id, float dtime) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // State: object is at top of stack // Get step function lua_getfield(L, -1, "on_step"); if (lua_isnil(L, -1)) { lua_pop(L, 2); // Pop on_step and entity return; } luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self lua_pushnumber(L, dtime); // dtime setOriginFromTable(object); PCALL_RES(lua_pcall(L, 2, 0, error_handler)); lua_pop(L, 2); // Pop object and error handler } // Calls entity:on_punch(ObjectRef puncher, time_from_last_punch, // tool_capabilities, direction) void ScriptApiEntity::luaentity_Punch(u16 id, ServerActiveObject *puncher, float time_from_last_punch, const ToolCapabilities *toolcap, v3f dir) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] luaentity_get(L,id); int object = lua_gettop(L); // State: object is at top of stack // Get function lua_getfield(L, -1, "on_punch"); if (lua_isnil(L, -1)) { lua_pop(L, 2); // Pop on_punch and entitu return; } luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self objectrefGetOrCreate(L, puncher); // Clicker reference lua_pushnumber(L, time_from_last_punch); push_tool_capabilities(L, *toolcap); push_v3f(L, dir); setOriginFromTable(object); PCALL_RES(lua_pcall(L, 5, 0, error_handler)); lua_pop(L, 2); // Pop object and error handler } // Calls entity:on_rightclick(ObjectRef clicker) void ScriptApiEntity::luaentity_Rightclick(u16 id, ServerActiveObject *clicker) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; int error_handler = PUSH_ERROR_HANDLER(L); // Get core.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // State: object is at top of stack // Get function lua_getfield(L, -1, "on_rightclick"); if (lua_isnil(L, -1)) { lua_pop(L, 2); // Pop on_rightclick and entity return; } luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self objectrefGetOrCreate(L, clicker); // Clicker reference setOriginFromTable(object); PCALL_RES(lua_pcall(L, 2, 0, error_handler)); lua_pop(L, 2); // Pop object and error handler }