From 0e1d8836a783bb67ed745349f6a13cd1f3107526 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 20 Jul 2012 18:51:50 +0200 Subject: [PATCH 01/97] Fixed: Bad path in ryzom.desktop.in --- code/ryzom/client/unix/ryzom.desktop.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/unix/ryzom.desktop.in b/code/ryzom/client/unix/ryzom.desktop.in index ded90c67f..6c967a61c 100644 --- a/code/ryzom/client/unix/ryzom.desktop.in +++ b/code/ryzom/client/unix/ryzom.desktop.in @@ -3,11 +3,14 @@ Version=1.0 Name=Ryzom Name[ru]=Ризом Type=Application -GenericName=ryzom +GenericName=Game client Comment=Ryzom client Comment[fr_FR]=Client Ryzom -Exec=${RYZOM_BIN_PREFIX}/ryzom_client +TryExec=${RYZOM_GAMES_PREFIX}/ryzom_client +Exec=${RYZOM_GAMES_PREFIX}/ryzom_client Icon=ryzom Terminal=false Hidden=false Categories=Game;RolePlaying; +StartupWMClass=ryzom +X-AppInstall-Package=ryzom-client From 1d35fd5b7b2584e49e6e805f12047f3c10f22b77 Mon Sep 17 00:00:00 2001 From: sfb Date: Mon, 23 Jul 2012 12:26:38 -0500 Subject: [PATCH 02/97] Additional build path ignore. --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index 1fbad60fd..6f730f76e 100644 --- a/.hgignore +++ b/.hgignore @@ -153,6 +153,7 @@ code/nelns/build/* code/snowballs/build/* code/ryzom/build/* code/build/* +code/build-2010/* build/* install/* From 59bdae308e9521fcd446345112522928bb9df35e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 25 Jul 2012 10:13:58 +0200 Subject: [PATCH 03/97] Fixed: Compile error in mfc world editor primitive plugin --- .../world_editor_primitive_plugin/primitive_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h index 416f05204..104f9d007 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h @@ -72,7 +72,7 @@ private: void serial (NLMISC::IStream &s); - static uint getVersion () + static uint getVersion (); void removed() {} }; From d44cbd240cdb56703ab147718b888f479e72271c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 25 Jul 2012 10:15:04 +0200 Subject: [PATCH 04/97] Fixed: Compile error in MFC Object Viewer with sound sheet id as CSheetId --- code/nel/tools/3d/object_viewer/edit_ps_sound.cpp | 10 +++++----- code/nel/tools/3d/object_viewer/pick_sound.cpp | 4 ++-- code/nel/tools/3d/object_viewer/pick_sound.h | 8 ++++---- code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp | 10 +++++----- code/nel/tools/3d/object_viewer/sound_system.cpp | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp b/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp index afb53aa84..891818a43 100644 --- a/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp +++ b/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp @@ -159,7 +159,7 @@ END_MESSAGE_MAP() void CEditPSSound::OnBrowseSound() { // CPickSound::TNameVect names; - vector names; + vector names; NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer(); @@ -172,7 +172,7 @@ void CEditPSSound::OnBrowseSound() if (ps.DoModal() == IDOK) { - m_SoundName = NLMISC::CStringMapper::unmap(ps.getName()).c_str(); + m_SoundName = ps.getName().toString().c_str(); _Sound->setSoundName(ps.getName()); updateModifiedFlag(); UpdateData(FALSE); @@ -184,7 +184,7 @@ BOOL CEditPSSound::OnInitDialog() CDialog::OnInitDialog(); nlassert(_Sound); - m_SoundName = NLMISC::CStringMapper::unmap(_Sound->getSoundName()).c_str(); + m_SoundName = _Sound->getSoundName().toString().c_str(); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control @@ -195,7 +195,7 @@ void CEditPSSound::OnChangeSoundName() { nlassert(_Sound); UpdateData(); - _Sound->setSoundName( NLMISC::CStringMapper::map((LPCTSTR) m_SoundName) ); + _Sound->setSoundName(NLMISC::CSheetId((LPCTSTR)m_SoundName, "sound")); updateModifiedFlag(); } @@ -209,7 +209,7 @@ void CEditPSSound::OnSpawn() // play the currently selected sound void CEditPSSound::OnPlaySound() { - CSoundSystem::play(std::string((LPCTSTR) m_SoundName)); + CSoundSystem::play(std::string((LPCTSTR)m_SoundName)); } void CEditPSSound::OnMute() diff --git a/code/nel/tools/3d/object_viewer/pick_sound.cpp b/code/nel/tools/3d/object_viewer/pick_sound.cpp index 0a6452861..280a65326 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.cpp +++ b/code/nel/tools/3d/object_viewer/pick_sound.cpp @@ -74,7 +74,7 @@ BOOL CPickSound::OnInitDialog() for (TNameVect::iterator it = _Names.begin(); it != _Names.end(); ++it) { - m_NameList.AddString(NLMISC::CStringMapper::unmap(*it).c_str()); + m_NameList.AddString((*it).toString().c_str()); } _Timer = SetTimer (1, 100, NULL); @@ -111,7 +111,7 @@ void CPickSound::OnSelchange() nlassert(m_NameList.GetTextLen(m_NameList.GetCurSel()) < 1024); m_NameList.GetText(m_NameList.GetCurSel(), str); - _CurrName = NLMISC::CStringMapper::map(str); + _CurrName = NLMISC::CSheetId(str, "sound"); } diff --git a/code/nel/tools/3d/object_viewer/pick_sound.h b/code/nel/tools/3d/object_viewer/pick_sound.h index cbcf74601..5331ab912 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.h +++ b/code/nel/tools/3d/object_viewer/pick_sound.h @@ -23,7 +23,7 @@ #endif // _MSC_VER > 1000 // pick_sound.h : header file // -#include "nel/misc/string_mapper.h" +#include "nel/misc/sheet_id.h" #include #include @@ -40,11 +40,11 @@ class CPickSound : public CDialog { // Construction public: - typedef std::vector TNameVect; + typedef std::vector TNameVect; CPickSound(const TNameVect &names, CWnd* pParent = NULL); // standard constructor - const NLMISC::TStringId &getName(void) const { return _CurrName; } + const NLMISC::CSheetId &getName(void) const { return _CurrName; } // Dialog Data //{{AFX_DATA(CPickSound) @@ -63,7 +63,7 @@ public: // Implementation protected: TNameVect _Names; - NLMISC::TStringId _CurrName; + NLMISC::CSheetId _CurrName; UINT_PTR _Timer; diff --git a/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp b/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp index add1d14c0..965ad3d90 100644 --- a/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp @@ -126,18 +126,18 @@ void CSoundAnimDlg::updateSounds() { if (_SelectedMarker != 0) { - vector sounds; + vector sounds; _SelectedMarker->getSounds(sounds); CListBox* list = (CListBox*) GetDlgItem(IDC_SOUND_ANIM_LIST); list->ResetContent(); - vector::iterator iter; + vector::iterator iter; for (iter = sounds.begin(); iter != sounds.end(); iter++) { - list->AddString(CStringMapper::unmap(*iter).c_str()); + list->AddString((*iter).toString().c_str()); } list->UpdateData(); @@ -151,7 +151,7 @@ void CSoundAnimDlg::OnAddSound() if (_SelectedMarker != 0) { // CPickSound::TNameVect names; - vector names; + vector names; NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer(); @@ -183,7 +183,7 @@ void CSoundAnimDlg::OnRemoveSound() if (list->GetText(list->GetCurSel(), s) != LB_ERR) { string name(s); - _SelectedMarker->removeSound(CStringMapper::map(name)); + _SelectedMarker->removeSound(NLMISC::CSheetId(name, "sound")); updateSounds(); } } diff --git a/code/nel/tools/3d/object_viewer/sound_system.cpp b/code/nel/tools/3d/object_viewer/sound_system.cpp index 187a7f5c2..69e10ea18 100644 --- a/code/nel/tools/3d/object_viewer/sound_system.cpp +++ b/code/nel/tools/3d/object_viewer/sound_system.cpp @@ -168,7 +168,7 @@ void CSoundSystem::play(const string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), true); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true); if (src) { src->setLooping(false); @@ -187,7 +187,7 @@ USource *CSoundSystem::create(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), false); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false); if (src) { src->setLooping(false); From 09c3e0880d84a53e3f70bd3ba79ccf946a841940 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 12:36:36 +0200 Subject: [PATCH 05/97] Added: CMake projects for ryzom MFC tools (georges edit and world editor plugins) --- code/ryzom/tools/leveldesign/CMakeLists.txt | 3 +++ .../leveldesign/georges_dll/CMakeLists.txt | 19 ++++++++++++++ .../georges_dll/output_console_dlg.h | 2 +- .../leveldesign/georges_exe/CMakeLists.txt | 12 +++++++++ .../georges_plugin_sound/CMakeLists.txt | 26 +++++++++++++++++++ .../georges_plugin_sound/sound_plugin.cpp | 7 +++-- .../georges_plugin_sound/sound_plugin.h | 4 +-- .../leveldesign/world_editor/CMakeLists.txt | 4 +++ .../CMakeLists.txt | 21 +++++++++++++++ .../world_editor_graph_plugin/CMakeLists.txt | 22 ++++++++++++++++ .../CMakeLists.txt | 22 ++++++++++++++++ .../world_editor_sound_plugin/CMakeLists.txt | 21 +++++++++++++++ 12 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt diff --git a/code/ryzom/tools/leveldesign/CMakeLists.txt b/code/ryzom/tools/leveldesign/CMakeLists.txt index c490de731..fd3ddc94a 100644 --- a/code/ryzom/tools/leveldesign/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/CMakeLists.txt @@ -12,6 +12,9 @@ IF(WIN32) ADD_SUBDIRECTORY(world_editor) IF(WITH_MFC) ADD_SUBDIRECTORY(mission_compiler_fe) + ADD_SUBDIRECTORY(georges_dll) + ADD_SUBDIRECTORY(georges_exe) + ADD_SUBDIRECTORY(georges_plugin_sound) ENDIF(WITH_MFC) ENDIF(WIN32) diff --git a/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt new file mode 100644 index 000000000..92263a73c --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt @@ -0,0 +1,19 @@ + +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(georges_dll SHARED ${SRC} georges_edit.rc) + +INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +TARGET_LINK_LIBRARIES(georges_dll nelmisc nelgeorges) +NL_DEFAULT_PROPS(georges_dll "Ryzom, Tools, Georges: Georges Dll") +NL_ADD_RUNTIME_FLAGS(georges_dll) +NL_ADD_LIB_SUFFIX(georges_dll) + +ADD_DEFINITIONS(${MFC_DEFINITIONS} -DGEORGES_EXPORT) + +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(georges_dll ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.h ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.cpp) +ENDIF(WITH_PCH) + +INSTALL(TARGETS georges_dll LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h index f3bc4a799..cdc9a4745 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h +++ b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h @@ -37,7 +37,7 @@ public: // From CDialog void OnOK () {} - void OnCancel () + void OnCancel (); // Dialog Data //{{AFX_DATA(COutputConsoleDlg) diff --git a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt new file mode 100644 index 000000000..064f1985e --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt @@ -0,0 +1,12 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_DEFINITIONS(${MFC_DEFINITIONS}) +SET(CMAKE_MFC_FLAG 2) +ADD_EXECUTABLE(georges_exe WIN32 ${SRC} georges_exe.rc) + +TARGET_LINK_LIBRARIES(georges_exe nelmisc nelgeorges georges_dll) + +NL_DEFAULT_PROPS(georges_exe "Ryzom, Tools, Georges: Georges Exe") +NL_ADD_RUNTIME_FLAGS(georges_exe) + +INSTALL(TARGETS georges_exe RUNTIME DESTINATION bin COMPONENT tools) diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt new file mode 100644 index 000000000..29f77d650 --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt @@ -0,0 +1,26 @@ + +FILE(GLOB SRC *.cpp *.h) + +# Bugfix... +IF (NOT DXSDK_INCLUDE_DIR) + IF (DXSDK_DIR) + SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include") + ENDIF (DXSDK_DIR) +ENDIF (NOT DXSDK_INCLUDE_DIR) + +IF (NOT DXSDK_INCLUDE_DIR) + message(FATAL_ERROR "Configuration bad, cannot find DirectX include.") +ENDIF (NOT DXSDK_INCLUDE_DIR) + +ADD_LIBRARY(georges_plugin_sound SHARED ${SRC}) + +INCLUDE_DIRECTORIES(georges_plugin_sound ${NEL_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(georges_plugin_sound nelmisc nelgeorges nelsound nelligo nelsnd_lowlevel georges_dll ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY}) +NL_DEFAULT_PROPS(georges_plugin_sound "Ryzom, Tools, Georges: Georges Plugin Sound") +NL_ADD_RUNTIME_FLAGS(georges_plugin_sound) +NL_ADD_LIB_SUFFIX(georges_plugin_sound) + +ADD_DEFINITIONS(${MFC_DEFINITIONS}) + +INSTALL(TARGETS georges_plugin_sound LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp index d20c0347f..9a938eb7c 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp @@ -68,6 +68,9 @@ CSoundPlugin::CSoundPlugin(IEdit *globalInterface) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); + // Initialize without sheet id bin + NLMISC::CSheetId::initWithoutSheet(); + CVector dir; _GlobalInterface = globalInterface; @@ -337,7 +340,7 @@ void CSoundPlugin::setActiveDocument(IEditDocument *pdoc) _Dialog.setName(_Filename); // 1st, try to found the sound in the preloaded sound bank. - _Sound = _Mixer->getSoundId(CStringMapper::map(_Filename)); + _Sound = _Mixer->getSoundId(CSheetId(_Filename, "sound")); if (_Sound == NULL) { // not found, create a new one. @@ -537,7 +540,7 @@ void CSoundPlugin::play(std::string &filename) // point.Name = string("simulation-")+_Sound->getName()+"-000"; region.VPoints.push_back(point); - string name = string("simulation-")+CStringMapper::unmap(_Sound->getName())+"-000"; + string name = string("simulation-")+NLMISC::CFile::getFilenameWithoutExtension(_Sound->getName().toString())+"-000"; if (region.VPoints.back().checkProperty("name")) region.VPoints.back().removePropertyByName("name"); diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h index c95077d68..021749d15 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h @@ -40,7 +40,7 @@ #include "nel/sound/driver/sound_driver.h" #include "nel/sound/driver/source.h" #include "nel/sound/driver/listener.h" -#include "sound/driver/dsound/source_dsound.h" +// #include "sound/driver/dsound/source_dsound.h" #include "nel/sound/u_audio_mixer.h" #include "nel/sound/u_listener.h" @@ -49,7 +49,7 @@ class NLSOUND::IBuffer; class NLSOUND::IListener; class NLSOUND::USource; -class NLSOUND::CSourceDSound; +// class NLSOUND::CSourceDSound; class NLSOUND::CSound; diff --git a/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt index f9d7908eb..4d23d04ec 100644 --- a/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt @@ -3,7 +3,11 @@ ADD_SUBDIRECTORY(land_export_lib) IF(WITH_MFC) ADD_SUBDIRECTORY(world_editor) + ADD_SUBDIRECTORY(world_editor_fauna_graph_plugin) + ADD_SUBDIRECTORY(world_editor_graph_plugin) ADD_SUBDIRECTORY(world_editor_primitive_plugin) + ADD_SUBDIRECTORY(world_editor_shard_monitor_plugin) + ADD_SUBDIRECTORY(world_editor_sound_plugin) ENDIF(WITH_MFC) # This is an old plugin and is deprecated. It doesn't even compile anymore. diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt new file mode 100644 index 000000000..04e11fd50 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt @@ -0,0 +1,21 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_fauna_graph_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_fauna_graph_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel) + +NL_DEFAULT_PROPS(world_editor_fauna_graph_plugin "Ryzom, Tools, World: World Editor Fauna Graph Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_fauna_graph_plugin) +NL_ADD_LIB_SUFFIX(world_editor_fauna_graph_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_fauna_graph_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt new file mode 100644 index 000000000..4fc58a958 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt @@ -0,0 +1,22 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_graph_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_graph_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel + ryzom_mission_compiler_lib) + +NL_DEFAULT_PROPS(world_editor_graph_plugin "Ryzom, Tools, World: World Editor Graph Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_graph_plugin) +NL_ADD_LIB_SUFFIX(world_editor_graph_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_graph_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt new file mode 100644 index 000000000..fdfa3e1ca --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt @@ -0,0 +1,22 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_shard_monitor_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_shard_monitor_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel + ryzom_gameshare) + +NL_DEFAULT_PROPS(world_editor_shard_monitor_plugin "Ryzom, Tools, World: World Editor Shard Monitor Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_shard_monitor_plugin) +NL_ADD_LIB_SUFFIX(world_editor_shard_monitor_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_shard_monitor_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt new file mode 100644 index 000000000..298c0cc0d --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt @@ -0,0 +1,21 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_sound_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_sound_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel) + +NL_DEFAULT_PROPS(world_editor_sound_plugin "Ryzom, Tools, World: World Editor Sound Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_sound_plugin) +NL_ADD_LIB_SUFFIX(world_editor_sound_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_sound_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + From 96d8d45c1d18f1666cb34068de1a5eef79409e0b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 21:20:07 +0200 Subject: [PATCH 06/97] Added: Function and tool to check system timer sanity across cpu cores --- code/nel/include/nel/misc/time_nl.h | 13 ++ code/nel/src/misc/time_nl.cpp | 136 ++++++++++++++++++ code/nel/tools/misc/CMakeLists.txt | 2 + .../tools/misc/probe_timers/CMakeLists.txt | 9 ++ code/nel/tools/misc/probe_timers/main.cpp | 38 +++++ 5 files changed, 198 insertions(+) create mode 100644 code/nel/tools/misc/probe_timers/CMakeLists.txt create mode 100644 code/nel/tools/misc/probe_timers/main.cpp diff --git a/code/nel/include/nel/misc/time_nl.h b/code/nel/include/nel/misc/time_nl.h index 2bd3edb72..9e44b4b36 100644 --- a/code/nel/include/nel/misc/time_nl.h +++ b/code/nel/include/nel/misc/time_nl.h @@ -48,6 +48,19 @@ typedef sint64 TTicks; class CTime { public: + struct CTimerInfo + { + /// Returns if there is a high precision timer that can be used. + bool IsHighPrecisionAvailable; + /// If a CPU specific timer is used and the values are not consistent accross threads. + bool RequiresSingleCore; + /// The resolution of the high resolution timer. + TTicks HighPrecisionResolution; + }; + + /** Get advanced information on the used timers. + */ + static void probeTimerInfo(CTimerInfo &result); /** Return the number of second since midnight (00:00:00), January 1, 1970, * coordinated universal time, according to the system clock. diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index f018208f9..4a3586baa 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -32,9 +32,145 @@ #include "nel/misc/time_nl.h" #include "nel/misc/sstring.h" +#include + namespace NLMISC { +void CTime::probeTimerInfo(CTime::CTimerInfo &result) +{ + breakable + { + #ifdef NL_OS_WINDOWS + LARGE_INTEGER winPerfFreq; + LARGE_INTEGER winPerfCount; + DWORD lowResTime; + if (!QueryPerformanceFrequency(&winPerfFreq)) + { + nldebug("Cannot query performance frequency"); + result.IsHighPrecisionAvailable = false; + } + else + { + result.HighPrecisionResolution = winPerfFreq.QuadPart; + } + if (winPerfFreq.QuadPart == 1000) + { + nldebug("Higher precision timer not available, OS defaulted to GetTickCount"); + result.IsHighPrecisionAvailable = false; + } + if (!QueryPerformanceCounter(&winPerfCount)) + { + nldebug("Cannot query performance counter"); + result.IsHighPrecisionAvailable = false; + result.HighPrecisionResolution = 1000; + } + if (!result.IsHighPrecisionAvailable) + { + lowResTime = timeGetTime(); + } + #else + // nldebug("Probe of timer info not implemented"); + result.IsHighPrecisionAvailable = false; + result.RequiresSingleCore = true; + break; + #endif + + uint64 cpuMask = IProcess::getCurrentProcess()->getCPUMask(); + uint64 threadMask = IThread::getCurrentThread()->getCPUMask(); + + #ifdef NL_OS_WINDOWS + + #else + TTicks timerFrequency = 0; + #endif + + uint identical = 0; // Identical stamps may indicate the os handling backwards glitches. + uint backwards = 0; // Happens when the timers are not always in sync and the implementation is faulty. + uint regular = 0; // How many times the number advanced normally. + uint skipping = 0; // Does not really mean anything necessarily. + uint frequencybug = 0; // Should never happen. + // uint badcore = 0; // Affinity does not work. + + // Cycle 32 times trough all cores, and verify if the timing remains consistent. + for (uint i = 32; i; --i) + { + uint64 currentBit = 1; + for (uint j = 64; j; --j) + { + if (cpuMask & currentBit) + { + IThread::getCurrentThread()->setCPUMask(currentBit); +#ifdef NL_OS_WINDOWS + // Make sure the thread is rescheduled. + SwitchToThread(); + Sleep(0); + // Verify the core + /* Can only verify on 2003, Vista and higher. + if (1 << GetCurrentProcessorNumber() != currentBit) + ++badcore; + */ + // Check if the timer is still sane. + if (result.IsHighPrecisionAvailable) + { + LARGE_INTEGER winPerfFreqN; + LARGE_INTEGER winPerfCountN; + QueryPerformanceFrequency(&winPerfFreqN); + if (winPerfFreqN.QuadPart != winPerfFreq.QuadPart) + ++frequencybug; + QueryPerformanceCounter(&winPerfCountN); + if (winPerfCountN.QuadPart == winPerfCount.QuadPart) + ++identical; + if (winPerfCountN.QuadPart < winPerfCount.QuadPart || winPerfCountN.QuadPart - winPerfCount.QuadPart < 0) + ++backwards; + if (winPerfCountN.QuadPart - winPerfCount.QuadPart > winPerfFreq.QuadPart / 20) // 50ms skipping check + ++skipping; + else if (winPerfCountN.QuadPart > winPerfCount.QuadPart) + ++regular; + winPerfCount.QuadPart = winPerfCountN.QuadPart; + } + else + { + DWORD lowResTimeN; + lowResTimeN = timeGetTime(); + if (lowResTimeN == lowResTime) + ++identical; + if (lowResTimeN < lowResTime || lowResTimeN - lowResTime < 0) + ++backwards; + if (lowResTimeN - lowResTime > 50) + ++skipping; + else if (lowResTimeN > lowResTime) + ++regular; + lowResTime = lowResTimeN; + } +#endif + } + currentBit <<= 1; + } + } + + IThread::getCurrentThread()->setCPUMask(threadMask); + + nldebug("Timer resolution: %i Hz", (int)(result.HighPrecisionResolution)); + nldebug("Time identical: %i, backwards: %i, regular: %i, skipping: %i, frequency bug: %i", identical, backwards, regular, skipping, frequencybug); + if (identical > regular) + nlwarning("The system timer is of relatively low resolution, you may experience issues"); + if (backwards > 0 || frequencybug > 0) + { + nlwarning("The current system timer is not reliable across multiple cpu cores"); + result.RequiresSingleCore = true; + } + else result.RequiresSingleCore = false; + + if (result.HighPrecisionResolution == 14318180) + nldebug("Detected known HPET era timer frequency"); + if (result.HighPrecisionResolution == 3579545) + nldebug("Detected known AHCI era timer frequency"); + if (result.HighPrecisionResolution == 1193182) + nldebug("Detected known i8253/i8254 era timer frequency"); + } +} + /* Return the number of second since midnight (00:00:00), January 1, 1970, * coordinated universal time, according to the system clock. * This values is the same on all computer if computers are synchronized (with NTP for example). diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index fcb259a64..5386cbbc6 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -18,3 +18,5 @@ IF(WIN32) ADD_SUBDIRECTORY(words_dic) ENDIF(MFC_FOUND) ENDIF(WIN32) + +ADD_SUBDIRECTORY(probe_timers) diff --git a/code/nel/tools/misc/probe_timers/CMakeLists.txt b/code/nel/tools/misc/probe_timers/CMakeLists.txt new file mode 100644 index 000000000..df0f34926 --- /dev/null +++ b/code/nel/tools/misc/probe_timers/CMakeLists.txt @@ -0,0 +1,9 @@ +FILE(GLOB SRC *.cpp) + +ADD_EXECUTABLE(nl_probe_timers ${SRC}) + +TARGET_LINK_LIBRARIES(nl_probe_timers nelmisc) +NL_DEFAULT_PROPS(nl_probe_timers "NeL, Tools, Misc: Probe Timers") +NL_ADD_RUNTIME_FLAGS(nl_probe_timers) + +INSTALL(TARGETS nl_probe_timers RUNTIME DESTINATION bin COMPONENT toolsmisc) diff --git a/code/nel/tools/misc/probe_timers/main.cpp b/code/nel/tools/misc/probe_timers/main.cpp new file mode 100644 index 000000000..de4c1f785 --- /dev/null +++ b/code/nel/tools/misc/probe_timers/main.cpp @@ -0,0 +1,38 @@ +// NeL - MMORPG Framework +// Copyright (C) 2012 by authors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include +#include +#include + +#include "nel/misc/types_nl.h" +#include "nel/misc/time_nl.h" + +using namespace NLMISC; + +int main (int argc, char **argv) +{ + for (uint i = 0; i < 8; ++i) + { + CTime::CTimerInfo timerInfo; + CTime::probeTimerInfo(timerInfo); + } + + printf ("\nPress to exit\n"); + getchar (); + + return EXIT_SUCCESS; +} From bf70ca6bb2e3cd92e373205ed55f827e86a2f0cf Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 22:26:49 +0200 Subject: [PATCH 07/97] Added: Function to prefer high resolution local time --- code/nel/include/nel/misc/time_nl.h | 8 +++++- code/nel/src/misc/time_nl.cpp | 44 +++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/time_nl.h b/code/nel/include/nel/misc/time_nl.h index 9e44b4b36..62161e304 100644 --- a/code/nel/include/nel/misc/time_nl.h +++ b/code/nel/include/nel/misc/time_nl.h @@ -86,7 +86,13 @@ public: * time that is the same on all computers. * \warning On Win32, the value is on 32 bits only. It wraps around to 0 every about 49.71 days. */ - static TTime getLocalTime (); + static TTime getLocalTime(); + + /** Same as getLocalTime, but prefers high resolution timers. + * Must call probe once in the beginning of the application before using, + * to ensure the correct settings are applied. + */ + static TTime getLocalTimeHR(); /** Return the time in processor ticks. Use it for profile purpose. * If the performance time is not supported on this hardware, it returns 0. diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 4a3586baa..11a920a79 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -37,6 +37,12 @@ namespace NLMISC { +namespace { +#ifdef NL_OS_WINDOWS +bool a_HaveQueryPerformance = false; +#endif +} + void CTime::probeTimerInfo(CTime::CTimerInfo &result) { breakable @@ -65,6 +71,7 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) result.IsHighPrecisionAvailable = false; result.HighPrecisionResolution = 1000; } + a_HaveQueryPerformance = result.IsHighPrecisionAvailable; if (!result.IsHighPrecisionAvailable) { lowResTime = timeGetTime(); @@ -292,6 +299,43 @@ TTime CTime::getLocalTime () #endif } +#ifdef NL_OS_WINDOWS +namespace { +struct CQPFProvider +{ + CQPFProvider() + { + QueryPerformanceFrequency(&Frequency); + } + LARGE_INTEGER Frequency; +}; +CQPFProvider s_QPFProvider; +} +#endif + +/// Same as above but prefer high resolution timer +TTime CTime::getLocalTimeHR() +{ +#ifdef NL_OS_WINDOWS + if (a_HaveQueryPerformance) + { + // On a (fast) 15MHz timer this rolls over after 7000 days. + // If my calculations are right. + LARGE_INTEGER counter; + QueryPerformanceCounter(&counter); + counter.QuadPart *= 1000; + counter.QuadPart /= s_QPFProvider.Frequency.QuadPart; + } + else + { + // Use default reliable low resolution timer. + return getLocalTime(); + } +#else + // Other OS always use the best available high resolution timer. + return getLocalTime(); +#endif +} /* Return the time in processor ticks. Use it for profile purpose. * If the performance time is not supported on this hardware, it returns 0. From 1c9c2eededb26c27544480202694e29cddb0a497 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 22:33:07 +0200 Subject: [PATCH 08/97] Changed: Simplify some things --- code/nel/include/nel/misc/time_nl.h | 2 +- code/nel/src/misc/time_nl.cpp | 20 ++++---------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/code/nel/include/nel/misc/time_nl.h b/code/nel/include/nel/misc/time_nl.h index 62161e304..ac9ea619c 100644 --- a/code/nel/include/nel/misc/time_nl.h +++ b/code/nel/include/nel/misc/time_nl.h @@ -84,7 +84,7 @@ public: * the value can jump backwards if the system time is changed by a user or a NTP time sync process. * The value is different on 2 different computers; use the CUniTime class to get a universal * time that is the same on all computers. - * \warning On Win32, the value is on 32 bits only. It wraps around to 0 every about 49.71 days. + * \warning On Win32, the value is on 32 bits only, and uses the low-res timer. It wraps around to 0 every about 49.71 days. */ static TTime getLocalTime(); diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 11a920a79..065db103e 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -40,6 +40,7 @@ namespace NLMISC namespace { #ifdef NL_OS_WINDOWS bool a_HaveQueryPerformance = false; +LARGE_INTEGER a_QueryPerformanceFrequency; #endif } @@ -72,6 +73,7 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) result.HighPrecisionResolution = 1000; } a_HaveQueryPerformance = result.IsHighPrecisionAvailable; + a_QueryPerformanceFrequency.QuadPart = winPerfFreq.QuadPart; if (!result.IsHighPrecisionAvailable) { lowResTime = timeGetTime(); @@ -299,20 +301,6 @@ TTime CTime::getLocalTime () #endif } -#ifdef NL_OS_WINDOWS -namespace { -struct CQPFProvider -{ - CQPFProvider() - { - QueryPerformanceFrequency(&Frequency); - } - LARGE_INTEGER Frequency; -}; -CQPFProvider s_QPFProvider; -} -#endif - /// Same as above but prefer high resolution timer TTime CTime::getLocalTimeHR() { @@ -323,8 +311,8 @@ TTime CTime::getLocalTimeHR() // If my calculations are right. LARGE_INTEGER counter; QueryPerformanceCounter(&counter); - counter.QuadPart *= 1000; - counter.QuadPart /= s_QPFProvider.Frequency.QuadPart; + counter.QuadPart *= (LONGLONG)1000L; + counter.QuadPart /= a_QueryPerformanceFrequency.QuadPart; } else { From 6404f8eafaed13ccaef0d937a1ec187d92dff5c3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 22:35:26 +0200 Subject: [PATCH 09/97] Changed: Use the high resolution local time function instead of the funky code when getting the local time in the client. Use the timer probe function to check if it is necessary to set the cpu mask in the client --- code/ryzom/client/src/init.cpp | 7 +++++-- code/ryzom/client/src/time_client.h | 19 ++----------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 11d01934f..bb2540824 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -686,8 +686,11 @@ void prelogInit() #ifdef NL_OS_WINDOWS _control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); #endif // NL_OS_WINDOWS - - setCPUMask(); + + CTime::CTimerInfo timerInfo; + NLMISC::CTime::probeTimerInfo(timerInfo); + if (timerInfo.RequiresSingleCore) // TODO: Also have a FV configuration value to force single core. + setCPUMask(); FPU_CHECKER_ONCE diff --git a/code/ryzom/client/src/time_client.h b/code/ryzom/client/src/time_client.h index 80b21195b..436cf1465 100644 --- a/code/ryzom/client/src/time_client.h +++ b/code/ryzom/client/src/time_client.h @@ -134,24 +134,9 @@ void updateClientTime(); // update smoothed time (useful for sky animation) void updateSmoothedTime(); -inline TTime ryzomGetLocalTime () +inline NLMISC::TTime ryzomGetLocalTime() { -#ifdef NL_OS_WINDOWS - if (ClientCfg.TimerMode == 0) - { - return (TTime)(NLMISC::CTime::ticksToSecond (NLMISC::CTime::getPerformanceTime()) * 1000.0); - } - else // if (ClientCfg.TimerMode == 1) - { - // Use 1 ms timer precision - timeBeginPeriod(1); - DWORD start = timeGetTime(); - timeEndPeriod(1); - return (TTime)start; - } -#else // NL_OS_WINDOWS - return (TTime)(NLMISC::CTime::ticksToSecond (NLMISC::CTime::getPerformanceTime()) * 1000.0); -#endif // NL_OS_WINDOWS + return NLMISC::CTime::getLocalTimeHR(); } inline NLMISC::TTicks ryzomGetPerformanceTime() From 555336bbea88f1c71325ad2104e5200e2a7e4ab7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 22:49:17 +0200 Subject: [PATCH 10/97] Changed: Simplify more --- code/nel/include/nel/misc/time_nl.h | 8 +---- code/nel/src/misc/time_nl.cpp | 45 +++++++++++++---------------- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/code/nel/include/nel/misc/time_nl.h b/code/nel/include/nel/misc/time_nl.h index ac9ea619c..e7deaae24 100644 --- a/code/nel/include/nel/misc/time_nl.h +++ b/code/nel/include/nel/misc/time_nl.h @@ -84,16 +84,10 @@ public: * the value can jump backwards if the system time is changed by a user or a NTP time sync process. * The value is different on 2 different computers; use the CUniTime class to get a universal * time that is the same on all computers. - * \warning On Win32, the value is on 32 bits only, and uses the low-res timer. It wraps around to 0 every about 49.71 days. + * \warning On Win32, the value is on 32 bits only, and uses the low-res timer unless probeTimerInfo was called and a high resolution timer can be used. It wraps around to 0 every about 49.71 days. */ static TTime getLocalTime(); - /** Same as getLocalTime, but prefers high resolution timers. - * Must call probe once in the beginning of the application before using, - * to ensure the correct settings are applied. - */ - static TTime getLocalTimeHR(); - /** Return the time in processor ticks. Use it for profile purpose. * If the performance time is not supported on this hardware, it returns 0. * \warning On a multiprocessor system, the value returned by each processor may diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 065db103e..9237229d7 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -242,9 +242,28 @@ TTime CTime::getLocalTime () //else //{ // This is not affected by system time changes. But it cycles every 49 days. - return timeGetTime(); + // return timeGetTime(); // Only this was left active before it was commented. //} + /* + * The above is no longer relevant. + */ + + if (a_HaveQueryPerformance) + { + // On a (fast) 15MHz timer this rolls over after 7000 days. + // If my calculations are right. + LARGE_INTEGER counter; + QueryPerformanceCounter(&counter); + counter.QuadPart *= (LONGLONG)1000L; + counter.QuadPart /= a_QueryPerformanceFrequency.QuadPart; + } + else + { + // Use default reliable low resolution timer. + return getLocalTime(); + } + #elif defined (NL_OS_UNIX) static bool initdone = false; @@ -301,30 +320,6 @@ TTime CTime::getLocalTime () #endif } -/// Same as above but prefer high resolution timer -TTime CTime::getLocalTimeHR() -{ -#ifdef NL_OS_WINDOWS - if (a_HaveQueryPerformance) - { - // On a (fast) 15MHz timer this rolls over after 7000 days. - // If my calculations are right. - LARGE_INTEGER counter; - QueryPerformanceCounter(&counter); - counter.QuadPart *= (LONGLONG)1000L; - counter.QuadPart /= a_QueryPerformanceFrequency.QuadPart; - } - else - { - // Use default reliable low resolution timer. - return getLocalTime(); - } -#else - // Other OS always use the best available high resolution timer. - return getLocalTime(); -#endif -} - /* Return the time in processor ticks. Use it for profile purpose. * If the performance time is not supported on this hardware, it returns 0. * \warning On a multiprocessor system, the value returned by each processor may From ebabe8ed7364f77ca8923cfb7b206a5198e78f4c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 22:51:38 +0200 Subject: [PATCH 11/97] Fixed: Missed something --- code/ryzom/client/src/time_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/time_client.h b/code/ryzom/client/src/time_client.h index 436cf1465..9243a908d 100644 --- a/code/ryzom/client/src/time_client.h +++ b/code/ryzom/client/src/time_client.h @@ -136,7 +136,7 @@ void updateSmoothedTime(); inline NLMISC::TTime ryzomGetLocalTime() { - return NLMISC::CTime::getLocalTimeHR(); + return NLMISC::CTime::getLocalTime(); } inline NLMISC::TTicks ryzomGetPerformanceTime() From d14bbaf331be0106142f8d616f0f6f9a84e4f58d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 28 Jul 2012 01:32:48 +0200 Subject: [PATCH 12/97] Added: Implementation of timer tests for linux --- code/nel/src/misc/p_thread.cpp | 51 ++++++--- code/nel/src/misc/time_nl.cpp | 184 +++++++++++++++++++++++---------- 2 files changed, 169 insertions(+), 66 deletions(-) diff --git a/code/nel/src/misc/p_thread.cpp b/code/nel/src/misc/p_thread.cpp index 4c4fe1101..ab5530342 100644 --- a/code/nel/src/misc/p_thread.cpp +++ b/code/nel/src/misc/p_thread.cpp @@ -34,16 +34,16 @@ struct CPMainThread : public CPThread { CPMainThread() : CPThread(NULL, 0) { - if(pthread_key_create(&threadSpecificKey, NULL) != 0) + if(pthread_key_create(&threadSpecificKey, NULL) != 0) throw EThread("cannot create thread specific storage key."); if(pthread_setspecific(threadSpecificKey, this) != 0) throw EThread("cannot set main thread ptr in thread specific storage."); } - ~CPMainThread() + ~CPMainThread() { - if(pthread_key_delete(threadSpecificKey) != 0) + if(pthread_key_delete(threadSpecificKey) != 0) throw EThread("cannot delete thread specific storage key."); } }; @@ -139,7 +139,7 @@ void CPThread::start() /* setting the size of the stack also */ ret = pthread_attr_setstacksize(&tattr, _StackSize); } - + bool detach_old_thread = false; pthread_t old_thread_handle; if (_State != ThreadStateNone) @@ -221,6 +221,9 @@ void CPThread::wait () bool CPThread::setCPUMask(uint64 cpuMask) { #ifdef __USE_GNU + + nlwarning("This code does not work. May cause a segmentation fault..."); + sint res = pthread_setaffinity_np(_ThreadHandle, sizeof(uint64), (const cpu_set_t*)&cpuMask); if (res) @@ -228,9 +231,14 @@ bool CPThread::setCPUMask(uint64 cpuMask) nlwarning("pthread_setaffinity_np() returned %d", res); return false; } -#endif // __USE_GNU return true; + +#else // __USE_GNU + + return false; + +#endif // __USE_GNU } /* @@ -238,9 +246,12 @@ bool CPThread::setCPUMask(uint64 cpuMask) */ uint64 CPThread::getCPUMask() { - uint64 cpuMask = 1; - #ifdef __USE_GNU + + nlwarning("This code does not work. May cause a segmentation fault..."); + + uint64 cpuMask = 0; + sint res = pthread_getaffinity_np(_ThreadHandle, sizeof(uint64), (cpu_set_t*)&cpuMask); if (res) @@ -248,9 +259,14 @@ uint64 CPThread::getCPUMask() nlwarning("pthread_getaffinity_np() returned %d", res); return 0; } -#endif // __USE_GNU return cpuMask; + +#else // __USE_GNU + + return 0; + +#endif // __USE_GNU } void CPThread::setPriority(TThreadPriority priority) @@ -311,9 +327,9 @@ IProcess *IProcess::getCurrentProcess () */ uint64 CPProcess::getCPUMask() { - uint64 cpuMask = 1; - #ifdef __USE_GNU + + uint64 cpuMask = 0; sint res = sched_getaffinity(getpid(), sizeof(uint64), (cpu_set_t*)&cpuMask); if (res) @@ -321,15 +337,21 @@ uint64 CPProcess::getCPUMask() nlwarning("sched_getaffinity() returned %d, errno = %d: %s", res, errno, strerror(errno)); return 0; } -#endif // __USE_GNU return cpuMask; + +#else // __USE_GNU + + return 0; + +#endif // __USE_GNU } /// set the CPU mask bool CPProcess::setCPUMask(uint64 cpuMask) { #ifdef __USE_GNU + sint res = sched_setaffinity(getpid(), sizeof(uint64), (const cpu_set_t*)&cpuMask); if (res) @@ -337,9 +359,14 @@ bool CPProcess::setCPUMask(uint64 cpuMask) nlwarning("sched_setaffinity() returned %d, errno = %d: %s", res, errno, strerror(errno)); return false; } -#endif // __USE_GNU return true; + +#else // __USE_GNU + + return false; + +#endif // __USE_GNU } diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 9237229d7..304426e26 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -42,13 +42,63 @@ namespace { bool a_HaveQueryPerformance = false; LARGE_INTEGER a_QueryPerformanceFrequency; #endif +#ifdef NL_OS_UNIX +# if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) +# if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0) +# define NL_MONOTONIC_CLOCK +# endif +# endif +# ifdef NL_MONOTONIC_CLOCK +bool a_CheckedMonotonicClock = false; +bool a_HasMonotonicClock = false; +uint64 a_MonotonicClockFrequency = 0; +uint64 a_MonotonicClockResolutionNs = 0; +bool hasMonotonicClock() +{ + if (!a_CheckedMonotonicClock) + { + /* Initialize the local time engine. + * On Unix, this method will find out if the Monotonic Clock is supported + * (seems supported by kernel 2.6, not by kernel 2.4). See getLocalTime(). + */ + struct timespec tv; + if ((clock_gettime( CLOCK_MONOTONIC, &tv ) == 0) && + (clock_getres( CLOCK_MONOTONIC, &tv ) == 0)) + { +// nldebug( "Monotonic local time supported (resolution %.6f ms)", ((float)tv.tv_sec)*1000.0f + ((float)tv.tv_nsec)/1000000.0f ); + + if (tv.tv_sec > 0) + { + nlwarning("Monotonic clock not ok, resolution > 1s"); + a_HasMonotonicClock = false; + } + else + { + uint64 nsPerTick = tv.tv_nsec; + uint64 nsPerSec = 1000000000L; + uint64 tickPerSec = nsPerSec / nsPerTick; + a_MonotonicClockFrequency = tickPerSec; + a_MonotonicClockResolutionNs = nsPerTick; + a_HasMonotonicClock = true; + } + } + else + { + a_HasMonotonicClock = false; + } + a_CheckedMonotonicClock = true; + } + return a_HasMonotonicClock; +} +# endif +#endif } void CTime::probeTimerInfo(CTime::CTimerInfo &result) { breakable { - #ifdef NL_OS_WINDOWS +#ifdef NL_OS_WINDOWS LARGE_INTEGER winPerfFreq; LARGE_INTEGER winPerfCount; DWORD lowResTime; @@ -78,21 +128,34 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) { lowResTime = timeGetTime(); } - #else - // nldebug("Probe of timer info not implemented"); - result.IsHighPrecisionAvailable = false; - result.RequiresSingleCore = true; - break; - #endif +#else + + // Other platforms are awesome. Generic implementation for now. + TTime localTime = getLocalTime(); + result.IsHighPrecisionAvailable = true; + result.HighPrecisionResolution = 0; + +# ifdef NL_MONOTONIC_CLOCK + timespec monoClock; + if (hasMonotonicClock()) + { + clock_gettime(CLOCK_MONOTONIC, &monoClock); + result.HighPrecisionResolution = a_MonotonicClockFrequency; + } + else + { + nldebug("Monotonic clock not available"); + } +# endif + +#endif uint64 cpuMask = IProcess::getCurrentProcess()->getCPUMask(); - uint64 threadMask = IThread::getCurrentThread()->getCPUMask(); - - #ifdef NL_OS_WINDOWS - - #else - TTicks timerFrequency = 0; - #endif +#ifdef NL_OS_WINDOWS + uint64 threadMask = IThread::getCurrentThread()->getCPUMask(); // broken on linux, don't expect it to work anywhere +#else + uint64 threadMask = cpuMask; +#endif uint identical = 0; // Identical stamps may indicate the os handling backwards glitches. uint backwards = 0; // Happens when the timers are not always in sync and the implementation is faulty. @@ -109,7 +172,12 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) { if (cpuMask & currentBit) { - IThread::getCurrentThread()->setCPUMask(currentBit); +#ifdef NL_OS_WINDOWS + if (!IThread::getCurrentThread()->setCPUMask(currentBit)) +#else + if (!IProcess::getCurrentProcess()->setCPUMask(currentBit)) +#endif + break; // Thread was set to last cpu. #ifdef NL_OS_WINDOWS // Make sure the thread is rescheduled. SwitchToThread(); @@ -152,13 +220,53 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) ++regular; lowResTime = lowResTimeN; } +#else +#ifdef NL_OS_UNIX + sched_yield(); +#else + nlSleep(0); +#endif +# ifdef NL_MONOTONIC_CLOCK + if (hasMonotonicClock()) + { + timespec monoClockN; + clock_gettime(CLOCK_MONOTONIC, &monoClockN); + if (monoClock.tv_sec == monoClockN.tv_sec && monoClock.tv_nsec == monoClockN.tv_nsec) + ++identical; + if (monoClockN.tv_sec < monoClock.tv_sec || (monoClock.tv_sec == monoClockN.tv_sec && monoClockN.tv_nsec < monoClock.tv_nsec)) + ++backwards; + if (monoClock.tv_sec == monoClockN.tv_sec && (monoClockN.tv_nsec - monoClock.tv_nsec > 50000000L)) + ++skipping; + else if ((monoClock.tv_sec == monoClockN.tv_sec && monoClock.tv_nsec < monoClockN.tv_nsec) || monoClock.tv_sec < monoClockN.tv_sec) + ++regular; + monoClock.tv_sec = monoClockN.tv_sec; + monoClock.tv_nsec = monoClockN.tv_nsec; + } + else +# endif + { + TTime localTimeN = getLocalTime(); + if (localTimeN == localTime) + ++identical; + if (localTimeN < localTime || localTimeN - localTime < 0) + ++backwards; + if (localTimeN - localTime > 50) + ++skipping; + else if (localTimeN > localTime) + ++regular; + localTime = localTimeN; + } #endif } currentBit <<= 1; } } +#ifdef NL_OS_WINDOWS IThread::getCurrentThread()->setCPUMask(threadMask); +#else + IProcess::getCurrentProcess()->setCPUMask(threadMask); +#endif nldebug("Timer resolution: %i Hz", (int)(result.HighPrecisionResolution)); nldebug("Time identical: %i, backwards: %i, regular: %i, skipping: %i, frequency bug: %i", identical, backwards, regular, skipping, frequencybug); @@ -245,10 +353,10 @@ TTime CTime::getLocalTime () // return timeGetTime(); // Only this was left active before it was commented. //} - /* + /* * The above is no longer relevant. */ - + if (a_HaveQueryPerformance) { // On a (fast) 15MHz timer this rolls over after 7000 days. @@ -266,49 +374,17 @@ TTime CTime::getLocalTime () #elif defined (NL_OS_UNIX) - static bool initdone = false; - static bool isMonotonicClockSupported = false; - if ( ! initdone ) +#ifdef NL_MONOTONIC_CLOCK + + if (hasMonotonicClock()) { - -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) -#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0) - - /* Initialize the local time engine. - * On Unix, this method will find out if the Monotonic Clock is supported - * (seems supported by kernel 2.6, not by kernel 2.4). See getLocalTime(). - */ - struct timespec tv; - if ( (clock_gettime( CLOCK_MONOTONIC, &tv ) == 0) && - (clock_getres( CLOCK_MONOTONIC, &tv ) == 0) ) - { -// nldebug( "Monotonic local time supported (resolution %.6f ms)", ((float)tv.tv_sec)*1000.0f + ((float)tv.tv_nsec)/1000000.0f ); - isMonotonicClockSupported = true; - } - else - -#endif -#endif - { -// nlwarning( "Monotonic local time not supported, caution with time sync" ); - } - - initdone = true; - } - -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) -#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0) - - if ( isMonotonicClockSupported ) - { - struct timespec tv; + timespec tv; // This is not affected by system time changes. if ( clock_gettime( CLOCK_MONOTONIC, &tv ) != 0 ) nlerror ("Can't get clock time again"); return (TTime)tv.tv_sec * (TTime)1000 + (TTime)((tv.tv_nsec/*+500*/) / 1000000); } -#endif #endif // This is affected by system time changes. @@ -346,7 +422,7 @@ TTicks CTime::getPerformanceTime () return (hi << 32) | (lo & 0xffffffff); #elif defined(HAVE_X86) and !defined(NL_OS_MAC) uint64 x; - // RDTSC - Read time-stamp counter into EDX:EAX. + // RDTSC - Read time-stamp counter into EDX:EAX. __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); return x; #else // HAVE_X86 From e029348d9aef9fe2b3c5466d7c0ef59dad62a284 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 28 Jul 2012 11:31:28 +0200 Subject: [PATCH 13/97] Fixed: Typos --- code/nel/src/misc/time_nl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 304426e26..dd43fd2f7 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -365,11 +365,12 @@ TTime CTime::getLocalTime () QueryPerformanceCounter(&counter); counter.QuadPart *= (LONGLONG)1000L; counter.QuadPart /= a_QueryPerformanceFrequency.QuadPart; + return counter.QuadPart; } else { // Use default reliable low resolution timer. - return getLocalTime(); + return timeGetTime(); } #elif defined (NL_OS_UNIX) From 1f5e08b20ff6befcf1958ef12746cd6db1bd9775 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 28 Jul 2012 12:40:36 +0200 Subject: [PATCH 14/97] Fixed: A strange loading crash with bad textures --- .../nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp index b50709cd2..2cd16bf1c 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp @@ -868,6 +868,13 @@ bool CDriverD3D::uploadTextureInternal (ITexture& tex, CRect& rect, uint8 destMi D3DFORMAT destFormat, D3DFORMAT srcFormat) { H_AUTO_D3D(CDriverD3D_uploadTextureInternal) + + if (rect.Width == 0 || rect.Height == 0) + { + nlwarning("Rectangle width or height cannot be 0"); + return false; + } + // The D3D texture CTextureDrvInfosD3D* d3dtext = getTextureD3D(tex); From 2f8b59e0aed93f94bb23160d71d9d933f73d23c8 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 5 Sep 2012 15:08:12 +0200 Subject: [PATCH 15/97] Fixed: cmake Xcode project generation broken --- code/CMakeModules/nel.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 84b817752..624d47ab9 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -533,7 +533,7 @@ MACRO(NL_SETUP_BUILD) ENDIF(APPLE) IF(APPLE AND XCODE) - SET(CMAKE_OSX_SYSROOT "macosx" CACHE PATH "" FORCE) +# SET(CMAKE_OSX_SYSROOT "macosx" CACHE PATH "" FORCE) ELSEIF(APPLE AND NOT XCODE) IF(NOT CMAKE_OSX_DEPLOYMENT_TARGET) SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6") From 429ac753e9cec07f022ee71b57ba10cfd5caf901 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 11 Sep 2012 20:16:26 +0200 Subject: [PATCH 16/97] Changed: #878 Fix typos in comments/code --- .../driver/opengl/driver_opengl_vertex_program.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index ae47ac7ec..dc2a4243a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -43,7 +43,8 @@ namespace NLDRIVERGL { // *************************************************************************** CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL (CDriverGL *drv, ItVtxPrgDrvInfoPtrList it) : IVertexProgramDrvInfos (drv, it) { - H_AUTO_OGL(CVertexProgamDrvInfosGL_CVertexProgamDrvInfosGL) + H_AUTO_OGL(CVertexProgamDrvInfosGL_CVertexProgamDrvInfosGL); + // Extension must exist nlassert (drv->_Extensions.NVVertexProgram || drv->_Extensions.EXTVertexShader @@ -87,7 +88,7 @@ bool CDriverGL::isVertexProgramEmulated () const // *************************************************************************** bool CDriverGL::activeNVVertexProgram (CVertexProgram *program) { - H_AUTO_OGL(CVertexProgamDrvInfosGL_activeNVVertexProgram) + H_AUTO_OGL(CVertexProgamDrvInfosGL_activeNVVertexProgram); #ifndef USE_OPENGLES // Setup or unsetup ? @@ -209,7 +210,8 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program) static inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate) { - H_AUTO_OGL(convSwizzleToGLFormat) + H_AUTO_OGL(convSwizzleToGLFormat); + if (!negate) { switch(comp) @@ -1348,12 +1350,10 @@ static void ARBVertexProgramDumpInstr(const CVPInstruction &instr, std::string & } - - // *************************************************************************** bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgram, GLuint id, bool &specularWritten) { - H_AUTO_OGL(CDriverGL_setupARBVertexProgram) + H_AUTO_OGL(CDriverGL_setupARBVertexProgram); #ifndef USE_OPENGLES // tmp @@ -1571,7 +1571,6 @@ bool CDriverGL::activeARBVertexProgram (CVertexProgram *program) #endif } - // *************************************************************************** bool CDriverGL::activeEXTVertexShader (CVertexProgram *program) { From f61d6c9ae2f20d8671623650ba9ac5c39b47550f Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 11 Sep 2012 20:17:16 +0200 Subject: [PATCH 17/97] Changed: Updated some object_viewer_qt french translations --- .../src/translations/object_viewer_qt_fr.ts | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts b/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts index d980a0914..f5c0c68af 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts +++ b/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts @@ -6,17 +6,17 @@ Failed to load Core plugin: %1 - + Impossible de charger le plugin principal: %1 Object Viewer Qt - Plugin loader messages - + Object Viewer Qt - Messages du chargeur de plugins Could not find ovqt_plugin_core in %1 - + Impossible de trouver ovqt_plugin_core dans %1 @@ -24,42 +24,42 @@ Animation control - + Contrôle de l'animation Loop - + En boucle In place - + En place Increment pos - + Incrémenter la position Use the PlayList - + Utiliser la liste de lecture Use the Mixer - + Utilisateur le Mélangeur Play/Pause - + Lecture/Pause Stop - + Stop @@ -67,57 +67,57 @@ Animation set manager - + Gestionnaire d'ensemble d'animations Edited object: - + Objet en cours d'édition : Animations: - + Animations : Add anim - + Ajouter animation Skeleton weight template: - + Modèle de poids de squelette : Add swt - + Ajouter swt Animations playlist: - + Liste de lecture d'animations : Unload all anim and swt files - + Décharger toutes les animations et les fichiers swt Add anim in PlayList - + Ajouter une animation dans la liste de lecture Delete anim from PlayList - + Supprimer une animation de la liste de lecture Set duration of time in Animation control - + Définir la durée dans le contrôle de l'animation @@ -130,7 +130,7 @@ Constant - + Constante @@ -160,12 +160,12 @@ Date - + Date Position - + Position @@ -175,12 +175,12 @@ Speed - + Vitesse Random - + Aléatoire @@ -2593,7 +2593,7 @@ Power: - + Puissance : @@ -2603,17 +2603,17 @@ Frequency - + Fréquence Ambient color - + Couleur ambiante Diffuse color - + Couleur diffuse @@ -3119,67 +3119,67 @@ Reason: %3 OpenGL - + OpenGL Direct3D - + Direct3D Qt Style - + Style Qt Style - + Style Use style's standard palette - + Utiliser la palette standard du style Font - + Police ... - + ... Graphics settings - + Options graphiques Driver - + Pilote Bloom effect - + Bloom Bloom density - + Densité du bloom Square bloom - + Bloom carré Enable bloom effect - + Activer le bloom @@ -3188,17 +3188,17 @@ Reason: %3 Open NeL anim file - + Ouvrir une animation NeL NeL anim files (*.anim);; - + Animations NeL (*.anim);; NeL Skeleton Weight Template files (*.swt);; - + NeL Skeleton Weight Template (*.swt);; @@ -3336,7 +3336,7 @@ Reason: %3 Set user param - + Définir un paramètre utilisateur @@ -3344,7 +3344,7 @@ Reason: %3 Bin operator - + Opérateur binaire @@ -3556,7 +3556,7 @@ Reason: %3 Num samples: - + Nombre d'échantillons : @@ -3801,17 +3801,17 @@ Reason: %3 Num particles: - + Nombre de particules : Num wanted faces: - + Nombre de faces souhaitées : System time: - + Temps système : @@ -3819,7 +3819,7 @@ Reason: %3 Are you sure? - + Etes-vous sûr ? @@ -4077,7 +4077,7 @@ Reason: %3 Skeleton scale editor - + Editeur de l'échelle du squelette @@ -4121,12 +4121,12 @@ Reason: %3 Failed to save file! - + Impossible d'enregistrer le fichier ! Failed to load file! - + Impossible de charger le fichier ! @@ -4142,7 +4142,7 @@ Reason: %3 empty - + vide From 8922f96b9ae7c0e95ff4b25a7b056d4b0036e26d Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 11 Sep 2012 20:26:36 +0200 Subject: [PATCH 18/97] Changed: Synchronization with SVN --- code/ryzom/client/client_default.cfg | 8 +- .../data/gamedev/interfaces_v3/actions.xml | 3 +- .../data/gamedev/interfaces_v3/commands.xml | 8 + .../data/gamedev/interfaces_v3/config.xml | 10 + .../gamedev/interfaces_v3/game_config.xml | 32 ++- .../data/gamedev/interfaces_v3/guild.xml | 4 +- .../gamedev/interfaces_v3/info_player.xml | 12 +- .../data/gamedev/interfaces_v3/inventory.xml | 61 ++++- .../data/gamedev/interfaces_v3/login_main.xml | 22 +- .../gamedev/interfaces_v3/out_v2_select.xml | 6 +- .../data/gamedev/interfaces_v3/reset.xml | 2 + .../data/gamedev/interfaces_v3/taskbar.xml | 49 ++-- .../data/gamedev/interfaces_v3/widgets.xml | 256 ++++++++---------- code/ryzom/client/src/character_cl.cpp | 3 +- code/ryzom/client/src/client.cpp | 5 +- code/ryzom/client/src/client_cfg.cpp | 2 +- code/ryzom/client/src/client_chat_manager.cpp | 16 ++ code/ryzom/client/src/connection.cpp | 38 +-- code/ryzom/client/src/entity_cl.cpp | 35 ++- code/ryzom/client/src/entity_cl.h | 4 +- code/ryzom/client/src/far_tp.cpp | 1 - code/ryzom/client/src/ground_fx_manager.cpp | 4 +- code/ryzom/client/src/http_client_curl.cpp | 2 +- .../src/interface_v3/action_handler_game.cpp | 38 ++- .../src/interface_v3/action_handler_help.cpp | 2 +- .../src/interface_v3/action_handler_misc.cpp | 14 +- .../interface_v3/action_handler_phrase.cpp | 31 ++- .../src/interface_v3/action_handler_ui.cpp | 2 +- .../interface_v3/bot_chat_page_mission.cpp | 4 +- .../src/interface_v3/chat_text_manager.cpp | 26 +- .../src/interface_v3/chat_text_manager.h | 3 + .../client/src/interface_v3/dbctrl_sheet.cpp | 6 +- .../client/src/interface_v3/group_html.cpp | 4 - .../src/interface_v3/group_html_webig.cpp | 2 +- .../interface_v3/group_in_scene_bubble.cpp | 4 +- .../interface_v3/group_in_scene_user_info.cpp | 126 +++++---- .../src/interface_v3/interface_manager.cpp | 12 + .../src/interface_v3/interface_manager.h | 2 + .../src/interface_v3/sphrase_manager.cpp | 37 ++- .../client/src/interface_v3/sphrase_manager.h | 4 +- code/ryzom/client/src/login.cpp | 16 +- code/ryzom/client/src/login.h | 17 ++ .../client/src/login_progress_post_thread.h | 2 +- code/ryzom/client/src/net_manager.cpp | 2 +- code/ryzom/client/src/player_cl.cpp | 2 +- code/ryzom/client/src/release.cpp | 2 +- .../client/src/string_manager_client.cpp | 22 +- code/ryzom/client/src/string_manager_client.h | 4 +- .../src/game_share}/http_client.cpp | 32 ++- .../src/game_share}/http_client.h | 23 +- .../time_weather_season/time_and_season.h | 2 +- 51 files changed, 634 insertions(+), 390 deletions(-) rename code/ryzom/{client/src => common/src/game_share}/http_client.cpp (91%) rename code/ryzom/{client/src => common/src/game_share}/http_client.h (83%) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 311b7cddd..f95a5c2b6 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -476,7 +476,7 @@ XMLR2EDInterfaceFiles = { "r2ed.xml", "r2_triggers.xml", - "r2_logic_entities.xml", + "r2_logic_entities.xml", "r2ed_acts.xml", "r2ed_scenario.xml", "r2ed_connect.xml" @@ -560,11 +560,11 @@ HelpPages = "de=http://forums.ryzom.com/forum/showthread.php?t=29131" }; -WebIgMainDomain = "atys.ryzom.com"; +WebIgMainDomain = "app.ryzom.com"; WebIgTrustedDomains = { - "atys.ryzom.com" + "api.ryzom.com", "app.ryzom.com" }; -PatchletUrl = "http://atys.ryzom.com/start/app_patchlet.php?patch=preload"; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; SelectedSlot = 0; diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml index 4596702eb..3486e0298 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml @@ -39,7 +39,8 @@ - + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/commands.xml b/code/ryzom/client/data/gamedev/interfaces_v3/commands.xml index 821225a03..6fdb5d32a 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/commands.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/commands.xml @@ -63,6 +63,9 @@ + + + @@ -88,6 +91,11 @@ + + + + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/config.xml index c2fa6a71f..630ecd4c6 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/config.xml @@ -318,6 +318,12 @@ + + @@ -3389,6 +3395,10 @@ This MUST follow the Enum MISSION_DESC::TIconId + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml index 560d471ff..0a5c3c085 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml @@ -18,7 +18,7 @@ color="255 255 255 255" fontsize="14" shadow="true" - case_mode="%case_first_string_letter_up" /> + case_mode="%case_normal" />