diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 1ae01610f..0cd9afd54 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -111,9 +111,11 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(Jpeg) +IF(WITH_STATIC_LIBXML2) + SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) +ENDIF(WITH_STATIC_LIBXML2) IF(WITH_STATIC) # libxml2 could need winsock2 library - SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) # on Mac OS X libxml2 requires iconv and liblzma diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 72e2d07e4..4308d0b44 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -247,6 +247,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) ELSE(WIN32) OPTION(WITH_STATIC "With static libraries." OFF) ENDIF(WIN32) + IF (WITH_STATIC) + OPTION(WITH_STATIC_LIBXML2 "With static libxml2" ON ) + ELSE(WITH_STATIC) + OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF) + ENDIF(WITH_STATIC) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) IF(WIN32) OPTION(WITH_EXTERNAL "With provided external." ON ) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 745278cd7..1929135b4 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -68,7 +68,11 @@ IF(WITH_NEL_SAMPLES) ADD_SUBDIRECTORY(samples) ENDIF(WITH_NEL_SAMPLES) -IF(WITH_NEL_TOOLS) - FIND_PACKAGE(Squish) +# Allow to compile only max plugins without other tools. +IF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) + IF(WITH_NEL_TOOLS) + FIND_PACKAGE(Squish) + ENDIF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(tools) -ENDIF(WITH_NEL_TOOLS) +ENDIF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) + diff --git a/code/nel/include/nel/gui/lua_helper.h b/code/nel/include/nel/gui/lua_helper.h index 10b78daa8..69639fc04 100644 --- a/code/nel/include/nel/gui/lua_helper.h +++ b/code/nel/include/nel/gui/lua_helper.h @@ -217,6 +217,7 @@ namespace NLGUI void clear() { setTop(0); } int getTop(); bool empty() { return getTop() == 0; } + void pushGlobalTable(); void pushValue(int index); // copie nth element of stack to the top of the stack void remove(int index); // remove nth element of stack void insert(int index); // insert last element of the stack before the given position @@ -301,7 +302,8 @@ namespace NLGUI /** Helper : Execute a function by name. Lookup for the function is done in the table at the index 'funcTableIndex' * the behaviour is the same than with call of pcall. */ - int pcallByName(const char *functionName, int nargs, int nresults, int funcTableIndex = LUA_GLOBALSINDEX, int errfunc = 0); + int pcallByNameGlobal(const char *functionName, int nargs, int nresults, int errfunc = 0); + int pcallByName(const char *functionName, int nargs, int nresults, int funcTableIndex, int errfunc = 0); // push a C closure (pop n element from the stack and associate with the function) void pushCClosure(lua_CFunction function, int n); @@ -367,6 +369,7 @@ namespace NLGUI CLuaState &operator=(const CLuaState &/* other */) { nlassert(0); return *this; } void executeScriptInternal(const std::string &code, const std::string &dbgSrc, int numRet = 0); + int pcallByNameInternal(const char *functionName, int nargs, int nresults, int errfunc, int initialStackSize); }; diff --git a/code/nel/include/nel/gui/lua_helper_inline.h b/code/nel/include/nel/gui/lua_helper_inline.h index 0b9113ce1..01afd142f 100644 --- a/code/nel/include/nel/gui/lua_helper_inline.h +++ b/code/nel/include/nel/gui/lua_helper_inline.h @@ -42,10 +42,16 @@ inline void CLuaState::checkIndex(int index) //H_AUTO(Lua_CLuaState_checkIndex) // NB : more restrictive test that in the documentation there, because // we don't expose the check stack function +#if LUA_VERSION_NUM >= 502 + nlassert( (index!=0 && abs(index) <= getTop()) + || index == LUA_REGISTRYINDEX + ); +#else nlassert( (index!=0 && abs(index) <= getTop()) || index == LUA_REGISTRYINDEX || index == LUA_GLOBALSINDEX ); +#endif } //================================================================================ @@ -75,6 +81,18 @@ inline void CLuaState::setTop(int index) lua_settop(_State, index); } +//================================================================================ +inline void CLuaState::pushGlobalTable() +{ + //H_AUTO(Lua_CLuaState_pushGlobalTable) +#if LUA_VERSION_NUM >= 502 + lua_pushglobaltable(_State); +#else + checkIndex(LUA_GLOBALSINDEX); + lua_pushvalue(_State, LUA_GLOBALSINDEX); +#endif +} + //================================================================================ inline void CLuaState::pushValue(int index) { @@ -243,7 +261,11 @@ inline size_t CLuaState::strlen(int index) { //H_AUTO(Lua_CLuaState_strlen) checkIndex(index); +#if LUA_VERSION_NUM >= 502 + return lua_rawlen(_State, index); +#else return lua_strlen(_State, index); +#endif } //================================================================================ @@ -342,7 +364,11 @@ inline bool CLuaState::equal(int index1, int index2) //H_AUTO(Lua_CLuaState_equal) checkIndex(index1); checkIndex(index2); +#if LUA_VERSION_NUM >= 502 + return lua_compare(_State, index1, index2, LUA_OPEQ) != 0; +#else return lua_equal(_State, index1, index2) != 0; +#endif } //================================================================================ @@ -376,7 +402,11 @@ inline bool CLuaState::lessThan(int index1, int index2) //H_AUTO(Lua_CLuaState_lessThan) checkIndex(index1); checkIndex(index2); +#if LUA_VERSION_NUM >= 502 + return lua_compare(_State, index1, index2, LUA_OPLT) != 0; +#else return lua_lessthan(_State, index1, index2) != 0; +#endif } diff --git a/code/nel/src/gui/lua_helper.cpp b/code/nel/src/gui/lua_helper.cpp index bc800725b..16dca8d7a 100644 --- a/code/nel/src/gui/lua_helper.cpp +++ b/code/nel/src/gui/lua_helper.cpp @@ -361,7 +361,11 @@ namespace NLGUI rd.Str = &code; rd.Done = false; - int result = lua_load(_State, CHelper::luaChunkReaderFromString, (void *) &rd, dbgSrc.c_str()); + int result = lua_load(_State, CHelper::luaChunkReaderFromString, (void *) &rd, dbgSrc.c_str() +#if LUA_VERSION_NUM >= 502 + , NULL +#endif + ); if (result !=0) { // pop the error code @@ -569,9 +573,17 @@ namespace NLGUI //H_AUTO(Lua_CLuaState_registerFunc) nlassert(function); CLuaStackChecker lsc(this); +#if LUA_VERSION_NUM >= 502 + pushGlobalTable(); +#endif push(name); push(function); +#if LUA_VERSION_NUM >= 502 + setTable(-3); // -3 is the pushGlobalTable + pop(1); // pop the pushGlobalTable value (setTable popped the 2 pushes) +#else setTable(LUA_GLOBALSINDEX); +#endif } @@ -643,13 +655,31 @@ namespace NLGUI } // *************************************************************************** - int CLuaState::pcallByName(const char *functionName, int nargs, int nresults, int funcTableIndex /*=LUA_GLOBALSINDEX*/, int errfunc /*= 0*/) + int CLuaState::pcallByNameGlobal(const char *functionName, int nargs, int nresults, int errfunc /*= 0*/) + { + int initialStackSize = getTop(); + nlassert(functionName); +#if LUA_VERSION_NUM >= 502 + pushGlobalTable(); +#else + nlassert(isTable(LUA_GLOBALSINDEX)); + pushValue(LUA_GLOBALSINDEX); +#endif + return pcallByNameInternal(functionName, nargs, nresults, errfunc, initialStackSize); + } + + int CLuaState::pcallByName(const char *functionName, int nargs, int nresults, int funcTableIndex, int errfunc /*= 0*/) { - //H_AUTO(Lua_CLuaState_pcallByName) int initialStackSize = getTop(); nlassert(functionName); nlassert(isTable(funcTableIndex)); pushValue(funcTableIndex); + return pcallByNameInternal(functionName, nargs, nresults, errfunc, initialStackSize); + } + + int CLuaState::pcallByNameInternal(const char *functionName, int nargs, int nresults, int errfunc /*= 0*/, int initialStackSize) + { + //H_AUTO(Lua_CLuaState_pcallByName) push(functionName); getTable(-2); remove(-2); // get rid of the table @@ -782,7 +812,12 @@ namespace NLGUI int CLuaState::getGCCount() { //H_AUTO(Lua_CLuaState_getGCCount) +#if LUA_VERSION_NUM >= 502 + // deprecated + return 0; +#else return lua_getgccount(_State); +#endif } //================================================================================ diff --git a/code/nel/src/gui/lua_object.cpp b/code/nel/src/gui/lua_object.cpp index a7bbbb7f8..3f8924517 100644 --- a/code/nel/src/gui/lua_object.cpp +++ b/code/nel/src/gui/lua_object.cpp @@ -474,7 +474,11 @@ namespace NLGUI CLuaState *luaState = table.getLuaState(); CLuaStackChecker lsc(luaState); // get pointer to the 'next' function +#if LUA_VERSION_NUM >= 502 + luaState->pushGlobalTable(); +#else luaState->pushValue(LUA_GLOBALSINDEX); +#endif _NextFunction = CLuaObject(*luaState)["next"]; // nlassert(luaState); diff --git a/code/nel/tools/3d/CMakeLists.txt b/code/nel/tools/3d/CMakeLists.txt index 58360aec0..441a83800 100644 --- a/code/nel/tools/3d/CMakeLists.txt +++ b/code/nel/tools/3d/CMakeLists.txt @@ -1,61 +1,75 @@ -SUBDIRS( - build_coarse_mesh - build_far_bank - build_smallbank - ig_lighter - zone_dependencies - zone_ig_lighter - zone_lighter - zone_welder - animation_set_builder - anim_builder - build_clod_bank - build_clodtex - build_interface - build_shadow_skin - cluster_viewer - file_info - get_neighbors - ig_add - ig_info - shapes_exporter - tga_cut - tga_resize - zone_check_bind - zone_dump - zviewer) -IF(WIN32) - ADD_SUBDIRECTORY(ig_elevation) - ADD_SUBDIRECTORY(lightmap_optimizer) +IF(WITH_NEL_TOOLS) + SUBDIRS( + build_coarse_mesh + build_far_bank + build_smallbank + ig_lighter + zone_dependencies + zone_ig_lighter + zone_lighter + zone_welder + animation_set_builder + anim_builder + build_clod_bank + build_clodtex + build_interface + build_shadow_skin + cluster_viewer + file_info + get_neighbors + ig_add + ig_info + shapes_exporter + tga_cut + tga_resize + shape2obj + zone_check_bind + zone_dump + zviewer) + +ENDIF(WITH_NEL_TOOLS) + +# For tools selection of only max plugins +IF(WIN32) IF(MFC_FOUND) ADD_SUBDIRECTORY(object_viewer) - ADD_SUBDIRECTORY(object_viewer_exe) - ADD_SUBDIRECTORY(tile_edit) + IF(WITH_NEL_MAXPLUGIN) + IF(MAXSDK_FOUND) + ADD_SUBDIRECTORY(plugin_max) + ADD_SUBDIRECTORY(ligo) + ENDIF(MAXSDK_FOUND) + ENDIF(WITH_NEL_MAXPLUGIN) ENDIF(MFC_FOUND) - - IF(WITH_NEL_MAXPLUGIN) - IF(MAXSDK_FOUND) - ADD_SUBDIRECTORY(plugin_max) - ADD_SUBDIRECTORY(ligo) - ENDIF(MAXSDK_FOUND) - ENDIF(WITH_NEL_MAXPLUGIN) - ENDIF(WIN32) -IF(WITH_QT) - ADD_SUBDIRECTORY(tile_edit_qt) - ADD_SUBDIRECTORY(object_viewer_qt) - ADD_SUBDIRECTORY(object_viewer_widget) -ENDIF(WITH_QT) +IF(WITH_NEL_TOOLS) -IF(SQUISH_FOUND) + IF(WIN32) + ADD_SUBDIRECTORY(ig_elevation) + ADD_SUBDIRECTORY(lightmap_optimizer) + IF(MFC_FOUND) + ADD_SUBDIRECTORY(object_viewer_exe) + ADD_SUBDIRECTORY(tile_edit) + ENDIF(MFC_FOUND) + ENDIF(WIN32) + + IF(WITH_QT) + ADD_SUBDIRECTORY(tile_edit_qt) + ADD_SUBDIRECTORY(object_viewer_qt) + ADD_SUBDIRECTORY(object_viewer_widget) + ENDIF(WITH_QT) + + IF(SQUISH_FOUND) ADD_SUBDIRECTORY(s3tc_compressor_lib) - ADD_SUBDIRECTORY(panoply_maker) - ADD_SUBDIRECTORY(tga_2_dds) - ADD_SUBDIRECTORY(hls_bank_maker) -ENDIF(SQUISH_FOUND) + ADD_SUBDIRECTORY(panoply_maker) + ADD_SUBDIRECTORY(tga_2_dds) + ADD_SUBDIRECTORY(hls_bank_maker) + ENDIF(SQUISH_FOUND) + + #crash_log_analyser + #shapes_exporter + +ENDIF(WITH_NEL_TOOLS) -#crash_log_analyser -#shapes_exporter diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index 19490309b..bc9949079 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -1271,7 +1271,8 @@ void CObjectViewer::go () // Calc FPS static sint64 lastTime=NLMISC::CTime::getPerformanceTime (); sint64 newTime=NLMISC::CTime::getPerformanceTime (); - float fps = (float)(1.0 / NLMISC::CTime::ticksToSecond (newTime-lastTime)); + sint64 timeDiff = newTime - lastTime; + float fps = timeDiff > 0 ? (float)(1.0 / NLMISC::CTime::ticksToSecond (newTime-lastTime)) : 1000.0f; lastTime=newTime; char msgBar[1024]; uint nbPlayingSources, nbSources; diff --git a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms index 02f07dfe6..06021c45f 100644 --- a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms +++ b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms @@ -574,36 +574,6 @@ plugin material NelMaterial CheckBox cbUseSelfIllumColor "Use Color" checked:false align:#right ) - on cbTwoSided changed bval do - updateUI false - - on cpAmbient changed cval do - updateUI false - - on cpDiffuse changed cval do - updateUI false - - on spOpacity changed pval do - updateUI false - - on cpSpecular changed cval do - updateUI false - - on spSpecularLevel changed pval do - updateUI false - - on spGlossiness changed pval do - updateUI false - - on cpSelfIllumColor changed cval do - updateUI false - - on spSelfIllumAmount changed bval do - updateUI false - - on cbUseSelfIllumColor changed bval do - updateUI false - Fn updateUI update = ( if (version >= 14) then @@ -655,6 +625,36 @@ plugin material NelMaterial ) ) + on cbTwoSided changed bval do + updateUI false + + on cpAmbient changed cval do + updateUI false + + on cpDiffuse changed cval do + updateUI false + + on spOpacity changed pval do + updateUI false + + on cpSpecular changed cval do + updateUI false + + on spSpecularLevel changed pval do + updateUI false + + on spGlossiness changed pval do + updateUI false + + on cpSelfIllumColor changed cval do + updateUI false + + on spSelfIllumAmount changed bval do + updateUI false + + on cbUseSelfIllumColor changed bval do + updateUI false + on nelBasicParameters open do ( updateUI true diff --git a/code/nel/tools/3d/shape2obj/CMakeLists.txt b/code/nel/tools/3d/shape2obj/CMakeLists.txt new file mode 100644 index 000000000..c6fb25ec7 --- /dev/null +++ b/code/nel/tools/3d/shape2obj/CMakeLists.txt @@ -0,0 +1,9 @@ +FILE(GLOB SRC *.cpp) + +ADD_EXECUTABLE(shape2obj ${SRC}) + +TARGET_LINK_LIBRARIES(shape2obj nelmisc nel3d) +NL_DEFAULT_PROPS(shape2obj "NeL, Tools, 3D: shape2obj") +NL_ADD_RUNTIME_FLAGS(shape2obj) + +INSTALL(TARGETS shape2obj RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) diff --git a/code/nel/tools/3d/shape2obj/main.cpp b/code/nel/tools/3d/shape2obj/main.cpp index 91945bdb6..66d9dd6c4 100644 --- a/code/nel/tools/3d/shape2obj/main.cpp +++ b/code/nel/tools/3d/shape2obj/main.cpp @@ -66,7 +66,7 @@ const CIndexBuffer *getRdrPassPrimitiveBlock(const CMeshMRMSkinnedGeom *mesh, ui bool ProcessMeshMRMSkinned(const std::string &filename, IShape *shapeMesh); bool ProcessMeshMRM(const std::string &filename, IShape *shapeMesh); -bool ProcessMesh(const std::string &filename, IShape *shapeMesh); +//bool ProcessMesh(const std::string &filename, IShape *shapeMesh); int main(int argc, char* argv[]) { @@ -110,7 +110,7 @@ int main(int argc, char* argv[]) if (ProcessMeshMRMSkinned(filename, shapeMesh)) return 0; if (ProcessMeshMRM(filename, shapeMesh)) return 0; - if (ProcessMesh(filename, shapeMesh)) return 0; +// if (ProcessMesh(filename, shapeMesh)) return 0; return 0; } @@ -519,6 +519,10 @@ bool ProcessMeshMRM(const std::string &filename, IShape *shapeMesh) return true; } +/* + +TODO: implement this + bool ProcessMesh(const std::string &filename, IShape *shapeMesh) { CMesh *mesh = dynamic_cast(shapeMesh); @@ -666,3 +670,5 @@ bool ProcessMesh(const std::string &filename, IShape *shapeMesh) return true; } + +*/ \ No newline at end of file diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index 49a8abef4..abc5dff02 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -1,28 +1,34 @@ -ADD_SUBDIRECTORY(misc) -ADD_SUBDIRECTORY(memory) +# Don't add other subdirectories if only max plugins are selected. +IF(WITH_NEL_TOOLS) + ADD_SUBDIRECTORY(misc) + ADD_SUBDIRECTORY(memory) +ENDIF(WITH_NEL_TOOLS) + +# Max plugins are under the 3d directory as well. IF(WITH_3D) ADD_SUBDIRECTORY(3d) ENDIF(WITH_3D) -IF(WITH_PACS) - ADD_SUBDIRECTORY(pacs) -ENDIF(WITH_PACS) - -IF(WITH_LOGIC) - ADD_SUBDIRECTORY(logic) -ENDIF(WITH_LOGIC) - -IF(WITH_GEORGES) - ADD_SUBDIRECTORY(georges) -ENDIF(WITH_GEORGES) - -IF(WITH_SOUND) - ADD_SUBDIRECTORY(sound) -ENDIF(WITH_SOUND) - -IF(WITH_NEL_TESTS) - ADD_SUBDIRECTORY(nel_unit_test) -ENDIF(WITH_NEL_TESTS) - -#build_gamedata +# Don't add other subdirectories if only max plugins are selected. +IF(WITH_NEL_TOOLS) + IF(WITH_PACS) + ADD_SUBDIRECTORY(pacs) + ENDIF(WITH_PACS) + + IF(WITH_LOGIC) + ADD_SUBDIRECTORY(logic) + ENDIF(WITH_LOGIC) + + IF(WITH_GEORGES) + ADD_SUBDIRECTORY(georges) + ENDIF(WITH_GEORGES) + + IF(WITH_SOUND) + ADD_SUBDIRECTORY(sound) + ENDIF(WITH_SOUND) + + IF(WITH_NEL_TESTS) + ADD_SUBDIRECTORY(nel_unit_test) + ENDIF(WITH_NEL_TESTS) +ENDIF(WITH_NEL_TOOLS) diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index 991437159..95ed56c46 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -46,6 +46,12 @@ IF(WITH_RYZOM_CLIENT) ENDIF(CURL_STATIC) ADD_SUBDIRECTORY(client) + +ELSEIF(WITH_RYZOM_TOOLS) + + # Need clientsheets lib for sheets packer tool + ADD_SUBDIRECTORY(client) + ENDIF(WITH_RYZOM_CLIENT) IF(WITH_RYZOM_TOOLS) @@ -53,6 +59,14 @@ IF(WITH_RYZOM_TOOLS) ENDIF(WITH_RYZOM_TOOLS) IF(WITH_RYZOM_SERVER) + FIND_PACKAGE(MySQL REQUIRED) ADD_SUBDIRECTORY(server) + +ELSEIF(WITH_RYZOM_TOOLS) + + # Need servershare for build packed collision tool + # Need aishare for build wmap tool + ADD_SUBDIRECTORY(server) + ENDIF(WITH_RYZOM_SERVER) diff --git a/code/ryzom/client/CMakeLists.txt b/code/ryzom/client/CMakeLists.txt index 36090be7b..78cbbbd04 100644 --- a/code/ryzom/client/CMakeLists.txt +++ b/code/ryzom/client/CMakeLists.txt @@ -1,4 +1,9 @@ + +# Need clientsheets lib for sheets packer tool ADD_SUBDIRECTORY(src) + +IF(WITH_RYZOM_CLIENT) + #ADD_SUBDIRECTORY(data) #ADD_SUBDIRECTORY(patcher) @@ -12,3 +17,5 @@ IF(RYZOM_ETC_PREFIX) ELSE(RYZOM_ETC_PREFIX) INSTALL(FILES client_default.cfg DESTINATION etc/ryzom) ENDIF(RYZOM_ETC_PREFIX) + +ENDIF(WITH_RYZOM_CLIENT) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index f95a5c2b6..05c0db137 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -126,24 +126,24 @@ AutoEquipTool = 1; // *** LANDSCAPE -LandscapeTileNear = 150.000000; -LandscapeTileNear_min = 20.000000; -LandscapeTileNear_max = 250.000000; -LandscapeTileNear_step = 10.0; -LandscapeTileNear_ps0 = 20.0; -LandscapeTileNear_ps1 = 100.0; -LandscapeTileNear_ps2 = 150.0; -LandscapeTileNear_ps3 = 200.0; +LandscapeTileNear = 50.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 100.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 40.0; +LandscapeTileNear_ps2 = 50.0; +LandscapeTileNear_ps3 = 80.0; // NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible -LandscapeThreshold = 2000.0; -LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold -LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold -LandscapeThreshold_step = 100.0; -LandscapeThreshold_ps0 = 100.0; -LandscapeThreshold_ps1 = 1000.0; -LandscapeThreshold_ps2 = 2000.0; -LandscapeThreshold_ps3 = 3000.0; +LandscapeThreshold = 1000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 2000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 500.0; +LandscapeThreshold_ps2 = 1000.0; +LandscapeThreshold_ps3 = 2000.0; Vision = 500.000000; Vision_min = 200.000000; diff --git a/code/ryzom/client/client_default.cfg.in b/code/ryzom/client/client_default.cfg.in index 41c3dd1de..030a4a2b2 100644 --- a/code/ryzom/client/client_default.cfg.in +++ b/code/ryzom/client/client_default.cfg.in @@ -126,24 +126,24 @@ AutoEquipTool = 1; // *** LANDSCAPE -LandscapeTileNear = 150.000000; -LandscapeTileNear_min = 20.000000; -LandscapeTileNear_max = 250.000000; -LandscapeTileNear_step = 10.0; -LandscapeTileNear_ps0 = 20.0; -LandscapeTileNear_ps1 = 100.0; -LandscapeTileNear_ps2 = 150.0; -LandscapeTileNear_ps3 = 200.0; +LandscapeTileNear = 50.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 100.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 40.0; +LandscapeTileNear_ps2 = 50.0; +LandscapeTileNear_ps3 = 80.0; // NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible -LandscapeThreshold = 2000.0; -LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold -LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold -LandscapeThreshold_step = 100.0; -LandscapeThreshold_ps0 = 100.0; -LandscapeThreshold_ps1 = 1000.0; -LandscapeThreshold_ps2 = 2000.0; -LandscapeThreshold_ps3 = 3000.0; +LandscapeThreshold = 1000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 2000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 500.0; +LandscapeThreshold_ps2 = 1000.0; +LandscapeThreshold_ps3 = 2000.0; Vision = 500.000000; Vision_min = 200.000000; diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua b/code/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua index 686e21b6c..c2569b301 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua @@ -84,7 +84,7 @@ function bgdownloader:setPatchProgress(progress) self:getPrioCB().active = true local progressPercentText = string.format("%d%%", 100 * progress) - local progressPostfix = math.mod(os.time(), 3) + local progressPostfix = math.fmod(os.time(), 3) local progressDate = nltime.getLocalTime() / 500 local colValue = math.floor(230 + 24 * math.sin(progressDate)) local color = string.format("%d %d %d %d", colValue, colValue, colValue, 255) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/game_r2_loading.lua b/code/ryzom/client/data/gamedev/interfaces_v3/game_r2_loading.lua index dd3af3c88..33a3810d3 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/game_r2_loading.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/game_r2_loading.lua @@ -521,7 +521,7 @@ function GameR2Loading:validateLoading() local filename = GameR2Loading.CurrentFile - if string.find(filename, '\.r2', -3) == nil then + if string.find(filename, '.r2', -3) == nil then messageBox(i18n.get("uiR2EDLoadScenario_InvalidFileName")) return end diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/interaction.lua b/code/ryzom/client/data/gamedev/interfaces_v3/interaction.lua index 07d081874..d36486e99 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/interaction.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/interaction.lua @@ -131,7 +131,7 @@ local function levelToForceRegion(level) end local function levelToLevelForce(level) - return math.floor(math.mod(level, 50) * 5 / 50) + 1 + return math.floor(math.fmod(level, 50) * 5 / 50) + 1 end diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/login_main.xml b/code/ryzom/client/data/gamedev/interfaces_v3/login_main.xml index f6dab0c1e..9d3ff0052 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/login_main.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_main.xml @@ -1,837 +1,837 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -