From 308bbbb0c663c51b4d95ad3773a63af2c0cfec16 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 23 Feb 2013 00:13:44 +0100 Subject: [PATCH 001/138] MODIFIED: Views can now be selected too from the central widget. --- code/nel/include/nel/gui/ctrl_base.h | 4 +-- code/nel/include/nel/gui/interface_element.h | 1 + code/nel/include/nel/gui/view_base.h | 4 +++ code/nel/include/nel/gui/view_text.h | 2 ++ code/nel/include/nel/gui/widget_manager.h | 3 ++ code/nel/src/gui/ctrl_base.cpp | 3 ++ code/nel/src/gui/ctrl_base_button.cpp | 6 ---- code/nel/src/gui/view_base.cpp | 18 ++++++++++ code/nel/src/gui/view_text.cpp | 5 +++ code/nel/src/gui/widget_manager.cpp | 37 ++++++++++++++++++-- 10 files changed, 72 insertions(+), 11 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index fe8d5ea60..28eeb2cd0 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -68,9 +68,7 @@ namespace NLGUI // special parse virtual bool parse(xmlNodePtr cur, CInterfaceGroup *parentGroup); - - /// Handle all events (implemented by derived classes) (return true to signal event handled) - virtual bool handleEvent (const NLGUI::CEventDescriptor &event); + bool handleEvent (const NLGUI::CEventDescriptor &event); virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 210c24b2e..570dbf689 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -473,6 +473,7 @@ namespace NLGUI bool isInGroup( CInterfaceGroup *group ); static void setEditorMode( bool b ){ editorMode = b; } + static bool getEditorMode(){ return editorMode; } void setEditorSelected( bool b ){ editorSelected = b; } bool isEditorSelected() const{ return editorSelected; } diff --git a/code/nel/include/nel/gui/view_base.h b/code/nel/include/nel/gui/view_base.h index b7d2aceab..f64803720 100644 --- a/code/nel/include/nel/gui/view_base.h +++ b/code/nel/include/nel/gui/view_base.h @@ -25,6 +25,7 @@ namespace NLGUI { + class CEventDescriptor; class CViewBase : public CInterfaceElement { @@ -76,6 +77,9 @@ namespace NLGUI // special for mouse over : return true and fill the name of the cursor to display virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */) { return false; } + + /// Handle all events (implemented by derived classes) (return true to signal event handled) + virtual bool handleEvent (const NLGUI::CEventDescriptor &evnt); }; diff --git a/code/nel/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h index df3cf27e3..fa9e184b7 100644 --- a/code/nel/include/nel/gui/view_text.h +++ b/code/nel/include/nel/gui/view_text.h @@ -188,6 +188,8 @@ namespace NLGUI int luaSetLineMaxW(CLuaState &ls); + bool handleEvent( const NLGUI::CEventDescriptor &evnt ); + REFLECT_EXPORT_START(CViewText, CViewBase) REFLECT_STRING("hardtext", getHardText, setHardText); REFLECT_UCSTRING("uc_hardtext", getText, setText); diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 7fedc6240..5700a52e6 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -341,6 +341,7 @@ namespace NLGUI /** * Capture */ + CViewBase *getCapturedView(){ return _CapturedView; } CCtrlBase *getCapturePointerLeft() { return _CapturePointerLeft; } CCtrlBase *getCapturePointerRight() { return _CapturePointerRight; } CCtrlBase *getCaptureKeyboard() { return _CaptureKeyboard; } @@ -510,6 +511,8 @@ namespace NLGUI NLMISC::CRefPtr _CapturePointerLeft; NLMISC::CRefPtr _CapturePointerRight; + NLMISC::CRefPtr< CViewBase > _CapturedView; + // What is under pointer std::vector< CViewBase* > _ViewsUnderPointer; std::vector< CCtrlBase* > _CtrlsUnderPointer; diff --git a/code/nel/src/gui/ctrl_base.cpp b/code/nel/src/gui/ctrl_base.cpp index 8cd51f026..c2f467736 100644 --- a/code/nel/src/gui/ctrl_base.cpp +++ b/code/nel/src/gui/ctrl_base.cpp @@ -37,6 +37,9 @@ namespace NLGUI // *************************************************************************** bool CCtrlBase::handleEvent(const NLGUI::CEventDescriptor &event) { + if( CViewBase::handleEvent( event ) ) + return true; + if (event.getType() == NLGUI::CEventDescriptor::system) { NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event; diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index 4c892ecc7..16b2a3ad4 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -668,12 +668,6 @@ namespace NLGUI if (CWidgetManager::getInstance()->getCapturePointerLeft() != this) return false; - if( editorMode ) - { - CWidgetManager::getInstance()->setCurrentEditorSelection( getId() ); - return true; - } - if (_LeftDblClickHandled) // no effect on mouse up after double click has been handled { _LeftDblClickHandled = false; diff --git a/code/nel/src/gui/view_base.cpp b/code/nel/src/gui/view_base.cpp index cf1e01ede..ebe18b979 100644 --- a/code/nel/src/gui/view_base.cpp +++ b/code/nel/src/gui/view_base.cpp @@ -45,5 +45,23 @@ namespace NLGUI CInterfaceElement::visit(visitor); } + + bool CViewBase::handleEvent( const NLGUI::CEventDescriptor &evnt ) + { + if( evnt.getType() == NLGUI::CEventDescriptor::mouse ) + { + const NLGUI::CEventDescriptorMouse &eventDesc = ( const NLGUI::CEventDescriptorMouse& )evnt; + if( eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown ) + { + if( editorMode ) + { + CWidgetManager::getInstance()->setCurrentEditorSelection( getId() ); + return true; + } + } + } + return false; + } + } diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index 85e76a09c..b9d58ae45 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -2945,6 +2945,11 @@ namespace NLGUI } } + bool CViewText::handleEvent( const NLGUI::CEventDescriptor &evnt ) + { + return false; + } + // *************************************************************************** void CViewText::serial(NLMISC::IStream &f) { diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index b12ddff3c..c923c40fe 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1031,6 +1031,7 @@ namespace NLGUI _OldCaptureKeyboard = NULL; setCapturePointerLeft(NULL); setCapturePointerRight(NULL); + _CapturedView = NULL; resetColorProps(); @@ -2086,6 +2087,12 @@ namespace NLGUI getCapturePointerRight()->handleEvent( evnt ); setCapturePointerRight( NULL ); } + + if( _CapturedView != NULL ) + { + _CapturedView->handleEvent( evnt ); + _CapturedView = NULL; + } } } @@ -2249,6 +2256,9 @@ namespace NLGUI getCapturePointerLeft() != getCapturePointerRight() ) handled|= getCapturePointerRight()->handleEvent(evnt); + if( _CapturedView != NULL ) + _CapturedView->handleEvent( evnt ); + CInterfaceGroup *ptr = getWindowUnder (eventDesc.getX(), eventDesc.getY()); setCurrentWindowUnder( ptr ); @@ -2326,6 +2336,8 @@ namespace NLGUI } } + bool captured = false; + // must not capture a new element if a sheet is currentlty being dragged. // This may happen when alt-tab has been used => the sheet is dragged but the left button is up if (!CCtrlDraggable::getDraggedSheet()) @@ -2343,9 +2355,25 @@ namespace NLGUI { nMaxDepth = d; setCapturePointerLeft( ctrl ); + captured = true; } } } + + if( CInterfaceElement::getEditorMode() && !captured ) + { + for( sint32 i = _ViewsUnderPointer.size()-1; i >= 0; i-- ) + { + CViewBase *v = _ViewsUnderPointer[i]; + if( ( v != NULL ) && v->isInGroup( pNewCurrentWnd ) ) + { + _CapturedView = v; + captured = true; + break; + } + } + } + notifyElementCaptured( getCapturePointerLeft() ); if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty()) { @@ -2353,13 +2381,16 @@ namespace NLGUI } } //if found - if ( getCapturePointerLeft() != NULL) + if ( captured ) { // consider clicking on a control implies handling of the event. handled= true; // handle the capture - getCapturePointerLeft()->handleEvent(evnt); + if( getCapturePointerLeft() != NULL ) + getCapturePointerLeft()->handleEvent(evnt); + else + _CapturedView->handleEvent( evnt ); } } @@ -2588,6 +2619,8 @@ namespace NLGUI // *************************************************************************** void CWidgetManager::setCapturePointerLeft(CCtrlBase *c) { + _CapturedView = NULL; + // additionally, abort any dragging if( CCtrlDraggable::getDraggedSheet() != NULL ) CCtrlDraggable::getDraggedSheet()->abortDragging(); From 84a4ac2f0ddbce13a48b4f09155728a9fef13865 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 23 Feb 2013 06:55:19 +0100 Subject: [PATCH 002/138] MODIFIED: Update property browser when selecting in the central widget. --- .../nel/gui/editor_selection_watcher.h | 30 ++++++++++++++++ code/nel/include/nel/gui/widget_manager.h | 6 ++++ code/nel/src/gui/widget_manager.cpp | 36 +++++++++++++++++++ .../src/plugins/gui_editor/CMakeLists.txt | 1 + .../gui_editor/editor_selection_watcher.cpp | 26 ++++++++++++++ .../gui_editor/editor_selection_watcher.h | 36 +++++++++++++++++++ .../plugins/gui_editor/gui_editor_window.cpp | 22 +++++++++--- .../plugins/gui_editor/gui_editor_window.h | 1 + .../src/plugins/gui_editor/nelgui_widget.cpp | 7 ++++ .../src/plugins/gui_editor/nelgui_widget.h | 4 +++ .../plugins/gui_editor/widget_hierarchy.cpp | 16 ++++++--- .../src/plugins/gui_editor/widget_hierarchy.h | 4 +-- 12 files changed, 177 insertions(+), 12 deletions(-) create mode 100644 code/nel/include/nel/gui/editor_selection_watcher.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h diff --git a/code/nel/include/nel/gui/editor_selection_watcher.h b/code/nel/include/nel/gui/editor_selection_watcher.h new file mode 100644 index 000000000..415f4f9db --- /dev/null +++ b/code/nel/include/nel/gui/editor_selection_watcher.h @@ -0,0 +1,30 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 + +namespace NLGUI +{ + /// Watches the currently selected GUI widget + class IEditorSelectionWatcher + { + public: + + /// Notifies the watcher about the change + virtual void selectionChanged( std::string &newSelection ) = 0; + }; +} + diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 5700a52e6..12f4a065b 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -47,6 +47,7 @@ namespace NLGUI class CInterfaceOptions; class CInterfaceAnim; class CProcedure; + class IEditorSelectionWatcher; /** GUI Widget Manager @@ -485,6 +486,9 @@ namespace NLGUI IParser* getParser() const{ return parser; } void setCurrentEditorSelection( const std::string &name ); + void notifySelectionWatchers(); + void registerSelectionWatcher( IEditorSelectionWatcher *watcher ); + void unregisterSelectionWatcher( IEditorSelectionWatcher *watcher ); private: CWidgetManager(); @@ -564,6 +568,8 @@ namespace NLGUI std::vector< INewScreenSizeHandler* > newScreenSizeHandlers; std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers; + std::vector< IEditorSelectionWatcher* > selectionWatchers; + std::string currentEditorSelection; }; diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index c923c40fe..4640931f5 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -31,6 +31,7 @@ #include "nel/gui/proc.h" #include "nel/gui/interface_expr.h" #include "nel/gui/reflect_register.h" +#include "nel/gui/editor_selection_watcher.h" #include "nel/misc/events.h" namespace NLGUI @@ -3181,9 +3182,44 @@ namespace NLGUI } e->setEditorSelected( true ); currentEditorSelection = name; + notifySelectionWatchers(); } } + void CWidgetManager::notifySelectionWatchers() + { + std::vector< IEditorSelectionWatcher* >::iterator itr = selectionWatchers.begin(); + while( itr != selectionWatchers.end() ) + { + (*itr)->selectionChanged( currentEditorSelection ); + ++itr; + } + } + + void CWidgetManager::registerSelectionWatcher( IEditorSelectionWatcher *watcher ) + { + std::vector< IEditorSelectionWatcher* >::iterator itr = + std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher ); + + // We already have this watcher + if( itr != selectionWatchers.end() ) + return; + + selectionWatchers.push_back( watcher ); + } + + void CWidgetManager::unregisterSelectionWatcher( IEditorSelectionWatcher *watcher ) + { + std::vector< IEditorSelectionWatcher* >::iterator itr = + std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher ); + + // We don't have this watcher + if( itr == selectionWatchers.end() ) + return; + + selectionWatchers.erase( itr ); + } + CWidgetManager::CWidgetManager() { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index 0a5d8533d..c08157373 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -60,6 +60,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR nelgui_widget.h new_property_widget.h new_widget_widget.h + editor_selection_watcher.h ) SET(OVQT_PLUGIN_GUI_EDITOR_UIS diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp new file mode 100644 index 000000000..ee3a079ad --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp @@ -0,0 +1,26 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "editor_selection_watcher.h" + +namespace GUIEditor +{ + void CEditorSelectionWatcher::selectionChanged( std::string &newSelection ) + { + Q_EMIT sgnSelectionChanged( newSelection ); + } +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h new file mode 100644 index 000000000..61218c0cd --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h @@ -0,0 +1,36 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "nel/gui/editor_selection_watcher.h" +#include + +namespace GUIEditor +{ + /// Watches the Editor selection, and emits a signal when it changes + class CEditorSelectionWatcher : public QObject, public NLGUI::IEditorSelectionWatcher + { + Q_OBJECT + + public: + CEditorSelectionWatcher() : QObject( NULL ){} + + void selectionChanged( std::string &newSelection ); + + Q_SIGNALS: + void sgnSelectionChanged( std::string &id ); + }; +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index 5a0aff4de..66945b562 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -41,6 +41,7 @@ #include "project_file_serializer.h" #include "project_window.h" #include "nelgui_widget.h" +#include "editor_selection_watcher.h" namespace GUIEditor { @@ -91,11 +92,7 @@ namespace GUIEditor viewPort->init(); - connect( viewPort, SIGNAL( guiLoadComplete() ), hierarchyView, SLOT( onGUILoaded() ) ); - connect( viewPort, SIGNAL( guiLoadComplete() ), procList, SLOT( onGUILoaded() ) ); - connect( viewPort, SIGNAL( guiLoadComplete() ), linkList, SLOT( onGUILoaded() ) ); - connect( hierarchyView, SIGNAL( selectionChanged( std::string& ) ), - &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); } GUIEditorWindow::~GUIEditorWindow() @@ -262,6 +259,11 @@ namespace GUIEditor if( reply != QMessageBox::Yes ) return false; + + CEditorSelectionWatcher *w = viewPort->getWatcher(); + disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); + disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + projectFiles.clearAll(); projectWindow->clear(); hierarchyView->clearHierarchy(); @@ -291,6 +293,16 @@ namespace GUIEditor setCursor( Qt::ArrowCursor ); } + void GUIEditorWindow::onGUILoaded() + { + hierarchyView->onGUILoaded(); + procList->onGUILoaded(); + linkList->onGUILoaded(); + + CEditorSelectionWatcher *w = viewPort->getWatcher(); + connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); + connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + } void GUIEditorWindow::createMenus() { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h index d4327d3d9..41cd30e9a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h @@ -58,6 +58,7 @@ public Q_SLOTS: private Q_SLOTS: void onProjectFilesChanged(); + void onGUILoaded(); private: void createMenus(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp index 85525e428..d86d31269 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp @@ -27,6 +27,7 @@ #include #include #include +#include "editor_selection_watcher.h" namespace GUIEditor { @@ -37,6 +38,7 @@ namespace GUIEditor { timerID = 0; guiLoaded = false; + watcher = NULL; } NelGUIWidget::~NelGUIWidget() @@ -70,6 +72,8 @@ namespace GUIEditor NLGUI::CViewRenderer::getInstance()->init(); CWidgetManager::getInstance()->getParser()->setEditorMode( true ); + + watcher = new CEditorSelectionWatcher(); } bool NelGUIWidget::parse( SProjectFiles &files ) @@ -106,6 +110,8 @@ namespace GUIEditor guiLoaded = true; Q_EMIT guiLoadComplete(); + CWidgetManager::getInstance()->registerSelectionWatcher( watcher ); + return true; } @@ -115,6 +121,7 @@ namespace GUIEditor if( timerID != 0 ) killTimer( timerID ); timerID = 0; + CWidgetManager::getInstance()->unregisterSelectionWatcher( watcher ); CWidgetManager::getInstance()->reset(); CWidgetManager::getInstance()->getParser()->removeAll(); CViewRenderer::getInstance()->reset(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h index 5a45cc351..34c510507 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h @@ -23,6 +23,8 @@ namespace GUIEditor { + class CEditorSelectionWatcher; + /// Qt viewport for the Nel GUI library class NelGUIWidget : public Nel3DWidget { @@ -35,6 +37,7 @@ namespace GUIEditor bool parse( SProjectFiles &files ); void draw(); void reset(); + CEditorSelectionWatcher* getWatcher(){ return watcher; } Q_SIGNALS: void guiLoadComplete(); @@ -49,6 +52,7 @@ Q_SIGNALS: private: int timerID; bool guiLoaded; + CEditorSelectionWatcher *watcher; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index f510d6fb1..a238c1f03 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -130,6 +130,16 @@ namespace GUIEditor if( masterGroup.empty() ) return; buildHierarchy( masterGroup ); + currentSelection.clear(); + } + + void WidgetHierarchy::onSelectionChanged( std::string &newSelection ) + { + if( newSelection == currentSelection ) + return; + + + // Update the tree } void WidgetHierarchy::onItemDblClicked( QTreeWidgetItem *item ) @@ -138,9 +148,7 @@ namespace GUIEditor return; std::string n = item->text( 0 ).toUtf8().constData(); - std::string selection = makeFullName( item, n ); - CWidgetManager::getInstance()->setCurrentEditorSelection( selection ); - - Q_EMIT selectionChanged( selection ); + currentSelection = makeFullName( item, n ); + CWidgetManager::getInstance()->setCurrentEditorSelection( currentSelection ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index 493fd2a08..4c138d226 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -45,6 +45,7 @@ namespace GUIEditor public Q_SLOTS: void onGUILoaded(); + void onSelectionChanged( std::string &newSelection ); private Q_SLOTS: void onItemDblClicked( QTreeWidgetItem *item ); @@ -52,9 +53,6 @@ namespace GUIEditor private: std::string currentSelection; std::string masterGroup; - - Q_SIGNALS: - void selectionChanged( std::string &id ); }; } From 10adcb5549f8b568436257aa954d3597dc9bd9f5 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 2 Mar 2013 03:24:22 +0100 Subject: [PATCH 003/138] MODIFIED: When selecting a widget in the central widget, the hierarchy tree should now be updated as well. --- .../plugins/gui_editor/widget_hierarchy.cpp | 24 ++++++++++++++++++- .../src/plugins/gui_editor/widget_hierarchy.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index a238c1f03..b7485baa4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -75,6 +75,7 @@ namespace GUIEditor void WidgetHierarchy::clearHierarchy() { widgetHT->clear(); + widgetHierarchyMap.clear(); } void WidgetHierarchy::buildHierarchy( std::string &masterGroup ) @@ -87,6 +88,7 @@ namespace GUIEditor QTreeWidgetItem *item = new QTreeWidgetItem( NULL ); item->setText( 0, "ui" ); widgetHT->addTopLevelItem( item ); + widgetHierarchyMap[ "ui" ] = item; buildHierarchy( item, mg ); } @@ -96,7 +98,9 @@ namespace GUIEditor { // First add ourselves QTreeWidgetItem *item = new QTreeWidgetItem( parent ); + item->setText( 0, makeNodeName( group->getId() ).c_str() ); + widgetHierarchyMap[ group->getId() ] = item; // Then add recursively our subgroups const std::vector< CInterfaceGroup* > &groups = group->getGroups(); @@ -113,6 +117,7 @@ namespace GUIEditor { QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*citr)->getId() ).c_str() ); + widgetHierarchyMap[ (*citr)->getId() ] = subItem; } // Add our views @@ -122,6 +127,7 @@ namespace GUIEditor { QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*vitr)->getId() ).c_str() ); + widgetHierarchyMap[ (*vitr)->getId() ] = subItem; } } @@ -138,8 +144,24 @@ namespace GUIEditor if( newSelection == currentSelection ) return; + std::map< std::string, QTreeWidgetItem* >::iterator itr = + widgetHierarchyMap.find( newSelection ); + if( itr == widgetHierarchyMap.end() ) + return; - // Update the tree + if( widgetHT->currentItem() != NULL ) + widgetHT->currentItem()->setSelected( false ); + + QTreeWidgetItem *item = itr->second; + QTreeWidgetItem *currItem = item; + while( currItem != NULL ) + { + currItem->setExpanded( true ); + currItem = currItem->parent(); + } + + item->setSelected( true ); + widgetHT->setCurrentItem( item ); } void WidgetHierarchy::onItemDblClicked( QTreeWidgetItem *item ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index 4c138d226..58e66212e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -18,6 +18,8 @@ #define WIDGET_HA_H #include "ui_widget_hierarchy.h" +#include +#include namespace NLGUI { @@ -53,6 +55,7 @@ namespace GUIEditor private: std::string currentSelection; std::string masterGroup; + std::map< std::string, QTreeWidgetItem* > widgetHierarchyMap; }; } From b731004c61e2f567f15db2d5e33edeb8865d9e53 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 2 Mar 2013 06:57:40 +0100 Subject: [PATCH 004/138] MODIFIED: GUI Editor can now delete widgets. --- code/nel/include/nel/gui/widget_manager.h | 1 + .../src/plugins/gui_editor/CMakeLists.txt | 1 + .../gui_editor/editor_message_processor.cpp | 56 +++++++++++++++++++ .../gui_editor/editor_message_processor.h | 33 +++++++++++ .../plugins/gui_editor/gui_editor_window.cpp | 11 ++++ .../plugins/gui_editor/gui_editor_window.h | 3 +- 6 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 12f4a065b..498139ecf 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -485,6 +485,7 @@ namespace NLGUI IParser* getParser() const{ return parser; } + std::string& getCurrentEditorSelection(){ return currentEditorSelection; } void setCurrentEditorSelection( const std::string &name ); void notifySelectionWatchers(); void registerSelectionWatcher( IEditorSelectionWatcher *watcher ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index c08157373..63a7d00cc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -61,6 +61,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR new_property_widget.h new_widget_widget.h editor_selection_watcher.h + editor_message_processor.h ) SET(OVQT_PLUGIN_GUI_EDITOR_UIS diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp new file mode 100644 index 000000000..944ce945a --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -0,0 +1,56 @@ +// Object Viewer Qt GUI Editor plugin +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "editor_message_processor.h" + +#include "nel/gui/interface_group.h" +#include "nel/gui/widget_manager.h" + +namespace GUIEditor +{ + void CEditorMessageProcessor::onDelete() + { + std::string selection = CWidgetManager::getInstance()->getCurrentEditorSelection(); + if( selection.empty() ) + return; + + QMessageBox::StandardButton r = + QMessageBox::question( NULL, + tr( "Deleting widget" ), + tr( "Are you sure you want to delete %1?" ).arg( selection.c_str() ), + QMessageBox::Yes | QMessageBox::No ); + if( r != QMessageBox::Yes ) + return; + + CInterfaceElement *e = + CWidgetManager::getInstance()->getElementFromId( selection ); + if( e == NULL ) + return; + + CInterfaceElement *p = e; + while( ( p != NULL ) && !p->isGroup() ) + p = p->getParent(); + + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); + if( g == NULL ) + return; + + if( g->delElement( e ) ) + CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); + } +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h new file mode 100644 index 000000000..17cac7683 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h @@ -0,0 +1,33 @@ +// Object Viewer Qt GUI Editor plugin +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 + +namespace GUIEditor +{ + /// Processes the GUI Editor's editor messages like delete, new, etc... + class CEditorMessageProcessor : public QObject + { + Q_OBJECT + public: + CEditorMessageProcessor( QObject *parent = NULL ) : QObject( parent ){} + ~CEditorMessageProcessor(){} + + public Q_SLOTS: + void onDelete(); + }; +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index 66945b562..f84b555d1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -42,6 +42,7 @@ #include "project_window.h" #include "nelgui_widget.h" #include "editor_selection_watcher.h" +#include "editor_message_processor.h" namespace GUIEditor { @@ -54,6 +55,7 @@ namespace GUIEditor QMainWindow(parent) { m_ui.setupUi(this); + messageProcessor = new CEditorMessageProcessor; m_undoStack = new QUndoStack(this); widgetProps = new CWidgetProperties; linkList = new LinkList; @@ -99,6 +101,9 @@ namespace GUIEditor { writeSettings(); + delete messageProcessor; + messageProcessor = NULL; + delete widgetProps; widgetProps = NULL; @@ -311,6 +316,7 @@ namespace GUIEditor QAction *saveAction = mm->action( Core::Constants::SAVE ); QAction *saveAsAction = mm->action( Core::Constants::SAVE_AS ); QAction *closeAction = mm->action( Core::Constants::CLOSE ); + QAction *delAction = mm->action( Core::Constants::DEL ); //if( newAction != NULL ) // newAction->setEnabled( true ); @@ -320,6 +326,11 @@ namespace GUIEditor saveAsAction->setEnabled( true ); if( closeAction != NULL ) closeAction->setEnabled( true ); + if( delAction != NULL ) + { + delAction->setEnabled( true ); + connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) ); + } QMenu *menu = mm->menu( Core::Constants::M_TOOLS ); if( menu != NULL ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h index 41cd30e9a..37f33e91c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h @@ -36,6 +36,7 @@ namespace GUIEditor class ProjectWindow; class NelGUIWidget; class CWidgetInfoTree; + class CEditorMessageProcessor; class GUIEditorWindow: public QMainWindow { @@ -77,8 +78,8 @@ private: ProcList *procList; ProjectWindow *projectWindow; NelGUIWidget *viewPort; - CWidgetInfoTree *widgetInfoTree; + CEditorMessageProcessor *messageProcessor; CPropBrowserCtrl browserCtrl; QString currentProject; From 9003dedbe5791578899892539545e7438451ca9e Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 2 Mar 2013 23:27:17 +0100 Subject: [PATCH 005/138] MODIFIED: Text buttons will now delete their text too when being deleted. --- code/nel/include/nel/gui/ctrl_text_button.h | 1 + code/nel/src/gui/ctrl_text_button.cpp | 10 ++++++++++ code/nel/src/gui/interface_group.cpp | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 2df1dee5d..5837a0fbf 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -42,6 +42,7 @@ namespace NLGUI /// Constructor CCtrlTextButton(const TCtorParam ¶m); + ~CCtrlTextButton(); std::string getProperty( const std::string &name ) const; void setProperty( const std::string &name, const std::string &value ); diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index fd118cfcb..332358b15 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -60,6 +60,16 @@ namespace NLGUI _ForceTextOver = false; } + CCtrlTextButton::~CCtrlTextButton() + { + if( _ViewText != NULL ) + { + if( getParent() != NULL ) + getParent()->delElement( _ViewText ); + _ViewText = NULL; + } + } + std::string CCtrlTextButton::getProperty( const std::string &name ) const { std::string prop; diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index c4ba1e950..bb643769a 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -141,12 +141,12 @@ namespace NLGUI // initStart = ryzomGetLocalTime (); clearGroups(); // nlinfo ("%d seconds for clearGroups '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); - // initStart = ryzomGetLocalTime (); - clearViews(); - // nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); // initStart = ryzomGetLocalTime (); clearControls(); // nlinfo ("%d seconds for clearControls '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); + // initStart = ryzomGetLocalTime (); + clearViews(); + // nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); CWidgetManager::getInstance()->removeRefOnGroup (this); #ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS From c15cf6375c1c56746f0e58d457055ac888b4241a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 3 Mar 2013 00:54:22 +0100 Subject: [PATCH 006/138] MODIFIED: Somehow I left this here, and it prevented viewtexts from being selected. --- code/nel/include/nel/gui/view_text.h | 2 -- code/nel/src/gui/view_text.cpp | 5 ----- 2 files changed, 7 deletions(-) diff --git a/code/nel/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h index fa9e184b7..df3cf27e3 100644 --- a/code/nel/include/nel/gui/view_text.h +++ b/code/nel/include/nel/gui/view_text.h @@ -188,8 +188,6 @@ namespace NLGUI int luaSetLineMaxW(CLuaState &ls); - bool handleEvent( const NLGUI::CEventDescriptor &evnt ); - REFLECT_EXPORT_START(CViewText, CViewBase) REFLECT_STRING("hardtext", getHardText, setHardText); REFLECT_UCSTRING("uc_hardtext", getText, setText); diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index b9d58ae45..85e76a09c 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -2945,11 +2945,6 @@ namespace NLGUI } } - bool CViewText::handleEvent( const NLGUI::CEventDescriptor &evnt ) - { - return false; - } - // *************************************************************************** void CViewText::serial(NLMISC::IStream &f) { From 8af3618cbf084c648e653a70d6cb0ecf3b9a3c2f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 3 Mar 2013 03:49:56 +0100 Subject: [PATCH 007/138] MODIFIED: collapse the widget hierarchy tree and remove the widget from it when it's deleted. Also clear the widget properties panel. --- code/nel/src/gui/widget_manager.cpp | 8 +++-- .../gui_editor/editor_message_processor.cpp | 2 ++ .../gui_editor/property_browser_ctrl.cpp | 5 +++ .../plugins/gui_editor/widget_hierarchy.cpp | 35 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 4640931f5..8cc43cc9d 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3181,9 +3181,13 @@ namespace NLGUI prev->setEditorSelected( false ); } e->setEditorSelected( true ); - currentEditorSelection = name; - notifySelectionWatchers(); } + else + if( !name.empty() ) + return; + + currentEditorSelection = name; + notifySelectionWatchers(); } void CWidgetManager::notifySelectionWatchers() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 944ce945a..36e3481e0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -50,7 +50,9 @@ namespace GUIEditor return; if( g->delElement( e ) ) + { CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); + } } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp index 1612ea803..3c5fa9177 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -78,7 +78,12 @@ namespace GUIEditor CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( id ); if( e == NULL ) + { + connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), + this, SLOT( onPropertyChanged( QtProperty* ) ) ); + return; + } currentElement = id; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index b7485baa4..96ae10aa3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -144,14 +144,47 @@ namespace GUIEditor if( newSelection == currentSelection ) return; + if( newSelection.empty() ) + { + if( widgetHT->currentItem() != NULL ) + { + QTreeWidgetItem *item = widgetHT->currentItem(); + QTreeWidgetItem *p = item; + + // Deselect item + item->setSelected( false ); + widgetHT->setCurrentItem( NULL ); + + // Collapse the tree + while( p != NULL ) + { + p->setExpanded( false ); + p = p->parent(); + } + + // Finally remove the item! + delete item; + item = NULL; + + std::map< std::string, QTreeWidgetItem* >::iterator itr = + widgetHierarchyMap.find( currentSelection ); + if( itr != widgetHierarchyMap.end() ) + widgetHierarchyMap.erase( itr ); + currentSelection = ""; + } + return; + } + std::map< std::string, QTreeWidgetItem* >::iterator itr = widgetHierarchyMap.find( newSelection ); if( itr == widgetHierarchyMap.end() ) return; + // deselect current item if( widgetHT->currentItem() != NULL ) widgetHT->currentItem()->setSelected( false ); + // expand the tree items, so that we can see the selected item QTreeWidgetItem *item = itr->second; QTreeWidgetItem *currItem = item; while( currItem != NULL ) @@ -160,8 +193,10 @@ namespace GUIEditor currItem = currItem->parent(); } + // select the current item item->setSelected( true ); widgetHT->setCurrentItem( item ); + currentSelection = newSelection; } void WidgetHierarchy::onItemDblClicked( QTreeWidgetItem *item ) From 836f3c9c2cdd7feee28307962368dd94b02d6349 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 7 Mar 2013 06:01:33 +0100 Subject: [PATCH 008/138] MODIFIED: Draw the highlight of the currently selected widget in editor mode. --- code/nel/include/nel/gui/interface_element.h | 2 ++ code/nel/src/gui/ctrl_button.cpp | 2 +- code/nel/src/gui/ctrl_text_button.cpp | 3 +-- code/nel/src/gui/interface_element.cpp | 5 +++++ code/nel/src/gui/widget_manager.cpp | 10 ++++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 570dbf689..2b1fa32c0 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -424,6 +424,8 @@ namespace NLGUI void drawHotSpot(THotSpot hs, NLMISC::CRGBA col); + void drawHighlight(); + // Returns 'true' if that element can be downcasted to a view virtual bool isView() const { return false; } diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index e4ad08074..c680ee973 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -357,7 +357,7 @@ namespace NLGUI - if ( ( _Over && !editorMode ) || editorSelected ) + if ( ( _Over && !editorMode ) ) { if( !editorMode && (lastOver == false) && (_AHOnOver != NULL)) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 332358b15..a527bb06f 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -774,8 +774,7 @@ namespace NLGUI CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft(); // *** Draw Over - if( editorSelected || - ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) ) + if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) ) ) { if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) ) diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index b369b96d1..dc51735ff 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -1300,6 +1300,11 @@ namespace NLGUI } + void CInterfaceElement::drawHighlight() + { + CViewRenderer::getInstance()->drawWiredQuad( _XReal, _YReal, _WReal, _HReal ); + } + // *************************************************************************** void CInterfaceElement::invalidateContent() { diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 8cc43cc9d..90103840c 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -2056,6 +2056,16 @@ namespace NLGUI getPointer()->draw (); } + if( CInterfaceElement::getEditorMode() ) + { + if( !currentEditorSelection.empty() ) + { + CInterfaceElement *e = getElementFromId( currentEditorSelection ); + if( e != NULL ) + e->drawHighlight(); + } + } + // flush layers CViewRenderer::getInstance()->flush(); From b106d18c8b5240051da8176c115f70b210a11fbc Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 8 Mar 2013 06:07:21 +0100 Subject: [PATCH 009/138] MODIFIED: Widgets derived from CInterfaceGroup should now be deleted too properly. --- .../src/plugins/gui_editor/editor_message_processor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 36e3481e0..28cc7d75b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -41,9 +41,9 @@ namespace GUIEditor if( e == NULL ) return; - CInterfaceElement *p = e; - while( ( p != NULL ) && !p->isGroup() ) - p = p->getParent(); + CInterfaceElement *p = e->getParent(); + if( p == NULL ) + return; CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); if( g == NULL ) From b2d052108f9324ede225949cf1df39cf05b4ad30 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 8 Mar 2013 06:28:52 +0100 Subject: [PATCH 010/138] MODIFIED: Preliminary support for a little cleanup when removing a widget from it's parent group ( for example when moving the widget ). --- code/nel/include/nel/gui/ctrl_text_button.h | 2 ++ code/nel/include/nel/gui/interface_element.h | 3 +++ code/nel/src/gui/ctrl_text_button.cpp | 13 ++++++++++--- code/nel/src/gui/interface_group.cpp | 15 ++++++++++++--- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 5837a0fbf..eb9968505 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -124,6 +124,8 @@ namespace NLGUI REFLECT_LUA_METHOD("getViewText", luaGetViewText) REFLECT_EXPORT_END + void onRemoved(); + protected: enum {NumTexture= 3}; diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 2b1fa32c0..739f1b95e 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -486,6 +486,9 @@ namespace NLGUI void setSerializable( bool b ){ serializable = b; } bool IsSerializable() const{ return serializable; } + /// Called when the widget is removed from it's parent group + virtual void onRemoved(){} + protected: bool editorSelected; diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index a527bb06f..744086c38 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -64,8 +64,8 @@ namespace NLGUI { if( _ViewText != NULL ) { - if( getParent() != NULL ) - getParent()->delElement( _ViewText ); + if( _Parent != NULL ) + _Parent->delView( _ViewText ); _ViewText = NULL; } } @@ -967,6 +967,13 @@ namespace NLGUI } // *************************************************************************** - + void CCtrlTextButton::onRemoved() + { + if( _ViewText != NULL ) + { + if( _Parent != NULL ) + _Parent->delView( _ViewText, true ); + } + } } diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index bb643769a..6804df955 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1084,9 +1084,12 @@ namespace NLGUI { if (_Views[i] == child) { - if (!dontDelete) delete _Views[i]; + CViewBase *v = _Views[i]; _Views.erase(_Views.begin()+i); delEltOrder (child); + child->onRemoved(); + child->setParent( NULL ); + if (!dontDelete) delete v; return true; } } @@ -1100,9 +1103,12 @@ namespace NLGUI { if (_Controls[i] == child) { - if (!dontDelete) delete _Controls[i]; + CCtrlBase *c = _Controls[i]; _Controls.erase(_Controls.begin()+i); delEltOrder (child); + child->onRemoved(); + child->setParent( NULL ); + if (!dontDelete) delete c; return true; } } @@ -1116,9 +1122,12 @@ namespace NLGUI { if (_ChildrenGroups[i] == child) { - if (!dontDelete) delete _ChildrenGroups[i]; + CInterfaceGroup *g = _ChildrenGroups[i]; _ChildrenGroups.erase(_ChildrenGroups.begin()+i); delEltOrder (child); + child->onRemoved(); + child->setParent( NULL ); + if (!dontDelete) delete g; return true; } } From 7662138decfd4ee701a3d0e17accf5a2bbbc5cec Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 9 Mar 2013 20:58:53 +0100 Subject: [PATCH 011/138] FIXED: It's not nice to leak memory. --- code/nel/src/gui/ctrl_text_button.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 744086c38..76fa3e02d 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -66,6 +66,9 @@ namespace NLGUI { if( _Parent != NULL ) _Parent->delView( _ViewText ); + else + delete _ViewText; + _ViewText = NULL; } } From 8c2db11be305af9d9198c15715f366cbbeb5f2dd Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 9 Mar 2013 22:02:31 +0100 Subject: [PATCH 012/138] FIXED: Widgets will no longer get stuck in the widget hierarchy tree, when deleting their parent. --- code/nel/include/nel/gui/interface_element.h | 19 +++++ code/nel/src/gui/interface_element.cpp | 32 +++++++ .../plugins/gui_editor/widget_hierarchy.cpp | 84 ++++++++++++------- .../src/plugins/gui_editor/widget_hierarchy.h | 2 + 4 files changed, 109 insertions(+), 28 deletions(-) diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 739f1b95e..83bda2c84 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -70,6 +70,14 @@ namespace NLGUI { public: + /// Watches CInterfaceElement deletions + class IDeletionWatcher + { + public: + IDeletionWatcher(){} + virtual ~IDeletionWatcher(){} + virtual void onDeleted( const std::string &name ){} + }; enum EStrech { @@ -489,6 +497,12 @@ namespace NLGUI /// Called when the widget is removed from it's parent group virtual void onRemoved(){} + /// Registers a deletion watcher + static void registerDeletionWatcher( IDeletionWatcher *watcher ); + + /// Unregisters a deletion watcher + static void unregisterDeletionWatcher( IDeletionWatcher *watcher ); + protected: bool editorSelected; @@ -549,6 +563,11 @@ namespace NLGUI void parseSizeRef(const char *sizeRefStr, sint32 &sizeref, sint32 &sizeDivW, sint32 &sizeDivH); private: + /// Notifies the deletion watchers that this interface element is being deleted + void notifyDeletionWatchers(); + + static std::vector< IDeletionWatcher* > deletionWatchers; + //void snapSize(); bool serializable; diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index dc51735ff..9385887a4 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -32,6 +32,7 @@ using namespace NLMISC; namespace NLGUI { bool CInterfaceElement::editorMode = false; + std::vector< CInterfaceElement::IDeletionWatcher* > CInterfaceElement::deletionWatchers; // ------------------------------------------------------------------------------------------------ CInterfaceElement::~CInterfaceElement() @@ -44,6 +45,7 @@ namespace NLGUI } delete _Links; } + notifyDeletionWatchers(); } // ------------------------------------------------------------------------------------------------ @@ -1551,6 +1553,36 @@ namespace NLGUI } } + void CInterfaceElement::registerDeletionWatcher( IDeletionWatcher *watcher ) + { + std::vector< IDeletionWatcher* >::iterator itr + = std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher ); + // Already registered + if( itr != deletionWatchers.end() ) + return; + deletionWatchers.push_back( watcher ); + } + + void CInterfaceElement::unregisterDeletionWatcher( IDeletionWatcher *watcher ) + { + std::vector< IDeletionWatcher* >::iterator itr + = std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher ); + // Not registered + if( itr == deletionWatchers.end() ) + return; + deletionWatchers.erase( itr ); + } + + void CInterfaceElement::notifyDeletionWatchers() + { + std::vector< IDeletionWatcher* >::iterator itr = deletionWatchers.begin(); + while( itr != deletionWatchers.end() ) + { + (*itr)->onDeleted( _Id ); + ++itr; + } + } + CStringMapper* CStringShared::_UIStringMapper = NULL; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index 96ae10aa3..2bab73c1e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -56,6 +56,26 @@ namespace name = s.toUtf8().constData(); return name; } + + class CWidgetDeletionWatcher : public CInterfaceElement::IDeletionWatcher + { + public: + CWidgetDeletionWatcher(){ h = NULL; } + + ~CWidgetDeletionWatcher(){} + + void onDeleted( const std::string &id ){ + if( h != NULL ) + h->onWidgetDeleted( id ); + } + + void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; } + + private: + GUIEditor::WidgetHierarchy *h; + }; + + CWidgetDeletionWatcher deletionWatcher; } namespace GUIEditor @@ -66,6 +86,7 @@ namespace GUIEditor setupUi( this ); connect( widgetHT, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( onItemDblClicked( QTreeWidgetItem* ) ) ); + deletionWatcher.setWidgetHierarchy( this ); } WidgetHierarchy::~WidgetHierarchy() @@ -74,6 +95,7 @@ namespace GUIEditor void WidgetHierarchy::clearHierarchy() { + CInterfaceElement::unregisterDeletionWatcher( &deletionWatcher ); widgetHT->clear(); widgetHierarchyMap.clear(); } @@ -81,6 +103,7 @@ namespace GUIEditor void WidgetHierarchy::buildHierarchy( std::string &masterGroup ) { clearHierarchy(); + CInterfaceElement::registerDeletionWatcher( &deletionWatcher ); CInterfaceGroup *mg = CWidgetManager::getInstance()->getMasterGroupFromId( masterGroup ); if( mg != NULL ) @@ -131,6 +154,39 @@ namespace GUIEditor } } + void WidgetHierarchy::onWidgetDeleted( const std::string &id ) + { + std::map< std::string, QTreeWidgetItem* >::iterator itr + = widgetHierarchyMap.find( id ); + if( itr == widgetHierarchyMap.end() ) + return; + + if( widgetHT->currentItem() == itr->second ) + { + QTreeWidgetItem *item = itr->second; + QTreeWidgetItem *p = item; + + // Deselect item + item->setSelected( false ); + widgetHT->setCurrentItem( NULL ); + + // Collapse the tree + while( p != NULL ) + { + p->setExpanded( false ); + p = p->parent(); + } + + currentSelection = ""; + } + + itr->second->setSelected( false ); + + delete itr->second; + itr->second = NULL; + widgetHierarchyMap.erase( itr ); + } + void WidgetHierarchy::onGUILoaded() { if( masterGroup.empty() ) @@ -145,35 +201,7 @@ namespace GUIEditor return; if( newSelection.empty() ) - { - if( widgetHT->currentItem() != NULL ) - { - QTreeWidgetItem *item = widgetHT->currentItem(); - QTreeWidgetItem *p = item; - - // Deselect item - item->setSelected( false ); - widgetHT->setCurrentItem( NULL ); - - // Collapse the tree - while( p != NULL ) - { - p->setExpanded( false ); - p = p->parent(); - } - - // Finally remove the item! - delete item; - item = NULL; - - std::map< std::string, QTreeWidgetItem* >::iterator itr = - widgetHierarchyMap.find( currentSelection ); - if( itr != widgetHierarchyMap.end() ) - widgetHierarchyMap.erase( itr ); - currentSelection = ""; - } return; - } std::map< std::string, QTreeWidgetItem* >::iterator itr = widgetHierarchyMap.find( newSelection ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index 58e66212e..6de6b1366 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -42,6 +42,8 @@ namespace GUIEditor void clearHierarchy(); void buildHierarchy( std::string &masterGroup ); + void onWidgetDeleted( const std::string &id ); + private: void buildHierarchy( QTreeWidgetItem *parent, NLGUI::CInterfaceGroup *group ); From 31c6fc459faa2acd57dc2d0388b184ce44e35475 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 9 Mar 2013 22:31:51 +0100 Subject: [PATCH 013/138] MODIFIED: Ups, missed this. --- code/nel/src/gui/interface_element.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index 9385887a4..acc3197d7 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -45,7 +45,9 @@ namespace NLGUI } delete _Links; } - notifyDeletionWatchers(); + + if( editorMode ) + notifyDeletionWatchers(); } // ------------------------------------------------------------------------------------------------ From 69954d6e8b9bbcab052377cd532f3f8b020d943f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 10 Mar 2013 00:56:27 +0100 Subject: [PATCH 014/138] FIXED: Deleting the CViewText of CCtrlTextButton should no longer lead to crashes. --- code/nel/include/nel/gui/ctrl_text_button.h | 1 + code/nel/include/nel/gui/interface_element.h | 4 + code/nel/include/nel/gui/interface_group.h | 2 + code/nel/src/gui/ctrl_text_button.cpp | 82 ++++++++++++-------- code/nel/src/gui/interface_element.cpp | 4 + code/nel/src/gui/interface_group.cpp | 17 +++- 6 files changed, 73 insertions(+), 37 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index eb9968505..183b6a65e 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -125,6 +125,7 @@ namespace NLGUI REFLECT_EXPORT_END void onRemoved(); + void onWidgetDeleted( CInterfaceElement *e ); protected: diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 83bda2c84..764d165ef 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -503,6 +503,10 @@ namespace NLGUI /// Unregisters a deletion watcher static void unregisterDeletionWatcher( IDeletionWatcher *watcher ); + /// Called when the widget is deleted, + /// so other widgets in the group can check if it belongs to them + virtual void onWidgetDeleted( CInterfaceElement *e ){} + protected: bool editorSelected; diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index 61cdc2c9b..f72bc6f1f 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -322,6 +322,8 @@ namespace NLGUI // Return the current Depth, with no ZBias applied. float getDepthForZSort() const { return _DepthForZSort; } + void onWidgetDeleted( CInterfaceElement *e ); + protected: void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH); diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 76fa3e02d..c878ee82a 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -65,10 +65,8 @@ namespace NLGUI if( _ViewText != NULL ) { if( _Parent != NULL ) - _Parent->delView( _ViewText ); - else - delete _ViewText; - + _Parent->delView( _ViewText, true ); + delete _ViewText; _ViewText = NULL; } } @@ -124,7 +122,10 @@ namespace NLGUI else if( name == "hardtext" ) { - return _ViewText->getText().toString(); + if( _ViewText != NULL ) + return _ViewText->getText().toString(); + else + return std::string( "" ); } else if( name == "text_y" ) @@ -139,7 +140,10 @@ namespace NLGUI else if( name == "text_underlined" ) { - return toString( _ViewText->getUnderlined() ); + if( _ViewText != NULL ) + return toString( _ViewText->getUnderlined() ); + else + return std::string( "" ); } else if( name == "text_posref" ) @@ -280,7 +284,8 @@ namespace NLGUI else if( name == "hardtext" ) { - _ViewText->setText( value ); + if( _ViewText != NULL ) + _ViewText->setText( value ); return; } else @@ -303,8 +308,10 @@ namespace NLGUI if( name == "text_underlined" ) { bool b; - if( fromString( value, b ) ) - _ViewText->setUnderlined( b ); + if( _ViewText != NULL ) + if( fromString( value, b ) ) + _ViewText->setUnderlined( b ); + return; } else @@ -813,32 +820,35 @@ namespace NLGUI } } // Setup ViewText color - if ( pTxId==_TextureIdNormal || editorMode ) + if( _ViewText != NULL ) { - if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A; - else viewTextColor= _TextColorNormal; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorNormal); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal); + if ( pTxId==_TextureIdNormal || editorMode ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A; + else viewTextColor= _TextColorNormal; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorNormal); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal); + } + else if ( pTxId==_TextureIdPushed ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A; + else viewTextColor= _TextColorPushed; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorPushed); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed); + } + else if ( pTxId==_TextureIdOver ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A; + else viewTextColor= _TextColorOver; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorOver); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver); + } + if(getFrozen() && getFrozenHalfTone()) + _ViewText->setAlpha(_ViewText->getAlpha()>>2); } - else if ( pTxId==_TextureIdPushed ) - { - if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A; - else viewTextColor= _TextColorPushed; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorPushed); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed); - } - else if ( pTxId==_TextureIdOver ) - { - if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A; - else viewTextColor= _TextColorOver; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorOver); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver); - } - if(getFrozen() && getFrozenHalfTone()) - _ViewText->setAlpha(_ViewText->getAlpha()>>2); } @@ -978,5 +988,11 @@ namespace NLGUI _Parent->delView( _ViewText, true ); } } + + void CCtrlTextButton::onWidgetDeleted( CInterfaceElement *e ) + { + if( e == _ViewText ) + _ViewText = NULL; + } } diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index acc3197d7..786ac7967 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -47,7 +47,11 @@ namespace NLGUI } if( editorMode ) + { notifyDeletionWatchers(); + if( _Parent != NULL ) + _Parent->onWidgetDeleted( this ); + } } // ------------------------------------------------------------------------------------------------ diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 6804df955..a39a901c7 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1088,7 +1088,6 @@ namespace NLGUI _Views.erase(_Views.begin()+i); delEltOrder (child); child->onRemoved(); - child->setParent( NULL ); if (!dontDelete) delete v; return true; } @@ -1107,7 +1106,6 @@ namespace NLGUI _Controls.erase(_Controls.begin()+i); delEltOrder (child); child->onRemoved(); - child->setParent( NULL ); if (!dontDelete) delete c; return true; } @@ -1126,7 +1124,6 @@ namespace NLGUI _ChildrenGroups.erase(_ChildrenGroups.begin()+i); delEltOrder (child); child->onRemoved(); - child->setParent( NULL ); if (!dontDelete) delete g; return true; } @@ -2477,4 +2474,16 @@ namespace NLGUI return "IMPLEMENT ME!"; } -} \ No newline at end of file + void CInterfaceGroup::onWidgetDeleted( CInterfaceElement *e ) + { + for( std::vector< CViewBase* >::iterator itr = _Views.begin(); itr != _Views.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + + for( std::vector< CCtrlBase* >::iterator itr = _Controls.begin(); itr != _Controls.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + + for( std::vector< CInterfaceGroup* >::iterator itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + } +} + From dad844cc99eb533ce2a0ca3ad74ce9da4d846537 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 5 May 2013 04:58:15 +0200 Subject: [PATCH 015/138] Added GUI for widget adding. --- .../src/plugins/gui_editor/CMakeLists.txt | 2 + .../plugins/gui_editor/add_widget_widget.cpp | 64 ++++++++++++++++ .../plugins/gui_editor/add_widget_widget.h | 29 +++++++ .../plugins/gui_editor/add_widget_widget.ui | 76 +++++++++++++++++++ .../plugins/gui_editor/gui_editor_window.cpp | 25 ++++++ .../plugins/gui_editor/gui_editor_window.h | 4 + .../plugins/gui_editor/widget_hierarchy.cpp | 32 ++++++++ .../src/plugins/gui_editor/widget_hierarchy.h | 2 + .../src/plugins/gui_editor/widget_info_tree.h | 4 +- .../gui_editor/widget_info_tree_node.h | 8 +- .../plugins/gui_editor/widget_properties.cpp | 2 + .../plugins/gui_editor/widget_properties.h | 3 + 12 files changed, 246 insertions(+), 5 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index 63a7d00cc..893ec263e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -60,6 +60,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR nelgui_widget.h new_property_widget.h new_widget_widget.h + add_widget_widget.h editor_selection_watcher.h editor_message_processor.h ) @@ -76,6 +77,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS project_window.ui new_property_widget.ui new_widget_widget.ui + add_widget_widget.ui ) SET(QT_USE_QTGUI TRUE) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp new file mode 100644 index 000000000..24bd70f63 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp @@ -0,0 +1,64 @@ +#include "add_widget_widget.h" +#include "widget_info_tree.h" +#include +#include +#include + +namespace GUIEditor +{ + + AddWidgetWidget::AddWidgetWidget( QWidget *parent ) : + QWidget( parent ) + { + setupUi( this ); + setupConnections(); + } + + AddWidgetWidget::~AddWidgetWidget() + { + } + + void AddWidgetWidget::setCurrentGroup( const QString &g ) + { + groupEdit->setText( g ); + } + + void AddWidgetWidget::setupWidgetInfo( const CWidgetInfoTree *tree ) + { + std::vector< std::string > names; + tree->getNames( names, false ); + + widgetCB->clear(); + + std::sort( names.begin(), names.end() ); + + std::vector< std::string >::const_iterator itr = names.begin(); + while( itr != names.end() ) + { + widgetCB->addItem( QString( itr->c_str() ) ); + ++itr; + } + + } + + void AddWidgetWidget::setupConnections() + { + connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( close() ) ); + connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) ); + } + + void AddWidgetWidget::onAddClicked() + { + if( nameEdit->text().isEmpty() ) + { + QMessageBox::warning( NULL, + tr( "WARNING" ), + tr( "You need to specify a name for your new widget!" ), + QMessageBox::Ok ); + + return; + } + + close(); + } +} \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h new file mode 100644 index 000000000..fa5045ac2 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h @@ -0,0 +1,29 @@ +#ifndef ADD_WIDGET_WIDGET_H +#define ADD_WIDGET_WIDGET_H + +#include "ui_add_widget_widget.h" + +namespace GUIEditor +{ + class CWidgetInfoTree; + + class AddWidgetWidget : public QWidget, public Ui::AddWidgetWidget + { + Q_OBJECT + public: + AddWidgetWidget( QWidget *parent = NULL ); + ~AddWidgetWidget(); + + void setCurrentGroup( const QString &g ); + void setupWidgetInfo( const CWidgetInfoTree *tree ); + + private: + void setupConnections(); + + private Q_SLOTS: + void onAddClicked(); + }; + +} + +#endif diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui new file mode 100644 index 000000000..dd7e14e48 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui @@ -0,0 +1,76 @@ + + + AddWidgetWidget + + + Qt::ApplicationModal + + + + 0 + 0 + 318 + 132 + + + + Add new widget + + + + + + + + Group + + + + + + + + + + + + + + Widget + + + + + + + + + + Name + + + + + + + + + + + + Add + + + + + + + Cancel + + + + + + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index f84b555d1..33cb5e647 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -43,6 +43,7 @@ #include "nelgui_widget.h" #include "editor_selection_watcher.h" #include "editor_message_processor.h" +#include "add_widget_widget.h" namespace GUIEditor { @@ -61,6 +62,7 @@ namespace GUIEditor linkList = new LinkList; procList = new ProcList; projectWindow = new ProjectWindow; + addWidgetWidget = new AddWidgetWidget; connect( projectWindow, SIGNAL( projectFilesChanged() ), this, SLOT( onProjectFilesChanged() ) ); viewPort = new NelGUIWidget; setCentralWidget( viewPort ); @@ -76,6 +78,7 @@ namespace GUIEditor parser.setWidgetInfoTree( widgetInfoTree ); parser.parseGUIWidgets(); widgetProps->setupWidgetInfo( widgetInfoTree ); + addWidgetWidget->setupWidgetInfo( widgetInfoTree ); QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this ); dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea ); @@ -95,6 +98,7 @@ namespace GUIEditor viewPort->init(); connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); + connect( widgetProps, SIGNAL( treeChanged() ), this, SLOT( onTreeChanged() ) ); } GUIEditorWindow::~GUIEditorWindow() @@ -119,6 +123,9 @@ namespace GUIEditor delete viewPort; viewPort = NULL; + delete addWidgetWidget; + addWidgetWidget = NULL; + // no deletion needed for these, since dockwidget owns them hierarchyView = NULL; propBrowser = NULL; @@ -309,6 +316,20 @@ namespace GUIEditor connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); } + void GUIEditorWindow::onAddWidgetClicked() + { + QString g; + hierarchyView->getCurrentGroup( g ); + + addWidgetWidget->setCurrentGroup( g ); + addWidgetWidget->show(); + } + + void GUIEditorWindow::onTreeChanged() + { + addWidgetWidget->setupWidgetInfo( widgetInfoTree ); + } + void GUIEditorWindow::createMenus() { Core::MenuManager *mm = Core::ICore::instance()->menuManager(); @@ -352,6 +373,10 @@ namespace GUIEditor a = new QAction( "Project Window", this ); connect( a, SIGNAL( triggered( bool ) ), projectWindow, SLOT( show() ) ); m->addAction( a ); + + a = new QAction( "Add Widget", this ); + connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) ); + m->addAction( a ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h index 37f33e91c..e1a8b8b2d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h @@ -37,6 +37,7 @@ namespace GUIEditor class NelGUIWidget; class CWidgetInfoTree; class CEditorMessageProcessor; + class AddWidgetWidget; class GUIEditorWindow: public QMainWindow { @@ -60,6 +61,8 @@ public Q_SLOTS: private Q_SLOTS: void onProjectFilesChanged(); void onGUILoaded(); + void onAddWidgetClicked(); + void onTreeChanged(); private: void createMenus(); @@ -80,6 +83,7 @@ private: NelGUIWidget *viewPort; CWidgetInfoTree *widgetInfoTree; CEditorMessageProcessor *messageProcessor; + AddWidgetWidget *addWidgetWidget; CPropBrowserCtrl browserCtrl; QString currentProject; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index 85b662628..f48c35e93 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -187,6 +187,38 @@ namespace GUIEditor widgetHierarchyMap.erase( itr ); } + void WidgetHierarchy::getCurrentGroup( QString &g ) + { + std::string s = CWidgetManager::getInstance()->getCurrentEditorSelection(); + if( s.empty() ) + { + g = ""; + return; + } + + NLGUI::CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( s ); + if( e == NULL ) + { + g = ""; + return; + } + + if( e->isGroup() ) + { + g = e->getId().c_str(); + return; + } + + NLGUI::CInterfaceGroup *p = e->getParent(); + if( p == NULL ) + { + g = ""; + return; + } + + g = p->getId().c_str(); + } + void WidgetHierarchy::onGUILoaded() { if( masterGroup.empty() ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index 6de6b1366..bfc68ea4f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -44,6 +44,8 @@ namespace GUIEditor void onWidgetDeleted( const std::string &id ); + void getCurrentGroup( QString &g ); + private: void buildHierarchy( QTreeWidgetItem *parent, NLGUI::CInterfaceGroup *group ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h index 25ad7bb40..5e717923c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h @@ -93,11 +93,11 @@ namespace GUIEditor } /// Get the node names and put them into the vector - void getNames( std::vector< std::string > &v ) const + void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const { if( root == NULL ) return; - root->getNames( v ); + root->getNames( v, includeAbstract ); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h index 81adfe06c..0de9e6977 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h @@ -215,11 +215,13 @@ namespace GUIEditor } /// Get the node names and put them into the vector - void getNames( std::vector< std::string > &v ) const + void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const { - v.push_back( info.name ); + if( !info.isAbstract || ( info.isAbstract && includeAbstract ) ) + v.push_back( info.name ); + for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) - ( *itr )->getNames( v ); + ( *itr )->getNames( v, includeAbstract ); } /// Accepts a visitor to itself and to the children nodes diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp index 0a9337e6c..69d556975 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp @@ -84,6 +84,7 @@ namespace GUIEditor{ return; tree->removeNode( widgetName.toUtf8().constData() ); + Q_EMIT treeChanged(); widgetPropTree->clear(); buildWidgetList(); } @@ -156,6 +157,7 @@ namespace GUIEditor{ void CWidgetProperties::onWidgetAdded() { buildWidgetList(); + Q_EMIT treeChanged(); } void CWidgetProperties::buildWidgetList() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h index b14bf2f72..44e535b0f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h @@ -74,6 +74,9 @@ namespace GUIEditor CWidgetInfoTree *tree; NewPropertyWidget *newPropertyWidget; NewWidgetWidget *newWidgetWidget; + + Q_SIGNALS: + void treeChanged(); }; } From 00fa4cb3215285684b398045b94e72e716a66dc9 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 5 May 2013 05:49:35 +0200 Subject: [PATCH 016/138] Added some more checks, signal and slots related to widget adding. --- .../plugins/gui_editor/add_widget_widget.cpp | 15 ++++++++++++++- .../plugins/gui_editor/add_widget_widget.h | 3 +++ .../plugins/gui_editor/add_widget_widget.ui | 3 +++ .../gui_editor/editor_message_processor.cpp | 19 +++++++++++++++++++ .../gui_editor/editor_message_processor.h | 1 + .../plugins/gui_editor/gui_editor_window.cpp | 6 ++++++ 6 files changed, 46 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp index 24bd70f63..3f32586b6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp @@ -49,6 +49,16 @@ namespace GUIEditor void AddWidgetWidget::onAddClicked() { + if( groupEdit->text().isEmpty() ) + { + QMessageBox::warning( NULL, + tr( "WARNING" ), + tr( "You need to be adding the new widget into a group!" ), + QMessageBox::Ok ); + + return; + } + if( nameEdit->text().isEmpty() ) { QMessageBox::warning( NULL, @@ -60,5 +70,8 @@ namespace GUIEditor } close(); + + Q_EMIT adding( groupEdit->text(), widgetCB->currentText(), nameEdit->text() ); } -} \ No newline at end of file +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h index fa5045ac2..8f9f6a0be 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h @@ -22,6 +22,9 @@ namespace GUIEditor private Q_SLOTS: void onAddClicked(); + + Q_SIGNALS: + void adding( const QString &parentGroup, const QString &widgetType, const QString &name ); }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui index dd7e14e48..58a1890f4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui @@ -31,6 +31,9 @@ + + true + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 28cc7d75b..25924a804 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -54,5 +54,24 @@ namespace GUIEditor CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); } } + + void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) + { + // Check if this group exists + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( std::string( parentGroup.toAscii() ) ); + if( e == NULL ) + return; + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); + if( g == NULL ) + return; + + // Check if an element already exists with that name + if( g->getElement( std::string( name.toAscii() ) ) != NULL ) + return; + + // Create and add the new widget + //CViewBase *v = NULL; + //g->addView( v ); + } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h index 17cac7683..1d41e87a6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h @@ -28,6 +28,7 @@ namespace GUIEditor public Q_SLOTS: void onDelete(); + void onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ); }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index 33cb5e647..8ccd510ef 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -99,6 +99,12 @@ namespace GUIEditor connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); connect( widgetProps, SIGNAL( treeChanged() ), this, SLOT( onTreeChanged() ) ); + connect( + addWidgetWidget, + SIGNAL( adding( const QString&, const QString&, const QString& ) ), + messageProcessor, + SLOT( onAdd( const QString&, const QString&, const QString& ) ) + ); } GUIEditorWindow::~GUIEditorWindow() From 101d2cc612178a1febf1de4d79c7c92a57d24327 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 9 May 2013 05:53:14 +0200 Subject: [PATCH 017/138] Some more work for widget adding support. Basically the system works, just need to make sure the proper widget is instantiated, and the defaults are loaded ( so it shows up ). --- code/nel/include/nel/gui/interface_parser.h | 1 + code/nel/include/nel/gui/parser.h | 2 + .../include/nel/gui/widget_addition_watcher.h | 16 ++++ code/nel/include/nel/gui/widget_manager.h | 8 ++ code/nel/src/gui/interface_parser.cpp | 5 ++ code/nel/src/gui/widget_manager.cpp | 73 +++++++++++++++++++ .../gui_editor/editor_message_processor.cpp | 29 ++++---- .../plugins/gui_editor/widget_hierarchy.cpp | 44 +++++++++++ .../src/plugins/gui_editor/widget_hierarchy.h | 1 + 9 files changed, 165 insertions(+), 14 deletions(-) create mode 100644 code/nel/include/nel/gui/widget_addition_watcher.h diff --git a/code/nel/include/nel/gui/interface_parser.h b/code/nel/include/nel/gui/interface_parser.h index eb602b8ca..2bf1df9a8 100644 --- a/code/nel/include/nel/gui/interface_parser.h +++ b/code/nel/include/nel/gui/interface_parser.h @@ -382,6 +382,7 @@ namespace NLGUI bool serializeProcs( xmlNodePtr parentNode ) const; bool serializePointerSettings( xmlNodePtr parentNode ) const; bool serializeKeySettings( xmlNodePtr parentNode ) const; + CViewBase* createClass( const std::string &name ); }; } diff --git a/code/nel/include/nel/gui/parser.h b/code/nel/include/nel/gui/parser.h index dc6d00767..db868f70d 100644 --- a/code/nel/include/nel/gui/parser.h +++ b/code/nel/include/nel/gui/parser.h @@ -27,6 +27,7 @@ namespace NLGUI { class CInterfaceElement; + class CViewBase; class CInterfaceGroup; class CInterfaceAnim; class CCtrlSheetSelection; @@ -86,6 +87,7 @@ namespace NLGUI virtual bool serializeProcs( xmlNodePtr parentNode ) const = 0; virtual bool serializePointerSettings( xmlNodePtr parentNode ) const = 0; virtual bool serializeKeySettings( xmlNodePtr parentNode ) const = 0; + virtual CViewBase* createClass( const std::string &name ) = 0; }; } diff --git a/code/nel/include/nel/gui/widget_addition_watcher.h b/code/nel/include/nel/gui/widget_addition_watcher.h new file mode 100644 index 000000000..555c1ff3c --- /dev/null +++ b/code/nel/include/nel/gui/widget_addition_watcher.h @@ -0,0 +1,16 @@ +#ifndef WIDGET_ADD_WATCHER +#define WIDGET_ADD_WATCHER + +#include + +namespace NLGUI +{ + class IWidgetAdditionWatcher + { + public: + virtual void widgetAdded( const std::string &name ) = 0; + }; +} + +#endif + diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 498139ecf..7ec4908a0 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -48,6 +48,7 @@ namespace NLGUI class CInterfaceAnim; class CProcedure; class IEditorSelectionWatcher; + class IWidgetAdditionWatcher; /** GUI Widget Manager @@ -490,6 +491,12 @@ namespace NLGUI void notifySelectionWatchers(); void registerSelectionWatcher( IEditorSelectionWatcher *watcher ); void unregisterSelectionWatcher( IEditorSelectionWatcher *watcher ); + + void notifyAdditionWatchers( const std::string &widgetName ); + void registerAdditionWatcher( IWidgetAdditionWatcher *watcher ); + void unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher ); + + CInterfaceElement* addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName ); private: CWidgetManager(); @@ -570,6 +577,7 @@ namespace NLGUI std::vector< INewScreenSizeHandler* > newScreenSizeHandlers; std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers; std::vector< IEditorSelectionWatcher* > selectionWatchers; + std::vector< IWidgetAdditionWatcher* > additionWatchers; std::string currentEditorSelection; diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 76f5df1ed..03cce1449 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -3148,5 +3148,10 @@ namespace NLGUI return true; } + + CViewBase* CInterfaceParser::createClass( const std::string &name ) + { + return NLMISC_GET_FACTORY( CViewBase, std::string ).createObject( std::string( name ) , CViewBase::TCtorParam() ); + } } diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 0612d54b1..ecac9335c 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -34,6 +34,7 @@ #include "nel/gui/interface_expr.h" #include "nel/gui/reflect_register.h" #include "nel/gui/editor_selection_watcher.h" +#include "nel/gui/widget_addition_watcher.h" #include "nel/misc/events.h" namespace NLGUI @@ -3236,6 +3237,78 @@ namespace NLGUI selectionWatchers.erase( itr ); } + void CWidgetManager::notifyAdditionWatchers( const std::string &widgetName ) + { + std::vector< IWidgetAdditionWatcher* >::const_iterator itr = additionWatchers.begin(); + while( itr != additionWatchers.end() ) + { + (*itr)->widgetAdded( widgetName ); + ++itr; + } + } + + void CWidgetManager::registerAdditionWatcher( IWidgetAdditionWatcher *watcher ) + { + std::vector< IWidgetAdditionWatcher* >::const_iterator itr + = std::find( additionWatchers.begin(), additionWatchers.end(), watcher ); + // already exists + if( itr != additionWatchers.end() ) + return; + + additionWatchers.push_back( watcher ); + } + + void CWidgetManager::unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher ) + { + std::vector< IWidgetAdditionWatcher* >::iterator itr + = std::find( additionWatchers.begin(), additionWatchers.end(), watcher ); + // doesn't exist + if( itr == additionWatchers.end() ) + return; + + additionWatchers.erase( itr ); + } + + CInterfaceElement* CWidgetManager::addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName ) + { + // Check if this group exists + CInterfaceElement *e = getElementFromId( group ); + if( e == NULL ) + return NULL; + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); + if( g == NULL ) + return NULL; + + // Check if an element already exists with that name + if( g->getElement( widgetName ) != NULL ) + return NULL; + + // Create and add the new widget + CViewBase *v = getParser()->createClass( "button" ); + if( v == NULL ) + return NULL; + + v->setId( std::string( g->getId() + ":" + widgetName ) ); + + v->setParentPosRef( Hotspot_TL ); + v->setPosRef( Hotspot_TL ); + + if( v->isGroup() ) + g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) ); + else + if( v->isCtrl() ) + g->addCtrl( dynamic_cast< CCtrlBase* >( v ) ); + else + g->addView( v ); + + // Invalidate so it shows up! + v->invalidateCoords(); + + notifyAdditionWatchers( v->getId() ); + + return v; + } + CWidgetManager::CWidgetManager() { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 25924a804..c91381fb7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -57,21 +57,22 @@ namespace GUIEditor void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) { - // Check if this group exists - CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( std::string( parentGroup.toAscii() ) ); + CInterfaceElement *e = + CWidgetManager::getInstance()->addWidgetToGroup( + std::string( parentGroup.toUtf8() ), + std::string( widgetType.toUtf8() ), + std::string( name.toUtf8() ) + ); + if( e == NULL ) - return; - CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); - if( g == NULL ) - return; - - // Check if an element already exists with that name - if( g->getElement( std::string( name.toAscii() ) ) != NULL ) - return; - - // Create and add the new widget - //CViewBase *v = NULL; - //g->addView( v ); + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget!" ), + QMessageBox::Ok + ); + } } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index f48c35e93..24208f4a3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -18,6 +18,7 @@ #include "widget_hierarchy.h" #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" +#include "nel/gui/widget_addition_watcher.h" namespace { @@ -75,7 +76,26 @@ namespace GUIEditor::WidgetHierarchy *h; }; + class CWidgetAdditionWatcher : public IWidgetAdditionWatcher + { + public: + CWidgetAdditionWatcher(){ h = NULL; } + ~CWidgetAdditionWatcher(){} + + void widgetAdded( const std::string &name ) + { + if( h != NULL ) + h->onWidgetAdded( name ); + } + + void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; } + + private: + GUIEditor::WidgetHierarchy *h; + }; + CWidgetDeletionWatcher deletionWatcher; + CWidgetAdditionWatcher additionWatcher; } namespace GUIEditor @@ -87,6 +107,7 @@ namespace GUIEditor connect( widgetHT, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( onItemDblClicked( QTreeWidgetItem* ) ) ); deletionWatcher.setWidgetHierarchy( this ); + additionWatcher.setWidgetHierarchy( this ); } WidgetHierarchy::~WidgetHierarchy() @@ -96,6 +117,7 @@ namespace GUIEditor void WidgetHierarchy::clearHierarchy() { CInterfaceElement::unregisterDeletionWatcher( &deletionWatcher ); + CWidgetManager::getInstance()->unregisterAdditionWatcher( &additionWatcher ); widgetHT->clear(); widgetHierarchyMap.clear(); } @@ -104,6 +126,7 @@ namespace GUIEditor { clearHierarchy(); CInterfaceElement::registerDeletionWatcher( &deletionWatcher ); + CWidgetManager::getInstance()->registerAdditionWatcher( &additionWatcher ); CInterfaceGroup *mg = CWidgetManager::getInstance()->getMasterGroupFromId( masterGroup ); if( mg != NULL ) @@ -187,6 +210,27 @@ namespace GUIEditor widgetHierarchyMap.erase( itr ); } + void WidgetHierarchy::onWidgetAdded( const std::string &id ) + { + // Get the parent's name + std::string::size_type p = id.find_last_of( ':' ); + if( p == std::string::npos ) + return; + std::string parentId = id.substr( 0, p ); + + // Do we have the parent in the hierarchy? + std::map< std::string, QTreeWidgetItem* >::iterator itr + = widgetHierarchyMap.find( parentId ); + if( itr == widgetHierarchyMap.end() ) + return; + + // Add the new widget to the hierarchy + QTreeWidgetItem *parent = itr->second; + QTreeWidgetItem *item = new QTreeWidgetItem( parent ); + item->setText( 0, makeNodeName( id ).c_str() ); + widgetHierarchyMap[ id ] = item; + } + void WidgetHierarchy::getCurrentGroup( QString &g ) { std::string s = CWidgetManager::getInstance()->getCurrentEditorSelection(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index bfc68ea4f..4641c8ce8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -43,6 +43,7 @@ namespace GUIEditor void buildHierarchy( std::string &masterGroup ); void onWidgetDeleted( const std::string &id ); + void onWidgetAdded( const std::string &id ); void getCurrentGroup( QString &g ); From c030ad755d10c6dd5ff5d0ad1f4e1ab332dcaad2 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 9 May 2013 23:57:48 +0200 Subject: [PATCH 018/138] When adding a new widget, the correct widget is now instantiated. Also added some checks. --- .../include/nel/gui/widget_addition_watcher.h | 16 +++++ code/nel/src/gui/widget_manager.cpp | 59 +++++++++---------- .../gui_editor/editor_message_processor.cpp | 54 ++++++++++++++++- .../gui_editor/editor_message_processor.h | 14 ++++- .../plugins/gui_editor/gui_editor_window.cpp | 1 + .../src/plugins/gui_editor/widget_info.h | 1 + .../gui_editor/widget_info_serializer.cpp | 1 + .../gui_editor/widget_properties_parser.cpp | 3 + .../plugins/gui_editor/widgets/CtrlButton.xml | 1 + .../gui_editor/widgets/CtrlColPick.xml | 1 + .../plugins/gui_editor/widgets/CtrlScroll.xml | 1 + .../gui_editor/widgets/CtrlTextButton.xml | 1 + .../widgets/DBGroupSelectNumber.xml | 1 + .../plugins/gui_editor/widgets/DBViewBar.xml | 1 + .../plugins/gui_editor/widgets/DBViewBar3.xml | 1 + .../gui_editor/widgets/DBViewDigit.xml | 3 +- .../gui_editor/widgets/DBViewNumber.xml | 3 +- .../gui_editor/widgets/DBViewQuantity.xml | 7 ++- .../gui_editor/widgets/GroupContainer.xml | 1 + .../gui_editor/widgets/GroupEditBox.xml | 1 + .../plugins/gui_editor/widgets/GroupHTML.xml | 1 + .../gui_editor/widgets/GroupHeader.xml | 1 + .../plugins/gui_editor/widgets/GroupList.xml | 1 + .../plugins/gui_editor/widgets/GroupMenu.xml | 1 + .../plugins/gui_editor/widgets/GroupModal.xml | 1 + .../gui_editor/widgets/GroupScrollText.xml | 1 + .../plugins/gui_editor/widgets/GroupTab.xml | 1 + .../plugins/gui_editor/widgets/GroupTable.xml | 1 + .../plugins/gui_editor/widgets/GroupTree.xml | 1 + .../gui_editor/widgets/InterfaceGroup.xml | 1 + .../widgets/InterfaceGroupWheel.xml | 1 + .../plugins/gui_editor/widgets/ViewBitmap.xml | 1 + .../gui_editor/widgets/ViewBitmapCombo.xml | 1 + .../plugins/gui_editor/widgets/ViewText.xml | 3 +- .../gui_editor/widgets/ViewTextFormated.xml | 1 + .../plugins/gui_editor/widgets/ViewTextID.xml | 1 + .../gui_editor/widgets/ViewTextIDFormated.xml | 1 + 37 files changed, 151 insertions(+), 39 deletions(-) diff --git a/code/nel/include/nel/gui/widget_addition_watcher.h b/code/nel/include/nel/gui/widget_addition_watcher.h index 555c1ff3c..f4371ed5b 100644 --- a/code/nel/include/nel/gui/widget_addition_watcher.h +++ b/code/nel/include/nel/gui/widget_addition_watcher.h @@ -1,3 +1,19 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 . + #ifndef WIDGET_ADD_WATCHER #define WIDGET_ADD_WATCHER diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index ecac9335c..9ed12988e 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3271,37 +3271,34 @@ namespace NLGUI CInterfaceElement* CWidgetManager::addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName ) { - // Check if this group exists - CInterfaceElement *e = getElementFromId( group ); - if( e == NULL ) - return NULL; - CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); - if( g == NULL ) - return NULL; - - // Check if an element already exists with that name - if( g->getElement( widgetName ) != NULL ) - return NULL; - - // Create and add the new widget - CViewBase *v = getParser()->createClass( "button" ); - if( v == NULL ) - return NULL; - - v->setId( std::string( g->getId() + ":" + widgetName ) ); - - v->setParentPosRef( Hotspot_TL ); - v->setPosRef( Hotspot_TL ); - - if( v->isGroup() ) - g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) ); - else - if( v->isCtrl() ) - g->addCtrl( dynamic_cast< CCtrlBase* >( v ) ); - else - g->addView( v ); - - // Invalidate so it shows up! + // Check if this group exists + CInterfaceElement *e = getElementFromId( group ); + if( e == NULL ) + return NULL; + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); + if( g == NULL ) + return NULL; + + // Check if an element already exists with that name + if( g->getElement( widgetName ) != NULL ) + return NULL; + + // Create and add the new widget + CViewBase *v = getParser()->createClass( widgetClass ); + if( v == NULL ) + return NULL; + + v->setId( std::string( g->getId() + ":" + widgetName ) ); + + if( v->isGroup() ) + g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) ); + else + if( v->isCtrl() ) + g->addCtrl( dynamic_cast< CCtrlBase* >( v ) ); + else + g->addView( v ); + + // Invalidate so it shows up! v->invalidateCoords(); notifyAdditionWatchers( v->getId() ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index c91381fb7..44d0ad562 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -19,6 +19,7 @@ #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" +#include "widget_info_tree.h" namespace GUIEditor { @@ -57,13 +58,42 @@ namespace GUIEditor void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) { + CWidgetInfoTreeNode *node = tree->findNodeByName( std::string( widgetType.toUtf8() ) ); + // No such widget + if( node == NULL ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! No such widget type!" ), + QMessageBox::Ok + ); + + return; + } + + // No class name defined + std::string className = node->getInfo().className; + if( className.empty() ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! Missing classname!" ), + QMessageBox::Ok + ); + + return; + } + CInterfaceElement *e = CWidgetManager::getInstance()->addWidgetToGroup( std::string( parentGroup.toUtf8() ), - std::string( widgetType.toUtf8() ), + className, std::string( name.toUtf8() ) ); + // Failed to add widget if( e == NULL ) { QMessageBox::critical( @@ -72,7 +102,29 @@ namespace GUIEditor tr( "Error adding the new widget!" ), QMessageBox::Ok ); + + return; } + + // Setting the defaults will override the Id too + std::string id = e->getId(); + + // Set up the defaults + std::vector< SPropEntry >::const_iterator itr = node->getInfo().props.begin(); + while( itr != node->getInfo().props.end() ) + { + e->setProperty( itr->propName, itr->propDefault ); + ++itr; + } + + // Restore the Id + e->setId( id ); + // Make the widget aligned to the top left corner + e->setParentPosRef( Hotspot_TL ); + e->setPosRef( Hotspot_TL ); + + // Apply the new settings + e->invalidateCoords(); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h index 1d41e87a6..ffeedd7f1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h @@ -18,17 +18,29 @@ namespace GUIEditor { + class CWidgetInfoTree; + /// Processes the GUI Editor's editor messages like delete, new, etc... class CEditorMessageProcessor : public QObject { Q_OBJECT public: - CEditorMessageProcessor( QObject *parent = NULL ) : QObject( parent ){} + CEditorMessageProcessor( QObject *parent = NULL ) : + QObject( parent ) + { + tree = NULL; + } + ~CEditorMessageProcessor(){} + + void setTree( CWidgetInfoTree *tree ){ this->tree = tree; } public Q_SLOTS: void onDelete(); void onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ); + + private: + CWidgetInfoTree *tree; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index 8ccd510ef..341338d8d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -79,6 +79,7 @@ namespace GUIEditor parser.parseGUIWidgets(); widgetProps->setupWidgetInfo( widgetInfoTree ); addWidgetWidget->setupWidgetInfo( widgetInfoTree ); + messageProcessor->setTree( widgetInfoTree ); QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this ); dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h index 7a33ef056..2f7396071 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h @@ -53,6 +53,7 @@ namespace GUIEditor { std::string name; std::string GUIName; + std::string className; std::string ancestor; std::string description; bool isAbstract; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp index 4c2339c40..cf7acca1a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp @@ -63,6 +63,7 @@ namespace GUIEditor f << "\t
" << std::endl; f << "\t\t" << info.name << "" << std::endl; f << "\t\t" << info.GUIName << "" << std::endl; + f << "\t\t" << info.className << "" << std::endl; f << "\t\t" << info.ancestor << "" << std::endl; f << "\t\t" << info.description << "" << std::endl; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp index fe7ee6d54..d4d708db4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp @@ -131,6 +131,9 @@ namespace GUIEditor if( key == "guiname" ) info.GUIName = value.toUtf8().constData(); else + if( key == "classname" ) + info.className = value.toUtf8().constData(); + else if( key == "ancestor" ) info.ancestor = value.toUtf8().constData(); else diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml index 12b82e7f6..cb6f6c099 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml @@ -2,6 +2,7 @@
CtrlButton CCtrlButton + button CtrlBaseButton false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml index ea2ba6171..6ac05fbcc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml @@ -2,6 +2,7 @@
CtrlColPick CCtrlColPick + colpick CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml index 1ad970f31..a5c8dae1e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml @@ -2,6 +2,7 @@
CtrlScroll CCtrlScroll + scroll CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml index 1195432d1..8826cd5db 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml @@ -2,6 +2,7 @@
CtrlTextButton CCtrlTextButton + text_button CtrlBaseButton false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml index 624ded887..63be51b5e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml @@ -2,6 +2,7 @@
DBGroupSelectNumber CDBGroupSelectNumber + select_number InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml index 33250a27c..c7f2e488c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml @@ -2,6 +2,7 @@
DBViewBar CDBViewBar + bar ViewBitmap false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml index fbb74ad3b..9b12a637a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml @@ -2,6 +2,7 @@
DBViewBar3 CDBViewBar3 + bar3 ViewBitmap false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml index 0d9aca44a..8a2a28831 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml @@ -2,6 +2,7 @@
DBViewDigit CDBViewDigit + digit CtrlBase false @@ -11,7 +12,7 @@ value string - + 0 numdigit diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml index c1861df61..95a43025e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml @@ -2,6 +2,7 @@
DBViewNumber CDBViewNumber + text_number ViewText false @@ -11,7 +12,7 @@ value string - + 0 positive diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml index c24379c96..1b812bccf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml @@ -2,6 +2,7 @@
DBViewQuantity CDBViewQuantity + text_quantity ViewText false @@ -11,17 +12,17 @@ value string - + 0 valuemax string - + 100 emptytext string - + empty text diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml index ad167520d..bdbf9931a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml @@ -2,6 +2,7 @@
GroupContainer CGroupContainer + container InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml index 31ca205c7..603af6c04 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml @@ -2,6 +2,7 @@
GroupEditBox CGroupEditBox + edit_box InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml index fe2235c04..b76fe4cd4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml @@ -2,6 +2,7 @@
GroupHTML CGroupHTML + html GroupScrollText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml index cc96fd742..bcb517c66 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml @@ -2,6 +2,7 @@
GroupHeader CGroupHeader + header GroupList false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml index e7db36de6..1858cd5b3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml @@ -2,6 +2,7 @@
GroupList CGroupList + list InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml index ac57b5c4d..4739f0352 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml @@ -2,6 +2,7 @@
GroupMenu CGroupMenu + menu GroupModal false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml index 034e3025e..afc5005c8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml @@ -2,6 +2,7 @@
GroupModal CGroupModal + modal GroupFrame false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml index 95719398d..8cefb8df2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml @@ -2,6 +2,7 @@
GroupScrollText CGroupScrollText + scroll_text InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml index df148a0a3..69db79466 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml @@ -2,6 +2,7 @@
GroupTab CGroupTab + tab InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml index 8e9b8cffe..9c2240adc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml @@ -2,6 +2,7 @@
GroupTable CGroupTable + table InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml index 8e075ac53..6bd10ad9f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml @@ -2,6 +2,7 @@
GroupTree CGroupTree + tree InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml index b9e99d336..c9a8c1546 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml @@ -2,6 +2,7 @@
InterfaceGroup CInterfaceGroup + interface_group CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml index 62d67cc0a..51590ee33 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml @@ -2,6 +2,7 @@
InterfaceGroupWheel CInterfaceGroupWheel + group_wheel InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml index 9da967b5a..8b931f78b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml @@ -2,6 +2,7 @@
ViewBitmap CViewBitmap + bitmap CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml index 0b55f6932..190143be5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml @@ -2,6 +2,7 @@
ViewBitmapCombo CViewBitmapCombo + bitmap_combo CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml index 378854df5..f2a0b28df 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml @@ -2,6 +2,7 @@
ViewText CViewText + text InterfaceElement false @@ -101,7 +102,7 @@ hardtext string - + some text hardtext_format diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml index cabd081f0..c5749ca9c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml @@ -2,6 +2,7 @@
ViewTextFormated CViewTextFormated + text_formated ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml index 52e010ec6..b3edc86ab 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml @@ -2,6 +2,7 @@
ViewTextID CViewTextID + text_id ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml index af8dd54eb..3ac6c7962 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml @@ -2,6 +2,7 @@
ViewTextIDFormated CViewTextIDFormated + text_id_formated ViewTextID false From 43019419afaeb41f8cacac45bfb43ac8d49b337b Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 00:28:29 +0200 Subject: [PATCH 019/138] Forgot to set the parent. --- code/nel/src/gui/widget_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 9ed12988e..f718f63a7 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3298,6 +3298,8 @@ namespace NLGUI else g->addView( v ); + v->setParent( g ); + // Invalidate so it shows up! v->invalidateCoords(); From 2dbf68d6e40887c70ece164b9dd5dd7367102faa Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 00:55:23 +0200 Subject: [PATCH 020/138] Make sure to apply the changes, when changing properties. --- code/nel/src/gui/widget_manager.cpp | 3 --- .../src/plugins/gui_editor/editor_message_processor.cpp | 5 +++-- .../src/plugins/gui_editor/property_browser_ctrl.cpp | 6 ++++++ .../src/plugins/gui_editor/widgets/ViewText.xml | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index f718f63a7..bad93687b 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3300,9 +3300,6 @@ namespace NLGUI v->setParent( g ); - // Invalidate so it shows up! - v->invalidateCoords(); - notifyAdditionWatchers( v->getId() ); return v; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 44d0ad562..c784fa527 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -123,8 +123,9 @@ namespace GUIEditor e->setParentPosRef( Hotspot_TL ); e->setPosRef( Hotspot_TL ); - // Apply the new settings - e->invalidateCoords(); + // Apply the new settings + e->setActive( false ); + e->setActive( true ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp index 3c5fa9177..82330bfaf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -111,6 +111,12 @@ namespace GUIEditor if( e == NULL ) return; e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); + + + // Make sure the changes are applied + bool active = e->getActive(); + e->setActive( !active ); + e->setActive( active ); } void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml index f2a0b28df..9490a1eee 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml @@ -47,7 +47,7 @@ line_maxw int - 0 + 100 multi_line_space From 776c95f12fddc884b865aca6d7d631364fbe80c7 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 02:10:18 +0200 Subject: [PATCH 021/138] The editor probably shouldn't crash when adding textbutton widget. --- code/nel/src/gui/ctrl_text_button.cpp | 8 ++++++++ code/nel/src/gui/widget_manager.cpp | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index a977902b7..8dbe9b912 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -886,6 +886,14 @@ namespace NLGUI { _Setuped= true; + if( _ViewText == NULL ) + { + CViewBase *v = CWidgetManager::getInstance()->getParser()->createClass( "text" ); + nlassert( v != NULL ); + _ViewText = dynamic_cast< CViewText* >( v ); + _ViewText->setText( ucstring( "text" ) ); + } + // setup the viewText and add to parent _ViewText->setParent (getParent()); _ViewText->setParentPos (this); diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index bad93687b..6e7431b70 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3289,6 +3289,7 @@ namespace NLGUI return NULL; v->setId( std::string( g->getId() + ":" + widgetName ) ); + v->setParent( g ); if( v->isGroup() ) g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) ); @@ -3298,8 +3299,6 @@ namespace NLGUI else g->addView( v ); - v->setParent( g ); - notifyAdditionWatchers( v->getId() ); return v; From 9382e6d1f95230570ef4843467664159c8f20a25 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 22:29:47 +0200 Subject: [PATCH 022/138] Added some defaults. --- code/nel/src/gui/ctrl_text_button.cpp | 7 +++++++ .../plugins/gui_editor/widgets/CtrlBaseButton.xml | 2 +- .../src/plugins/gui_editor/widgets/CtrlButton.xml | 6 +++--- .../plugins/gui_editor/widgets/CtrlTextButton.xml | 12 ++++++------ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 8dbe9b912..cdf006a51 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -237,6 +237,11 @@ namespace NLGUI _TextureIdNormal[ 0 ].setTexture( std::string( value + "_l.tga" ).c_str() ); _TextureIdNormal[ 1 ].setTexture( std::string( value + "_m.tga" ).c_str() ); _TextureIdNormal[ 2 ].setTexture( std::string( value + "_r.tga" ).c_str() ); + + CViewRenderer &rVR = *CViewRenderer::getInstance(); + rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH); + rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH); + rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH); return; } else @@ -891,7 +896,9 @@ namespace NLGUI CViewBase *v = CWidgetManager::getInstance()->getParser()->createClass( "text" ); nlassert( v != NULL ); _ViewText = dynamic_cast< CViewText* >( v ); + _ViewText->setId( _Id + "_text" ); _ViewText->setText( ucstring( "text" ) ); + _ViewText->setSerializable( false ); } // setup the viewText and add to parent diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml index 722d1b241..42e2bdef1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml @@ -11,7 +11,7 @@ button_type string - toggle_button + push_button pushed diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml index cb6f6c099..fb2514e7c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml @@ -12,17 +12,17 @@ tx_normal string - + log_but_r.tga tx_pushed string - + log_but_r.tga tx_over string - + log_but_over_r.tga scale diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml index 8826cd5db..cacc45ccb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml @@ -12,27 +12,27 @@ tx_normal string - + but tx_pushed string - + but tx_over string - + but_over hardtext string - + text wmargin int - 0 + 20 wmin @@ -152,7 +152,7 @@ line_maxw int - 0 + 200 multi_line_space From 88881227374884381f6608daf588c9e5f1a6ab35 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 22:35:04 +0200 Subject: [PATCH 023/138] Inconsistent line ending style, according to VS. How it managed to do this is a mystery tho. --- .../gui_editor/editor_message_processor.cpp | 260 +++++++++--------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index c784fa527..2a9810f24 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -1,131 +1,131 @@ -// Object Viewer Qt GUI Editor plugin -// Copyright (C) 2010 Winch Gate Property Limited -// -// 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 "editor_message_processor.h" - -#include "nel/gui/interface_group.h" -#include "nel/gui/widget_manager.h" -#include "widget_info_tree.h" - -namespace GUIEditor -{ - void CEditorMessageProcessor::onDelete() - { - std::string selection = CWidgetManager::getInstance()->getCurrentEditorSelection(); - if( selection.empty() ) - return; - - QMessageBox::StandardButton r = - QMessageBox::question( NULL, - tr( "Deleting widget" ), - tr( "Are you sure you want to delete %1?" ).arg( selection.c_str() ), - QMessageBox::Yes | QMessageBox::No ); - if( r != QMessageBox::Yes ) - return; - - CInterfaceElement *e = - CWidgetManager::getInstance()->getElementFromId( selection ); - if( e == NULL ) - return; - - CInterfaceElement *p = e->getParent(); - if( p == NULL ) - return; - - CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); - if( g == NULL ) - return; - - if( g->delElement( e ) ) - { - CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); - } - } - - void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) - { - CWidgetInfoTreeNode *node = tree->findNodeByName( std::string( widgetType.toUtf8() ) ); - // No such widget - if( node == NULL ) - { - QMessageBox::critical( - NULL, - tr( "Error" ), - tr( "Error adding the new widget! No such widget type!" ), - QMessageBox::Ok - ); - - return; - } - - // No class name defined - std::string className = node->getInfo().className; - if( className.empty() ) - { - QMessageBox::critical( - NULL, - tr( "Error" ), - tr( "Error adding the new widget! Missing classname!" ), - QMessageBox::Ok - ); - - return; - } - - CInterfaceElement *e = - CWidgetManager::getInstance()->addWidgetToGroup( - std::string( parentGroup.toUtf8() ), - className, - std::string( name.toUtf8() ) - ); - - // Failed to add widget - if( e == NULL ) - { - QMessageBox::critical( - NULL, - tr( "Error" ), - tr( "Error adding the new widget!" ), - QMessageBox::Ok - ); - - return; - } - - // Setting the defaults will override the Id too - std::string id = e->getId(); - - // Set up the defaults - std::vector< SPropEntry >::const_iterator itr = node->getInfo().props.begin(); - while( itr != node->getInfo().props.end() ) - { - e->setProperty( itr->propName, itr->propDefault ); - ++itr; - } - - // Restore the Id - e->setId( id ); - // Make the widget aligned to the top left corner - e->setParentPosRef( Hotspot_TL ); - e->setPosRef( Hotspot_TL ); - +// Object Viewer Qt GUI Editor plugin +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "editor_message_processor.h" + +#include "nel/gui/interface_group.h" +#include "nel/gui/widget_manager.h" +#include "widget_info_tree.h" + +namespace GUIEditor +{ + void CEditorMessageProcessor::onDelete() + { + std::string selection = CWidgetManager::getInstance()->getCurrentEditorSelection(); + if( selection.empty() ) + return; + + QMessageBox::StandardButton r = + QMessageBox::question( NULL, + tr( "Deleting widget" ), + tr( "Are you sure you want to delete %1?" ).arg( selection.c_str() ), + QMessageBox::Yes | QMessageBox::No ); + if( r != QMessageBox::Yes ) + return; + + CInterfaceElement *e = + CWidgetManager::getInstance()->getElementFromId( selection ); + if( e == NULL ) + return; + + CInterfaceElement *p = e->getParent(); + if( p == NULL ) + return; + + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); + if( g == NULL ) + return; + + if( g->delElement( e ) ) + { + CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); + } + } + + void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) + { + CWidgetInfoTreeNode *node = tree->findNodeByName( std::string( widgetType.toUtf8() ) ); + // No such widget + if( node == NULL ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! No such widget type!" ), + QMessageBox::Ok + ); + + return; + } + + // No class name defined + std::string className = node->getInfo().className; + if( className.empty() ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! Missing classname!" ), + QMessageBox::Ok + ); + + return; + } + + CInterfaceElement *e = + CWidgetManager::getInstance()->addWidgetToGroup( + std::string( parentGroup.toUtf8() ), + className, + std::string( name.toUtf8() ) + ); + + // Failed to add widget + if( e == NULL ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget!" ), + QMessageBox::Ok + ); + + return; + } + + // Setting the defaults will override the Id too + std::string id = e->getId(); + + // Set up the defaults + std::vector< SPropEntry >::const_iterator itr = node->getInfo().props.begin(); + while( itr != node->getInfo().props.end() ) + { + e->setProperty( itr->propName, itr->propDefault ); + ++itr; + } + + // Restore the Id + e->setId( id ); + // Make the widget aligned to the top left corner + e->setParentPosRef( Hotspot_TL ); + e->setPosRef( Hotspot_TL ); + // Apply the new settings - e->setActive( false ); - e->setActive( true ); - } -} - + e->setActive( false ); + e->setActive( true ); + } +} + From edfc2c5491d9ee2198a114aba4cd82e18f8ccfa7 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 11 May 2013 02:40:55 +0200 Subject: [PATCH 024/138] Editbox should now create it's text when added. --- code/nel/src/gui/group_editbox.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 4e8eb3e36..26feff20c 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -1411,7 +1411,8 @@ namespace NLGUI // ---------------------------------------------------------------------------- void CGroupEditBox::checkCoords() { - setupDisplayText(); + if( !editorMode ) + setupDisplayText(); CInterfaceGroup::checkCoords(); } @@ -1530,7 +1531,29 @@ namespace NLGUI _ViewText = dynamic_cast(CInterfaceGroup::getView("edit_text")); if(_ViewText == NULL) + { nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type"); + if( editorMode ) + { + nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() ); + _ViewText = dynamic_cast< CViewText* >( CWidgetManager::getInstance()->getParser()->createClass( "text" ) ); + if( _ViewText != NULL ) + { + _ViewText->setParent( this ); + _ViewText->setIdRecurse( "edit_text" ); + _ViewText->setHardText( "sometext" ); + _ViewText->setPosRef( Hotspot_TL ); + _ViewText->setParentPosRef( Hotspot_TL ); + addView( _ViewText ); + + setH( _ViewText->getFontHeight() ); + setW( _ViewText->getFontWidth() * _ViewText->getText().size() ); + + } + else + nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() ); + } + } // For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens) if(_ViewText) From 07045b78805986ff27138e34a983b501bb440b6a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 15 May 2013 01:54:35 +0200 Subject: [PATCH 025/138] Making GCC happy. --- .../src/plugins/gui_editor/editor_message_processor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 2a9810f24..691dbdead 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -86,11 +86,14 @@ namespace GUIEditor return; } + std::string pgName = std::string( parentGroup.toUtf8() ); + std::string wName = std::string( name.toUtf8() ); + CInterfaceElement *e = CWidgetManager::getInstance()->addWidgetToGroup( - std::string( parentGroup.toUtf8() ), + pgName, className, - std::string( name.toUtf8() ) + wName ); // Failed to add widget From 194f0764439489c3e36c1584d32462669774445d Mon Sep 17 00:00:00 2001 From: botanic Date: Sat, 8 Feb 2014 19:00:21 -0800 Subject: [PATCH 026/138] Set permissions in the ams installer --- .../ryzom_ams/www/html/installer/libsetup.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 2809ab05d..7c7cb933a 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -4,6 +4,32 @@ * This script will install all databases related to the Ryzom AMS and it will generate an admin account.. * @author Daan Janssens, mentored by Matthew Lagoe */ + + //set permissions + if(chmod('../../../www/login/logs', 0660)) { + echo "failed to set permissions on logs"; + exit; + } + if(chmod('../../../admin/graphs_output', 0660)) { + echo "failed to set permissions on graphs_output"; + exit; + } + if(chmod('../../../templates/default_c', 0660)) { + echo "failed to set permissions on default_c"; + exit; + } + if(chmod('../../www', 0660)) { + echo "failed to set permissions on www"; + exit; + } + if(chmod('../../www/html/cache', 0660)) { + echo "failed to set permissions on cache"; + exit; + } + if(chmod('../../www/html/templates_c', 0660)) { + echo "failed to set permissions on templates_c"; + exit; + } if (!isset($_POST['function'])) { //require the pages that are being needed. From f283c4294bd33710f509e3edb670de836f1d76fd Mon Sep 17 00:00:00 2001 From: botanic Date: Sat, 8 Feb 2014 19:26:11 -0800 Subject: [PATCH 027/138] auto create ring user permissions --- code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php index 867aa270b..f83f46576 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php @@ -289,8 +289,11 @@ class Users{ public static function createUser($values, $user_id){ try { //make connection with and put into shard db + $values['user_id']= $user_id; $dbs = new DBLayer("shard"); $dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)",$values); + $dbr = new DBLayer("ring"); + $dbr->execute("INSERT INTO ring_users (user_id, user_name, user_type) VALUES (:user_id, :name, 'ut_pioneer')",$values); ticket_user::createTicketUser( $user_id, 1); return "ok"; } From d558690f4437b52ec764e36c63af01342d63466f Mon Sep 17 00:00:00 2001 From: botanic Date: Sat, 8 Feb 2014 20:15:38 -0800 Subject: [PATCH 028/138] add_user code for AMS --- .../ryzom_ams/www/html/func/add_user.php | 11 +- .../ryzom_ams/www/html/templates/settings.tpl | 158 ++++++++++++++++++ 2 files changed, 168 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php index aad237ae7..fa08ef1a5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php @@ -37,6 +37,15 @@ function add_user(){ $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register_feedback', $pageElements); exit; + }elseif ($_POST['page']=="settings"){ + // pass error and reload template accordingly + $result['prevUsername'] = $_POST["Username"]; + $result['prevPassword'] = $_POST["Password"]; + $result['prevConfirmPass'] = $_POST["ConfirmPass"]; + $result['prevEmail'] = $_POST["Email"]; + $result['no_visible_elements'] = 'TRUE'; + helpers :: loadtemplate( 'settings', $result); + exit; }else{ // pass error and reload template accordingly $result['prevUsername'] = $_POST["Username"]; @@ -44,7 +53,7 @@ function add_user(){ $result['prevConfirmPass'] = $_POST["ConfirmPass"]; $result['prevEmail'] = $_POST["Email"]; $result['no_visible_elements'] = 'TRUE'; - $pageElements['ingame_webpath'] = $INGAME_WEBPATH; + $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register', $result); exit; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 4ea75af12..395071a5b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -52,6 +52,164 @@ + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The password has been changed! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+ + + + + + +
+
+

Add User

+
+ + +
+
+
+
+
+ Add User + +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The user is created! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The user can't be created. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+ + +
+
+

Create User

+
+ + +
+
+
+
+
+ Create User + + {if !isset($changesOther) or $changesOther eq "FALSE"} +
+ +
+
+ + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+
+
+ {/if} +
+ +
+
+ + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
The password has been changed! From c0e55b4cc6aac5023db395222622b4a944f52fdb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 17:26:26 +0100 Subject: [PATCH 029/138] Fix export of NeL Flare --- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp | 6 ++++-- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp index 4df66b224..8249eda39 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp @@ -41,8 +41,10 @@ IShape* CExportNel::buildFlare(INode& node, TimeValue time) CExportNel::getValueByNameUsingParamBlock2(node, "PersistenceParam", (ParamType2)TYPE_FLOAT, &persistence, 0); fshape->setPersistence(persistence); // retrieve spacing of the flare - CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0); - fshape->setFlareSpacing(spacing); + bool hasSpacing = CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0) + || CExportNel::getValueByNameUsingParamBlock2(node, "spacing", (ParamType2)TYPE_FLOAT, &spacing, 0); + if (hasSpacing) fshape->setFlareSpacing(spacing); + else nlwarning("FAILED CFlareShape Spacing"); // retrieve use of radial attenuation CExportNel::getValueByNameUsingParamBlock2(node, "Attenuable", (ParamType2) TYPE_BOOL, &attenuable, 0); if (attenuable) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 44f51fc75..39e13d868 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -409,7 +409,7 @@ bool getValueByNameUsingParamBlock2Internal (Animatable& node, const char* sName } else { - nldebug("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'", + nlwarning("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'", sName, (uint32)type, (uint32)paramType); } } @@ -448,7 +448,7 @@ bool CExportNel::getValueByNameUsingParamBlock2 (Animatable& node, const char* s } else { - // nlwarning ("Can't found ParamBlock named %s", sName); + nlwarning ("FAILED Can't find ParamBlock named '%s'", sName); return false; } } From aaad67a5e5b2d2267bd3016ebee3e5cb9adfa789 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 21:53:49 +0100 Subject: [PATCH 030/138] Cleanup --- .../nel_mesh_lib/export_material.cpp | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp index b3e632547..afe64907b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp @@ -17,6 +17,7 @@ #include "stdafx.h" #include "export_nel.h" #include "../tile_utility/tile_utility.h" +#include "nel/misc/path.h" #include "nel/3d/texture_file.h" #include "nel/3d/texture_multi_file.h" #include "nel/3d/texture_cube.h" @@ -1139,9 +1140,9 @@ int CExportNel::getVertMapChannel (Texmap& texmap, Matrix3& channelMatrix, TimeV } // get the absolute or relative path from a texture filename -static std::string ConvertTexFileName(const char *src, bool _AbsolutePath) +static std::string ConvertTexFileName(const std::string &path, bool _AbsolutePath) { - // File name, maxlen 256 under windows + /*// File name, maxlen 256 under windows char sFileName[512]; strcpy (sFileName, src); @@ -1156,7 +1157,15 @@ static std::string ConvertTexFileName(const char *src, bool _AbsolutePath) // Make the final path _makepath (sFileName, NULL, NULL, sName, sExt); } - return std::string(sFileName); + return std::string(sFileName);*/ + if (_AbsolutePath) + { + return path; + } + else + { + return NLMISC::CFile::getFilename(path); + } } // Build a NeL texture corresponding with a max Texmap. @@ -1243,7 +1252,7 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC if (l == 1 && !fileName[0].empty()) { srcTex = new CTextureFile; - static_cast(srcTex)->setFileName (ConvertTexFileName(fileName[0].c_str(), _AbsolutePath)); + static_cast(srcTex)->setFileName (ConvertTexFileName(fileName[0], _AbsolutePath)); } else { @@ -1253,7 +1262,8 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC if (!fileName[k].empty()) { /// set the name of the texture after converting it - static_cast(srcTex)->setFileName(k, ConvertTexFileName(fileName[k].c_str(), _AbsolutePath).c_str()); + std::string convertMultiTex = ConvertTexFileName(fileName[k], _AbsolutePath); + static_cast(srcTex)->setFileName(k, convertMultiTex.c_str()); } } } @@ -1261,7 +1271,8 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC else // standard texture { srcTex = new CTextureFile; - static_cast(srcTex)->setFileName (ConvertTexFileName(pBitmap->GetMapName(), _AbsolutePath)); + std::string mapName = pBitmap->GetMapName(); + static_cast(srcTex)->setFileName (ConvertTexFileName(mapName, _AbsolutePath)); } // 2) Use this texture 'as it', or duplicate it to create the faces of a cube map @@ -1361,7 +1372,7 @@ NL3D::CTextureCube *CExportNel::buildTextureCubeFromReflectRefract(Texmap &texma CTextureFile *pT = new CTextureFile(); // Set the file name - pT->setFileName(ConvertTexFileName(names[i].c_str(), _AbsolutePath)); + pT->setFileName(ConvertTexFileName(names[i], _AbsolutePath)); // Set the texture pTextureCube->setTexture(tfNewOrder[i], pT); From ad40eb6450e049638369316762dff24f0a298a47 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 22:12:44 +0100 Subject: [PATCH 031/138] Fix the bug that caused the shape exporter to crash --- code/nel/src/3d/mesh_multi_lod.cpp | 6 +++++- .../tools/3d/plugin_max/nel_export/nel_export_export.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/nel/src/3d/mesh_multi_lod.cpp b/code/nel/src/3d/mesh_multi_lod.cpp index 2ddf0d2e0..e26632f6e 100644 --- a/code/nel/src/3d/mesh_multi_lod.cpp +++ b/code/nel/src/3d/mesh_multi_lod.cpp @@ -791,17 +791,20 @@ void CMeshMultiLod::compileCoarseMeshes() { slotRef.CoarseTriangles.resize(slotRef.CoarseNumTris * 3); TCoarseMeshIndexType *dstPtr= &slotRef.CoarseTriangles[0]; + uint totalTris = 0; for(uint i=0;igetNbRdrPass(0);i++) { const CIndexBuffer &pb= meshGeom->getRdrPassPrimitiveBlock(0, i); CIndexBufferRead ibaRead; pb.lock (ibaRead); uint numTris= pb.getNumIndexes()/3; + totalTris += numTris; if (pb.getFormat() == CIndexBuffer::Indices16) { if (sizeof(TCoarseMeshIndexType) == sizeof(uint16)) { memcpy(dstPtr, (uint16 *) ibaRead.getPtr(), numTris*3*sizeof(uint16)); + dstPtr+= numTris*3; } else { @@ -820,6 +823,7 @@ void CMeshMultiLod::compileCoarseMeshes() if (sizeof(TCoarseMeshIndexType) == sizeof(uint32)) { memcpy(dstPtr, (uint32 *) ibaRead.getPtr(), numTris*3*sizeof(uint32)); + dstPtr+= numTris*3; } else { @@ -836,8 +840,8 @@ void CMeshMultiLod::compileCoarseMeshes() } } } - dstPtr+= numTris*3; } + nlassert(totalTris == slotRef.CoarseNumTris); } } } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp index fbca1f037..46d88757b 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp @@ -142,7 +142,7 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time) { bool tempBRet = bRet; bRet = false; - // delete pShape; // FIXME: there is a delete bug with CMeshMultiLod exported from max!!! + delete pShape; bRet = tempBRet; } catch (...) From c9437f9bd5d495317340ee40ecaab4fd4997f175 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 22:21:30 +0100 Subject: [PATCH 032/138] Cleanup --- .../tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 4 ++-- .../plugin_max/nel_mesh_lib/export_collision.cpp | 2 +- .../3d/plugin_max/nel_mesh_lib/export_light.cpp | 2 +- .../nel_mesh_lib/export_lod_character.cpp | 2 +- .../3d/plugin_max/nel_mesh_lib/export_mesh.cpp | 15 ++++++--------- .../nel_mesh_lib/export_mesh_interface.cpp | 6 +++--- .../3d/plugin_max/nel_mesh_lib/export_misc.cpp | 2 +- .../plugin_max/nel_mesh_lib/export_skinning.cpp | 2 +- .../plugin_max/nel_mesh_lib/export_vegetable.cpp | 2 +- 9 files changed, 17 insertions(+), 20 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index 27ba7b796..155bbe5b5 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -99,7 +99,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime) return false; if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); return true; } @@ -305,7 +305,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime) this->rSoftShadowConeLength = (float)atof(sTmp.c_str()); if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } // *********************************************************************************************** diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp index ecc9e8127..0a01a9fb8 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp @@ -135,7 +135,7 @@ CCollisionMeshBuild* CExportNel::createCollisionMeshBuild(std::vector & // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp index f1cfaa85d..3a497419b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp @@ -238,7 +238,7 @@ void CExportNel::getLights (std::vector& vectLight, TimeValue time, INod // Delete the GenLight if we should... if (deleteIt) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp index 2d45e14ef..7feca2009 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp @@ -179,7 +179,7 @@ bool CExportNel::buildLodCharacter (NL3D::CLodCharacterShapeBuild& lodBuild, IN // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp index afde40770..bd48be1ea 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp @@ -110,7 +110,7 @@ CMesh::CMeshBuild* CExportNel::createMeshBuild(INode& node, TimeValue tvTime, CM // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -449,7 +449,7 @@ NL3D::IShape *CExportNel::buildShape (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -1406,7 +1406,7 @@ IMeshGeom *CExportNel::buildMeshGeom (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -2058,7 +2058,7 @@ NL3D::IShape *CExportNel::buildWaterShape(INode& node, TimeValue time) // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; nlinfo("WaterShape : build succesful"); return ws; @@ -2100,11 +2100,8 @@ bool CExportNel::buildMeshAABBox(INode &node, NLMISC::CAABBox &dest, TimeValue t dest.setMinMax(nelMin, nelMax); // if (deleteIt) - { -#ifdef NL_DONT_FIND_MAX_CRASH - tri->MaybeAutoDelete(); -#endif // NL_DEBUG - } + tri->DeleteThis(); + tri = NULL; return true; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp index fdcfea8da..899c28a28 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp @@ -180,7 +180,7 @@ bool CMeshInterface::buildFromMaxMesh(INode &node, TimeValue tvTime) } // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return true; } @@ -362,7 +362,7 @@ static void AddNodeToQuadGrid(const NLMISC::CAABBox &delimiter, TNodeFaceQG &des nldebug("%d faces where added", numFaceAdded); // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -495,7 +495,7 @@ static bool SelectVerticesInMeshFromInterfaces(const std::vector if (obj != tri) { // not a mesh object, so do nothing - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return false; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 39e13d868..d967380d0 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -1272,7 +1272,7 @@ void CExportNel::buildCamera(NL3D::CCameraInfo &cameraInfo, INode& node, TimeVal cameraInfo.Fov = genCamera->GetFOV(time); if (deleteIt) - genCamera->MaybeAutoDelete(); + genCamera->DeleteThis(); genCamera = NULL; } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index 41741f86d..f8dce3ac6 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -1446,7 +1446,7 @@ bool CExportNel::mirrorPhysiqueSelection(INode &node, TimeValue tvTime, const st // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; // ok! diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp index af6cbcdac..a39388786 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp @@ -154,7 +154,7 @@ bool CExportNel::buildVegetableShape (NL3D::CVegetableShape& skeletonShape, INo } if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } } From 0366f021ea2b815f65f12a94c11034aa1479a185 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 22:35:01 +0100 Subject: [PATCH 033/138] Cleanup --- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index d967380d0..738e6b724 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -448,7 +448,7 @@ bool CExportNel::getValueByNameUsingParamBlock2 (Animatable& node, const char* s } else { - nlwarning ("FAILED Can't find ParamBlock named '%s'", sName); + // nlwarning ("FAILED Can't find ParamBlock named '%s'", sName); return false; } } From 46bf57aaf7b5a9014153e53366d953a7933af694 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 10 Feb 2014 16:38:04 +0100 Subject: [PATCH 034/138] Fix make_merge_wk for uxt --- code/nel/tools/build_gamedata/translation/make_merge_wk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/translation/make_merge_wk.py b/code/nel/tools/build_gamedata/translation/make_merge_wk.py index 2352a8490..dee324f07 100644 --- a/code/nel/tools/build_gamedata/translation/make_merge_wk.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_wk.py @@ -72,7 +72,7 @@ except Exception, e: printLog(log, ">>> Mark diffs as translated <<<") diffFiles = os.listdir("diff") for diffFile in diffFiles: - if "_wk_diff_" in diffFile: + if "wk_diff_" in diffFile: printLog(log, "DIFF " + "diff/" + diffFile) subprocess.call([ TranslationTools, "crop_lines", "diff/" + diffFile, "3" ]) From 0b3186ac6ad76fca16b0518a864847b80fd99e92 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 12 Feb 2014 16:35:07 +0100 Subject: [PATCH 035/138] =?UTF-8?q?Clean=20translation=20diffs=20from=20OL?= =?UTF-8?q?DVALUE=20comments=20before=20merge,=20issue=20#116,=20patch=20p?= =?UTF-8?q?rovided=20by=20=C5=81ukasz=20K?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translation/e1_clean_string_diff.py | 54 +++++++++++++++++++ .../translation/e2_clean_words_diff.py | 54 +++++++++++++++++++ .../translation/e3_clean_clause_diff.py | 54 +++++++++++++++++++ .../translation/e4_clean_phrase_diff.py | 54 +++++++++++++++++++ .../translation/make_merge_all.py | 4 ++ .../translation/make_merge_wk.py | 11 +++- code/ryzom/tools/translation_tools/main.cpp | 4 +- 7 files changed, 232 insertions(+), 3 deletions(-) create mode 100644 code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py create mode 100644 code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py create mode 100644 code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py create mode 100644 code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py diff --git a/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py new file mode 100644 index 000000000..9eafba1a6 --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean string diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_string_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e1_clean_string_diff.log"): + os.remove("e1_clean_string_diff.log") +shutil.copy("log.log", "e1_clean_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e1_clean_string_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py new file mode 100644 index 000000000..a98c7b27c --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean words diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_words_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e2_clean_words_diff.log"): + os.remove("e2_clean_words_diff.log") +shutil.copy("log.log", "e2_clean_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e2_clean_words_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py new file mode 100644 index 000000000..337ac6e99 --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean clause diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_clause_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e3_clean_clause_diff.log"): + os.remove("e3_clean_clause_diff.log") +shutil.copy("log.log", "e3_clean_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e3_clean_clause_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py new file mode 100644 index 000000000..8f08d73ea --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean phrase diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e4_clean_phrase_diff.log"): + os.remove("e4_clean_phrase_diff.log") +shutil.copy("log.log", "e4_clean_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e4_clean_phrase_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/make_merge_all.py b/code/nel/tools/build_gamedata/translation/make_merge_all.py index f6ea582a3..f4dbd95fb 100644 --- a/code/nel/tools/build_gamedata/translation/make_merge_all.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_all.py @@ -47,6 +47,10 @@ try: subprocess.call([ TranslationTools, "merge_words_diff" ]) subprocess.call([ TranslationTools, "make_string_diff" ]) subprocess.call([ TranslationTools, "merge_string_diff" ]) + subprocess.call([ TranslationTools, "clean_string_diff" ]) + subprocess.call([ TranslationTools, "clean_words_diff" ]) + subprocess.call([ TranslationTools, "clean_clause_diff" ]) + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) except Exception, e: diff --git a/code/nel/tools/build_gamedata/translation/make_merge_wk.py b/code/nel/tools/build_gamedata/translation/make_merge_wk.py index dee324f07..4442232ab 100644 --- a/code/nel/tools/build_gamedata/translation/make_merge_wk.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_wk.py @@ -31,7 +31,7 @@ log = open("log.log", "w") printLog(log, "") printLog(log, "-------") -printLog(log, "--- Make and merge work") +printLog(log, "--- Make, merge and clean work") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") @@ -76,6 +76,15 @@ for diffFile in diffFiles: printLog(log, "DIFF " + "diff/" + diffFile) subprocess.call([ TranslationTools, "crop_lines", "diff/" + diffFile, "3" ]) +#printLog(log, ">>> Clean diff <<<") +#try: +# subprocess.call([ TranslationTools, "clean_string_diff" ]) +# subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +# subprocess.call([ TranslationTools, "clean_clause_diff" ]) +# subprocess.call([ TranslationTools, "clean_words_diff" ]) +#except Exception, e: +# printLog(log, "<" + processName + "> " + str(e)) +#printLog(log, "") printLog(log, ">>> Merge diff <<<") try: diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 253eee75d..9eba8c8da 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -1574,7 +1574,7 @@ int cleanWordsDiff(int argc, char *argv[]) { LOG("Cleaning words diffs\n"); -/* + uint i,l; for (l=0; l Date: Thu, 13 Feb 2014 12:12:28 -0800 Subject: [PATCH 036/138] Backed out merge changeset: b2d97621fa3b Backed out merge revision to its first parent (99840e8413f2) --- code/nel/src/misc/i18n.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index 8aaa8df6e..e53750af7 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -323,6 +323,23 @@ bool CI18N::parseLabel(ucstring::const_iterator &it, ucstring::const_iterator &l ucstring::const_iterator rewind = it; label.erase(); + // first char must be A-Za-z@_ + if (it != last && + ( + (*it >= '0' && *it <= '9') + || (*it >= 'A' && *it <= 'Z') + || (*it >= 'a' && *it <= 'z') + || (*it == '_') + || (*it == '@') + ) + ) + label.push_back(char(*it++)); + else + { + it = rewind; + return false; + } + // other char must be [0-9A-Za-z@_]* while (it != last && ( From 46ab8acea7b8b293a2d59e74903f07fd8f8844d8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 13 Feb 2014 22:02:25 +0100 Subject: [PATCH 037/138] Extend shard data script --- code/nel/tools/build_gamedata/8_shard_data.py | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/code/nel/tools/build_gamedata/8_shard_data.py b/code/nel/tools/build_gamedata/8_shard_data.py index 8ab628875..7fe65c6f3 100644 --- a/code/nel/tools/build_gamedata/8_shard_data.py +++ b/code/nel/tools/build_gamedata/8_shard_data.py @@ -47,14 +47,28 @@ printLog(log, "") for dir in InstallShardDataDirectories: printLog(log, "SHARD DIRECTORY " + dir) - mkPath(log, InstallDirectory + "/" + dir) mkPath(log, ShardInstallDirectory + "/" + dir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) -for dir in InstallShardDataCollisionsDirectories: - printLog(log, "SHARD COLLISIONS " + dir) + printLog(log, "FROM " + dir) mkPath(log, InstallDirectory + "/" + dir) - mkPath(log, ShardInstallDirectory + "/" + InstallShardDataCollisionsDirectory + "/" + dir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + InstallShardDataCollisionsDirectory + "/" + dir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD DIRECTORY " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM " + srcDir) + mkPath(log, InstallDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD DIRECTORY " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM PRIMITIVES " + srcDir) + mkPath(log, PrimitivesDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, PrimitivesDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) printLog(log, "") log.close() From 3860006530888033cd9bd21b1225c7e0598283ba Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 01:01:02 +0100 Subject: [PATCH 038/138] Add directories for patchman to gamedata setup --- code/nel/tools/build_gamedata/0_setup.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 63c9c4f6f..9c66d369c 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -159,6 +159,22 @@ if not args.noconf: WindowsExeDllCfgDirectories except NameError: WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/libraries/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ] + try: + LinuxServiceExecutableDirectory + except NameError: + LinuxServiceExecutableDirectory = "S:/devls_x64/bin" + try: + LinuxClientExecutableDirectory + except NameError: + LinuxClientExecutableDirectory = "S:/devl_x64/bin" + try: + PatchmanCfgAdminDirectory + except NameError: + PatchmanCfgAdminDirectory = "S:/notes/patchman_cfg/admin_install" + try: + PatchmanCfgDefaultDirectory + except NameError: + PatchmanCfgDefaultDirectory = "S:/notes/patchman_cfg/default" try: MaxAvailable except NameError: @@ -219,6 +235,10 @@ if not args.noconf: WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + LinuxServiceExecutableDirectory = askVar(log, "Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") + LinuxClientExecutableDirectory = askVar(log, "Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") + PatchmanCfgAdminDirectory = askVar(log, "Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") + PatchmanCfgDefaultDirectory = askVar(log, "Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) if MaxAvailable: MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") @@ -299,6 +319,10 @@ if not args.noconf: sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n") sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n") sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n") + sf.write("LinuxServiceExecutableDirectory = \"" + str(LinuxServiceExecutableDirectory) + "\"\n") + sf.write("LinuxClientExecutableDirectory = \"" + str(LinuxClientExecutableDirectory) + "\"\n") + sf.write("PatchmanCfgAdminDirectory = \"" + str(PatchmanCfgAdminDirectory) + "\"\n") + sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") sf.write("\n") sf.write("# 3dsMax directives\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") From 93a6e13d5e435c59ed6417d6ec79cd3fd9854ad4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 01:21:05 +0100 Subject: [PATCH 039/138] Extend shard data script to gather executables and configurations --- code/nel/tools/build_gamedata/8_shard_data.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/nel/tools/build_gamedata/8_shard_data.py b/code/nel/tools/build_gamedata/8_shard_data.py index 7fe65c6f3..f0f921cc7 100644 --- a/code/nel/tools/build_gamedata/8_shard_data.py +++ b/code/nel/tools/build_gamedata/8_shard_data.py @@ -69,6 +69,16 @@ for multiDir in InstallShardDataPrimitivesDirectories: mkPath(log, PrimitivesDirectory + "/" + srcDir) mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) copyFilesNoTreeIfNeeded(log, PrimitivesDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + mkPath(log, LinuxServiceExecutableDirectory) + mkPath(log, PatchmanCfgDefaultDirectory) + mkPath(log, InstallDirectory) + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD DIRECTORY " + dstDir) + copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) + copyFileListNoTree(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) + copyFileListNoTree(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) printLog(log, "") log.close() From 5a092039f180b9dd5549d4e101a54d8616fb4863 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 01:58:56 +0100 Subject: [PATCH 040/138] Move mirror sheets back in --- .../data_shard/mirror_sheets/fame.dataset | 741 ++++++++++++++++++ .../data_shard/mirror_sheets/fe_temp.dataset | 365 +++++++++ .../data_shard/mirror_sheets/pet.dataset | 47 ++ 3 files changed, 1153 insertions(+) create mode 100644 code/ryzom/server/data_shard/mirror_sheets/fame.dataset create mode 100644 code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset create mode 100644 code/ryzom/server/data_shard/mirror_sheets/pet.dataset diff --git a/code/ryzom/server/data_shard/mirror_sheets/fame.dataset b/code/ryzom/server/data_shard/mirror_sheets/fame.dataset new file mode 100644 index 000000000..d24691d63 --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/fame.dataset @@ -0,0 +1,741 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fri Dec 12 14:17:11 2003 (saffray) .entity types[1] = 13 +Fri Dec 12 14:17:11 2003 (saffray) .entity types[2] = 14 + diff --git a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset new file mode 100644 index 000000000..f88263c27 --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset @@ -0,0 +1,365 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/ryzom/server/data_shard/mirror_sheets/pet.dataset b/code/ryzom/server/data_shard/mirror_sheets/pet.dataset new file mode 100644 index 000000000..238a38dbd --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/pet.dataset @@ -0,0 +1,47 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
From f4a4a41fbff236250717c692cb0b1d8ac85d53b7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 02:03:22 +0100 Subject: [PATCH 041/138] Fix default directory --- code/nel/tools/build_gamedata/0_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 9c66d369c..85c070893 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -134,7 +134,7 @@ if not args.noconf: try: DataShardDirectory except NameError: - DataShardDirectory = "R:/code/ryzom/common/data_shard" + DataShardDirectory = "R:/code/ryzom/server/data_shard" try: DataCommonDirectory except NameError: From ca2d7941f85ef470dea2e86dfc50cd6c3e38f797 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 02:37:41 +0100 Subject: [PATCH 042/138] Get path for datasets from config like other services --- code/ryzom/server/src/tick_service/range_mirror_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp index 1d233c8e5..14a2e8e85 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp @@ -145,7 +145,7 @@ void CRangeMirrorManager::init() // Load datasets into temporary map to get the names TSDataSetSheets sDataSetSheets; - loadForm( "dataset", "data_shard/datasets.packed_sheets", sDataSetSheets ); + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets ); TSDataSetSheets::iterator ism; for ( ism=sDataSetSheets.begin(); ism!=sDataSetSheets.end(); ++ism ) { From c6e291c470805ea1f1814faa2ce3d5eee662a273 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 02:46:07 +0100 Subject: [PATCH 043/138] Only copy if needed --- code/nel/tools/build_gamedata/8_shard_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/build_gamedata/8_shard_data.py b/code/nel/tools/build_gamedata/8_shard_data.py index f0f921cc7..14042231c 100644 --- a/code/nel/tools/build_gamedata/8_shard_data.py +++ b/code/nel/tools/build_gamedata/8_shard_data.py @@ -77,8 +77,8 @@ for execDir in InstallShardDataExecutables: mkPath(log, ShardInstallDirectory + "/" + dstDir) printLog(log, "SHARD DIRECTORY " + dstDir) copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) - copyFileListNoTree(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) - copyFileListNoTree(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) + copyFileListNoTreeIfNeeded(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) printLog(log, "") log.close() From 5fb9ef867576bf04d53493ad98172c8c7f9c1de6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 03:30:15 +0100 Subject: [PATCH 044/138] Cleanup data_shard --- .../{ => egs}/client_commands_privileges.txt | 0 .../server/data_shard/egs/shop_category.cfg | 468 ++++++++++++++++++ .../server/data_shard/single.property_array | 196 -------- 3 files changed, 468 insertions(+), 196 deletions(-) rename code/ryzom/server/data_shard/{ => egs}/client_commands_privileges.txt (100%) create mode 100644 code/ryzom/server/data_shard/egs/shop_category.cfg delete mode 100644 code/ryzom/server/data_shard/single.property_array diff --git a/code/ryzom/server/data_shard/client_commands_privileges.txt b/code/ryzom/server/data_shard/egs/client_commands_privileges.txt similarity index 100% rename from code/ryzom/server/data_shard/client_commands_privileges.txt rename to code/ryzom/server/data_shard/egs/client_commands_privileges.txt diff --git a/code/ryzom/server/data_shard/egs/shop_category.cfg b/code/ryzom/server/data_shard/egs/shop_category.cfg new file mode 100644 index 000000000..0986b0687 --- /dev/null +++ b/code/ryzom/server/data_shard/egs/shop_category.cfg @@ -0,0 +1,468 @@ +// shop category +ShopCategory = { + "no_bot_chat", + + "missions", + "guild_creator", + "characteristics_seller", + + "harvest_action", + "craft_action", + "magic_action", + "fight_action", + + // Limited to 20 differents level + "LEVEL", + "L1", + "L10", + "L20", + "L50", + "L100", + "L150", + "L200", + "L250", + "L300", + "END_LEVEL", + + // Quality of item, 5 quality from 'A' to 'E' + "QUALITY", + "Q20", // energy de 0 à 20 + "Q35", // energy de 21 à 35 + "Q50", // energy de 36 à 50 + "Q65", // energy de 51 à 65 + "Q80", // energy de 66 à 80 (et plus) + "END_QUALITY", + + // LEVEL must be defined before items + "ITEM_CATEGORY", + "DAGGER", + "SWORD", + "MACE", + "AXE", + "SPEAR", + "STAFF", + "TWO_HAND_SWORD", + "TWO_HAND_AXE", + "PIKE", + "TWO_HAND_MACE", + "AUTOLAUCH", + "BOWRIFLE", + "LAUNCHER", + "PISTOL", + "BOWPISTOL", + "RIFLE", + "AUTOLAUNCH_AMMO", + "BOWRIFLE_AMMO", + "LAUNCHER_AMMO", + "PISTOL_AMMO", + "BOWPISTOL_AMMO", + "RIFLE_AMMO", + "SHIELD", + "BUCKLER", + "LIGHT_BOOTS", + "LIGHT_GLOVES", + "LIGHT_PANTS", + "LIGHT_SLEEVES", + "LIGHT_VEST", + "MEDIUM_BOOTS", + "MEDIUM_GLOVES", + "MEDIUM_PANTS", + "MEDIUM_SLEEVES", + "MEDIUM_VEST", + "HEAVY_BOOTS", + "HEAVY_GLOVES", + "HEAVY_PANTS", + "HEAVY_SLEEVES", + "HEAVY_VEST", + "HEAVY_HELMET", + "ANKLET", + "BRACELET", + "DIADEM", + "EARING", + "PENDANT", + "RING", + "SHEARS", + "ArmorTool", + "AmmoTool", + "MeleeWeaponTool", + "RangeWeaponTool", + "JewelryTool", + "ToolMaker", + "MEKTOUB_PACKER_TICKET", + "MEKTOUB_MOUNT_TICKET", + "MAGICIAN_STAFF", + "HAIR_MALE", + "HAIRCOLOR_MALE", + "TATOO_MALE", + "HAIR_FEMALE", + "HAIRCOLOR_FEMALE", + "TATOO_FEMALE", + "FOOD", + "SERVICE_STABLE", + "JOB_ELEMENT", + + + + "END_ITEM_CATEGORY", + + "RM_ITEM_PART", + "MPL", //A (Blade) + "MPH", //B MpH (Hammer) + "MPP", //C MpP (Point) + "MPM", //D MpM (Shaft) + "MPG", //E MpG (Grip) + "MPC", //F MpC (Counterweight) + "MPGA", //G MpGA (Trigger) + "MPPE", //H MpPE (Firing pin) + "MPCA", //I MpCA (Barrel) + "MPE", //J MpE (Explosive) + "MPEN", //K MpEN (Ammo jacket) + "MPPR", //L MpPR (Ammo bullet) + "MPCR", //M MpCR (Armor shell) + "MPRI", //N MpRI (Armor interior coating) + "MPRE", //O MpRE (Armor interieur stuffing) + "MPAT", //P MpAT (Armor clip) + "MPSU", //Q MpSU (Jewel stone support) + "MPED", //R MpED (Jewel stone) + "MPBT", //S MpBT (Blacksmith tool) + "MPPES", //T MpPES (Pestle tool) + "MPSH", //U MpSH (Sharpener tool) + "MPTK", //V MpTK (Tunneling Knife) + "MPJH", //W MpJH (Jewelry hammer) + "MPCF", //X MpCF (Campfire) + "MPVE", //Y MpVE (Clothes) + "MPMF", //Z MpMF (Magic Focus) + "END_RM_ITEM_PART", + + "TELEPORT", + "KAMI_TP", + "KARAVAN_TP", + "END_TELEPORT", + + "ECOSYSTEM", + "CommonEcosystem", + "Desert", + "Forest", + "Lacustre", + "Jungle", + "Goo", + "PrimaryRoot", + "END_ECOSYSTEM", + + "ORIGIN", + "Common", + "Fyros", + "Matis", + "Tryker", + "Zorai", + "Karavan", + "Tribe", + "Refugee", + "END_ORIGIN", + + "TOOLS_TYPE", + "CRAFTING_TOOL", + "HARVEST_TOOL", + "TAMING_TOOL", + "TRAINING_TOOL", + "END_TOOLS_TYPE", + + "SHOP_TYPE", + "STATIC_SHOP", // Sell NPC Items + "DYNAMIC_SHOP", // Sell Player character Items + "STATIC_DYNAMIC_SHOP", // Sell NPC & Player character Items + "END_SHOP_TYPE", +}; + +// friendly versions of shop names +ShopNameAliases= +{ + "MOUNT: unknown for this time", + + //definition of item group aliases + //armor groups + "LARMOR: LIGHT_BOOTS: LIGHT_GLOVES: LIGHT_PANTS: LIGHT_SLEEVES: LIGHT_VEST", + "MARMOR: MEDIUM_BOOTS: MEDIUM_GLOVES: MEDIUM_PANTS: MEDIUM_SLEEVES: MEDIUM_VEST", + "HARMOR: HEAVY_BOOTS: HEAVY_GLOVES: HEAVY_PANTS: HEAVY_SLEEVES: HEAVY_VEST: HEAVY_HELMET", + "LARMORSHIELD: LIGHT_BOOTS: LIGHT_GLOVES: LIGHT_PANTS: LIGHT_SLEEVES: LIGHT_VEST: BUCKLER", + "MARMORSHIELD: MEDIUM_BOOTS: MEDIUM_GLOVES: MEDIUM_PANTS: MEDIUM_SLEEVES: MEDIUM_VEST: BUCKLER: SHIELD", + "HARMORSHIELD: HEAVY_BOOTS: HEAVY_GLOVES: HEAVY_PANTS: HEAVY_SLEEVES: HEAVY_VEST: HEAVY_HELMET: BUCKLER: SHIELD", + + //weapon groups + "SHIELDS: SHIELD: BUCKLER", + "MELEE_WEAPON: DAGGER: SWORD: MACE: AXE: SPEAR: STAFF: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF:", + "MELEE: SHIELDS: MELEE_WEAPON", + "MELEE_WEAPON_1H: DAGGER: SWORD: MACE: AXE: SPEAR: STAFF", + "MELEE_WEAPON_2H: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_MATIS: DAGGER: SWORD: SPEAR : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_ZORAI: DAGGER: STAFF: MACE : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_FYROS: DAGGER: AXE: MACE : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_TRYKER: DAGGER: STAFF: SWORD : MAGICIAN_STAFF", + "MELEE_WEAPON_NEWBIELAND_ALL: DAGGER: SWORD: MACE: AXE", //NEW newbieland + "MELEE_WEAPON_2H_NEWBIELAND_ALL: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF", //NEW Newbieland + "AMMO: BOWRIFLE_AMMO: PISTOL_AMMO: BOWPISTOL_AMMO: RIFLE_AMMO: AUTOLAUNCH_AMMO: LAUNCHER_AMMO", + "RANGE_WEAPON: BOWRIFLE: PISTOL: BOWPISTOL: RIFLE: AUTOLAUCH: LAUNCHER", + "RANGE: RANGE_WEAPON: AMMO", + "RANGE_BOW: RANGE_WEAPON: AMMO", + "RANGE_PISTOLRIFLE: RANGE_WEAPON: AMMO", + + //tool groups + "CRAFTING_TOOL: ArmorTool: AmmoTool: MeleeWeaponTool: RangeWeaponTool: JewelryTool: ToolMaker", + "HARVEST_TOOL: SHEARS", + "TOOL: CRAFTING_TOOL: HARVEST_TOOL", + "TOOLS_NOOB : ArmorTool: AmmoTool: MeleeWeaponTool: RangeWeaponTool: JewelryTool : HARVEST_TOOL", //NEW Newbieland + + //cosmetic groups + "HAIRDRESSING_MALE: HAIR_MALE: HAIRCOLOR_MALE", + "HAIRDRESSING_FEMALE: HAIR_FEMALE: HAIRCOLOR_FEMALE", + + + //jewel group + "JEWEL: ANKLET: BRACELET: DIADEM: EARING: PENDANT: RING", + //end of definition of item group aliases + + //definition of quality alias + "QUALITY_A: Q20", + "QUALITY_B: Q35", + "QUALITY_C: Q50", + "QUALITY_D: Q65", + "QUALITY_E: Q80", + + //definition of level level aliases + //newbieland + "REFUGEE_LEVEL: L1: QUALITY_A", + "NEWBIELAND_LEVEL: L10: L20: L50: QUALITY_A", + "RM_NEWBIELAND_LEVEL: L10: L20: L50: QUALITY_A", //only for raw material + + + //villages + "VILLAGE_LOW_LEVEL: L10: L20: L50: L100: L150: QUALITY_A", + "VILLAGE_MED_LEVEL: L10: L20: L50: L100: L150: L200: QUALITY_A", + "VILLAGE_HIGH_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", + "VILLAGE_LEVEL: L10: L20: L50: QUALITY_A", + "RM_VILLAGE_LEVEL: L10: L20: L50: QUALITY_A", //only for raw material + "RM_VILLAGE_HIGH_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", //only for raw material + + //town + "TOWN_LOW_LEVEL: L10: L20: L50: QUALITY_A", + "TOWN_HIGH_LEVEL: L10: L20: L50: L100: QUALITY_A", + "RM_TOWN_LEVEL: L10: L20: L50: L100: L150: QUALITY_A", //only for raw material + + //tribe + "TRIBE_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", + + //end of definition of level aliases + + //definition of regional aliases + //armor + "MATIS_LARMOR: Matis: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "MATIS_MARMOR: Matis: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "MATIS_HARMOR: Matis: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "TRYKER_LARMOR: Tryker: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "TRYKER_MARMOR: Tryker: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "TRYKER_HARMOR: Tryker: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "ZORAI_LARMOR: Zorai: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "ZORAI_MARMOR: Zorai: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "ZORAI_HARMOR: Zorai: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_LARMOR: Fyros: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_MARMOR: Fyros: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_HARMOR: Fyros: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "NEWBIELAND_LARMOR_MATIS: NEWBIELAND_LEVEL: Matis: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_ZORAI: NEWBIELAND_LEVEL: Zorai: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_FYROS: NEWBIELAND_LEVEL: Fyros: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_TRYKER: NEWBIELAND_LEVEL: Tryker: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_MARMOR: NEWBIELAND_LEVEL: MARMORSHIELD: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_HARMOR: NEWBIELAND_LEVEL: HARMORSHIELD: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_ALL : NEWBIELAND_LEVEL: LARMOR: DYNAMIC_SHOP", //NEW newbieland + "NEWBIELAND_MARMOR_ALL : NEWBIELAND_LEVEL: MARMOR: DYNAMIC_SHOP", //NEW newbieland + + //weapon + "MATIS_MELEE: Common : Matis: MELEE: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE: Common : Fyros: MELEE: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE: Common : Zorai: MELEE: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE: Common : Tryker: MELEE: STATIC_DYNAMIC_SHOP", + "MATIS_MELEE_WEAPON_1H: Common : Matis : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE_WEAPON_1H: Common : Fyros : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE_WEAPON_1H: Common : Zorai : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE_WEAPON_1H: Common : Tryker : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "MATIS_MELEE_WEAPON_2H: Common : Matis : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE_WEAPON_2H: Common : Fyros : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE_WEAPON_2H: Common : Zorai : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE_WEAPON_2H: Common : Tryker : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "MATIS_NEWBIELAND_WEAPON_MATIS: NEWBIELAND_LEVEL: Common : Matis : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "FYROS_NEWBIELAND_WEAPON_FYROS: NEWBIELAND_LEVEL: Common : Fyros : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "ZORAI_NEWBIELAND_WEAPON_ZORAI: NEWBIELAND_LEVEL: Common : Zorai : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "TRYKER_NEWBIELAND_WEAPON_TRYKER: NEWBIELAND_LEVEL: Common : Tryker : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_MELEE_WEAPON_2H: NEWBIELAND_LEVEL: MELEE_WEAPON_2H: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_RANGE_WEAPON: NEWBIELAND_LEVEL: RANGE: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_WEAPON_ALL: NEWBIELAND_LEVEL: MELEE_WEAPON_NEWBIELAND_ALL: STATIC_DYNAMIC_SHOP", //NEW newbieland + "MELEE_WEAPON_2H_NEWBIELAND: NEWBIELAND_LEVEL: MELEE_WEAPON_2H_NEWBIELAND_ALL: DYNAMIC_SHOP", //NEW newbieland + + + "MATIS_RANGE: Common : Matis : RANGE: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE: Common : Fyros : RANGE: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE: Common : Zorai : RANGE: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE: Common : Tryker : RANGE: STATIC_DYNAMIC_SHOP", + "MATIS_RANGE_BOW: Common : Matis : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE_BOW: Common : Fyros : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE_BOW: Common : Zorai : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE_BOW: Common : Tryker : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "MATIS_RANGE_PISTOLRIFLE: Common : Matis : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE_PISTOLRIFLE: Common : Fyros : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE_PISTOLRIFLE: Common : Zorai : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE_PISTOLRIFLE: Common : Tryker : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + + //tool + "COMMON_TOOL: Common : TOOL: STATIC_DYNAMIC_SHOP", + "NEWBIELAND_TOOL : Common : TOOLS_NOOB: STATIC_DYNAMIC_SHOP", // NEW Newbieland + + //job elements + "COMMON_JOB: Common : JOB_ELEMENT: STATIC_DYNAMIC_SHOP", + + //jewel + "MATIS_JEWEL: Matis: JEWEL: DYNAMIC_SHOP", + "TRYKER_JEWEL: Tryker: JEWEL: DYNAMIC_SHOP", + "ZORAI_JEWEL: Zorai: JEWEL: DYNAMIC_SHOP", + "FYROS_JEWEL: Fyros: JEWEL: DYNAMIC_SHOP", + "MATIS_NEWBIELAND_JEWEL:MATIS_JEWEL:NEWBIELAND_LEVEL", + "TRYKER_NEWBIELAND_JEWEL:TRYKER_JEWEL:NEWBIELAND_LEVEL", + "ZORAI_NEWBIELAND_JEWEL:ZORAI_JEWEL:NEWBIELAND_LEVEL", + "FYROS_NEWBIELAND_JEWEL:FYROS_JEWEL:NEWBIELAND_LEVEL", + "NEWBIELAND_JEWEL_ALL: NEWBIELAND_LEVEL: JEWEL: DYNAMIC_SHOP", //NEW Newbieland + + //cosmetic + "MATIS_HAIRDRESSING_MALE: Matis: HAIRDRESSING_MALE: STATIC_SHOP", + "MATIS_HAIRDRESSING_FEMALE: Matis: HAIRDRESSING_FEMALE: STATIC_SHOP", + "MATIS_TATOO_MALE: Matis: TATOO_MALE: STATIC_SHOP", + "MATIS_TATOO_FEMALE: Matis: TATOO_FEMALE: STATIC_SHOP", + "TRYKER_HAIRDRESSING_MALE: Tryker: HAIRDRESSING_MALE: STATIC_SHOP", + "TRYKER_HAIRDRESSING_FEMALE: Tryker: HAIRDRESSING_FEMALE: STATIC_SHOP", + "TRYKER_TATOO_MALE: Tryker: TATOO_MALE: STATIC_SHOP", + "TRYKER_TATOO_FEMALE: Tryker: TATOO_FEMALE: STATIC_SHOP", + "ZORAI_HAIRDRESSING_MALE: Zorai: HAIRDRESSING_MALE: STATIC_SHOP", + "ZORAI_HAIRDRESSING_FEMALE: Zorai: HAIRDRESSING_FEMALE: STATIC_SHOP", + "ZORAI_TATOO_MALE: Zorai: TATOO_MALE: STATIC_SHOP", + "ZORAI_TATOO_FEMALE: Zorai: TATOO_FEMALE: STATIC_SHOP", + "FYROS_HAIRDRESSING_MALE: Fyros: HAIRDRESSING_MALE: STATIC_SHOP", + "FYROS_HAIRDRESSING_FEMALE: Fyros: HAIRDRESSING_FEMALE: STATIC_SHOP", + "FYROS_TATOO_MALE: Fyros: TATOO_MALE: STATIC_SHOP", + "FYROS_TATOO_FEMALE: Fyros: TATOO_FEMALE: STATIC_SHOP", + + + + // Item part per item family + "RM_ITEM_PART_MELEE: MPL: MPH: MPP: MPM: MPG: MPC: MPMF: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_RANGE: MPGA: MPPE: MPCA: MPM: MPE: MPEN: MPPR: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_ARMOR: MPCR: MPRI: MPRE: MPAT: MPVE: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_JEWEL: MPSU: MPED: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_MAGIC_FOCUS: MPMF: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_CLOTH: MPVE: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_TOOLS: MPBT: MPPES: MPSH: MPTK: MPJH: MPCF: STATIC_DYNAMIC_SHOP", + + // Item part per craftgroup + "RM_CRAFTGROUP_AC: MPL: MPP", + "RM_CRAFTGROUP_BF: MPH: MPC", + "RM_CRAFTGROUP_RZ: MPED: MPMF", + "RM_CRAFTGROUP_IM: MPCA: MPCR", + "RM_CRAFTGROUP_HP: MPPE: MPAT", + "RM_CRAFTGROUP_DL: MPM: MPPR", + "RM_CRAFTGROUP_GQ: MPGA: MPSU", + "RM_CRAFTGROUP_EY: MPG: MPVE", + "RM_CRAFTGROUP_KN: MPEN: MPRI", + "RM_CRAFTGROUP_JO: MPE: MPRE", + + // All Item parts sold by merchants + "RM_ITEM_PART_SOLD: MPL: MPP: MPH: MPC: MPED: MPMF: MPCA: MPCR: MPPE: MPAT: MPM: MPPR: MPGA: MPSU: MPG: MPVE: MPEN: MPRI: MPE: MPRE: STATIC_DYNAMIC_SHOP", + + + //forest ecosystem + "RM_FOREST_0: Forest: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_FOREST_1: Forest: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_FOREST_2: Forest: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_FOREST_3: Forest: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_FOREST_4: Forest: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_FOREST_5: Forest: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_FOREST_6: Forest: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //jungle ecosystem + "RM_JUNGLE_0: Jungle: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_1: Jungle: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_2: Jungle: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_3: Jungle: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_4: Jungle: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_5: Jungle: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_6: Jungle: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //desert ecosystem + "RM_DESERT_0: Desert: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_DESERT_1: Desert: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_DESERT_2: Desert: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_DESERT_3: Desert: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_DESERT_4: Desert: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_DESERT_5: Desert: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_DESERT_6: Desert: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //lake ecosystem + "RM_LAKE_0: Lacustre: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_LAKE_1: Lacustre: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_LAKE_2: Lacustre: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_LAKE_3: Lacustre: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_LAKE_4: Lacustre: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_LAKE_5: Lacustre: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_LAKE_6: Lacustre: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //goo ecosystem + "RM_GOO_0: Goo: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_GOO_1: Goo: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_GOO_2: Goo: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_GOO_3: Goo: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_GOO_4: Goo: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_GOO_5: Goo: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_GOO_6: Goo: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //primary root ecosystem + "RM_PRIMROOT_0: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_1: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_2: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_3: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_4: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_5: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_6: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //Stable boys items: + "STABLE_BOY_MATIS: Common: Matis: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_ZORAI: Common: Zorai: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_FYROS: Common: Fyros: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_TRYKER: Common: Tryker: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + + //end of definition of regional aliases + + + "KAMI_TP_FOREST: KAMI_TP: Forest", + "KAMI_TP_JUNGLE: KAMI_TP: Jungle", + "KARAVAN_TP_FOREST: KARAVAN_TP: Forest", + "KARAVAN_TP_JUNGLE: KARAVAN_TP: Jungle", + + "FYROS_HARVEST_ACTION: Common : Fyros: harvest_action", + "FYROS_CRAFT_ACTION: Common : Fyros: craft_action", + "FYROS_MAGIC_ACTION: Common : Fyros: magic_action", + "FYROS_FIGHT_ACTION: Common : Fyros: fight_action", + + "MATIS_HARVEST_ACTION: Common : Matis: harvest_action", + "MATIS_CRAFT_ACTION: Common : Matis: craft_action", + "MATIS_MAGIC_ACTION: Common : Matis: magic_action", + "MATIS_FIGHT_ACTION: Common : Matis: fight_action", + + "TRYKER_HARVEST_ACTION: Common: Tryker: harvest_action", + "TRYKER_CRAFT_ACTION: Common :Tryker: craft_action", + "TRYKER_MAGIC_ACTION: Common :Tryker: magic_action", + "TRYKER_FIGHT_ACTION: Common :Tryker: fight_action", + + "ZORAI_HARVEST_ACTION: Common : Zorai: harvest_action", + "ZORAI_CRAFT_ACTION: Common :Zorai: craft_action", + "ZORAI_MAGIC_ACTION: Common :Zorai: magic_action", + "ZORAI_FIGHT_ACTION: Common :Zorai: fight_action", +}; diff --git a/code/ryzom/server/data_shard/single.property_array b/code/ryzom/server/data_shard/single.property_array deleted file mode 100644 index 194f6eecb..000000000 --- a/code/ryzom/server/data_shard/single.property_array +++ /dev/null @@ -1,196 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fri Jan 24 14:13:14 2003 (saffray) formName Resized = 19 -Fri Jan 24 14:17:14 2003 (saffray) formName Deleted = - From ada90101f21b976ce28580418c321250713404a2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 04:52:11 +0100 Subject: [PATCH 045/138] Fixup paths (could we use the search paths for this?) --- .../world_editor_classes.xml | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index e9697b421..de424f76f 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -98,7 +98,7 @@ - + @@ -128,7 +128,7 @@ @@ -147,7 +147,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -175,7 +175,7 @@ - + @@ -2513,10 +2513,10 @@ --> - + - + @@ -2720,10 +2720,10 @@ --> - + - + @@ -2761,10 +2761,10 @@ --> - + - + @@ -2802,10 +2802,10 @@ --> - + - + @@ -2828,10 +2828,10 @@ - + - + @@ -2869,7 +2869,7 @@ - + @@ -2888,7 +2888,7 @@ - + @@ -2907,7 +2907,7 @@ - + @@ -2924,7 +2924,7 @@ - + @@ -3662,7 +3662,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -3765,7 +3765,7 @@ - + @@ -3866,7 +3866,7 @@ --> - + @@ -3991,7 +3991,7 @@ --> - + - + - + @@ -4052,7 +4052,7 @@ --> - + @@ -4098,7 +4098,7 @@ - + @@ -4493,7 +4493,7 @@ --> - + @@ -4635,7 +4635,7 @@ - + @@ -4670,7 +4670,7 @@ - + @@ -4704,7 +4704,7 @@ --> - + @@ -4738,7 +4738,7 @@ --> - + From 57e6b3bdbd3ae41475e4b3e65166674730d91fb9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 18:36:15 +0100 Subject: [PATCH 046/138] Fix for excessive inlining of npc chat serialization, issue #97 --- .../ryzom/common/src/game_share/send_chat.cpp | 186 ++++++++++++++++++ code/ryzom/common/src/game_share/send_chat.h | 117 +---------- 2 files changed, 196 insertions(+), 107 deletions(-) create mode 100644 code/ryzom/common/src/game_share/send_chat.cpp diff --git a/code/ryzom/common/src/game_share/send_chat.cpp b/code/ryzom/common/src/game_share/send_chat.cpp new file mode 100644 index 000000000..064e223fe --- /dev/null +++ b/code/ryzom/common/src/game_share/send_chat.cpp @@ -0,0 +1,186 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "nel/misc/types_nl.h" +#include "send_chat.h" + +/** + * Send a chat line from system to a player that will be displayed as a normal chat sentence + * Sentence will be formated using "" as prefix of chat string + */ +void chatToPlayer(const NLMISC::CEntityId &id, const std::string &chatString) +{ + NLNET::CMessage msgout("CHAT"); + bool talkToPlayer = true; + msgout.serial(talkToPlayer, const_cast(id), const_cast(chatString)); + sendMessageViaMirror("IOS", msgout); +} + +/** + * Send a chat line from system to a group of player that will be displayed as a normal chat sentence + * Sentence will be formated using "" as prefix of chat string + */ +void chatToGroup(const NLMISC::CEntityId &id, const std::string &chatString) +{ + NLNET::CMessage msgout("CHAT"); + bool talkToPlayer = false; + msgout.serial(talkToPlayer, const_cast(id), const_cast(chatString)); + sendMessageViaMirror("IOS", msgout); +} + +/** + * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). + * Chat group can be constructed from CChatGroup class. + * phraseId is a phrase identifier in the phrase translation file. + * param are the parameter of the phrase + */ +void npcChatParamToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId, const std::vector ¶ms) +{ + NLNET::CMessage msgout("NPC_CHAT_PARAM"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(const_cast(phraseId)); + + uint32 size = (uint32)params.size(); + msgout.serial(size); +// params.resize(size); + for ( uint i = 0; i < size; i++ ) + { + uint8 type8 = params[i].Type; + msgout.serial( type8 ); + const_cast(params[i]).serialParam( false, msgout, (STRING_MANAGER::TParamType) type8 ); + } + + sendMessageViaMirror("IOS", msgout); +} + +/** + * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). + * Chat group can be constructed from CChatGroup class. + * phraseId is a phrase identifier in the phrase translation file. + */ +void npcChatToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId) +{ + NLNET::CMessage msgout("NPC_CHAT"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(const_cast(phraseId)); + sendMessageViaMirror("IOS", msgout); +} + + +/** + * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). + * Chat group can be constructed from CChatGroup class. + * phraseId is a phrase identifier in the phrase translation file. + */ +void npcChatToChannelEx(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, uint32 phraseId) +{ + NLNET::CMessage msgout("NPC_CHAT_EX"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(phraseId); + sendMessageViaMirror("IOS", msgout); +} + +/** + * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). + * Chat group can be constructed from CChatGroup class. + * sentence is the sentence to be sent. + */ +void npcChatToChannelSentence(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, ucstring& sentence) +{ + NLNET::CMessage msgout("NPC_CHAT_SENTENCE"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(sentence); + sendMessageViaMirror("IOS", msgout); +} + +/** + * Request to the DSS to send a chat line from a bot in a chat channel + * Chat group can be constructed from CChatGroup class. + * sentenceId is the id of the sentence that must be sent by the DSS + */ +void forwardToDss(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId) +{ + nlinfo( ("forwarding to DSS : id: "+sentenceId).c_str()); + NLNET::CMessage msgout("translateAndForward"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(sentenceId); + msgout.serial(scenarioId); + NLNET::CUnifiedNetwork::getInstance()->send("DSS",msgout); +} + +/** + * Request to the DSS to send a chat line from a bot in a chat channel + * Chat group can be constructed from CChatGroup class. + * sentenceId is the id of the sentence that must be sent by the DSS + */ +void forwardToDssArg(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId,std::vector& argValues) +{ + nlinfo( ("forwarding to DSS : id: "+sentenceId).c_str()); + NLNET::CMessage msgout("translateAndForwardArg"); + msgout.serial(const_cast(senderId)); + msgout.serialEnum(groupType); + msgout.serial(sentenceId); + msgout.serial(scenarioId); + uint32 size=(uint32)argValues.size(),i=0; + msgout.serial(size); + for(;isend("DSS",msgout); +} + +/** + * Send a tell line from a bot (mainly NPC) to a player + * phraseId is a phrase identifier in the phrase translation file. + */ +void npcTellToPlayer(const TDataSetRow &senderId, const TDataSetRow &receiverId, const std::string &phraseId, bool needSenderNpc) +{ + NLNET::CMessage msgout; + if ( needSenderNpc ) + { + msgout.setType("NPC_TELL"); + msgout.serial(const_cast(senderId)); + } + else + { + msgout.setType("GHOST_TELL"); + } + msgout.serial(const_cast(receiverId)); + msgout.serial(const_cast(phraseId)); + sendMessageViaMirror("IOS", msgout); +} + + +/** + * Send a tell line from a bot (mainly NPC) to a player. Accept parametered strings + * phraseId is a phrase id obtained through the string manager + */ +void npcTellToPlayerEx(const TDataSetRow &senderId, const TDataSetRow &receiverId, uint32 phraseId) +{ + NLNET::CMessage msgout("NPC_TELL_EX"); + msgout.serial(const_cast(senderId)); + msgout.serial(const_cast(receiverId)); + msgout.serial(phraseId); + sendMessageViaMirror("IOS", msgout); +} + +/* End of send_chat.cpp */ diff --git a/code/ryzom/common/src/game_share/send_chat.h b/code/ryzom/common/src/game_share/send_chat.h index a6b8bd364..1acc9799e 100644 --- a/code/ryzom/common/src/game_share/send_chat.h +++ b/code/ryzom/common/src/game_share/send_chat.h @@ -35,25 +35,13 @@ * Send a chat line from system to a player that will be displayed as a normal chat sentence * Sentence will be formated using "" as prefix of chat string */ -inline void chatToPlayer(const NLMISC::CEntityId &id, const std::string &chatString) -{ - NLNET::CMessage msgout("CHAT"); - bool talkToPlayer = true; - msgout.serial(talkToPlayer, const_cast(id), const_cast(chatString)); - sendMessageViaMirror("IOS", msgout); -} +void chatToPlayer(const NLMISC::CEntityId &id, const std::string &chatString); /** * Send a chat line from system to a group of player that will be displayed as a normal chat sentence * Sentence will be formated using "" as prefix of chat string */ -inline void chatToGroup(const NLMISC::CEntityId &id, const std::string &chatString) -{ - NLNET::CMessage msgout("CHAT"); - bool talkToPlayer = false; - msgout.serial(talkToPlayer, const_cast(id), const_cast(chatString)); - sendMessageViaMirror("IOS", msgout); -} +void chatToGroup(const NLMISC::CEntityId &id, const std::string &chatString); /** * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). @@ -61,39 +49,14 @@ inline void chatToGroup(const NLMISC::CEntityId &id, const std::string &chatStri * phraseId is a phrase identifier in the phrase translation file. * param are the parameter of the phrase */ -inline void npcChatParamToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId, const std::vector ¶ms) -{ - NLNET::CMessage msgout("NPC_CHAT_PARAM"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(const_cast(phraseId)); - - uint32 size = (uint32)params.size(); - msgout.serial(size); -// params.resize(size); - for ( uint i = 0; i < size; i++ ) - { - uint8 type8 = params[i].Type; - msgout.serial( type8 ); - const_cast(params[i]).serialParam( false, msgout, (STRING_MANAGER::TParamType) type8 ); - } - - sendMessageViaMirror("IOS", msgout); -} +void npcChatParamToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId, const std::vector ¶ms); /** * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). * Chat group can be constructed from CChatGroup class. * phraseId is a phrase identifier in the phrase translation file. */ -inline void npcChatToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId) -{ - NLNET::CMessage msgout("NPC_CHAT"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(const_cast(phraseId)); - sendMessageViaMirror("IOS", msgout); -} +void npcChatToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, const std::string &phraseId); /** @@ -101,101 +64,41 @@ inline void npcChatToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType * Chat group can be constructed from CChatGroup class. * phraseId is a phrase identifier in the phrase translation file. */ -inline void npcChatToChannelEx(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, uint32 phraseId) -{ - NLNET::CMessage msgout("NPC_CHAT_EX"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(phraseId); - sendMessageViaMirror("IOS", msgout); -} +void npcChatToChannelEx(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, uint32 phraseId); /** * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). * Chat group can be constructed from CChatGroup class. * sentence is the sentence to be sent. */ -inline void npcChatToChannelSentence(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, ucstring& sentence) -{ - NLNET::CMessage msgout("NPC_CHAT_SENTENCE"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(sentence); - sendMessageViaMirror("IOS", msgout); -} +void npcChatToChannelSentence(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, ucstring& sentence); /** * Request to the DSS to send a chat line from a bot in a chat channel * Chat group can be constructed from CChatGroup class. * sentenceId is the id of the sentence that must be sent by the DSS */ -inline void forwardToDss(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId) -{ - nlinfo( ("forwarding to DSS : id: "+sentenceId).c_str()); - NLNET::CMessage msgout("translateAndForward"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(sentenceId); - msgout.serial(scenarioId); - NLNET::CUnifiedNetwork::getInstance()->send("DSS",msgout); -} +void forwardToDss(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId); /** * Request to the DSS to send a chat line from a bot in a chat channel * Chat group can be constructed from CChatGroup class. * sentenceId is the id of the sentence that must be sent by the DSS */ -inline void forwardToDssArg(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId,std::vector& argValues) -{ - nlinfo( ("forwarding to DSS : id: "+sentenceId).c_str()); - NLNET::CMessage msgout("translateAndForwardArg"); - msgout.serial(const_cast(senderId)); - msgout.serialEnum(groupType); - msgout.serial(sentenceId); - msgout.serial(scenarioId); - uint32 size=(uint32)argValues.size(),i=0; - msgout.serial(size); - for(;isend("DSS",msgout); -} +void forwardToDssArg(const TDataSetRow &senderId, CChatGroup::TGroupType groupType, std::string& sentenceId,uint32 scenarioId,std::vector& argValues); /** * Send a tell line from a bot (mainly NPC) to a player * phraseId is a phrase identifier in the phrase translation file. */ -inline void npcTellToPlayer(const TDataSetRow &senderId, const TDataSetRow &receiverId, const std::string &phraseId, bool needSenderNpc=true) -{ - NLNET::CMessage msgout; - if ( needSenderNpc ) - { - msgout.setType("NPC_TELL"); - msgout.serial(const_cast(senderId)); - } - else - { - msgout.setType("GHOST_TELL"); - } - msgout.serial(const_cast(receiverId)); - msgout.serial(const_cast(phraseId)); - sendMessageViaMirror("IOS", msgout); -} +void npcTellToPlayer(const TDataSetRow &senderId, const TDataSetRow &receiverId, const std::string &phraseId, bool needSenderNpc=true); /** * Send a tell line from a bot (mainly NPC) to a player. Accept parametered strings * phraseId is a phrase id obtained through the string manager */ -inline void npcTellToPlayerEx(const TDataSetRow &senderId, const TDataSetRow &receiverId, uint32 phraseId) -{ - NLNET::CMessage msgout("NPC_TELL_EX"); - msgout.serial(const_cast(senderId)); - msgout.serial(const_cast(receiverId)); - msgout.serial(phraseId); - sendMessageViaMirror("IOS", msgout); -} +void npcTellToPlayerEx(const TDataSetRow &senderId, const TDataSetRow &receiverId, uint32 phraseId); #endif // SEND_CHAT_H From 8860790b9145538155576f1fceb2cfcef9c53412 Mon Sep 17 00:00:00 2001 From: botanic Date: Sat, 15 Feb 2014 19:52:08 -0800 Subject: [PATCH 047/138] force deleting of file so it works even after server crash --- code/ryzom/tools/scripts/linux/service_launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/scripts/linux/service_launcher.sh b/code/ryzom/tools/scripts/linux/service_launcher.sh index 587f3875a..3be4af012 100755 --- a/code/ryzom/tools/scripts/linux/service_launcher.sh +++ b/code/ryzom/tools/scripts/linux/service_launcher.sh @@ -78,7 +78,7 @@ do printf STOPPED > $STATE_FILE # consume (remove) the control file to allow start once - rm $CTRL_FILE + rm -f $CTRL_FILE echo Press ENTER to relaunch fi From 3da6355d73c00224dd5018370da187d70607e735 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Sun, 16 Feb 2014 19:43:44 +0100 Subject: [PATCH 049/138] CMAKE TARGET : SHARED and MODULE About Shared Library (shared) and Module Library (module) type of cmake target INSTALL command has different behaviour for ARCHIVE LIBRARY RUNTIME depending on the platform --- .../src/plugins/core/CMakeLists.txt | 8 ++++---- .../src/plugins/disp_sheet_id/CMakeLists.txt | 16 +++++++++++++++- .../src/plugins/example/CMakeLists.txt | 15 ++++++++++++++- .../src/plugins/georges_editor/CMakeLists.txt | 19 +++++++++++++++++-- .../src/plugins/gui_editor/CMakeLists.txt | 16 +++++++++++++++- .../plugins/landscape_editor/CMakeLists.txt | 19 +++++++++++++++++-- .../src/plugins/log/CMakeLists.txt | 16 +++++++++++++++- .../plugins/mission_compiler/CMakeLists.txt | 17 ++++++++++++++++- .../src/plugins/object_viewer/CMakeLists.txt | 17 ++++++++++++++++- .../plugins/ovqt_sheet_builder/CMakeLists.txt | 16 +++++++++++++++- .../translation_manager/CMakeLists.txt | 15 ++++++++++++++- .../src/plugins/world_editor/CMakeLists.txt | 15 ++++++++++++++- .../src/plugins/zone_painter/CMakeLists.txt | 16 +++++++++++++++- 13 files changed, 187 insertions(+), 18 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt index 17172c488..5a20ba46c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt @@ -57,15 +57,15 @@ ADD_DEFINITIONS(-DCORE_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${ IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt index f7bb49daf..7e5c0e409 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt @@ -40,6 +40,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_disp_sheet_id) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt index 4b24a0363..27e8698df 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt @@ -38,6 +38,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_example) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_example.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt index 9f705e604..40a8dcbfe 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt @@ -44,9 +44,24 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_georges_editor) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_georges_editor ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index a9083613e..1e1cbced3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -82,4 +82,18 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_gui_editor) ADD_DEFINITIONS(-DGUI_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt index 68970066d..129f672c5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt @@ -55,5 +55,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_landscape_editor) ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) -#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt index 1e0511a1c..4cee3da24 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt @@ -36,6 +36,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_log) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_log.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt index 03f1a6a2f..1dcbebfa8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -46,6 +46,21 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt index 0ebc8a0b1..b550e8ea0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt @@ -196,6 +196,21 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt index 52965a3d4..34f237757 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -29,6 +29,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_sheet_builder) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt index a7de55dfb..1d96ebc77 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt @@ -48,6 +48,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt index 144d0a652..150cc4c4f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt @@ -65,6 +65,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_world_editor) ADD_DEFINITIONS(-DWORLD_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_world_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt index e9023c4b9..729658ab4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt @@ -42,6 +42,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_zone_painter) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) From b19971fe3ff9ad8eba4f51b31e1f18d1acbccf42 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 16 Feb 2014 20:36:58 +0100 Subject: [PATCH 050/138] Fix some streaming behaviour in XAudio2 driver --- .../sound/driver/xaudio2/source_xaudio2.cpp | 55 +++++++++++++++---- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index 3d2e69396..9d233056b 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -242,9 +242,13 @@ void CSourceXAudio2::updateState() if (!_AdpcmUtility->getSourceData()) { _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); - if (FAILED(_SourceVoice->Stop(0))) - nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); - _IsPlaying = false; + if (!_BufferStreaming) + { + nlinfo(NLSOUND_XAUDIO2_PREFIX "Stop"); + if (FAILED(_SourceVoice->Stop(0))) + nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); + _IsPlaying = false; + } } } else @@ -254,9 +258,13 @@ void CSourceXAudio2::updateState() if (!voice_state.BuffersQueued) { _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); - if (FAILED(_SourceVoice->Stop(0))) - nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); - _IsPlaying = false; + if (!_BufferStreaming) + { + nlinfo(NLSOUND_XAUDIO2_PREFIX "Stop"); + if (FAILED(_SourceVoice->Stop(0))) + nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); + _IsPlaying = false; + } } } } @@ -265,6 +273,8 @@ void CSourceXAudio2::updateState() /// (Internal) Submit a buffer to the XAudio2 source voice. void CSourceXAudio2::submitBuffer(CBufferXAudio2 *ibuffer) { + // nldebug(NLSOUND_XAUDIO2_PREFIX "submitBuffer %u", (uint32)(void *)this); + nlassert(_SourceVoice); nlassert(ibuffer->getFormat() == _Format && ibuffer->getChannels() == _Channels @@ -278,9 +288,9 @@ void CSourceXAudio2::submitBuffer(CBufferXAudio2 *ibuffer) { XAUDIO2_BUFFER buffer; buffer.AudioBytes = ibuffer->getSize(); - buffer.Flags = _IsLooping || _BufferStreaming ? 0 : XAUDIO2_END_OF_STREAM; + buffer.Flags = (_IsLooping || _BufferStreaming) ? 0 : XAUDIO2_END_OF_STREAM; buffer.LoopBegin = 0; - buffer.LoopCount = _IsLooping ? XAUDIO2_LOOP_INFINITE : 0; + buffer.LoopCount = (_IsLooping && !_BufferStreaming) ? XAUDIO2_LOOP_INFINITE : 0; buffer.LoopLength = 0; buffer.pAudioData = const_cast(ibuffer->getData()); buffer.pContext = ibuffer; @@ -336,7 +346,25 @@ void CSourceXAudio2::setupVoiceSends() void CSourceXAudio2::setStreaming(bool streaming) { nlassert(!_IsPlaying); + + // nldebug(NLSOUND_XAUDIO2_PREFIX "setStreaming %i", (uint32)streaming); + + if (_SourceVoice) + { + XAUDIO2_VOICE_STATE voice_state; + _SourceVoice->GetState(&voice_state); + if (!voice_state.BuffersQueued) + { + nlwarning(NLSOUND_XAUDIO2_PREFIX "Switched streaming mode while buffer still queued!?! Flush"); + _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); + if (FAILED(_SourceVoice->FlushSourceBuffers())) + nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED FlushSourceBuffers"); + } + } + _BufferStreaming = streaming; + + // nldebug(NLSOUND_XAUDIO2_PREFIX "setStreaming done %i", (uint32)streaming); } /// Set the buffer that will be played (no streaming) @@ -344,6 +372,8 @@ void CSourceXAudio2::setStaticBuffer(IBuffer *buffer) { nlassert(!_BufferStreaming); + // nldebug(NLSOUND_XAUDIO2_PREFIX "setStaticBuffer"); + // if (buffer) // nldebug(NLSOUND_XAUDIO2_PREFIX "setStaticBuffer %s", _SoundDriver->getStringMapper()->unmap(buffer->getName()).c_str()); // else // nldebug(NLSOUND_XAUDIO2_PREFIX "setStaticBuffer NULL"); @@ -364,6 +394,8 @@ IBuffer *CSourceXAudio2::getStaticBuffer() /// Should be called by a thread which checks countStreamingBuffers every 100ms. void CSourceXAudio2::submitStreamingBuffer(IBuffer *buffer) { + // nldebug(NLSOUND_XAUDIO2_PREFIX "submitStreamingBuffer"); + nlassert(_BufferStreaming); IBuffer::TBufferFormat bufferFormat; @@ -414,9 +446,10 @@ uint CSourceXAudio2::countStreamingBuffers() const /// Set looping on/off for future playbacks (default: off) void CSourceXAudio2::setLooping(bool l) { + // nldebug(NLSOUND_XAUDIO2_PREFIX "setLooping %u", (uint32)l); + nlassert(!_BufferStreaming); - // nldebug(NLSOUND_XAUDIO2_PREFIX "setLooping %u", (uint32)l); if (_IsLooping != l) { _IsLooping = l; @@ -455,7 +488,7 @@ void CSourceXAudio2::setLooping(bool l) _SourceVoice->GetState(&voice_state); if (voice_state.BuffersQueued) { - nlwarning(NLSOUND_XAUDIO2_PREFIX "not playing but buffer already queued???"); + nlwarning(NLSOUND_XAUDIO2_PREFIX "Not playing but buffer already queued while switching loop mode!?! Flush and requeue"); if (FAILED(_SourceVoice->FlushSourceBuffers())) nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED FlushSourceBuffers"); // queue buffer with correct looping parameters @@ -580,7 +613,7 @@ bool CSourceXAudio2::preparePlay(IBuffer::TBufferFormat bufferFormat, uint8 chan /// Play the static buffer (or stream in and play). bool CSourceXAudio2::play() -{ +{ // nldebug(NLSOUND_XAUDIO2_PREFIX "play"); // Commit 3D changes before starting play From 374f6a99ed8ecc93d5a4095c8885fac2acacdea2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 16 Feb 2014 20:44:58 +0100 Subject: [PATCH 051/138] Remove some debug --- code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index 9d233056b..0087a53bc 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -244,7 +244,7 @@ void CSourceXAudio2::updateState() _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); if (!_BufferStreaming) { - nlinfo(NLSOUND_XAUDIO2_PREFIX "Stop"); + // nldebug(NLSOUND_XAUDIO2_PREFIX "Stop"); if (FAILED(_SourceVoice->Stop(0))) nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); _IsPlaying = false; @@ -260,7 +260,7 @@ void CSourceXAudio2::updateState() _SoundDriver->getXAudio2()->CommitChanges(_OperationSet); if (!_BufferStreaming) { - nlinfo(NLSOUND_XAUDIO2_PREFIX "Stop"); + // nldebug(NLSOUND_XAUDIO2_PREFIX "Stop"); if (FAILED(_SourceVoice->Stop(0))) nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Stop"); _IsPlaying = false; From 8513e970340769bbef1d524ca3857a0ea3cf3746 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 16 Feb 2014 23:09:19 +0100 Subject: [PATCH 052/138] Fix #132 You can no longer walk through rezzed players --- code/ryzom/client/src/character_cl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 932819817..f8ee31eaa 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -2291,6 +2291,21 @@ void CCharacterCL::endAnimTransition() // If the next mode in the automaton != Current Mode if(_CurrentState->NextMode != _Mode) { + // Undo previous behaviour + switch(_Mode) + { + case MBEHAV::DEATH: + // Restore collisions. + if(_Primitive) + { + // TODO: Without this dynamic cast + if(dynamic_cast(this)) + _Primitive->setOcclusionMask(MaskColPlayer); + else + _Primitive->setOcclusionMask(MaskColNpc); + } + break; + } if(ClientCfg.UsePACSForAll && _Primitive) _Primitive->setCollisionMask(MaskColNone); //// AJOUT //// From 65b29b38e5a9b2877fa0afc03ba3903c8bd1ffa4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 17 Feb 2014 00:20:29 +0100 Subject: [PATCH 053/138] Additional streaming behaviour fix for XAudio2 driver --- .../sound/driver/xaudio2/source_xaudio2.cpp | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index 0087a53bc..21290951c 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -397,30 +397,16 @@ void CSourceXAudio2::submitStreamingBuffer(IBuffer *buffer) // nldebug(NLSOUND_XAUDIO2_PREFIX "submitStreamingBuffer"); nlassert(_BufferStreaming); - - IBuffer::TBufferFormat bufferFormat; - uint8 channels; - uint8 bitsPerSample; - uint32 frequency; - buffer->getFormat(bufferFormat, channels, bitsPerSample, frequency); + // allow to change the format if not playing if (!_IsPlaying) { - if (!_SourceVoice) - { - // if no source yet, prepare the format - preparePlay(bufferFormat, channels, bitsPerSample, frequency); - } - else - { - XAUDIO2_VOICE_STATE voice_state; - _SourceVoice->GetState(&voice_state); - // if no buffers queued, prepare the format - if (!voice_state.BuffersQueued) - { - preparePlay(bufferFormat, channels, bitsPerSample, frequency); - } - } + IBuffer::TBufferFormat bufferFormat; + uint8 channels; + uint8 bitsPerSample; + uint32 frequency; + buffer->getFormat(bufferFormat, channels, bitsPerSample, frequency); + preparePlay(bufferFormat, channels, bitsPerSample, frequency); } submitBuffer(static_cast(buffer)); @@ -636,6 +622,7 @@ bool CSourceXAudio2::play() // preparePlay already called, // stop already called before going into buffer streaming nlassert(!_IsPlaying); + nlassert(_SourceVoice); _PlayStart = CTime::getLocalTime(); if (SUCCEEDED(_SourceVoice->Start(0))) _IsPlaying = true; else nlwarning(NLSOUND_XAUDIO2_PREFIX "FAILED Play (_BufferStreaming)"); From 2f05fa27485f06df96b29c1cc693741070d3844b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 17 Feb 2014 01:54:12 +0100 Subject: [PATCH 054/138] Make IG load waiting loop more agreeable --- code/ryzom/client/src/streamable_ig.cpp | 37 ++++++++++++++++++------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/streamable_ig.cpp b/code/ryzom/client/src/streamable_ig.cpp index 514357b0c..f73df6126 100644 --- a/code/ryzom/client/src/streamable_ig.cpp +++ b/code/ryzom/client/src/streamable_ig.cpp @@ -144,12 +144,14 @@ CStreamableIG::~CStreamableIG() #ifdef NL_DEBUG //nlinfo("Loading : %s", Name.c_str()); #endif + std::vector waitForIg; + waitForIg.resize(_IGs.size()); for(uint k = 0; k < _IGs.size(); ++k) { #ifdef NL_DEBUG //nlinfo("Loading ig %s", _IGs[k].Name.c_str()); #endif - progress.progress((float)k/(float)_IGs.size()); + progress.progress((float)k/((float)_IGs.size()*2.f)); if (!_IGs[k].IG) { @@ -161,19 +163,15 @@ CStreamableIG::~CStreamableIG() //nlinfo("start blocking load"); // blocking load + // block after queueing all _Callback.Owner = this; _Scene->createInstanceGroupAndAddToSceneAsync(_IGs[k].Name + ".ig", &_IGs[k].IG, _IGs[k].Pos, _IGs[k].Rot, season, &_Callback); + _IGs[k].Loading = true; } + + _Scene->updateWaitingInstances(1000); /* set a high value to upload texture at a fast rate */ - //nlinfo("wait for end of blockin load"); - // blocking call - while (!_IGs[k].IG) - { - NLMISC::nlSleep(0); - // wait till loaded... - _Scene->updateWaitingInstances(1000); /* set a high value to upload texture at a fast rate */ - } - _IGs[k].Loading = false; + waitForIg[k] = true; } else { @@ -181,6 +179,25 @@ CStreamableIG::~CStreamableIG() { _IGs[k].Loading = false; } + + waitForIg[k] = false; + } + } + for(uint k = 0; k < _IGs.size(); ++k) + { + progress.progress(((float)k + (float)_IGs.size())/((float)_IGs.size()*2.f)); + + if (waitForIg[k]) + { + //nlinfo("wait for end of blockin load"); + // blocking call + while (!_IGs[k].IG) + { + NLMISC::nlSleep(1); + // wait till loaded... + _Scene->updateWaitingInstances(1000); /* set a high value to upload texture at a fast rate */ + } + _IGs[k].Loading = false; } } linkInstances(); From 410e2d45e1730a8751f70d9047c734a3630b7639 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 17 Feb 2014 13:57:26 +0100 Subject: [PATCH 055/138] Fix #134 Exit crash after failed response from character selection --- code/ryzom/client/src/far_tp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index da661c9a3..5ecd90c9c 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -977,7 +977,8 @@ void CFarTP::requestReturnToPreviousSession(TSessionId rejectedSessionId) void CFarTP::requestReconnection() { _ReselectingChar = true; - requestFarTPToSession(TSessionId(std::numeric_limits::max()), std::numeric_limits::max(), CFarTP::JoinMainland, false); + if (!requestFarTPToSession(TSessionId(std::numeric_limits::max()), std::numeric_limits::max(), CFarTP::JoinMainland, false)) + _ReselectingChar = false; } From a3830705ef075478307efb648908f6a8aa0257f0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 18 Feb 2014 22:19:56 +0100 Subject: [PATCH 056/138] Add sheets packer tool for shard MS and IOS --- .../input_output_service/string_manager.cpp | 54 -------- .../string_manager_parser.cpp | 2 +- .../string_manager_sheet.cpp | 75 +++++++++++ code/ryzom/tools/CMakeLists.txt | 1 + .../tools/sheets_packer_shard/CMakeLists.txt | 21 ++++ .../sheets_packer_shard.cpp | 116 ++++++++++++++++++ 6 files changed, 214 insertions(+), 55 deletions(-) create mode 100644 code/ryzom/server/src/input_output_service/string_manager_sheet.cpp create mode 100644 code/ryzom/tools/sheets_packer_shard/CMakeLists.txt create mode 100644 code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp diff --git a/code/ryzom/server/src/input_output_service/string_manager.cpp b/code/ryzom/server/src/input_output_service/string_manager.cpp index 56a351fea..1e1215594 100644 --- a/code/ryzom/server/src/input_output_service/string_manager.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager.cpp @@ -246,60 +246,6 @@ void CStringManager::clearCache(NLMISC::CLog *log) -// load the values using the george sheet -void CStringManager::TSheetInfo::readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId) -{ - if (form) - { - SheetName = sheetId.toString(); - - std::string ext = NLMISC::CSheetId::fileExtensionFromType(sheetId.getSheetType()); - - SheetName = SheetName.substr(0, SheetName.find(ext)); - // remove ending '.' - if (!SheetName.empty() && *SheetName.rbegin() == '.') - SheetName.resize(SheetName.size()-1); - - std::string gender; - - if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("creature")) - { - form->getRootNode ().getValueByName (gender, "Basics.Gender"); - sint genderId; - NLMISC::fromString(gender, genderId); - Gender = GSGENDER::EGender(genderId); - - form->getRootNode ().getValueByName (Race, "Basics.Race"); - -// form->getRootNode ().getValueByName (DisplayName, "Basics.First Name"); -// std::string s; -// form->getRootNode ().getValueByName (s, "Basics.CharacterName"); -// if (!DisplayName.empty()) -// DisplayName+=' '; -// DisplayName+=s; - - form->getRootNode ().getValueByName (Profile, "Basics.Profile"); - form->getRootNode ().getValueByName (ChatProfile, "Basics.ChatProfile"); - } - else if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("race_stats")) - { - form->getRootNode ().getValueByName (Race, "Race"); - } -/* else if (sheetId.getType() == NLMISC::CSheetId::typeFromFileExtension("sitem")) - { - // read any item specific data - } -*/ else - { - nlwarning("CStringManager::TEntityInfo : Do not know the type of the sheet '%s'.", sheetId.toString().c_str()); - return; - } - } -} - - - - const CStringManager::CEntityWords &CStringManager::getEntityWords(TLanguages lang, STRING_MANAGER::TParamType type) const { nlassert(lang < NB_LANGUAGES); diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index dfa8098a3..6022b449d 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -1864,7 +1864,7 @@ void CStringManager::init(NLMISC::CLog *log) if (_SheetInfo.empty()) { - std::map container; + // std::map container; // Load the sheet std::vector exts; exts.push_back("creature"); diff --git a/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp b/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp new file mode 100644 index 000000000..bb51b987e --- /dev/null +++ b/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp @@ -0,0 +1,75 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "stdpch.h" +#include "string_manager.h" +#include "nel/misc/i18n.h" +#include "nel/misc/path.h" +#include "nel/misc/file.h" +#include "nel/georges/u_form_elm.h" +#include "nel/georges/load_form.h" +#include + +// load the values using the george sheet +void CStringManager::TSheetInfo::readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId) +{ + if (form) + { + SheetName = sheetId.toString(); + + std::string ext = NLMISC::CSheetId::fileExtensionFromType(sheetId.getSheetType()); + + SheetName = SheetName.substr(0, SheetName.find(ext)); + // remove ending '.' + if (!SheetName.empty() && *SheetName.rbegin() == '.') + SheetName.resize(SheetName.size()-1); + + std::string gender; + + if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("creature")) + { + form->getRootNode ().getValueByName (gender, "Basics.Gender"); + sint genderId; + NLMISC::fromString(gender, genderId); + Gender = GSGENDER::EGender(genderId); + + form->getRootNode ().getValueByName (Race, "Basics.Race"); + +// form->getRootNode ().getValueByName (DisplayName, "Basics.First Name"); +// std::string s; +// form->getRootNode ().getValueByName (s, "Basics.CharacterName"); +// if (!DisplayName.empty()) +// DisplayName+=' '; +// DisplayName+=s; + + form->getRootNode ().getValueByName (Profile, "Basics.Profile"); + form->getRootNode ().getValueByName (ChatProfile, "Basics.ChatProfile"); + } + else if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("race_stats")) + { + form->getRootNode ().getValueByName (Race, "Race"); + } +/* else if (sheetId.getType() == NLMISC::CSheetId::typeFromFileExtension("sitem")) + { + // read any item specific data + } +*/ else + { + nlwarning("CStringManager::TEntityInfo : Do not know the type of the sheet '%s'.", sheetId.toString().c_str()); + return; + } + } +} diff --git a/code/ryzom/tools/CMakeLists.txt b/code/ryzom/tools/CMakeLists.txt index 631a3ad28..20a15f783 100644 --- a/code/ryzom/tools/CMakeLists.txt +++ b/code/ryzom/tools/CMakeLists.txt @@ -14,6 +14,7 @@ IF(WITH_NET) ADD_SUBDIRECTORY(stats_scan) ADD_SUBDIRECTORY(pdr_util) ADD_SUBDIRECTORY(patch_gen) + ADD_SUBDIRECTORY(sheets_packer_shard) ENDIF(WITH_NET) IF(WITH_LIGO AND WITH_NET) diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt new file mode 100644 index 000000000..bd568121a --- /dev/null +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -0,0 +1,21 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_EXECUTABLE(sheets_packer_shard ${SRC} + ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src) +TARGET_LINK_LIBRARIES(sheets_packer_shard + ryzom_gameshare + nelmisc + nelgeorges + nelnet + nelligo + ${LIBXML2_LIBRARIES}) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) + +NL_DEFAULT_PROPS(sheets_packer_shard "Ryzom, Tools: Sheets Packer Shard") +NL_ADD_RUNTIME_FLAGS(sheets_packer_shard) + +INSTALL(TARGETS sheets_packer_shard RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp new file mode 100644 index 000000000..3f0333a85 --- /dev/null +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -0,0 +1,116 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 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 . +// +// Author: Jan Boon + +#include + +// STL includes +#include +#include +#include +#include +#include + +// NeL includes +#include +#include +#include +#include +#include +#include +#include + +// Project includes +// ... + +namespace { + +} /* anonymous namespace */ + +//////////////////////////////////////////////////////////////////////// +// note: *.packed_sheets files are placed in // +// and will need to be moved to the right location by // +// your build script system. // +//////////////////////////////////////////////////////////////////////// + +int main(int nNbArg, char **ppArgs) +{ + // create debug stuff + NLMISC::createDebug(); + + // verify all params + if (nNbArg < 5) + { + nlinfo("ERROR : Wrong number of arguments\n"); + nlinfo("USAGE : sheets_packer_shard \n"); + return EXIT_FAILURE; + } + std::string leveldesignDir = std::string(ppArgs[1]); + if (!NLMISC::CFile::isDirectory(leveldesignDir)) + { + nlerrornoex("Directory leveldesign '%s' does not exist", leveldesignDir.c_str()); + return EXIT_FAILURE; + } + std::string dfnDir = std::string(ppArgs[2]); + if (!NLMISC::CFile::isDirectory(dfnDir)) + { + nlerrornoex("Directory dfn '%s' does not exist", dfnDir.c_str()); + return EXIT_FAILURE; + } + std::string datasetsDir = std::string(ppArgs[3]); + if (!NLMISC::CFile::isDirectory(datasetsDir)) + { + nlerrornoex("Directory datasets '%s' does not exist", datasetsDir.c_str()); + return EXIT_FAILURE; + } + std::string exportDir = std::string(ppArgs[4]); + if (!NLMISC::CFile::isDirectory(exportDir)) + { + nlerrornoex("Directory build_packed_sheets '%s' does not exist", exportDir.c_str()); + return EXIT_FAILURE; + } + + // add search paths + NLMISC::CPath::addSearchPath(leveldesignDir, true, false); + NLMISC::CPath::addSearchPath(dfnDir, true, false); + NLMISC::CPath::addSearchPath(datasetsDir, true, false); + + // this here does the magic + // MS + { + // Used by mirror_service.cpp + // Used by range_mirror_manager.cpp + // Used by mirror.cpp + TSDataSetSheets sDataSetSheets; + loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); + } + + // IOS + { + // Used by string_manager_parcer.cpp + std::map container; + std::vector exts; + exts.push_back("creature"); + exts.push_back("race_stats"); + loadForm(exts, exportDir + "/ios_sheets.packed_sheets", container); + } + + // and that's all folks + return EXIT_SUCCESS; +} + +/* end of file */ From 116e3440c826f1e11d040d7ddde1b2d792559416 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 18 Feb 2014 22:37:21 +0100 Subject: [PATCH 057/138] Add sheets packer tool for shard GPMS and CContinentContainer --- .../src/server_share/continent_container.cpp | 8 +++++++- .../src/server_share/continent_container.h | 5 ++++- .../tools/sheets_packer_shard/CMakeLists.txt | 5 ++++- .../sheets_packer_shard/sheets_packer_shard.cpp | 17 +++++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/code/ryzom/server/src/server_share/continent_container.cpp b/code/ryzom/server/src/server_share/continent_container.cpp index d94c0f9e8..dc3d1ccc4 100644 --- a/code/ryzom/server/src/server_share/continent_container.cpp +++ b/code/ryzom/server/src/server_share/continent_container.cpp @@ -47,7 +47,7 @@ CContinentContainer::CContinentContainer() } // -void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string packedSheetsDirectory, double cellSize, bool loadPacsPrims) +void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string &packedSheetsDirectory, double cellSize, bool loadPacsPrims) { _GridWidth = gridWidth; _GridHeight = gridHeight; @@ -56,6 +56,12 @@ void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitive _CellSize = cellSize; _LoadPacsPrims = loadPacsPrims; + buildSheets(packedSheetsDirectory); +} + +// +void CContinentContainer::buildSheets(const string &packedSheetsDirectory) +{ std::vector filters; filters.push_back("continent"); loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap); diff --git a/code/ryzom/server/src/server_share/continent_container.h b/code/ryzom/server/src/server_share/continent_container.h index f6f33f890..7edfb0c96 100644 --- a/code/ryzom/server/src/server_share/continent_container.h +++ b/code/ryzom/server/src/server_share/continent_container.h @@ -161,7 +161,10 @@ public: CContinentContainer(); /// Init whole continent container - void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); + void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); + + /// Build sheets + void buildSheets(const std::string &packedSheetsDirectory); /// Init pacs prims void initPacsPrim(const std::string &path = std::string("landscape_col_prim_pacs_list.txt")); diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt index bd568121a..5b8d6b181 100644 --- a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -2,11 +2,14 @@ FILE(GLOB SRC *.cpp *.h) ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp - ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h) + ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src) TARGET_LINK_LIBRARIES(sheets_packer_shard ryzom_gameshare + ryzom_servershare nelmisc nelgeorges nelnet diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 3f0333a85..2fc2a9a4c 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -33,6 +33,8 @@ #include #include #include +#include +#include // Project includes // ... @@ -108,6 +110,21 @@ int main(int nNbArg, char **ppArgs) exts.push_back("race_stats"); loadForm(exts, exportDir + "/ios_sheets.packed_sheets", container); } + + // GPMS + { + std::map container; + std::vector filters; + filters.push_back("creature"); + filters.push_back("player"); + loadForm(filters, exportDir + "/gpms.packed_sheets", container); + } + + // CContinentContainer + { + CContinentContainer continents; + continents.buildSheets(exportDir + "/"); + } // and that's all folks return EXIT_SUCCESS; From 44351644f1831b19ac6410d4cae0830849e683dd Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 18 Feb 2014 22:43:06 +0100 Subject: [PATCH 058/138] Rename CSheets in GPM to CGpmSheets --- code/ryzom/server/src/gpm_service/gpm_service.cpp | 4 ++-- code/ryzom/server/src/gpm_service/sheets.cpp | 14 +++++++------- code/ryzom/server/src/gpm_service/sheets.h | 4 ++-- code/ryzom/server/src/gpm_service/world_entity.cpp | 2 +- .../sheets_packer_shard/sheets_packer_shard.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/code/ryzom/server/src/gpm_service/gpm_service.cpp b/code/ryzom/server/src/gpm_service/gpm_service.cpp index 9f30f2d58..0756f641e 100644 --- a/code/ryzom/server/src/gpm_service/gpm_service.cpp +++ b/code/ryzom/server/src/gpm_service/gpm_service.cpp @@ -298,7 +298,7 @@ void CGlobalPositionManagerService::init() GET_VAR_FROM_CF(LoadPacsPrims, true); - CSheets::init(); + CGpmSheets::init(); // World Position Manager init if (!IsRingShard) @@ -707,7 +707,7 @@ void CGlobalPositionManagerService::release() CWorldPositionManager::release(); } - CSheets::release(); + CGpmSheets::release(); }// release // diff --git a/code/ryzom/server/src/gpm_service/sheets.cpp b/code/ryzom/server/src/gpm_service/sheets.cpp index 6c6048258..a65aa4456 100644 --- a/code/ryzom/server/src/gpm_service/sheets.cpp +++ b/code/ryzom/server/src/gpm_service/sheets.cpp @@ -45,14 +45,14 @@ using namespace NLGEORGES; //------------------------------------------------------------------------- // the singleton data -std::map CSheets::_sheets; -bool CSheets::_initialised=false; +std::map CGpmSheets::_sheets; +bool CGpmSheets::_initialised=false; //------------------------------------------------------------------------- // init -void CSheets::init() +void CGpmSheets::init() { if (_initialised) return; @@ -72,11 +72,11 @@ void CSheets::init() //------------------------------------------------------------------------- // display -void CSheets::display() +void CGpmSheets::display() { nlassert(_initialised); - std::map::iterator it; + std::map::iterator it; for(it=_sheets.begin();it!=_sheets.end();++it) { nlinfo("SHEET:%s Walk:%f Run:%f Radius:%f Height:%f Bounding:%f Scale:%f",(*it).first.toString().c_str(), @@ -88,12 +88,12 @@ void CSheets::display() //------------------------------------------------------------------------- // lookup -const CSheets::CSheet *CSheets::lookup( CSheetId id ) +const CGpmSheets::CSheet *CGpmSheets::lookup( CSheetId id ) { nlassert(_initialised); // setup an iterator and lookup the sheet id in the map - std::map::iterator it; + std::map::iterator it; it=_sheets.find(id); // if we found a valid entry return a pointer to the creature record otherwise 0 diff --git a/code/ryzom/server/src/gpm_service/sheets.h b/code/ryzom/server/src/gpm_service/sheets.h index 1f711e1a5..78130d970 100644 --- a/code/ryzom/server/src/gpm_service/sheets.h +++ b/code/ryzom/server/src/gpm_service/sheets.h @@ -34,7 +34,7 @@ * \author Nevrax France * \date 2002 */ -class CSheets +class CGpmSheets { public: class CSheet @@ -85,7 +85,7 @@ public: private: // prohibit cnstructor as this is a singleton - CSheets(); + CGpmSheets(); static std::map _sheets; static bool _initialised; diff --git a/code/ryzom/server/src/gpm_service/world_entity.cpp b/code/ryzom/server/src/gpm_service/world_entity.cpp index 99396bfb3..d9976a1c4 100644 --- a/code/ryzom/server/src/gpm_service/world_entity.cpp +++ b/code/ryzom/server/src/gpm_service/world_entity.cpp @@ -309,7 +309,7 @@ void CWorldEntity::createPrimitive(NLPACS::UMoveContainer *pMoveContainer, uint8 Primitive = NULL; MoveContainer = NULL; - const CSheets::CSheet *sheet = CSheets::lookup(CSheetId(Sheet())); + const CGpmSheets::CSheet *sheet = CGpmSheets::lookup(CSheetId(Sheet())); float primRadius = 0.5f; float primHeight = 2.0f; diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 2fc2a9a4c..1d146758a 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -113,7 +113,7 @@ int main(int nNbArg, char **ppArgs) // GPMS { - std::map container; + std::map container; std::vector filters; filters.push_back("creature"); filters.push_back("player"); From 9ebdd73dafb1bab76925b506781f460fe9901f51 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 18 Feb 2014 23:50:55 +0100 Subject: [PATCH 059/138] Add EGS sheets to shard sheets packer tool --- .../egs_sheets/egs_sheets.cpp | 50 ++++++++++++------- .../egs_sheets/egs_static_game_item.cpp | 2 + .../egs_sheets/egs_static_game_item.h | 2 + .../egs_sheets/egs_static_game_sheet.cpp | 3 +- .../egs_sheets/egs_static_game_sheet.h | 2 + .../egs_sheets/egs_static_harvestable.cpp | 3 +- .../egs_sheets/egs_static_harvestable.h | 2 + .../entity_structure/resists.cpp | 2 - .../tools/sheets_packer_shard/CMakeLists.txt | 12 +++-- .../sheets_packer_shard.cpp | 39 +++++++++++++-- 10 files changed, 88 insertions(+), 29 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp index 10b59d03b..cdc50a9ac 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp @@ -56,6 +56,14 @@ CSheets CSheets::_StaticSheets; // the singleton instance bool CSheets::_Initialised=false; // - set true by constructor bool CSheets::_Destroyed=false; // - set true by destructor +#ifndef NO_EGS_VARS +static std::string writeDirectory() +{ + return IService::getInstance()->WriteFilesDirectory.toString(); +} +#else +extern std::string writeDirectory(); +#endif //--------------------------------------------------- // scanDirectoriesForFiles : utility routine for init() @@ -82,7 +90,7 @@ void scanGeorgePaths(bool forceFullRescan=false) NLMISC::CPath::clearMap(); // rescan 'Paths' directories - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("Paths")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("Paths")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -91,7 +99,7 @@ void scanGeorgePaths(bool forceFullRescan=false) } // rescan 'PathsNoRecurse' directories - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("PathsNoRecurse")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("PathsNoRecurse")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -101,7 +109,7 @@ void scanGeorgePaths(bool forceFullRescan=false) } // add any paths listed in the 'GeorgeFiles' config file variable - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("GeorgePaths")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("GeorgePaths")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -123,9 +131,9 @@ template void loadSheetSet(const char *fileType,const char *sheetFile, sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileType, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -133,7 +141,7 @@ template void loadSheetSet(const char *fileType,const char *sheetFile, { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileType, writeDirectory()+sheetFile, sheetMap, true); } } @@ -148,9 +156,9 @@ template void loadSheetSet2(const char *fileType,const char *sheetFile sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm2( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm2( fileType, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -158,7 +166,7 @@ template void loadSheetSet2(const char *fileType,const char *sheetFile { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm2( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm2( fileType, writeDirectory()+sheetFile, sheetMap, true); } } @@ -172,9 +180,9 @@ template void loadSheetSet(const vector &fileTypes,const char sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -182,7 +190,7 @@ template void loadSheetSet(const vector &fileTypes,const char { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, true); } } @@ -196,9 +204,9 @@ void loadSheetSetForHashMap(const vector &fileTypes,const char *sheetFil map sheetMap; // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -206,7 +214,7 @@ void loadSheetSetForHashMap(const vector &fileTypes,const char *sheetFil { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, true); } // Convert map to hash_map @@ -705,11 +713,15 @@ template void reloadSheetSet(const vector &fileTypes, T &sheet sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { scanGeorgePaths(); loadFormNoPackedSheet( fileTypes, sheetMap, wildcardFilter); } + else + { + nlwarning("No GeorgePaths in EGS config"); + } } // variant with smart pointers, maintain with function above @@ -719,11 +731,15 @@ template void reloadSheetSet2(const vector &fileTypes, T &shee sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { scanGeorgePaths(); loadFormNoPackedSheet2( fileTypes, sheetMap, wildcardFilter); } + else + { + nlwarning("No GeorgePaths in EGS config"); + } } template void reloadSheetSet(const string &fileType, T &sheetMap, const string &wildcardFilter) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp index 94fbdcd11..f36fe91ab 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp @@ -1878,6 +1878,7 @@ void CStaticItem::reloadSheet(const CStaticItem &o) const_cast(o).clearPtrs(false); } +#ifndef NO_EGS_VARS // *************************************************************************** float CStaticItem::getBaseWeight() const { @@ -1990,6 +1991,7 @@ float CStaticItem::getBaseWeight() const return 0; } } +#endif // *************************************************************************** void CStaticItem::clearPtrs(bool doDelete) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h index 6fd990e65..ddea7be9c 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h @@ -838,11 +838,13 @@ public: /// called to copy from another sheet (operator= + care ptrs) void reloadSheet(const CStaticItem &o); +#ifndef NO_EGS_VARS /** Get the base weigth for an item. * This weight must be multiplied by the craft parameter weight value * to obtain the real item weight. */ float getBaseWeight() const; +#endif std::vector lookForEffects(ITEM_SPECIAL_EFFECT::TItemSpecialEffect effectType) const; diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp index 0ee30916c..0cc44399d 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp @@ -2093,7 +2093,7 @@ void CStaticLootTable::readGeorges( const NLMISC::CSmartPtr &f } // CStaticLootTable::readGeorges // - +#ifndef NO_EGS_VARS /// selectRandomLootSet CSheetId CStaticLootTable::selectRandomLootSet() const { @@ -2173,6 +2173,7 @@ const CStaticLootSet *CStaticLootTable::selectRandomCustomLootSet() const nlwarning("Can't find any lootset rand=%d probabilitySum=%d weightCount=%d",randWeight,probabilitySum,CustomLootSets.size()); return 0; } +#endif /////////////////////////////////////////////////////////////////////////// ///////////////////// Static Race Statistics ////////////////////////////// diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h index 9c88d3a91..527f5ee09 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h @@ -868,10 +868,12 @@ public: /// read the sheet virtual void readGeorges( const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId ); +#ifndef NO_EGS_VARS /// select a loot set NLMISC::CSheetId selectRandomLootSet() const; const CStaticLootSet *selectRandomCustomLootSet() const; +#endif // return the version of this class, increments this value when the content of this class changed static uint getVersion () { return 1; } diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp index abd96f45f..4aad89e50 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp @@ -31,6 +31,7 @@ const uint8 NbRawMaterials = 10; const float QuarteringForcedQuantities [6] = { 0, 1.0f, 2.0f, 3.0f, 4.0f, 0.5f }; +#ifndef NO_EGS_VARS const float *QuarteringQuantityByVariable [NBRMQuantityVariables] = { &QuarteringQuantityAverageForCraftHerbivore.get(), @@ -46,7 +47,7 @@ const float *QuarteringQuantityByVariable [NBRMQuantityVariables] = &QuarteringForcedQuantities[4], &QuarteringForcedQuantities[5] }; - +#endif CVariable VerboseQuartering( "egs", "VerboseQuartering", "", false, 0, true ); diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h index b89948f49..f23803bd3 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h @@ -34,7 +34,9 @@ enum TRMUsage { RMUTotalQuantity, RMUFixedQuantity, NbRMUsages }; enum TRMQuantityVariable { RMQVHerbivore, RMQVCarnivore, RMQVBoss5, RMQVBossBegin=RMQVBoss5, RMQVBoss7, RMQVBossEnd=RMQVBoss7, RMQVInvasion5, RMQVInvasion7, RMQVForceBase, NBRMQuantityVariables=RMQVForceBase+6 }; +#ifndef NO_EGS_VARS extern const float *QuarteringQuantityByVariable [NBRMQuantityVariables]; +#endif /** diff --git a/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp b/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp index 89322cc9f..b8f195857 100644 --- a/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp @@ -22,8 +22,6 @@ #include "stdpch.h" // #include "resists.h" -#include "player_manager/character.h" -#include "game_item_manager/game_item.h" ////////////// // USING // diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt index 5b8d6b181..87172f439 100644 --- a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -1,15 +1,19 @@ FILE(GLOB SRC *.cpp *.h) +FILE(GLOB EGSSHEETS ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.h) -ADD_EXECUTABLE(sheets_packer_shard ${SRC} +ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${EGSSHEETS} ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.cpp - ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h) + ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.h) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src ${CMAKE_SOURCE_DIR}/ryzom/tools/sheets_packer_shard ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service) TARGET_LINK_LIBRARIES(sheets_packer_shard ryzom_gameshare ryzom_servershare + ryzom_aishare nelmisc nelgeorges nelnet @@ -21,4 +25,6 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) NL_DEFAULT_PROPS(sheets_packer_shard "Ryzom, Tools: Sheets Packer Shard") NL_ADD_RUNTIME_FLAGS(sheets_packer_shard) +SET_TARGET_PROPERTIES(sheets_packer_shard PROPERTIES COMPILE_FLAGS -DNO_EGS_VARS) + INSTALL(TARGETS sheets_packer_shard RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 1d146758a..3d3372302 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -30,11 +30,13 @@ #include #include #include +#include #include #include #include #include #include +#include // Project includes // ... @@ -43,6 +45,15 @@ namespace { } /* anonymous namespace */ +// EGS +NLMISC::CVariable EGSLight("egs","EGSLight", "Load EGS with a minimal set of feature loaded", false, 0, true); +NLMISC::CVariable LoadOutposts("egs", "LoadOutposts", "If false outposts won't be loaded", true, 0, true ); +static std::string s_WriteDirectory; +std::string writeDirectory() +{ + return s_WriteDirectory; +} + //////////////////////////////////////////////////////////////////////// // note: *.packed_sheets files are placed in // // and will need to be moved to the right location by // @@ -55,10 +66,12 @@ int main(int nNbArg, char **ppArgs) NLMISC::createDebug(); // verify all params - if (nNbArg < 5) + if (nNbArg < 6) { + // >sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard nlinfo("ERROR : Wrong number of arguments\n"); - nlinfo("USAGE : sheets_packer_shard \n"); + nlinfo("USAGE : sheets_packer_shard \n"); + nlinfo(" : Directory containing visual_slots.tab"); return EXIT_FAILURE; } std::string leveldesignDir = std::string(ppArgs[1]); @@ -79,18 +92,29 @@ int main(int nNbArg, char **ppArgs) nlerrornoex("Directory datasets '%s' does not exist", datasetsDir.c_str()); return EXIT_FAILURE; } - std::string exportDir = std::string(ppArgs[4]); + std::string tabDir = std::string(ppArgs[4]); + if (!NLMISC::CFile::isDirectory(tabDir)) + { + nlerrornoex("Directory tab '%s' does not exist", tabDir.c_str()); + return EXIT_FAILURE; + } + std::string exportDir = std::string(ppArgs[5]); if (!NLMISC::CFile::isDirectory(exportDir)) { nlerrornoex("Directory build_packed_sheets '%s' does not exist", exportDir.c_str()); return EXIT_FAILURE; } + s_WriteDirectory = exportDir + "/"; // add search paths NLMISC::CPath::addSearchPath(leveldesignDir, true, false); NLMISC::CPath::addSearchPath(dfnDir, true, false); - NLMISC::CPath::addSearchPath(datasetsDir, true, false); + NLMISC::CPath::addSearchPath(datasetsDir, false, false); + NLMISC::CPath::addSearchPath(tabDir, false, false); + // init sheet_id.bin + NLMISC::CSheetId::init(false); + // this here does the magic // MS { @@ -123,7 +147,12 @@ int main(int nNbArg, char **ppArgs) // CContinentContainer { CContinentContainer continents; - continents.buildSheets(exportDir + "/"); + continents.buildSheets(s_WriteDirectory); + } + + // EGS + { + CSheets::init(); } // and that's all folks From 18ba33b02c4315600fd5456e0b5dd18bb527c3b9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 19 Feb 2014 00:07:22 +0100 Subject: [PATCH 060/138] Add sheets packer tool for CTimeDateSeasonManager --- .../time_weather_season/time_date_season_manager.cpp | 9 ++++++--- .../time_weather_season/time_date_season_manager.h | 1 + .../tools/sheets_packer_shard/sheets_packer_shard.cpp | 8 +++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp index 5ce57fced..12eebd0fd 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp @@ -42,9 +42,12 @@ std::map< NLMISC::CSheetId, CStaticLightCycle > CTimeDateSeasonManager::_StaticL void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */) { // load light cycle sheet - string lightCycleFile = IService::getInstance()->WriteFilesDirectory; - lightCycleFile = lightCycleFile + string("light_cycles.packed_sheets"); - loadForm( "light_cycle", lightCycleFile, _StaticLightCyclesHours ); + packSheets(IService::getInstance()->WriteFilesDirectory); +} + +void CTimeDateSeasonManager::packSheets(const std::string &writeDirectory) +{ + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours); } diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h index 1a0bd32bc..62b988ad7 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h @@ -36,6 +36,7 @@ class CTimeDateSeasonManager public: // init RyzomTime, date, weather static void init( uint32 startDay = RYZOM_START_DAY, float startTime = RYZOM_START_HOUR ); + static void packSheets(const std::string &writeDirectory); // tick update => update ryzom time static void tickUpdate(); diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 3d3372302..eb735e02e 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -37,6 +37,7 @@ #include #include #include +#include // Project includes // ... @@ -68,7 +69,7 @@ int main(int nNbArg, char **ppArgs) // verify all params if (nNbArg < 6) { - // >sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard + // sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard nlinfo("ERROR : Wrong number of arguments\n"); nlinfo("USAGE : sheets_packer_shard \n"); nlinfo(" : Directory containing visual_slots.tab"); @@ -154,6 +155,11 @@ int main(int nNbArg, char **ppArgs) { CSheets::init(); } + + // CTimeDateSeasonManager + { + CTimeDateSeasonManager::packSheets(s_WriteDirectory); + } // and that's all folks return EXIT_SUCCESS; From d8e83d5727ba214a5c8d1c82081642f57867f79a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 19 Feb 2014 00:40:04 +0100 Subject: [PATCH 061/138] Add AIS sheets to shard sheets packer tool --- code/ryzom/server/src/ai_service/commands.cpp | 29 ----------- .../server/src/ai_service/commands_mlf.cpp | 52 +++++++++++++++++++ code/ryzom/server/src/ai_service/sheets.cpp | 17 ++++-- code/ryzom/server/src/ai_service/sheets.h | 1 + .../tools/sheets_packer_shard/CMakeLists.txt | 8 ++- .../sheets_packer_shard.cpp | 8 +++ 6 files changed, 79 insertions(+), 36 deletions(-) create mode 100644 code/ryzom/server/src/ai_service/commands_mlf.cpp diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index 07e9023bf..d257d0492 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -2889,35 +2889,6 @@ NLMISC_COMMAND(unloadPrimitiveFile,"unload a primitive file","") return true; } -////////////////////////////////////////////////////////////////////////////// -// MULTI_LINE_FORMATER // -////////////////////////////////////////////////////////////////////////////// - -static int const MULTI_LINE_FORMATER_maxn = 78; -void MULTI_LINE_FORMATER::pushTitle(std::vector& container, std::string const& text) -{ - const sint maxn = MULTI_LINE_FORMATER_maxn; - sint n = maxn - (sint)text.length() - 4; - container.push_back(" _/"); - container.back() += text; - container.back() += "\\" + std::string(n, '_'); - container.push_back("/"); - container.back() += std::string(maxn - 1, ' '); -} - -void MULTI_LINE_FORMATER::pushEntry(std::vector& container, std::string const& text) -{ - container.push_back("| "); - container.back() += text; -} - -void MULTI_LINE_FORMATER::pushFooter(std::vector& container) -{ - int const maxn = MULTI_LINE_FORMATER_maxn; - container.push_back("\\"); - container.back() += std::string(maxn - 1, '_'); -} - ////////////////////////////////////////////////////////////////////////////// // Bug simulation // ////////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/server/src/ai_service/commands_mlf.cpp b/code/ryzom/server/src/ai_service/commands_mlf.cpp new file mode 100644 index 000000000..6437100cf --- /dev/null +++ b/code/ryzom/server/src/ai_service/commands_mlf.cpp @@ -0,0 +1,52 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "stdpch.h" + +using namespace NLMISC; +using namespace NLNET; +using namespace std; + +////////////////////////////////////////////////////////////////////////////// +// MULTI_LINE_FORMATER // +////////////////////////////////////////////////////////////////////////////// + +static int const MULTI_LINE_FORMATER_maxn = 78; +void MULTI_LINE_FORMATER::pushTitle(std::vector& container, std::string const& text) +{ + const sint maxn = MULTI_LINE_FORMATER_maxn; + sint n = maxn - (sint)text.length() - 4; + container.push_back(" _/"); + container.back() += text; + container.back() += "\\" + std::string(n, '_'); + container.push_back("/"); + container.back() += std::string(maxn - 1, ' '); +} + +void MULTI_LINE_FORMATER::pushEntry(std::vector& container, std::string const& text) +{ + container.push_back("| "); + container.back() += text; +} + +void MULTI_LINE_FORMATER::pushFooter(std::vector& container) +{ + int const maxn = MULTI_LINE_FORMATER_maxn; + container.push_back("\\"); + container.back() += std::string(maxn - 1, '_'); +} diff --git a/code/ryzom/server/src/ai_service/sheets.cpp b/code/ryzom/server/src/ai_service/sheets.cpp index aa92fe3d4..bc7ece4fa 100644 --- a/code/ryzom/server/src/ai_service/sheets.cpp +++ b/code/ryzom/server/src/ai_service/sheets.cpp @@ -625,7 +625,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr const& { std::string scriptCompStr; scriptCompNode->getArrayValue(scriptCompStr, arrayIndex); - +#ifndef NO_AI_COMP CFightScriptComp* scriptComp; try { @@ -636,6 +636,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr const& { nlwarning("script read error (ignored): %s", ex.what()); } +#endif } } // Creature race @@ -763,6 +764,7 @@ void AISHEETS::CCreature::serial(NLMISC::IStream &s) string scriptCompStr; s.serial(scriptCompStr); +#ifndef NO_AI_COMP CFightScriptComp* scriptComp; try { @@ -773,6 +775,7 @@ void AISHEETS::CCreature::serial(NLMISC::IStream &s) { nlwarning("script read error (ignored): %s", ex.what()); } +#endif } } else @@ -881,8 +884,14 @@ void AISHEETS::CSheets::init() nlassert(_PlayerGroupIndex!=~0); #endif - CConfigFile::CVar *varPtr=IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths")); - const std::string writeFilesDirectoryName=IService::getInstance()->WriteFilesDirectory.toString(); + packSheets(IService::getInstance()->WriteFilesDirectory.toString()); + + _Initialised=true; +} + +void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) +{ + CConfigFile::CVar *varPtr = IService::isServiceInitialized() ? IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths")) : NULL; // if config file variable 'GeorgePaths' exists then only do a minimal loadForms otherwise do the full works if (varPtr!=NULL) @@ -947,8 +956,6 @@ void AISHEETS::CSheets::init() loadForm2("creature", writeFilesDirectoryName+AISPackedSheetsFilename, _Sheets, true); loadForm2("race_stats", writeFilesDirectoryName+AISPackedRaceStatsSheetsFilename, _RaceStatsSheets, true); } - - _Initialised=true; } void AISHEETS::CSheets::release() diff --git a/code/ryzom/server/src/ai_service/sheets.h b/code/ryzom/server/src/ai_service/sheets.h index 77605cae1..efa4d0c10 100644 --- a/code/ryzom/server/src/ai_service/sheets.h +++ b/code/ryzom/server/src/ai_service/sheets.h @@ -689,6 +689,7 @@ public: public: // load the creature data from the george files void init(); + void packSheets(const std::string &writeFilesDirectoryName); // display the creature data for all known creature types void display(NLMISC::CSmartPtr stringWriter, uint infoSelect = 0); diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt index 87172f439..3e9f2a17f 100644 --- a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -7,7 +7,10 @@ ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${EGSSHEETS} ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.cpp - ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.h) + ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/sheets.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/sheets.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/commands_mlf.cpp) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src ${CMAKE_SOURCE_DIR}/ryzom/tools/sheets_packer_shard ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service) TARGET_LINK_LIBRARIES(sheets_packer_shard @@ -25,6 +28,7 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) NL_DEFAULT_PROPS(sheets_packer_shard "Ryzom, Tools: Sheets Packer Shard") NL_ADD_RUNTIME_FLAGS(sheets_packer_shard) -SET_TARGET_PROPERTIES(sheets_packer_shard PROPERTIES COMPILE_FLAGS -DNO_EGS_VARS) +ADD_DEFINITIONS(-DNO_EGS_VARS) +ADD_DEFINITIONS(-DNO_AI_COMP) INSTALL(TARGETS sheets_packer_shard RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index eb735e02e..9c2212efa 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include // Project includes // ... @@ -160,6 +162,12 @@ int main(int nNbArg, char **ppArgs) { CTimeDateSeasonManager::packSheets(s_WriteDirectory); } + + // AIS + { + AISHEETS::CSheets::getInstance()->packSheets(s_WriteDirectory); + AISHEETS::CSheets::destroyInstance(); + } // and that's all folks return EXIT_SUCCESS; From 78f6aa1ce9c32807f86e4e5fb0dd8d491ad83c47 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 19 Feb 2014 23:51:55 +0100 Subject: [PATCH 062/138] Add build process script for shard sheets --- .../build_gamedata/configuration/tools.py | 1 + .../tools/build_gamedata/leveldesign_dev.bat | 6 +- .../processes/sheet_id/2_build.py | 2 +- .../processes/sheets_shard/0_setup.py | 67 +++++++++++++++++++ .../processes/sheets_shard/1_export.py | 49 ++++++++++++++ .../processes/sheets_shard/2_build.py | 67 +++++++++++++++++++ .../processes/sheets_shard/3_install.py | 57 ++++++++++++++++ 7 files changed, 245 insertions(+), 4 deletions(-) create mode 100644 code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py create mode 100644 code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py create mode 100644 code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py create mode 100644 code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index ae205db43..f9cc54964 100644 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -85,6 +85,7 @@ IgElevationTool = "ig_elevation" IgAddTool = "ig_add" BuildClodBankTool = "build_clod_bank" SheetsPackerTool = "sheets_packer" +SheetsPackerShardTool = "sheets_packer_shard" BnpMakeTool = "bnp_make" AiBuildWmapTool = "ai_build_wmap" TgaCutTool = "tga_cut" diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index 930ff2339..22e6c7fe6 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -1,5 +1,5 @@ -1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg -2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg -3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg +1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language 5_client_dev.py 8_shard_data.py diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py index a2932ccb1..b29914913 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py @@ -54,7 +54,7 @@ if MakeSheetId == "": else: mkPath(log, LeveldesignDirectory) mkPath(log, LeveldesignWorldDirectory) - subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "mirror_sheets" ]) + subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "/mirror_sheets" ]) # FIXME: Hardcoded path mirror_sheets printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py new file mode 100644 index 000000000..bc3024f3b --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, LeveldesignDirectory) +mkPath(log, LeveldesignDfnDirectory) +mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) +mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SheetsShardInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py new file mode 100644 index 000000000..650e0307d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py new file mode 100644 index 000000000..c66de2b28 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +SheetsPackerShard = findTool(log, ToolDirectories, SheetsPackerShardTool, ToolSuffix) +printLog(log, "") + +# For each sheets directory +printLog(log, ">>> Build shard sheets <<<") +if SheetsPackerShard == "": + toolLogFail(log, SheetsPackerShardTool, ToolSuffix) +else: + mkPath(log, LeveldesignDirectory) + mkPath(log, LeveldesignDfnDirectory) + mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) + mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + # sheets_packer_shard + subprocess.call([ SheetsPackerShard, LeveldesignDirectory, LeveldesignDfnDirectory, DataShardDirectory + "/mirror_sheets", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory, ExportBuildDirectory + "/" + SheetsShardBuildDirectory ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py new file mode 100644 index 000000000..ba7e1a8a8 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py @@ -0,0 +1,57 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + SheetsShardInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory, installPath, ".packed_sheets") + +printLog(log, "") +log.close() + + +# end of file From 3c5d35137dcb803bef80660532e1fa6224cf729d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 01:06:29 +0100 Subject: [PATCH 063/138] Nicer batch scripts for pipeline --- code/nel/tools/build_gamedata/all.bat | 19 ------------------- code/nel/tools/build_gamedata/all_dev.bat | 11 +++++++++++ .../tools/build_gamedata/executables_dev.bat | 7 +++++++ .../tools/build_gamedata/interface_dev.bat | 5 +++++ .../tools/build_gamedata/leveldesign_dev.bat | 6 ++++++ 5 files changed, 29 insertions(+), 19 deletions(-) delete mode 100644 code/nel/tools/build_gamedata/all.bat create mode 100644 code/nel/tools/build_gamedata/all_dev.bat create mode 100644 code/nel/tools/build_gamedata/executables_dev.bat diff --git a/code/nel/tools/build_gamedata/all.bat b/code/nel/tools/build_gamedata/all.bat deleted file mode 100644 index 3c236aabe..000000000 --- a/code/nel/tools/build_gamedata/all.bat +++ /dev/null @@ -1,19 +0,0 @@ -TITLE 1_export.py -1_export.py -TITLE 2_build.py -2_build.py -TITLE 3_install.py -3_install.py -TITLE 4_worldedit_data.py -4_worldedit_data.py -TITLE 5_client_dev.py -5_client_dev.py -TITLE 6_client_patch.py -6_client_patch.py -bo -TITLE 7_client_install.py -7_client_install.py -TITLE 8_shard_data.py -8_shard_data.py -PAUSE - - diff --git a/code/nel/tools/build_gamedata/all_dev.bat b/code/nel/tools/build_gamedata/all_dev.bat new file mode 100644 index 000000000..24a7e7b4c --- /dev/null +++ b/code/nel/tools/build_gamedata/all_dev.bat @@ -0,0 +1,11 @@ +title Ryzom Core: 1_export.py +1_export.py +title Ryzom Core: 2_build.py +2_build.py +title Ryzom Core: 3_install.py +3_install.py +title Ryzom Core: 5_client_dev.py +5_client_dev.py +title Ryzom Core: 8_shard_data.py +8_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/executables_dev.bat b/code/nel/tools/build_gamedata/executables_dev.bat new file mode 100644 index 000000000..a42a6234d --- /dev/null +++ b/code/nel/tools/build_gamedata/executables_dev.bat @@ -0,0 +1,7 @@ +title Ryzom Core: 3_install.py (EXECUTABLES) +3_install.py -ipj common/gamedev common/exedll common/cfg +title Ryzom Core: 5_client_dev.py (EXECUTABLES) +5_client_dev.py +title Ryzom Core: 8_shard_data.py (EXECUTABLES) +8_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/interface_dev.bat b/code/nel/tools/build_gamedata/interface_dev.bat index 1c5fa04eb..efc2b2b18 100644 --- a/code/nel/tools/build_gamedata/interface_dev.bat +++ b/code/nel/tools/build_gamedata/interface_dev.bat @@ -1,4 +1,9 @@ +title Ryzom Core: 1_export.py (INTERFACE) 1_export.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame +title Ryzom Core: 2_build.py (INTERFACE) 2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame +title Ryzom Core: 3_install.py (INTERFACE) 3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame +title Ryzom Core: 5_client_dev.py (INTERFACE) 5_client_dev.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index 22e6c7fe6..c2f237d33 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -1,5 +1,11 @@ +title Ryzom Core: 1_export.py (LEVELDESIGN) 1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +title Ryzom Core: 2_build.py (LEVELDESIGN) 2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +title Ryzom Core: 3_install.py (LEVELDESIGN) 3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +title Ryzom Core: 5_client_dev.py (LEVELDESIGN) 5_client_dev.py +title Ryzom Core: 8_shard_data.py (LEVELDESIGN) 8_shard_data.py +title Ryzom Core: Ready From 0934e847577118bad7c308648d1f3e87647b24f4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 01:31:09 +0100 Subject: [PATCH 064/138] Rename scripts --- code/nel/tools/build_gamedata/0_setup.py | 74 ++++++++++--------- ...worldedit_data.py => a1_worldedit_data.py} | 0 code/nel/tools/build_gamedata/all_dev.bat | 10 ++- .../{5_client_dev.py => b1_client_dev.py} | 2 +- .../{8_shard_data.py => b2_shard_data.py} | 2 +- .../{6_client_patch.py => d1_client_patch.py} | 2 +- ...client_install.py => d2_client_install.py} | 2 +- .../tools/build_gamedata/executables_dev.bat | 8 +- .../build_gamedata/install_client_dev.py | 31 -------- .../build_gamedata/install_data_shard.py | 31 -------- .../tools/build_gamedata/interface_dev.bat | 4 +- .../tools/build_gamedata/leveldesign_dev.bat | 8 +- 12 files changed, 60 insertions(+), 114 deletions(-) rename code/nel/tools/build_gamedata/{4_worldedit_data.py => a1_worldedit_data.py} (100%) rename code/nel/tools/build_gamedata/{5_client_dev.py => b1_client_dev.py} (99%) rename code/nel/tools/build_gamedata/{8_shard_data.py => b2_shard_data.py} (99%) rename code/nel/tools/build_gamedata/{6_client_patch.py => d1_client_patch.py} (99%) rename code/nel/tools/build_gamedata/{7_client_install.py => d2_client_install.py} (99%) delete mode 100644 code/nel/tools/build_gamedata/install_client_dev.py delete mode 100644 code/nel/tools/build_gamedata/install_data_shard.py diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 85c070893..a2eb10d15 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -175,6 +175,10 @@ if not args.noconf: PatchmanCfgDefaultDirectory except NameError: PatchmanCfgDefaultDirectory = "S:/notes/patchman_cfg/default" + try: + PatchmanBridgeServerDirectory + except NameError: + PatchmanBridgeServerDirectory = "W:/bridge_server" try: MaxAvailable except NameError: @@ -204,41 +208,42 @@ if not args.noconf: printLog(log, "Use -- if you need to insert an empty value.") printLog(log, "") BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) - ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") - ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") + ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") + ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) - ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") - WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/") - DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/") - ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/") - InstallDirectory = askVar(log, "Install Directory", InstallDirectory).replace("\\", "/") - ClientDevDirectory = askVar(log, "Client Dev Directory", ClientDevDirectory).replace("\\", "/") - ClientPatchDirectory = askVar(log, "Client Patch Directory", ClientPatchDirectory).replace("\\", "/") - ClientInstallDirectory = askVar(log, "Client Install Directory", ClientInstallDirectory).replace("\\", "/") - ShardInstallDirectory = askVar(log, "Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") - WorldEditInstallDirectory = askVar(log, "World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") - LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") - LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") - LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") - PrimitivesDirectory = askVar(log, "Primitives Directory", PrimitivesDirectory).replace("\\", "/") - GamedevDirectory = askVar(log, "Gamedev Directory", GamedevDirectory).replace("\\", "/") - DataShardDirectory = askVar(log, "Data Shard Directory", DataShardDirectory).replace("\\", "/") - DataCommonDirectory = askVar(log, "Data Common Directory", DataCommonDirectory).replace("\\", "/") - TranslationDirectory = askVar(log, "Translation Directory", TranslationDirectory).replace("\\", "/") - LeveldesignDataShardDirectory = askVar(log, "Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") - LeveldesignDataCommonDirectory = askVar(log, "Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") - WorldEditorFilesDirectory = askVar(log, "World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") - WindowsExeDllCfgDirectories[0] = askVar(log, "Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") - WindowsExeDllCfgDirectories[1] = askVar(log, "Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") - WindowsExeDllCfgDirectories[2] = askVar(log, "Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") - WindowsExeDllCfgDirectories[3] = askVar(log, "Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") - WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") - WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") - WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") - LinuxServiceExecutableDirectory = askVar(log, "Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") - LinuxClientExecutableDirectory = askVar(log, "Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") - PatchmanCfgAdminDirectory = askVar(log, "Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") - PatchmanCfgDefaultDirectory = askVar(log, "Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") + ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") + WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") + DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") + ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") + InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") + ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") + ClientPatchDirectory = askVar(log, "[OUT] Client Patch Directory", ClientPatchDirectory).replace("\\", "/") + ClientInstallDirectory = askVar(log, "[OUT] Client Install Directory", ClientInstallDirectory).replace("\\", "/") + ShardInstallDirectory = askVar(log, "[OUT] Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") + WorldEditInstallDirectory = askVar(log, "[OUT] World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") + LeveldesignDirectory = askVar(log, "[IN] Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") + LeveldesignDfnDirectory = askVar(log, "[IN] Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") + LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") + PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") + GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") + DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") + DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") + TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") + LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") + LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") + WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") + WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") + WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") + WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") + WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") + WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") + WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") + WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") + LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") + PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") + PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") + PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) if MaxAvailable: MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") @@ -323,6 +328,7 @@ if not args.noconf: sf.write("LinuxClientExecutableDirectory = \"" + str(LinuxClientExecutableDirectory) + "\"\n") sf.write("PatchmanCfgAdminDirectory = \"" + str(PatchmanCfgAdminDirectory) + "\"\n") sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") + sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") sf.write("\n") sf.write("# 3dsMax directives\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") diff --git a/code/nel/tools/build_gamedata/4_worldedit_data.py b/code/nel/tools/build_gamedata/a1_worldedit_data.py similarity index 100% rename from code/nel/tools/build_gamedata/4_worldedit_data.py rename to code/nel/tools/build_gamedata/a1_worldedit_data.py diff --git a/code/nel/tools/build_gamedata/all_dev.bat b/code/nel/tools/build_gamedata/all_dev.bat index 24a7e7b4c..c9c13eba3 100644 --- a/code/nel/tools/build_gamedata/all_dev.bat +++ b/code/nel/tools/build_gamedata/all_dev.bat @@ -4,8 +4,10 @@ title Ryzom Core: 2_build.py 2_build.py title Ryzom Core: 3_install.py 3_install.py -title Ryzom Core: 5_client_dev.py -5_client_dev.py -title Ryzom Core: 8_shard_data.py -8_shard_data.py +title Ryzom Core: a1_worldedit_data.py +a1_worldedit_data.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/5_client_dev.py b/code/nel/tools/build_gamedata/b1_client_dev.py similarity index 99% rename from code/nel/tools/build_gamedata/5_client_dev.py rename to code/nel/tools/build_gamedata/b1_client_dev.py index b1a47251d..cbe4b9092 100644 --- a/code/nel/tools/build_gamedata/5_client_dev.py +++ b/code/nel/tools/build_gamedata/b1_client_dev.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 5_client_dev.py +# \file b1_client_dev.py # \brief Install to client dev # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) diff --git a/code/nel/tools/build_gamedata/8_shard_data.py b/code/nel/tools/build_gamedata/b2_shard_data.py similarity index 99% rename from code/nel/tools/build_gamedata/8_shard_data.py rename to code/nel/tools/build_gamedata/b2_shard_data.py index 14042231c..28ea70f26 100644 --- a/code/nel/tools/build_gamedata/8_shard_data.py +++ b/code/nel/tools/build_gamedata/b2_shard_data.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 8_shard_data.py +# \file b2_shard_data.py # \brief Install shard data # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) diff --git a/code/nel/tools/build_gamedata/6_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py similarity index 99% rename from code/nel/tools/build_gamedata/6_client_patch.py rename to code/nel/tools/build_gamedata/d1_client_patch.py index be84379ae..8af27debf 100644 --- a/code/nel/tools/build_gamedata/6_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 6_client_patch.py +# \file d1_client_patch.py # \brief Install to client patch # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) diff --git a/code/nel/tools/build_gamedata/7_client_install.py b/code/nel/tools/build_gamedata/d2_client_install.py similarity index 99% rename from code/nel/tools/build_gamedata/7_client_install.py rename to code/nel/tools/build_gamedata/d2_client_install.py index 2bad7fcd2..2555385da 100644 --- a/code/nel/tools/build_gamedata/7_client_install.py +++ b/code/nel/tools/build_gamedata/d2_client_install.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 7_client_install.py +# \file d2_client_install.py # \brief Install to client install # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) diff --git a/code/nel/tools/build_gamedata/executables_dev.bat b/code/nel/tools/build_gamedata/executables_dev.bat index a42a6234d..d693b49e0 100644 --- a/code/nel/tools/build_gamedata/executables_dev.bat +++ b/code/nel/tools/build_gamedata/executables_dev.bat @@ -1,7 +1,7 @@ title Ryzom Core: 3_install.py (EXECUTABLES) 3_install.py -ipj common/gamedev common/exedll common/cfg -title Ryzom Core: 5_client_dev.py (EXECUTABLES) -5_client_dev.py -title Ryzom Core: 8_shard_data.py (EXECUTABLES) -8_shard_data.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/install_client_dev.py b/code/nel/tools/build_gamedata/install_client_dev.py deleted file mode 100644 index 0d444cfdb..000000000 --- a/code/nel/tools/build_gamedata/install_client_dev.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python -# -# \file export_build_install.py -# \brief Run all processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all processes -# -# NeL - MMORPG Framework -# Copyright (C) 2010 Winch Gate Property Limited -# -# 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 . -# - -import shutil, subprocess - -subprocess.call([ "python", "3_install.py" ]) -subprocess.call([ "python", "5_client_dev.py" ]) - diff --git a/code/nel/tools/build_gamedata/install_data_shard.py b/code/nel/tools/build_gamedata/install_data_shard.py deleted file mode 100644 index 620d90faa..000000000 --- a/code/nel/tools/build_gamedata/install_data_shard.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python -# -# \file export_build_install.py -# \brief Run all processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all processes -# -# NeL - MMORPG Framework -# Copyright (C) 2010 Winch Gate Property Limited -# -# 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 . -# - -import shutil, subprocess - -subprocess.call([ "python", "3_install.py" ]) -subprocess.call([ "python", "8_shard_data.py" ]) - diff --git a/code/nel/tools/build_gamedata/interface_dev.bat b/code/nel/tools/build_gamedata/interface_dev.bat index efc2b2b18..6f54f220e 100644 --- a/code/nel/tools/build_gamedata/interface_dev.bat +++ b/code/nel/tools/build_gamedata/interface_dev.bat @@ -4,6 +4,6 @@ title Ryzom Core: 2_build.py (INTERFACE) 2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame title Ryzom Core: 3_install.py (INTERFACE) 3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame -title Ryzom Core: 5_client_dev.py (INTERFACE) -5_client_dev.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index c2f237d33..cebd81ce7 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -4,8 +4,8 @@ title Ryzom Core: 2_build.py (LEVELDESIGN) 2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language title Ryzom Core: 3_install.py (LEVELDESIGN) 3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language -title Ryzom Core: 5_client_dev.py (LEVELDESIGN) -5_client_dev.py -title Ryzom Core: 8_shard_data.py (LEVELDESIGN) -8_shard_data.py +title Ryzom Core: b1_client_dev.py (LEVELDESIGN) +b1_client_dev.py +title Ryzom Core: b2_shard_data.py (LEVELDESIGN) +b2_shard_data.py title Ryzom Core: Ready From 4433139a8ed4d040f556dd37b279ce108978cad6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 03:09:31 +0100 Subject: [PATCH 065/138] Add script for creating a new shard patch --- .../nel/tools/build_gamedata/b1_client_dev.py | 6 +- .../nel/tools/build_gamedata/b2_shard_data.py | 21 ++-- .../tools/build_gamedata/c1_shard_patch.py | 109 ++++++++++++++++++ .../tools/build_gamedata/d1_client_patch.py | 6 +- .../tools/build_gamedata/d2_client_install.py | 6 +- .../tools/build_gamedata/leveldesign_dev.bat | 6 +- 6 files changed, 134 insertions(+), 20 deletions(-) create mode 100644 code/nel/tools/build_gamedata/c1_shard_patch.py diff --git a/code/nel/tools/build_gamedata/b1_client_dev.py b/code/nel/tools/build_gamedata/b1_client_dev.py index cbe4b9092..9553ed6df 100644 --- a/code/nel/tools/build_gamedata/b1_client_dev.py +++ b/code/nel/tools/build_gamedata/b1_client_dev.py @@ -69,7 +69,7 @@ for category in InstallClientData: printLog(log, "") log.close() -if os.path.isfile("5_client_dev.log"): - os.remove("5_client_dev.log") +if os.path.isfile("b1_client_dev.log"): + os.remove("b1_client_dev.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log") -shutil.move("log.log", "5_client_dev.log") +shutil.move("log.log", "b1_client_dev.log") diff --git a/code/nel/tools/build_gamedata/b2_shard_data.py b/code/nel/tools/build_gamedata/b2_shard_data.py index 28ea70f26..2843769e9 100644 --- a/code/nel/tools/build_gamedata/b2_shard_data.py +++ b/code/nel/tools/build_gamedata/b2_shard_data.py @@ -46,15 +46,20 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") for dir in InstallShardDataDirectories: - printLog(log, "SHARD DIRECTORY " + dir) + printLog(log, "SHARD PACKAGE " + dir) mkPath(log, ShardInstallDirectory + "/" + dir) printLog(log, "FROM " + dir) mkPath(log, InstallDirectory + "/" + dir) copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) +for package in InstallShardDataFiles: + dstDir = package[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, package[1]) for multiDir in InstallShardDataMultiDirectories: dstDir = multiDir[0] mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD DIRECTORY " + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) for srcDir in multiDir[1]: printLog(log, "FROM " + srcDir) mkPath(log, InstallDirectory + "/" + srcDir) @@ -63,7 +68,7 @@ for multiDir in InstallShardDataMultiDirectories: for multiDir in InstallShardDataPrimitivesDirectories: dstDir = multiDir[0] mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD DIRECTORY " + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) for srcDir in multiDir[1]: printLog(log, "FROM PRIMITIVES " + srcDir) mkPath(log, PrimitivesDirectory + "/" + srcDir) @@ -75,14 +80,14 @@ for execDir in InstallShardDataExecutables: mkPath(log, PatchmanCfgDefaultDirectory) mkPath(log, InstallDirectory) mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD DIRECTORY " + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) copyFileListNoTreeIfNeeded(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) printLog(log, "") log.close() -if os.path.isfile("8_shard_data.log"): - os.remove("8_shard_data.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_install.log") -shutil.move("log.log", "8_shard_data.log") +if os.path.isfile("b2_shard_data.log"): + os.remove("b2_shard_data.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_data.log") +shutil.move("log.log", "b2_shard_data.log") diff --git a/code/nel/tools/build_gamedata/c1_shard_patch.py b/code/nel/tools/build_gamedata/c1_shard_patch.py new file mode 100644 index 000000000..a67613f67 --- /dev/null +++ b/code/nel/tools/build_gamedata/c1_shard_patch.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# +# \file c1_shard_patch.py +# \brief Create a new patch for the patchman bridge +# \date 2014-02-20 00:27GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Create a new patch for the patchman bridge +# +# NeL - MMORPG Framework +# Copyright (C) 2014 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 . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile +sys.path.append("configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Create a new patch for the patchman bridge") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# List the directories that will be used +archiveDirectories = [ ] +for dir in InstallShardDataDirectories: + if not dir in archiveDirectories: + archiveDirectories += [ dir ] +for package in InstallShardDataFiles: + dstDir = package[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] + +printLog(log, ">>> Archive new admin_install.tgz <<<") +mkPath(log, PatchmanBridgeServerDirectory) +adminInstallTgz = PatchmanBridgeServerDirectory + "/admin_install.tgz" +patchmanExecutable = LinuxServiceExecutableDirectory + "/ryzom_patchman_service" +if needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/bin", adminInstallTgz) or needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/patchman", adminInstallTgz) or needUpdate(log, patchmanExecutable, adminInstallTgz): + printLog(log, "WRITE " + adminInstallTgz) + if os.path.isfile(adminInstallTgz): + os.remove(adminInstallTgz) + tar = tarfile.open(adminInstallTgz, "w:gz") + tar.add(PatchmanCfgAdminDirectory + "/bin", arcname = "bin") + tar.add(PatchmanCfgAdminDirectory + "/patchman", arcname = "patchman") + tar.add(patchmanExecutable, arcname = "patchman/ryzom_patchman_service") + tar.close() +else: + printLog(log, "SKIP " + adminInstallTgz) +printLog(log, "") + +printLog(log, ">>> Create new version <<<") +newVersion = 1 +vstr = str(newVersion).zfill(6) +vpath = PatchmanBridgeServerDirectory + "/" + vstr +while os.path.exists(vpath): + newVersion = newVersion + 1 + vstr = str(newVersion).zfill(6) + vpath = PatchmanBridgeServerDirectory + "/" + vstr +mkPath(log, vpath) +for dir in archiveDirectories: + mkPath(log, ShardInstallDirectory + "/" + dir) + tgzPath = vpath + "/" + dir + ".tgz" + printLog(log, "WRITE " + tgzPath) + tar = tarfile.open(tgzPath, "w:gz") + tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) + tar.close() +printLog(log, "") + +log.close() +if os.path.isfile("c1_shard_patch.log"): + os.remove("c1_shard_patch.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_patch.log") +shutil.move("log.log", "c1_shard_patch.log") diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 8af27debf..861ea8bd0 100644 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -151,7 +151,7 @@ else: log.close() -if os.path.isfile("6_client_patch.log"): - os.remove("6_client_patch.log") +if os.path.isfile("d1_client_patch.log"): + os.remove("d1_client_patch.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_patch.log") -shutil.move("log.log", "6_client_patch.log") +shutil.move("log.log", "d1_client_patch.log") diff --git a/code/nel/tools/build_gamedata/d2_client_install.py b/code/nel/tools/build_gamedata/d2_client_install.py index 2555385da..26fc4f5c5 100644 --- a/code/nel/tools/build_gamedata/d2_client_install.py +++ b/code/nel/tools/build_gamedata/d2_client_install.py @@ -77,7 +77,7 @@ for category in InstallClientData: printLog(log, "") log.close() -if os.path.isfile("7_client_install.log"): - os.remove("7_client_install.log") +if os.path.isfile("d2_client_install.log"): + os.remove("d2_client_install.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_install.log") -shutil.move("log.log", "7_client_install.log") +shutil.move("log.log", "d2_client_install.log") diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index cebd81ce7..5d307fcf0 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -1,9 +1,9 @@ title Ryzom Core: 1_export.py (LEVELDESIGN) -1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign title Ryzom Core: 2_build.py (LEVELDESIGN) -2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign title Ryzom Core: 3_install.py (LEVELDESIGN) -3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language +3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign title Ryzom Core: b1_client_dev.py (LEVELDESIGN) b1_client_dev.py title Ryzom Core: b2_shard_data.py (LEVELDESIGN) From 11148004557b52629dba03a7a9f996eea7de7a26 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 03:13:30 +0100 Subject: [PATCH 066/138] Remove unnecessary cfg --- .../server/sheet_pack_cfg/ai_service.cfg | 256 --- .../sheet_pack_cfg/entities_game_service.cfg | 1803 ----------------- .../server/sheet_pack_cfg/gpm_service.cfg | 128 -- .../sheet_pack_cfg/input_output_service.cfg | 179 -- .../server/sheet_pack_cfg/mirror_service.cfg | 127 -- 5 files changed, 2493 deletions(-) delete mode 100644 code/ryzom/server/sheet_pack_cfg/ai_service.cfg delete mode 100644 code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg delete mode 100644 code/ryzom/server/sheet_pack_cfg/gpm_service.cfg delete mode 100644 code/ryzom/server/sheet_pack_cfg/input_output_service.cfg delete mode 100644 code/ryzom/server/sheet_pack_cfg/mirror_service.cfg diff --git a/code/ryzom/server/sheet_pack_cfg/ai_service.cfg b/code/ryzom/server/sheet_pack_cfg/ai_service.cfg deleted file mode 100644 index e5840cfff..000000000 --- a/code/ryzom/server/sheet_pack_cfg/ai_service.cfg +++ /dev/null @@ -1,256 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES = 1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/ai_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; -// link the common configuration file - -// a list of system command that run at server startup. -SystemCmd = {}; - - -////////////////////////////////////////////////////////////////////////////// -//- Basic (specific) heal profile parameters --------------------------------- -// Downtime for normal heal (on other bots of the group) -HealSpecificDowntime = 100; -// Downtime for self heal -HealSpecificDowntimeSelf = 100; -////////////////////////////////////////////////////////////////////////////// - - -// Enable caching of ligo primitive in binary files -CachePrims = 1; -// Log to see which primitives where loaded from cache -CachePrimsLog = 0; - - -// do not log the corrected position. -LogAcceptablePos = 0; -// do not log group creation failure -LogGroupCreationFailure = 0; -// do not log aliad tree owner construstion. -LogAliasTreeOwner = 0; -// do not log outpost info -LogOutpostDebug = 0; -// Speed factor, for debug purpose only. Don't set to high speed factor ! -SpeedFactor = 1; -// Speep up the timer triggering. Set a value between 1 (normal) and INT_MAX. -TimerSpeedUp = 1; - -// Default timer for wander behavior -DefaultWanderMinTimer = 50; // 5s -DefaultWanderMaxTimer = 100; // 10s - -// Fame and guard behavior -// Fame value under witch the guard attack the player in sigth -FameForGuardAttack = -450000; -// The minimum of fame for guard to help the player -FameForGuardHelp = -200000; - -// The default aggro distance for NPC -DefaultNpcAggroDist = 15; -// The default escort range for escort behavior -DefaultEscortRange = 10; - -// Limits for multi IA test -NbFaunaLimit = 25000; -NbNpcLimit = 10000; -NbFxLimit = 200; - -BotRepopFx = ""; - -PathsNoRecurse += -{ - "data_leveldesign/leveldesign/game_element/emotes" -}; - -TribeNamePath = "data_leveldesign/leveldesign/world_editor_files/families"; - -// GROUP KEYWORDS -// used mainly in event handlers to determine to which groups events apply -KeywordsGroupNpc = { - - "patrol", // a group of bots who guard a patrol route or point - "convoy", // a group with pack animals who follow roads from place to place - "with_players", // a group who may travel with players -}; - -// BOT KEYWORDS -// used mainly in npc_state_profile to determine which ai profiles to assign to which bots -KeywordsBotNpc = { - - "team_leader", // a bot who leads the way in front of their team (and acts as leader - // in discussion with players) - "animal_leader", // a bot who leads pack animals - "guard", // a bot who is a guard of some sort (eg karavan guard) - "emissary", // eg karavan emissary - "preacher", // eg kami preacher - "guardian", // typically kami guardians - "vip", // someone who has an escort of players or NPCs (assumed to be harmless) -}; - -// STATE KEYWORDS -// used mainly in event handlers to determine to which state events apply -// eg: when a player goes link dead if the team that this player is escorting -// is in a dangerous area the team may enter a 'protect ourselves and wait for -// players' punctual state -KeywordsStateNpc = { - - "safe", // eg the gathering point at town entrance - "dangerous", // eg a route through the wilds -}; - - -ColourNames = -{ - "red : 0", - "beige : 1", - "green : 2", - "turquoise : 3", - "blue : 4", - "violet : 5", - "white : 6", - "black : 7", - - "redHair: 0", - "blackHair: 1", - -}; - - -// Any primitive containing one of this word will not be loaded -PrimitiveFilter = -{ -// "dynfauna", -// "staticfauna", -}; - - - -////////////////////////////////////////////////////////////////////////////// -// Aggro // -////////////////////////////////////////////////////////////////////////////// -AggroReturnDistCheck = 15.0; -AggroReturnDistCheckFauna = 15.0; -AggroReturnDistCheckNpc = 1.5; -AggroD1Radius = 250.0; -AggroD2Radius = 150.0; -AggroPrimaryGroupDist = 0.0; -AggroPrimaryGroupCoef = 0.0; -AggroSecondaryGroupDist = 0.0; -AggroSecondaryGroupCoef = 0.0; -AggroPropagationRadius = 60.0; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS", "FEVIS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "VISION_DELTA", "FEIMPE", "FEVIS" }; -NegFiltersWarning += { "LNET", "FEHACK", "FERECV", "CT_LRC", "AnimalSpawned" }; - diff --git a/code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg b/code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg deleted file mode 100644 index 765eb289b..000000000 --- a/code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg +++ /dev/null @@ -1,1803 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES = 1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - - -Paths = -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse = -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/entities_game_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS", "CDB", "FAME" , "PDR:apply", "PDR:store" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "Register EId" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; -// link the common configuration file - -//min fraction of the total damage done on a creature that a group/player must do to be attributed a kill -KillAttribMinFactor = 0.3; - -//max bulk the player can transport * 1000 (*1000 to avoid float operations) -MaxPlayerBulk = 300000; -//max weight in grammes a player can have on him if his strength is 0 -BaseMaxCarriedWeight = 300000; - -// base bulk of player room -BasePlayerRoomBulk = 2000000; - -// if true, every player that was saved with an invalid position will be corrected the next times he logs in. -CorrectInvalidPlayerPositions = 1; - -// Create Character Start skills value -//CreateCharacterStartSkillsValue = "SCMM1BS:220:SMLOEFA:235:SFM1BMM:215:SKILL_POINTS:200:MONEY:1000"; -//CreateCharacterStartSkillsValue = "SM:20:SMA:50:SMAP:51:SMAE:51:SMT:50:SMTC:51:SMTM:51:SMTO:51:SKILL_POINTS:2550:MONEY:50000"; - - -// Enable caching of ligo primitive in binary files -CachePrims = 1; -// Log to see which primitives where loaded from cache -CachePrimsLog = 0; - -//************************************************************************************************************* -// variable for stop area effect of a gameplay system -//************************************************************************************************************* -FightAreaEffectOn = 1; -MagicAreaEffectOn = 1; -HarvestAreaEffectOn = 1; - -//************************************************************************************************************* -// save period time (ticks). -//************************************************************************************************************* -GuildSavePeriod = 100; -GuildChargeSavePeriod = 99; -GuildMaxMemberCount = 255; - -TickFrequencyPCSave = 4800; -// minimum period between 2 consecutive saves of the same character -MinPlayerSavePeriod = 600; - -StoreSavePeriod = 10; - -//************************************************************************************************************* -// Max duration of death panalty (when you death several times and only style one point in your characteristics due to death penalty -//************************************************************************************************************* -DeathPenaltyMaxDuration = 18000; // 10 ticks per second * 60 for minutes * 30 for 30 minutes // No more used. -DeathXPFactor = 0.1; -DeathXPResorptionTime = 20; - -//************************************************************************************************************* -// Duration of comma -//************************************************************************************************************* -CommaDelayBeforeDeath = 3000; // 10 ticks per second * 60 for minutes * 5 for 5 minutes - -//************************************************************************************************************* -// Duration of dead mektoub stay spawned -//************************************************************************************************************* -SpawnedDeadMektoubDelay = 2592000; // 10 ticks per second * 60 for minutes * 60 for hours * 24 for days * 3 for 3 days - -//************************************************************************************************************* -// Progression -//************************************************************************************************************* -SkillProgressionFactor = 1.0; - -SkillFightValueLimiter = 250; //skill value temporary limited for beta -SkillMagicValueLimiter = 250; //skill value temporary limited for beta -SkillCraftValueLimiter = 250; //skill value temporary limited for beta -SkillHarvestValueLimiter = 250; //skill value temporary limited for beta - -NBMeanCraftRawMaterials = 1; //Mean of raw material used for craft an item, it's used for scale xp win when crafting an item with effective raw material used - -// when in a team value of each member above one for XP division among team members -XPTeamMemberDivisorValue = 0.5; -// distance max for an action to be taken into account when in a team -MaxDistanceForXpGain = 110; -// Max XP gain by any one player on any creature (each team member can gain up to this value) -MaxXPGainPerPlayer = 30.0; - -//characteristic brick progression step -CharacteristicBrickStep = 5; - -//************************************************************************************************************* -// Magic parameters -//************************************************************************************************************* -DefaultCastingTime = 1.0; -RechargeMoneyFactor = 1.0; -CristalMoneyFactor = 1.0; - -// int in ticks for following values -NoLinkSurvivalAddTime = 100; -NoLinkTimeFear = 100; -NoLinkTimeSleep = 100; -NoLinkTimeStun = 100; -NoLinkTimeRoot = 100; -NoLinkTimeSnare = 100; -NoLinkTimeSlow = 100; -NoLinkTimeBlind = 100; -NoLinkTimeMadness = 100; -NoLinkTimeDot = 100; -PostCastLatency = 100; // in ticks - -TickFrequencyCompassUpdate = 32; - -// update period of link spell in ticks -UpdatePeriodFear = 40; -UpdatePeriodSleep = 40; -UpdatePeriodStun = 40; -UpdatePeriodRoot = 40; -UpdatePeriodSnare = 40; -UpdatePeriodSlow = 40; -UpdatePeriodBlind = 40; -UpdatePeriodMadness = 40; -UpdatePeriodDot = 40; -DefaultUpdatePeriod = 40; - -// bonus on resist for each received spell -ResistIncreaseFear = 10; -ResistIncreaseSleep = 10; -ResistIncreaseStun = 10; -ResistIncreaseRoot = 10; -ResistIncreaseSnare = 10; -ResistIncreaseSlow = 10; -ResistIncreaseBlind = 10; -ResistIncreaseMadness = 10; - -ResistIncreaseAcid = 0; -ResistIncreaseCold = 0; -ResistIncreaseElectricity= 0; -ResistIncreaseFire = 0; -ResistIncreasePoison = 0; -ResistIncreaseRot = 0; -ResistIncreaseShockwave = 0; - -//************************************************************************************************************* -// Craft parameters -//************************************************************************************************************* -//////////////// -// DURABILITY // some kind of HP -// melee weapons -DaggerDurability = 100.0; -SwordDurability = 100.0; -MaceDurability = 100.0; -AxeDurability = 100.0; -SpearDurability = 100.0; -StaffDurability = 100.0; -MagicianStaffDurability = 100.0; -TwoHandSwordDurability = 100.0; -TwoHandAxeDurability = 100.0; -PikeDurability = 100.0; -TwoHandMaceDurability = 100.0; -// range weapon -AutolauchDurability = 100.0; -BowrifleDurability = 100.0; -LauncherDurability = 100.0; -PistolDurability = 100.0; -BowpistolDurability = 100.0; -RifleDurability = 100.0; -HarpoonDurability = 100.0; -// ammo -AutolaunchAmmoDurability = 100.0; -BowrifleAmmoDurability = 100.0; -GrenadeAmmoDurability = 100.0; -LauncherAmmoDurability = 100.0; -PistolAmmoDurability = 100.0; -BowpistolAmmoDurability = 100.0; -RifleAmmoDurability = 100.0; -HarpoonAmmoDurability = 100.0; -// armor and shield -ShieldDurability = 100.0; -BucklerDurability = 100.0; -LightBootsDurability = 100.0; -LightGlovesDurability = 100.0; -LightPantsDurability = 100.0; -LightSleevesDurability = 100.0; -LightVestDurability = 100.0; -MediumBootsDurability = 100.0; -MediumGlovesDurability = 100.0; -MediumPantsDurability = 100.0; -MediumSleevesDurability = 100.0; -MediumVestDurability = 100.0; -HeavyBootsDurability = 100.0; -HeavyGlovesDurability = 100.0; -HeavyPantsDurability = 100.0; -HeavySleevesDurability = 100.0; -HeavyVestDurability = 100.0; -HeavyHelmetDurability = 100.0; -// jewel -AnkletDurability = 100.0; -BraceletDurability = 100.0; -DiademDurability = 100.0; -EaringDurability = 100.0; -PendantDurability = 100.0; -RingDurability = 100.0; -// tool -ForageToolDurability = 100.0; -AmmoCraftingToolDurability = 100.0; -ArmorCraftingToolDurability = 100.0; -JewelryCraftingToolDurability = 100.0; -RangeWeaponCraftingToolDurability = 100.0; -MeleeWeaponCraftingToolDurability = 100.0; -ToolCraftingToolDurability = 100.0; - -//////////// -// WEIGHT // (Max is *2) -// melee weapons -DaggerWeight = 1.0; // Dg Type (Pierce) -SwordWeight = 1.0; // 1H Type -MaceWeight = 1.0; // 1H Type -AxeWeight = 1.0; // 1H Type -SpearWeight = 1.0; // 1H Type (pierce) -StaffWeight = 1.0; // 1H Type -MagicianStaffWeight = 1.0; // 2H type -TwoHandSwordWeight = 1.0; // 2H Type -TwoHandAxeWeight = 1.0; // 2H Type -PikeWeight = 1.0; // 2H Type (pierce) -TwoHandMaceWeight = 1.0; // 2H Type -// range weapon -PistolWeight = 1.0; -BowpistolWeight = 1.0; -RifleWeight = 1.0; -BowrifleWeight = 1.0; -AutolauchWeight = 1.0; -LauncherWeight = 1.0; -HarpoonWeight = 1.0; -// ammo -PistolAmmoWeight = 1.0; -BowpistolAmmoWeight = 1.0; -RifleAmmoWeight = 1.0; -BowrifleAmmoWeight = 1.0; -AutolaunchAmmoWeight = 1.0; -LauncherAmmoWeight = 1.0; -HarpoonAmmoWeight = 1.0; -GrenadeAmmoWeight = 1.0; -// armor and shield -ShieldWeight = 1.0; -BucklerWeight = 1.0; -// Light -LightBootsWeight = 1.0; -LightGlovesWeight = 1.0; -LightPantsWeight = 1.0; -LightSleevesWeight = 1.0; -LightVestWeight = 1.0; -// Medium -MediumBootsWeight = 1.0; -MediumGlovesWeight = 1.0; -MediumPantsWeight = 1.0; -MediumSleevesWeight = 1.0; -MediumVestWeight = 1.0; -// Heavy -HeavyBootsWeight = 1.0; -HeavyGlovesWeight = 1.0; -HeavyPantsWeight = 1.0; -HeavySleevesWeight = 1.0; -HeavyVestWeight = 1.0; -HeavyHelmetWeight = 1.0; -// jewel -AnkletWeight = 1.0; -BraceletWeight = 1.0; -DiademWeight = 1.0; -EaringWeight = 1.0; -PendantWeight = 1.0; -RingWeight = 1.0; -////////////// -// SAP LOAD // -// MIN -// melee weapons -DaggerSapLoad = 0.0; -SwordSapLoad = 0.0; -MaceSapLoad = 0.0; -AxeSapLoad = 0.0; -SpearSapLoad = 0.0; -StaffSapLoad = 0.0; -MagicianStaffSapLoad = 0.0; -TwoHandSwordSapLoad = 0.0; -TwoHandAxeSapLoad = 0.0; -PikeSapLoad = 0.0; -TwoHandMaceSapLoad = 0.0; -// range weapon -AutolauchSapLoad = 0.0; -BowrifleSapLoad = 0.0; -LauncherSapLoad = 0.0; -PistolSapLoad = 0.0; -BowpistolSapLoad = 0.0; -RifleSapLoad = 0.0; -HarpoonSapLoad = 0.0; -// ammo -AutolaunchAmmoSapLoad = 0.0; -BowrifleAmmoSapLoad = 0.0; -GrenadeAmmoSapLoad = 0.0; -LauncherAmmoSapLoad = 0.0; -PistolAmmoSapLoad = 0.0; -BowpistolAmmoSapLoad = 0.0; -RifleAmmoSapLoad = 0.0; -HarpoonAmmoSapLoad = 0.0; -// armor and shield -ShieldSapLoad = 0.0; -BucklerSapLoad = 0.0; -LightBootsSapLoad = 0.0; -LightGlovesSapLoad = 0.0; -LightPantsSapLoad = 0.0; -LightSleevesSapLoad = 0.0; -LightVestSapLoad = 0.0; -MediumBootsSapLoad = 0.0; -MediumGlovesSapLoad = 0.0; -MediumPantsSapLoad = 0.0; -MediumSleevesSapLoad = 0.0; -MediumVestSapLoad = 0.0; -HeavyBootsSapLoad = 0.0; -HeavyGlovesSapLoad = 0.0; -HeavyPantsSapLoad = 0.0; -HeavySleevesSapLoad = 0.0; -HeavyVestSapLoad = 0.0; -HeavyHelmetSapLoad = 0.0; -// jewel -AnkletSapLoad = 0.0; -BraceletSapLoad = 0.0; -DiademSapLoad = 0.0; -EaringSapLoad = 0.0; -PendantSapLoad = 0.0; -RingSapLoad = 0.0; -// MAX -// melee weapons -DaggerSapLoadMax = 1000.0; -SwordSapLoadMax = 1000.0; -MaceSapLoadMax = 1000.0; -AxeSapLoadMax = 1000.0; -SpearSapLoadMax = 1000.0; -StaffSapLoadMax = 1000.0; -MagicianStaffSapLoadMax = 1000.0; -TwoHandSwordSapLoadMax = 1000.0; -TwoHandAxeSapLoadMax = 1000.0; -PikeSapLoadMax = 1000.0; -TwoHandMaceSapLoadMax = 1000.0; -// range weapon -AutolauchSapLoadMax = 1000.0; -BowrifleSapLoadMax = 1000.0; -LauncherSapLoadMax = 1000.0; -PistolSapLoadMax = 1000.0; -BowpistolSapLoadMax = 1000.0; -RifleSapLoadMax = 1000.0; -HarpoonSapLoadMax = 1000.0; -// ammo -AutolaunchAmmoSapLoadMax = 1000.0; -BowrifleAmmoSapLoadMax = 1000.0; -GrenadeAmmoSapLoadMax = 1000.0; -LauncherAmmoSapLoadMax = 1000.0; -PistolAmmoSapLoadMax = 1000.0; -BowpistolAmmoSapLoadMax = 1000.0; -RifleAmmoSapLoadMax = 1000.0; -HarpoonAmmoSapLoadMax = 1000.0; -// armor and shield -ShieldSapLoadMax = 1000.0; -BucklerSapLoadMax = 1000.0; -LightBootsSapLoadMax = 1000.0; -LightGlovesSapLoadMax = 1000.0; -LightPantsSapLoadMax = 1000.0; -LightSleevesSapLoadMax = 1000.0; -LightVestSapLoadMax = 1000.0; -MediumBootsSapLoadMax = 1000.0; -MediumGlovesSapLoadMax = 1000.0; -MediumPantsSapLoadMax = 1000.0; -MediumSleevesSapLoadMax = 1000.0; -MediumVestSapLoadMax = 1000.0; -HeavyBootsSapLoadMax = 1000.0; -HeavyGlovesSapLoadMax = 1000.0; -HeavyPantsSapLoadMax = 1000.0; -HeavySleevesSapLoadMax = 1000.0; -HeavyVestSapLoadMax = 1000.0; -HeavyHelmetSapLoadMax = 1000.0; -// jewel -AnkletSapLoadMax = 1000.0; -BraceletSapLoadMax = 1000.0; -DiademSapLoadMax = 1000.0; -EaringSapLoadMax = 1000.0; -PendantSapLoadMax = 1000.0; -RingSapLoadMax = 1000.0; -//////////// -// DAMAGE Min -// melee weapons -DaggerDmg = 1.0; // Dg Type (Pierce) -StaffDmg = 1.0; // 1H Type -SwordDmg = 1.0; // 1H Type -MaceDmg = 1.0; // 1H Type -AxeDmg = 1.0; // 1H Type -SpearDmg = 1.0; // 1H Type (pierce) -TwoHandSwordDmg = 1.0; // 2H Type -TwoHandAxeDmg = 1.0; // 2H Type -PikeDmg = 1.0; // 2H Type (pierce) -TwoHandMaceDmg = 1.0; // 2H Type -MagicianStaffDmg = 1.0; // 2H Type -// range weapon (modifier) -PistolDmg = 0.0; -BowpistolDmg = 0.0; -RifleDmg = 0.0; -BowrifleDmg = 0.0; -AutolauchDmg = 0.0; -LauncherDmg = 0.0; -HarpoonDmg = 0.0; -// ammo -PistolAmmoDmg = 1.0; -BowpistolAmmoDmg = 1.0; -RifleAmmoDmg = 1.0; -BowrifleAmmoDmg = 1.0; -AutolaunchAmmoDmg = 1.0; -LauncherAmmoDmg = 1.0; -HarpoonAmmoDmg = 1.0; -GrenadeAmmoDmg = 1.0; -// DAMAGE Max -// melee weapons -DaggerDmgMax = 1.0; // Dg Type (Pierce) -StaffDmgMax = 1.0; // 1H Type -SwordDmgMax = 1.0; // 1H Type -MaceDmgMax = 1.0; // 1H Type -AxeDmgMax = 1.0; // 1H Type -SpearDmgMax = 1.0; // 1H Type (pierce) -TwoHandSwordDmgMax = 1.0; // 2H Type -TwoHandAxeDmgMax = 1.0; // 2H Type -PikeDmgMax = 1.0; // 2H Type (pierce) -TwoHandMaceDmgMax = 1.0; // 2H Type -MagicianStaffDmgMax = 1.0; -// range weapon (modifier) -AutolauchDmgMax = 0.0; -BowrifleDmgMax = 0.0; -LauncherDmgMax = 0.0; -PistolDmgMax = 0.0; -BowpistolDmgMax = 0.0; -RifleDmgMax = 0.0; -HarpoonDmgMax = 0.0; -// ammo -PistolAmmoDmgMax = 1.0; -BowpistolAmmoDmgMax = 1.0; -RifleAmmoDmgMax = 1.0; -BowrifleAmmoDmgMax = 1.0; -AutolaunchAmmoDmgMax = 1.0; -LauncherAmmoDmgMax = 1.0; -HarpoonAmmoDmgMax = 1.0; -GrenadeAmmoDmgMax = 1.0; - -////////////// -// HIT RATE // Hits for 10 sec -// melee weapons -DaggerHitRate = 1.0; // Dg Type (Pierce) -StaffHitRate = 1.0; // 1H Type (blunt) -SwordHitRate = 1.0; // 1H Type -MaceHitRate = 1.0; // 1H Type -AxeHitRate = 1.0; // 1H Type -SpearHitRate = 1.0; // 1H Type (pierce) -TwoHandSwordHitRate = 1.0; // 2H Type -TwoHandAxeHitRate = 1.0; // 2H Type -PikeHitRate = 1.0; // 2H Type (pierce) -TwoHandMaceHitRate = 1.0; // 2H Type -MagicianStaffHitRate = 1.0; // -// range weapon -PistolHitRate = 1.0; -BowpistolHitRate = 1.0; -RifleHitRate = 1.0; -BowrifleHitRate = 1.0; -AutolauchHitRate = 1.0; -LauncherHitRate = 1.0; -HarpoonHitRate = 1.0; -// ammo (modifier) -AutolaunchAmmoHitRate = 0.0; -BowrifleAmmoHitRate = 0.0; -GrenadeAmmoHitRate = 0.0; -LauncherAmmoHitRate = 0.0; -PistolAmmoHitRate = 0.0; -BowpistolAmmoHitRate = 0.0; -RifleAmmoHitRate = 0.0; -HarpoonAmmoHitRate = 0.0; - -////////////// -// Maximum hit rate ( after crafted item parameters applications ) -// melee weapons -DaggerHitRateMax = 10.0; -StaffHitRateMax = 10.0; // 1H Type (blunt) -SwordHitRateMax = 10.0; -MaceHitRateMax = 10.0; -AxeHitRateMax = 10.0; -SpearHitRateMax = 10.0; -TwoHandSwordHitRateMax = 10.0; -TwoHandAxeHitRateMax = 10.0; -PikeHitRateMax = 10.0; -TwoHandMaceHitRateMax = 10.0; -MagicianStaffHitRateMax = 10.0; -// range weapon -PistolHitRateMax = 1.0; -BowpistolHitRateMax = 1.0; -RifleHitRateMax = 1.0; -BowrifleHitRateMax = 1.0; -AutolauchHitRateMax = 1.0; -LauncherHitRateMax = 1.0; -HarpoonHitRateMax = 1.0; -// ammo -AutolaunchAmmoHitRateMax = 0.0; -BowrifleAmmoHitRateMax = 0.0; -GrenadeAmmoHitRateMax = 0.0; -LauncherAmmoHitRateMax = 0.0; -PistolAmmoHitRateMax = 0.0; -BowpistolAmmoHitRateMax = 0.0; -RifleAmmoHitRateMax = 0.0; -HarpoonAmmoHitRateMax = 0.0; - - -/////////// -// Range // for ammo, range weapon (modifier) (max = *2) -// range weapon -AutolauchRange = 10000.0; // Gat -BowrifleRange = 10000.0; -LauncherRange = 10000.0; // Rocket Launcher -PistolRange = 10000.0; -BowpistolRange = 10000.0; -RifleRange = 10000.0; -HarpoonRange = 10000.0; -// ammo -AutolaunchAmmoRange = 0.0; -BowrifleAmmoRange = 0.0; -GrenadeAmmoRange = 0.0; -LauncherAmmoRange = 0.0; -PistolAmmoRange = 0.0; -BowpistolAmmoRange = 0.0; -RifleAmmoRange = 0.0; -HarpoonAmmoRange = 0.0; -//////////////////// -// DODGE MODIFIER // not for ammo and jewel, but for armor too -// melee weapons & armor -DaggerDodgeMinModifier = 0.0; -DaggerDodgeMaxModifier = 0.0; -SwordDodgeMinModifier = 0.0; -SwordDodgeMaxModifier = 0.0; -MaceDodgeMinModifier = 0.0; -MaceDodgeMaxModifier = 0.0; -AxeDodgeMinModifier = 0.0; -AxeDodgeMaxModifier = 0.0; -SpearDodgeMinModifier = 0.0; -SpearDodgeMaxModifier = 0.0; -StaffDodgeMinModifier = 0.0; -StaffDodgeMaxModifier = 0.0; -TwoHandSwordDodgeMinModifier = 0.0; -TwoHandSwordDodgeMaxModifier = 0.0; -TwoHandAxeDodgeMinModifier = 0.0; -TwoHandAxeDodgeMaxModifier = 0.0; -PikeDodgeMinModifier = 0.0; -PikeDodgeMaxModifier = 0.0; -TwoHandMaceDodgeMinModifier = 0.0; -TwoHandMaceDodgeMaxModifier = 0.0; -MagicianStaffDodgeMinModifier = 0.0; -MagicianStaffDodgeMaxModifier = 0.0; -// range weapon -AutolauchDodgeMinModifier = 0.0; -AutolauchDodgeMaxModifier = 0.0; -BowrifleDodgeMinModifier = 0.0; -BowrifleDodgeMaxModifier = 0.0; -LauncherDodgeMinModifier = 0.0; -LauncherDodgeMaxModifier = 0.0; -PistolDodgeMinModifier = 0.0; -PistolDodgeMaxModifier = 0.0; -BowpistolDodgeMinModifier = 0.0; -BowpistolDodgeMaxModifier = 0.0; -RifleDodgeMinModifier = 0.0; -RifleDodgeMaxModifier = 0.0; -HarpoonDodgeMinModifier = 0.0; -HarpoonDodgeMaxModifier = 0.0; -// armor and shield -ShieldDodgeMinModifier = 0.0; -ShieldDodgeMaxModifier = 0.0; -BucklerDodgeMinModifier = 0.0; -BucklerDodgeMaxModifier = 0.0; -LightBootsDodgeMinModifier = 0.0; -LightBootsDodgeMaxModifier = 0.0; -LightGlovesDodgeMinModifier = 0.0; -LightGlovesDodgeMaxModifier = 0.0; -LightPantsDodgeMinModifier = 0.0; -LightPantsDodgeMaxModifier = 0.0; -LightSleevesDodgeMinModifier = 0.0; -LightSleevesDodgeMaxModifier = 0.0; -LightVestDodgeMinModifier = 0.0; -LightVestDodgeMaxModifier = 0.0; -MediumBootsDodgeMinModifier = 0.0; -MediumBootsDodgeMaxModifier = 0.0; -MediumGlovesDodgeMinModifier = 0.0; -MediumGlovesDodgeMaxModifier = 0.0; -MediumPantsDodgeMinModifier = 0.0; -MediumPantsDodgeMaxModifier = 0.0; -MediumSleevesDodgeMinModifier = 0.0; -MediumSleevesDodgeMaxModifier = 0.0; -MediumVestDodgeMinModifier = 0.0; -MediumVestDodgeMaxModifier = 0.0; -HeavyBootsDodgeMinModifier = 0.0; -HeavyBootsDodgeMaxModifier = 0.0; -HeavyGlovesDodgeMinModifier = 0.0; -HeavyGlovesDodgeMaxModifier = 0.0; -HeavyPantsDodgeMinModifier = 0.0; -HeavyPantsDodgeMaxModifier = 0.0; -HeavySleevesDodgeMinModifier = 0.0; -HeavySleevesDodgeMaxModifier = 0.0; -HeavyVestDodgeMinModifier = 0.0; -HeavyVestDodgeMaxModifier = 0.0; -HeavyHelmetDodgeMinModifier = 0.0; -HeavyHelmetDodgeMaxModifier = 0.0; -//////////////////// -// PARRY MODIFIER // not for ammo and jewel, but for armor too -// melee weapons -DaggerParryMinModifier = 0.0; -DaggerParryMaxModifier = 0.0; -SwordParryMinModifier = 0.0; -SwordParryMaxModifier = 0.0; -MaceParryMinModifier = 0.0; -MaceParryMaxModifier = 0.0; -AxeParryMinModifier = 0.0; -AxeParryMaxModifier = 0.0; -SpearParryMinModifier = 0.0; -SpearParryMaxModifier = 0.0; -StaffParryMinModifier = 0.0; -StaffParryMaxModifier = 0.0; -TwoHandSwordParryMinModifier = 0.0; -TwoHandSwordParryMaxModifier = 0.0; -TwoHandAxeParryMinModifier = 0.0; -TwoHandAxeParryMaxModifier = 0.0; -PikeParryMinModifier = 0.0; -PikeParryMaxModifier = 0.0; -TwoHandMaceParryMinModifier = 0.0; -TwoHandMaceParryMaxModifier = 0.0; -MagicianStaffParryMinModifier = 0.0; -MagicianStaffParryMaxModifier = 0.0; -// range weapon -AutolauchParryMinModifier = 0.0; -AutolauchParryMaxModifier = 0.0; -BowrifleParryMinModifier = 0.0; -BowrifleParryMaxModifier = 0.0; -LauncherParryMinModifier = 0.0; -LauncherParryMaxModifier = 0.0; -PistolParryMinModifier = 0.0; -PistolParryMaxModifier = 0.0; -BowpistolParryMinModifier = 0.0; -BowpistolParryMaxModifier = 0.0; -RifleParryMinModifier = 0.0; -RifleParryMaxModifier = 0.0; -HarpoonParryMinModifier = 0.0; -HarpoonParryMaxModifier = 0.0; -// armor and shield -ShieldParryMinModifier = 0.0; -ShieldParryMaxModifier = 0.0; -BucklerParryMinModifier = 0.0; -BucklerParryMaxModifier = 0.0; -LightBootsParryMinModifier = 0.0; -LightBootsParryMaxModifier = 0.0; -LightGlovesParryMinModifier = 0.0; -LightGlovesParryMaxModifier = 0.0; -LightPantsParryMinModifier = 0.0; -LightPantsParryMaxModifier = 0.0; -LightSleevesParryMinModifier = 0.0; -LightSleevesParryMaxModifier = 0.0; -LightVestParryMinModifier = 0.0; -LightVestParryMaxModifier = 0.0; -MediumBootsParryMinModifier = 0.0; -MediumBootsParryMaxModifier = 0.0; -MediumGlovesParryMinModifier = 0.0; -MediumGlovesParryMaxModifier = 0.0; -MediumPantsParryMinModifier = 0.0; -MediumPantsParryMaxModifier = 0.0; -MediumSleevesParryMinModifier = 0.0; -MediumSleevesParryMaxModifier = 0.0; -MediumVestParryMinModifier = 0.0; -MediumVestParryMaxModifier = 0.0; -HeavyBootsParryMinModifier = 0.0; -HeavyBootsParryMaxModifier = 0.0; -HeavyGlovesParryMinModifier = 0.0; -HeavyGlovesParryMaxModifier = 0.0; -HeavyPantsParryMinModifier = 0.0; -HeavyPantsParryMaxModifier = 0.0; -HeavySleevesParryMinModifier = 0.0; -HeavySleevesParryMaxModifier = 0.0; -HeavyVestParryMinModifier = 0.0; -HeavyVestParryMaxModifier = 0.0; -HeavyHelmetParryMinModifier = 0.0; -HeavyHelmetParryMaxModifier = 0.0; -////////////////////////////// -// ADVERSARY DODGE MODIFIER // not for ammo, jewel and armor -// melee weapons -DaggerAdversaryDodgeMinModifier = 0.0; -DaggerAdversaryDodgeMaxModifier = 0.0; -SwordAdversaryDodgeMinModifier = 0.0; -SwordAdversaryDodgeMaxModifier = 0.0; -MaceAdversaryDodgeMinModifier = 0.0; -MaceAdversaryDodgeMaxModifier = 0.0; -AxeAdversaryDodgeMinModifier = 0.0; -AxeAdversaryDodgeMaxModifier = 0.0; -SpearAdversaryDodgeMinModifier = 0.0; -SpearAdversaryDodgeMaxModifier = 0.0; -StaffAdversaryDodgeMinModifier = 0.0; -StaffAdversaryDodgeMaxModifier = 0.0; -TwoHandSwordAdversaryDodgeMinModifier = 0.0; -TwoHandSwordAdversaryDodgeMaxModifier = 0.0; -TwoHandAxeAdversaryDodgeMinModifier = 0.0; -TwoHandAxeAdversaryDodgeMaxModifier = 0.0; -PikeAdversaryDodgeMinModifier = 0.0; -PikeAdversaryDodgeMaxModifier = 0.0; -TwoHandMaceAdversaryDodgeMinModifier = 0.0; -TwoHandMaceAdversaryDodgeMaxModifier = 0.0; -MagicianStaffAdversaryDodgeMinModifier = 0.0; -MagicianStaffAdversaryDodgeMaxModifier = 0.0; -// range weapon -AutolauchAdversaryDodgeMinModifier = 0.0; -AutolauchAdversaryDodgeMaxModifier = 0.0; -BowrifleAdversaryDodgeMinModifier = 0.0; -BowrifleAdversaryDodgeMaxModifier = 0.0; -LauncherAdversaryDodgeMinModifier = 0.0; -LauncherAdversaryDodgeMaxModifier = 0.0; -PistolAdversaryDodgeMinModifier = 0.0; -PistolAdversaryDodgeMaxModifier = 0.0; -BowpistolAdversaryDodgeMinModifier = 0.0; -BowpistolAdversaryDodgeMaxModifier = 0.0; -RifleAdversaryDodgeMinModifier = 0.0; -RifleAdversaryDodgeMaxModifier = 0.0; -HarpoonAdversaryDodgeMinModifier = 0.0; -HarpoonAdversaryDodgeMaxModifier = 0.0; -////////////////////////////// -// ADVERSARY PARRY MODIFIER // not for ammo, jewel and armor -// melee weapons -DaggerAdversaryParryMinModifier = 0.0; -DaggerAdversaryParryMaxModifier = 0.0; -SwordAdversaryParryMinModifier = 0.0; -SwordAdversaryParryMaxModifier = 0.0; -MaceAdversaryParryMinModifier = 0.0; -MaceAdversaryParryMaxModifier = 0.0; -AxeAdversaryParryMinModifier = 0.0; -AxeAdversaryParryMaxModifier = 0.0; -SpearAdversaryParryMinModifier = 0.0; -SpearAdversaryParryMaxModifier = 0.0; -StaffAdversaryParryMinModifier = 0.0; -StaffAdversaryParryMaxModifier = 0.0; -TwoHandSwordAdversaryParryMinModifier = 0.0; -TwoHandSwordAdversaryParryMaxModifier = 0.0; -TwoHandAxeAdversaryParryMinModifier = 0.0; -TwoHandAxeAdversaryParryMaxModifier = 0.0; -PikeAdversaryParryMinModifier = 0.0; -PikeAdversaryParryMaxModifier = 0.0; -TwoHandMaceAdversaryParryMinModifier = 0.0; -TwoHandMaceAdversaryParryMaxModifier = 0.0; -MagicianStaffAdversaryParryMinModifier = 0.0; -MagicianStaffAdversaryParryMaxModifier = 0.0; -// range weapon -AutolauchAdversaryParryMinModifier = 0.0; -AutolauchAdversaryParryMaxModifier = 0.0; -BowrifleAdversaryParryMinModifier = 0.0; -BowrifleAdversaryParryMaxModifier = 0.0; -LauncherAdversaryParryMinModifier = 0.0; -LauncherAdversaryParryMaxModifier = 0.0; -PistolAdversaryParryMinModifier = 0.0; -PistolAdversaryParryMaxModifier = 0.0; -BowpistolAdversaryParryMinModifier = 0.0; -BowpistolAdversaryParryMaxModifier = 0.0; -RifleAdversaryParryMinModifier = 0.0; -RifleAdversaryParryMaxModifier = 0.0; -HarpoonAdversaryParryMinModifier = 0.0; -HarpoonAdversaryParryMaxModifier = 0.0; - -////////////////////////////// -// Cast Modifiers // for melee weapons -//Elemental casting time factor (melee weapon only) -// Min -DaggerElementalCastingTimeFactor = 0.0; -SwordElementalCastingTimeFactor = 0.0; -AxeElementalCastingTimeFactor = 0.0; -MaceElementalCastingTimeFactor = 0.0; -SpearElementalCastingTimeFactor = 0.0; -StaffElementalCastingTimeFactor = 0.0; -MagicianStaffElementalCastingTimeFactor = 0.0; -TwoHandAxeElementalCastingTimeFactor = 0.0; -TwoHandSwordElementalCastingTimeFactor = 0.0; -PikeElementalCastingTimeFactor = 0.0; -TwoHandMaceElementalCastingTimeFactor = 0.0; -// max -DaggerElementalCastingTimeFactorMax = 1.0; -SwordElementalCastingTimeFactorMax = 1.0; -AxeElementalCastingTimeFactorMax = 1.0; -MaceElementalCastingTimeFactorMax = 1.0; -SpearElementalCastingTimeFactorMax = 1.0; -StaffElementalCastingTimeFactorMax = 1.0; -MagicianStaffElementalCastingTimeFactorMax = 1.0; -TwoHandAxeElementalCastingTimeFactorMax = 1.0; -TwoHandSwordElementalCastingTimeFactorMax = 1.0; -PikeElementalCastingTimeFactorMax = 1.0; -TwoHandMaceElementalCastingTimeFactorMax = 1.0; - -//Elemental power factor (melee weapon only) -// Min -DaggerElementalPowerFactor = 0.0; -SwordElementalPowerFactor = 0.0; -AxeElementalPowerFactor = 0.0; -MaceElementalPowerFactor = 0.0; -SpearElementalPowerFactor = 0.0; -StaffElementalPowerFactor = 0.0; -MagicianStaffElementalPowerFactor = 0.2; -TwoHandAxeElementalPowerFactor = 0.0; -TwoHandSwordElementalPowerFactor = 0.0; -PikeElementalPowerFactor = 0.0; -TwoHandMaceElementalPowerFactor = 0.0; -// Max -DaggerElementalPowerFactorMax = 1.0; -SwordElementalPowerFactorMax = 1.0; -AxeElementalPowerFactorMax = 1.0; -MaceElementalPowerFactorMax = 1.0; -SpearElementalPowerFactorMax = 1.0; -StaffElementalPowerFactorMax = 1.0; -MagicianStaffElementalPowerFactorMax = 1.0; -TwoHandAxeElementalPowerFactorMax = 1.0; -TwoHandSwordElementalPowerFactorMax = 1.0; -PikeElementalPowerFactorMax = 1.0; -TwoHandMaceElementalPowerFactorMax = 1.0; - -//OffensiveAffliction casting time factor (melee weapon only) -// Min -DaggerOffensiveAfflictionCastingTimeFactor = 0.0; -SwordOffensiveAfflictionCastingTimeFactor = 0.0; -AxeOffensiveAfflictionCastingTimeFactor = 0.0; -MaceOffensiveAfflictionCastingTimeFactor = 0.0; -SpearOffensiveAfflictionCastingTimeFactor = 0.0; -StaffOffensiveAfflictionCastingTimeFactor = 0.0; -MagicianStaffOffensiveAfflictionCastingTimeFactor = 0.2; -TwoHandAxeOffensiveAfflictionCastingTimeFactor = 0.0; -TwoHandSwordOffensiveAfflictionCastingTimeFactor = 0.0; -PikeOffensiveAfflictionCastingTimeFactor = 0.0; -TwoHandMaceOffensiveAfflictionCastingTimeFactor = 0.0; -// Max -DaggerOffensiveAfflictionCastingTimeFactorMax = 1.0; -SwordOffensiveAfflictionCastingTimeFactorMax = 1.0; -AxeOffensiveAfflictionCastingTimeFactorMax = 1.0; -MaceOffensiveAfflictionCastingTimeFactorMax = 1.0; -SpearOffensiveAfflictionCastingTimeFactorMax = 1.0; -StaffOffensiveAfflictionCastingTimeFactorMax = 1.0; -MagicianStaffOffensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandAxeOffensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandSwordOffensiveAfflictionCastingTimeFactorMax = 1.0; -PikeOffensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandMaceOffensiveAfflictionCastingTimeFactorMax = 1.0; - -//OffensiveAffliction power factor (melee weapon only) -// Min -DaggerOffensiveAfflictionPowerFactor = 0.0; -SwordOffensiveAfflictionPowerFactor = 0.0; -AxeOffensiveAfflictionPowerFactor = 0.0; -MaceOffensiveAfflictionPowerFactor = 0.0; -SpearOffensiveAfflictionPowerFactor = 0.0; -StaffOffensiveAfflictionPowerFactor = 0.0; -MagicianStaffOffensiveAfflictionPowerFactor = 0.0; -TwoHandAxeOffensiveAfflictionPowerFactor = 0.0; -TwoHandSwordOffensiveAfflictionPowerFactor = 0.0; -PikeOffensiveAfflictionPowerFactor = 0.0; -TwoHandMaceOffensiveAfflictionPowerFactor = 0.0; -// Max -DaggerOffensiveAfflictionPowerFactorMax = 1.0; -SwordOffensiveAfflictionPowerFactorMax = 1.0; -AxeOffensiveAfflictionPowerFactorMax = 1.0; -MaceOffensiveAfflictionPowerFactorMax = 1.0; -SpearOffensiveAfflictionPowerFactorMax = 1.0; -StaffOffensiveAfflictionPowerFactorMax = 1.0; -MagicianStaffOffensiveAfflictionPowerFactorMax = 1.0; -TwoHandAxeOffensiveAfflictionPowerFactorMax = 1.0; -TwoHandSwordOffensiveAfflictionPowerFactorMax = 1.0; -PikeOffensiveAfflictionPowerFactorMax = 1.0; -TwoHandMaceOffensiveAfflictionPowerFactorMax = 1.0; - -//Heal casting time factor (melee weapon only) -// Min -DaggerHealCastingTimeFactor = 0.0; -SwordHealCastingTimeFactor = 0.0; -AxeHealCastingTimeFactor = 0.0; -MaceHealCastingTimeFactor = 0.0; -SpearHealCastingTimeFactor = 0.0; -StaffHealCastingTimeFactor = 0.0; -MagicianStaffHealCastingTimeFactor = 0.0; -TwoHandAxeHealCastingTimeFactor = 0.0; -TwoHandSwordHealCastingTimeFactor = 0.0; -PikeHealCastingTimeFactor = 0.0; -TwoHandMaceHealCastingTimeFactor = 0.0; -// Max -DaggerHealCastingTimeFactorMax = 1.0; -SwordHealCastingTimeFactorMax = 1.0; -AxeHealCastingTimeFactorMax = 1.0; -MaceHealCastingTimeFactorMax = 1.0; -SpearHealCastingTimeFactorMax = 1.0; -StaffHealCastingTimeFactorMax = 1.0; -MagicianStaffHealCastingTimeFactorMax = 1.0; -TwoHandAxeHealCastingTimeFactorMax = 1.0; -TwoHandSwordHealCastingTimeFactorMax = 1.0; -PikeHealCastingTimeFactorMax = 1.0; -TwoHandMaceHealCastingTimeFactorMax = 1.0; - -//Heal power factor (melee weapon only) -// Min -DaggerHealPowerFactor = 0.0; -SwordHealPowerFactor = 0.0; -AxeHealPowerFactor = 0.0; -MaceHealPowerFactor = 0.0; -SpearHealPowerFactor = 0.0; -StaffHealPowerFactor = 0.0; -MagicianStaffHealPowerFactor = 0.0; -TwoHandAxeHealPowerFactor = 0.0; -TwoHandSwordHealPowerFactor = 0.0; -PikeHealPowerFactor = 0.0; -TwoHandMaceHealPowerFactor = 0.0; -// Max -DaggerHealPowerFactorMax = 1.0; -SwordHealPowerFactorMax = 1.0; -AxeHealPowerFactorMax = 1.0; -MaceHealPowerFactorMax = 1.0; -SpearHealPowerFactorMax = 1.0; -StaffHealPowerFactorMax = 1.0; -MagicianStaffHealPowerFactorMax = 1.0; -TwoHandAxeHealPowerFactorMax = 1.0; -TwoHandSwordHealPowerFactorMax = 1.0; -PikeHealPowerFactorMax = 1.0; -TwoHandMaceHealPowerFactorMax = 1.0; - -//DefensiveAffliction casting time factor (melee weapon only) -// Min -DaggerDefensiveAfflictionCastingTimeFactor = 0.0; -SwordDefensiveAfflictionCastingTimeFactor = 0.0; -AxeDefensiveAfflictionCastingTimeFactor = 0.0; -MaceDefensiveAfflictionCastingTimeFactor = 0.0; -SpearDefensiveAfflictionCastingTimeFactor = 0.0; -StaffDefensiveAfflictionCastingTimeFactor = 0.0; -MagicianStaffDefensiveAfflictionCastingTimeFactor = 0.0; -TwoHandAxeDefensiveAfflictionCastingTimeFactor = 0.0; -TwoHandSwordDefensiveAfflictionCastingTimeFactor = 0.0; -PikeDefensiveAfflictionCastingTimeFactor = 0.0; -TwoHandMaceDefensiveAfflictionCastingTimeFactor = 0.0; -// Max -DaggerDefensiveAfflictionCastingTimeFactorMax = 1.0; -SwordDefensiveAfflictionCastingTimeFactorMax = 1.0; -AxeDefensiveAfflictionCastingTimeFactorMax = 1.0; -MaceDefensiveAfflictionCastingTimeFactorMax = 1.0; -SpearDefensiveAfflictionCastingTimeFactorMax = 1.0; -StaffDefensiveAfflictionCastingTimeFactorMax = 1.0; -MagicianStaffDefensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandAxeDefensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandSwordDefensiveAfflictionCastingTimeFactorMax = 1.0; -PikeDefensiveAfflictionCastingTimeFactorMax = 1.0; -TwoHandMaceDefensiveAfflictionCastingTimeFactorMax = 1.0; - -//DefensiveAffliction power factor (melee weapon only) -// Min -DaggerDefensiveAfflictionPowerFactor = 0.0; -SwordDefensiveAfflictionPowerFactor = 0.0; -AxeDefensiveAfflictionPowerFactor = 0.0; -MaceDefensiveAfflictionPowerFactor = 0.0; -SpearDefensiveAfflictionPowerFactor = 0.0; -StaffDefensiveAfflictionPowerFactor = 0.0; -MagicianStaffDefensiveAfflictionPowerFactor = 0.0; -TwoHandAxeDefensiveAfflictionPowerFactor = 0.0; -TwoHandSwordDefensiveAfflictionPowerFactor = 0.0; -PikeDefensiveAfflictionPowerFactor = 0.0; -TwoHandMaceDefensiveAfflictionPowerFactor = 0.0; -// Max -DaggerDefensiveAfflictionPowerFactorMax = 1.0; -SwordDefensiveAfflictionPowerFactorMax = 1.0; -AxeDefensiveAfflictionPowerFactorMax = 1.0; -MaceDefensiveAfflictionPowerFactorMax = 1.0; -SpearDefensiveAfflictionPowerFactorMax = 1.0; -StaffDefensiveAfflictionPowerFactorMax = 1.0; -MagicianStaffDefensiveAfflictionPowerFactorMax = 1.0; -TwoHandAxeDefensiveAfflictionPowerFactorMax = 1.0; -TwoHandSwordDefensiveAfflictionPowerFactorMax = 1.0; -PikeDefensiveAfflictionPowerFactorMax = 1.0; -TwoHandMaceDefensiveAfflictionPowerFactorMax = 1.0; - - - -/////////////////////// -// PROTECTION FACTOR // -// armor and shield -// Min -BucklerProtectionFactor = 0.10; -ShieldProtectionFactor = 0.10; -LightBootsProtectionFactor = 0.10; -LightGlovesProtectionFactor = 0.10; -LightPantsProtectionFactor = 0.10; -LightSleevesProtectionFactor = 0.10; -LightVestProtectionFactor = 0.10; -MediumBootsProtectionFactor = 0.10; -MediumGlovesProtectionFactor = 0.10; -MediumPantsProtectionFactor = 0.10; -MediumSleevesProtectionFactor = 0.10; -MediumVestProtectionFactor = 0.10; -HeavyBootsProtectionFactor = 0.10; -HeavyGlovesProtectionFactor = 0.10; -HeavyPantsProtectionFactor = 0.10; -HeavySleevesProtectionFactor = 0.10; -HeavyVestProtectionFactor = 0.10; -HeavyHelmetProtectionFactor = 0.10; -// Max -BucklerProtectionFactorMax = 0.10; -ShieldProtectionFactorMax = 0.10; -LightBootsProtectionFactorMax = 0.10; -LightGlovesProtectionFactorMax = 0.10; -LightPantsProtectionFactorMax = 0.10; -LightSleevesProtectionFactorMax = 0.10; -LightVestProtectionFactorMax = 0.10; -MediumBootsProtectionFactorMax = 0.10; -MediumGlovesProtectionFactorMax = 0.10; -MediumPantsProtectionFactorMax = 0.10; -MediumSleevesProtectionFactorMax = 0.10; -MediumVestProtectionFactorMax = 0.10; -HeavyBootsProtectionFactorMax = 0.10; -HeavyGlovesProtectionFactorMax = 0.10; -HeavyPantsProtectionFactorMax = 0.10; -HeavySleevesProtectionFactorMax = 0.10; -HeavyVestProtectionFactorMax = 0.10; -HeavyHelmetProtectionFactorMax = 0.10; -///////////////////////////// -// MAX SLASHING PROTECTION // value to multiply with the item level. -// armor and shield -BucklerMaxSlashingProtection = 0.10; -ShieldMaxSlashingProtection = 0.10; -LightBootsMaxSlashingProtection = 0.10; -LightGlovesMaxSlashingProtection = 0.10; -LightPantsMaxSlashingProtection = 0.10; -LightSleevesMaxSlashingProtection = 0.10; -LightVestMaxSlashingProtection = 0.10; -MediumBootsMaxSlashingProtection = 0.10; -MediumGlovesMaxSlashingProtection = 0.10; -MediumPantsMaxSlashingProtection = 0.10; -MediumSleevesMaxSlashingProtection = 0.10; -MediumVestMaxSlashingProtection = 0.10; -HeavyBootsMaxSlashingProtection = 0.10; -HeavyGlovesMaxSlashingProtection = 0.10; -HeavyPantsMaxSlashingProtection = 0.10; -HeavySleevesMaxSlashingProtection = 0.10; -HeavyVestMaxSlashingProtection = 0.33; -HeavyHelmetMaxSlashingProtection = 0.33; -////////////////////////// -// MAX BLUNT PROTECTION // -// armor and shield -BucklerMaxBluntProtection = 0.10; -ShieldMaxBluntProtection = 0.10; -LightBootsMaxBluntProtection = 0.10; -LightGlovesMaxBluntProtection = 0.10; -LightPantsMaxBluntProtection = 0.10; -LightSleevesMaxBluntProtection = 0.10; -LightVestMaxBluntProtection = 0.10; -MediumBootsMaxBluntProtection = 0.10; -MediumGlovesMaxBluntProtection = 0.10; -MediumPantsMaxBluntProtection = 0.10; -MediumSleevesMaxBluntProtection = 0.10; -MediumVestMaxBluntProtection = 0.10; -HeavyBootsMaxBluntProtection = 0.10; -HeavyGlovesMaxBluntProtection = 0.10; -HeavyPantsMaxBluntProtection = 0.10; -HeavySleevesMaxBluntProtection = 0.10; -HeavyVestMaxBluntProtection = 0.10; -HeavyHelmetMaxBluntProtection = 0.10; -///////////////////////////// -// MAX PIERCING PROTECTION // -// armor and shield -BucklerMaxPiercingProtection = 0.10; -ShieldMaxPiercingProtection = 0.10; -LightBootsMaxPiercingProtection = 0.10; -LightGlovesMaxPiercingProtection = 0.10; -LightPantsMaxPiercingProtection = 0.10; -LightSleevesMaxPiercingProtection = 0.10; -LightVestMaxPiercingProtection = 0.10; -MediumBootsMaxPiercingProtection = 0.10; -MediumGlovesMaxPiercingProtection = 0.10; -MediumPantsMaxPiercingProtection = 0.10; -MediumSleevesMaxPiercingProtection = 0.10; -MediumVestMaxPiercingProtection = 0.10; -HeavyBootsMaxPiercingProtection = 0.10; -HeavyGlovesMaxPiercingProtection = 0.10; -HeavyPantsMaxPiercingProtection = 0.10; -HeavySleevesMaxPiercingProtection = 0.10; -HeavyVestMaxPiercingProtection = 0.10; -HeavyHelmetMaxPiercingProtection = 0.10; -////////////////////////////// -// JEWEL PROTECTION -AcidJewelProtection = 0.01001; // de 0 à 1.0 (1.0 = 100% de protection) -ColdJewelProtection = 0.01001; -FireJewelProtection = 0.01001; -RotJewelProtection = 0.01001; -ShockWaveJewelProtection = 0.01001; -PoisonJewelProtection = 0.01001; -ElectricityJewelProtection = 0.01001; - -MaxMagicProtection = 10; // Maximum protection can be gived by jewelry (clamp value), de 0 à 100 (pourcentage) -HominBaseProtection = 10; // Homin base protection in generic magic damage type -HominRacialProtection = 10; // Homin base protection in racial magic damage type -MaxAbsorptionFactor = 10; // Factor used for compute maximum absorption gived by all jewel (100 = 1.0 factor (100%)) (Max absorbtion = sum(equipped jewels recommandeds) * factor) -////////////////////////////// -// JEWEL RESISTANCE -DesertResistance = 1; // In skill points bonus -ForestResistance = 1; -LacustreResistance = 1; -JungleResistance = 1; -PrimaryRootResistance = 1; - -HominRacialResistance = 10;// Homin racial magic resistance to magic racial spell type -MaxMagicResistanceBonus = 10;// clamp value of resistance bonus resistance after all bonus/malus applied -EcosystemResistancePenalty = 10;// ecosystem resistance penalty value -//************************************************************************************************************* -// regen speed parameters -//************************************************************************************************************* -RegenDivisor = 1.0; -RegenReposFactor = 1.0; -RegenOffset = 1.0; - -//************************************************************************************************************* -// weapon damage table config -//************************************************************************************************************* -MinDamage = 10; -DamageStep = 1; -ExponentialPower = 1; -SmoothingFactor = 0; - -//************************************************************************************************************* -// hand to hand combat config -//************************************************************************************************************* -HandToHandDamageFactor = 0.10; -HandToHandLatency = 25; // 25 ticks = 2.5s - -//************************************************************************************************************* -// combat config -//************************************************************************************************************* -BotDamageFactor = 1; // factor applied on npc and creature damage -// special effects when hit to localisation -HitChestStaLossFactor = 0.1; -HitHeadStunDuration = 1; -HitArmsSlowDuration = 1; -HitArmsSlowFactor = 10; -HitLegsSlowDuration = 1; -HitLegsSlowFactor = -10; -HitHandsDebuffDuration = 1; -HitHandsDebuffValue = -10; -HitFeetDebuffDuration = 1; -HitFeetDebuffValue = -10; -NbOpponentsBeforeMalus = 1; -ModPerSupernumeraryOpponent = -1; -MinTwoWeaponsLatency = 10; - -ShieldingRadius = 1; -CombatFlagLifetime = 10; // (in ticks) used for openings - -DodgeFactorForMagicSkills = 1.0; -DodgeFactorForForageSkills = 1.0; - -MagicResistFactorForCombatSkills = 1.0; -MagicResistFactorForMagicSkills = 1.0; -MagicResistFactorForForageSkills = 1.0; -MagicResistSkillDelta = -10; - -//************************************************************************************************************* -// Price parameters ( price formula is ItemPriceCoeff2 * x2 + ItemPriceCoeff1 * x + ItemPriceCoeff0 ) -//************************************************************************************************************* -// polynom coeff of degree 0 in the price formula -ItemPriceCoeff0 = 100.0; -// polynom coeff of degree 1 in the price formula -ItemPriceCoeff1 = 0.1; -// polynom coeff of degree 2 in the price formula -ItemPriceCoeff2 = 0.01; -// factor to apply on non raw maetrial items to compute their price -ItemPriceFactor = 1.0; -// factor to apply on animal price to get the price a user can buy them -AnimalSellFactor = 0.1; -// factor to apply on teleport price to get the price a user can buy them -TeleportSellFactor = 0.1; -// this factor is applied to all faction point prices -GlobalFactionPointPriceFactor = 1.0; - -// this factor is applied to all faction point prices -GlobalFactionPointPriceFactor = 1.0; - -//************************************************************************************************************* -// Max quality of Raw Material Npc item selled by NPC -//************************************************************************************************************* -MaxNPCRawMaterialQualityInSell = 100; - -//************************************************************************************************************* -// Sell store parameters -//************************************************************************************************************* -// an item can stay 7 days in a sale store (total cumulated time in game cycle) -MaxGameCycleSaleStore = 6048000; - -NBMaxItemPlayerSellDisplay = 128; //NB max item can be displayed for player item list selled -NBMaxItemNpcSellDisplay = 128; //NB max item can be displayed for npc item list selled -NBMaxItemYoursSellDisplay = 128; //NB max item can be displayed for your item list selled, it's also the max items player can put in sale store - -//************************************************************************************************************* -// Factor for apply malus wear equipment to craft ( Recommended max = Recommended - (Recommanded * malus wear * WearMalusCraftFactor ) -//************************************************************************************************************* -WearMalusCraftFactor = 0.1; - -//************************************************************************************************************* -// Item wear config -//************************************************************************************************************* -//MeleeWeaponWearPerAction = 0.01; -//RangeWeaponWearPerAction = 0.01; - -// now we base wear factor for weapons on the ration (WeaponLatency / ReferenceWeaponLatencyForWear) -// MUST be > 0 -ReferenceWeaponLatencyForWear = 10; - -CraftingToolWearPerAction = 0.01; -ForageToolWearPerAction = 0.01; -ArmorWearPerAction = 0.01; -ShieldWearPerAction = 0.01; -JewelryWearPerAction = 0.01; - -// melee weapons -DaggerWearPerAction = 0.01; -SwordWearPerAction = 0.01; -MaceWearPerAction = 0.01; -AxeWearPerAction = 0.01; -SpearWearPerAction = 0.01; -StaffWearPerAction = 0.01; -MagicianStaffWearPerAction = 0.01; -TwoHandSwordWearPerAction = 0.01; -TwoHandAxeWearPerAction = 0.01; -PikeWearPerAction = 0.01; -TwoHandMaceWearPerAction = 0.01; -// range weapon -AutolauchWearPerAction = 0.01; -BowrifleWearPerAction = 0.01; -LauncherWearPerAction = 0.01; -PistolWearPerAction = 0.01; -BowpistolWearPerAction = 0.01; -RifleWearPerAction = 0.01; - -//************************************************************************************************************* -// Fame Variables -//************************************************************************************************************* -// Fame memory interpolation periode -FameMemoryInterpolation = 1220000; -// Fame trend reset delay -FameTrendResetDelay = 10000; -// Point of fame lost with the faction of a killed bot -FameByKill = -1000; -// Minimum Fame To Buy a Guild Building -MinFameToBuyGuildBuilding = 0; -// Minimum Fame To Buy a Player Building -MinFameToBuyPlayerBuilding = 0; -// maximum price variation ( in absolute value ) that can be due to fame -MaxFamePriceVariation = 0.1; -// Maximum fame value taken in account in trade -MaxFameToTrade = 100000; -// Minimum fame value taken in account in trade, under this value, the merchant refuse to sell -MinFameToTrade = -100000; - -//************************************************************************************************************* -// Guild Variables -//************************************************************************************************************* -//fame to buy a guild building -MinFameToBuyGuildBuilding = 0; -// cost of the guild building in money -MoneyToBuyGuildBuilding = 10; -// base bulk of the guild building -BaseGuildBulk = 10000000; -// cost in money to create a guild -GuildCreationCost = 100000; -// max number of charges a guild can apply for -MaxAppliedChargeCount = 3; - -//************************************************************************************************************* -// Animals -//************************************************************************************************************* -AnimalHungerFactor = 0.01; -AnimalStopFollowingDistance = 100; -AllowAnimalInventoryAccessFromAnyStable = 0; - -//************************************************************************************************************* -// PVP -//************************************************************************************************************* -DuelQueryDuration = 600; -ChallengeSpawnZones = -{ - "pvp_challenge_fyros_spawn_1", - "pvp_challenge_fyros_spawn_2", -}; - -PVPMeleeCombatDamageFactor = 1.0; -PVPRangeCombatDamageFactor = 1.0; -PVPMagicDamageFactor = 1.0; - -TimeForSetPVPFlag = 1200; // 2 mn Timer for set flag pvp become effective -TimeForResetPVPFlag = 18000; // 30 mn Minimum time pvp flag must stay on before player can reset it -TimeForPVPFlagOff = 300; // 30 s Timer for set pvp off, if player make or suffer any pvp action during this time, the reset flag is anulated -PVPActionTimer = 6000; // 10 mn Timer for be able to play in PVE with neutral or other faction character after made an pvp action - -TotemBuildTime = 6000; -TotemRebuildWait = 72000; - -ResPawnPVPInSameRegionForbiden = 1; // 1 is player character can't respawn in same region of there death in faction PvP. - -BuildSpireActive = 1; - - -// max distance from PvP combat to gain PvP points (faction and HoF points) from team PvP kills (in meters) -MaxDistanceForPVPPointsGain = 50.0; -// minimum delta level used to compute the faction points gain -MinPVPDeltaLevel = -50; -// maximum delta level used to compute the faction points gain -MaxPVPDeltaLevel = 50; -// for team PvP progression add this value to the faction points divisor for each team member above one -PVPTeamMemberDivisorValue = 1.0; -// it is the base used in faction point gain formula -PVPFactionPointBase = 5.0; -// it is the base used in HoF point gain formula -PVPHoFPointBase = 5.0; -// in faction PvP the killed players loses the faction points gained per killer multiplied by this factor -PVPFactionPointLossFactor = 0.1; -// in faction PvP the killed players loses the HoF points gained per killer multiplied by this factor -PVPHoFPointLossFactor = 0.5; -// players will not get any point for the same PvP kill for this time in seconds -TimeWithoutPointForSamePVPKill = 300; - -VerboseFactionPoint = 0; - -//************************************************************************************************************* -// Outpost -//************************************************************************************************************* -// Global flag to activate outpost challenge system -LoadOutposts = 1; -// Outpost saving period in tick (1 outpost saved at a time), default is 10 ticks -OutpostSavingPeriod = 10; -// Period in ticks between 2 updates of the same outpost, default is 10 ticks -OutpostUpdatePeriod = 10; -// Set if the outpost drillers generate mps or not -EnableOutpostDrillerMPGeneration = 1; -// Production time of mp in the driller (in seconds) -OutpostDrillerTimeUnit = 60*60*24; // per day -// Delay in ticks used to check if 2 actions for editing an outpost are concurrent -OutpostEditingConcurrencyCheckDelay = 50; -// Period in seconds between 2 updates of outpost timers on clients -OutpostClientTimersUpdatePeriod = 60; -// Number of rounds in an outpost fight -OutpostFightRoundCount = 24; -// Time of a round in an outpost fight, in seconds -OutpostFightRoundTime = 5*60; -// Time to decrement an outpost level in seconds (in peace time) -OutpostLevelDecrementTime = 60*60*24*2; // an outpost loses 1 level every 2 days -// Delay in ticks used to check if 2 actions for editing an outpost are concurrent -OutpostEditingConcurrencyCheckDelay = 50; -// Time of each outpost state (challenge, beforeAttack, afterAttack, beforeDefense, afterDefense), in seconds. If 0 default computed value is used. -OutpostStateTimeOverride = 0; -// Max time the player has to answer the JoinPvp Window, in seconds -OutpostJoinPvpTimer = 10; -// Time range before next attack period in which a service reboot will cancel the challenge, in seconds -OutpostRangeForCancelOnReset = 60*60*3; // 3 hours -// Max number of outposts per guild (DO NOT exceed outpost count in database.xml) -GuildMaxOutpostCount = 10; -//************************************************************************************************************* - -DisplayedVariables += -{ - "NbPlayers", - "Creatures", - "", - "RyzomDate", - "RyzomTime", - "PeopleAutorized", - "CareerAutorized", - "", - "NbEntitiesInPhraseManager", - "", - "@Characters|displayPlayers", - "@Creatures|displayCreatures" -}; - -Paths += -{ - "../common/data_leveldesign/leveldesign/World" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/game_element/xp_table", - "../common/data_leveldesign/leveldesign/game_element/emotes" -}; - -MonoMissionTimout = 144000; -VerboseMissions = 0; -MissionLogFile = "egs_missions.log"; -MissionPrerequisitsEnabled = 1; -CheckCharacterVisitPlacePeriodGC = 64; - -// This icon will be used for missions with an invalid mission icon. If -// default icon is invalid too mission will not be displayed at all on client. -DefaultMissionIcon = "generic_rite"; - -// Mission states is read from file mission_validation.cfg. The EGS will load -// only the files which state is in ValidMissionStates list. If that list -// contains the keyword "All" all missions will be loaded. -ValidMissionStates = { - "All", -// "Disabled", -// "Test", -// "Valid", -}; - -StoreBotNames = 1; - -Tocking = 1; - -// unlimited death pact for internal testing -UnlimitedDeathPact = 1; - -//ignore race prerequisits for missions -IgnoreMissionRacePrerequisits = 1; - -// Max distance allowed for bot chat & dyn chat -MaxBotChatDistanceM = 5; - -//zone types that must be set as triggers -TriggerZoneTypes = { "place","region" }; - -// PeopleAutorized 1:fyros 2:matis 4:tryker 8:zorai - -// set the world instance activity verbosity -VerboseWorldInstance = 0; - -// set the shop category parser verbosity -VerboseShopParsing = 0; - - -// Checking coherency between saved players and CEntityIdTranslator map, may be slow, so put to 0 if you want -CheckEntityIdTranslatorCoherency = 0; - -// Filename that contains the list of invalid entity names -InvalidEntityNamesFilename = "invalid_entity_names.txt"; - -BSHost = "192.168.1.199"; -UseBS = 1; - -// the client uri that the client must enter to get the forum *with* final slash -// ie: http://compilo/websrv/ -WebSrvHost = "http://213.208.119.191/"; - -ForageKamiAngerThreshold1 = 10000; -ForageKamiAngerThreshold2 = 10000; -ForageKamiAngerDecreasePerHour = 900.0; -ForageKamiAngerPunishDamage = 5000; - -ForageValidateSourcesSpawnPos = 1; -AutoSpawnForageSourcePeriodOverride = 0; -ForageKamiAngerOverride = 0; -ForageSiteStock = 100; -ForageSiteNbUpdatesToLive = 10; -ForageSiteRadius = 10.0; -ForageExtractionTimeMinGC = 230.0; -ForageExtractionTimeSlopeGC = 2.0; -ForageQuantityBaseRate = 0; -ForageQuantityBrick1 = 0.5; -ForageQuantityBrick2 = 0.5; -ForageQuantityBrick3 = 0.5; -ForageQuantityBrick4 = 0.5; -ForageQuantityBrick5 = 0.5; -ForageQuantityBrick6 = 0.5; -ForageQuantityBrick7 = 0.5; -ForageQuantityBrick8 = 0.5; -ForageQuantityBrick9 = 0.5; -ForageQuantityBrick10 = 0.5; -ForageQuantityBrick11 = 0.5; -ForageQuantityBrick12 = 0.5; -ForageQuantitySlowFactor = 0.5; -ForageQualitySlowFactor = 1.50; -ForageQualitySlowFactorQualityLevelRatio = 0.1; -ForageQualitySlowFactorDeltaLevelRatio = 0.1; -ForageQualitySlowFactorMatSpecRatio = 0.1; -ForageQualityCeilingFactor = 1.0; -ForageQualityCeilingClamp = 1; -ForageQuantityImpactFactor = 20.0; -ForageQualityImpactFactor = 1.5; -ForageExtractionAbsorptionMatSpecFactor = 5.0; -ForageExtractionAbsorptionMatSpecMax = 1.0; -ForageExtractionCareMatSpecFactor = 1.0; -ForageExtractionAbsorptionEcoSpecFactor = 5.0; -ForageExtractionAbsorptionEcoSpecMax = 1.0; -ForageExtractionCareEcoSpecFactor = 1.0; -ForageExtractionNaturalDDeltaPerTick = 0.1; -ForageExtractionNaturalEDeltaPerTick = 0.1; -ForageCareFactor = 5.0; -ForageCareBeginZone = 5.0; -ForageHPRatioPerSourceLifeImpact = 0.005; -ForageExplosionDamage = 5000.0; -ToxicCloudDamage = 500.0; -ForageCareSpeed = 0.05; -ForageKamiOfferingSpeed = 0.01; -ForageDebug = 0; -ForageSourceSpawnDelay = 50; -ForageFocusRatioOfLocateDeposit = 10; -ForageFocusAutoRegenRatio = 1.0; -ForageReduceDamageTimeWindow = 50; -ForageExtractionXPFactor = 10.0; -ForageQuantityXPDeltaLevelBonusRate = 1.0; -ForageProspectionXPBonusRatio = 0.1; -ForageExtractionNbParticipantsXPBonusRatio = 0.1; -ForageExtractionNastyEventXPMalusRatio = 0.1; - -QuarteringQuantityAverageForCraftHerbivore = 2.0; -QuarteringQuantityAverageForCraftCarnivore = 5.0; -QuarteringQuantityAverageForMissions = 1.0; -QuarteringQuantityAverageForBoss5 = 10; -QuarteringQuantityAverageForBoss7 = 50; -QuarteringQuantityForInvasion5 = 50; -QuarteringQuantityForInvasion7 = 100; - -LootMoneyAmountPerXPLevel = 10.0; - -XMLSave = 0; - - -// Shutdown handling - -// Time to shutdown server in minutes -ShutdownCounter = 5; - -// Time between to shutdown messages in seconds -BroadcastShutdownMessageRate = 30; - -// Time to shutdown to close access to welcome service, in seconds -CloseShardAccessAt = 300; - - -// Persistent Logging - -DatabaseId = 0; - -// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableLog = 1; - -// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableStringLog = 0; - -// Number of seconds between 2 logs to file -PDLogUpdate = 10; - -// Log directory (with/without final slash), pd_logs is added to the path. If value is empty, default is SaveFilesDirectory -PDLogSaveDirectory = ""; - -// delay during character stay in game after disconnection -TimeBeforeDisconnection = 300; - -// File that contains the privileges for client commands -ClientCommandsPrivilegesFile = "client_commands_privileges.txt"; - -// File that contains the info on the current event on the server -GameEventFile = "game_event.txt"; - -// Privilege needed for banner -BannerPriv = ":G:SG:GM:SGM:"; -// Privilege that never aggro the bots -NeverAggroPriv = ":OBSERVER:G:SG:GM:SGM:EM:"; -// Privilege always invisible -AlwaysInvisiblePriv = ":OBSERVER:EM:"; -// Privilege to teleport with a mektoub -TeleportWithMektoubPriv = ":GM:SGM:DEV:"; -// Privilege that forbid action execution -NoActionAllowedPriv = ":OBSERVER"; -// Privilege that bypass value and score checking -NoValueCheckingPriv = ":GM:SGM:DEV:"; -// Privilege that prevent being disconnected in case of shard closing for technical problem -NoForceDisconnectPriv = ":GM:SGM:DEV:"; - - -// File used to save position flags -PositionFlagsFile = "position_flags.xml"; - -// load PVP zones from primitives? -LoadPVPFreeZones = 1; -LoadPVPVersusZones = 1; -LoadPVPGuildZones = 1; - -// buffer time in ticks used when entering/leaving a PVP zone -PVPZoneEnterBufferTime = 300; -PVPZoneLeaveBufferTime = 1200; -PVPZoneWarningRepeatTime = 50; -PVPZoneWarningRepeatTimeL = 3000; - -// If 1, use the Death Penalty factor from the PVPZone primitive, else no death penalty -PVPZoneWithDeathPenalty = 1; - -// if 1, pvp duel/challenge will be disabled -DisablePVPDuel = 0; -DisablePVPChallenge = 1; - -// Fame Variables -// All values are multiplied by 6000 compared to values displayed on the client. -FameMinToDeclare = 100000; -FameWarningLevel = 10000; -FameMinToRemain = 0; -FameMinToTrade = -100000; -FameMinToKOS = -100000; -FameMaxDefault = 100000; -FameAbsoluteMin = -100000; -FameAbsoluteMax = 100000; - -FameStartFyrosvFyros = 100000; -FameStartFyrosvMatis = -100000; -FameStartFyrosvTryker = -10000; -FameStartFyrosvZorai = 10000; -FameStartMatisvFyros = -100000; -FameStartMatisvMatis = 100000; -FameStartMatisvTryker = 10000; -FameStartMatisvZorai = -10000; -FameStartTrykervFyros = -10000; -FameStartTrykervMatis = 10000; -FameStartTrykervTryker = 100000; -FameStartTrykervZorai = -100000; -FameStartZoraivFyros = 10000; -FameStartZoraivMatis = -10000; -FameStartZoraivTryker = -100000; -FameStartZoraivZorai = 100000; -FameStartFyrosvKami = 10000; -FameStartFyrosvKaravan = -10000; -FameStartMatisvKami = -100000; -FameStartMatisvKaravan = 100000; -FameStartTrykervKami = -10000; -FameStartTrykervKaravan = 10000; -FameStartZoraivKami = 100000; -FameStartZoraivKaravan = -100000; - -FameMaxNeutralvFyros = 100000; -FameMaxNeutralvMatis = 100000; -FameMaxNeutralvTryker = 100000; -FameMaxNeutralvZorai = 100000; -FameMaxFyrosvFyros = 100000; -FameMaxFyrosvMatis = 0; -FameMaxFyrosvTryker = 100000; -FameMaxFyrosvZorai = 100000; -FameMaxMatisvFyros = 0; -FameMaxMatisvMatis = 100000; -FameMaxMatisvTryker = 100000; -FameMaxMatisvZorai = 100000; -FameMaxTrykervFyros = 100000; -FameMaxTrykervMatis = 100000; -FameMaxTrykervTryker = 100000; -FameMaxTrykervZorai = 0; -FameMaxZoraivFyros = 100000; -FameMaxZoraivMatis = 100000; -FameMaxZoraivTryker = 0000; -FameMaxZoraivZorai = 100000; -FameMaxNeutralvKami = 100000; -FameMaxNeutralvKaravan = 100000; -FameMaxKamivKami = 100000; -FameMaxKamivKaravan = -100000; -FameMaxKaravanvKami = -100000; -FameMaxKaravanvKaravan = 100000; - -// Log switches, turns nlinfo on/off -NameManagerLogEnabled = 1; -GameItemLogEnabled = 1; -EntityCallbacksLogEnabled = 1; -EntityManagerLogEnabled = 1; -GuildManagerLogEnabled = 1; -ForageExtractionLogEnabled = 0; -PhraseManagerLogEnabled = 1; -CharacterLogEnabled = 1; -PlayerLogEnabled = 1; -ShoppingLogEnabled = 0; -PVPLogEnabled = 1; -PersistentPlayerDataLogEnabled = 0; - -DailyShutdownSequenceTime = ""; -DailyShutdownBroadcastMessage = "The shard will be shut down in 1 minute"; -DailyShutdownCounterMinutes = 1; -CheckShutdownPeriodGC = 50; - -// Connection towards Mail/Forum service -MFSHost = "192.168.1.191"; - -PlayerChannelHistoricSize = 50; - -FlushSendingQueuesOnExit = 1; -NamesOfOnlyServiceToFlushSending = "BS"; - -// stat database save period in ticks -StatDBSavePeriod = 20; - -// New Newbieland -UseNewNewbieLandStartingPoint= 1; -// Mainlands shard configuration -Mainlands = { -"200", "Aniro", "(FR)", "fr", -"201", "Leanon", "(DE)", "de", -"202", "Arispotle", "(UK)", "en", -}; diff --git a/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg b/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg deleted file mode 100644 index 7fd87cca0..000000000 --- a/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg +++ /dev/null @@ -1,128 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/gpm_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ -}; - -// define the primitives configuration used. -UsedPrimitives = -{ -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - - - -CheckPlayerSpeed = 1; -SecuritySpeedFactor = 1.5; - -LoadPacsPrims = 0; -LoadPacsCol = 1; - -Paths += { "../common/data_leveldesign/leveldesign/World", "../common/data_leveldesign/leveldesign/world_editor_files" }; diff --git a/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg b/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg deleted file mode 100644 index 8772cf07f..000000000 --- a/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg +++ /dev/null @@ -1,179 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/input_output_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - -// a list of system command that can be run with "sysCmd" service command. -SystemCmd = {}; - -// IOS don't use work directory by default -ReadTranslationWork = 0; -TranslationWorkPath = "translation/work"; - -//Paths += { "data_leveldesign/leveldesign/Game_elem" }; - -// Global shard bot name translation file. You sould overide this -// in input_output_service.cfg to specialize the file -// depending on the shard main language. -BotNameTranslationFile = "bot_names.txt"; - -// Global shard event faction translation file. You sould override this -// in input_output_service.cfg to specialize the file -// depending on the shard main language. -EventFactionTranslationFile = "event_factions.txt"; - -// Activate/deactivate debugging of missing paremeter replacement -DebugReplacementParameter = 1; - -// Id of database for PDS Chat Logging -DatabaseId = 1; - -// Default verbose debug flags: -//----------------------------- - -// Log bot name translation from 'BotNameTranslationFile' -VerboseNameTranslation = 0; -// Log chat management operation -VerboseChatManagement = 0; -// Log chat event -VerboseChat = 0; -// Log string manager message -VerboseStringManager = 0; -// Log the string manager parsing message -VerboseStringManagerParser = 0; - -// Directory to store ios.string_cache file -StringManagerCacheDirectory = "data_shard_local"; -// Directory to log chat into -LogChatDirectory = "data_shard_local"; - -// Persistent Logging - -// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableLog = 1; - -// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableStringLog = 0; - -// Number of seconds between 2 logs to file -PDLogUpdate = 10; - -// Log directory (with/without final slash), pd_logs is added to the path. If value is empty, default is SaveFilesDirectory -PDLogSaveDirectory = ""; - diff --git a/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg b/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg deleted file mode 100644 index da1e7aa15..000000000 --- a/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg +++ /dev/null @@ -1,127 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/mirror_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - - -MaxOutBandwidth = 100000000; - -// Linux only -DestroyGhostSegments = 1; - -NegFiltersDebug += { "MSG:" }; From a55ddcc00bc53fee3177d55b60603b2f69fe27f5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 03:35:36 +0100 Subject: [PATCH 067/138] Add example configuration for patchman --- code/ryzom/server/patchman_cfg/README.md | 16 + .../patchman_cfg/admin_install/bin/admin | 129 ++ .../admin_install/bin/admin.screen.rc | 19 + .../admin_install/bin/ps_services | 7 + .../admin_install/bin/run_forever | 30 + .../bin/ryzom_domain_screen_wrapper.sh | 88 + .../patchman_cfg/admin_install/bin/shard | 4 + .../patchman_cfg/admin_install/bin/startup | 11 + .../admin_install/bin/sync_rrd_graphs.sh | 22 + .../admin_executor_service_default.mini01.cfg | 99 + .../admin_executor_service_default.std01.cfg | 99 + .../admin_install/patchman/dont_keep_cores | 1 + .../admin_install/patchman/loop_aes.sh | 18 + .../admin_install/patchman/loop_patchman.sh | 47 + .../patchman/loop_patchman_once.sh | 39 + .../patchman/loop_special_patchman.sh | 19 + .../admin_install/patchman/make_next_live.sh | 106 + .../admin_install/patchman/patchman_list | 6 + .../patchman/patchman_service.default.cfg | 37 + .../patchman/patchman_service.mini01.cfg | 45 + .../patchman_service.mini01_bridge.cfg | 65 + .../patchman/patchman_service.mini01_spm.cfg | 41 + .../patchman/patchman_service.std01.cfg | 45 + .../patchman/patchman_service.std01_spm.cfg | 41 + .../patchman/patchman_service_base.cfg | 17 + .../patchman/patchman_service_base_linux.cfg | 17 + .../admin_install/patchman/screen.rc.default | 16 + .../patchman/service_launcher.sh | 97 + .../patchman/special_patchman_list | 11 + .../admin_install/patchman_service_local.cfg | 1 + .../ryzom/server/patchman_cfg/cfg/00_base.cfg | 125 ++ .../patchman_cfg/cfg/01_domain_mini01.cfg | 80 + .../patchman_cfg/cfg/01_domain_std01.cfg | 81 + .../cfg/02_shard_type_mini_mainland.cfg | 50 + .../cfg/02_shard_type_mini_ring.cfg | 51 + .../cfg/02_shard_type_mini_unifier.cfg | 1 + .../cfg/02_shard_type_std_mainland.cfg | 50 + .../cfg/02_shard_type_std_ring.cfg | 51 + .../cfg/02_shard_type_std_unifier.cfg | 1 + .../patchman_cfg/default/ai_service.cfg | 353 ++++ .../patchman_cfg/default/backup_service.cfg | 9 + .../default/entities_game_service.cfg | 1776 +++++++++++++++++ .../patchman_cfg/default/frontend_service.cfg | 106 + .../patchman_cfg/default/gpm_service.cfg | 7 + .../default/input_output_service.cfg | 119 ++ .../patchman_cfg/default/logger_service.cfg | 89 + .../default/mail_forum_service.cfg | 15 + .../patchman_cfg/default/mirror_service.cfg | 6 + .../patchman_cfg/default/naming_service.cfg | 6 + .../server/patchman_cfg/default/ryzom_as.cfg | 25 + .../default/shard_unifier_service.cfg | 37 + .../patchman_cfg/default/tick_service.cfg | 10 + .../patchman_cfg/default/welcome_service.cfg | 37 + .../patchman_cfg/shard_ctrl_definitions.txt | 717 +++++++ .../server/patchman_cfg/shard_ctrl_mini01.txt | 116 ++ .../server/patchman_cfg/shard_ctrl_std01.txt | 442 ++++ .../terminal_mini01/patchman_service.cfg | 93 + .../terminal_mini01/server_park_database.txt | 10 + .../terminal_mini01/terminal_mini01.bat | 2 + .../terminal_std01/patchman_service.cfg | 93 + .../terminal_std01/server_park_database.txt | 10 + .../terminal_std01/terminal_std01.bat | 2 + 62 files changed, 5763 insertions(+) create mode 100644 code/ryzom/server/patchman_cfg/README.md create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/admin create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/ps_services create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/run_forever create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/shard create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/startup create mode 100644 code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list create mode 100644 code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/00_base.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg create mode 100644 code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/ai_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/backup_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/entities_game_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/frontend_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/gpm_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/input_output_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/logger_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/mirror_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/naming_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/ryzom_as.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/tick_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/default/welcome_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt create mode 100644 code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt create mode 100644 code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt create mode 100644 code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt create mode 100644 code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat create mode 100644 code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg create mode 100644 code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt create mode 100644 code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat diff --git a/code/ryzom/server/patchman_cfg/README.md b/code/ryzom/server/patchman_cfg/README.md new file mode 100644 index 000000000..632ea7473 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/README.md @@ -0,0 +1,16 @@ + +shard_ctrl_definitions.txt: Contains all macros for various shard services and shard configurations. + +shard_ctrl_mini01.txt: Example configuration for a development domain with a single mainland and a single ring shard running on one machine. + +terminal_mini01: Contains the terminal to control the patch managers of the mini01 domain. To deploy the shard configuration, install the patchman services on all services, run the terminal and hit Deploy. You may need to hit Deploy a second time if it gives an error. To install the patch version 1, run 'terminal.install mini01 1', this can be done while a previous version is still running. To launch the new version, stop the shard, then run 'terminal.launch mini01 1', this will swap the live version with the next version, and launch the shard immediately. + +shard_ctrl_std01.txt: Example configuration for a full blown domain with multiple shards. + +terminal_std01: Contains the terminal to control the patch managers of the mini01 domain. + +default: Contains base configuration files of the services containing per-service non-domain non-shard specific values. + +cfg: Contains base configuration files with domain and shard type specific values. + +admin_install: Contains the scripts to launch the patch manager and the shard. This directory is built into admin_install.tgz by the build pipeline. Subdirectory patchman requires addition of the ryzom_patchman_service executable on the server, the build pipeline adds this file into the tgz archive automatically, do not add it manually. The patchman_service_local.cfg file must be installed manually per server to contain the hostname of the server. The contents of the admin_install.tgz must be installed manually to the server the first time a server is deployed. The working directory is assumed to be /srv/core, which will contain /srv/core/bin and /srv/core/patchman. The configurations under patchman must be modified to match your own domains. Launch /srv/core/bin/startup to launch the patchman services. Run '/srv/core/bin/admin stop' to stop the patchman services. There is one bridge server, which is tied to one domain, but is used by the other domains as well. The bridge server has a folder /srv/core/bridge_server, which is generated by the build pipeline when creating a new server patch. \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/admin b/code/ryzom/server/patchman_cfg/admin_install/bin/admin new file mode 100644 index 000000000..c7cfa2fb6 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/admin @@ -0,0 +1,129 @@ +#!/bin/sh + +CMD=$* + +if [ "$CMD" = "" ] +then + + echo + echo Screen sessions currently running: + screen -list + echo + echo "Commands:" + echo " 'start' to start the admin" + echo " 'stop' to stop the admin" + echo " 'join' to join the admin's screen session" + echo " 'share' to join the admin if session is shared mode" + echo + printf "Enter a command: " + read CMD +fi + +if [ "$CMD" = "stop" ] +then + for s in $(screen -list | grep "\.admin.*" | awk '{ print $1 }'); do screen -drR $s -X quit; done +fi + +if [ "$CMD" = "start" ] +then + # force the ulimit just in case (so that we can generate cores) + ulimit -c unlimited + + # stop any admin sessions that were already up + for s in $(screen -list | grep "\.admin.*" | awk '{ print $1 }'); do screen -drR $s -X quit; done + + # start the main admin session + screen -d -m -S admin -c /srv/core/bin/admin.screen.rc + + # decide which hostname to use... + HOSTNAME=$(hostname) + if [ $(grep $HOSTNAME /srv/core/patchman/special_patchman_list | wc -w) = 0 ] + then + HOSTNAME=$(hostname -s) + fi + + # if this machine has associated special admin functins then start the appropriate admin sessions + echo Looking for sessions for host: $HOSTNAME + for ROLE in $(grep $HOSTNAME /srv/core/patchman/special_patchman_list | awk '{ print $1 }') + do + ROLE_DIR=/srv/core/$ROLE + SRC_CFG_FILE=/srv/core/patchman/patchman_service.$ROLE.cfg + + # make sure the cfg file exists for the patchman we're to launch + if [ -e $SRC_CFG_FILE ] + then + # preliminary setup prior to launching special admin patchman + CFG_FILE=$ROLE_DIR/patchman_service.cfg + SCREEN_NAME=admin_$ROLE + mkdir -p $ROLE_DIR + cp -v $SRC_CFG_FILE $CFG_FILE + + # wait 2 seconds before launching the next admin to reduce system conflict + sleep 2 + + # start the next patchman in its own screen session + pushd $ROLE_DIR > /dev/null + echo STARTING $SCREEN_NAME \($ROLE\) + screen -d -m -S $SCREEN_NAME /bin/sh /srv/core/patchman/loop_special_patchman.sh /srv/core/patchman/ryzom_patchman_service -L. -C. + popd > /dev/null + + else + # the patchman\'s cfg couln\'t be found so complain and ignore + echo FILE NOT FOUND: $SRC_CFG_FILE + fi + done + + + # try launching the screen sessions that correspond to the machine type that we have... + + # get the domain list + cd /srv/core/patchman/ + if [ $(grep $(hostname) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname) auto_start_domain_list | cut -d\ -f2-) + elif [ $(grep $(hostname -s) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname -s) auto_start_domain_list | cut -d\ -f2-) + elif [ $(grep $(hostname -d) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname -d) auto_start_domain_list | cut -d\ -f2-) + else + echo "There are no domains to be autostarted here" + DOMAIN_LIST=none + fi + + # if we have a domain list for this machine then deal with it... + if [ "$DOMAIN_LIST" != none ] + then + # iterate over the domain list... + for f in $DOMAIN_LIST + do + # see if we're setup to run this domain + if [ -e /srv/core/${f}.screen.rc ] && [ -e /srv/core/bin/${f} ] + then + # see whether the domain is alredy running + if [ $( screen -list | grep \( | cut -f2 | cut -d. -f2| grep \^$f\$ | wc -l) == 0 ] + then + # the domain isn't running yet so start it + echo '****' starting domain: $f '****' + /srv/core/bin/$f batchstart + else + echo '****' Domain is already running: $f '****' + fi + else + echo skipping domain: $f + fi + done + fi +fi + +if [ "$CMD" = "join" ] +then + screen -r -S admin +fi + +if [ "$CMD" = "share" ] +then + screen -r -x -S admin +fi + diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc b/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc new file mode 100644 index 000000000..9438c1fde --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc @@ -0,0 +1,19 @@ + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off + +# patchman +chdir "/srv/core/patchman/" +screen -t patchman /bin/sh ./loop_patchman.sh + diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services b/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services new file mode 100644 index 000000000..7f084cbc3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services @@ -0,0 +1,7 @@ + +if [ -z $1 ] +then + ps -edf | grep _service | grep -v grep +else + ps -edf | grep _service | grep -v grep | grep $* +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever b/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever new file mode 100644 index 000000000..c6f14b074 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever @@ -0,0 +1,30 @@ +#!/bin/sh + +while true +do + +if [ "$2" == "" ] +then + echo + echo USAGE: $0 sleep_time command_line + echo + echo example: + echo $0 3 echo hello world + echo waits 3 seconds then displays 'hello world' repeatedly, asking player to hit enter between each line + echo + break +fi + +sleep $1 +shift +CMD=$* + +while [ "$CMD" != "" ] +do + eval $CMD + echo "press enter" + read toto +done + +break +done \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh b/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh new file mode 100644 index 000000000..bf264eb69 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +CMD=$1 +DOMAIN=$(pwd|sed s%/srv/core/%%) + +if [ "$CMD" = "" ] +then + + echo + echo Screen sessions currently running: + screen -list + echo + echo "Commands:" + echo " 'start' to start the shard" + echo " 'stop' to stop the ${DOMAIN}" + echo " 'join' to join the ${DOMAIN}'s screen session" + echo " 'share' to join the screen session in shared mode" + echo " 'state' to view state information for the ${DOMAIN}" + echo + printf "Enter a command: " + read CMD +fi + +if [ "$CMD" = "stop" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot stop domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit> /dev/null + rm -v */*.state + rm -v */*launch_ctrl ./global.launch_ctrl + fi +fi + +STARTARGS= +if [ "$CMD" = "batchstart" ] +then + STARTARGS='-d -m' + CMD='start' +fi + +if [ "$CMD" = "start" ] +then + ulimit -c unlimited + screen -wipe > /dev/null + if [ $( screen -list | grep \\\.${DOMAIN} | wc -w ) != 0 ] + then + echo Cannot start domain \'${DOMAIN}\' because this domain is already started + screen -list | grep $DOMAIN + else + screen $STARTARGS -S ${DOMAIN} -c /srv/core/${DOMAIN}.screen.rc + fi +fi + +if [ "$CMD" = "join" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi +fi + +if [ "$CMD" = "share" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -r -x $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi +fi + +if [ "$CMD" = "state" ] +then + echo State of domain ${DOMAIN}: + if [ $(echo */*.state) = "*/*.state" ] + then + echo - No state files found + else + grep RUNNING *state + fi +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/shard b/code/ryzom/server/patchman_cfg/admin_install/bin/shard new file mode 100644 index 000000000..eba12a75e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/shard @@ -0,0 +1,4 @@ +#!/bin/sh + +cd /srv/core/mini01 +/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $* diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/startup b/code/ryzom/server/patchman_cfg/admin_install/bin/startup new file mode 100644 index 000000000..16bf59fd3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/startup @@ -0,0 +1,11 @@ +#!/bin/sh + +cd /srv/core +rm */*.state */*/*.launch_ctrl */*/*.state +/bin/bash /srv/core/bin/admin start + +# special case for the "ep1.std01.ryzomcore.org" machine - start the admin tool graph sync script +if [ $(hostname) = "ep1.std01.ryzomcore.org" ] + then + nohup /bin/sh /srv/core/bin/sync_rrd_graphs.sh & +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh b/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh new file mode 100644 index 000000000..b23fc285b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +echo Launched: $(date) +while true +do + # retrieve ATS files from ATS admin tool machine + rsync -t ep1.std01.ryzomcore.org:ats/graph_datas/* /srv/core/mini01/rrd_graphs/ + + # deal with live files - duplicate files that correspond to unique services to aid with graphing of su & co + cd /srv/core/std01/rrd_graphs/ + for f in $(ls *rrd | awk '/^[^_]*\./'); do cp $f $(cut -d. -f1)_unifier.$(cut -d. -f2-); done + rsync -t /srv/core/std01/rrd_graphs/* csr:std01_rrd_graphs/ + + # deal with test files files - see comment regarding live files above + cd /srv/core/mini01/rrd_graphs/ + for f in $(ls *rrd | awk '/^[^_]*\./'); do cp $f $(echo $f|cut -d. -f1)_unifier.$(echo $f|cut -d. -f2-); done + rsync -t /srv/core/mini01/rrd_graphs/* csr:mini01_rrd_graphs/ + + # display a groovy message + echo Finished rsync: $(date) + sleep 60 +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg new file mode 100644 index 000000000..bc7be84e9 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg @@ -0,0 +1,99 @@ +// I'm the AES, I'll not connect to myself! +DontUseAES = 1; +// I don't need a connection to a naming service +DontUseNS = 1; +DontLog = 1; + +AESAliasName= "aes"; + +// +DontUseStdIn = 0; + +// Adress ofthe admin service (default port is 49996) +ASHost = "ep1.mini01.ryzomcore.org"; + +// Config for AES +AESPort = "46712"; +AESHost = "localhost"; +ASPort = "46711"; + + +// in second, -1 for not restarting +RestartDelay = 60; + +// how many second before aborting the request if not finished +RequestTimeout = 5; + +// log path for advanced log report +LogPath = "/."; + +// setup for deployment environment with external configuration system responsible for launching apps and +// for configuring AES services +DontLaunchServicesDirectly = 1; +UseExplicitAESRegistration = 1; +KillServicesOnDisconnect = 1; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 0; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +NegFiltersDebug = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF" }; +NegFiltersInfo = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "CF", " ping", " pong" }; +NegFiltersWarning = { "CT_LRC" }; + +#include "./aes_alias_name.cfg" + +StartCommands= +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", + + + // create the admin executor service module + "moduleManager.createModule AdminExecutorService aes", + + // create a gateway to connect to as + "moduleManager.createModule StandardGateway asc_gw", + // create a layer 3 client + "asc_gw.transportAdd L3Client l3c", + "asc_gw.transportCmd l3c(connect addr="+ASHost+":"+ASPort+")", + + // create a gateway for services to connect + "moduleManager.createModule StandardGateway aes_gw", + // create a layer 3 server + "aes_gw.transportAdd L3Server l3s", + "aes_gw.transportOptions l3s(PeerInvisible)", + "aes_gw.transportCmd l3s(open port="+AESPort+")", + + // plug the as + "aes.plug asc_gw", + "aes.plug aes_gw", + +}; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg new file mode 100644 index 000000000..7bfb80b27 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg @@ -0,0 +1,99 @@ +// I'm the AES, I'll not connect to myself! +DontUseAES = 1; +// I don't need a connection to a naming service +DontUseNS = 1; +DontLog = 1; + +AESAliasName= "aes"; + +// +DontUseStdIn = 0; + +// Adress ofthe admin service (default port is 49996) +ASHost = "ep1.std01.ryzomcore.org"; + +// Config for AES +AESPort = "46702"; +AESHost = "localhost"; +ASPort = "46701"; + + +// in second, -1 for not restarting +RestartDelay = 60; + +// how many second before aborting the request if not finished +RequestTimeout = 5; + +// log path for advanced log report +LogPath = "/."; + +// setup for deployment environment with external configuration system responsible for launching apps and +// for configuring AES services +DontLaunchServicesDirectly = 1; +UseExplicitAESRegistration = 1; +KillServicesOnDisconnect = 1; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 0; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +NegFiltersDebug = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF" }; +NegFiltersInfo = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "CF", " ping", " pong" }; +NegFiltersWarning = { "CT_LRC" }; + +#include "./aes_alias_name.cfg" + +StartCommands= +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", + + + // create the admin executor service module + "moduleManager.createModule AdminExecutorService aes", + + // create a gateway to connect to as + "moduleManager.createModule StandardGateway asc_gw", + // create a layer 3 client + "asc_gw.transportAdd L3Client l3c", + "asc_gw.transportCmd l3c(connect addr="+ASHost+":"+ASPort+")", + + // create a gateway for services to connect + "moduleManager.createModule StandardGateway aes_gw", + // create a layer 3 server + "aes_gw.transportAdd L3Server l3s", + "aes_gw.transportOptions l3s(PeerInvisible)", + "aes_gw.transportCmd l3s(open port="+AESPort+")", + + // plug the as + "aes.plug asc_gw", + "aes.plug aes_gw", + +}; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores b/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh new file mode 100644 index 000000000..27279677c --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh @@ -0,0 +1,18 @@ +#!/bin/sh - + +DOMAIN=$(pwd |sed "s%/srv/core/%%") + +while(true) +do + echo AESAliasName= \"aes_$(hostname -s)\"\; > ./aes_alias_name.cfg + + if [ $(grep "AESPort[ \t]*=" */*cfg | grep -v debug | sed "s/.*=[ \t]*//" | sort -u | wc -l) != 1 ] ; then echo - FIXME: services don\'t agree on AESPort ; read ; fi + echo AESPort=$(grep "AESPort[ \t]*=" */*cfg| grep -v debug | sed "s/.*=[ \t]*//" | sort -u) >> ./aes_alias_name.cfg + + if [ $(grep "ASPort[ \t]*=" */*cfg | grep -v debug | sed "s/.*=[ \t]*//" | sort -u | wc -l) != 1 ] ; then echo - FIXME: services don\'t agree on ASPort ; read ; fi + echo ASPort=$(grep "ASPort[ \t]*=" */*cfg| grep -v debug | sed "s/.*=[ \t]*//" | sort -u) >> ./aes_alias_name.cfg + + ./live/service_ryzom_admin_service/ryzom_admin_service -A. -C. -L. --nobreak --fulladminname=admin_executor_service --shortadminname=AES + sleep 2 +done + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh new file mode 100644 index 000000000..ce5a204e5 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +while true +do + cd /srv/core/ + if [ -e /srv/core/admin_install.tgz ] + then + tar xvzf admin_install.tgz + fi + + cd /srv/core/patchman/ + if [ $(grep $(hostname) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname) patchman_list | awk '{ print $1 }') + elif [ $(grep $(hostname -s) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname -s) patchman_list | awk '{ print $1 }') + elif [ $(grep $(hostname -d) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname -d) patchman_list | awk '{ print $1 }') + else + export SERVER_TYPE=default + echo "ERROR: Neither \'hostname\' \($(hostname)\) nor \'hostname -s\' \($(hostname -s)\) nor \'hostname -d\' \($(hostname -d)\) found in $(pwd)/patchman_list" + fi + CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg + + if [ ! -e $CFGFILENAME ] + then + echo ERROR: Failed to locate the following file: $CFGFILENAME + echo using default files + export SERVER_TYPE=default + CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg + + if [ ! -e $CFGFILENAME ] + then + echo ERROR: Failed to locate the following DEFAULT file: $CFGFILENAME + echo "press enter" + read toto + exit + fi + fi + + echo ssh keys file: $KEYSFILENAME + echo cfg file: $CFGFILENAME + + /bin/sh loop_patchman_once.sh +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh new file mode 100644 index 000000000..0dd697aa4 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg +echo cfg file: $CFGFILENAME + +AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg +echo aes cfg file: $AESCFGFILENAME + +cd /srv/core/patchman +if [ -e $CFGFILENAME ] + then + + # setup the config file for the patchman + echo Using configuration file: $CFGFILENAME + cp $CFGFILENAME patchman_service.cfg + + # setup the config file for the admin executor service + echo Using aes configuration file: $AESCFGFILENAME + if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi + + # start the patchman service + echo Launching patchman... + ./ryzom_patchman_service -C. -L. + + sleep 2 + if [ -e core* ] + then + if [ -e dont_keep_cores ] + then + rm core* + fi + fi + +else + echo ERROR: Failed to locate config file: $CFGFILENAME + echo trying again in a few seconds... + sleep 10 +fi +cd - diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh new file mode 100644 index 000000000..af1f5b599 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +if [ "$1" == "" ] +then + echo + echo USAGE: $0 command_line + echo + echo example: + echo $0 echo hello world + echo displays 'hello world' repeatedly, delaying 3 seconds between repeats + echo + exit +fi + +while true +do + sleep 3 + eval $* +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh new file mode 100644 index 000000000..e4bd1fa2d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh @@ -0,0 +1,106 @@ +#! /bin/sh - + +# note: this script should be run from a domain directory such as /srv/core/std01 or /srv/core/mini01 +DOMAIN=$(pwd |sed 's/\/srv\/core\///') +if [ "patchman" = "$DOMAIN" ]; then DOMAIN= ; fi +if [ "bin" = "$DOMAIN" ]; then DOMAIN= ; fi +if [ "$DOMAIN" != $(echo $DOMAIN|sed 's/\///g') ]; then DOMAIN= ; fi +if [ _"${DOMAIN}"_ = __ ] +then + echo This is not a valid directory for running this script + exit +fi + +# tell the aes to shut everybody down +printf "0" > ./global.launch_ctrl + +# before entering the 'Waiting for Services' loop, get rid of the ras/ras.state file because the ras doesn't stop properly otherwise +if [ -f ras/ras.state ] +then + rm ras/ras.state +fi + +# while there are still services running, wait +while [ $(grep -i RUNNING . */*.state|wc -l) != 0 ] +do + echo $DOMAIN: Waiting for $(grep -i RUNNING . */*.state|wc -l) Services to stop + sleep 2 +done + +# stop the screen for the shard (if there is one) +screen -drR -S $DOMAIN -X quit> /dev/null +sleep 1 + +# rename any old core files +for COREFILE in */core* +do + mv $COREFILE $(echo $COREFILE|sed "s%/.*%%")/v$(cat live/version)_$(echo $COREFILE|sed "s%.*/%%") +done + +# rename any old log files +for LOGFILE in */log*.log +do + mv $LOGFILE $(echo $LOGFILE|sed "s%/.*%%")/v$(cat live/version)_$(echo $LOGFILE|sed "s%.*/%%") +done + +# swap the live and next directories +rm -r old_live/* 2> /dev/null +echo next=$(cat next/version) live=$(cat live/version) +mv live old_live +echo next=$(cat next/version) old_live=$(cat old_live/version) +mv next live +echo old_live=$(cat old_live/version) live=$(cat live/version) +mv old_live next +echo next=$(cat next/version) live=$(cat live/version) + +# restore any old log files in case of return to previous version +for LOGFILE in */v$(cat live/version)_log*.log +do + mv $LOGFILE $(echo $LOGFILE|sed "s%/.*%%")/$(echo $LOGFILE|sed "s%.*/.*_%%") +done + +# make the ryzom services executable +chmod 775 live/service_*/*_service 2> /dev/null + +# special case to deal with www files that need a local cfg file to be properly setup +if [ -e ./live/data_www/config.php ] + then + echo \./live/data_www/config.php + echo >>./live/data_www/config.php + echo \$USERS_DIR = \'$(pwd)/www\'\; >>./live/data_www/config.php + echo \$TEMPLATE_DIR = \'./template\'\; >>./live/data_www/config.php + echo >>./live/data_www/config.php + echo \?\> >>./live/data_www/config.php + mkdir -p $(pwd)/save_shard/www +fi + +# remove any launch ctrl files that are floating about +rm -v */*.*launch_ctrl *.*launch_ctrl 2> /dev/null + +# initialise the state files for the new services to "xxxxx" and remove directories that are no longer of interest +for D in $(ls */log.log | sed "s%/.*%%" | sort -u) +do + if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) == 1 ] + then + printf "xxxxx" > $D/$D.state + else + mkdir -p old + mv $D old/ + fi +done + +# tell the aes to launch everybody... +printf "1" > ./global.launch_ctrl + +# create a script for accessing the screen for this shard +SCRIPT_FILE=/srv/core/bin/${DOMAIN} +echo "#!/bin/sh" > $SCRIPT_FILE +echo "cd "$(pwd) >> $SCRIPT_FILE +echo '/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $*' >> $SCRIPT_FILE +chmod +x $SCRIPT_FILE + +# launch the screen again now that were all done (aes will launch everybody when he comes online) +cp /srv/core/$DOMAIN/${DOMAIN}.screen.rc /srv/core/${DOMAIN}.screen.rc +#screen -S $DOMAIN -d -m -c /srv/core/${DOMAIN}.screen.rc +$SCRIPT_FILE batchstart + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list new file mode 100644 index 000000000..a5802320e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list @@ -0,0 +1,6 @@ +// default values for different sites + +mini01 mini01.ryzomcore.org +mini01 ep1.mini01.ryzomcore.org +std01 std01.ryzomcore.org +std01 core.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg new file mode 100644 index 000000000..981654046 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg @@ -0,0 +1,37 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44752)", + + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg new file mode 100644 index 000000000..41c283b63 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg @@ -0,0 +1,45 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup patch applier + + // setup an 'spa' module for applying patches as required + "moduleManager.createModule ServerPatchApplier spa path=/srv/core host=" + SPAHost, + "spa.plug bridge_gw", + "spa.plug spm_gw", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg new file mode 100644 index 000000000..32166d6bf --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg @@ -0,0 +1,65 @@ +// ***************************************************************************** +// *** Setup for the mini01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the mini01 hub + + // Create a gateway modul on layer 3 transport and open it + "moduleManager.createModule StandardGateway hub_mini01", + "hub_mini01.transportAdd L3Server l3server", + "hub_mini01.transportCmd l3server(open port=44749)", + + + //------------------------------------------------------------------------------ + // Setup the bridge hub + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway hub_bridge", + "hub_bridge.transportAdd L3Server l3server", + "hub_bridge.transportCmd l3server(open port=44745)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup mini01 Bridge module + + // setup a bridge module to relay files from internal to mini01 networks andd plug it in + "moduleManager.createModule ServerPatchBridge bridge path=/srv/core/bridge_server/", + "bridge.plug hub_mini01", + "bridge.plug hub_bridge", + "bridge.plug spm_gw", + + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub_mini01", + "pam.plug spm_gw", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg new file mode 100644 index 000000000..8e6923a2b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg @@ -0,0 +1,41 @@ +// ***************************************************************************** +// *** Setup for the mini01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the mini01 spm hub + + "moduleManager.createModule StandardGateway hub", + "hub.transportAdd L3Server l3server", + "hub.transportCmd l3server(open port=44751)", + + + //------------------------------------------------------------------------------ + // Setup manager module for mini01 version numbers etc and plug it in + + "moduleManager.createModule ServerPatchManager spm_mini01 name=spm_mini01", + "spm_mini01.plug hub", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg new file mode 100644 index 000000000..e8c2d5787 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg @@ -0,0 +1,45 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.std01.ryzomcore.org:44752)", + + + //------------------------------------------------------------------------------ + // Setup patch applier + + // setup an 'spa' module for applying patches as required + "moduleManager.createModule ServerPatchApplier spa path=/srv/core host=" + SPAHost, + "spa.plug bridge_gw", + "spa.plug spm_gw", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg new file mode 100644 index 000000000..79d259e4e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg @@ -0,0 +1,41 @@ +// ***************************************************************************** +// *** Setup for the std01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the std01 spm hub + + "moduleManager.createModule StandardGateway hub", + "hub.transportAdd L3Server l3server", + "hub.transportCmd l3server(open port=44752)", + + + //------------------------------------------------------------------------------ + // Setup manager module for std01 version numbers etc and plug it in + + "moduleManager.createModule ServerPatchManager spm_std01 name=spm_std01", + "spm_std01.plug hub", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg new file mode 100644 index 000000000..082dcd6eb --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg @@ -0,0 +1,17 @@ +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +//-------------------------------------------------------------------------------- +// Common Filters + +// where to save specific shard data (ie: player backup) +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "LNET" }; +NegFiltersWarning = { "LNETL", "CT_LRC", "VAR:" }; + +FileReceiverDataBlockSize = 1000000; +FileReceiverMaxMessageCount = 10; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg new file mode 100644 index 000000000..8aea88a5f --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg @@ -0,0 +1,17 @@ +//-------------------------------------------------------------------------------- +// Stuff for Linux (as opposed to Windows) + +#include "patchman_service_base.cfg" + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 0; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default b/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default new file mode 100644 index 000000000..ac2202aab --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off + +screen -t aes /bin/sh /srv/core/patchman/loop_aes.sh + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh new file mode 100644 index 000000000..091892af7 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh @@ -0,0 +1,97 @@ +#!/bin/sh + +# the object is to make a launcher script that works with a command file to determine when to launch the application that it is responsible for + +DOMAIN=$(pwd |sed "s%/srv/core/%%" | sed "s%/.*%%") +NAME_BASE=$(pwd | sed 's/\/srv\/core\///' | sed 's/^.*\///') + +#if [ _$DOMAIN == _pre_live ] +# then + CTRL_FILE=${NAME_BASE}.launch_ctrl + NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl +#elif [ _$DOMAIN == _pre_pre_live ] +# then +# CTRL_FILE=${NAME_BASE}.launch_ctrl +# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl +#else +# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl +# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl +#fi +STATE_FILE=${NAME_BASE}.state +START_COUNTER_FILE=${NAME_BASE}.start_count +CTRL_CMDLINE=$* + +echo +echo --------------------------------------------------------------------------------- +echo Starting service launcher +echo --------------------------------------------------------------------------------- +printf "%-16s = " CMDLINE ; echo $CTRL_CMDLINE +printf "%-16s = " CTRL_FILE ; echo $CTRL_FILE +printf "%-16s = " NEXT_CTRL_FILE ; echo $NEXT_CTRL_FILE +printf "%-16s = " STATE_FILE ; echo $STATE_FILE +echo --------------------------------------------------------------------------------- +echo + +# reinit the start counter +echo 0 > $START_COUNTER_FILE +START_COUNTER=0 + +echo Press ENTER to launch program +while true +do + + # see if the conditions are right to launch the app + if [ -e $CTRL_FILE ] + then + + # a control file exists so read it's contents + CTRL_COMMAND=_$(cat $CTRL_FILE)_ + + # do we have a 'launch' command? + if [ $CTRL_COMMAND = _LAUNCH_ ] + then + + # update the start counter + START_COUNTER=$(( $START_COUNTER + 1 )) + echo $START_COUNTER > $START_COUNTER_FILE + + # big nasty hack to deal with the special cases of ryzom_naming_service and ryzom_admin_service who have badly names cfg files + for f in ryzom_*cfg + do + cp $f $(echo $f | sed "s/ryzom_//") + done + + # we have a launch command so prepare, launch, wait for exit and do the housekeeping + echo ----------------------------------------------------------------------- + echo Launching ... + echo + printf RUNNING > $STATE_FILE + + $CTRL_CMDLINE + + echo ----------------------------------------------------------------------- + printf STOPPED > $STATE_FILE + + # consume (remove) the control file to allow start once + rm $CTRL_FILE + + echo Press ENTER to relaunch + fi + fi + + # either we haven't launched the app yet or we have launched and it has exitted + if [ -e $NEXT_CTRL_FILE ] + then + # we have some kind of relaunch directive lined up so deal with it + mv $NEXT_CTRL_FILE $CTRL_FILE + else + # give the terminal user a chance to press enter to provoke a re-launch + HOLD=`sh -ic '{ read a; echo "ENTER" 1>&3; kill 0; } | { sleep 2; kill 0; }' 3>&1 2>/dev/null` + if [ _${HOLD}_ != _HOLD_ ] + then + printf LAUNCH > $CTRL_FILE + fi + fi + +done + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list new file mode 100644 index 000000000..5aa8da350 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list @@ -0,0 +1,11 @@ + +// mini01 - mini manager + +mini01_spm ep1.mini01.ryzomcore.org +mini01_bridge ep1.mini01.ryzomcore.org + + +// std01 - std manager + +std01_spm ep1.std01.ryzomcore.org +std01_bridge ep1.std01.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg new file mode 100644 index 000000000..45f2afe3f --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg @@ -0,0 +1 @@ +SPAHost = "ep1.mini01.ryzomcore.org"; diff --git a/code/ryzom/server/patchman_cfg/cfg/00_base.cfg b/code/ryzom/server/patchman_cfg/cfg/00_base.cfg new file mode 100644 index 000000000..5dba5a53b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/00_base.cfg @@ -0,0 +1,125 @@ +// Configure module gateway for layer 5 module comm +StartCommands += +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", +}; + +/// A list of vars to graph for any service +GraphVars = +{ + "ProcessUsedMemory", "60000", // every minute +}; + + +/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) + * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" + * Only log analyser must have the $shard parameter to find all shards root directory + */ +PDRootDirectory = ""; + +// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log +PDEnableLog = 1; + +// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log +PDEnableStringLog = 0; + +// Number of seconds between 2 logs to file +PDLogUpdate = 10; + +// MySGL wrapper strict mode - controls use of asserts if SQL requests fail +MSWStrictMode=0; + +// This is the mapping for logical continent to physical one +ContinentNameTranslator = +{ + "matis_newbie", "matis", + "zorai_newbie", "zorai", + "terre", "terre_oubliee", + "sources", "sources_interdites" +}; + +NegFiltersDebug = { "ZZZZZZZZZZZ" }; +NegFiltersInfo = { "ZZZZZZZZZZZ" }; +NegFiltersWarning = { "ZZZZZZZZZZZ" }; +//NegFiltersDebug = { "NET", "ADMIN", "MIRROR", "NC", "PATH" }; +//NegFiltersInfo = { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; +// NegFiltersWarning = { "CT_LRC", "AnimalSpawned" }; + +// Block the system in the tick service that provokes stalls when overloaded +WaitForBSThreshold=0; + +// Only produce log*.log files and not *.log +DontLog=1; + +IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 6000000; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// MS Packet size limit in bytes, PER DATASET (warning: depending on the weights, limits per property may be very small) +MaxOutBandwidth = 100000000; + +// how to sleep between 2 network updates +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +// The privileges needed to access any ring session +PrivilegeForSessionAccess = ":DEV:SGM:GM:SG:"; + +// The max number of ring points (aka ring access) for each ecosystem +MaxRingPoints = "A1:D7:F7:J8:L6:R13"; + +// Level limit for newb scenarios +FreeTrialSkillLimit=21; + +// Level limit for newb scenarios +DefaultInterShardExchangeLevelCap=0; + +// Configuration for DSS +MaxNpcs = 300; +MaxStaticObjects = 200; + +// the following variable must be defined but should be empty - it's presence is used to change the behaviour +// of the packed sheet reader +GeorgePaths = { "" }; + +// Disable nel net verbose logging +VerboseNETTC = 0; +VerboseLNETL0 = 0; +VerboseLNETL1 = 0; +VerboseLNETL2 = 0; +VerboseLNETL3 = 0; +VerboseLNETL4 = 0; +VerboseLNETL5 = 0; +VerboseLNETL6 = 0; + +// Disable ryzom verbose logging +VerboseMIRROR = 0; +VerboseRingRPLog = 0; +VerboseCDBGroup = 0; + diff --git a/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg b/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg new file mode 100644 index 000000000..3a07c8612 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg @@ -0,0 +1,80 @@ +// What to do with characters coming from another mainland shard? +// 0: teleport to the stored session id +// 1: let the character play anyway, but leave the stored session id unchanged +// 2: assign the stored session id with FixedSessionId and let play +AllowCharsFromAllSessions = 0; + +// Use Shard Unifier or not +DontUseSU = 0; + +// the domain's set of useful addresses +LSHost = SUHost; +RSMHost = SUHost; + +// MFS config +WebSrvUsersDirectory = ""; +HoFHDTDirectory = "/srv/core/www/hof/hdt"; + +// BS Specifics -------------------------------------------------------------------------- +// BS - set to 1 if a BS is not part of a naming service group (then BS not disclosed +// to other services by the Layer 5, i.e. the services sending requests to BS have +// to know its/their address(es) by another mean) +BSDontUseNS = 1; +// BS - set the host of the naming service where the BS register +BSNSHost = "localhost"; +UseBS = 1; +XMLSave = 0; + +// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot +SaveFilesDirectory = ""; + +// where to save generic shard data (ie: packed_sheet) +WriteFilesDirectory = "r2_shard/data_shard"; + +// Will SaveFilesDirectory will be converted to a full path? +ConvertSaveFilesDirectoryToFullPath = 0; + +// BS - Root directory where data are backuped to +IncrementalBackupDirectory = "../incremental_backup"; + +// IOS - Directory to store ios.string_cache file +StringManagerCacheDirectory = "../data_shard_local"; + +// IOS - Directory to log chat into +LogChatDirectory = "../data_shard_local"; + +// MFS - Directories +WebRootDirectory = "../www"; + +// Root directory where data from shards are stored into +SaveShardRoot = "../save_shard/"; + +// SU Specifics -------------------------------------------------------------------------- +// SU - set to 1 if SU didn't use a naming service +SUDontUseNS = 1; +// SU - host for the NS used by SU +SUNSHost = "localhost"; +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; +// SU - nel and ring database names +DBNelName = "nel"; +DBRingName = "ring_mini01"; +// Nel DB user +DBNelUser = "su_agent"; +// Ring DB user +DBRingUser = "su_agent"; +// SU - password to access to the nel database with DBNelUseruser (default is no password) +DBNelPass = "p4ssw0rd"; +// SU - password to access to the ring database with DBRingUser (default is no password) +DBRingPass = "p4ssw0rd"; + +// WS Specifics -------------------------------------------------------------------------- +// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring) +DontUseLSService = 1; + +// Global config -------------------------------------------------------------------------- +// set to 0 if you want to use the admin system +DontUseAES = 1; + +// Dissable generation / display of nldebug messages +DissableNLDebug = 1; diff --git a/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg new file mode 100644 index 000000000..f8e243d68 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg @@ -0,0 +1,81 @@ +// What to do with characters coming from another mainland shard? +// 0: teleport to the stored session id +// 1: let the character play anyway, but leave the stored session id unchanged +// 2: assign the stored session id with FixedSessionId and let play +AllowCharsFromAllSessions = 0; + +// Use Shard Unifier or not +DontUseSU = 0; + +// the domain's set of useful addresses +LSHost = SUHost; +RSMHost = SUHost; + +// MFS config +WebSrvUsersDirectory = ""; +// WebRootDirectory = "/srv/core/std01/save_shard/www"; // DUPLICATE LOWER +HoFHDTDirectory = "/srv/core/www/hof/hdt"; + +// BS Specifics -------------------------------------------------------------------------- +// BS - set to 1 if a BS is not part of a naming service group (then BS not disclosed +// to other services by the Layer 5, i.e. the services sending requests to BS have +// to know its/their address(es) by another mean) +BSDontUseNS = 1; +// BS - set the host of the naming service where the BS register +BSNSHost = "localhost"; +UseBS = 1; +XMLSave = 0; + +// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot +SaveFilesDirectory = ""; + +// where to save generic shard data (ie: packed_sheet) +WriteFilesDirectory = "r2_shard/data_shard"; + +// Will SaveFilesDirectory will be converted to a full path? +ConvertSaveFilesDirectoryToFullPath = 0; + +// BS - Root directory where data are backuped to +IncrementalBackupDirectory = "../incremental_backup"; + +// IOS - Directory to store ios.string_cache file +StringManagerCacheDirectory = "../data_shard_local"; + +// IOS - Directory to log chat into +LogChatDirectory = "../data_shard_local"; + +// MFS - Directories +WebRootDirectory = "../www"; + +// Root directory where data from shards are stored into +SaveShardRoot = "../save_shard/"; + +// SU Specifics -------------------------------------------------------------------------- +// SU - set to 1 if SU didn't use a naming service +SUDontUseNS = 1; +// SU - host for the NS used by SU +SUNSHost = "localhost"; +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; +// SU - nel and ring database names +DBNelName = "nel"; +DBRingName = "ring_std01"; +// Nel DB user +DBNelUser = "su_agent"; +// Ring DB user +DBRingUser = "su_agent"; +// SU - password to access to the nel database with DBNelUseruser (default is no password) +DBNelPass = "p4ssw0rd"; +// SU - password to access to the ring database with DBRingUser (default is no password) +DBRingPass = "p4ssw0rd"; + +// WS Specifics -------------------------------------------------------------------------- +// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring) +DontUseLSService = 1; + +// Global config -------------------------------------------------------------------------- +// set to 0 if you want to use the admin system +DontUseAES = 1; + +// Dissable generation / display of nldebug messages +DissableNLDebug = 1; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg new file mode 100644 index 000000000..88cd8e2b3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg @@ -0,0 +1,50 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 1000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 0; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = ShardId; + +// Mirror limits +DatasetSizefe_temp = 300000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard opration, more than one allocate more bandwidth +BandwidthRatio = 1; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5; +NbForageSourcesLimit = 1000; +NbToxicCloudsLimit = 200; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 20000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "indoors", "4", // NB : this is for uninstanciated indoors building. + "newbieland", "20" +}; + +// define the primitives configuration used. +UsedPrimitives = +{ + "newbieland_all", +// "newbieland", +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg new file mode 100644 index 000000000..ffa3ad2fb --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg @@ -0,0 +1,51 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 1000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 1; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = 0; + +// Mirror limits +DatasetSizefe_temp = 200000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard operation, more than one allocate more bandwidth +BandwidthRatio = 2; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5; +NbForageSourcesLimit = 100; +NbToxicCloudsLimit = 20; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 5000; +NbNpcLimit = 35000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "r2_desert", "10000", + "r2_forest", "10001", + "r2_jungle", "10002", + "r2_lakes", "10003", + "r2_roots", "10004", +}; + +// define the primitives configuration used. +UsedPrimitives = +{ +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg new file mode 100644 index 000000000..1141fa198 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg @@ -0,0 +1 @@ +// This cfg file defines stuff that's common to all mini unifier shards diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg new file mode 100644 index 000000000..832ac4452 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg @@ -0,0 +1,50 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 5000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 0; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = ShardId; + +// Mirror limits +DatasetSizefe_temp = 600000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard opration, more than one allocate more bandwidth +BandwidthRatio = 1; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5000; +NbForageSourcesLimit = 10000; +NbToxicCloudsLimit = 5000; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 20000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "indoors", "4", // NB : this is for uninstanciated indoors building. + "newbieland", "20" +}; + +// define the primitives configuration used. +UsedPrimitives = +{ + "newbieland_all", +// "newbieland", +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg new file mode 100644 index 000000000..777944200 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg @@ -0,0 +1,51 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 5000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 1; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = 0; + +// Mirror limits +DatasetSizefe_temp = 600000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard operation, more than one allocate more bandwidth +BandwidthRatio = 2; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5000; +NbForageSourcesLimit = 10000; +NbToxicCloudsLimit = 5000; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 50000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "r2_desert", "10000", + "r2_forest", "10001", + "r2_jungle", "10002", + "r2_lakes", "10003", + "r2_roots", "10004", +}; + +// define the primitives configuration used. +UsedPrimitives = +{ +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg new file mode 100644 index 000000000..444c0ed2e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg @@ -0,0 +1 @@ +// This cfg file defines stuff that's common to all standard unifier shards diff --git a/code/ryzom/server/patchman_cfg/default/ai_service.cfg b/code/ryzom/server/patchman_cfg/default/ai_service.cfg new file mode 100644 index 000000000..72b278cc0 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/ai_service.cfg @@ -0,0 +1,353 @@ + +// a list of system command that run at server startup. +SystemCmd = {}; + + +//NegFiltersDebug += { "LNET", "HNET", "FEVIS"}; +//NegFiltersInfo += { "LNET", "HNET", "VISION_DELTA", "FEIMPE", "FEVIS" }; +// NegFiltersWarning += { "LNET", "FEHACK", "FERECV"}; +// NegFiltersWarning += { "positional", "faction", "pet" }; + +////////////////////////////////////////////////////////////////////////////// +//- Basic (specific) heal profile parameters --------------------------------- +// Downtime for normal heal (on other bots of the group) +HealSpecificDowntime = 100; +// Downtime for self heal +HealSpecificDowntimeSelf = 100; +////////////////////////////////////////////////////////////////////////////// + +// Disable caching of ligo primitive in binary files +CachePrims = 0; +CachePrimsLog = 0; + +// do not log the corrected position. +LogAcceptablePos = 0; +// do not log group creation failure +LogGroupCreationFailure = 0; +// do not log aliad tree owner construstion. +LogAliasTreeOwner = 0; +// do not log outpost info +LogOutpostDebug = 0; +// Speed factor, for debug purpose only. Don't set to high speed factor ! +SpeedFactor = 1; +// Speep up the timer triggering. Set a value between 1 (normal) and INT_MAX. +TimerSpeedUp = 1; + +// Default timer for wander behavior +DefaultWanderMinTimer = 50; // 5s +DefaultWanderMaxTimer = 100; // 10s + +// Fame and guard behavior +// Fame value under witch the guard attack the player in sigth +FameForGuardAttack = -450000; +// The minimum of fame for guard to help the player +FameForGuardHelp = -200000; + +// The default aggro distance for NPC +DefaultNpcAggroDist = 15; +// The default escort range for escort behavior +DefaultEscortRange = 10; + +////////////////////////////////////////////////////////////////////////////// +// Aggro // +////////////////////////////////////////////////////////////////////////////// +AggroReturnDistCheck = 15.0; +AggroReturnDistCheckFauna = 15.0; +AggroReturnDistCheckNpc = 1.5; +AggroD1Radius = 250.0; +AggroD2Radius = 150.0; +AggroPrimaryGroupDist = 0.0; +AggroPrimaryGroupCoef = 0.0; +AggroSecondaryGroupDist = 0.0; +AggroSecondaryGroupCoef = 0.0; +AggroPropagationRadius = 60.0; + +BotRepopFx = ""; + +// GROUP KEYWORDS +// used mainly in event handlers to determine to which groups events apply +KeywordsGroupNpc = { + + "patrol", // a group of bots who guard a patrol route or point + "convoy", // a group with pack animals who follow roads from place to place + "with_players", // a group who may travel with players +}; + +// BOT KEYWORDS +// used mainly in npc_state_profile to determine which ai profiles to assign to which bots +KeywordsBotNpc = { + + "team_leader", // a bot who leads the way in front of their team (and acts as leader + // in discussion with players) + "animal_leader", // a bot who leads pack animals + "guard", // a bot who is a guard of some sort (eg karavan guard) + "emissary", // eg karavan emissary + "preacher", // eg kami preacher + "guardian", // typically kami guardians + "vip", // someone who has an escort of players or NPCs (assumed to be harmless) +}; + +// STATE KEYWORDS +// used mainly in event handlers to determine to which state events apply +// eg: when a player goes link dead if the team that this player is escorting +// is in a dangerous area the team may enter a 'protect ourselves and wait for +// players' punctual state +KeywordsStateNpc = { + + "safe", // eg the gathering point at town entrance + "dangerous", // eg a route through the wilds +}; + +ColourNames = +{ + "red : 0", + "beige : 1", + "green : 2", + "turquoise : 3", + "blue : 4", + "violet : 5", + "white : 6", + "black : 7", + + "redHair: 0", + "blackHair: 1", +}; + + +StartCommandsWhenMirrorReady = { +}; + +//--------------------------------------------------------- +// commands for multi IA configuration +// For multi IA config, use the -m command line switch folowed +// by a semicolon separated list of command block to run. +// ex : +// -mCommon:Matis:Post +// will execute the folowing command blocks in order : +// * StartCommandsWhenMirrorReadyCommon +// * StartCommandsWhenMirrorReadyMatis +// * StartCommandsWhenMirrorReadyPost +//--------------------------------------------------------- +// common commands before loading continents +StartCommandsWhenMirrorReadyCommon = +{ + "RandomPosMaxRetry 6400", + "fightRangeRange 4 60", + "LogOutpostDebug 1", + "grpHistoryRecordLog", + + "verboseAIProfiles", + "verboseAliasNodeTreeParserLog", + "verboseCombatLog", + "verboseFaunaMgrLog", + "verboseFaunaParseLog", + "verboseNPCBotProfiles", + "verboseNPCMgrLog", + "verboseNPCParserLog", + "verboseNpcDescriptionMsgLog", + "verbosePrimitiveParserLog", +// "verboseSwitchMultipleChangesOfAProperty", +}; + + +// commands for indoors continent +StartCommandsWhenMirrorReadyIndoors = +{ + "loadContinent indoors", + "createStaticAIInstance indoors", + "loadMapsFromCommon indoors_all", +}; + +// commands for Matis continent +StartCommandsWhenMirrorReadyMatis = +{ + "loadContinent matis", + "createStaticAIInstance matis", + "loadMapsFromCommon matis_all", +}; + +// commands for Matis newbie continent +StartCommandsWhenMirrorReadyMatisNewbie = +{ + "loadContinent matis", + "createStaticAIInstance matis_newbie", + "loadMapsFromCommon matis_newbie_all", +}; + +// commands for Zorai continent +StartCommandsWhenMirrorReadyZorai = +{ + "loadContinent zorai", + "createStaticAIInstance zorai", + "loadMapsFromCommon zorai_all", +}; + +// commands for Zorai newbie continent +StartCommandsWhenMirrorReadyZoraiNewbie = +{ + "loadContinent zorai", + "createStaticAIInstance zorai_newbie", + "loadMapsFromCommon zorai_newbie_all", +}; + +// commands for Fyros continent +StartCommandsWhenMirrorReadyFyros = +{ + "loadContinent fyros", + "createStaticAIInstance fyros", + "loadMapsFromCommon fyros_all", +}; + +// commands for Fyros newbie continent +StartCommandsWhenMirrorReadyFyrosNewbie = +{ + "loadContinent fyros_newbie", + "createStaticAIInstance fyros_newbie", + "loadMapsFromCommon fyros_newbie_all", +}; + +// commands for Tryker continent +StartCommandsWhenMirrorReadyTryker = +{ + "loadContinent tryker", + "createStaticAIInstance tryker", + "loadMapsFromCommon tryker_all", +}; + +// commands for Tryker newbie continent +StartCommandsWhenMirrorReadyTrykerNewbie = +{ + "loadContinent tryker_newbie", + "createStaticAIInstance tryker_newbie", + "loadMapsFromCommon tryker_newbie_all", +}; + +// commands for bagne continents +StartCommandsWhenMirrorReadyBagne = +{ + "loadContinent bagne", + "createStaticAIInstance bagne", + "loadMapsFromCommon bagne_all", +}; + +StartCommandsWhenMirrorReadyNexus = +{ + "loadContinent nexus", + "createStaticAIInstance nexus", + "loadMapsFromCommon nexus_all", +}; + +StartCommandsWhenMirrorReadyRouteGouffre = +{ + "loadContinent route_gouffre", + "createStaticAIInstance route_gouffre", + "loadMapsFromCommon route_gouffre_all", +}; + +StartCommandsWhenMirrorReadySources = +{ + "loadContinent sources_interdites", + "createStaticAIInstance sources", + "loadMapsFromCommon sources_all", +}; + +StartCommandsWhenMirrorReadyTerre = +{ + "loadContinent terre_oubliee", + "createStaticAIInstance terre", + "loadMapsFromCommon terre_all", +}; + +// commands for Fyros Island continent +StartCommandsWhenMirrorReadyFyrosIsland = +{ + "loadContinent fyros_island", + "createStaticAIInstance fyros_island", + "loadMapsFromCommon fyros_island_all", +}; + +// commands for Zorai Island continent +StartCommandsWhenMirrorReadyZoraiIsland = +{ + "loadContinent zorai_island", + "createStaticAIInstance zorai_island", + "loadMapsFromCommon zorai_island_all", +}; + +// commands for Tryker Island continent +StartCommandsWhenMirrorReadyTrykerIsland = +{ + "loadContinent tryker_island", + "createStaticAIInstance tryker_island", + "loadMapsFromCommon tryker_island_all", +}; + +// commands for Matis island continent +StartCommandsWhenMirrorReadyMatisIsland = +{ + "loadContinent matis_island", + "createStaticAIInstance matis_island", + "loadMapsFromCommon matis_island_all", +}; + +// commands for Newbieland continent +StartCommandsWhenMirrorReadyNewbieland = +{ + "loadContinent newbieland", + "createStaticAIInstance newbieland", + "loadMapsFromCommon newbieland_all", +}; + +// commands for Kitiniere continent +StartCommandsWhenMirrorReadyKitiniere = +{ + "loadContinent kitiniere", + "createStaticAIInstance kitiniere", + "loadMapsFromCommon kitiniere_all", +}; + +// commands for post continents loading +StartCommandsWhenMirrorReadyPost = +{ + "spawnInstances", + "updateAI", + "updateAI", +}; + + +// commands for Ring continents +StartCommandsWhenMirrorReadyRing = +{ + "loadContinent r2_desert", + "createDynamicAIInstance 10000", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_forest", + "createDynamicAIInstance 10001", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_lakes", + "createDynamicAIInstance 10003", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_jungle", + "createDynamicAIInstance 10002", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_roots", + "createDynamicAIInstance 10004", + "loadPrimitiveFile dummy.primitive", + +// "spawnInstances", + "updateAI", + "updateAI", + + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a shard AIS Module + "moduleManager.createModule AisControl ais", + // Connect AIS + "ais.plug gw" +}; + diff --git a/code/ryzom/server/patchman_cfg/default/backup_service.cfg b/code/ryzom/server/patchman_cfg/default/backup_service.cfg new file mode 100644 index 000000000..a0e6b33e1 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/backup_service.cfg @@ -0,0 +1,9 @@ + +DontUseNS = BSDontUseNS; +NSHost = BSNSHost; + +// template path from SaveShardRoot to find character saves +SaveTemplatePath = "$shard/characters/account_$userid_$charid$ext"; + +// character saves possible extension list +SaveExtList = "_pdr.bin _pdr.xml .bin"; diff --git a/code/ryzom/server/patchman_cfg/default/entities_game_service.cfg b/code/ryzom/server/patchman_cfg/default/entities_game_service.cfg new file mode 100644 index 000000000..67a587ffd --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/entities_game_service.cfg @@ -0,0 +1,1776 @@ + +#ifndef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // add a layer 3 server transport for slave logger service + "lgs_gw.transportAdd L3Client slaveL3c", + // open the transport + "lgs_gw.transportCmd slaveL3c(connect addr="+SlaveLGSHost+":"+L3SlaveLGSPort+")", + + // Create a shard unifier client module + "moduleManager.createModule ShardUnifierClient suc", + // Create a client commands forwader module + "moduleManager.createModule ClientCommandForwader ccf", + + // Create a characer control module + "moduleManager.createModule CharacterControl cc", + + // Create a guild unifier module + "moduleManager.createModule GuildUnifier gu", + + //Create a shard unifier name mapper + "moduleManager.createModule CharNameMapperClient cnmc", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + + "suc.plug gw", + "ccf.plug gw", + "cc.plug gw", + "gu.plug glob_gw", + "cnmc.plug gw", + "lsc.plug lgs_gw", + +// "addNegativeFilterDebug LNETL", +// "addNegativeFilterDebug FG:", +}; + +#endif + +#ifdef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // Create a shard unifier client module + "moduleManager.createModule ShardUnifierClient suc", + // Create a client commands forwader module + "moduleManager.createModule ClientCommandForwader ccf", + + // Create a characer control module + "moduleManager.createModule CharacterControl cc", + + // Create a guild unifier module + "moduleManager.createModule GuildUnifier gu", + + //Create a shard unifier name mapper + "moduleManager.createModule CharNameMapperClient cnmc", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + + "suc.plug gw", + "ccf.plug gw", + "cc.plug gw", + "gu.plug glob_gw", + "cnmc.plug gw", + "lsc.plug lgs_gw", + +// "addNegativeFilterDebug LNETL", +// "addNegativeFilterDebug FG:", +}; + +#endif + +/// A list of vars to graph for EGS +GraphVars += +{ + "TotalNbItemForSale", "60000", // every minutes + "NbPlayers", "60000", // every minutes +}; + + +//min fraction of the total damage done on a creature that a group/player must do to be attributed a kill +KillAttribMinFactor = 0.3; + +//max bulk the player can transport * 1000 (*1000 to avoid float operations) +MaxPlayerBulk = 300000; + +//max weight in grammes a player can have on him if his strength is 0 +BaseMaxCarriedWeight = 300000; + +// base bulk of player room +BasePlayerRoomBulk = 2000000; + +// if true, every player that was saved with an invalid position will be corrected the next time he logs in. +CorrectInvalidPlayerPositions = 1; + +// Create Character Start skills value +//CreateCharacterStartSkillsValue = "SCMM1BS:220:SMLOEFA:235:SFM1BMM:215:SKILL_POINTS:200:MONEY:1000"; +//CreateCharacterStartSkillsValue = "SM:20:SMA:50:SMAP:51:SMAE:51:SMT:50:SMTC:51:SMTM:51:SMTO:51:SKILL_POINTS:2550:MONEY:50000"; + + +// Enable caching of ligo primitive in binary files +CachePrims = 1; +// Log to see which primitives where loaded from cache +CachePrimsLog = 0; + +//************************************************************************************************************* +// variable for stop area effect of a gameplay system +//************************************************************************************************************* +FightAreaEffectOn = 1; +MagicAreaEffectOn = 1; +HarvestAreaEffectOn = 1; + +//************************************************************************************************************* +// save period time (ticks). +//************************************************************************************************************* +GuildSavePeriod = 100; +GuildChargeSavePeriod = 99; +GuildMaxMemberCount = 255; + +TickFrequencyPCSave = 4800; +// minimum period between 2 consecutive saves of the same character +MinPlayerSavePeriod = 600; + +StoreSavePeriod = 10; + +//************************************************************************************************************* +// Max duration of death panalty (when you death several times and only style one point in your characteristics due to death penalty +//************************************************************************************************************* +DeathPenaltyMaxDuration = 18000; // 10 ticks per second * 60 for minutes * 30 for 30 minutes // No more used. +DeathXPFactor = 0.1; +DeathXPResorptionTime = 20; + +//************************************************************************************************************* +// Duration of comma +//************************************************************************************************************* +CommaDelayBeforeDeath = 3000; // 10 ticks per second * 60 for minutes * 5 for 5 minutes + +//************************************************************************************************************* +// Duration of dead mektoub stay spawned +//************************************************************************************************************* +SpawnedDeadMektoubDelay = 2592000; // 10 ticks per second * 60 for minutes * 60 for hours * 24 for days * 3 for 3 days + +//************************************************************************************************************* +// Progression +//************************************************************************************************************* +SkillProgressionFactor = 1.0; + +SkillFightValueLimiter = 250; +SkillMagicValueLimiter = 250; +SkillCraftValueLimiter = 250; +SkillHarvestValueLimiter = 250; + +NBMeanCraftRawMaterials = 1; //Mean of raw material used for craft an item, it's used for scale xp win when crafting an item with effective raw material used + +// when in a team value of each member above one for XP division among team members +XPTeamMemberDivisorValue = 0.5; + +// distance max for an action to be taken into account when in a team +MaxDistanceForXpGain = 110; + +// Max XP gain by any one player on any creature (each team member can gain up to this value) +MaxXPGainPerPlayer = 30.0; + + +//************************************************************************************************************* +// Characteristics parameters +//************************************************************************************************************* +//characteristic brick progression step +CharacteristicBrickStep = 5; +// Maximum value for characteristics (260 because characters begin with 10) +MaxCharacteristicValue = 260; + + +//************************************************************************************************************* +// Magic parameters +//************************************************************************************************************* +DefaultCastingTime = 1.0; +RechargeMoneyFactor = 1.0; +CristalMoneyFactor = 1.0; + +// int in ticks for following values +NoLinkSurvivalAddTime = 50; +NoLinkTimeFear = 10; +NoLinkTimeSleep = 30; +NoLinkTimeStun = 15; +NoLinkTimeRoot = 30; +NoLinkTimeSnare = 30; +NoLinkTimeSlow = 30; +NoLinkTimeBlind = 20; +NoLinkTimeMadness = 35; +NoLinkTimeDot = 20; +PostCastLatency = 10; // in ticks + +TickFrequencyCompassUpdate = 32; + +// update period of link spell in ticks +UpdatePeriodFear = 40; +UpdatePeriodSleep = 40; +UpdatePeriodStun = 40; +UpdatePeriodRoot = 40; +UpdatePeriodSnare = 40; +UpdatePeriodSlow = 40; +UpdatePeriodBlind = 40; +UpdatePeriodMadness = 40; +UpdatePeriodDot = 40; +DefaultUpdatePeriod = 40; + +// bonus on resist for each received spell +ResistIncreaseFear = 6; +ResistIncreaseSleep = 4; +ResistIncreaseStun = 8; +ResistIncreaseRoot = 4; +ResistIncreaseSnare = 3; +ResistIncreaseSlow = 4; +ResistIncreaseBlind = 7; +ResistIncreaseMadness = 5; + +ResistIncreaseAcid = 0; +ResistIncreaseCold = 0; +ResistIncreaseElectricity= 0; +ResistIncreaseFire = 0; +ResistIncreasePoison = 0; +ResistIncreaseRot = 0; +ResistIncreaseShockwave = 0; + +//************************************************************************************************************* +// Craft parameters +//************************************************************************************************************* +//////////////// +// DURABILITY // some kind of HP +// melee weapons +DaggerDurability = 100.0; +SwordDurability = 100.0; +MaceDurability = 100.0; +AxeDurability = 100.0; +SpearDurability = 100.0; +StaffDurability = 100.0; +MagicianStaffDurability = 100.0; +TwoHandSwordDurability = 100.0; +TwoHandAxeDurability = 100.0; +PikeDurability = 100.0; +TwoHandMaceDurability = 100.0; +// range weapon +AutolauchDurability = 100.0; +BowrifleDurability = 100.0; +LauncherDurability = 100.0; +PistolDurability = 100.0; +BowpistolDurability = 100.0; +RifleDurability = 100.0; +HarpoonDurability = 100.0; +// ammo +AutolaunchAmmoDurability = 100.0; +BowrifleAmmoDurability = 100.0; +GrenadeAmmoDurability = 100.0; +LauncherAmmoDurability = 100.0; +PistolAmmoDurability = 100.0; +BowpistolAmmoDurability = 100.0; +RifleAmmoDurability = 100.0; +HarpoonAmmoDurability = 100.0; +// armor and shield +ShieldDurability = 100.0; +BucklerDurability = 150.0; +LightBootsDurability = 100.0; +LightGlovesDurability = 100.0; +LightPantsDurability = 100.0; +LightSleevesDurability = 100.0; +LightVestDurability = 100.0; +MediumBootsDurability = 150.0; +MediumGlovesDurability = 150.0; +MediumPantsDurability = 150.0; +MediumSleevesDurability = 150.0; +MediumVestDurability = 150.0; +HeavyBootsDurability = 200.0; +HeavyGlovesDurability = 200.0; +HeavyPantsDurability = 200.0; +HeavySleevesDurability = 200.0; +HeavyVestDurability = 200.0; +HeavyHelmetDurability = 200.0; +// jewel +AnkletDurability = 100.0; +BraceletDurability = 100.0; +DiademDurability = 100.0; +EaringDurability = 100.0; +PendantDurability = 100.0; +RingDurability = 100.0; +// tool +ForageToolDurability = 100.0; +AmmoCraftingToolDurability = 100.0; +ArmorCraftingToolDurability = 100.0; +JewelryCraftingToolDurability = 100.0; +RangeWeaponCraftingToolDurability = 100.0; +MeleeWeaponCraftingToolDurability = 100.0; +ToolCraftingToolDurability = 100.0; + +//////////// +// WEIGHT // (Max is *2) +// melee weapons +DaggerWeight = 3.5; // Dg Type (Pierce) +SwordWeight = 4.0; // 1H Type +MaceWeight = 4.0; // 1H Type +AxeWeight = 4.0; // 1H Type +SpearWeight = 4.0; // 1H Type (pierce) +StaffWeight = 1.0; // 1H Type +MagicianStaffWeight = 2.0; // 2H type +TwoHandSwordWeight = 6.0; // 2H Type +TwoHandAxeWeight = 6.0; // 2H Type +PikeWeight = 6.0; // 2H Type (pierce) +TwoHandMaceWeight = 6.0; // 2H Type +// range weapon +PistolWeight = 1.5; +BowpistolWeight = 1.5; +RifleWeight = 2.0; +BowrifleWeight = 2.0; +AutolauchWeight = 8.0; +LauncherWeight = 8.0; +HarpoonWeight = 2.0; +// ammo +PistolAmmoWeight = 0.2; +BowpistolAmmoWeight = 0.2; +RifleAmmoWeight = 0.2; +BowrifleAmmoWeight = 0.2; +AutolaunchAmmoWeight = 4.8; +LauncherAmmoWeight = 10.0; +HarpoonAmmoWeight = 0.2; +GrenadeAmmoWeight = 1.0; +// armor and shield +ShieldWeight = 3.0; +BucklerWeight = 1.5; +// Light +LightBootsWeight = 1.0; +LightGlovesWeight = 1.0; +LightPantsWeight = 2.5; +LightSleevesWeight = 1.0; +LightVestWeight = 2.5; +// Medium +MediumBootsWeight = 2.0; +MediumGlovesWeight = 2.0; +MediumPantsWeight = 5.0; +MediumSleevesWeight = 2.0; +MediumVestWeight = 5.0; +// Heavy +HeavyBootsWeight = 4.0; +HeavyGlovesWeight = 4.0; +HeavyPantsWeight = 10.0; +HeavySleevesWeight = 4.0; +HeavyVestWeight = 10.0; +HeavyHelmetWeight = 4.0; +// jewel +AnkletWeight = 0.1; +BraceletWeight = 0.1; +DiademWeight = 0.1; +EaringWeight = 0.1; +PendantWeight = 0.1; +RingWeight = 0.1; +////////////// +// SAP LOAD // +// MIN +// melee weapons +DaggerSapLoad = 0.0; +SwordSapLoad = 0.0; +MaceSapLoad = 0.0; +AxeSapLoad = 0.0; +SpearSapLoad = 0.0; +StaffSapLoad = 0.0; +MagicianStaffSapLoad = 0.0; +TwoHandSwordSapLoad = 0.0; +TwoHandAxeSapLoad = 0.0; +PikeSapLoad = 0.0; +TwoHandMaceSapLoad = 0.0; +// range weapon +AutolauchSapLoad = 0.0; +BowrifleSapLoad = 0.0; +LauncherSapLoad = 0.0; +PistolSapLoad = 0.0; +BowpistolSapLoad = 0.0; +RifleSapLoad = 0.0; +HarpoonSapLoad = 0.0; +// ammo +AutolaunchAmmoSapLoad = 0.0; +BowrifleAmmoSapLoad = 0.0; +GrenadeAmmoSapLoad = 0.0; +LauncherAmmoSapLoad = 0.0; +PistolAmmoSapLoad = 0.0; +BowpistolAmmoSapLoad = 0.0; +RifleAmmoSapLoad = 0.0; +HarpoonAmmoSapLoad = 0.0; +// armor and shield +ShieldSapLoad = 0.0; +BucklerSapLoad = 0.0; +LightBootsSapLoad = 0.0; +LightGlovesSapLoad = 0.0; +LightPantsSapLoad = 0.0; +LightSleevesSapLoad = 0.0; +LightVestSapLoad = 0.0; +MediumBootsSapLoad = 0.0; +MediumGlovesSapLoad = 0.0; +MediumPantsSapLoad = 0.0; +MediumSleevesSapLoad = 0.0; +MediumVestSapLoad = 0.0; +HeavyBootsSapLoad = 0.0; +HeavyGlovesSapLoad = 0.0; +HeavyPantsSapLoad = 0.0; +HeavySleevesSapLoad = 0.0; +HeavyVestSapLoad = 0.0; +HeavyHelmetSapLoad = 0.0; +// jewel +AnkletSapLoad = 0.0; +BraceletSapLoad = 0.0; +DiademSapLoad = 0.0; +EaringSapLoad = 0.0; +PendantSapLoad = 0.0; +RingSapLoad = 0.0; +// MAX +// melee weapons +DaggerSapLoadMax = 2500.0; +SwordSapLoadMax = 2500.0; +MaceSapLoadMax = 2500.0; +AxeSapLoadMax = 2500.0; +SpearSapLoadMax = 2500.0; +StaffSapLoadMax = 7000.0; +MagicianStaffSapLoadMax = 2500.0; +TwoHandSwordSapLoadMax = 2500.0; +TwoHandAxeSapLoadMax = 2500.0; +PikeSapLoadMax = 2500.0; +TwoHandMaceSapLoadMax = 2500.0; +// range weapon +AutolauchSapLoadMax = 2500.0; +BowrifleSapLoadMax = 2500.0; +LauncherSapLoadMax = 2500.0; +PistolSapLoadMax = 2500.0; +BowpistolSapLoadMax = 2500.0; +RifleSapLoadMax = 2500.0; +HarpoonSapLoadMax = 2500.0; +// ammo +AutolaunchAmmoSapLoadMax = 2500.0; +BowrifleAmmoSapLoadMax = 2500.0; +GrenadeAmmoSapLoadMax = 2500.0; +LauncherAmmoSapLoadMax = 2500.0; +PistolAmmoSapLoadMax = 2500.0; +BowpistolAmmoSapLoadMax = 2500.0; +RifleAmmoSapLoadMax = 2500.0; +HarpoonAmmoSapLoadMax = 2500.0; +// armor and shield +ShieldSapLoadMax = 2500.0; +BucklerSapLoadMax = 2500.0; +LightBootsSapLoadMax = 2500.0; +LightGlovesSapLoadMax = 2500.0; +LightPantsSapLoadMax = 2500.0; +LightSleevesSapLoadMax = 2500.0; +LightVestSapLoadMax = 2500.0; +MediumBootsSapLoadMax = 2500.0; +MediumGlovesSapLoadMax = 2500.0; +MediumPantsSapLoadMax = 2500.0; +MediumSleevesSapLoadMax = 2500.0; +MediumVestSapLoadMax = 2500.0; +HeavyBootsSapLoadMax = 2500.0; +HeavyGlovesSapLoadMax = 2500.0; +HeavyPantsSapLoadMax = 2500.0; +HeavySleevesSapLoadMax = 2500.0; +HeavyVestSapLoadMax = 2500.0; +HeavyHelmetSapLoadMax = 2500.0; +// jewel +AnkletSapLoadMax = 2500.0; +BraceletSapLoadMax = 2500.0; +DiademSapLoadMax = 2500.0; +EaringSapLoadMax = 2500.0; +PendantSapLoadMax = 2500.0; +RingSapLoadMax = 2500.0; +//////////// +// DAMAGE Min +// melee weapons +DaggerDmg = 0.250; // Dg Type (Pierce) +StaffDmg = 0.250; // 1H Type +SwordDmg = 0.666; // 1H Type +MaceDmg = 0.800; // 1H Type +AxeDmg = 0.800; // 1H Type +SpearDmg = 0.550; // 1H Type (pierce) +TwoHandSwordDmg = 1.000; // 2H Type +TwoHandAxeDmg = 1.200; // 2H Type +PikeDmg = 0.800; // 2H Type (pierce) +TwoHandMaceDmg = 1.200; // 2H Type +MagicianStaffDmg = 0.350; // 2H Type +// range weapon (modifier) +PistolDmg = 0.0; +BowpistolDmg = 0.0; +RifleDmg = 0.0; +BowrifleDmg = 0.0; +AutolauchDmg = 0.0; +LauncherDmg = 0.0; +HarpoonDmg = 0.0; +// ammo +PistolAmmoDmg = 0.625; +BowpistolAmmoDmg = 0.625; +RifleAmmoDmg = 0.833; +BowrifleAmmoDmg = 0.833; +AutolaunchAmmoDmg = 2.0; +LauncherAmmoDmg = 3.0; +HarpoonAmmoDmg = 1.0; +GrenadeAmmoDmg = 1.0; +// DAMAGE Max +// melee weapons +DaggerDmgMax = 0.500; // Dg Type (Pierce) +StaffDmgMax = 0.500; // 1H Type +SwordDmgMax = 1.333; // 1H Type +MaceDmgMax = 1.600; // 1H Type +AxeDmgMax = 1.600; // 1H Type +SpearDmgMax = 1.100; // 1H Type (pierce) +TwoHandSwordDmgMax = 2.000; // 2H Type +TwoHandAxeDmgMax = 2.400; // 2H Type +PikeDmgMax = 1.600; // 2H Type (pierce) +TwoHandMaceDmgMax = 2.400; // 2H Type +MagicianStaffDmgMax = 0.350; +// range weapon (modifier) +AutolauchDmgMax = 0.0; +BowrifleDmgMax = 0.0; +LauncherDmgMax = 0.0; +PistolDmgMax = 0.0; +BowpistolDmgMax = 0.0; +RifleDmgMax = 0.0; +HarpoonDmgMax = 0.0; +// ammo +PistolAmmoDmgMax = 1.25; +BowpistolAmmoDmgMax = 1.25; +RifleAmmoDmgMax = 1.666; +BowrifleAmmoDmgMax = 1.666; +AutolaunchAmmoDmgMax = 4.0; +LauncherAmmoDmgMax = 6.0; +HarpoonAmmoDmgMax = 2.0; +GrenadeAmmoDmgMax = 2.0; + +////////////// +// HIT RATE // Hits for 10 sec +// melee weapons +DaggerHitRate = 5.0; // Dg Type (Pierce) +StaffHitRate = 3.333; // 1H Type (blunt) +SwordHitRate = 3.333; // 1H Type +MaceHitRate = 3.030; // 1H Type +AxeHitRate = 3.030; // 1H Type +SpearHitRate = 3.700; // 1H Type (pierce) +TwoHandSwordHitRate = 2.500; // 2H Type +TwoHandAxeHitRate = 2.272; // 2H Type +PikeHitRate = 2.777; // 2H Type (pierce) +TwoHandMaceHitRate = 2.272; // 2H Type +MagicianStaffHitRate = 2.5; // +// range weapon +PistolHitRate = 2.5; +BowpistolHitRate = 2.5; +RifleHitRate = 2.0; +BowrifleHitRate = 2.0; +AutolauchHitRate = 1.0; +LauncherHitRate = 1.0; +HarpoonHitRate = 2.0; +// ammo (modifier) +AutolaunchAmmoHitRate = 0.0; +BowrifleAmmoHitRate = 0.0; +GrenadeAmmoHitRate = 0.0; +LauncherAmmoHitRate = 0.0; +PistolAmmoHitRate = 0.0; +BowpistolAmmoHitRate = 0.0; +RifleAmmoHitRate = 0.0; +HarpoonAmmoHitRate = 0.0; + +////////////// +// Maximum hit rate ( after crafted item parameters applications ) +// melee weapons +DaggerHitRateMax = 10.0; +StaffHitRateMax = 6.666; // 1H Type (blunt) +SwordHitRateMax = 6.666; +MaceHitRateMax = 6.060; +AxeHitRateMax = 6.060; +SpearHitRateMax = 7.400; +TwoHandSwordHitRateMax = 5.0; +TwoHandAxeHitRateMax = 4.545; +PikeHitRateMax = 5.555; +TwoHandMaceHitRateMax = 4.545; +MagicianStaffHitRateMax = 2.5; +// range weapon +PistolHitRateMax = 5.0; +BowpistolHitRateMax = 5.0; +RifleHitRateMax = 4.0; +BowrifleHitRateMax = 4.0; +AutolauchHitRateMax = 2.0; +LauncherHitRateMax = 2.0; +HarpoonHitRateMax = 4.0; +// ammo +AutolaunchAmmoHitRateMax = 0.0; +BowrifleAmmoHitRateMax = 0.0; +GrenadeAmmoHitRateMax = 0.0; +LauncherAmmoHitRateMax = 0.0; +PistolAmmoHitRateMax = 0.0; +BowpistolAmmoHitRateMax = 0.0; +RifleAmmoHitRateMax = 0.0; +HarpoonAmmoHitRateMax = 0.0; + + +/////////// +// Range // for ammo, range weapon (modifier) (max = *2) +// range weapon +AutolauchRange = 25000.0; // Gat +BowrifleRange = 20000.0; +LauncherRange = 30000.0; // Rocket Launcher +PistolRange = 15000.0; +BowpistolRange = 15000.0; +RifleRange = 20000.0; +HarpoonRange = 15000.0; +// ammo +AutolaunchAmmoRange = 0.0; +BowrifleAmmoRange = 0.0; +GrenadeAmmoRange = 0.0; +LauncherAmmoRange = 0.0; +PistolAmmoRange = 0.0; +BowpistolAmmoRange = 0.0; +RifleAmmoRange = 0.0; +HarpoonAmmoRange = 0.0; +//////////////////// +// DODGE MODIFIER // not for ammo and jewel, but for armor too +// melee weapons & armor +DaggerDodgeMinModifier = 0.0; +DaggerDodgeMaxModifier = 20.0; +SwordDodgeMinModifier = -10.0; +SwordDodgeMaxModifier = 10.0; +MaceDodgeMinModifier = -10.0; +MaceDodgeMaxModifier = 10.0; +AxeDodgeMinModifier = -10.0; +AxeDodgeMaxModifier = 10.0; +SpearDodgeMinModifier = -5.0; +SpearDodgeMaxModifier = 15.0; +StaffDodgeMinModifier = -10.0; +StaffDodgeMaxModifier = 10.0; +TwoHandSwordDodgeMinModifier = -20.0; +TwoHandSwordDodgeMaxModifier = 0.0; +TwoHandAxeDodgeMinModifier = -20.0; +TwoHandAxeDodgeMaxModifier = 0.0; +PikeDodgeMinModifier = -20.0; +PikeDodgeMaxModifier = 0.0; +TwoHandMaceDodgeMinModifier = -20.0; +TwoHandMaceDodgeMaxModifier = 0.0; +MagicianStaffDodgeMinModifier = 0.0; +MagicianStaffDodgeMaxModifier = 0.0; +// range weapon +AutolauchDodgeMinModifier = -15.0; +AutolauchDodgeMaxModifier = 5.0; +BowrifleDodgeMinModifier = -10.0; +BowrifleDodgeMaxModifier = 10.0; +LauncherDodgeMinModifier = -20.0; +LauncherDodgeMaxModifier = 0.0; +PistolDodgeMinModifier = 0.0; +PistolDodgeMaxModifier = 20.0; +BowpistolDodgeMinModifier = -5.0; +BowpistolDodgeMaxModifier = 15.0; +RifleDodgeMinModifier = -20.0; +RifleDodgeMaxModifier = 0.0; +HarpoonDodgeMinModifier = 0.0; +HarpoonDodgeMaxModifier = 0.0; +// armor and shield +ShieldDodgeMinModifier = -10.0; +ShieldDodgeMaxModifier = 0.0; +BucklerDodgeMinModifier = 0.0; +BucklerDodgeMaxModifier = 20.0; +LightBootsDodgeMinModifier = 1.0; +LightBootsDodgeMaxModifier = 2.0; +LightGlovesDodgeMinModifier = 1.0; +LightGlovesDodgeMaxModifier = 2.0; +LightPantsDodgeMinModifier = 1.0; +LightPantsDodgeMaxModifier = 2.0; +LightSleevesDodgeMinModifier = 1.0; +LightSleevesDodgeMaxModifier = 2.0; +LightVestDodgeMinModifier = 1.0; +LightVestDodgeMaxModifier = 2.0; +MediumBootsDodgeMinModifier = -2.0; +MediumBootsDodgeMaxModifier = 1.0; +MediumGlovesDodgeMinModifier = -2.0; +MediumGlovesDodgeMaxModifier = 1.0; +MediumPantsDodgeMinModifier = -2.0; +MediumPantsDodgeMaxModifier = 1.0; +MediumSleevesDodgeMinModifier = -2.0; +MediumSleevesDodgeMaxModifier = 1.0; +MediumVestDodgeMinModifier = -2.0; +MediumVestDodgeMaxModifier = 1.0; +HeavyBootsDodgeMinModifier = -4.0; +HeavyBootsDodgeMaxModifier = 0.0; +HeavyGlovesDodgeMinModifier = -4.0; +HeavyGlovesDodgeMaxModifier = 0.0; +HeavyPantsDodgeMinModifier = -4.0; +HeavyPantsDodgeMaxModifier = 0.0; +HeavySleevesDodgeMinModifier = -4.0; +HeavySleevesDodgeMaxModifier = 0.0; +HeavyVestDodgeMinModifier = -4.0; +HeavyVestDodgeMaxModifier = 0.0; +HeavyHelmetDodgeMinModifier = -4.0; +HeavyHelmetDodgeMaxModifier = 0.0; +//////////////////// +// PARRY MODIFIER // not for ammo and jewel, but for armor too +// melee weapons +DaggerParryMinModifier = -20.0; +DaggerParryMaxModifier = 0.0; +SwordParryMinModifier = -10.0; +SwordParryMaxModifier = 10.0; +MaceParryMinModifier = -15.0; +MaceParryMaxModifier = 5.0; +AxeParryMinModifier = -15.0; +AxeParryMaxModifier = 5.0; +SpearParryMinModifier = -20.0; +SpearParryMaxModifier = 0.0; +StaffParryMinModifier = 0.0; +StaffParryMaxModifier = 20.0; +TwoHandSwordParryMinModifier = 0.0; +TwoHandSwordParryMaxModifier = 20.0; +TwoHandAxeParryMinModifier = -10.0; +TwoHandAxeParryMaxModifier = 10.0; +PikeParryMinModifier = -10.0; +PikeParryMaxModifier = 10.0; +TwoHandMaceParryMinModifier = -10.0; +TwoHandMaceParryMaxModifier = 10.0; +MagicianStaffParryMinModifier = 0.0; +MagicianStaffParryMaxModifier = 0.0; +// range weapon +AutolauchParryMinModifier = 0.0; +AutolauchParryMaxModifier = 20.0; +BowrifleParryMinModifier = -10.0; +BowrifleParryMaxModifier = 10.0; +LauncherParryMinModifier = 0.0; +LauncherParryMaxModifier = 20.0; +PistolParryMinModifier = -20.0; +PistolParryMaxModifier = 0.0; +BowpistolParryMinModifier = -5.0; +BowpistolParryMaxModifier = 15.0; +RifleParryMinModifier = 0.0; +RifleParryMaxModifier = 20.0; +HarpoonParryMinModifier = 0.0; +HarpoonParryMaxModifier = 0.0; +// armor and shield +ShieldParryMinModifier = 10.0; +ShieldParryMaxModifier = 30.0; +BucklerParryMinModifier = 0.0; +BucklerParryMaxModifier = 20.0; +LightBootsParryMinModifier = -1.0; +LightBootsParryMaxModifier = 1.0; +LightGlovesParryMinModifier = -1.0; +LightGlovesParryMaxModifier = 1.0; +LightPantsParryMinModifier = -1.0; +LightPantsParryMaxModifier = 1.0; +LightSleevesParryMinModifier = -1.0; +LightSleevesParryMaxModifier = 1.0; +LightVestParryMinModifier = -1.0; +LightVestParryMaxModifier = 1.0; +MediumBootsParryMinModifier = -1.0; +MediumBootsParryMaxModifier = 2.0; +MediumGlovesParryMinModifier = -1.0; +MediumGlovesParryMaxModifier = 2.0; +MediumPantsParryMinModifier = -1.0; +MediumPantsParryMaxModifier = 2.0; +MediumSleevesParryMinModifier = -1.0; +MediumSleevesParryMaxModifier = 2.0; +MediumVestParryMinModifier = -1.0; +MediumVestParryMaxModifier = 2.0; +HeavyBootsParryMinModifier = -1.0; +HeavyBootsParryMaxModifier = 3.0; +HeavyGlovesParryMinModifier = -1.0; +HeavyGlovesParryMaxModifier = 3.0; +HeavyPantsParryMinModifier = -1.0; +HeavyPantsParryMaxModifier = 3.0; +HeavySleevesParryMinModifier = -1.0; +HeavySleevesParryMaxModifier = 3.0; +HeavyVestParryMinModifier = -1.0; +HeavyVestParryMaxModifier = 3.0; +HeavyHelmetParryMinModifier = -1.0; +HeavyHelmetParryMaxModifier = 3.0; +////////////////////////////// +// ADVERSARY DODGE MODIFIER // not for ammo, jewel and armor +// melee weapons +DaggerAdversaryDodgeMinModifier = 0.0; +DaggerAdversaryDodgeMaxModifier = -20.0; +SwordAdversaryDodgeMinModifier = 5.0; +SwordAdversaryDodgeMaxModifier = -15.0; +MaceAdversaryDodgeMinModifier = 5.0; +MaceAdversaryDodgeMaxModifier = -15.0; +AxeAdversaryDodgeMinModifier = 5.0; +AxeAdversaryDodgeMaxModifier = -15.0; +SpearAdversaryDodgeMinModifier = 15.0; +SpearAdversaryDodgeMaxModifier = -5.0; +StaffAdversaryDodgeMinModifier = 0.0; +StaffAdversaryDodgeMaxModifier = -20.0; +TwoHandSwordAdversaryDodgeMinModifier = 30.0; +TwoHandSwordAdversaryDodgeMaxModifier = 15.0; +TwoHandAxeAdversaryDodgeMinModifier = 30.0; +TwoHandAxeAdversaryDodgeMaxModifier = 15.0; +PikeAdversaryDodgeMinModifier = 30.0; +PikeAdversaryDodgeMaxModifier = 15.0; +TwoHandMaceAdversaryDodgeMinModifier = 30.0; +TwoHandMaceAdversaryDodgeMaxModifier = 15.0; +MagicianStaffAdversaryDodgeMinModifier = 0.0; +MagicianStaffAdversaryDodgeMaxModifier = 0.0; +// range weapon +AutolauchAdversaryDodgeMinModifier = 30.0; +AutolauchAdversaryDodgeMaxModifier = 15.0; +BowrifleAdversaryDodgeMinModifier = 0.0; +BowrifleAdversaryDodgeMaxModifier = -20.0; +LauncherAdversaryDodgeMinModifier = 30.0; +LauncherAdversaryDodgeMaxModifier = 20.0; +PistolAdversaryDodgeMinModifier = 0.0; +PistolAdversaryDodgeMaxModifier = -15.0; +BowpistolAdversaryDodgeMinModifier = 0.0; +BowpistolAdversaryDodgeMaxModifier = -15.0; +RifleAdversaryDodgeMinModifier = 0.0; +RifleAdversaryDodgeMaxModifier = -20.0; +HarpoonAdversaryDodgeMinModifier = 0.0; +HarpoonAdversaryDodgeMaxModifier = 0.0; +////////////////////////////// +// ADVERSARY PARRY MODIFIER // not for ammo, jewel and armor +// melee weapons +DaggerAdversaryParryMinModifier = 20.0; +DaggerAdversaryParryMaxModifier = 0.0; +SwordAdversaryParryMinModifier = 10.0; +SwordAdversaryParryMaxModifier = -10.0; +MaceAdversaryParryMinModifier = 15.0; +MaceAdversaryParryMaxModifier = -5.0; +AxeAdversaryParryMinModifier = 15.0; +AxeAdversaryParryMaxModifier = -5.0; +SpearAdversaryParryMinModifier = 5.0; +SpearAdversaryParryMaxModifier = -5.0; +StaffAdversaryParryMinModifier = -5.0; +StaffAdversaryParryMaxModifier = -15.0; +TwoHandSwordAdversaryParryMinModifier = 0.0; +TwoHandSwordAdversaryParryMaxModifier = -30.0; +TwoHandAxeAdversaryParryMinModifier = 0.0; +TwoHandAxeAdversaryParryMaxModifier = -20.0; +PikeAdversaryParryMinModifier = 0.0; +PikeAdversaryParryMaxModifier = -20.0; +TwoHandMaceAdversaryParryMinModifier = 0.0; +TwoHandMaceAdversaryParryMaxModifier = -20.0; +MagicianStaffAdversaryParryMinModifier = 0.0; +MagicianStaffAdversaryParryMaxModifier = 0.0; +// range weapon +AutolauchAdversaryParryMinModifier = 10.0; +AutolauchAdversaryParryMaxModifier = -10.0; +BowrifleAdversaryParryMinModifier = 0.0; +BowrifleAdversaryParryMaxModifier = -20.0; +LauncherAdversaryParryMinModifier = 20.0; +LauncherAdversaryParryMaxModifier = 0.0; +PistolAdversaryParryMinModifier = 0.0; +PistolAdversaryParryMaxModifier = -20.0; +BowpistolAdversaryParryMinModifier = 0.0; +BowpistolAdversaryParryMaxModifier = -20.0; +RifleAdversaryParryMinModifier = 0.0; +RifleAdversaryParryMaxModifier = -20.0; +HarpoonAdversaryParryMinModifier = 0.0; +HarpoonAdversaryParryMaxModifier = -20.0; + +////////////////////////////// +// Cast Modifiers // for melee weapons +//Elemental casting time factor (melee weapon only) +// Min +DaggerElementalCastingTimeFactor = 0.0; +SwordElementalCastingTimeFactor = 0.0; +AxeElementalCastingTimeFactor = 0.0; +MaceElementalCastingTimeFactor = 0.0; +SpearElementalCastingTimeFactor = 0.0; +StaffElementalCastingTimeFactor = 0.0; +MagicianStaffElementalCastingTimeFactor = 0.2; +TwoHandAxeElementalCastingTimeFactor = 0.0; +TwoHandSwordElementalCastingTimeFactor = 0.0; +PikeElementalCastingTimeFactor = 0.0; +TwoHandMaceElementalCastingTimeFactor = 0.0; +// max +DaggerElementalCastingTimeFactorMax = 1.0; +SwordElementalCastingTimeFactorMax = 1.0; +AxeElementalCastingTimeFactorMax = 1.0; +MaceElementalCastingTimeFactorMax = 1.0; +SpearElementalCastingTimeFactorMax = 1.0; +StaffElementalCastingTimeFactorMax = 1.0; +MagicianStaffElementalCastingTimeFactorMax = 1.0; +TwoHandAxeElementalCastingTimeFactorMax = 1.0; +TwoHandSwordElementalCastingTimeFactorMax = 1.0; +PikeElementalCastingTimeFactorMax = 1.0; +TwoHandMaceElementalCastingTimeFactorMax = 1.0; + +//Elemental power factor (melee weapon only) +// Min +DaggerElementalPowerFactor = 0.0; +SwordElementalPowerFactor = 0.0; +AxeElementalPowerFactor = 0.0; +MaceElementalPowerFactor = 0.0; +SpearElementalPowerFactor = 0.0; +StaffElementalPowerFactor = 0.0; +MagicianStaffElementalPowerFactor = 0.2; +TwoHandAxeElementalPowerFactor = 0.0; +TwoHandSwordElementalPowerFactor = 0.0; +PikeElementalPowerFactor = 0.0; +TwoHandMaceElementalPowerFactor = 0.0; +// Max +DaggerElementalPowerFactorMax = 1.0; +SwordElementalPowerFactorMax = 1.0; +AxeElementalPowerFactorMax = 1.0; +MaceElementalPowerFactorMax = 1.0; +SpearElementalPowerFactorMax = 1.0; +StaffElementalPowerFactorMax = 1.0; +MagicianStaffElementalPowerFactorMax = 1.0; +TwoHandAxeElementalPowerFactorMax = 1.0; +TwoHandSwordElementalPowerFactorMax = 1.0; +PikeElementalPowerFactorMax = 1.0; +TwoHandMaceElementalPowerFactorMax = 1.0; + +//OffensiveAffliction casting time factor (melee weapon only) +// Min +DaggerOffensiveAfflictionCastingTimeFactor = 0.0; +SwordOffensiveAfflictionCastingTimeFactor = 0.0; +AxeOffensiveAfflictionCastingTimeFactor = 0.0; +MaceOffensiveAfflictionCastingTimeFactor = 0.0; +SpearOffensiveAfflictionCastingTimeFactor = 0.0; +StaffOffensiveAfflictionCastingTimeFactor = 0.0; +MagicianStaffOffensiveAfflictionCastingTimeFactor = 0.2; +TwoHandAxeOffensiveAfflictionCastingTimeFactor = 0.0; +TwoHandSwordOffensiveAfflictionCastingTimeFactor = 0.0; +PikeOffensiveAfflictionCastingTimeFactor = 0.0; +TwoHandMaceOffensiveAfflictionCastingTimeFactor = 0.0; +// Max +DaggerOffensiveAfflictionCastingTimeFactorMax = 1.0; +SwordOffensiveAfflictionCastingTimeFactorMax = 1.0; +AxeOffensiveAfflictionCastingTimeFactorMax = 1.0; +MaceOffensiveAfflictionCastingTimeFactorMax = 1.0; +SpearOffensiveAfflictionCastingTimeFactorMax = 1.0; +StaffOffensiveAfflictionCastingTimeFactorMax = 1.0; +MagicianStaffOffensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandAxeOffensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandSwordOffensiveAfflictionCastingTimeFactorMax = 1.0; +PikeOffensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandMaceOffensiveAfflictionCastingTimeFactorMax = 1.0; + +//OffensiveAffliction power factor (melee weapon only) +// Min +DaggerOffensiveAfflictionPowerFactor = 0.0; +SwordOffensiveAfflictionPowerFactor = 0.0; +AxeOffensiveAfflictionPowerFactor = 0.0; +MaceOffensiveAfflictionPowerFactor = 0.0; +SpearOffensiveAfflictionPowerFactor = 0.0; +StaffOffensiveAfflictionPowerFactor = 0.0; +MagicianStaffOffensiveAfflictionPowerFactor = 0.2; +TwoHandAxeOffensiveAfflictionPowerFactor = 0.0; +TwoHandSwordOffensiveAfflictionPowerFactor = 0.0; +PikeOffensiveAfflictionPowerFactor = 0.0; +TwoHandMaceOffensiveAfflictionPowerFactor = 0.0; +// Max +DaggerOffensiveAfflictionPowerFactorMax = 1.0; +SwordOffensiveAfflictionPowerFactorMax = 1.0; +AxeOffensiveAfflictionPowerFactorMax = 1.0; +MaceOffensiveAfflictionPowerFactorMax = 1.0; +SpearOffensiveAfflictionPowerFactorMax = 1.0; +StaffOffensiveAfflictionPowerFactorMax = 1.0; +MagicianStaffOffensiveAfflictionPowerFactorMax = 1.0; +TwoHandAxeOffensiveAfflictionPowerFactorMax = 1.0; +TwoHandSwordOffensiveAfflictionPowerFactorMax = 1.0; +PikeOffensiveAfflictionPowerFactorMax = 1.0; +TwoHandMaceOffensiveAfflictionPowerFactorMax = 1.0; + +//Heal casting time factor (melee weapon only) +// Min +DaggerHealCastingTimeFactor = 0.0; +SwordHealCastingTimeFactor = 0.0; +AxeHealCastingTimeFactor = 0.0; +MaceHealCastingTimeFactor = 0.0; +SpearHealCastingTimeFactor = 0.0; +StaffHealCastingTimeFactor = 0.0; +MagicianStaffHealCastingTimeFactor = 0.2; +TwoHandAxeHealCastingTimeFactor = 0.0; +TwoHandSwordHealCastingTimeFactor = 0.0; +PikeHealCastingTimeFactor = 0.0; +TwoHandMaceHealCastingTimeFactor = 0.0; +// Max +DaggerHealCastingTimeFactorMax = 1.0; +SwordHealCastingTimeFactorMax = 1.0; +AxeHealCastingTimeFactorMax = 1.0; +MaceHealCastingTimeFactorMax = 1.0; +SpearHealCastingTimeFactorMax = 1.0; +StaffHealCastingTimeFactorMax = 1.0; +MagicianStaffHealCastingTimeFactorMax = 1.0; +TwoHandAxeHealCastingTimeFactorMax = 1.0; +TwoHandSwordHealCastingTimeFactorMax = 1.0; +PikeHealCastingTimeFactorMax = 1.0; +TwoHandMaceHealCastingTimeFactorMax = 1.0; + +//Heal power factor (melee weapon only) +// Min +DaggerHealPowerFactor = 0.0; +SwordHealPowerFactor = 0.0; +AxeHealPowerFactor = 0.0; +MaceHealPowerFactor = 0.0; +SpearHealPowerFactor = 0.0; +StaffHealPowerFactor = 0.0; +MagicianStaffHealPowerFactor = 0.2; +TwoHandAxeHealPowerFactor = 0.0; +TwoHandSwordHealPowerFactor = 0.0; +PikeHealPowerFactor = 0.0; +TwoHandMaceHealPowerFactor = 0.0; +// Max +DaggerHealPowerFactorMax = 1.0; +SwordHealPowerFactorMax = 1.0; +AxeHealPowerFactorMax = 1.0; +MaceHealPowerFactorMax = 1.0; +SpearHealPowerFactorMax = 1.0; +StaffHealPowerFactorMax = 1.0; +MagicianStaffHealPowerFactorMax = 1.0; +TwoHandAxeHealPowerFactorMax = 1.0; +TwoHandSwordHealPowerFactorMax = 1.0; +PikeHealPowerFactorMax = 1.0; +TwoHandMaceHealPowerFactorMax = 1.0; + +//DefensiveAffliction casting time factor (melee weapon only) +// Min +DaggerDefensiveAfflictionCastingTimeFactor = 0.0; +SwordDefensiveAfflictionCastingTimeFactor = 0.0; +AxeDefensiveAfflictionCastingTimeFactor = 0.0; +MaceDefensiveAfflictionCastingTimeFactor = 0.0; +SpearDefensiveAfflictionCastingTimeFactor = 0.0; +StaffDefensiveAfflictionCastingTimeFactor = 0.0; +MagicianStaffDefensiveAfflictionCastingTimeFactor = 0.2; +TwoHandAxeDefensiveAfflictionCastingTimeFactor = 0.0; +TwoHandSwordDefensiveAfflictionCastingTimeFactor = 0.0; +PikeDefensiveAfflictionCastingTimeFactor = 0.0; +TwoHandMaceDefensiveAfflictionCastingTimeFactor = 0.0; +// Max +DaggerDefensiveAfflictionCastingTimeFactorMax = 1.0; +SwordDefensiveAfflictionCastingTimeFactorMax = 1.0; +AxeDefensiveAfflictionCastingTimeFactorMax = 1.0; +MaceDefensiveAfflictionCastingTimeFactorMax = 1.0; +SpearDefensiveAfflictionCastingTimeFactorMax = 1.0; +StaffDefensiveAfflictionCastingTimeFactorMax = 1.0; +MagicianStaffDefensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandAxeDefensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandSwordDefensiveAfflictionCastingTimeFactorMax = 1.0; +PikeDefensiveAfflictionCastingTimeFactorMax = 1.0; +TwoHandMaceDefensiveAfflictionCastingTimeFactorMax = 1.0; + +//DefensiveAffliction power factor (melee weapon only) +// Min +DaggerDefensiveAfflictionPowerFactor = 0.0; +SwordDefensiveAfflictionPowerFactor = 0.0; +AxeDefensiveAfflictionPowerFactor = 0.0; +MaceDefensiveAfflictionPowerFactor = 0.0; +SpearDefensiveAfflictionPowerFactor = 0.0; +StaffDefensiveAfflictionPowerFactor = 0.0; +MagicianStaffDefensiveAfflictionPowerFactor = 0.2; +TwoHandAxeDefensiveAfflictionPowerFactor = 0.0; +TwoHandSwordDefensiveAfflictionPowerFactor = 0.0; +PikeDefensiveAfflictionPowerFactor = 0.0; +TwoHandMaceDefensiveAfflictionPowerFactor = 0.0; +// Max +DaggerDefensiveAfflictionPowerFactorMax = 1.0; +SwordDefensiveAfflictionPowerFactorMax = 1.0; +AxeDefensiveAfflictionPowerFactorMax = 1.0; +MaceDefensiveAfflictionPowerFactorMax = 1.0; +SpearDefensiveAfflictionPowerFactorMax = 1.0; +StaffDefensiveAfflictionPowerFactorMax = 1.0; +MagicianStaffDefensiveAfflictionPowerFactorMax = 1.0; +TwoHandAxeDefensiveAfflictionPowerFactorMax = 1.0; +TwoHandSwordDefensiveAfflictionPowerFactorMax = 1.0; +PikeDefensiveAfflictionPowerFactorMax = 1.0; +TwoHandMaceDefensiveAfflictionPowerFactorMax = 1.0; + + + +/////////////////////// +// PROTECTION FACTOR // +// armor and shield +// Min +BucklerProtectionFactor = 0.08; +ShieldProtectionFactor = 0.16; +LightBootsProtectionFactor = 0.05; +LightGlovesProtectionFactor = 0.05; +LightPantsProtectionFactor = 0.05; +LightSleevesProtectionFactor = 0.05; +LightVestProtectionFactor = 0.05; +MediumBootsProtectionFactor = 0.20; +MediumGlovesProtectionFactor = 0.20; +MediumPantsProtectionFactor = 0.20; +MediumSleevesProtectionFactor = 0.20; +MediumVestProtectionFactor = 0.20; +HeavyBootsProtectionFactor = 0.40; +HeavyGlovesProtectionFactor = 0.40; +HeavyPantsProtectionFactor = 0.40; +HeavySleevesProtectionFactor = 0.40; +HeavyVestProtectionFactor = 0.40; +HeavyHelmetProtectionFactor = 0.40; +// Max +BucklerProtectionFactorMax = 0.12; +ShieldProtectionFactorMax = 0.24; +LightBootsProtectionFactorMax = 0.25; +LightGlovesProtectionFactorMax = 0.25; +LightPantsProtectionFactorMax = 0.25; +LightSleevesProtectionFactorMax = 0.25; +LightVestProtectionFactorMax = 0.25; +MediumBootsProtectionFactorMax = 0.40; +MediumGlovesProtectionFactorMax = 0.40; +MediumPantsProtectionFactorMax = 0.40; +MediumSleevesProtectionFactorMax = 0.40; +MediumVestProtectionFactorMax = 0.40; +HeavyBootsProtectionFactorMax = 0.60; +HeavyGlovesProtectionFactorMax = 0.60; +HeavyPantsProtectionFactorMax = 0.60; +HeavySleevesProtectionFactorMax = 0.60; +HeavyVestProtectionFactorMax = 0.60; +HeavyHelmetProtectionFactorMax = 0.60; +///////////////////////////// +// MAX SLASHING PROTECTION // value to multiply with the item level. +// armor and shield +BucklerMaxSlashingProtection = 0.24; +ShieldMaxSlashingProtection = 0.48; +LightBootsMaxSlashingProtection = 0.56; +LightGlovesMaxSlashingProtection = 0.56; +LightPantsMaxSlashingProtection = 0.56; +LightSleevesMaxSlashingProtection = 0.56; +LightVestMaxSlashingProtection = 0.56; +MediumBootsMaxSlashingProtection = 0.89; +MediumGlovesMaxSlashingProtection = 0.89; +MediumPantsMaxSlashingProtection = 0.89; +MediumSleevesMaxSlashingProtection = 0.89; +MediumVestMaxSlashingProtection = 0.89; +HeavyBootsMaxSlashingProtection = 1.33; +HeavyGlovesMaxSlashingProtection = 1.33; +HeavyPantsMaxSlashingProtection = 1.33; +HeavySleevesMaxSlashingProtection = 1.33; +HeavyVestMaxSlashingProtection = 1.33; +HeavyHelmetMaxSlashingProtection = 1.33; +////////////////////////// +// MAX BLUNT PROTECTION // +// armor and shield +BucklerMaxBluntProtection = 0.24; +ShieldMaxBluntProtection = 0.48; +LightBootsMaxBluntProtection = 0.56; +LightGlovesMaxBluntProtection = 0.56; +LightPantsMaxBluntProtection = 0.56; +LightSleevesMaxBluntProtection = 0.56; +LightVestMaxBluntProtection = 0.56; +MediumBootsMaxBluntProtection = 0.89; +MediumGlovesMaxBluntProtection = 0.89; +MediumPantsMaxBluntProtection = 0.89; +MediumSleevesMaxBluntProtection = 0.89; +MediumVestMaxBluntProtection = 0.89; +HeavyBootsMaxBluntProtection = 1.33; +HeavyGlovesMaxBluntProtection = 1.33; +HeavyPantsMaxBluntProtection = 1.33; +HeavySleevesMaxBluntProtection = 1.33; +HeavyVestMaxBluntProtection = 1.33; +HeavyHelmetMaxBluntProtection = 1.33; +///////////////////////////// +// MAX PIERCING PROTECTION // +// armor and shield +BucklerMaxPiercingProtection = 0.24; +ShieldMaxPiercingProtection = 0.48; +LightBootsMaxPiercingProtection = 0.56; +LightGlovesMaxPiercingProtection = 0.56; +LightPantsMaxPiercingProtection = 0.56; +LightSleevesMaxPiercingProtection = 0.56; +LightVestMaxPiercingProtection = 0.56; +MediumBootsMaxPiercingProtection = 0.89; +MediumGlovesMaxPiercingProtection = 0.89; +MediumPantsMaxPiercingProtection = 0.89; +MediumSleevesMaxPiercingProtection = 0.89; +MediumVestMaxPiercingProtection = 0.89; +HeavyBootsMaxPiercingProtection = 1.33; +HeavyGlovesMaxPiercingProtection = 1.33; +HeavyPantsMaxPiercingProtection = 1.33; +HeavySleevesMaxPiercingProtection = 1.33; +HeavyVestMaxPiercingProtection = 1.33; +HeavyHelmetMaxPiercingProtection = 1.33; +////////////////////////////// +// JEWEL PROTECTION +AcidJewelProtection = 0.08001; // de 0 à 1.0 (1.0 = 100% de protection) +ColdJewelProtection = 0.08001; +FireJewelProtection = 0.08001; +RotJewelProtection = 0.08001; +ShockWaveJewelProtection = 0.08001; +PoisonJewelProtection = 0.08001; +ElectricityJewelProtection = 0.08001; + +MaxMagicProtection = 70; // Maximum protection can be gived by jewelry (clamp value), de 0 à 100 (pourcentage) +HominBaseProtection = 10; // Homin base protection in generic magic damage type +HominRacialProtection = 20; // Homin base protection in racial magic damage type +MaxAbsorptionFactor = 50; // Factor used for compute maximum absorption gived by all jewel (100 = 1.0 factor (100%)) (Max absorbtion = sum(equiped jewels recommandeds) * factor) +////////////////////////////// +// JEWEL RESISTANCE +DesertResistance = 8; // In skill points bonus +ForestResistance = 8; +LacustreResistance = 8; +JungleResistance = 8; +PrimaryRootResistance = 8; + +HominRacialResistance = 10;// Homin racial magic resistance to magic racial spell type +MaxMagicResistanceBonus = 50;// clamp value of resistance bonus resistance after all bonus/malus applied +EcosystemResistancePenalty = 10;// ecosystem resistance penalty value +//************************************************************************************************************* +// regen speed parameters +//************************************************************************************************************* +RegenDivisor = 12.5; +RegenReposFactor = 2.0; +RegenOffset = 0.6; + +//************************************************************************************************************* +// weapon damage table config +//************************************************************************************************************* +MinDamage = 27; +DamageStep = 1; +ExponentialPower = 1; +SmoothingFactor = 0; + +//************************************************************************************************************* +// hand to hand combat config +//************************************************************************************************************* +HandToHandDamageFactor = 0.35; +HandToHandLatency = 25; // 25 ticks = 2.5s + +//************************************************************************************************************* +// combat config +//************************************************************************************************************* +BotDamageFactor = 1; // factor applied on npc and creature damage +// special effects when hit to localisation +HitChestStaLossFactor = 0.5; +HitHeadStunDuration = 2; +HitArmsSlowDuration = 8; +HitArmsSlowFactor = 30; +HitLegsSlowDuration = 8; +HitLegsSlowFactor = -20; +HitHandsDebuffDuration = 8; +HitHandsDebuffValue = -20; +HitFeetDebuffDuration = 8; +HitFeetDebuffValue = -20; +NbOpponentsBeforeMalus = 1; +ModPerSupernumeraryOpponent = -5; +MinTwoWeaponsLatency = 10; + +ShieldingRadius = 5; +CombatFlagLifetime = 50; // (in ticks) used for openings + +DodgeFactorForMagicSkills = 1.0; +DodgeFactorForForageSkills = 0.5; + +MagicResistFactorForCombatSkills = 1.0; +MagicResistFactorForMagicSkills = 1.0; +MagicResistFactorForForageSkills = 0.5; +MagicResistSkillDelta = -25; + +//************************************************************************************************************* +// Price parameters ( price formula is ItemPriceCoeff2 * x2 + ItemPriceCoeff1 * x + ItemPriceCoeff0 ) +//************************************************************************************************************* +// polynom coeff of degree 0 in the price formula +ItemPriceCoeff0 = 100.0; +// polynom coeff of degree 1 in the price formula +ItemPriceCoeff1 = 0.6; +// polynom coeff of degree 2 in the price formula +ItemPriceCoeff2 = 0.02; +// factor to apply on non raw maetrial items to compute their price +ItemPriceFactor = 2.0; +// factor to apply on animal price to get the price a user can buy them +AnimalSellFactor = 0.5; +// factor to apply on teleport price to get the price a user can buy them +TeleportSellFactor = 0.5; +// this factor is applied to all faction point prices +GlobalFactionPointPriceFactor = 1.0; + +// this factor is applied to all faction point prices +GlobalFactionPointPriceFactor = 1.0; + +//************************************************************************************************************* +// Max quality of Raw Material Npc item selled by NPC +//************************************************************************************************************* +MaxNPCRawMaterialQualityInSell = 100; + +//************************************************************************************************************* +// Sell store parameters +//************************************************************************************************************* +// an item can stay 7 days in a sale store (total cumulated time in game cycle) +MaxGameCycleSaleStore = 6048000; + +NBMaxItemPlayerSellDisplay = 128; //NB max item can be displayed for player item list selled +NBMaxItemNpcSellDisplay = 128; //NB max item can be displayed for npc item list selled +NBMaxItemYoursSellDisplay = 128; //NB max item can be displayed for your item list selled, it's also the max items player can put in sale store + +//************************************************************************************************************* +// Factor for apply malus wear equipment to craft ( Recommended max = Recommended - (Recommanded * malus wear * WearMalusCraftFactor ) +//************************************************************************************************************* +WearMalusCraftFactor = 0.1; + +//************************************************************************************************************* +// Item wear config +//************************************************************************************************************* +//MeleeWeaponWearPerAction = 0.01; +//RangeWeaponWearPerAction = 0.01; + +// now we base wear factor for weapons on the ration (WeaponLatency / ReferenceWeaponLatencyForWear) +// MUST be > 0 +ReferenceWeaponLatencyForWear = 20; + +CraftingToolWearPerAction = 0.2; +ForageToolWearPerAction = 0.2; +ArmorWearPerAction = 0.01; +ShieldWearPerAction = 0.05; +JewelryWearPerAction = 0.01; + +// melee weapons +DaggerWearPerAction = 0.01; +SwordWearPerAction = 0.01; +MaceWearPerAction = 0.01; +AxeWearPerAction = 0.01; +SpearWearPerAction = 0.01; +StaffWearPerAction = 0.01; +MagicianStaffWearPerAction = 0.01; +TwoHandSwordWearPerAction = 0.01; +TwoHandAxeWearPerAction = 0.01; +PikeWearPerAction = 0.01; +TwoHandMaceWearPerAction = 0.01; +// range weapon +AutolauchWearPerAction = 0.01; +BowrifleWearPerAction = 0.01; +LauncherWearPerAction = 0.01; +PistolWearPerAction = 0.01; +BowpistolWearPerAction = 0.01; +RifleWearPerAction = 0.01; + +//************************************************************************************************************* +// Fame Variables +//************************************************************************************************************* +// Fame memory interpolation periode (default to 5 days) +FameMemoryInterpolation = 4320000; +// Fame trend reset delay (default to 30 mn) +FameTrendResetDelay = 18000; +// Point of fame lost with the faction of a killed bot +FameByKill = -5000; +// Minimum Fame To Buy a Guild Building +MinFameToBuyGuildBuilding = 0; +// Minimum Fame To Buy a Player Building +MinFameToBuyPlayerBuilding = 0; +// maximum price variation ( in absolute value ) that can be due to fame +MaxFamePriceVariation = 0.3; +// Maximum fame value taken in account in trade +MaxFameToTrade = 600000; +// Minimum fame value taken in account in trade, under this value, the merchant refuse to sell +MinFameToTrade = -200000; +// Minimum of positive or negtative fame for PVP +PVPFameRequired = 25; + +//************************************************************************************************************* +// Guild Variables +//************************************************************************************************************* +//fame to buy a guild building +MinFameToBuyGuildBuilding = 0; +// cost of the guild building in money +MoneyToBuyGuildBuilding = 10; +// base bulk of the guild building +BaseGuildBulk = 10000000; +// cost in money to create a guild +GuildCreationCost = 100000; +// max number of charges a guild can apply for +MaxAppliedChargeCount = 3; + +//************************************************************************************************************* +// Animals +//************************************************************************************************************* +AnimalHungerFactor = 0.026042; +AnimalStopFollowingDistance = 100; +AllowAnimalInventoryAccessFromAnyStable = 0; + +//************************************************************************************************************* +// PVP +//************************************************************************************************************* +DuelQueryDuration = 600; +ChallengeSpawnZones = +{ + "pvp_challenge_fyros_spawn_1", + "pvp_challenge_fyros_spawn_2", +}; + +PVPMeleeCombatDamageFactor = 1.0; +PVPRangeCombatDamageFactor = 1.0; +PVPMagicDamageFactor = 1.0; + +TimeForSetPVPFlag = 1200; // 2 mn Timer for set flag pvp become effective +TimeForResetPVPFlag = 18000; // 30 mn Minimum time pvp flag must stay on before player can reset it +TimeForPVPFlagOff = 300; // 30 s Timer for set pvp off, if player make or suffer any pvp action during this time, the reset flag is anulated +PVPActionTimer = 6000; // 10 mn Timer for be able to play in PVE with neutral or other faction character after made an pvp action + +TotemBuildTime = 6000; +TotemRebuildWait = 72000; + +ResPawnPVPInSameRegionForbiden = 0; // 1 is player character can't respawn in same region of there death in faction PvP. + +BuildSpireActive = 0; + + +// max distance from PvP combat to gain PvP points (faction and HoF points) from team PvP kills (in meters) +MaxDistanceForPVPPointsGain = 50.0; +// minimum delta level used to compute the faction points gain +MinPVPDeltaLevel = -50; +// maximum delta level used to compute the faction points gain +MaxPVPDeltaLevel = 50; +// for team PvP progression add this value to the faction points divisor for each team member above one +PVPTeamMemberDivisorValue = 1.0; +// it is the base used in faction point gain formula +PVPFactionPointBase = 5.0; +// it is the base used in HoF point gain formula +PVPHoFPointBase = 5.0; +// in faction PvP the killed players loses the faction points gained per killer multiplied by this factor +PVPFactionPointLossFactor = 0.1; +// in faction PvP the killed players loses the HoF points gained per killer multiplied by this factor +PVPHoFPointLossFactor = 0.5; +// players will not get any point for the same PvP kill for this time in seconds +TimeWithoutPointForSamePVPKill = 300; + +VerboseFactionPoint = 0; + +//************************************************************************************************************* +// Outpost +//************************************************************************************************************* +// Global flag to activate outpost challenge system +LoadOutposts = 1; +// Outpost saving period in tick (1 outpost saved at a time), default is 10 ticks +OutpostSavingPeriod = 10; +// Period in ticks between 2 updates of the same outpost, default is 10 ticks +OutpostUpdatePeriod = 10; +// Set if the outpost drillers generate mps or not +EnableOutpostDrillerMPGeneration = 1; +// Production time of mp in the driller (in seconds) +OutpostDrillerTimeUnit = 60*60*24; // per day +// Delay in ticks used to check if 2 actions for editing an outpost are concurrent +OutpostEditingConcurrencyCheckDelay = 50; +// Period in seconds between 2 updates of outpost timers on clients +OutpostClientTimersUpdatePeriod = 60; +// Number of rounds in an outpost fight +OutpostFightRoundCount = 24; +// Time of a round in an outpost fight, in seconds +OutpostFightRoundTime = 5*60; +// Time to decrement an outpost level in seconds (in peace time) +OutpostLevelDecrementTime = 60*60*24*2; // an outpost loses 1 level every 2 days +// Delay in ticks used to check if 2 actions for editing an outpost are concurrent +OutpostEditingConcurrencyCheckDelay = 50; +// Time of each outpost state (challenge, beforeAttack, afterAttack, beforeDefense, afterDefense), in seconds. If 0 default computed value is used. +OutpostStateTimeOverride = 0; +// Max time the player has to answer the JoinPvp Window, in seconds +OutpostJoinPvpTimer = 10; +// Time range before next attack period in which a service reboot will cancel the challenge, in seconds +OutpostRangeForCancelOnReset = 60*60*3; // 3 hours +// Max number of outposts per guild (DO NOT exceed outpost count in database.xml) +GuildMaxOutpostCount = 10; +//************************************************************************************************************* + +MonoMissionTimout = 144000; +VerboseMissions = 0; +MissionLogFile = "egs_missions.log"; +MissionPrerequisitsEnabled = 1; +CheckCharacterVisitPlacePeriodGC = 64; + +// This icon will be used for missions with an invalid mission icon. If +// default icon is invalid too mission will not be displayed at all on client. +DefaultMissionIcon = "generic_rite"; + +// Mission states is read from file mission_validation.cfg. The EGS will load +// only the files which state is in ValidMissionStates list. If that list +// contains the keyword "All" all missions will be loaded. +ValidMissionStates = { + "All", +// "Disabled", +// "Test", +// "Valid", +}; + +StoreBotNames = 1; + +Tocking = 1; + +// unlimited death pact for internal testing +UnlimitedDeathPact = 1; + +//ignore race prerequisits for missions +IgnoreMissionRacePrerequisits = 1; + +// Max distance allowed for bot chat & dyn chat +MaxBotChatDistanceM = 5; + +//zone types that must be set as triggers +TriggerZoneTypes = { "place","region" }; + +// PeopleAutorized 1:fyros 2:matis 4:tryker 8:zorai + + +StartCommandsWhenMirrorReady = +{ + "PeopleAutorized 255", +}; + +// set the world instance activity verbosity +VerboseWorldInstance = 0; + +// set the shop category parser verbosity +VerboseShopParsing = 0; + +//NegFiltersDebug += { "CDB", "FAME" , "PDR:apply", "PDR:store", "BSIF" }; +//NegFiltersInfo += { "Register EId" }; +//NegFiltersWarning += { }; + + +// Checking coherency between saved players and CEntityIdTranslator map, may be slow, so put to 0 if you want +CheckEntityIdTranslatorCoherency = 0; + +// Filename that contains the list of invalid entity names +InvalidEntityNamesFilename = "invalid_entity_names.txt"; + +ForageKamiAngerThreshold1 = 9900; +ForageKamiAngerThreshold2 = 10000; +ForageKamiAngerDecreasePerHour = 830.0; +ForageKamiAngerPunishDamage = 6000; + +ForageValidateSourcesSpawnPos = 1; +AutoSpawnForageSourcePeriodOverride = 0; +ForageKamiAngerOverride = 0; +ForageSiteStock = 100; +ForageSiteNbUpdatesToLive = 10; +ForageSiteRadius = 9.0; +ForageExtractionTimeMinGC = 230.0; +ForageExtractionTimeSlopeGC = 2.0; +ForageQuantityBaseRate = 0; +ForageQuantityBrick1 = 0.34; //0.3; +ForageQuantityBrick2 = 0.386; // 0.32; +ForageQuantityBrick3 = 0.432; // 0.34 +ForageQuantityBrick4 = 0.478; // 0.36; +ForageQuantityBrick5 = 0.524; // 0.38; +ForageQuantityBrick6 = 0.57; // 0.4; +ForageQuantityBrick7 = 0.34; // 0.3; +ForageQuantityBrick8 = 0.386; // 0.32; +ForageQuantityBrick9 = 0.432; // 0.34; +ForageQuantityBrick10 = 0.478; // 0.36; +ForageQuantityBrick11 = 0.524; // 0.38; +ForageQuantityBrick12 = 0.57; // 0.4; +ForageQuantitySlowFactor = 0.5; +ForageQualitySlowFactor = 1.69; +ForageQualitySlowFactorQualityLevelRatio = 0.01; +ForageQualitySlowFactorDeltaLevelRatio = 0.08; +ForageQualitySlowFactorMatSpecRatio = 0.8; +ForageQualityCeilingFactor = 1.1; +ForageQualityCeilingClamp = 1; +ForageQuantityImpactFactor = 20.0; +ForageQualityImpactFactor = 1.5; +ForageExtractionAbsorptionMatSpecFactor = 4.0; +ForageExtractionAbsorptionMatSpecMax = 0.8; +ForageExtractionCareMatSpecFactor = 1.2; +ForageExtractionAbsorptionEcoSpecFactor = 3.0; +ForageExtractionAbsorptionEcoSpecMax = 0.8; +ForageExtractionCareEcoSpecFactor = 1.1; +ForageExtractionNaturalDDeltaPerTick = 0.1; +ForageExtractionNaturalEDeltaPerTick = 0.1; +ForageCareFactor = 4.0; +ForageCareBeginZone = 5.0; +ForageHPRatioPerSourceLifeImpact = 0.003937; +ForageExplosionDamage = 3000.0; +ToxicCloudDamage = 600.0; +ForageCareSpeed = 0.05; +ForageKamiOfferingSpeed = 0.02; +ForageDebug = 0; +ForageSourceSpawnDelay = 50; +ForageFocusRatioOfLocateDeposit = 10; +ForageFocusAutoRegenRatio = 1.0; +ForageReduceDamageTimeWindow = 30; +ForageExtractionXPFactor = 9.0; +ForageQuantityXPDeltaLevelBonusRate = 2.0; +ForageProspectionXPBonusRatio = 0.2; +ForageExtractionNbParticipantsXPBonusRatio = 0.1; +ForageExtractionNastyEventXPMalusRatio = 0.1; + +QuarteringQuantityAverageForCraftHerbivore = 2.5; +QuarteringQuantityAverageForCraftCarnivore = 5.0; +QuarteringQuantityAverageForMissions = 1.0; +QuarteringQuantityAverageForBoss5 = 10; +QuarteringQuantityAverageForBoss7 = 60; +QuarteringQuantityForInvasion5 = 40; +QuarteringQuantityForInvasion7 = 80; + +VerboseQuartering = 0; + +LootMoneyAmountPerXPLevel = 10.0; + +// Shutdown handling + +// Time to shutdown server in minutes +ShutdownCounter = 5; + +// Time between to shutdown messages in seconds +BroadcastShutdownMessageRate = 30; + +// Time to shutdown to close access to welcome service, in seconds +CloseShardAccessAt = 300; + +// Persistent Logging + +DatabaseId = 0; + +// delay during character stay in game after disconnection +TimeBeforeDisconnection = 300; + +// File that contains the privileges for client commands +ClientCommandsPrivilegesFile = "client_commands_privileges.txt"; + +// File that contains the info on the current event on the server +GameEventFile = "game_event.txt"; + +// Privilege needed for banner +BannerPriv = ":G:SG:GM:SGM:"; +// Privilege that never aggro the bots +NeverAggroPriv = ":OBSERVER:G:SG:GM:SGM:EM:"; +// Privilege always invisible +AlwaysInvisiblePriv = ":OBSERVER:EM:"; +// Privilege to teleport with a mektoub +TeleportWithMektoubPriv = ":GM:SGM:DEV:"; +// Privilege that forbid action execution +NoActionAllowedPriv = ":OBSERVER"; +// Privilege that bypass value and score checking +NoValueCheckingPriv = ":GM:SGM:DEV:EM:EG:"; +// Privilege that prevent being disconnected in case of shard closing for technical problem +NoForceDisconnectPriv = ":GM:SGM:DEV:"; + +// File used to save position flags +PositionFlagsFile = "position_flags.xml"; + +// load PVP zones from primitives? +LoadPVPFreeZones = 1; +LoadPVPVersusZones = 1; +LoadPVPGuildZones = 1; + +// buffer time in ticks used when entering/leaving a PVP zone +PVPZoneEnterBufferTime = 300; +PVPZoneLeaveBufferTime = 1200; +PVPZoneWarningRepeatTime = 50; +PVPZoneWarningRepeatTimeL = 3000; + +// If 1, use the Death Penalty factor from the PVPZone primitive, else no death penalty +PVPZoneWithDeathPenalty = 1; + +// if 1, pvp duel/challenge will be disabled +DisablePVPDuel = 0; +DisablePVPChallenge = 1; + +// Fame Variables +// All values are multiplied by 6000 compared to values displayed on the client. +FameMinToDeclare = 180000; +FameWarningLevel = 30000; +FameMinToRemain = 0; +FameMinToTrade = -180000; +FameMinToKOS = -300000; +FameMaxDefault = 600000; +FameAbsoluteMin = -600000; +FameAbsoluteMax = 600000; + +FameStartFyrosvFyros = 120000; +FameStartFyrosvMatis = -120000; +FameStartFyrosvTryker = -60000; +FameStartFyrosvZorai = 60000; +FameStartMatisvFyros = -120000; +FameStartMatisvMatis = 120000; +FameStartMatisvTryker = 60000; +FameStartMatisvZorai = -60000; +FameStartTrykervFyros = -60000; +FameStartTrykervMatis = 60000; +FameStartTrykervTryker = 120000; +FameStartTrykervZorai = -120000; +FameStartZoraivFyros = 60000; +FameStartZoraivMatis = -60000; +FameStartZoraivTryker = -120000; +FameStartZoraivZorai = 120000; +FameStartFyrosvKami = 60000; +FameStartFyrosvKaravan = -60000; +FameStartMatisvKami = -120000; +FameStartMatisvKaravan = 120000; +FameStartTrykervKami = -60000; +FameStartTrykervKaravan = 60000; +FameStartZoraivKami = 120000; +FameStartZoraivKaravan = -120000; + +FameMaxNeutralvFyros = 300000; +FameMaxNeutralvMatis = 300000; +FameMaxNeutralvTryker = 300000; +FameMaxNeutralvZorai = 300000; +FameMaxFyrosvFyros = 600000; +FameMaxFyrosvMatis = 0; +FameMaxFyrosvTryker = 150000; +FameMaxFyrosvZorai = 450000; +FameMaxMatisvFyros = 0; +FameMaxMatisvMatis = 600000; +FameMaxMatisvTryker = 450000; +FameMaxMatisvZorai = 150000; +FameMaxTrykervFyros = 150000; +FameMaxTrykervMatis = 450000; +FameMaxTrykervTryker = 600000; +FameMaxTrykervZorai = 0; +FameMaxZoraivFyros = 450000; +FameMaxZoraivMatis = 150000; +FameMaxZoraivTryker = 0000; +FameMaxZoraivZorai = 600000; +FameMaxNeutralvKami = 300000; +FameMaxNeutralvKaravan = 300000; +FameMaxKamivKami = 600000; +FameMaxKamivKaravan = -300000; +FameMaxKaravanvKami = -300000; +FameMaxKaravanvKaravan = 600000; + +// Log switches, turns nlinfo on/off +NameManagerLogEnabled = 1; +GameItemLogEnabled = 1; +EntityCallbacksLogEnabled = 1; +EntityManagerLogEnabled = 1; +GuildManagerLogEnabled = 1; +ForageExtractionLogEnabled = 0; +PhraseManagerLogEnabled = 1; +CharacterLogEnabled = 1; +PlayerLogEnabled = 1; +ShoppingLogEnabled = 0; +PVPLogEnabled = 1; +PersistentPlayerDataLogEnabled = 0; + +DailyShutdownSequenceTime = ""; +DailyShutdownBroadcastMessage = "The shard will be shut down in 1 minute"; +DailyShutdownCounterMinutes = 1; +CheckShutdownPeriodGC = 50; + +PlayerChannelHistoricSize = 50; + +FlushSendingQueuesOnExit = 1; +NamesOfOnlyServiceToFlushSending = "BS"; + +// stat database save period in ticks +StatDBSavePeriod = 20; + +// New Newbieland +UseNewNewbieLandStartingPoint= 1; + +FreeTrialSkillLimit = 125; diff --git a/code/ryzom/server/patchman_cfg/default/frontend_service.cfg b/code/ryzom/server/patchman_cfg/default/frontend_service.cfg new file mode 100644 index 000000000..3a1a0c349 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/frontend_service.cfg @@ -0,0 +1,106 @@ + +// Configure module gateway for front end operation +StartCommands += +{ + // Add a security plugin (will add player info on player module proxy) + "gw.securityCreate FESecurity", + // create a front end service transport + "gw.transportAdd FEServer fes", + // set the transport option (need PeerInvisible and Firewalled) + "gw.transportOptions fes(PeerInvisible Firewalled)", + // open the transport + "gw.transportCmd fes(open)", +}; + + +// UDP port for client communication +//FrontendPort = 47851; + +ListenAddress = FSListenHost+":"+FSUDPPort; + +// Maximum size that can be read from a client message +DatagramLength = 10000; + +// Time-out before removing a client when it does not send any more data +ClientTimeOut = 600000; // 10 min + +// Time-out before removing a limbo client when it does not send any more data +LimboTimeOut = 60000; // 1 min + +// Maximum bytes per game cycle sent to all clients (currently not used/implemented) +TotalBandwidth = 536870911; // <512 MB : max value for 32 bit bitsize ! + +// Maximum bytes per game cycle sent to a client, including all headers +ClientBandwidth = 332 * BandwidthRatio; // 332 <=> 13 kbit/s at 5 Hz; 202 <=> 16 kbit/s at 10 Hz + +// Maximum bytes for impulsion channels per datagram sent to a client +ImpulsionByteSize0 = 20 * BandwidthRatio; +ImpulsionByteSize1 = 200 * BandwidthRatio; +ImpulsionByteSize2 = 200 * BandwidthRatio; +NbMinimalVisualBytes = 50; + +// Distance/delta ratio that triggers the sending of a position +DistanceDeltaRatioForPos = 100; + +// Number of game cycles per front-end cycle +GameCycleRatio = 1; +// Execution period of distance calculation +CalcDistanceExecutionPeriod = 8; +// Execution period of position prioritization +PositionPrioExecutionPeriod = 2; +// Execution period of orientation prioritization +OrientationPrioExecutionPeriod = 8; +// Execution period of discreet properties prioritization +DiscreetPrioExecutionPeriod = 2; + +SortPrioExecutionPeriod = 1; + +// Display or not the "FE" nlinfos +DisplayInfo = 1; + +// Prioritizer mode (currently the only mode is 1 for DistanceDelta) +PriorityMode = 1; + +// Strategy for selecting pairs to prioritize (Power2WithCeiling=0, Scoring=1) +SelectionStrategy = 1; + +// Minimum number of pairs to select for prioritization +MinNbPairsToSelect = 2000; + +// Index of client to monitor, or 0 for no monitoring +ClientMonitor = 0; + +// Allow or not beeping +AllowBeep = 1; + +//NegFiltersDebug += { "FESEND", "FERECV", "FETIME", "FEMMAN", "TICK", "TOCK" }; +//NegFiltersInfo += { "FESEND", "FERECV", "FETIME", "FEMMAN", "FESTATS" }; + +Lag = 0; // The lag on the simulated network (used by simlag) +PacketLoss = 0; // percentage of lost packet (used by simlag) +PacketDuplication = 0; // percentage of duplicated packet (used by simlag) +PacketDisordering = 0; // percentage of disordered packet (used by simlag) (Lag must be >100 to use disordering) + +// ---------------------------------------- +// Frontend/Patch mode settings + +// If 1, the frontend server is used in Patch/Frontend mode (0 = only frontend mode, old behaviour) +UseWebPatchServer = 1; + +// If 0, the frontend service is in Patch mode at startup, and it won't accept clients unless WS tells it to do so. +AcceptClientsAtStartup = 1; + +// Patch URL footer. PatchURL will look like 'http://223.254.124.23:43435/patch' +PatchingURLFooter = ":80/patch"; + +// System command to be executed when FS tries to start Web Patch server (ideally at FS startup) +StartWebServerSysCommand = ""; + +// System command to be executed when FS tries to stop Web Patch server (ideally when FS turns to frontend mode) +StopWebServerSysCommand = ""; + +// Use Thread for sending +UseSendThread = 1; + +// Unidirectional Mirror mode (FS part) +ExpediteTOCK = 1; diff --git a/code/ryzom/server/patchman_cfg/default/gpm_service.cfg b/code/ryzom/server/patchman_cfg/default/gpm_service.cfg new file mode 100644 index 000000000..adac6e59d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/gpm_service.cfg @@ -0,0 +1,7 @@ + +CheckPlayerSpeed = 0; +SecuritySpeedFactor = 1.5; + +LoadPacsPrims = 0; +LoadPacsCol = 1; + diff --git a/code/ryzom/server/patchman_cfg/default/input_output_service.cfg b/code/ryzom/server/patchman_cfg/default/input_output_service.cfg new file mode 100644 index 000000000..bbed48699 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/input_output_service.cfg @@ -0,0 +1,119 @@ + +#ifndef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // add a layer 3 server transport for slave logger service + "lgs_gw.transportAdd L3Client slaveL3c", + // open the transport + "lgs_gw.transportCmd slaveL3c(connect addr="+SlaveLGSHost+":"+L3SlaveLGSPort+")", + + // Create a chat unifier client + "moduleManager.createModule ChatUnifierClient cuc", + + // and plug it on the gateway to reach the SU ChatUnifierServer + "cuc.plug glob_gw", + "cuc.plug gw", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + "lsc.plug lgs_gw", +}; + +#endif + +#ifdef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // Create a chat unifier client + "moduleManager.createModule ChatUnifierClient cuc", + // and plug it on the gateway to reach the SU ChatUnifierServer + "cuc.plug glob_gw", + "cuc.plug gw", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + "lsc.plug lgs_gw", + +}; + +#endif + +DisableMonotonicClock = 1; + +// a list of system command that can be run with "sysCmd" service command. +SystemCmd = {}; + +// IOS don't use work directory by default +ReadTranslationWork = 0; + +// Global shard bot name translation file. You sould overide this +// in input_output_service.cfg to specialize the file +// depending on the shard main language. +BotNameTranslationFile = "bot_names.txt"; + +// Global shard event faction translation file. You sould override this +// in input_output_service.cfg to specialize the file +// depending on the shard main language. +EventFactionTranslationFile = "event_factions.txt"; + +// Activate/deactivate debugging of missing paremeter replacement +DebugReplacementParameter = 1; + +// Id of database for PDS Chat Logging +DatabaseId = 1; + +// Default verbose debug flags: +//----------------------------- + +// Log bot name translation from 'BotNameTranslationFile' +VerboseNameTranslation = 1; +// Log chat management operation +VerboseChatManagement = 1; +// Log chat event +VerboseChat = 1; +// Log string manager message +VerboseStringManager = 1; +// Log the string manager parsing message +VerboseStringManagerParser = 0; diff --git a/code/ryzom/server/patchman_cfg/default/logger_service.cfg b/code/ryzom/server/patchman_cfg/default/logger_service.cfg new file mode 100644 index 000000000..588b9ecc3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/logger_service.cfg @@ -0,0 +1,89 @@ + + +LogQueryLanguageHelp = +{ + "Log Query Language Quick Reference", + "----------------------------------", + "", + "A query is constitued of a series of predicates combined by 'or' and 'and' logical operator.", + "Each predicate is applied on each log, then the result combined to obtain a list of 'selected' log.", + "", + "General query format :", + "", + " (options) predicate (logicalCombiner predicate)*", + "", + "options format :", + " option*", + "", + " Available option :", + " - 'full_context' : extract all the log that are in the context of a ", + " selected log", + " - 'output_prefix=' : set a prefix for the result file of the query", + "", + "logicalCombiner format :", + " Supported logical combiner are 'or' and 'and'.", + " The 'and' combiner have the hightest priority over 'or'.", + " You can also manually force the priority of combiner by", + " grouping predicate with parenthesis.", + " e.g : '(' predicate1 'or' predicate2 ')' 'and' predicate3'", + " In this case, the 'or' between predicate1 and predicate2 is avaluated ", + " before the 'and' with predicated3", + "", + "Predicate format :", + " ", + "", + "ParamName format :", + " Any parameter name that exist in a log. Any log that use this param name will", + " be tested againts the predicate.", + " e.g : userId", + "", + "", + "ParamType format:", + " You can test a predicate against any parameter of a given type, whatever it's name.", + " '{' typeName '}'", + " The available type names are :", + " uint32, uint64, sint32, float, string, entityId, itemId, sheetId.", + " Clearly, the entityId, itemId and sheetId are the most interesting.", + "", + "Operator format :", + " All classicle operators are available:", + " '<', '<=', '>', '>=', '=' (or '=='), '!=' and 'like'.", + " The 'like' operator try to find the constant as a substring of the parameter.", + "", + "Constant format :", + " Right part of a predicate are always constant.", + " You can write constant of different type :", + " uint32 : any decimal or hexacimal (prefixed with '0x')", + " sint32 : any decimal prefixed with the minus sign '-'", + " string : any list of characters surrounded by double quote", + " entityId : an entity id as formated by NeL '(0x1234:12:34:56)'", + " sheeId : any characters that can be considered as a sheet name (e.g 'foo.sitem')", + " itemId : an item id as printed by the ryzom tool : '[123:0x123456:1234]'", + "", + "", + "Special param name :", + " There are threee hardcoded parameter name :", + " 'LogName', 'LogDate' and 'ShardId'.", + "", + " 'LogName' is used to build query based on the name of the log instead of", + " on the value of the parameters. e.g : 'LogName = '''Item_Create''' will select", + " all logs of item creation.", + "", + " 'LogDate' is used to restrict the scope of the query on a limited time frame.", + " LogDate accept date of the following format :", + " - literal date : YYYY-MM-DD", + " - literal date and time: YYYY-MM-DD HH:MM", + " - literal date and time: YYYY-MM-DD HH:MM:SS", + " - yesterday : 'yesterday'", + " - some time ago : secs|mins|hours|days|weeks|months|years", + "", + " e.g : 'LogDate > yesterday' -> any log from yesterday to now", + " 'LogDate > 2 days' -> any log from 2 days ago to now", + " 'LogDate < 3 weeks' -> any log older than 3 weeks", + "", + " 'ShardId' is used to select log from a specific shard. You must", + " give a numeric shard id as predicate parameter. ", + "", + "", + "", +}; \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg b/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg new file mode 100644 index 000000000..644e3e76c --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg @@ -0,0 +1,15 @@ + +DontUseNS = 1; + +// Set if Hall of Fame generator is disabled +HoFDisableGenerator = 0; + +// Directory where HDT files are parsed (in WebRootDirectory) +HoFParsedDirectory = "hof"; + +// HoF generator update period in milliseconds +HoFGeneratorUpdatePeriod = 5000; + +// HoF generator directory update period in seconds +HoFGeneratorDirUpdatePeriod = 60; + diff --git a/code/ryzom/server/patchman_cfg/default/mirror_service.cfg b/code/ryzom/server/patchman_cfg/default/mirror_service.cfg new file mode 100644 index 000000000..66850360d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/mirror_service.cfg @@ -0,0 +1,6 @@ + +// Linux only +DestroyGhostSegments = 1; + +//NegFiltersDebug += { "MSG:" }; + diff --git a/code/ryzom/server/patchman_cfg/default/naming_service.cfg b/code/ryzom/server/patchman_cfg/default/naming_service.cfg new file mode 100644 index 000000000..28405823d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/naming_service.cfg @@ -0,0 +1,6 @@ + +SId = 1; +DontUseNS = 1; + +UniqueOnShardServices = {}; // { "EGS", "GPMS", "IOS", "TICKS", "WS", "AIS", "DSS" }; +UniqueByMachineServices = {}; // { "MS" }; diff --git a/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg b/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg new file mode 100644 index 000000000..2755403b7 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg @@ -0,0 +1,25 @@ +DontUseNS = 1; + +RRDToolPath = "rrdtool"; +RRDVarPath = "../graph_datas"; + +// Variables required to be defined by other cfgs +//AESHost="localhost"; +//ASWebPort="46700"; +//ASPort="46701"; + +StartCommands += +{ + // create the admin service module and open the web interface + "moduleManager.createModule AdminService as webPort="+ASWebPort, + + // create a gateway for aes to connect + "moduleManager.createModule StandardGateway as_gw", + // create a layer 3 server + "as_gw.transportAdd L3Server l3s", + "as_gw.transportOptions l3s(PeerInvisible)", + "as_gw.transportCmd l3s(open port="+ASPort+")", + + // plug the as + "as.plug as_gw", +}; \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg b/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg new file mode 100644 index 000000000..9a28ac706 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg @@ -0,0 +1,37 @@ + +NSHost = SUNSHost; +DontUseNS = SUDontUseNS; + +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; + +StartCommands += +{ + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Server l3s", + // open the transport + "glob_gw.transportCmd l3s(open port="+SUGlobalPort+")", + // Create a session manager module + "moduleManager.createModule RingSessionManager rsm web(port=49999) ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "rsm.plug gw", + // Create a login service module + "moduleManager.createModule LoginService ls ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49998) nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "ls.plug gw", + // Create a character synchronization module + "moduleManager.createModule CharacterSynchronisation cs fake_edit_char ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + "cs.plug gw", + // Create entity locator module + "moduleManager.createModule EntityLocator el ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "el.plug gw", + // Create a mail forum notifier forwarder + "moduleManager.createModule MailForumNotifierFwd mfnfwd ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49897)", + "mfnfwd.plug gw", + // Create a chat unifier server module + "moduleManager.createModule ChatUnifierServer cus ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + "cus.plug gw", +}; + diff --git a/code/ryzom/server/patchman_cfg/default/tick_service.cfg b/code/ryzom/server/patchman_cfg/default/tick_service.cfg new file mode 100644 index 000000000..25eafb8fd --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/tick_service.cfg @@ -0,0 +1,10 @@ + +/// A list of vars to graph for TS +GraphVars += +{ + "TotalSpeedLoop", "60000", // low rez, every minutes + "TotalSpeedLoop", "0", // high rez, every tick +}; + + +//NegFiltersDebug = { "DELTA_", "DEFAULT_CB", }; diff --git a/code/ryzom/server/patchman_cfg/default/welcome_service.cfg b/code/ryzom/server/patchman_cfg/default/welcome_service.cfg new file mode 100644 index 000000000..ce7b47fd0 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/welcome_service.cfg @@ -0,0 +1,37 @@ + +// short name of the frontend service +FrontendServiceName = "FS"; + +// in ring architecture, we no more use the legacy LS +DontUseLS = 1; + +// if any of this services is not connected, the WS is closed. +ExpectedServices = { "FS", "MS", "EGS", "GPMS", "IOS", "TICKS" }; + +// Access level to shard +// 0: only dev +// 1: dev + privileged users (see also OpenGroups variable) +// 2: open for all +ShardOpen = 2; + +// File that contains the ShardOpen value (used to override ShardOpen value through AES' command createFile) +// For instance, ShardOpen default value is 0, then AES creates a file to set ShardOpen to 2. If WS crashes, +// ShardOpen is still set to 2 when it relaunches... +// ShardOpenStateFile = "/tmp/shard_open_state"; + +// Privileged Groups +OpenGroups = ":GM:SGM:G:SG:GUEST:"; + +UsePatchMode = 0; + +// create welcome service module +StartCommands += +{ + // create the service + "moduleManager.createModule WelcomeService ws", + // plug it in the gateway + "ws.plug gw", + + // add the SU service + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", +}; diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt new file mode 100644 index 000000000..b26cd30e8 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt @@ -0,0 +1,717 @@ +//----------------------------------------------------------------------------- +// Common Definitions +//----------------------------------------------------------------------------- + +// --------------------------------- +// shard types & exe sets + +// mini ring ----------------------- + +define exe_set_mini_ring + use raes + use ms_mini_ring + use ais_ring + use egs_ring + use dss_ring + use gpms_ring + use ios_ring + use rns_ring + use fes_solo + use ts_std + use rws_std + cfg NSHost="localhost"; + +// mini mainland ------------------- + +define exe_set_mini_mainland + use raes + use ms_mini_mainland + use ais_newbyland + use egs_mainland + use gpms_mainland + use ios_mainland + use rns_mainland + use fes_solo + use ts_std + use rws_std + cfg NSHost="localhost"; + + +// full ring ----------------------- + +define exe_set_std_ring_be + use raes + use ms_std_ring + use ais_ring + use egs_ring + use dss_ring + use gpms_ring + use ios_ring + use rns_ring + use ts_std + use rws_std + +define exe_set_std_ring_fe + use raes + use ms_std_ring + use fes_std_pair01 + use fes_std_pair02 + + +// full mainland ------------------- + +define exe_set_std_mainland_fe + use raes + use ms_std_mainland + use exe_set_std_mainland_fe_basics + +define exe_set_std_mainland_fe_basics + use fes_std_pair01 + use fes_std_pair02 + +define exe_set_std_mainland_be01 + use raes + use ms_std_mainland + use exe_set_std_mainland_be01_basics + +define exe_set_std_mainland_be01_basics + use egs_mainland + use gpms_mainland + use ios_mainland + use rns_mainland + use ts_std + use rws_std + +define exe_set_std_mainland_be02 + use raes + use ms_std_mainland +// use exe_set_std_mainland_be02_basics + +define exe_set_std_mainland_be02_basics +// use ais_fyros +// use ais_zorai +// use ais_roots + +define exe_set_std_mainland_be03 + use raes + use ms_std_mainland + use exe_set_std_mainland_be03_basics + +define exe_set_std_mainland_be03_basics +// use ais_matis +// use ais_tryker + use ais_newbyland + +// unifier and co ------------------ + +define exe_set_mini_unifier + use raes + use su_mini + +define exe_set_std_unifier + use raes + use su_std + use mfs_std + +define exe_set_std_backup_master + use raes + use bms_master + use pdss + +define exe_set_std_backup_slave + use raes + use bms_slave + use pdss + +define exe_set_std_lgs_master + use lgs_master + +define exe_set_std_lgs_slave + use lgs_slave + + +// --------------------------------- +// standard data packs + +define common + cfg DontLog = 1; + data cfg +// data scripts + +define shard_common + use common + data data_common + data data_game_share + data data_leveldesign + + +// --------------------------------- +// executables + +// ais ----------------------------- + +define ais + use shard_common + cfg #include "../live/service_ai_service/ai_service.cfg" + cfg WriteFilesDirectory= "../live/service_ai_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define ais_ring + name ais + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Ring + use ais + data data_r2_desert + data data_r2_forest + data data_r2_jungle + data data_r2_lakes + data data_r2_roots + +define ais_mainland + use ais + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + + +define ais_mini_mainland + name ais + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Indoors:Newbieland:Post + use ais_mainland + +define ais_newbyland + name ais_newbyland + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Indoors:Newbieland:Post + use ais + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + + +// bms ----------------------------- + +define bms + use common + data data_leveldesign +// cmdLine backup_module_service +// cfg #include "../live/cfg/backup_module_service.cfg" + cfg #include "../live/service_backup_service/backup_service.cfg" +// cfg #include "../live/cfg/backup_service.cfg" + cfg WriteFilesDirectory= "../live/service_backup_service/"; + +define bms_master + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49990 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49990; + cfgAfter L3ListeningPort = 49950; + cfgAfter WebPort = 49970; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_master2 + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49994 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49994; + cfgAfter L3ListeningPort = 49954; + cfgAfter WebPort = 49974; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49991 + cfg #include "../live/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49991; + cfgAfter L3ListeningPort = 49951; + cfgAfter WebPort = 49971; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_pd_master + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49992 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49992; + cfgAfter L3ListeningPort = 49952; + cfgAfter WebPort = 49972; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard_pd/"; + +define bms_pd_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49993 + cfg #include "../live/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49993; + cfgAfter L3ListeningPort = 49953; + cfgAfter WebPort = 49973; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard_pd/"; + +define backup_lgs + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49994 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49994; + cfgAfter L3ListeningPort = 49995; + cfgAfter WebPort = 49972; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard_lgs/"; + cfgAfter UseTempFile = 0; + +// lgs ----------------------------- +define lgs + use common + data data_leveldesign + + cmdLine logger_service -C. -L. --nobreak --writepid + cfg #include "../live/cfg/logger_service.cfg" + + cfg LogQueryResultFile = "log_query_result.txt"; + cfg SaveFilesDirectory = "save_shard/"; + cfg BSHost = LGSBSHost+":"+LGSBSPort; + cfg L3BSPort = LGSBSPort; + cfg DontUseNS = 1; + + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule LoggerService ls", + cfgAfter "moduleManager.createModule StandardGateway lgs_gw", + cfgAfter "ls.plug lgs_gw", + cfgAfter "lgs_gw.transportAdd L3Server l3s", + cfgAfter "lgs_gw.transportOptions l3s(PeerInvisible)", + cfgAfter "lgs_gw.transportCmd l3s(open port="+ LGSL3Port +")", + cfgAfter }; + cfgAfter SaveShardRoot = "../save_shard_lgs/"; + cfgAfter SaveFilesDirectory = "../save_shard_lgs/"; + +define lgs_master + use lgs + cfg LGSL3Port = L3MasterLGSPort; + + +define lgs_slave + use lgs + cfg LGSL3Port = L3SlaveLGSPort; + + +// dss ----------------------------- + +define dss + use shard_common + cmdLine dynamic_scenario_service -C. -L. --nobreak --writepid + cfg #include "../live/service_dynamic_scenario_service/dynamic_scenario_service.cfg" + cfg WriteFilesDirectory="../live/service_dynamic_scenario_service/"; + +//define dss_mainland +// use dss +// cfg #include "../live/cfg/dynamic_scenario_service_mainland.cfg" + +define dss_ring + use dss + cfg #include "../live/cfg/dynamic_scenario_service_ring.cfg" + + +// egs ----------------------------- + +define egs + use shard_common + cmdLine entities_game_service -C. -L. --nobreak --writepid + data data_language + cfg #include "../live/service_entities_game_service/entities_game_service.cfg" + cfg PathsNoRecurse= {"."}; + cfg WriteFilesDirectory="../live/service_entities_game_service/"; + cfg NeverAggroPriv = ":OBSERVER:G:SG:GM:SGM:EM:"; + cfg AlwaysInvisiblePriv = ":OBSERVER:EM:"; + cfg TimeBeforeDisconnection = 300; + cfg + cfg UsedContinents += + cfg { + cfg "indoors", "4", // NB : this is for uninstanciated indoors building. + cfg "newbieland", "20", + cfg }; + cfg + cfg // define the primitives configuration used. + cfg UsedPrimitives = + cfg { + cfg "newbieland_all", + cfg }; + cfgAfter StartCommands += { + cfgAfter "moduleManager.createModule AnimSessionManager asm", + cfgAfter "asm.plug gw", + cfgAfter }; + cfgAfter GraphVars += { "NbPlayers", "60000" }; + cfgAfter GraphVars += { "CharacterLoadPerTick", "0" }; + cfgAfter GraphVars += { "CharacterLoadPerTick", "60000" }; + cfgAfter GraphVars += { "CharacterSavePerTick", "0" }; + cfgAfter GraphVars += { "CharacterSavePerTick", "60000" }; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + cfgAfter RingRPXPRequiredPerAction=700; + cfgAfter RingRPXPRequiredPerTimeSlice=700; + + +define egs_mainland + use egs + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + //cfg #include "../live/cfg/entities_game_service_mainland.cfg" + cfg UsedContinents = { "dummy", "10000" }; + cfgAfter MaxXPGainPerPlayer = 30.0; + cfgAfter DeathXPFactor = 0.1; + cfgAfter CachePrims = 1; + cfgAfter CorrectInvalidPlayerPositions = 1; + +define egs_ring + use egs + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + cfg #include "../live/cfg/entities_game_service_ring.cfg" + cfg UsedContinents = + cfg { + cfg "r2_desert", "10000", + cfg "r2_forest", "10001", + cfg "r2_jungle", "10002", + cfg "r2_lakes", "10003", + cfg "r2_roots", "10004", + cfg }; + cfgAfter MaxXPGainPerPlayer = 30.0; + cfgAfter DeathXPFactor = 0.0; + cfgAfter CachePrims = 1; + cfgAfter CorrectInvalidPlayerPositions = 0; + cfgAfter RingRPEnabled = 0; + + +// fes ----------------------------- + +define fes + use shard_common + cmdLine frontend_service -C. -L. --nobreak --writepid + cfg #include "../live/service_frontend_service/frontend_service.cfg" + cfg WriteFilesDirectory="../live/service_frontend_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define fes_solo + use fes + use sbs + cfg FSUDPPort = 47860; + +define fes_std_pair01 + use fes + use sbs + cfg FSUDPPort = 47851; + +define fes_std_pair02 + use fes + use sbs + cfg FSUDPPort = 47852; + +define fes_std_pair03 + use fes + use sbs + cfg FSUDPPort = 47853; + +define fes_std_pair04 + use fes + use sbs + cfg FSUDPPort = 47854; + + +// gpms ---------------------------- + +define gpms + use shard_common + cmdLine gpm_service -C. -L. --nobreak --writepid + data data_pacs_prim + cfg #include "../live/service_gpm_service/gpm_service.cfg" + cfg WriteFilesDirectory="../live/service_gpm_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define gpms_mainland + use gpms + data data_newbieland + data data_indoors + cfg #include "../live/cfg/gpm_service_mainland.cfg" + +define gpms_ring + use gpms + data data_r2_desert + data data_r2_forest + data data_r2_jungle + data data_r2_lakes + data data_r2_roots + cfg #include "../live/cfg/gpm_service_ring.cfg" + + +// pdss ---------------------------- + +define pdss + name pdss + use common + data data_leveldesign + cmdLine pd_support_service -C. -L. --nobreak --writepid + cfg + cfg NSHost="localhost"; + cfg + cfg HourlyCommands = + cfg { + cfg "system /srv/core/bin/hourly_script.sh", + cfg }; + cfg + cfg DailyCommands = + cfg { + cfg "system /srv/core/bin/daily_script.sh", + cfg + cfg "fdcCacheClear", + cfg "fdcCacheAddFileSpecRecurse /srv/core/save_shard_backups/latest/characters/account_*_?_pdr.bin", + cfg + cfg "JobUpdatesPerUpdate 10", + cfg }; + cfg + cfg InputFileDirectory="/srv/core/save_shard_backups/latest/characters/"; + cfg OutputFileDirectory="../stats/"; + cfg ScriptDirectory="../live/service_pd_support_service/scripts/"; + cfg DontUseNS=1; + cfg DontUseTS=1; + cfg DontUseAES=1; + + +// ios ----------------------------- + +define ios + use shard_common + cmdLine input_output_service -C. -L. --nobreak --writepid + data data_language + cfg #include "../live/service_input_output_service/input_output_service.cfg" + cfg WriteFilesDirectory="../live/service_input_output_service/"; + cfgAfter VerboseStringManager = 0; + cfgAfter VerboseStringManagerParser = 0; + cfgAfter VerboseChat = 0; + cfgAfter VerboseChatManagement = 0; + cfgAfter VerboseNameTranslation = 0; + cfgAfter // Create a char name mapper + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule CharNameMapper cnm", + cfgAfter "cnm.plug gw", + cfgAfter "moduleManager.createModule IOSRingModule iosrm", + cfgAfter "iosrm.plug gw", + cfgAfter }; + + +define ios_mainland + use ios + //cfg #include "../live/cfg/input_output_service_mainland.cfg" + +define ios_ring + use ios + cfg #include "../live/cfg/input_output_service_ring.cfg" + + +// las ----------------------------- + +define las + use common + cmdLine log_analyser_service -C. -L. --nobreak --writepid + cfg #include "../live/service_log_analyser_service/log_analyser_service.cfg" + cfg WriteFilesDirectory="../"; + + +// mfs ----------------------------- + +define mfs + use common + cmdLine mail_forum_service -C. -L. --nobreak --writepid + data data_www + cfg #include "../live/service_mail_forum_service/mail_forum_service.cfg" + cfg WriteFilesDirectory="../live/service_mail_forum_service/"; + +define mfs_std + use mfs + + +// mos ----------------------------- + +define mos + use shard_common + cmdLine monitor_service -C. -L. --nobreak --writepid + cfg #include "../live/service_monitor_service/monitor_service.cfg" + cfg WriteFilesDirectory="../live/service_monitor_service/"; + + +// ms ------------------------------ + +define ms + use shard_common + cmdLine mirror_service -C. -L. --nobreak --writepid + cfg #include "../live/service_mirror_service/mirror_service.cfg" + cfg WriteFilesDirectory="../live/service_mirror_service/"; + cfgAfter GraphVars += { "UserSpeedLoop", "0" }; + cfgAfter GraphVars += { "UserSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + +define ms_mini_ring + use ms + +define ms_mini_mainland + use ms + +define ms_std_ring + use ms + +define ms_std_mainland + use ms + + +// raes ----------------------------- + +define raes + cmdLine none + data service_ryzom_admin_service + + +// ras ----------------------------- + +define ras + use common + data data_www + cmdLine ryzom_admin_service --fulladminname=ryzom_admin_service --shortadminname=AS -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_admin_service/ryzom_as.cfg" + cfg WriteFilesDirectory="../"; + + +// rns ------------------------------ + +define rns + use common + cmdLine ryzom_naming_service -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_naming_service/naming_service.cfg" + cfg WriteFilesDirectory="../live/service_ryzom_naming_service/"; + +define rns_ring + use rns + +define rns_mainland + use rns + + +// rws ------------------------------ + +define rws + use common + cmdLine ryzom_welcome_service -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_welcome_service/welcome_service.cfg" + cfg WriteFilesDirectory="../live/service_ryzom_welcome_service/"; + +define rws_std + use rws + +// sbs ------------------------------ + +define sbs + use common + cmdLine session_browser_server -C. -L. --nobreak --writepid + cfg SBSPort = FSUDPPort+1000; + cfg WriteFilesDirectory="../live/service_session_browser_server/"; + cfg DontUseNS = 0; + cfg StartCommands += + cfg { + cfg "moduleManager.createModule SessionBrowserServerMod sbs suAddr="+SUHost+":49999 listenPort="+SBSPort+" ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + cfg "sbs.plug gw", + cfg }; + cfgAfter GraphVars += { "NetSpeedLoop", "0" }; + cfgAfter GraphVars += { "NetSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + + +define sbs_std + use sbs + +// su ------------------------------ + +define su + use common + cmdLine shard_unifier_service -C. -L. --nobreak --writepid + data data_www + cfg #include "../live/service_shard_unifier_service/shard_unifier_service.cfg" + cfg WriteFilesDirectory="../live/service_shard_unifier_service/"; + cfgAfter // Create a command executor + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule CommandExecutor ce", + cfgAfter "ce.plug gw", +// cfgAfter "addNegativeFilterDebug NOPE", + cfgAfter }; + cfgAfter GraphVars += { "TotalConcurentUser", "60000" }; + cfgAfter GraphVars += { "NetSpeedLoop", "0" }; + cfgAfter GraphVars += { "NetSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + + +define su_std + use su + +define su_mini + use su + + +// ts ------------------------------ + +define ts + use shard_common + cmdLine tick_service -C. -L. --nobreak --writepid + cfg #include "../live/service_tick_service/tick_service.cfg" + cfg WriteFilesDirectory="../live/service_tick_service/"; + +define ts_std + use ts diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt new file mode 100644 index 000000000..de58fc10f --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt @@ -0,0 +1,116 @@ +//----------------------------------------------------------------------------- +// The set of mini01 domains +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// mini01 Domain +//----------------------------------------------------------------------------- + +// the mini01 domain ----------------- + +define domain_mini01 + domain mini01 + use shard_mini01_unifier + use shard_mini01_mainland01 +// use shard_mini01_ring01 + + // domain ports + cfg ASWebPort="46710"; + cfg ASPort="46711"; + cfg AESPort="46712"; + cfg SUPort = 50505; + cfg SUGlobalPort = 50503; + cfg L3BSPort = "49950"; + cfg L3SlaveBSPort = "49951"; + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + + // domain hosts + cfg AESHost = "localhost"; + cfg SUHost = "ep1.mini01.ryzomcore.org"; + cfg MFSHost = "ep1.mini01.ryzomcore.org"; + cfg BSHost = "ep1.mini01.ryzomcore.org:49990"; + cfg SlaveBSHost= "ep1.mini01.ryzomcore.org:49991"; + cfg MasterLGSHost = "ep1.mini01.ryzomcore.org"; + cfg SlaveLGSHost = "ep1.mini01.ryzomcore.org"; + cfg LGSBSHost = "ep1.mini01.ryzomcore.org"; + cfg DBHost = "localhost"; // FIXME "sql.core.ryzomcore.org"; + cfgAfter WebSrvHost = "http://ep1.mini01.ryzomcore.org:50000/"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_mini01.cfg + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "301", "Mainland 01", "(Mainland 01)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "301", "Mainland 01", "mla", + cfgAfter }; + cfgAfter RRDVarPath = "../rrd_graphs"; + + // addition of extra filters for this domain +// cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; +// cfgAfter NegFiltersInfo+= {"FESTATS", "FETIME", "FERECV", "FESEND: sent SYNC message to client 1", "EIT: Register EId"}; +// cfgAfter NegFiltersWarning+= {"PIPO_SESSION1", "casino_session_matis01", "invalid damage type 10", "_log_Item_Delete", +// cfgAfter "_log_Item_Money", "_log_Item_Create", "_log_Item_Move", "botChatMissionAdvance> invalid index 0", +// cfgAfter "_MaxRange(0) < _MinRange(1)", "Can't find craft plan sheet 'unknown.unknown'"}; + cfgAfter DontUseAES=1; +// cfgAfter RingAccessLimits="d3:j2:f2:l2:p2"; + cfgAfter RingRPEnabled=0; + cfgAfter DomainName = "mini01"; + cfgAfter EnableStlAllocatorChecker = 0; + + cfgAfter // start commands for setting up the exchange level caps of different mini01 shards +// cfgAfter StartCommands += { "setShardExchangeLimit 101 250" }; +// cfgAfter StartCommands += { "displayShardExchangeLimits" }; + + +// shard unifier ------------------- + +define shard_mini01_unifier + shard unifier + cfg ShardId = 300; + data data_www + use ras + use exe_set_std_unifier + use bms_master + use exe_set_std_lgs_master + use exe_set_std_lgs_slave + use backup_lgs + cfg DBPass = "p4ssw0rd"; + host ep1.mini01.ryzomcore.org + + +// shard mainland01 ---------------- + +define shard_mini01_mainland01 + shard mainland01 + use exe_set_mini_mainland + cfg ShardId = 301; + cfg BasePort = 52000; + cfg SaveFilesDirectory="mini01_mainland01/"; + cfg NSHost = "ep1.mini01.ryzomcore.org"; + cfg FSListenHost = "ep1.mini01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_mini_mainland.cfg + host ep1.mini01.ryzomcore.org + + +// shard ring01 -------------------- + +define shard_mini01_ring01 + shard ring01 + use exe_set_mini_ring + cfg ShardId = 401; + cfg BasePort = 52400; + cfg SaveFilesDirectory="mini01_ring01/"; + cfg NSPort = 51100; + cfg NSHost = "ep1.mini01.ryzomcore.org" + 51100; + cfgFile ../cfg/02_shard_type_std_ring.cfg + host ep1.mini01.ryzomcore.org + diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt new file mode 100644 index 000000000..6954b38da --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt @@ -0,0 +1,442 @@ +//----------------------------------------------------------------------------- +// The set of std01 domains +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// std01 Domain +//----------------------------------------------------------------------------- + +// the std01 domain ----------------- + +define domain_std01 + domain std01 + use shard_std01_unifier + use shard_std01_mainland01 + use shard_std01_mainland02 + use shard_std01_ring01 + use shard_std01_ring02 + + // domain ports + cfg ASWebPort="46700"; + cfg ASPort="46701"; + cfg AESPort="46702"; + cfg SUPort = 50505; + cfg SUGlobalPort = 50503; + cfg L3BSPort = "49950"; + cfg L3SlaveBSPort = "49951"; + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + + // domain hosts + cfg AESHost = "localhost"; + cfg SUHost = "su1.std01.ryzomcore.org"; + cfg MFSHost = "su1.std01.ryzomcore.org"; + cfg BSHost = "pd1.std01.ryzomcore.org:49990"; // Backup service host for domain + cfg SlaveBSHost= "pd2.std01.ryzomcore.org:49991"; + cfg MasterLGSHost = "pd3.std01.ryzomcore.org"; + cfg SlaveLGSHost = "pd4.std01.ryzomcore.org"; + cfg LGSBSHost = "csr.core.ryzomcore.org"; // Backup service host for log service + cfg DBHost = "sql.core.ryzomcore.org"; + cfgAfter WebSrvHost = "http://su1.std01.ryzomcore.org:50000/"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_std01.cfg + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "101", "Mainland 01", "(Mainland 01)", "en", + cfgAfter "102", "Mainland 02", "(Mainland 02)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "101", "Mainland 01", "mla", + cfgAfter "102", "Mainland 02", "mlb", + cfgAfter }; + cfgAfter RRDVarPath = "../rrd_graphs"; + + // addition of extra filters for this domain +// cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"FESTATS", "FETIME", "FERECV", "FESEND: sent SYNC message to client 1", "EIT: Register EId"}; + cfgAfter NegFiltersWarning+= {"PIPO_SESSION1", "casino_session_matis01", "invalid damage type 10", "_log_Item_Delete", + cfgAfter "_log_Item_Money", "_log_Item_Create", "_log_Item_Move", "botChatMissionAdvance> invalid index 0", + cfgAfter "_MaxRange(0) < _MinRange(1)", "Can't find craft plan sheet 'unknown.unknown'"}; + cfgAfter DontUseAES=1; +// cfgAfter RingAccessLimits="d3:j2:f2:l2:p2"; + cfgAfter RingRPEnabled=0; + cfgAfter DomainName = "std01"; + cfgAfter EnableStlAllocatorChecker = 0; + + cfgAfter // start commands for setting up the exchange level caps of different std01 shards + cfgAfter StartCommands += { "setShardExchangeLimit 101 250" }; + cfgAfter StartCommands += { "setShardExchangeLimit 102 250" }; + cfgAfter StartCommands += { "displayShardExchangeLimits" }; + + +// shard unifier ------------------- + +define shard_std01_unifier + shard unifier + cfg ShardId = 100; + use shard_exe_set_std01_ras + use shard_exe_set_std01_unifier + +define shard_exe_set_std01_ras + use ras + host ep1.std01.ryzomcore.org + +define shard_exe_set_std01_unifier + use exe_set_std_unifier + host su1.std01.ryzomcore.org + cfg DBPass = "p4ssw0rd"; + + +// shard mainland01 ---------------- + +define shard_std01_mainland01 + shard mainland01 + use shard_exe_set_std01_mainland01_be01 + use shard_exe_set_std01_mainland01_be02 + use shard_exe_set_std01_mainland01_be03 + use shard_exe_set_std01_mainland01_fe01 + use shard_exe_set_std01_mainland01_fe02 + cfg ShardId = 101; + cfg BasePort = 51000; + cfg SaveFilesDirectory="std01_mainland01/"; + cfg NSHost = "mla1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_mainland.cfg + +define shard_exe_set_std01_mainland01_be01 + use exe_set_std_mainland_be01 + host mla1.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_be02 + use exe_set_std_mainland_be02 + host mla2.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_be03 + use exe_set_std_mainland_be03 + host mla3.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_fe01 + use exe_set_std_mainland_fe + host mla4.std01.ryzomcore.org + cfg FSListenHost = "mla4.std01.ryzomcore.org"; + +define shard_exe_set_std01_mainland01_fe02 + use exe_set_std_mainland_fe + host mla5.std01.ryzomcore.org + cfg FSListenHost = "mla5.std01.ryzomcore.org"; + + +// shard mainland02 ---------------- + +define shard_std01_mainland02 + shard mainland02 + use shard_exe_set_std01_mainland02_be01 + use shard_exe_set_std01_mainland02_be02 + use shard_exe_set_std01_mainland02_be03 + use shard_exe_set_std01_mainland02_fe01 + use shard_exe_set_std01_mainland02_fe02 + cfg ShardId = 102; + cfg BasePort = 51100; + cfg SaveFilesDirectory="std01_mainland02/"; + cfg NSHost = "mlb1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_mainland.cfg + +define shard_exe_set_std01_mainland02_be01 + use exe_set_std_mainland_be01 + host mlb1.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_be02 + use exe_set_std_mainland_be02 + host mlb2.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_be03 + use exe_set_std_mainland_be03 + host mlb3.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_fe01 + use exe_set_std_mainland_fe + host mlb4.std01.ryzomcore.org + cfg FSListenHost = "mlb4.std01.ryzomcore.org"; + +define shard_exe_set_std01_mainland02_fe02 + use exe_set_std_mainland_fe + host mlb5.std01.ryzomcore.org + cfg FSListenHost = "mlb5.std01.ryzomcore.org"; + + +// shard ring01 -------------------- + +define shard_std01_ring01 + shard ring01 + use shard_exe_set_std01_ring01_be + use shard_exe_set_std01_ring01_fe + cfg ShardId = 201; + cfg BasePort = 51400; + cfg SaveFilesDirectory="std01_ring01/"; + cfg NSHost = "rra1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_ring.cfg + +define shard_exe_set_std01_ring01_be + use exe_set_std_ring_be + host rra1.std01.ryzomcore.org + +define shard_exe_set_std01_ring01_fe + use exe_set_std_ring_fe + host rra2.std01.ryzomcore.org + cfg FSListenHost = "rra2.std01.ryzomcore.org"; + + +// shard ring02 -------------------- + +define shard_std01_ring02 + shard ring02 + use shard_exe_set_std01_ring02_be + use shard_exe_set_std01_ring02_fe + cfg ShardId = 202; + cfg BasePort = 51500; + cfg SaveFilesDirectory="std01_ring02/"; + cfg NSHost = "rrb1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_ring.cfg + +define shard_exe_set_std01_ring02_be + use exe_set_std_ring_be + host rrb1.std01.ryzomcore.org + +define shard_exe_set_std01_ring02_fe + use exe_set_std_ring_fe + host rrb2.std01.ryzomcore.org + cfg FSListenHost = "rrb2.std01.ryzomcore.org"; + + +// the std01 backup domain ---------- + +define domain_std01_backup + domain backup01 + use shard_std01_backup_ras + use shard_std01_backup + use shard_std01_lgs + + // domain ports + cfg ASWebPort="46710"; + cfg ASPort="46711"; + cfg AESPort="46712"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_std01.cfg + + // addition of extra filters for this domain + cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"NET", "FETIME","TimerManagerUpdate"}; + cfgAfter NegFiltersWarning+= {"AES"}; + + // Force all backup services to launch in write only mode + cfgAfter BSReadState = 0; + cfgAfter RRDVarPath = "../rrd_graphs"; + cfgAfter DontUseAES=1; + cfgAfter DontUseNS=1; + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "101", "Mainland 01", "(Mainland 01)", "en", + cfgAfter "102", "Mainland 02", "(Mainland 02)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "101", "Mainland 01", "mla", + cfgAfter "102", "Mainland 02", "mlb", + cfgAfter }; + + +// backup domain ras --------------- + +define shard_std01_backup_ras + shard std01_backup_ras + cfg ShardId = 100; + use ras + host ep1.std01.ryzomcore.org + + +// the main backup pair ------------ + +define shard_std01_backup + shard backup + use shard_exe_set_std01_backup_master + use shard_exe_set_std01_backup_slave + +define shard_exe_set_std01_backup_master + name bs_master + use exe_set_std_backup_master + host pd1.std01.ryzomcore.org + +define shard_exe_set_std01_backup_slave + name bs_slave + // hack to workaround bug in backup service +// use exe_set_std_backup_slave + use exe_set_std01_backup_slave + host pd2.std01.ryzomcore.org + cfgAfter MasterBSHost = "pd1.std01.ryzomcore.org:49990"; + +// hack to workaround bug in backup service +define exe_set_std01_backup_slave + use raes + use std01_backup_slave + use pdss + +// hack to workaround bug in backup service +define std01_backup_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49991 + cfg #include "../std01/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49991; + cfgAfter L3ListeningPort = 49951; + cfgAfter WebPort = 49971; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard/"; + + +// lgs pair & relates bs ------------ + +define shard_std01_lgs + shard lgs + use shard_exe_set_std01_lgs_primary + use shard_exe_set_std01_lgs_secondary + use shard_exe_set_std01_lgs_bs + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + cfg MasterLGSHost = "pd3.std01.ryzomcore.org"; + cfg SlaveLGSHost = "pd4.std01.ryzomcore.org"; + cfg LGSBSHost = "csr.core.ryzomcore.org"; + +define shard_exe_set_std01_lgs_primary + name lgs_primary + use raes + use exe_set_std_lgs_master + host pd3.std01.ryzomcore.org + +define shard_exe_set_std01_lgs_secondary + name lgs_secondary + use raes + use exe_set_std_lgs_slave + host pd4.std01.ryzomcore.org + +define shard_exe_set_std01_lgs_bs + name lgs_bs + use raes + use backup_lgs + host csr.core.ryzomcore.org + + +// the std01 las domain ------------- + +define domain_std01_las + domain las01 + use shard_std01_las_ras + use shard_std01_las_master + use shard_std01_las_slave + + // domain ports + cfg ASWebPort="46720"; + cfg ASPort="46721"; + cfg AESPort="46722"; + + // initial config files + cfgFile ../cfg/00_base.cfg +// cfgFile ../cfg/01_domain_std01.cfg + + // addition of extra filters for this domain + cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"NET", "FETIME","TimerManagerUpdate"}; + cfgAfter NegFiltersWarning+= {"AES"}; + cfgAfter DontUseAES=1; + + +// las domain ras ------------------ + +define shard_std01_las_ras + shard std01_las_ras + cfg ShardId = 100; + use ras + host ep1.std01.ryzomcore.org + + +// master las ---------------------- + +define shard_std01_las_master + shard std01_las_master + cfg ShardId = 99; + use raes + use las_mainland01 + use las_mainland02 + use las_ring01 + use las_ring02 + host pd3.std01.ryzomcore.org + +define las_mainland01 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland01/pds"}; + cfgAfter WebPort = 49899; + name las_mainland01 + use las + +define las_mainland02 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland02/pds"}; + cfgAfter WebPort = 49898; + name las_mainland02 + use las + +define las_ring01 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring01/pds"}; + cfgAfter WebPort = 49894; + name las_ring01 + use las + +define las_ring02 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring02/pds"}; + cfgAfter WebPort = 49893; + name las_ring02 + use las + + +// slave las ------------------------ + +define shard_std01_las_slave + shard std01_las_slave + cfg ShardId = 98; + use raes + use las_mainland01_slave + use las_mainland02_slave + use las_ring01_slave + use las_ring02_slave + host pd4.std01.ryzomcore.org + +define las_mainland01_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland01/pds"}; + cfgAfter WebPort = 49899; + name las2_mainland01 + use las + +define las_mainland02_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland02/pds"}; + cfgAfter WebPort = 49898; + name las2_mainland02 + use las + +define las_ring01_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring01/pds"}; + cfgAfter WebPort = 49894; + name las2_ring01 + use las + +define las_ring02_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring02/pds"}; + cfgAfter WebPort = 49893; + name las2_ring02 + use las diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg b/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg new file mode 100644 index 000000000..351a8614a --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg @@ -0,0 +1,93 @@ +//-------------------------------------------------------------------------------- +// Stuff for Windows (as opposed to Linux) + +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +// Common Filters +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "NET" }; +NegFiltersWarning = { "NETL", "CT_LRC", "VAR:" }; + +// Setting up WIN displayer +WindowStyle = "WIN"; +FontName = "Courier New"; +FontSize = 9; + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 1; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup gateways + + // bridge gateway +// "moduleManager.createModule StandardGateway gw1", +// "gw1.transportAdd L3Client l3client", +// "gw1.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44748)", + + // ats spm gateway + "moduleManager.createModule StandardGateway gw2", + "gw2.transportAdd L3Client l3client", + "gw2.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup for terminal + + // setup an 'spt' module to act as a terminal for the internal spm module + "moduleManager.createModule ServerPatchTerminal terminal target=spm_mini01", + "terminal.plug gw1", + "terminal.plug gw2", +}; + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ + "@States|terminal.state *", + "", "@MINI01 Domains (Core Mini)|terminal.dump", + "", "@SPA States|terminal.state *spa", + "@Deploy|terminal.uploadDepCfg", + "@PAM States|terminal.state *pam", + "@Update PAMs|terminal.on *pam installUpdate", + "@Quit PAMs|terminal.on *pam quit", + "", "SPT0", + "", "SPT1", + "", "SPT2", + "", "SPT3", + "", "SPT4", + "", "SPT5", +// "", "SPT6", +// "", "SPT7", +// "", "SPT8", +// "", "SPT9", +// "", "SPTA", +// "", "SPTB", +// "", "SPTC", +// "", "SPTD", +// "", "SPTE", +// "", "SPTF", +// "", "LastMsg|LastSPTMessage", +}; + +NumSPTWatches=5; diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt b/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt new file mode 100644 index 000000000..6ce239975 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt @@ -0,0 +1,10 @@ +// --------------------------------- +// common definitions + +include "../shard_ctrl_definitions.txt" + + +// --------------------------------- +// live domain + +include "../shard_ctrl_mini01.txt" diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat b/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat new file mode 100644 index 000000000..7f61bfa59 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat @@ -0,0 +1,2 @@ +@echo off +start S:\devw_x86\bin\Release\ryzom_patchman_service.exe --nolog -C. -L. \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg b/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg new file mode 100644 index 000000000..7f36f47ee --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg @@ -0,0 +1,93 @@ +//-------------------------------------------------------------------------------- +// Stuff for Windows (as opposed to Linux) + +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +// Common Filters +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "NET" }; +NegFiltersWarning = { "NETL", "CT_LRC", "VAR:" }; + +// Setting up WIN displayer +WindowStyle = "WIN"; +FontName = "Courier New"; +FontSize = 9; + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 1; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup gateways + + // bridge gateway +// "moduleManager.createModule StandardGateway gw1", +// "gw1.transportAdd L3Client l3client", +// "gw1.transportCmd l3client(connect addr=localhost:44748)", + + // ats spm gateway + "moduleManager.createModule StandardGateway gw2", + "gw2.transportAdd L3Client l3client", + "gw2.transportCmd l3client(connect addr=localhost:44752)", + + + //------------------------------------------------------------------------------ + // Setup for terminal + + // setup an 'spt' module to act as a terminal for the internal spm module + "moduleManager.createModule ServerPatchTerminal terminal target=spm_std01", + "terminal.plug gw1", + "terminal.plug gw2", +}; + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ + "@States|terminal.state *", + "", "@STD01 Domains (live,backup,las)|terminal.dump", + "", "@SPA States|terminal.state *spa", + "@Deploy|terminal.uploadDepCfg", + "@PAM States|terminal.state *pam", + "@Update PAMs|terminal.on *pam installUpdate", + "@Quit PAMs|terminal.on *pam quit", + "", "SPT0", + "", "SPT1", + "", "SPT2", + "", "SPT3", + "", "SPT4", + "", "SPT5", +// "", "SPT6", +// "", "SPT7", +// "", "SPT8", +// "", "SPT9", +// "", "SPTA", +// "", "SPTB", +// "", "SPTC", +// "", "SPTD", +// "", "SPTE", +// "", "SPTF", +// "", "LastMsg|LastSPTMessage", +}; + +NumSPTWatches=5; diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt b/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt new file mode 100644 index 000000000..da45f44f1 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt @@ -0,0 +1,10 @@ +// --------------------------------- +// common definitions + +include "../shard_ctrl_definitions.txt" + + +// --------------------------------- +// live domain + +include "../shard_ctrl_std01.txt" diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat b/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat new file mode 100644 index 000000000..7f61bfa59 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat @@ -0,0 +1,2 @@ +@echo off +start S:\devw_x86\bin\Release\ryzom_patchman_service.exe --nolog -C. -L. \ No newline at end of file From 14a6776d0b376ce25c5dc9e3c5a9ca437c2b42de Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 03:37:23 +0100 Subject: [PATCH 068/138] Update default directories --- code/nel/tools/build_gamedata/0_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index a2eb10d15..2dc3c3a0d 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -170,11 +170,11 @@ if not args.noconf: try: PatchmanCfgAdminDirectory except NameError: - PatchmanCfgAdminDirectory = "S:/notes/patchman_cfg/admin_install" + PatchmanCfgAdminDirectory = "R:/code/ryzom/server/patchman_cfg/admin_install" try: PatchmanCfgDefaultDirectory except NameError: - PatchmanCfgDefaultDirectory = "S:/notes/patchman_cfg/default" + PatchmanCfgDefaultDirectory = "R:/code/ryzom/server/patchman_cfg/default" try: PatchmanBridgeServerDirectory except NameError: From d0c33ffdfeda68bc14856094bdc4680c38faae70 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 19:42:56 +0100 Subject: [PATCH 069/138] Add additional executable permissions --- .../patchman_cfg/admin_install/patchman/loop_patchman.sh | 8 ++++++++ .../patchman_cfg/admin_install/patchman/make_next_live.sh | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh index ce5a204e5..73b151c43 100644 --- a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh @@ -6,6 +6,14 @@ do if [ -e /srv/core/admin_install.tgz ] then tar xvzf admin_install.tgz + chmod 775 bin/admin 2> /dev/null + chmod 775 bin/ps_services 2> /dev/null + chmod 775 bin/run_forever 2> /dev/null + chmod 775 bin/shard 2> /dev/null + chmod 775 bin/startup 2> /dev/null + chmod 775 bin/*.sh 2> /dev/null + chmod 775 patchman/*_service 2> /dev/null + chmod 775 patchman/*.sh 2> /dev/null fi cd /srv/core/patchman/ diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh index e4bd1fa2d..fbaca4ac4 100644 --- a/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh @@ -61,6 +61,10 @@ done # make the ryzom services executable chmod 775 live/service_*/*_service 2> /dev/null +chmod 775 live/service_*/*_server 2> /dev/null + +# make directory for rrd_graphs +mkdir -p rrd_graphs # special case to deal with www files that need a local cfg file to be properly setup if [ -e ./live/data_www/config.php ] From e8c482d36c925aebf2f1552a77d6dd81a091ec7f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 20:15:18 +0100 Subject: [PATCH 070/138] Disable build of dataset packed sheets in build pipeline --- code/nel/tools/build_gamedata/leveldesign_dev.bat | 6 +++--- .../ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index 5d307fcf0..1692cc155 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -1,9 +1,9 @@ title Ryzom Core: 1_export.py (LEVELDESIGN) -1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign +1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 2_build.py (LEVELDESIGN) -2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign +2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 3_install.py (LEVELDESIGN) -3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign +3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: b1_client_dev.py (LEVELDESIGN) b1_client_dev.py title Ryzom Core: b2_shard_data.py (LEVELDESIGN) diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 9c2212efa..6d5eb2119 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -124,8 +124,9 @@ int main(int nNbArg, char **ppArgs) // Used by mirror_service.cpp // Used by range_mirror_manager.cpp // Used by mirror.cpp - TSDataSetSheets sDataSetSheets; - loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); + // TSDataSetSheets sDataSetSheets; + // loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); + // FIXME: Somehow mirror.cpp overwrites the packed_sheets with an empty one... (the other cpp's don't do this, though.) } // IOS From affdb36a734a600798cf81df4fba57f2c6f7f393 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 20 Feb 2014 21:53:11 +0100 Subject: [PATCH 071/138] Make packed sheets behaviour consistent accross services --- code/ryzom/common/src/game_share/mirror.cpp | 12 +++++++++++- .../time_date_season_manager.cpp | 12 +++++++++++- code/ryzom/server/src/gpm_service/sheets.cpp | 12 +++++++++++- .../input_output_service/string_manager_parser.cpp | 7 ++++++- .../server/src/mirror_service/mirror_service.cpp | 14 +++++++++++++- .../src/server_share/continent_container.cpp | 13 ++++++++++++- .../src/tick_service/range_mirror_manager.cpp | 14 +++++++++++++- .../sheets_packer_shard/sheets_packer_shard.cpp | 5 ++--- 8 files changed, 79 insertions(+), 10 deletions(-) diff --git a/code/ryzom/common/src/game_share/mirror.cpp b/code/ryzom/common/src/game_share/mirror.cpp index cdf353143..ff0ed0b2c 100644 --- a/code/ryzom/common/src/game_share/mirror.cpp +++ b/code/ryzom/common/src/game_share/mirror.cpp @@ -2315,7 +2315,17 @@ void CMirror::init( std::vector& dataSetsToLoad, CUnifiedNetwork::getInstance()->addCallbackArray( MirrorCbArray, NB_MIRROR_CALLBACKS ); // Load the sheets of the datasets - loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets ); + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm("dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_SDataSetSheets.empty()) + { + loadForm("dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets, true); + } // Set the tag nlassert( (tag >= AllTag) && (tag != ExcludedTag) ); diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp index 12eebd0fd..dbd4fc0ad 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp @@ -47,7 +47,17 @@ void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */) void CTimeDateSeasonManager::packSheets(const std::string &writeDirectory) { - loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours); + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( _StaticLightCyclesHours.empty() ) + { + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours, true); + } } diff --git a/code/ryzom/server/src/gpm_service/sheets.cpp b/code/ryzom/server/src/gpm_service/sheets.cpp index a65aa4456..72103ad75 100644 --- a/code/ryzom/server/src/gpm_service/sheets.cpp +++ b/code/ryzom/server/src/gpm_service/sheets.cpp @@ -63,7 +63,17 @@ void CGpmSheets::init() filters.push_back("creature"); filters.push_back("player"); - loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets); + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_sheets.empty()) + { + loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets, true); + } _initialised=true; } diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index 6022b449d..67ce62f10 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -1871,7 +1871,12 @@ void CStringManager::init(NLMISC::CLog *log) //exts.push_back("item"); //exts.push_back("sitem"); // not more needed ! exts.push_back("race_stats"); - loadForm(exts, NLNET::IService::getInstance()->WriteFilesDirectory.toString() + "ios_sheets.packed_sheets", _SheetInfo, false, false); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(exts, NLNET::IService::getInstance()->WriteFilesDirectory.toString() + "ios_sheets.packed_sheets", _SheetInfo, false, false); + } if (_SheetInfo.empty()) { diff --git a/code/ryzom/server/src/mirror_service/mirror_service.cpp b/code/ryzom/server/src/mirror_service/mirror_service.cpp index 651a509a8..9d1952cc7 100644 --- a/code/ryzom/server/src/mirror_service/mirror_service.cpp +++ b/code/ryzom/server/src/mirror_service/mirror_service.cpp @@ -178,7 +178,19 @@ void CMirrorService::init() // Fill temporary sheet map, loading dataset information TSDataSetSheets sDataSetSheets; - loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets ); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, false, false ); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( sDataSetSheets.empty() ) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, true ); + } + if ( sDataSetSheets.empty() ) { nlwarning( "No dataset found, check if dataset.packed_sheets and the georges sheets are in the path" ); diff --git a/code/ryzom/server/src/server_share/continent_container.cpp b/code/ryzom/server/src/server_share/continent_container.cpp index dc3d1ccc4..90b7b60c7 100644 --- a/code/ryzom/server/src/server_share/continent_container.cpp +++ b/code/ryzom/server/src/server_share/continent_container.cpp @@ -64,7 +64,18 @@ void CContinentContainer::buildSheets(const string &packedSheetsDirectory) { std::vector filters; filters.push_back("continent"); - loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (NLNET::IService::isServiceInitialized() && (NLNET::IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_SheetMap.empty()) + { + loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap, true); + } } // diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp index 14a2e8e85..f988ac054 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp @@ -145,7 +145,19 @@ void CRangeMirrorManager::init() // Load datasets into temporary map to get the names TSDataSetSheets sDataSetSheets; - loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets ); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, false, false ); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( sDataSetSheets.empty() ) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, true ); + } + TSDataSetSheets::iterator ism; for ( ism=sDataSetSheets.begin(); ism!=sDataSetSheets.end(); ++ism ) { diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 6d5eb2119..9c2212efa 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -124,9 +124,8 @@ int main(int nNbArg, char **ppArgs) // Used by mirror_service.cpp // Used by range_mirror_manager.cpp // Used by mirror.cpp - // TSDataSetSheets sDataSetSheets; - // loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); - // FIXME: Somehow mirror.cpp overwrites the packed_sheets with an empty one... (the other cpp's don't do this, though.) + TSDataSetSheets sDataSetSheets; + loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); } // IOS From 66a9a23ca8736e343b364aba3a5d2284d5b5dc5b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 21 Feb 2014 03:17:54 +0100 Subject: [PATCH 072/138] Fix #138 Pointer truncation in AI Script VM --- code/ryzom/server/src/ai_service/script_vm.h | 41 +++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/code/ryzom/server/src/ai_service/script_vm.h b/code/ryzom/server/src/ai_service/script_vm.h index cf57efe77..bc6e56c15 100644 --- a/code/ryzom/server/src/ai_service/script_vm.h +++ b/code/ryzom/server/src/ai_service/script_vm.h @@ -138,7 +138,12 @@ public: float& getFloat(); float const& getFloat() const; - int _val; + union + { + int _vali; + uintptr_t _valp; + }; + TStackTypes _type; }; @@ -346,7 +351,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(float const& f) { clean(); - _val = *((int*)&f); + _vali = *((int*)&f); _type = EFloat; return *this; } @@ -354,7 +359,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(int const& i) { clean(); - _val = i; + _vali = i; _type = EOther; return *this; } @@ -363,7 +368,7 @@ CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(std::string cons { clean(); std::string* const strPt = new std::string(str); - _val = *((int*)&strPt); + _valp = *((int*)&strPt); _type = EString; return *this; } @@ -371,7 +376,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc) { clean(); - _val = *((int*)&sc); + _valp = *((int*)&sc); _type = EContext; return *this; } @@ -386,9 +391,11 @@ bool CScriptStack::CStackEntry::operator==(CStackEntry const& other) const return getString()==other.getString(); case EFloat: return getFloat()==other.getFloat(); + case EContext: + return _valp==other._valp; case EOther: default: - return _val==other._val; + return _vali==other._vali; } } @@ -420,9 +427,11 @@ bool CScriptStack::CStackEntry::operator<(CStackEntry const& other) const return getString()(CStackEntry const& other) const return getString()>other.getString(); case EFloat: return getFloat()>other.getFloat(); + case EContext: + return _valp>other._valp; case EOther: default: - return _val>other._val; + return _vali>other._vali; } } @@ -473,43 +484,43 @@ inline std::string& CScriptStack::CStackEntry::getString() { nlassert(_type==EString); - return *(*((std::string**)&_val)); + return *(*((std::string**)&_valp)); } inline std::string const& CScriptStack::CStackEntry::getString() const { nlassert(_type==EString); - return *(*((std::string**)&_val)); + return *(*((std::string**)&_valp)); } inline IScriptContext* CScriptStack::CStackEntry::getIScriptContext() { nlassert(_type==EContext); - return *((IScriptContext**)&_val); + return *((IScriptContext**)&_valp); } inline int& CScriptStack::CStackEntry::getInt() { nlassert(_type==EOther); - return _val; + return _vali; } inline int const& CScriptStack::CStackEntry::getInt() const { nlassert(_type==EOther); - return _val; + return _vali; } inline float& CScriptStack::CStackEntry::getFloat() { nlassert(_type==EFloat); - return *((float*)&_val); + return *((float*)&_vali); } inline float const& CScriptStack::CStackEntry::getFloat() const { nlassert(_type==EFloat); - return *((float const*)&_val); + return *((float const*)&_vali); } inline From 9c37e0f07784b8e3f56bb3313c23c91adac65f70 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Fri, 21 Feb 2014 16:40:04 +0100 Subject: [PATCH 074/138] Fix bug cannot find right include folder for winsdk8 --- code/CMakeModules/FindWindowsSDK.cmake | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/code/CMakeModules/FindWindowsSDK.cmake b/code/CMakeModules/FindWindowsSDK.cmake index fd32d92b5..036e730d5 100644 --- a/code/CMakeModules/FindWindowsSDK.cmake +++ b/code/CMakeModules/FindWindowsSDK.cmake @@ -71,11 +71,14 @@ SET(WINSDKENV_DIR $ENV{WINSDK_DIR}) MACRO(FIND_WINSDK_VERSION_HEADERS) IF(WINSDK_DIR AND NOT WINSDK_VERSION) # Search version in headers - IF(EXISTS ${WINSDK_DIR}/include/Msi.h) - SET(_MSI_FILE ${WINSDK_DIR}/include/Msi.h) - ENDIF(EXISTS ${WINSDK_DIR}/include/Msi.h) + FIND_FILE(_MSI_FILE Msi.h + PATHS + ${WINSDK_DIR}/Include/um + ${WINSDK_DIR}/Include + ) IF(_MSI_FILE) + # Look for Windows SDK 8.0 FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8") @@ -88,11 +91,11 @@ MACRO(FIND_WINSDK_VERSION_HEADERS) FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7") IF(_CONTENT) - IF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) - SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/winsdkver.h) - ELSEIF(EXISTS ${WINSDK_DIR}/include/WinSDKVer.h) - SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/WinSDKVer.h) - ENDIF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) + FIND_FILE(_WINSDKVER_FILE winsdkver.h WinSDKVer.h + PATHS + ${WINSDK_DIR}/Include/um + ${WINSDK_DIR}/Include + ) IF(_WINSDKVER_FILE) # Load WinSDKVer.h content @@ -173,7 +176,7 @@ MACRO(USE_CURRENT_WINSDK) # Look for Windows.h because there are several paths IF(EXISTS ${_INCLUDE}/Windows.h) - STRING(REGEX REPLACE "/(include|INCLUDE|Include)" "" WINSDK_DIR ${_INCLUDE}) + STRING(REGEX REPLACE "/(include|INCLUDE|Include)(.*)" "" WINSDK_DIR ${_INCLUDE}) MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}") BREAK() ENDIF(EXISTS ${_INCLUDE}/Windows.h) From 8c5094817b6ad8054148f100fda2d30e3296a385 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Fri, 21 Feb 2014 17:35:15 +0100 Subject: [PATCH 075/138] fix find windows.h for winsdk8 --- code/CMakeModules/FindWindowsSDK.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/CMakeModules/FindWindowsSDK.cmake b/code/CMakeModules/FindWindowsSDK.cmake index 036e730d5..2e72af9e5 100644 --- a/code/CMakeModules/FindWindowsSDK.cmake +++ b/code/CMakeModules/FindWindowsSDK.cmake @@ -165,9 +165,13 @@ MACRO(USE_CURRENT_WINSDK) SET(WINSDK_VERSION_FULL "") # Use WINSDK environment variable - IF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) - SET(WINSDK_DIR ${WINSDKENV_DIR}) - ENDIF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) + IF(WINSDKENV_DIR) + FIND_PATH(WINSDK_DIR Windows.h + HINTS + ${WINSDKENV_DIR}/Include/um + ${WINSDKENV_DIR}/Include + ) + ENDIF(WINSDKENV_DIR) # Use INCLUDE environment variable IF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE) @@ -177,7 +181,7 @@ MACRO(USE_CURRENT_WINSDK) # Look for Windows.h because there are several paths IF(EXISTS ${_INCLUDE}/Windows.h) STRING(REGEX REPLACE "/(include|INCLUDE|Include)(.*)" "" WINSDK_DIR ${_INCLUDE}) - MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}") + MESSAGE(STATUS "Found Windows SDK from include environment variable in ${WINSDK_DIR}") BREAK() ENDIF(EXISTS ${_INCLUDE}/Windows.h) ENDFOREACH(_INCLUDE) From f4671dd4993e3b876144baa2da878a2f419f9305 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 21 Feb 2014 20:39:24 +0100 Subject: [PATCH 076/138] Remove duplicate cfg data --- .../server/patchman_cfg/shard_ctrl_definitions.txt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt index b26cd30e8..87bd0ce4d 100644 --- a/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt @@ -336,17 +336,6 @@ define egs cfg AlwaysInvisiblePriv = ":OBSERVER:EM:"; cfg TimeBeforeDisconnection = 300; cfg - cfg UsedContinents += - cfg { - cfg "indoors", "4", // NB : this is for uninstanciated indoors building. - cfg "newbieland", "20", - cfg }; - cfg - cfg // define the primitives configuration used. - cfg UsedPrimitives = - cfg { - cfg "newbieland_all", - cfg }; cfgAfter StartCommands += { cfgAfter "moduleManager.createModule AnimSessionManager asm", cfgAfter "asm.plug gw", @@ -377,7 +366,6 @@ define egs_mainland data data_newbieland data data_indoors //cfg #include "../live/cfg/entities_game_service_mainland.cfg" - cfg UsedContinents = { "dummy", "10000" }; cfgAfter MaxXPGainPerPlayer = 30.0; cfgAfter DeathXPFactor = 0.1; cfgAfter CachePrims = 1; From 2dcfc69f08132efa3171ddd03037235baadf2419 Mon Sep 17 00:00:00 2001 From: botanic Date: Tue, 25 Feb 2014 19:38:10 -0800 Subject: [PATCH 077/138] fixed cretion of users --- .../tools/server/ryzom_ams/www/html/installer/libsetup.php | 2 ++ code/ryzom/tools/server/www/login/config.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 7c7cb933a..97ff3d624 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -1696,6 +1696,8 @@ INSERT INTO `shard` (`shard_id`, `WSOnline`, `MOTD`, `OldState`, `RequiredState`) VALUES (302, 1, 'Shard up', 'ds_restricted', 'ds_open'); + + INSERT INTO `sessions` (`session_id`, `session_type`, `title`, `owner`, `plan_date`, `start_date`, `description`, `orientation`, `level`, `rule_type`, `access_type`, `state`, `host_shard_id`, `subscription_slots`, `reserved_slots`, `free_slots`, `estimated_duration`, `final_duration`, `folder_id`, `lang`, `icone`, `anim_mode`, `race_filter`, `religion_filter`, `guild_filter`, `shard_filter`, `level_filter`, `subscription_closed`, `newcomer`) VALUES (302, 'st_mainland', 'open shard mainland', 0, '2005-09-21 12:41:33', '2005-08-31 00:00:00', '', 'so_other', 'sl_a', 'rt_strict', 'at_public', 'ss_planned', 0, 0, 0, 0, 'et_short', 0, 0, 'lang_en', '', 'am_dm', 'rf_fyros,rf_matis,rf_tryker,rf_zorai', 'rf_kami,rf_karavan,rf_neutral', 'gf_any_player', '', 'lf_a,lf_b,lf_c,lf_d,lf_e,lf_f', 0, 0); GRANT ALL ON `" . $cfg['db']['ring']['name'] ."`.* TO `" . $cfg['db']['ring']['user'] ."`@".$cfg['db']['ring']['host']." identified by '".$cfg['db']['ring']['pass']."'; "; diff --git a/code/ryzom/tools/server/www/login/config.php b/code/ryzom/tools/server/www/login/config.php index cd490530f..11deb410b 100644 --- a/code/ryzom/tools/server/www/login/config.php +++ b/code/ryzom/tools/server/www/login/config.php @@ -22,6 +22,6 @@ $RingDBPassword = ""; // (in nel.user, nel.permission, ring.ring_user and ring.characters $AcceptUnknownUser = false; // if true, the login service automaticaly create a ring user and a editor character if needed -$AutoCreateRingInfo = false; +$AutoCreateRingInfo = true; ?> From ab83a3e13ac767a82ad7717b0798555f4b979b72 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 2 Mar 2014 01:13:48 +0100 Subject: [PATCH 078/138] Fix duplicate config data --- code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt | 2 +- code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt index de58fc10f..a17f6f922 100644 --- a/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt @@ -83,7 +83,7 @@ define shard_mini01_unifier use exe_set_std_lgs_master use exe_set_std_lgs_slave use backup_lgs - cfg DBPass = "p4ssw0rd"; + cfg DBPass = DBNelPass; host ep1.mini01.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt index 6954b38da..311261110 100644 --- a/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt @@ -91,7 +91,7 @@ define shard_exe_set_std01_ras define shard_exe_set_std01_unifier use exe_set_std_unifier host su1.std01.ryzomcore.org - cfg DBPass = "p4ssw0rd"; + cfg DBPass = DBNelPass; // shard mainland01 ---------------- From 33b9e16ec979cfe2f6127ba494dcc0a8910e31fd Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 2 Mar 2014 01:27:09 +0100 Subject: [PATCH 079/138] Cleanup config --- .../admin_install/patchman/patchman_list | 23 ++++++++++++++++--- .../patchman_cfg/cfg/01_domain_std01.cfg | 1 - 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list index a5802320e..e90230704 100644 --- a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list @@ -1,6 +1,23 @@ // default values for different sites -mini01 mini01.ryzomcore.org mini01 ep1.mini01.ryzomcore.org -std01 std01.ryzomcore.org -std01 core.ryzomcore.org +std01 ep1.std01.ryzomcore.org +std01 su1.std01.ryzomcore.org +std01 pd1.std01.ryzomcore.org +std01 pd2.std01.ryzomcore.org +std01 pd3.std01.ryzomcore.org +std01 pd4.std01.ryzomcore.org +std01 mla1.std01.ryzomcore.org +std01 mla2.std01.ryzomcore.org +std01 mla3.std01.ryzomcore.org +std01 mla4.std01.ryzomcore.org +std01 mla5.std01.ryzomcore.org +std01 mlb1.std01.ryzomcore.org +std01 mlb2.std01.ryzomcore.org +std01 mlb3.std01.ryzomcore.org +std01 mlb4.std01.ryzomcore.org +std01 mlb5.std01.ryzomcore.org +std01 rra1.std01.ryzomcore.org +std01 rra2.std01.ryzomcore.org +std01 rrb1.std01.ryzomcore.org +std01 rrb2.std01.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg index f8e243d68..f40ffdd97 100644 --- a/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg +++ b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg @@ -13,7 +13,6 @@ RSMHost = SUHost; // MFS config WebSrvUsersDirectory = ""; -// WebRootDirectory = "/srv/core/std01/save_shard/www"; // DUPLICATE LOWER HoFHDTDirectory = "/srv/core/www/hof/hdt"; // BS Specifics -------------------------------------------------------------------------- From e7aa837b09f3a1013f82d418ee24512bb771c30c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 2 Mar 2014 01:37:20 +0100 Subject: [PATCH 080/138] Fix config --- .../patchman_cfg/admin_install/patchman/special_patchman_list | 1 - 1 file changed, 1 deletion(-) diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list index 5aa8da350..b42636e55 100644 --- a/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list @@ -8,4 +8,3 @@ mini01_bridge ep1.mini01.ryzomcore.org // std01 - std manager std01_spm ep1.std01.ryzomcore.org -std01_bridge ep1.std01.ryzomcore.org From 5c18c4e1b5e83a877c8a00748a3abe76bfe93232 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 2 Mar 2014 21:43:24 +0100 Subject: [PATCH 081/138] Compile fix --- code/ryzom/tools/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/CMakeLists.txt b/code/ryzom/tools/CMakeLists.txt index 20a15f783..0bf9fb632 100644 --- a/code/ryzom/tools/CMakeLists.txt +++ b/code/ryzom/tools/CMakeLists.txt @@ -14,7 +14,9 @@ IF(WITH_NET) ADD_SUBDIRECTORY(stats_scan) ADD_SUBDIRECTORY(pdr_util) ADD_SUBDIRECTORY(patch_gen) - ADD_SUBDIRECTORY(sheets_packer_shard) + IF(WIN32) + ADD_SUBDIRECTORY(sheets_packer_shard) + ENDIF(WIN32) ENDIF(WITH_NET) IF(WITH_LIGO AND WITH_NET) From b4f4745c7d53ad3d0d37202678fbd1e5d1bb469c Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 10 Mar 2014 12:56:47 -0700 Subject: [PATCH 082/138] dont chmod just check permissions --- .../ryzom_ams/www/html/installer/libsetup.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 97ff3d624..932d6d2db 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -6,28 +6,28 @@ */ //set permissions - if(chmod('../../../www/login/logs', 0660)) { - echo "failed to set permissions on logs"; + if(writable('../../../www/login/logs')) { + echo "failed to get write permissions on logs"; exit; } - if(chmod('../../../admin/graphs_output', 0660)) { - echo "failed to set permissions on graphs_output"; + if(writable('../../../admin/graphs_output')) { + echo "failed to get write permissions on graphs_output"; exit; } - if(chmod('../../../templates/default_c', 0660)) { - echo "failed to set permissions on default_c"; + if(writable('../../../templates/default_c')) { + echo "failed to get write permissions on default_c"; exit; } - if(chmod('../../www', 0660)) { - echo "failed to set permissions on www"; + if(writable('../../www')) { + echo "failed to get write permissions on www"; exit; } - if(chmod('../../www/html/cache', 0660)) { - echo "failed to set permissions on cache"; + if(writable('../../www/html/cache')) { + echo "failed to get write permissions on cache"; exit; } - if(chmod('../../www/html/templates_c', 0660)) { - echo "failed to set permissions on templates_c"; + if(writable('../../www/html/templates_c')) { + echo "failed to get write permissions on templates_c"; exit; } From 979502cbddce2d1a493ae8e2c4c2989ebc2eb1fe Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 12 Mar 2014 19:19:52 +0100 Subject: [PATCH 083/138] Separate output directories from input directories --- code/nel/tools/build_gamedata/0_setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 2dc3c3a0d..baeaee1cc 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -86,31 +86,31 @@ if not args.noconf: try: ExportBuildDirectory except NameError: - ExportBuildDirectory = "W:/export" + ExportBuildDirectory = "T:/export" try: InstallDirectory except NameError: - InstallDirectory = "W:/install" + InstallDirectory = "T:/install" try: ClientDevDirectory except NameError: - ClientDevDirectory = "W:/client_dev" + ClientDevDirectory = "T:/client_dev" try: ClientPatchDirectory except NameError: - ClientPatchDirectory = "W:/client_patch" + ClientPatchDirectory = "T:/client_patch" try: ClientInstallDirectory except NameError: - ClientInstallDirectory = "W:/client_install" + ClientInstallDirectory = "T:/client_install" try: ShardInstallDirectory except NameError: - ShardInstallDirectory = "W:/shard" + ShardInstallDirectory = "T:/shard" try: WorldEditInstallDirectory except NameError: - WorldEditInstallDirectory = "W:/worldedit" + WorldEditInstallDirectory = "T:/worldedit" try: LeveldesignDirectory except NameError: @@ -178,7 +178,7 @@ if not args.noconf: try: PatchmanBridgeServerDirectory except NameError: - PatchmanBridgeServerDirectory = "W:/bridge_server" + PatchmanBridgeServerDirectory = "T:/bridge_server" try: MaxAvailable except NameError: From 49fd01ccfb46b318ca895382aaeabd284844b536 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 13 Mar 2014 18:34:26 +0100 Subject: [PATCH 084/138] Add color to console output --- code/nel/src/misc/displayer.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d91193759..a1b1c7de8 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -31,10 +31,10 @@ #include "nel/misc/mutex.h" #include "nel/misc/report.h" #include "nel/misc/system_utils.h" +#include "nel/misc/variable.h" #include "nel/misc/debug.h" - #ifdef NL_OS_WINDOWS // these defines is for IsDebuggerPresent(). it'll not compile on windows 95 // just comment this and the IsDebuggerPresent to compile on windows 95 @@ -57,6 +57,8 @@ using namespace std; namespace NLMISC { +CVariable StdDisplayerColor("nel", "StdDisplayerColor", "Enable colors in std displayer", true, 0, true); + static const char *LogTypeToString[][8] = { { "", "ERR", "WRN", "INF", "DBG", "STT", "AST", "UKN" }, { "", "Error", "Warning", "Information", "Debug", "Statistic", "Assert", "Unknown" }, @@ -139,9 +141,20 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess bool needSpace = false; //stringstream ss; string str; +#ifdef NL_OS_UNIX + bool colorSet = false; +#endif if (args.LogType != CLog::LOG_NO) { +#ifdef NL_OS_UNIX + if (StdDisplayerColor.get()) + { + if (args.LogType == CLog::LOG_ERROR || args.LogType == CLog::LOG_ASSERT) { str += "\e[0;30m\e[41m"; colorSet = true; } // black text, red background + else if (args.LogType == CLog::LOG_WARNING) { str += "\e[0;91m"; colorSet = true; } // bright red text + else if (args.LogType == CLog::LOG_DEBUG) { str += "\e[0;34m"; colorSet = true; } // blue text + } +#endif //ss << logTypeToString(args.LogType); str += logTypeToString(args.LogType); needSpace = true; @@ -218,6 +231,13 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess } #endif // NL_OS_WINDOWS +#ifdef NL_OS_UNIX + if (colorSet) + { + str += "\e[0m"; + } +#endif + // Printf ? if (consoleMode) { From 7e6cf7c213fe4fb78594d4091d2f5d5ce0bde5af Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 15 Mar 2014 09:12:40 +0100 Subject: [PATCH 085/138] Fix crash in 0_setup.py on Linux --- code/nel/tools/build_gamedata/0_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index baeaee1cc..1e1824b2c 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -191,7 +191,11 @@ if not args.noconf: MaxUserDirectory except NameError: import os - MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") + try: + MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") + except KeyError: + MaxAvailable = 0 + MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu" try: MaxExecutable except NameError: From 3ed24c695541f414fe364568e09b87872f3c507c Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Mar 2014 16:23:17 +0100 Subject: [PATCH 086/138] Changed: Improvements in patch system --- code/CMakeModules/nel.cmake | 4 ++-- code/ryzom/client/src/CMakeLists.txt | 6 +++++- code/ryzom/client/src/client_cfg.cpp | 20 ++++++++++---------- code/ryzom/client/src/login_patch.cpp | 23 ++++++++++++----------- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index c7184d57e..e88465ae2 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -236,8 +236,6 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_COVERAGE "With Code Coverage Support" OFF) OPTION(WITH_PCH "With Precompiled Headers" ON ) OPTION(FINAL_VERSION "Build in Final Version mode" ON ) - OPTION(WITH_PERFHUD "Build with NVIDIA PerfHUD support" OFF ) - OPTION(WITH_PATCH_SUPPORT "Build with in-game Patch Support" OFF ) # Default to static building on Windows. IF(WIN32) @@ -325,6 +323,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) OPTION(WITH_LIBOVR "With LibOVR support" OFF) OPTION(WITH_LIBVR "With LibVR support" OFF) + OPTION(WITH_PERFHUD "With NVIDIA PerfHUD support" OFF) ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS) @@ -343,6 +342,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON ) OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON ) OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON ) + OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF) ### # Optional support diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index fb9bfcaa9..4ffe21c24 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -4,8 +4,12 @@ ADD_SUBDIRECTORY(client_sheets) IF(WITH_RYZOM_CLIENT) +IF(WITH_RYZOM_PATCH) + ADD_DEFINITIONS(-DRZ_USE_PATCH) +ENDIF(WITH_RYZOM_PATCH) + # These are Windows/MFC apps - SET(SEVENZIP_LIBRARY "ryzom_sevenzip") +SET(SEVENZIP_LIBRARY "ryzom_sevenzip") ADD_SUBDIRECTORY(seven_zip) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index a065252a5..d314f309f 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -422,16 +422,16 @@ CClientConfig::CClientConfig() MouseOverFX = "sfx_selection_mouseover.ps"; SelectionFXSize = 0.8f; - // only force patching under Windows by default - #if WITH_PATCH_SUPPORT - PatchWanted = true; - #else - PatchWanted = false; - #endif - PatchUrl = ""; - PatchletUrl = ""; - PatchVersion = ""; - PatchServer = ""; +#if RZ_PATCH + PatchWanted = true; +#else + PatchWanted = false; +#endif + + PatchUrl.clear(); + PatchletUrl.clear(); + PatchVersion.clear(); + PatchServer.clear(); WebIgMainDomain = "atys.ryzom.com"; WebIgTrustedDomains.push_back(WebIgMainDomain); diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index ec01b3080..deffc0e3e 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -18,16 +18,14 @@ // Includes // +#include "stdpch.h" + #include -#ifdef NL_OS_WINDOWS - //windows doesnt have unistd.h -#else +#ifndef NL_OS_WINDOWS #include #endif -#include "stdpch.h" - #include #include @@ -46,10 +44,10 @@ #include "nel/misc/big_file.h" #include "nel/misc/i18n.h" -#define NL_USE_SEVENZIP 1 +#define RZ_USE_SEVENZIP 1 // 7 zip includes -#ifdef NL_USE_SEVENZIP +#ifdef RZ_USE_SEVENZIP #include "seven_zip/7zCrc.h" #include "seven_zip/7zIn.h" #include "seven_zip/7zExtract.h" @@ -746,7 +744,6 @@ void CPatchManager::deleteBatchFile() // **************************************************************************** void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool wantRyzomRestart, bool useBatchFile) { - uint nblab = 0; FILE *fp = NULL; @@ -920,7 +917,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool #ifdef NL_OS_WINDOWS fprintf(fp, "start %s %%1 %%2 %%3\n", RyzomFilename.c_str()); #else - fprintf(fp, "/opt/tita/%s $1 $2 $3\n", RyzomFilename.c_str()); + fprintf(fp, "%s $1 $2 $3\n", RyzomFilename.c_str()); #endif } @@ -1010,7 +1007,9 @@ void CPatchManager::executeBatchFile() { int errsv = errno; nlerror("Execl Error: %d %s", errsv, strCmdLine.c_str(), (char *) NULL); - } else { + } + else + { nlinfo("Ran batch file r2Mode Success"); } } @@ -1020,7 +1019,9 @@ void CPatchManager::executeBatchFile() { int errsv = errno; nlerror("Execl r2mode Error: %d %s", errsv, strCmdLine.c_str()); - } else { + } + else + { nlinfo("Ran batch file Success"); } } From 76d7f4b62052b7da83b2c205687fd3cd6d1f97d3 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Mar 2014 16:23:28 +0100 Subject: [PATCH 087/138] Changed: Typo --- code/nel/src/gui/group_html.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index d0fcd050e..9f19f383a 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -4094,7 +4094,8 @@ namespace NLGUI void CGroupHTML::requestTerminated(HTRequest * request ) { // this callback is being called for every request terminated - if( request == _LibWWW->Request ){ + if (request == _LibWWW->Request) + { // set the browser as complete _Browsing = false; updateRefreshButton(); From f6144dd6fae886f11ca4f677fae6e2805e2e36a3 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Mar 2014 18:20:30 +0100 Subject: [PATCH 088/138] Changed: Use RZ_USE_SEVENZIP instead of NL_USE_SEVENZIP --- code/ryzom/client/src/login_patch.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index deffc0e3e..384f032c8 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -139,7 +139,7 @@ struct EPatchDownloadException : public Exception CPatchManager *CPatchManager::_Instance = NULL; -#ifdef NL_USE_SEVENZIP +#ifdef RZ_USE_SEVENZIP /// Input stream class for 7zip archive class CNel7ZipInStream : public _ISzInStream { @@ -420,6 +420,7 @@ void CPatchManager::startCheckThread(bool includeBackgroundPatch) nlassert (thread != NULL); thread->start (); } + // **************************************************************************** bool CPatchManager::isCheckThreadEnded(bool &ok) { @@ -761,7 +762,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool #ifdef NL_OS_WINDOWS fprintf(fp, "@echo off\n"); #elif NL_OS_MAC - //mac patcher doesn't work yet + // mac patcher doesn't work yet #else fprintf(fp, "#!/bin/sh\npwd\n"); #endif @@ -2154,7 +2155,7 @@ void CPatchManager::getCorruptedFileInfo(const SFileToPatch &ftp, ucstring &sTra bool CPatchManager::unpack7Zip(const std::string &sevenZipFile, const std::string &destFileName) { -#ifdef NL_USE_SEVENZIP +#ifdef RZ_USE_SEVENZIP nlinfo("Uncompressing 7zip archive '%s' to '%s'", sevenZipFile.c_str(), destFileName.c_str()); @@ -2246,7 +2247,7 @@ bool CPatchManager::unpack7Zip(const std::string &sevenZipFile, const std::strin bool CPatchManager::unpackLZMA(const std::string &lzmaFile, const std::string &destFileName) { -#ifdef NL_USE_SEVENZIP +#ifdef RZ_USE_SEVENZIP nldebug("unpackLZMA : decompression the lzma file '%s' into output file '%s", lzmaFile.c_str(), destFileName.c_str()); CIFile inStream(lzmaFile); uint32 inSize = inStream.getFileSize(); From 5e8de3eff0bd0d120b0e503b63244e0f23bd5330 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Mar 2014 19:36:13 +0100 Subject: [PATCH 089/138] Changed: Use "BuildName" from client_default.cfg to determinate last supported patch version by current client under Unix --- code/ryzom/client/src/login_patch.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 384f032c8..6976926ba 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1397,7 +1397,7 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de fclose(fp); curl_global_cleanup(); - CurrentFile = ""; + CurrentFile.clear(); if (diskFull) { @@ -2346,6 +2346,7 @@ void CCheckThread::run () uint32 i, j, k; // Check if the client version is the same as the server version string sClientVersion = pPM->getClientVersion(); + string sClientNewVersion = ClientCfg.BuildName; string sServerVersion = pPM->getServerVersion(); ucstring sTranslate = CI18N::get("uiClientVersion") + " (" + sClientVersion + ") "; sTranslate += CI18N::get("uiServerVersion") + " (" + sServerVersion + ")"; @@ -2359,10 +2360,20 @@ void CCheckThread::run () return; } - sint32 nServerVersion; + sint32 nServerVersion, nClientVersion, nClientNewVersion; fromString(sServerVersion, nServerVersion); + fromString(sClientVersion, nClientVersion); + fromString(sClientNewVersion, nClientNewVersion); - if (sClientVersion != sServerVersion) +#ifdef NL_OS_UNIX + // servers files are not compatible with current client, use last client version + if (nClientNewVersion && nServerVersion > nClientNewVersion) + { + nServerVersion = nClientNewVersion; + } +#endif + + if (nClientVersion != nServerVersion) { // first, try in the version subdirectory try From 02331f7b331be4d7672f44438e1477b41fb04eb3 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Mar 2014 19:36:53 +0100 Subject: [PATCH 090/138] Changed: Don't patch "main_exedll" and "main_cfg" categories under Unix --- code/ryzom/client/src/init.cpp | 7 ------ code/ryzom/client/src/login_patch.cpp | 36 ++++++--------------------- 2 files changed, 7 insertions(+), 36 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 1c4fe76e9..d603be4a3 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -829,13 +829,6 @@ void prelogInit() CLoginProgressPostThread::getInstance().init(ClientCfg.ConfigFile); - // tmp for patcher debug - extern void tmpFlagMainlandPatchCategories(NLMISC::CConfigFile &cf); - extern void tmpFlagRemovedPatchCategories(NLMISC::CConfigFile &cf); - tmpFlagMainlandPatchCategories(ClientCfg.ConfigFile); - tmpFlagRemovedPatchCategories(ClientCfg.ConfigFile); - - // check "BuildName" in ClientCfg //nlassert(!ClientCfg.BuildName.empty()); // TMP comment by nico do not commit diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 6976926ba..a51f2c1d5 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -79,35 +79,6 @@ static std::vector ForceMainlandPatchCategories; static std::vector ForceRemovePatchCategories; -// TMP for debug : force some category in the patch to be flagged as 'mainland' until -// the actual file is updated -void tmpFlagMainlandPatchCategories(NLMISC::CConfigFile &cf) -{ - NLMISC::CConfigFile::CVar *catList = cf.getVarPtr("ForceMainlandPatchCategories"); - if (catList) - { - for (uint k = 0; k < catList->size(); ++k) - { - ForceMainlandPatchCategories.push_back(catList->asString(k)); - } - } -} - -// TMP for debug : force some category in the patch to be flagged as 'mainland' until -// the actual file is updated -void tmpFlagRemovedPatchCategories(NLMISC::CConfigFile &cf) -{ - NLMISC::CConfigFile::CVar *catList = cf.getVarPtr("RemovePatchCategories"); - if (catList) - { - for (uint k = 0; k < catList->size(); ++k) - { - ForceRemovePatchCategories.push_back(catList->asString(k)); - } - } -} - - using namespace std; using namespace NLMISC; @@ -219,6 +190,13 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st _AsyncDownloader = NULL; _StateListener = NULL; _StartRyzomAtEnd = true; + +#ifdef NL_OS_UNIX + // don't use cfg, exe and dll from Windows version + ForceRemovePatchCategories.clear(); + ForceRemovePatchCategories.push_back("main_exedll"); + ForceRemovePatchCategories.push_back("main_cfg"); +#endif } // **************************************************************************** From fae178b059a1d9819b991ee0fa7bf129f7d7e76e Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Sun, 23 Mar 2014 15:16:20 +0530 Subject: [PATCH 091/138] colation changed to utf8_unicode_ci --- .../server/ryzom_ams/www/html/installer/libsetup.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 932d6d2db..7d823e1c6 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -70,7 +70,7 @@ //SETUP THE WWW DB $dbw = new DBLayer("install", "web"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `". $cfg['db']['web']['name'] . "`; DROP TABLE IF EXISTS ams_user; @@ -96,7 +96,7 @@ $dbl = new DBLayer("install", "lib"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `" . $cfg['db']['lib']['name'] ."`; DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ams_querycache`; @@ -502,7 +502,7 @@ //SETUP THE SHARD DB $dbs = new DBLayer("install", "shard"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['shard']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['shard']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `". $cfg['db']['shard']['name'] . "`; CREATE TABLE IF NOT EXISTS `domain` ( @@ -620,7 +620,7 @@ CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."`; USE `". $cfg['db']['tool']['name'] . "`; - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `" . $cfg['db']['tool']['name'] ."`; CREATE TABLE IF NOT EXISTS `neltool_annotations` ( @@ -1400,7 +1400,7 @@ //SETUP THE OPEN_SHARD DB $dbw = new DBLayer("install", "ring"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `" . $cfg['db']['ring']['name'] ."`; CREATE TABLE IF NOT EXISTS `characters` ( From 61c7cdebcbbb5adac78b338352dddbc14e8c4e00 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Sun, 23 Mar 2014 10:45:30 +0000 Subject: [PATCH 092/138] libsetup.php edited online with Bitbucket --- .../server/ryzom_ams/www/html/installer/libsetup.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 7d823e1c6..3191f074a 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -70,7 +70,7 @@ //SETUP THE WWW DB $dbw = new DBLayer("install", "web"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `". $cfg['db']['web']['name'] . "`; DROP TABLE IF EXISTS ams_user; @@ -96,7 +96,7 @@ $dbl = new DBLayer("install", "lib"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['lib']['name'] ."`; DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ams_querycache`; @@ -620,7 +620,7 @@ CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."`; USE `". $cfg['db']['tool']['name'] . "`; - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['tool']['name'] ."`; CREATE TABLE IF NOT EXISTS `neltool_annotations` ( @@ -1400,7 +1400,7 @@ //SETUP THE OPEN_SHARD DB $dbw = new DBLayer("install", "ring"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['ring']['name'] ."`; CREATE TABLE IF NOT EXISTS `characters` ( From 4841387a8cea13e552793d968025d649ce9689e3 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Sun, 23 Mar 2014 17:56:42 +0530 Subject: [PATCH 093/138] added title of web in translations --- code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini | 3 ++- code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini | 3 ++- .../ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 586d49241..f70fdfe3b 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -6,6 +6,7 @@ login_info = "Please enter your MySQL Username and Password to install the datab login_here = "here" [dashboard] +ams_title="Ryzom Account Mangement System" home_title = "Introduction" home_info = "Welcome to the Ryzom Core - Account Management System" @@ -242,4 +243,4 @@ email_body_forgot_password_header = "A request to reset your account's password email_body_forgot_password_footer = " ---------- If you didn't make this request, please ignore this message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index b4fa1fcf6..c48ca031b 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -2,6 +2,7 @@ ; Comments start with ';', as in php.ini [dashboard] +ams_title="Ryzom Account Mangement System" home_title = "Presentation" home_info = "Bienvenue sur le Ryzom Core - Account Management System" @@ -230,4 +231,4 @@ email_body_forgot_password_header = "Une demande de reinitialiser le mot de pass email_body_forgot_password_footer = " ---------- Si vous n'avez pas fait cette demande, s'il vous plait ignorer ce message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl index fa97211d7..5e5e0fb9f 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl @@ -12,7 +12,7 @@ http://twitter.com/halalit_usman --> - Ryzom Account Management System + {$ams_title} From 5bdcd04060b43e1afb6f3b878ad299272ea3cba8 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Sun, 23 Mar 2014 18:48:39 +0530 Subject: [PATCH 094/138] added web title in translations --- .../tools/server/ryzom_ams/ams_lib/autoload/helpers.php | 5 +++++ .../ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini | 4 +++- .../ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php index 40a96f6c1..8f99bfc93 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php @@ -62,6 +62,11 @@ class Helpers{ $smarty -> assign( $key, $value ); } + //load ams content variables that are language dependent + foreach ( $variables['ams_content'] as $key => $value){ + $smarty -> assign( $key, $value); + } + //smarty inheritance for loading the matching wrapper layout (with the matching menu bar) if( isset($vars['permission']) && $vars['permission'] == 3 ){ $inherited = "extends:layout_admin.tpl|"; diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index f70fdfe3b..322c43779 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -5,8 +5,10 @@ login_info = "Please enter your MySQL Username and Password to install the database.
This is being loaded because the is_installed file is missing.
This process will take about 30 seconds." login_here = "here" -[dashboard] +[ams_content] ams_title="Ryzom Account Mangement System" + +[dashboard] home_title = "Introduction" home_info = "Welcome to the Ryzom Core - Account Management System" diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index c48ca031b..57d6e7e66 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -1,8 +1,10 @@ ; This is a sample configuration file ; Comments start with ';', as in php.ini -[dashboard] +[ams_content] ams_title="Ryzom Account Mangement System" + +[dashboard] home_title = "Presentation" home_info = "Bienvenue sur le Ryzom Core - Account Management System" From 4d4daf0541fe2937b5ebe1b3d68aaa87978793b5 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:25:48 +0100 Subject: [PATCH 095/138] Changed: Renamed RZ_PATCH to RZ_USE_PATCH --- code/ryzom/client/src/CMakeLists.txt | 8 ++++---- code/ryzom/client/src/client_cfg.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 4ffe21c24..1fc53145b 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -4,15 +4,15 @@ ADD_SUBDIRECTORY(client_sheets) IF(WITH_RYZOM_CLIENT) -IF(WITH_RYZOM_PATCH) - ADD_DEFINITIONS(-DRZ_USE_PATCH) -ENDIF(WITH_RYZOM_PATCH) - # These are Windows/MFC apps SET(SEVENZIP_LIBRARY "ryzom_sevenzip") ADD_SUBDIRECTORY(seven_zip) +IF(WITH_RYZOM_PATCH) + ADD_DEFINITIONS(-DRZ_USE_PATCH) +ENDIF(WITH_RYZOM_PATCH) + FILE(GLOB CFG ../*.cfg ../*.cfg.in) FILE(GLOB SRC *.cpp *.h motion/*.cpp motion/*.h client.rc) FILE(GLOB SRC_INTERFACE interface_v3/*.h interface_v3/*.cpp) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index d314f309f..56decaa63 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -422,11 +422,11 @@ CClientConfig::CClientConfig() MouseOverFX = "sfx_selection_mouseover.ps"; SelectionFXSize = 0.8f; -#if RZ_PATCH +#if RZ_USE_PATCH PatchWanted = true; -#else +#else PatchWanted = false; -#endif +#endif PatchUrl.clear(); PatchletUrl.clear(); From 02e839389666b82f6acbcb4e7216ae33e4148ca1 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:26:29 +0100 Subject: [PATCH 096/138] Changed: Create .sh file under Unix --- code/ryzom/client/src/client.cpp | 3 +++ code/ryzom/client/src/login_patch.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 368afe0ee..01e3e08b0 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -540,6 +540,9 @@ int main(int argc, char **argv) // ignore signal SIGPIPE generated by libwww signal(SIGPIPE, sigHandler); + // Delete the .sh file because it s not useful anymore + if (NLMISC::CFile::fileExists("updt_nl.sh")) + NLMISC::CFile::deleteFile("updt_nl.sh"); #endif // initialize patch manager and set the ryzom full path, before it's used diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index a51f2c1d5..4c45f7781 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -168,7 +168,11 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st { DescFilename = "ryzom_xxxxx.idx"; +#ifdef NL_OS_WINDOWS UpdateBatchFilename = "updt_nl.bat"; +#else + UpdateBatchFilename = "updt_nl.sh"; +#endif // use current directory by default setClientRootPath("./"); From 37f9c6dd7ea399e9572da880a55321ff1c2b7f1a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:27:09 +0100 Subject: [PATCH 097/138] Changed: Use fullpath in batch file --- code/ryzom/client/src/client.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 01e3e08b0..19af0545d 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -536,7 +536,6 @@ int main(int argc, char **argv) strcpy(filename, argv[0]); - // ignore signal SIGPIPE generated by libwww signal(SIGPIPE, sigHandler); @@ -547,7 +546,7 @@ int main(int argc, char **argv) // initialize patch manager and set the ryzom full path, before it's used CPatchManager *pPM = CPatchManager::getInstance(); - pPM->setRyzomFilename(NLMISC::CFile::getFilename(filename)); + pPM->setRyzomFilename(filename); ///////////////////////////////// // Initialize the application. // From 9ac2a6950418e3903c1e4c9ec7179ea647bb3cd5 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:31:59 +0100 Subject: [PATCH 098/138] Changed: Use BuildName only on Unix --- code/ryzom/client/src/login_patch.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 4c45f7781..5250c3037 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -2328,7 +2328,6 @@ void CCheckThread::run () uint32 i, j, k; // Check if the client version is the same as the server version string sClientVersion = pPM->getClientVersion(); - string sClientNewVersion = ClientCfg.BuildName; string sServerVersion = pPM->getServerVersion(); ucstring sTranslate = CI18N::get("uiClientVersion") + " (" + sClientVersion + ") "; sTranslate += CI18N::get("uiServerVersion") + " (" + sServerVersion + ")"; @@ -2342,12 +2341,16 @@ void CCheckThread::run () return; } - sint32 nServerVersion, nClientVersion, nClientNewVersion; + sint32 nServerVersion, nClientVersion; fromString(sServerVersion, nServerVersion); fromString(sClientVersion, nClientVersion); - fromString(sClientNewVersion, nClientNewVersion); #ifdef NL_OS_UNIX + string sClientNewVersion = ClientCfg.BuildName; + + sint32 nClientNewVersion; + fromString(sClientNewVersion, nClientNewVersion); + // servers files are not compatible with current client, use last client version if (nClientNewVersion && nServerVersion > nClientNewVersion) { From 3d1abe0cbf0da0b26a4e841ede58d2a334f39ea6 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:32:44 +0100 Subject: [PATCH 099/138] Fixed: Wrong parameters passed to bash script --- code/ryzom/client/src/login_patch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5250c3037..5a1aa0f02 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -986,7 +986,7 @@ void CPatchManager::executeBatchFile() chmod(strCmdLine.c_str(), S_IRWXU); if (r2Mode) { - if (execl(strCmdLine.c_str(), LoginLogin.c_str(), LoginPassword.c_str()) == -1) + if (execl(strCmdLine.c_str(), strCmdLine.c_str(), LoginLogin.c_str(), LoginPassword.c_str(), (char *) NULL) == -1) { int errsv = errno; nlerror("Execl Error: %d %s", errsv, strCmdLine.c_str(), (char *) NULL); @@ -998,7 +998,7 @@ void CPatchManager::executeBatchFile() } else { - if (execl(strCmdLine.c_str(), LoginLogin.c_str(), LoginPassword.c_str(), LoginShardId, (char *) NULL) == -1) + if (execl(strCmdLine.c_str(), strCmdLine.c_str(), LoginLogin.c_str(), LoginPassword.c_str(), toString(LoginShardId).c_str(), (char *) NULL) == -1) { int errsv = errno; nlerror("Execl r2mode Error: %d %s", errsv, strCmdLine.c_str()); From 713f87819bca38235731b6101ba1ae6560df018e Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:34:28 +0100 Subject: [PATCH 100/138] Fixed: Removed chmod because useless --- code/ryzom/client/src/login_patch.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5a1aa0f02..cb48082bc 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -818,21 +818,17 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (useBatchFile) { - //write windows .bat format else write sh format - #ifdef NL_OS_WINDOWS - fprintf(fp, ":loop%u\n", nblab); - fprintf(fp, "attrib -r -a -s -h %s\n", DstName.c_str()); - fprintf(fp, "del %s\n", DstName.c_str()); - fprintf(fp, "if exist %s goto loop%u\n", DstName.c_str(), nblab); - fprintf(fp, "move %s %s\n", SrcName.c_str(), DstPath.c_str()); - #elif NL_OS_MAC - //no patcher on osx - #else - fprintf(fp, "chmod 777 %s\n", DstName.c_str()); - fprintf(fp, "rm -rf %s\n", DstName.c_str()); - fprintf(fp, "mv %s %s\n", SrcName.c_str(), DstPath.c_str()); - #endif - + // write windows .bat format else write sh format +#ifdef NL_OS_WINDOWS + fprintf(fp, ":loop%u\n", nblab); + fprintf(fp, "attrib -r -a -s -h %s\n", DstName.c_str()); + fprintf(fp, "del %s\n", DstName.c_str()); + fprintf(fp, "if exist %s goto loop%u\n", DstName.c_str(), nblab); + fprintf(fp, "move %s %s\n", SrcName.c_str(), DstPath.c_str()); +#else + fprintf(fp, "rm -rf %s\n", DstName.c_str()); + fprintf(fp, "mv %s %s\n", SrcName.c_str(), DstPath.c_str()); +#endif } else { From c0e10e4a5d46abdb0283bef0a2d0bbeac47f5901 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:36:05 +0100 Subject: [PATCH 101/138] Changed: Removed pwd command --- code/ryzom/client/src/login_patch.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index cb48082bc..4357471b8 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -741,13 +741,11 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool throw Exception (err); } //use bat if windows if not use sh - #ifdef NL_OS_WINDOWS - fprintf(fp, "@echo off\n"); - #elif NL_OS_MAC - // mac patcher doesn't work yet - #else - fprintf(fp, "#!/bin/sh\npwd\n"); - #endif +#ifdef NL_OS_WINDOWS + fprintf(fp, "@echo off\n"); +#else + fprintf(fp, "#!/bin/sh\n"); +#endif } // Unpack files with category ExtractPath non empty From c325eaaacb653f808ef31be446f445239d19a0f5 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Mar 2014 20:36:46 +0100 Subject: [PATCH 102/138] Changed: Minor changes --- code/ryzom/client/src/login_patch.cpp | 119 +++++++++++++------------- 1 file changed, 61 insertions(+), 58 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 4357471b8..5b9a83c83 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -34,8 +34,8 @@ #ifdef USE_CURL #include #endif -#include +#include #include "nel/misc/debug.h" #include "nel/misc/path.h" @@ -68,7 +68,7 @@ #endif #ifdef NL_OS_WINDOWS -#include + #include #endif // @@ -87,11 +87,12 @@ extern string VersionName; extern string R2ServerVersion; #ifdef __CLIENT_INSTALL_EXE__ -extern std::string TheTmpInstallDirectory; -extern std::string ClientLauncherUrl; + extern std::string TheTmpInstallDirectory; + extern std::string ClientLauncherUrl; #else -std::string TheTmpInstallDirectory ="patch/client_install"; + std::string TheTmpInstallDirectory = "patch/client_install"; #endif + // **************************************************************************** // **************************************************************************** // **************************************************************************** @@ -259,16 +260,20 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s try { CConfigFile *cf; - #ifdef RY_BG_DOWNLOADER - cf = &theApp.ConfigFile; - #else - cf = &ClientCfg.ConfigFile; - #endif + +#ifdef RY_BG_DOWNLOADER + cf = &theApp.ConfigFile; +#else + cf = &ClientCfg.ConfigFile; +#endif + std::string appName = "ryzom_live"; + if (cf->getVarPtr("Application")) { appName = cf->getVar("Application").asString(0); } + std::string versionFileName = appName + ".version"; getServerFile(versionFileName); @@ -280,13 +285,14 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s versionFile.getline(buffer, 1024); CSString line(buffer); - #ifdef NL_DEBUG - CConfigFile::CVar *forceVersion = cf->getVarPtr("ForceVersion"); - if (forceVersion != NULL) - { - line = forceVersion->asString(); - } - #endif +#ifdef NL_DEBUG + CConfigFile::CVar *forceVersion = cf->getVarPtr("ForceVersion"); + + if (forceVersion != NULL) + { + line = forceVersion->asString(); + } +#endif ServerVersion = line.firstWord(true); VersionName = line.firstWord(true); @@ -294,7 +300,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s // force the R2ServerVersion R2ServerVersion = ServerVersion; - #ifdef __CLIENT_INSTALL_EXE__ +#ifdef __CLIENT_INSTALL_EXE__ { //The install program load a the url of the mini web site in the patch directory @@ -332,7 +338,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s } } } - #endif +#endif } catch (...) { @@ -740,6 +746,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool string err = toString("Can't open file '%s' for writing: code=%d %s (error code 29)", UpdateBatchFilename.c_str(), errno, strerror(errno)); throw Exception (err); } + //use bat if windows if not use sh #ifdef NL_OS_WINDOWS fprintf(fp, "@echo off\n"); @@ -777,6 +784,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool throw; } + if (!result) { //:TODO: handle exception? @@ -796,19 +804,17 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool string SrcPath = ClientPatchPath; string DstPath = rCat.getUnpackTo(); NLMISC::CFile::createDirectoryTree(DstPath); - // this file must be moved + // this file must be moved if (useBatchFile) { - #ifdef NL_OS_WINDOWS - SrcPath = CPath::standardizeDosPath(SrcPath); - DstPath = CPath::standardizeDosPath(DstPath); - #elif NL_OS_MAC - //no patcher on mac yet - #else - SrcPath = CPath::standardizePath(SrcPath); - DstPath = CPath::standardizePath(DstPath); - #endif +#ifdef NL_OS_WINDOWS + SrcPath = CPath::standardizeDosPath(SrcPath); + DstPath = CPath::standardizeDosPath(DstPath); +#else + SrcPath = CPath::standardizePath(SrcPath); + DstPath = CPath::standardizePath(DstPath); +#endif } std::string SrcName = SrcPath + vFilenames[fff]; @@ -843,26 +849,25 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool // Finalize batch file if (NLMISC::CFile::isExists("patch") && NLMISC::CFile::isDirectory("patch")) { - #ifdef NL_OS_WINDOWS +#ifdef NL_OS_WINDOWS if (useBatchFile) { fprintf(fp, ":looppatch\n"); } - #endif +#endif vector vFileList; CPath::getPathContent ("patch", false, false, true, vFileList, NULL, false); + for(uint32 i = 0; i < vFileList.size(); ++i) { if (useBatchFile) { - #ifdef NL_OS_WINDOWS - fprintf(fp, "del %s\n", CPath::standardizeDosPath(vFileList[i]).c_str()); - #elif NL_OS_MAC - //no patcher on MAC yet - #else - fprintf(fp, "rm -f %s\n", CPath::standardizePath(vFileList[i]).c_str()); - #endif +#ifdef NL_OS_WINDOWS + fprintf(fp, "del %s\n", CPath::standardizeDosPath(vFileList[i]).c_str()); +#else + fprintf(fp, "rm -f %s\n", CPath::standardizePath(vFileList[i]).c_str()); +#endif } else { @@ -872,14 +877,12 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (useBatchFile) { - #ifdef NL_OS_WINDOWS - fprintf(fp, "rd /Q /S patch\n"); - fprintf(fp, "if exist patch goto looppatch\n"); - #elif NL_OS_MAC - //no patcher on mac yet - #else - fprintf(fp, "rm -rf patch\n"); - #endif +#ifdef NL_OS_WINDOWS + fprintf(fp, "rd /Q /S patch\n"); + fprintf(fp, "if exist patch goto looppatch\n"); +#else + fprintf(fp, "rm -rf patch\n"); +#endif } else { @@ -891,11 +894,11 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool { if (wantRyzomRestart) { - #ifdef NL_OS_WINDOWS +#ifdef NL_OS_WINDOWS fprintf(fp, "start %s %%1 %%2 %%3\n", RyzomFilename.c_str()); - #else +#else fprintf(fp, "%s $1 $2 $3\n", RyzomFilename.c_str()); - #endif +#endif } bool writeError = ferror(fp) != 0; @@ -970,9 +973,11 @@ void CPatchManager::executeBatchFile() #else // Start the child process. bool r2Mode = false; - #ifndef RY_BG_DOWNLOADER - r2Mode = ClientCfg.R2Mode; - #endif + +#ifndef RY_BG_DOWNLOADER + r2Mode = ClientCfg.R2Mode; +#endif + string strCmdLine; strCmdLine = "./" + UpdateBatchFilename; @@ -1318,7 +1323,7 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de DownloadInProgress = true; try { - #ifdef USE_CURL +#ifdef USE_CURL ucstring s = CI18N::get("uiDLWithCurl") + " " + dest; setState(true, s); @@ -1415,9 +1420,9 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de throw EPatchDownloadException (NLMISC::toString("curl download failed: (ec %d %d)", res, r)); } - #else +#else throw Exception("USE_CURL is not defined, no curl method"); - #endif +#endif } catch(...) { @@ -2132,9 +2137,7 @@ void CPatchManager::getCorruptedFileInfo(const SFileToPatch &ftp, ucstring &sTra bool CPatchManager::unpack7Zip(const std::string &sevenZipFile, const std::string &destFileName) { #ifdef RZ_USE_SEVENZIP - nlinfo("Uncompressing 7zip archive '%s' to '%s'", - sevenZipFile.c_str(), - destFileName.c_str()); + nlinfo("Uncompressing 7zip archive '%s' to '%s'", sevenZipFile.c_str(), destFileName.c_str()); // init seven zip ISzAlloc allocImp; From b719ba64640d2ba3803521cd6029f8499f8d43de Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Mon, 24 Mar 2014 17:07:53 +0530 Subject: [PATCH 103/138] changed login from username to both username and email --- .../ryzom_ams/ams_lib/translations/en.ini | 6 +- .../ryzom_ams/ams_lib/translations/fr.ini | 6 +- .../ryzom_ams/www/html/autoload/webusers.php | 60 ++++++++++++++++++- .../server/ryzom_ams/www/html/func/login.php | 31 ++++++++-- .../ryzom_ams/www/html/templates/login.tpl | 4 +- 5 files changed, 92 insertions(+), 15 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 586d49241..8eed7991a 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -126,8 +126,8 @@ go_home = "Go Home" userlist_info = "welcome to the userlist" [login] -login_info = "Please login with your Username and Password." -login_error_message = "The username/password were not correct!" +login_info = "Please login with your Email/Username and Password." +login_error_message = "The Email/username/password were not correct!" login_register_message ="Register If you don't have an account yet, create one" login_here = "here" login_forgot_password_message = "In case you forgot your password, click" @@ -242,4 +242,4 @@ email_body_forgot_password_header = "A request to reset your account's password email_body_forgot_password_footer = " ---------- If you didn't make this request, please ignore this message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index b4fa1fcf6..3284a5a7d 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -116,8 +116,8 @@ go_home = "Allez au main page" userlist_info = "bienvenue sur le userlist page!" [login] -login_info = "S'il vous plait vous connecter avec votre nom d'utilisateur et mot de passe." -login_error_message = "Le remplie nom d'utilisateur / mot de passe ne sont pas correctes!" +login_info = "S'il vous plait vous connecter avec votre Email/nom d'utilisateur et mot de passe." +login_error_message = "Le remplie Email/nom d'utilisateur / mot de passe ne sont pas correctes!" login_register_message =" Inscrivez-vous Si vous n'avez pas encore de compte, creez-en un" login_here = "ici" login_forgot_password_message = "Dans le cas ou vous avez oublie votre mot de passe, cliquez" @@ -230,4 +230,4 @@ email_body_forgot_password_header = "Une demande de reinitialiser le mot de pass email_body_forgot_password_footer = " ---------- Si vous n'avez pas fait cette demande, s'il vous plait ignorer ce message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php index d8e59d1f9..aea4537b4 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php @@ -90,6 +90,47 @@ class WebUsers extends Users{ } + + /** + * check if the login email and password match the db. + * @param $email the inserted email id + * @param $password the inserted password (unhashed) + * @return the logged in user's db row as array if login was a success, else "fail" will be returned. + */ + public static function checkLoginMatchUsingEmail($email,$password){ + + $dbw = new DBLayer("web"); + $statement = $dbw->execute("SELECT * FROM ams_user WHERE Email=:emailid", array('emailid' => $email)); + $row = $statement->fetch(); + $salt = substr($row['Password'],0,2); + $hashed_input_pass = crypt($password, $salt); + if($hashed_input_pass == $row['Password']){ + return $row; + }else{ + return "fail"; + } + } + + /** + * check for the login type email or username. + * @param $value the inserted value + * @return the type email or username will be returned. + */ + public static function checkLoginType($login_value){ + + $dbl = new DBLayer("web"); + $statement = $dbl->executeWithoutParams("SELECT * FROM ams_user"); + $row = $statement->fetch(); + + foreach( $row as $key => $value) + { + if($login_value == $value){ + return $key; + } + } + } + + /** * returns te id for a given username * @param $username the username @@ -118,6 +159,23 @@ class WebUsers extends Users{ return "FALSE"; } } + + /** + * returns the username for a given emailaddress + * @param $email the emailaddress + * @return the username linked to the emailaddress + */ + public static function getUsernameFromEmail($email){ + $dbw = new DBLayer("web"); + $statement = $dbw->execute("SELECT * FROM ams_user WHERE Email=:email", array('email' => $email)); + $row = $statement->fetch(); + if(!empty($row)){ + return $row['Login']; + }else{ + return "FALSE"; + } + } + /** @@ -355,4 +413,4 @@ class WebUsers extends Users{ } } -} \ No newline at end of file +} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php index b0b6b5add..ca971d3cd 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php @@ -9,15 +9,34 @@ function login(){ global $INGAME_WEBPATH; global $WEBPATH; try{ - $username = filter_var($_POST['Username'],FILTER_SANITIZE_STRING); + $login_value = filter_var($_POST['LoginValue'],FILTER_SANITIZE_STRING); $password = filter_var($_POST['Password'],FILTER_SANITIZE_STRING); - //check if the filtered sent POST data returns a match with the DB - $result = WebUsers::checkLoginMatch($username, $password); + //check login type if email or username + $login_type = WebUsers::checkLoginType($login_value); + + //check if the filtered sent POST data returns a match with the DB + + if($login_type == 'Login') + { + $result = WebUsers::checkLoginMatch($login_value, $password); + }else + { + $result = WebUsers::checkLoginMatchUsingEmail($login_value, $password); + } + if( $result != "fail"){ //handle successful login - $_SESSION['user'] = $username; - $_SESSION['id'] = WebUsers::getId($username); + + if($login_type == 'Login') + { + $_SESSION['user'] = $login_value; + $_SESSION['id'] = WebUsers::getId($login_value); + }else{ + $_SESSION['user'] = WebUsers::getUsernameFromEmail($login_value); + $_SESSION['id'] = WebUsers::getIdFromEmail($login_value); + } + $_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id'])); $user = new WebUsers($_SESSION['id']); $_SESSION['Language'] = $user->getLanguage(); @@ -54,4 +73,4 @@ function login(){ exit; } -} \ No newline at end of file +} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl index 26c992d50..54a87bbcb 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl @@ -14,8 +14,8 @@
-
- +
+
From 101b48fcc83f93362b728035559786055e177acb Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 24 Mar 2014 10:45:42 -0700 Subject: [PATCH 104/138] fix my typo's --- .../server/ryzom_ams/www/html/installer/libsetup.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 932d6d2db..98da6a309 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -6,27 +6,27 @@ */ //set permissions - if(writable('../../../www/login/logs')) { + if(is_writable('../../../www/login/logs')) { echo "failed to get write permissions on logs"; exit; } - if(writable('../../../admin/graphs_output')) { + if(is_writable('../../../admin/graphs_output')) { echo "failed to get write permissions on graphs_output"; exit; } - if(writable('../../../templates/default_c')) { + if(is_writable('../../../admin/templates/default_c')) { echo "failed to get write permissions on default_c"; exit; } - if(writable('../../www')) { + if(is_writable('../../www')) { echo "failed to get write permissions on www"; exit; } - if(writable('../../www/html/cache')) { + if(is_writable('../../www/html/cache')) { echo "failed to get write permissions on cache"; exit; } - if(writable('../../www/html/templates_c')) { + if(is_writable('../../www/html/templates_c')) { echo "failed to get write permissions on templates_c"; exit; } From be4633c1b806ac19d4dc6f829d73bec3a68a9dfc Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Tue, 25 Mar 2014 06:29:17 +0000 Subject: [PATCH 105/138] changed login through email / username --- .../ryzom_ams/www/html/autoload/webusers.php | 72 ++----------------- 1 file changed, 7 insertions(+), 65 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php index aea4537b4..90730291a 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php @@ -70,15 +70,15 @@ class WebUsers extends Users{ /** - * check if the login username and password match the db. - * @param $username the inserted username + * check if the login username/email and password match the db. + * @param $value the inserted username or email * @param $password the inserted password (unhashed) * @return the logged in user's db row as array if login was a success, else "fail" will be returned. */ - public static function checkLoginMatch($username,$password){ + public static function checkLoginMatch($value,$password){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username)); + $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email:value", array('value' => $value)); $row = $statement->fetch(); $salt = substr($row['Password'],0,2); $hashed_input_pass = crypt($password, $salt); @@ -89,50 +89,9 @@ class WebUsers extends Users{ } } - - - /** - * check if the login email and password match the db. - * @param $email the inserted email id - * @param $password the inserted password (unhashed) - * @return the logged in user's db row as array if login was a success, else "fail" will be returned. - */ - public static function checkLoginMatchUsingEmail($email,$password){ - - $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Email=:emailid", array('emailid' => $email)); - $row = $statement->fetch(); - $salt = substr($row['Password'],0,2); - $hashed_input_pass = crypt($password, $salt); - if($hashed_input_pass == $row['Password']){ - return $row; - }else{ - return "fail"; - } - } - - /** - * check for the login type email or username. - * @param $value the inserted value - * @return the type email or username will be returned. - */ - public static function checkLoginType($login_value){ - - $dbl = new DBLayer("web"); - $statement = $dbl->executeWithoutParams("SELECT * FROM ams_user"); - $row = $statement->fetch(); - - foreach( $row as $key => $value) - { - if($login_value == $value){ - return $key; - } - } - } - - + /** - * returns te id for a given username + * returns the id for a given username * @param $username the username * @return the user's id linked to the username */ @@ -145,7 +104,7 @@ class WebUsers extends Users{ /** - * returns te id for a given emailaddress + * returns the id for a given emailaddress * @param $email the emailaddress * @return the user's id linked to the emailaddress */ @@ -160,23 +119,6 @@ class WebUsers extends Users{ } } - /** - * returns the username for a given emailaddress - * @param $email the emailaddress - * @return the username linked to the emailaddress - */ - public static function getUsernameFromEmail($email){ - $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Email=:email", array('email' => $email)); - $row = $statement->fetch(); - if(!empty($row)){ - return $row['Login']; - }else{ - return "FALSE"; - } - } - - /** * get uId attribute of the object. From 7d92faa5bed60c2f7f0da1cbda2fab9a8a2d62d8 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Tue, 25 Mar 2014 06:35:21 +0000 Subject: [PATCH 106/138] login.php edited online with Bitbucket: to provide access through both username and email --- .../server/ryzom_ams/www/html/func/login.php | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php index ca971d3cd..f0212f18b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php @@ -12,31 +12,13 @@ function login(){ $login_value = filter_var($_POST['LoginValue'],FILTER_SANITIZE_STRING); $password = filter_var($_POST['Password'],FILTER_SANITIZE_STRING); - //check login type if email or username - $login_type = WebUsers::checkLoginType($login_value); - //check if the filtered sent POST data returns a match with the DB - - if($login_type == 'Login') - { - $result = WebUsers::checkLoginMatch($login_value, $password); - }else - { - $result = WebUsers::checkLoginMatchUsingEmail($login_value, $password); - } - + $result = WebUsers::checkLoginMatch($login_value, $password); + if( $result != "fail"){ //handle successful login - - if($login_type == 'Login') - { - $_SESSION['user'] = $login_value; - $_SESSION['id'] = WebUsers::getId($login_value); - }else{ - $_SESSION['user'] = WebUsers::getUsernameFromEmail($login_value); - $_SESSION['id'] = WebUsers::getIdFromEmail($login_value); - } - + $_SESSION['user'] = $result['Login']; + $_SESSION['id'] = $result['UId']; $_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id'])); $user = new WebUsers($_SESSION['id']); $_SESSION['Language'] = $user->getLanguage(); From b3cef75c76a9dc7f20005d17dc5641edb376bcd9 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 13:13:17 +0100 Subject: [PATCH 107/138] Fixed: Improve compilation speed including revision.h in a smaller .cpp file --- .../src/interface_v3/interface_manager.cpp | 36 +------- code/ryzom/client/src/user_agent.cpp | 65 ++++++++++++++ code/ryzom/client/src/user_agent.h | 87 +++++++++++++++++++ 3 files changed, 154 insertions(+), 34 deletions(-) create mode 100644 code/ryzom/client/src/user_agent.cpp create mode 100644 code/ryzom/client/src/user_agent.h diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 98184d715..8a70e10fd 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -21,8 +21,6 @@ // Memory #include -#include "game_share/ryzom_version.h" - #include "nel/misc/i_xml.h" #include "nel/misc/o_xml.h" #include "nel/misc/algo.h" @@ -131,29 +129,7 @@ using namespace NLGUI; #include "parser_modules.h" #include "../global.h" - -#ifdef HAVE_REVISION_H -#include "revision.h" -#endif - -#if defined(HAVE_X86_64) -#define RYZOM_ARCH "x64" -#elif defined(HAVE_X86) -#define RYZOM_ARCH "x86" -#elif defined(HAVE_ARM) -#define RYZOM_ARCH "arm" -#else -#define RYZOM_ARCH "unknow" -#endif -#if defined(NL_OS_WINDOWS) -#define RYZOM_SYSTEM "windows" -#elif defined(NL_OS_MAC) -#define RYZOM_SYSTEM "mac" -#elif defined(NL_OS_UNIX) -#define RYZOM_SYSTEM "unix" -#else -#define RYZOM_SYSTEM "unkown" -#endif +#include "user_agent.h" using namespace NLMISC; @@ -489,18 +465,10 @@ CInterfaceManager::CInterfaceManager() CViewTextID::setTextProvider( &SMTextProvider ); CViewTextFormated::setFormatter( &RyzomTextFormatter ); - char buffer[256]; - -#ifdef REVISION - sprintf(buffer, "%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH); -#else - sprintf(buffer, "%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH); -#endif - CGroupHTML::options.trustedDomains = ClientCfg.WebIgTrustedDomains; CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode(); CGroupHTML::options.appName = "Ryzom"; - CGroupHTML::options.appVersion = buffer; + CGroupHTML::options.appVersion = getUserAgent(); NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS ); interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater(); diff --git a/code/ryzom/client/src/user_agent.cpp b/code/ryzom/client/src/user_agent.cpp new file mode 100644 index 000000000..af07e8b86 --- /dev/null +++ b/code/ryzom/client/src/user_agent.cpp @@ -0,0 +1,65 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 "stdpch.h" +#include "user_agent.h" + +#include "game_share/ryzom_version.h" + +#ifdef HAVE_REVISION_H +#include "revision.h" +#endif + +#if defined(HAVE_X86_64) +#define RYZOM_ARCH "x64" +#elif defined(HAVE_X86) +#define RYZOM_ARCH "x86" +#elif defined(HAVE_ARM) +#define RYZOM_ARCH "arm" +#else +#define RYZOM_ARCH "unknown" +#endif +#if defined(NL_OS_WINDOWS) +#define RYZOM_SYSTEM "windows" +#elif defined(NL_OS_MAC) +#define RYZOM_SYSTEM "mac" +#elif defined(NL_OS_UNIX) +#define RYZOM_SYSTEM "unix" +#else +#define RYZOM_SYSTEM "unknown" +#endif + +std::string getUserAgent() +{ + static std::string s_userAgent; + + if (s_userAgent.empty()) + { + char buffer[256]; + +#ifdef REVISION + sprintf(buffer, "%s.%s-%s-%s", RYZOM_VERSION, REVISION, RYZOM_SYSTEM, RYZOM_ARCH); +#else + sprintf(buffer, "%s-%s-%s", RYZOM_VERSION, RYZOM_SYSTEM, RYZOM_ARCH); +#endif + + s_userAgent = buffer; + } + + return s_userAgent; +} diff --git a/code/ryzom/client/src/user_agent.h b/code/ryzom/client/src/user_agent.h new file mode 100644 index 000000000..e42635871 --- /dev/null +++ b/code/ryzom/client/src/user_agent.h @@ -0,0 +1,87 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 . + +#ifndef CL_USER_AGENT_H +#define CL_USER_AGENT_H + +std::string getUserAgent(); + +#endif // CL_USER_AGENT_H + +/* End of user_agent.h */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From fadb3521526b171a83a8bbfe601d8e8f63763c78 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 13:14:14 +0100 Subject: [PATCH 108/138] Changed: Include PCH --- code/ryzom/common/src/game_share/send_chat.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/ryzom/common/src/game_share/send_chat.cpp b/code/ryzom/common/src/game_share/send_chat.cpp index 064e223fe..f5b2353fb 100644 --- a/code/ryzom/common/src/game_share/send_chat.cpp +++ b/code/ryzom/common/src/game_share/send_chat.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "nel/misc/types_nl.h" +#include "stdpch.h" #include "send_chat.h" /** @@ -81,7 +81,6 @@ void npcChatToChannel(const TDataSetRow &senderId, CChatGroup::TGroupType groupT sendMessageViaMirror("IOS", msgout); } - /** * Send a chat line from a bot (mainly NPC) in a chat channel (know as chat group). * Chat group can be constructed from CChatGroup class. @@ -169,7 +168,6 @@ void npcTellToPlayer(const TDataSetRow &senderId, const TDataSetRow &receiverId, sendMessageViaMirror("IOS", msgout); } - /** * Send a tell line from a bot (mainly NPC) to a player. Accept parametered strings * phraseId is a phrase id obtained through the string manager From efcdbd2424d1aafee9ce680b16b29deeb66ea5d7 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 14:14:36 +0100 Subject: [PATCH 110/138] Changed: Use OpenGL functions prototypes from official headers Fixed: glDeleteObjectBufferATI replaced by glFreeObjectBufferATI since 2002 --- .../driver/opengl/driver_opengl_extension.cpp | 1121 +++++++++-------- .../driver/opengl/driver_opengl_extension.h | 573 ++++----- .../opengl/driver_opengl_extension_def.h | 336 +---- .../driver_opengl_vertex_buffer_hard.cpp | 8 +- 4 files changed, 862 insertions(+), 1176 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index 3b771e1c1..9ee14ea6b 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -68,254 +68,252 @@ void (*nglGetProcAddress(const char *procName))() #ifdef USE_OPENGLES // GL_OES_mapbuffer -NEL_PFNGLMAPBUFFEROESPROC nglMapBufferOES; -NEL_PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES; -NEL_PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES; +PFNGLMAPBUFFEROESPROC nglMapBufferOES; +PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES; +PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES; -NEL_PFNGLBUFFERSUBDATAPROC nglBufferSubData; - -PFNGLDRAWTEXFOESPROC nglDrawTexfOES; +PFNGLDRAWTEXFOESPROC nglDrawTexfOES; // GL_OES_framebuffer_object -NEL_PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES; -NEL_PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES; -NEL_PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES; -NEL_PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES; -NEL_PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES; -NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES; -NEL_PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES; -NEL_PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES; -NEL_PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES; -NEL_PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES; -NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES; -NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES; -NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES; -NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES; -NEL_PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES; +PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES; +PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES; +PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES; +PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES; +PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES; +PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES; +PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES; +PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES; +PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES; +PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES; +PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES; +PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES; +PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES; +PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES; // GL_OES_texture_cube_map -NEL_PFNGLTEXGENFOESPROC nglTexGenfOES; -NEL_PFNGLTEXGENFVOESPROC nglTexGenfvOES; -NEL_PFNGLTEXGENIOESPROC nglTexGeniOES; -NEL_PFNGLTEXGENIVOESPROC nglTexGenivOES; -NEL_PFNGLTEXGENXOESPROC nglTexGenxOES; -NEL_PFNGLTEXGENXVOESPROC nglTexGenxvOES; -NEL_PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES; -NEL_PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES; -NEL_PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES; +PFNGLTEXGENFOESPROC nglTexGenfOES; +PFNGLTEXGENFVOESPROC nglTexGenfvOES; +PFNGLTEXGENIOESPROC nglTexGeniOES; +PFNGLTEXGENIVOESPROC nglTexGenivOES; +PFNGLTEXGENXOESPROC nglTexGenxOES; +PFNGLTEXGENXVOESPROC nglTexGenxvOES; +PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES; +PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES; +PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES; #else // ARB_multitexture -NEL_PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB; -NEL_PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB; +PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB; +PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB; -NEL_PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB; -NEL_PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB; -NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; -NEL_PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB; -NEL_PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB; -NEL_PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB; -NEL_PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB; -NEL_PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB; -NEL_PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB; -NEL_PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB; -NEL_PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB; -NEL_PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB; -NEL_PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB; -NEL_PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB; -NEL_PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB; -NEL_PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB; +PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB; +PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB; +PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; +PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB; +PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB; +PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB; +PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB; +PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB; +PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB; +PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB; +PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB; +PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB; +PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB; +PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB; +PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB; +PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB; -NEL_PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB; -NEL_PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB; -NEL_PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB; -NEL_PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB; -NEL_PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB; -NEL_PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB; -NEL_PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB; -NEL_PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB; -NEL_PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB; -NEL_PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB; -NEL_PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB; -NEL_PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB; -NEL_PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB; -NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; -NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; -NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; +PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB; +PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB; +PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB; +PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB; +PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB; +PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB; +PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB; +PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB; +PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB; +PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB; +PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB; +PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB; +PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB; +PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; +PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; +PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; // ARB_TextureCompression. -NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB; -NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB; -NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB; -NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB; -NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB; -NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB; -NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB; +PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB; +PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB; +PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB; +PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB; // VertexArrayRangeNV. -NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV; -NEL_PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV; +PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV; +PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV; // FenceNV. -NEL_PFNGLDELETEFENCESNVPROC nglDeleteFencesNV; -NEL_PFNGLGENFENCESNVPROC nglGenFencesNV; -NEL_PFNGLISFENCENVPROC nglIsFenceNV; -NEL_PFNGLTESTFENCENVPROC nglTestFenceNV; -NEL_PFNGLGETFENCEIVNVPROC nglGetFenceivNV; -NEL_PFNGLFINISHFENCENVPROC nglFinishFenceNV; -NEL_PFNGLSETFENCENVPROC nglSetFenceNV; +PFNGLDELETEFENCESNVPROC nglDeleteFencesNV; +PFNGLGENFENCESNVPROC nglGenFencesNV; +PFNGLISFENCENVPROC nglIsFenceNV; +PFNGLTESTFENCENVPROC nglTestFenceNV; +PFNGLGETFENCEIVNVPROC nglGetFenceivNV; +PFNGLFINISHFENCENVPROC nglFinishFenceNV; +PFNGLSETFENCENVPROC nglSetFenceNV; // VertexWeighting. -NEL_PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT; -NEL_PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT; -NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT; +PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT; +PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT; +PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT; // VertexProgramExtension. -NEL_PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV; -NEL_PFNGLBINDPROGRAMNVPROC nglBindProgramNV; -NEL_PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV; -NEL_PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV; -NEL_PFNGLGENPROGRAMSNVPROC nglGenProgramsNV; -NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV; -NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV; -NEL_PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV; -NEL_PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV; -NEL_PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV; -NEL_PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV; -NEL_PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV; -NEL_PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV; -NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV; -NEL_PFNGLISPROGRAMNVPROC nglIsProgramNV; -NEL_PFNGLLOADPROGRAMNVPROC nglLoadProgramNV; -NEL_PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV; -NEL_PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV; -NEL_PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV; -NEL_PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV; -NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV; -NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV; -NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV; -NEL_PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV; -NEL_PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV; -NEL_PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV; -NEL_PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV; -NEL_PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV; -NEL_PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV; -NEL_PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV; -NEL_PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV; -NEL_PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV; -NEL_PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV; -NEL_PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV; -NEL_PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV; -NEL_PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV; -NEL_PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV; -NEL_PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV; -NEL_PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV; -NEL_PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV; -NEL_PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV; -NEL_PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV; -NEL_PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV; -NEL_PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV; -NEL_PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV; -NEL_PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV; -NEL_PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV; -NEL_PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV; -NEL_PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV; -NEL_PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV; -NEL_PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV; -NEL_PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV; -NEL_PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV; -NEL_PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV; -NEL_PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV; -NEL_PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV; -NEL_PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV; -NEL_PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV; -NEL_PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV; -NEL_PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV; -NEL_PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV; -NEL_PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV; -NEL_PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV; +PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV; +PFNGLBINDPROGRAMNVPROC nglBindProgramNV; +PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV; +PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV; +PFNGLGENPROGRAMSNVPROC nglGenProgramsNV; +PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV; +PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV; +PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV; +PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV; +PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV; +PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV; +PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV; +PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV; +PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV; +PFNGLISPROGRAMNVPROC nglIsProgramNV; +PFNGLLOADPROGRAMNVPROC nglLoadProgramNV; +PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV; +PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV; +PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV; +PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV; +PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV; +PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV; +PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV; +PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV; +PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV; +PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV; +PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV; +PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV; +PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV; +PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV; +PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV; +PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV; +PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV; +PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV; +PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV; +PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV; +PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV; +PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV; +PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV; +PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV; +PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV; +PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV; +PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV; +PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV; +PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV; +PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV; +PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV; +PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV; +PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV; +PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV; +PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV; +PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV; +PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV; +PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV; +PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV; +PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV; +PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV; +PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV; +PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV; +PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV; +PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV; +PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV; +PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV; // VertexShaderExt extension -NEL_PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT; -NEL_PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT; -NEL_PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT; -NEL_PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT; -NEL_PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT; -NEL_PFNGLSHADEROP1EXTPROC nglShaderOp1EXT; -NEL_PFNGLSHADEROP2EXTPROC nglShaderOp2EXT; -NEL_PFNGLSHADEROP3EXTPROC nglShaderOp3EXT; -NEL_PFNGLSWIZZLEEXTPROC nglSwizzleEXT; -NEL_PFNGLWRITEMASKEXTPROC nglWriteMaskEXT; -NEL_PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT; -NEL_PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT; -NEL_PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT; -NEL_PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT; -NEL_PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT; -NEL_PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT; -NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT; -NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT; -NEL_PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT; -NEL_PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT; -NEL_PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT; -NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT; -NEL_PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT; -NEL_PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT; -NEL_PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT; -NEL_PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT; -NEL_PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT; -NEL_PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT; -NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT; -NEL_PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT; -NEL_PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT; -NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT; -NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT; -NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT; +PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT; +PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT; +PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT; +PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT; +PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT; +PFNGLSHADEROP1EXTPROC nglShaderOp1EXT; +PFNGLSHADEROP2EXTPROC nglShaderOp2EXT; +PFNGLSHADEROP3EXTPROC nglShaderOp3EXT; +PFNGLSWIZZLEEXTPROC nglSwizzleEXT; +PFNGLWRITEMASKEXTPROC nglWriteMaskEXT; +PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT; +PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT; +PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT; +PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT; +PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT; +PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT; +PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT; +PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT; +PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT; +PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT; +PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT; +PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT; +PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT; +PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT; +PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT; +PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT; +PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT; +PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT; +PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT; +PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT; +PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT; +PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT; +PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT; +PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT; // SecondaryColor extension -NEL_PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; -NEL_PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; -NEL_PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; -NEL_PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; -NEL_PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; -NEL_PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; -NEL_PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; -NEL_PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; -NEL_PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; -NEL_PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; -NEL_PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; -NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; -NEL_PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; -NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; -NEL_PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; -NEL_PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; -NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; +PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; +PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; +PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; +PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; +PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; +PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; +PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; +PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; +PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; +PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; +PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; +PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; +PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; +PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; +PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; +PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; +PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; // BlendColor extension -NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; +PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; //======================== -NEL_PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI; -NEL_PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI; -NEL_PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI; -NEL_PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI; -NEL_PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI; -NEL_PFNGLDELETEOBJECTBUFFERATIPROC nglDeleteObjectBufferATI; -NEL_PFNGLARRAYOBJECTATIPROC nglArrayObjectATI; -NEL_PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI; -NEL_PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI; -NEL_PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI; -NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI; -NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI; +PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI; +PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI; +PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI; +PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI; +PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI; +PFNGLFREEOBJECTBUFFERATIPROC nglFreeObjectBufferATI; +PFNGLARRAYOBJECTATIPROC nglArrayObjectATI; +PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI; +PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI; +PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI; +PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI; +PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI; // GL_ATI_map_object_buffer -NEL_PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI; -NEL_PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI; +PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI; +PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI; // GL_ATI_vertex_attrib_array_object -NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI; -NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI; -NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI; +PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI; +PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI; +PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI; // GL_ATI_envmap_bumpmap extension PFNGLTEXBUMPPARAMETERIVATIPROC nglTexBumpParameterivATI; @@ -324,42 +322,42 @@ PFNGLGETTEXBUMPPARAMETERIVATIPROC nglGetTexBumpParameterivATI; PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI; // GL_ATI_fragment_shader extension -NEL_PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; -NEL_PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; -NEL_PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; -NEL_PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; -NEL_PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; -NEL_PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; -NEL_PFNGLSAMPLEMAPATIPROC nglSampleMapATI; -NEL_PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; -NEL_PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; -NEL_PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; -NEL_PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; -NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; -NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; -NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; +PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; +PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; +PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; +PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; +PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; +PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; +PFNGLSAMPLEMAPATIPROC nglSampleMapATI; +PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; +PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; +PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; +PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; +PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; +PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; +PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; // GL_ARB_fragment_program // the following functions are the sames than with GL_ARB_vertex_program -//NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -//NEL_PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -//NEL_PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -//NEL_PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -//NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -//NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -//NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -//NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; -NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; -//NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -//NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -//NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -//NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -//NEL_PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -//NEL_PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -//NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; +//PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; +//PFNGLBINDPROGRAMARBPROC nglBindProgramARB; +//PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; +//PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; +//PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; +//PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; +//PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; +//PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; +PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; +PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; +PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; +PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; +//PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; +//PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; +//PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; +//PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; +//PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; +//PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; +//PFNGLISPROGRAMARBPROC nglIsProgramARB; // GL_ARB_vertex_buffer_object PFNGLBINDBUFFERARBPROC nglBindBufferARB; @@ -439,38 +437,38 @@ PFNGLGETVERTEXATTRIBPOINTERVARBPROC nglGetVertexAttribPointervARB; PFNGLISPROGRAMARBPROC nglIsProgramARB; // NV_occlusion_query -NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV; -NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV; -NEL_PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV; -NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV; -NEL_PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV; -NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; -NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; +PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV; +PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV; +PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV; +PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV; +PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV; +PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; +PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; // GL_EXT_framebuffer_object -NEL_PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; -NEL_PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT; -NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT; -NEL_PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT; -NEL_PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT; -NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT; -NEL_PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT; -NEL_PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT; -NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT; -NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT; -NEL_PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT; -NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT; -NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT; -NEL_PFNGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT; +PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; +PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT; +PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT; +PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT; +PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT; +PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT; +PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT; +PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT; +PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT; +PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT; +PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT; +PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT; +PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT; +PFNGLGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT; // GL_EXT_framebuffer_blit -NEL_PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT; +PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT; // GL_EXT_framebuffer_multisample -NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT; +PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT; // GL_ARB_multisample -NEL_PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB; +PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB; #ifdef NL_OS_WINDOWS PFNWGLALLOCATEMEMORYNVPROC nwglAllocateMemoryNV; @@ -495,19 +493,31 @@ PFNWGLGETSWAPINTERVALEXTPROC nwglGetSwapIntervalEXT; // WGL_ARB_extensions_string PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; +// WGL_AMD_gpu_association +//======================== +PFNWGLGETGPUIDSAMDPROC nwglGetGPUIDsAMD; +PFNWGLGETGPUINFOAMDPROC nwglGetGPUInfoAMD; +PFNWGLGETCONTEXTGPUIDAMDPROC nwglGetContextGPUIDAMD; +PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC nwglCreateAssociatedContextAMD; +PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC nwglCreateAssociatedContextAttribsAMD; +PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC nwglDeleteAssociatedContextAMD; +PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC nwglMakeAssociatedContextCurrentAMD; +PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC nwglGetCurrentAssociatedContextAMD; +PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC nwglBlitContextFramebufferAMD; + #elif defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) -NEL_PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV; -NEL_PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV; +PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV; +PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV; // Swap control extensions -NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; +PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; -NEL_PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA; -NEL_PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA; +PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA; +PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA; #endif @@ -549,42 +559,42 @@ static bool setupARBMultiTexture(const char *glext) #ifndef USE_OPENGLES CHECK_EXT("GL_ARB_multitexture"); - CHECK_ADDRESS(NEL_PFNGLACTIVETEXTUREARBPROC, glActiveTextureARB); - CHECK_ADDRESS(NEL_PFNGLCLIENTACTIVETEXTUREARBPROC, glClientActiveTextureARB); + CHECK_ADDRESS(PFNGLACTIVETEXTUREARBPROC, glActiveTextureARB); + CHECK_ADDRESS(PFNGLCLIENTACTIVETEXTUREARBPROC, glClientActiveTextureARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1SARBPROC, glMultiTexCoord1sARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1IARBPROC, glMultiTexCoord1iARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1FARBPROC, glMultiTexCoord1fARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1DARBPROC, glMultiTexCoord1dARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2SARBPROC, glMultiTexCoord2sARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2IARBPROC, glMultiTexCoord2iARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2FARBPROC, glMultiTexCoord2fARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2DARBPROC, glMultiTexCoord2dARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3SARBPROC, glMultiTexCoord3sARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3IARBPROC, glMultiTexCoord3iARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3FARBPROC, glMultiTexCoord3fARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3DARBPROC, glMultiTexCoord3dARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4SARBPROC, glMultiTexCoord4sARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4IARBPROC, glMultiTexCoord4iARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4FARBPROC, glMultiTexCoord4fARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4DARBPROC, glMultiTexCoord4dARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1SARBPROC, glMultiTexCoord1sARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1IARBPROC, glMultiTexCoord1iARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1FARBPROC, glMultiTexCoord1fARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1DARBPROC, glMultiTexCoord1dARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2SARBPROC, glMultiTexCoord2sARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2IARBPROC, glMultiTexCoord2iARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2FARBPROC, glMultiTexCoord2fARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2DARBPROC, glMultiTexCoord2dARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3SARBPROC, glMultiTexCoord3sARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3IARBPROC, glMultiTexCoord3iARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3FARBPROC, glMultiTexCoord3fARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3DARBPROC, glMultiTexCoord3dARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4SARBPROC, glMultiTexCoord4sARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4IARBPROC, glMultiTexCoord4iARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4FARBPROC, glMultiTexCoord4fARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4DARBPROC, glMultiTexCoord4dARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1SVARBPROC, glMultiTexCoord1svARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1IVARBPROC, glMultiTexCoord1ivARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1FVARBPROC, glMultiTexCoord1fvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD1DVARBPROC, glMultiTexCoord1dvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2SVARBPROC, glMultiTexCoord2svARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2IVARBPROC, glMultiTexCoord2ivARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2FVARBPROC, glMultiTexCoord2fvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD2DVARBPROC, glMultiTexCoord2dvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3SVARBPROC, glMultiTexCoord3svARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3IVARBPROC, glMultiTexCoord3ivARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3FVARBPROC, glMultiTexCoord3fvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD3DVARBPROC, glMultiTexCoord3dvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4SVARBPROC, glMultiTexCoord4svARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4IVARBPROC, glMultiTexCoord4ivARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4FVARBPROC, glMultiTexCoord4fvARB); - CHECK_ADDRESS(NEL_PFNGLMULTITEXCOORD4DVARBPROC, glMultiTexCoord4dvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1SVARBPROC, glMultiTexCoord1svARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1IVARBPROC, glMultiTexCoord1ivARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1FVARBPROC, glMultiTexCoord1fvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD1DVARBPROC, glMultiTexCoord1dvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2SVARBPROC, glMultiTexCoord2svARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2IVARBPROC, glMultiTexCoord2ivARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2FVARBPROC, glMultiTexCoord2fvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD2DVARBPROC, glMultiTexCoord2dvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3SVARBPROC, glMultiTexCoord3svARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3IVARBPROC, glMultiTexCoord3ivARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3FVARBPROC, glMultiTexCoord3fvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD3DVARBPROC, glMultiTexCoord3dvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4SVARBPROC, glMultiTexCoord4svARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4IVARBPROC, glMultiTexCoord4ivARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4FVARBPROC, glMultiTexCoord4fvARB); + CHECK_ADDRESS(PFNGLMULTITEXCOORD4DVARBPROC, glMultiTexCoord4dvARB); #endif return true; @@ -611,13 +621,13 @@ static bool setupARBTextureCompression(const char *glext) #ifndef USE_OPENGLES CHECK_EXT("GL_ARB_texture_compression"); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC, glCompressedTexImage3DARB); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC, glCompressedTexImage2DARB); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC, glCompressedTexImage1DARB); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC, glCompressedTexSubImage3DARB); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC, glCompressedTexSubImage2DARB); - CHECK_ADDRESS(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC, glCompressedTexSubImage1DARB); - CHECK_ADDRESS(NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC, glGetCompressedTexImageARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXIMAGE3DARBPROC, glCompressedTexImage3DARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXIMAGE2DARBPROC, glCompressedTexImage2DARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXIMAGE1DARBPROC, glCompressedTexImage1DARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC, glCompressedTexSubImage3DARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC, glCompressedTexSubImage2DARB); + CHECK_ADDRESS(PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC, glCompressedTexSubImage1DARB); + CHECK_ADDRESS(PFNGLGETCOMPRESSEDTEXIMAGEARBPROC, glGetCompressedTexImageARB); #endif return true; @@ -643,9 +653,9 @@ static bool setupOESMapBuffer(const char *glext) CHECK_EXT("OES_mapbuffer"); #ifdef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLMAPBUFFEROESPROC, glMapBufferOES); - CHECK_ADDRESS(NEL_PFNGLUNMAPBUFFEROESPROC, glUnmapBufferOES); - CHECK_ADDRESS(NEL_PFNGLGETBUFFERPOINTERVOESPROC, glGetBufferPointervOES); + CHECK_ADDRESS(PFNGLMAPBUFFEROESPROC, glMapBufferOES); + CHECK_ADDRESS(PFNGLUNMAPBUFFEROESPROC, glUnmapBufferOES); + CHECK_ADDRESS(PFNGLGETBUFFERPOINTERVOESPROC, glGetBufferPointervOES); #endif return true; @@ -678,25 +688,25 @@ static bool setupNVVertexArrayRange(const char *glext) #ifndef USE_OPENGLES // Get VAR address. - CHECK_ADDRESS(NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC, glFlushVertexArrayRangeNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXARRAYRANGENVPROC, glVertexArrayRangeNV); + CHECK_ADDRESS(PFNGLFLUSHVERTEXARRAYRANGENVPROC, glFlushVertexArrayRangeNV); + CHECK_ADDRESS(PFNGLVERTEXARRAYRANGENVPROC, glVertexArrayRangeNV); #ifdef NL_OS_WINDOWS CHECK_ADDRESS(PFNWGLALLOCATEMEMORYNVPROC, wglAllocateMemoryNV); CHECK_ADDRESS(PFNWGLFREEMEMORYNVPROC, wglFreeMemoryNV); #elif defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - CHECK_ADDRESS(NEL_PFNGLXALLOCATEMEMORYNVPROC, glXAllocateMemoryNV); - CHECK_ADDRESS(NEL_PFNGLXFREEMEMORYNVPROC, glXFreeMemoryNV); + CHECK_ADDRESS(PFNGLXALLOCATEMEMORYNVPROC, glXAllocateMemoryNV); + CHECK_ADDRESS(PFNGLXFREEMEMORYNVPROC, glXFreeMemoryNV); #endif // Get fence address. - CHECK_ADDRESS(NEL_PFNGLDELETEFENCESNVPROC, glDeleteFencesNV); - CHECK_ADDRESS(NEL_PFNGLGENFENCESNVPROC, glGenFencesNV); - CHECK_ADDRESS(NEL_PFNGLISFENCENVPROC, glIsFenceNV); - CHECK_ADDRESS(NEL_PFNGLTESTFENCENVPROC, glTestFenceNV); - CHECK_ADDRESS(NEL_PFNGLGETFENCEIVNVPROC, glGetFenceivNV); - CHECK_ADDRESS(NEL_PFNGLFINISHFENCENVPROC, glFinishFenceNV); - CHECK_ADDRESS(NEL_PFNGLSETFENCENVPROC, glSetFenceNV); + CHECK_ADDRESS(PFNGLDELETEFENCESNVPROC, glDeleteFencesNV); + CHECK_ADDRESS(PFNGLGENFENCESNVPROC, glGenFencesNV); + CHECK_ADDRESS(PFNGLISFENCENVPROC, glIsFenceNV); + CHECK_ADDRESS(PFNGLTESTFENCENVPROC, glTestFenceNV); + CHECK_ADDRESS(PFNGLGETFENCEIVNVPROC, glGetFenceivNV); + CHECK_ADDRESS(PFNGLFINISHFENCENVPROC, glFinishFenceNV); + CHECK_ADDRESS(PFNGLSETFENCENVPROC, glSetFenceNV); #endif return true; @@ -725,9 +735,9 @@ static bool setupEXTVertexWeighting(const char *glext) CHECK_EXT("GL_EXT_vertex_weighting"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLVERTEXWEIGHTFEXTPROC, glVertexWeightfEXT); - CHECK_ADDRESS(NEL_PFNGLVERTEXWEIGHTFVEXTPROC, glVertexWeightfvEXT); - CHECK_ADDRESS(NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC, glVertexWeightPointerEXT); + CHECK_ADDRESS(PFNGLVERTEXWEIGHTFEXTPROC, glVertexWeightfEXT); + CHECK_ADDRESS(PFNGLVERTEXWEIGHTFVEXTPROC, glVertexWeightfvEXT); + CHECK_ADDRESS(PFNGLVERTEXWEIGHTPOINTEREXTPROC, glVertexWeightPointerEXT); #endif return true; @@ -806,15 +816,15 @@ static bool setupARBTextureCubeMap(const char *glext) #ifdef USE_OPENGLES CHECK_EXT("OES_texture_cube_map"); - CHECK_ADDRESS(NEL_PFNGLTEXGENFOESPROC, glTexGenfOES); - CHECK_ADDRESS(NEL_PFNGLTEXGENFVOESPROC, glTexGenfvOES); - CHECK_ADDRESS(NEL_PFNGLTEXGENIOESPROC, glTexGeniOES); - CHECK_ADDRESS(NEL_PFNGLTEXGENIVOESPROC, glTexGenivOES); - CHECK_ADDRESS(NEL_PFNGLTEXGENXOESPROC, glTexGenxOES); - CHECK_ADDRESS(NEL_PFNGLTEXGENXVOESPROC, glTexGenxvOES); - CHECK_ADDRESS(NEL_PFNGLGETTEXGENFVOESPROC, glGetTexGenfvOES); - CHECK_ADDRESS(NEL_PFNGLGETTEXGENIVOESPROC, glGetTexGenivOES); - CHECK_ADDRESS(NEL_PFNGLGETTEXGENXVOESPROC, glGetTexGenxvOES); + CHECK_ADDRESS(PFNGLTEXGENFOESPROC, glTexGenfOES); + CHECK_ADDRESS(PFNGLTEXGENFVOESPROC, glTexGenfvOES); + CHECK_ADDRESS(PFNGLTEXGENIOESPROC, glTexGeniOES); + CHECK_ADDRESS(PFNGLTEXGENIVOESPROC, glTexGenivOES); + CHECK_ADDRESS(PFNGLTEXGENXOESPROC, glTexGenxOES); + CHECK_ADDRESS(PFNGLTEXGENXVOESPROC, glTexGenxvOES); + CHECK_ADDRESS(PFNGLGETTEXGENFVOESPROC, glGetTexGenfvOES); + CHECK_ADDRESS(PFNGLGETTEXGENIVOESPROC, glGetTexGenivOES); + CHECK_ADDRESS(PFNGLGETTEXGENXVOESPROC, glGetTexGenxvOES); #else CHECK_EXT("GL_ARB_texture_cube_map"); #endif @@ -838,69 +848,69 @@ static bool setupNVVertexProgram(const char *glext) CHECK_EXT("GL_NV_vertex_program"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLAREPROGRAMSRESIDENTNVPROC, glAreProgramsResidentNV); - CHECK_ADDRESS(NEL_PFNGLBINDPROGRAMNVPROC, glBindProgramNV); - CHECK_ADDRESS(NEL_PFNGLDELETEPROGRAMSNVPROC, glDeleteProgramsNV); - CHECK_ADDRESS(NEL_PFNGLEXECUTEPROGRAMNVPROC, glExecuteProgramNV); - CHECK_ADDRESS(NEL_PFNGLGENPROGRAMSNVPROC, glGenProgramsNV); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC, glGetProgramParameterdvNV); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC, glGetProgramParameterfvNV); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMIVNVPROC, glGetProgramivNV); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMSTRINGNVPROC, glGetProgramStringNV); - CHECK_ADDRESS(NEL_PFNGLGETTRACKMATRIXIVNVPROC, glGetTrackMatrixivNV); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBDVNVPROC, glGetVertexAttribdvNV); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBFVNVPROC, glGetVertexAttribfvNV); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBIVNVPROC, glGetVertexAttribivNV); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC, glGetVertexAttribPointervNV); - CHECK_ADDRESS(NEL_PFNGLISPROGRAMNVPROC, glIsProgramNV); - CHECK_ADDRESS(NEL_PFNGLLOADPROGRAMNVPROC, glLoadProgramNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETER4DNVPROC, glProgramParameter4dNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETER4DVNVPROC, glProgramParameter4dvNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETER4FNVPROC, glProgramParameter4fNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETER4FVNVPROC, glProgramParameter4fvNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC, glProgramParameters4dvNV); - CHECK_ADDRESS(NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC, glProgramParameters4fvNV); - CHECK_ADDRESS(NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC, glRequestResidentProgramsNV); - CHECK_ADDRESS(NEL_PFNGLTRACKMATRIXNVPROC, glTrackMatrixNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBPOINTERNVPROC, glVertexAttribPointerNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1DNVPROC, glVertexAttrib1dNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1DVNVPROC, glVertexAttrib1dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1FNVPROC, glVertexAttrib1fNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1FVNVPROC, glVertexAttrib1fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1SNVPROC, glVertexAttrib1sNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB1SVNVPROC, glVertexAttrib1svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2DNVPROC, glVertexAttrib2dNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2DVNVPROC, glVertexAttrib2dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2FNVPROC, glVertexAttrib2fNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2FVNVPROC, glVertexAttrib2fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2SNVPROC, glVertexAttrib2sNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB2SVNVPROC, glVertexAttrib2svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3DNVPROC, glVertexAttrib3dNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3DVNVPROC, glVertexAttrib3dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3FNVPROC, glVertexAttrib3fNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3FVNVPROC, glVertexAttrib3fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3SNVPROC, glVertexAttrib3sNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB3SVNVPROC, glVertexAttrib3svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4DNVPROC, glVertexAttrib4dNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4DVNVPROC, glVertexAttrib4dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4FNVPROC, glVertexAttrib4fNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4FVNVPROC, glVertexAttrib4fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4SNVPROC, glVertexAttrib4sNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4SVNVPROC, glVertexAttrib4svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIB4UBVNVPROC, glVertexAttrib4ubvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS1DVNVPROC, glVertexAttribs1dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS1FVNVPROC, glVertexAttribs1fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS1SVNVPROC, glVertexAttribs1svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS2DVNVPROC, glVertexAttribs2dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS2FVNVPROC, glVertexAttribs2fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS2SVNVPROC, glVertexAttribs2svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS3DVNVPROC, glVertexAttribs3dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS3FVNVPROC, glVertexAttribs3fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS3SVNVPROC, glVertexAttribs3svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS4DVNVPROC, glVertexAttribs4dvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS4FVNVPROC, glVertexAttribs4fvNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS4SVNVPROC, glVertexAttribs4svNV); - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBS4UBVNVPROC, glVertexAttribs4ubvNV); + CHECK_ADDRESS(PFNGLAREPROGRAMSRESIDENTNVPROC, glAreProgramsResidentNV); + CHECK_ADDRESS(PFNGLBINDPROGRAMNVPROC, glBindProgramNV); + CHECK_ADDRESS(PFNGLDELETEPROGRAMSNVPROC, glDeleteProgramsNV); + CHECK_ADDRESS(PFNGLEXECUTEPROGRAMNVPROC, glExecuteProgramNV); + CHECK_ADDRESS(PFNGLGENPROGRAMSNVPROC, glGenProgramsNV); + CHECK_ADDRESS(PFNGLGETPROGRAMPARAMETERDVNVPROC, glGetProgramParameterdvNV); + CHECK_ADDRESS(PFNGLGETPROGRAMPARAMETERFVNVPROC, glGetProgramParameterfvNV); + CHECK_ADDRESS(PFNGLGETPROGRAMIVNVPROC, glGetProgramivNV); + CHECK_ADDRESS(PFNGLGETPROGRAMSTRINGNVPROC, glGetProgramStringNV); + CHECK_ADDRESS(PFNGLGETTRACKMATRIXIVNVPROC, glGetTrackMatrixivNV); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBDVNVPROC, glGetVertexAttribdvNV); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBFVNVPROC, glGetVertexAttribfvNV); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBIVNVPROC, glGetVertexAttribivNV); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBPOINTERVNVPROC, glGetVertexAttribPointervNV); + CHECK_ADDRESS(PFNGLISPROGRAMNVPROC, glIsProgramNV); + CHECK_ADDRESS(PFNGLLOADPROGRAMNVPROC, glLoadProgramNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETER4DNVPROC, glProgramParameter4dNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETER4DVNVPROC, glProgramParameter4dvNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETER4FNVPROC, glProgramParameter4fNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETER4FVNVPROC, glProgramParameter4fvNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETERS4DVNVPROC, glProgramParameters4dvNV); + CHECK_ADDRESS(PFNGLPROGRAMPARAMETERS4FVNVPROC, glProgramParameters4fvNV); + CHECK_ADDRESS(PFNGLREQUESTRESIDENTPROGRAMSNVPROC, glRequestResidentProgramsNV); + CHECK_ADDRESS(PFNGLTRACKMATRIXNVPROC, glTrackMatrixNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBPOINTERNVPROC, glVertexAttribPointerNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1DNVPROC, glVertexAttrib1dNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1DVNVPROC, glVertexAttrib1dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1FNVPROC, glVertexAttrib1fNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1FVNVPROC, glVertexAttrib1fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1SNVPROC, glVertexAttrib1sNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB1SVNVPROC, glVertexAttrib1svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2DNVPROC, glVertexAttrib2dNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2DVNVPROC, glVertexAttrib2dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2FNVPROC, glVertexAttrib2fNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2FVNVPROC, glVertexAttrib2fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2SNVPROC, glVertexAttrib2sNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB2SVNVPROC, glVertexAttrib2svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3DNVPROC, glVertexAttrib3dNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3DVNVPROC, glVertexAttrib3dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3FNVPROC, glVertexAttrib3fNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3FVNVPROC, glVertexAttrib3fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3SNVPROC, glVertexAttrib3sNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB3SVNVPROC, glVertexAttrib3svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4DNVPROC, glVertexAttrib4dNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4DVNVPROC, glVertexAttrib4dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4FNVPROC, glVertexAttrib4fNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4FVNVPROC, glVertexAttrib4fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4SNVPROC, glVertexAttrib4sNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4SVNVPROC, glVertexAttrib4svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIB4UBVNVPROC, glVertexAttrib4ubvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS1DVNVPROC, glVertexAttribs1dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS1FVNVPROC, glVertexAttribs1fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS1SVNVPROC, glVertexAttribs1svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS2DVNVPROC, glVertexAttribs2dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS2FVNVPROC, glVertexAttribs2fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS2SVNVPROC, glVertexAttribs2svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS3DVNVPROC, glVertexAttribs3dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS3FVNVPROC, glVertexAttribs3fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS3SVNVPROC, glVertexAttribs3svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS4DVNVPROC, glVertexAttribs4dvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS4FVNVPROC, glVertexAttribs4fvNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS4SVNVPROC, glVertexAttribs4svNV); + CHECK_ADDRESS(PFNGLVERTEXATTRIBS4UBVNVPROC, glVertexAttribs4ubvNV); #endif return true; @@ -913,40 +923,40 @@ static bool setupEXTVertexShader(const char *glext) CHECK_EXT("GL_EXT_vertex_shader"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLBEGINVERTEXSHADEREXTPROC, glBeginVertexShaderEXT); - CHECK_ADDRESS(NEL_PFNGLENDVERTEXSHADEREXTPROC, glEndVertexShaderEXT); - CHECK_ADDRESS(NEL_PFNGLBINDVERTEXSHADEREXTPROC, glBindVertexShaderEXT); - CHECK_ADDRESS(NEL_PFNGLGENVERTEXSHADERSEXTPROC, glGenVertexShadersEXT); - CHECK_ADDRESS(NEL_PFNGLDELETEVERTEXSHADEREXTPROC, glDeleteVertexShaderEXT); - CHECK_ADDRESS(NEL_PFNGLSHADEROP1EXTPROC, glShaderOp1EXT); - CHECK_ADDRESS(NEL_PFNGLSHADEROP2EXTPROC, glShaderOp2EXT); - CHECK_ADDRESS(NEL_PFNGLSHADEROP3EXTPROC, glShaderOp3EXT); - CHECK_ADDRESS(NEL_PFNGLSWIZZLEEXTPROC, glSwizzleEXT); - CHECK_ADDRESS(NEL_PFNGLWRITEMASKEXTPROC, glWriteMaskEXT); - CHECK_ADDRESS(NEL_PFNGLINSERTCOMPONENTEXTPROC, glInsertComponentEXT); - CHECK_ADDRESS(NEL_PFNGLEXTRACTCOMPONENTEXTPROC, glExtractComponentEXT); - CHECK_ADDRESS(NEL_PFNGLGENSYMBOLSEXTPROC, glGenSymbolsEXT); - CHECK_ADDRESS(NEL_PFNGLSETINVARIANTEXTPROC, glSetInvariantEXT); - CHECK_ADDRESS(NEL_PFNGLSETLOCALCONSTANTEXTPROC, glSetLocalConstantEXT); - CHECK_ADDRESS(NEL_PFNGLVARIANTPOINTEREXTPROC, glVariantPointerEXT); - CHECK_ADDRESS(NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC, glEnableVariantClientStateEXT); - CHECK_ADDRESS(NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC, glDisableVariantClientStateEXT); - CHECK_ADDRESS(NEL_PFNGLBINDLIGHTPARAMETEREXTPROC, glBindLightParameterEXT); - CHECK_ADDRESS(NEL_PFNGLBINDMATERIALPARAMETEREXTPROC, glBindMaterialParameterEXT); - CHECK_ADDRESS(NEL_PFNGLBINDTEXGENPARAMETEREXTPROC, glBindTexGenParameterEXT); - CHECK_ADDRESS(NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC, glBindTextureUnitParameterEXT); - CHECK_ADDRESS(NEL_PFNGLBINDPARAMETEREXTPROC, glBindParameterEXT); - CHECK_ADDRESS(NEL_PFNGLISVARIANTENABLEDEXTPROC, glIsVariantEnabledEXT); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTBOOLEANVEXTPROC, glGetVariantBooleanvEXT); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTINTEGERVEXTPROC, glGetVariantIntegervEXT); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTFLOATVEXTPROC, glGetVariantFloatvEXT); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTPOINTERVEXTPROC, glGetVariantPointervEXT); - CHECK_ADDRESS(NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC, glGetInvariantBooleanvEXT); - CHECK_ADDRESS(NEL_PFNGLGETINVARIANTINTEGERVEXTPROC, glGetInvariantIntegervEXT); - CHECK_ADDRESS(NEL_PFNGLGETINVARIANTFLOATVEXTPROC, glGetInvariantFloatvEXT); - CHECK_ADDRESS(NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC, glGetLocalConstantBooleanvEXT); - CHECK_ADDRESS(NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC, glGetLocalConstantIntegervEXT); - CHECK_ADDRESS(NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC, glGetLocalConstantFloatvEXT); + CHECK_ADDRESS(PFNGLBEGINVERTEXSHADEREXTPROC, glBeginVertexShaderEXT); + CHECK_ADDRESS(PFNGLENDVERTEXSHADEREXTPROC, glEndVertexShaderEXT); + CHECK_ADDRESS(PFNGLBINDVERTEXSHADEREXTPROC, glBindVertexShaderEXT); + CHECK_ADDRESS(PFNGLGENVERTEXSHADERSEXTPROC, glGenVertexShadersEXT); + CHECK_ADDRESS(PFNGLDELETEVERTEXSHADEREXTPROC, glDeleteVertexShaderEXT); + CHECK_ADDRESS(PFNGLSHADEROP1EXTPROC, glShaderOp1EXT); + CHECK_ADDRESS(PFNGLSHADEROP2EXTPROC, glShaderOp2EXT); + CHECK_ADDRESS(PFNGLSHADEROP3EXTPROC, glShaderOp3EXT); + CHECK_ADDRESS(PFNGLSWIZZLEEXTPROC, glSwizzleEXT); + CHECK_ADDRESS(PFNGLWRITEMASKEXTPROC, glWriteMaskEXT); + CHECK_ADDRESS(PFNGLINSERTCOMPONENTEXTPROC, glInsertComponentEXT); + CHECK_ADDRESS(PFNGLEXTRACTCOMPONENTEXTPROC, glExtractComponentEXT); + CHECK_ADDRESS(PFNGLGENSYMBOLSEXTPROC, glGenSymbolsEXT); + CHECK_ADDRESS(PFNGLSETINVARIANTEXTPROC, glSetInvariantEXT); + CHECK_ADDRESS(PFNGLSETLOCALCONSTANTEXTPROC, glSetLocalConstantEXT); + CHECK_ADDRESS(PFNGLVARIANTPOINTEREXTPROC, glVariantPointerEXT); + CHECK_ADDRESS(PFNGLENABLEVARIANTCLIENTSTATEEXTPROC, glEnableVariantClientStateEXT); + CHECK_ADDRESS(PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC, glDisableVariantClientStateEXT); + CHECK_ADDRESS(PFNGLBINDLIGHTPARAMETEREXTPROC, glBindLightParameterEXT); + CHECK_ADDRESS(PFNGLBINDMATERIALPARAMETEREXTPROC, glBindMaterialParameterEXT); + CHECK_ADDRESS(PFNGLBINDTEXGENPARAMETEREXTPROC, glBindTexGenParameterEXT); + CHECK_ADDRESS(PFNGLBINDTEXTUREUNITPARAMETEREXTPROC, glBindTextureUnitParameterEXT); + CHECK_ADDRESS(PFNGLBINDPARAMETEREXTPROC, glBindParameterEXT); + CHECK_ADDRESS(PFNGLISVARIANTENABLEDEXTPROC, glIsVariantEnabledEXT); + CHECK_ADDRESS(PFNGLGETVARIANTBOOLEANVEXTPROC, glGetVariantBooleanvEXT); + CHECK_ADDRESS(PFNGLGETVARIANTINTEGERVEXTPROC, glGetVariantIntegervEXT); + CHECK_ADDRESS(PFNGLGETVARIANTFLOATVEXTPROC, glGetVariantFloatvEXT); + CHECK_ADDRESS(PFNGLGETVARIANTPOINTERVEXTPROC, glGetVariantPointervEXT); + CHECK_ADDRESS(PFNGLGETINVARIANTBOOLEANVEXTPROC, glGetInvariantBooleanvEXT); + CHECK_ADDRESS(PFNGLGETINVARIANTINTEGERVEXTPROC, glGetInvariantIntegervEXT); + CHECK_ADDRESS(PFNGLGETINVARIANTFLOATVEXTPROC, glGetInvariantFloatvEXT); + CHECK_ADDRESS(PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC, glGetLocalConstantBooleanvEXT); + CHECK_ADDRESS(PFNGLGETLOCALCONSTANTINTEGERVEXTPROC, glGetLocalConstantIntegervEXT); + CHECK_ADDRESS(PFNGLGETLOCALCONSTANTFLOATVEXTPROC, glGetLocalConstantFloatvEXT); // we require at least 128 instructions, 15 local register (r0, r1,..,r11) + 3 temporary vector for swizzle emulation + 1 vector for indexing temp + 3 temporary scalar for LOGG, EXPP and LIT emulation, 1 address register // we require 11 variants (4 textures + position + normal + primary color + secondary color + weight + palette skin + fog) @@ -989,23 +999,23 @@ static bool setupEXTSecondaryColor(const char *glext) CHECK_EXT("GL_EXT_secondary_color"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3BEXTPROC, glSecondaryColor3bEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3BVEXTPROC, glSecondaryColor3bvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3DEXTPROC, glSecondaryColor3dEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3DVEXTPROC, glSecondaryColor3dvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3IEXTPROC, glSecondaryColor3iEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3IVEXTPROC, glSecondaryColor3ivEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3SEXTPROC, glSecondaryColor3sEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3SVEXTPROC, glSecondaryColor3svEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UBEXTPROC, glSecondaryColor3ubEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC, glSecondaryColor3ubvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UIEXTPROC, glSecondaryColor3uiEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC, glSecondaryColor3uivEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3USEXTPROC, glSecondaryColor3usEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLOR3USVEXTPROC, glSecondaryColor3usvEXT); - CHECK_ADDRESS(NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3BEXTPROC, glSecondaryColor3bEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3BVEXTPROC, glSecondaryColor3bvEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3DEXTPROC, glSecondaryColor3dEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3DVEXTPROC, glSecondaryColor3dvEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3IEXTPROC, glSecondaryColor3iEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3IVEXTPROC, glSecondaryColor3ivEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3SEXTPROC, glSecondaryColor3sEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3SVEXTPROC, glSecondaryColor3svEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3UBEXTPROC, glSecondaryColor3ubEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3UBVEXTPROC, glSecondaryColor3ubvEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3UIEXTPROC, glSecondaryColor3uiEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3UIVEXTPROC, glSecondaryColor3uivEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3USEXTPROC, glSecondaryColor3usEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLOR3USVEXTPROC, glSecondaryColor3usvEXT); + CHECK_ADDRESS(PFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); #endif return true; @@ -1037,7 +1047,7 @@ static bool setupARBMultisample(const char *glext) CHECK_EXT("GL_ARB_multisample"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLSAMPLECOVERAGEARBPROC, glSampleCoverageARB); + CHECK_ADDRESS(PFNGLSAMPLECOVERAGEARBPROC, glSampleCoverageARB); #endif return true; @@ -1084,7 +1094,7 @@ static bool setupEXTBlendColor(const char *glext) CHECK_EXT("GL_EXT_blend_color"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLBLENDCOLOREXTPROC, glBlendColorEXT); + CHECK_ADDRESS(PFNGLBLENDCOLOREXTPROC, glBlendColorEXT); #endif return true; @@ -1106,31 +1116,22 @@ static bool setupATIVertexArrayObject(const char *glext) CHECK_EXT("GL_ATI_vertex_array_object"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLNEWOBJECTBUFFERATIPROC, glNewObjectBufferATI); - CHECK_ADDRESS(NEL_PFNGLISOBJECTBUFFERATIPROC, glIsObjectBufferATI); - CHECK_ADDRESS(NEL_PFNGLUPDATEOBJECTBUFFERATIPROC, glUpdateObjectBufferATI); - CHECK_ADDRESS(NEL_PFNGLGETOBJECTBUFFERFVATIPROC, glGetObjectBufferfvATI); - CHECK_ADDRESS(NEL_PFNGLGETOBJECTBUFFERIVATIPROC, glGetObjectBufferivATI); - - nglDeleteObjectBufferATI = (NEL_PFNGLDELETEOBJECTBUFFERATIPROC)nglGetProcAddress("nglDeleteObjectBufferATI"); - - if(!nglDeleteObjectBufferATI) - { - // seems that on matrox parhelia driver, this procedure is named nglFreeObjectBufferATI !! - nglDeleteObjectBufferATI = (NEL_PFNGLDELETEOBJECTBUFFERATIPROC)nglGetProcAddress("nglFreeObjectBufferATI"); - if(!nglDeleteObjectBufferATI) return false; - } - - CHECK_ADDRESS(NEL_PFNGLARRAYOBJECTATIPROC, glArrayObjectATI); - CHECK_ADDRESS(NEL_PFNGLGETARRAYOBJECTFVATIPROC, glGetArrayObjectfvATI); - CHECK_ADDRESS(NEL_PFNGLGETARRAYOBJECTIVATIPROC, glGetArrayObjectivATI); + CHECK_ADDRESS(PFNGLNEWOBJECTBUFFERATIPROC, glNewObjectBufferATI); + CHECK_ADDRESS(PFNGLISOBJECTBUFFERATIPROC, glIsObjectBufferATI); + CHECK_ADDRESS(PFNGLUPDATEOBJECTBUFFERATIPROC, glUpdateObjectBufferATI); + CHECK_ADDRESS(PFNGLGETOBJECTBUFFERFVATIPROC, glGetObjectBufferfvATI); + CHECK_ADDRESS(PFNGLGETOBJECTBUFFERIVATIPROC, glGetObjectBufferivATI); + CHECK_ADDRESS(PFNGLFREEOBJECTBUFFERATIPROC, glFreeObjectBufferATI); + CHECK_ADDRESS(PFNGLARRAYOBJECTATIPROC, glArrayObjectATI); + CHECK_ADDRESS(PFNGLGETARRAYOBJECTFVATIPROC, glGetArrayObjectfvATI); + CHECK_ADDRESS(PFNGLGETARRAYOBJECTIVATIPROC, glGetArrayObjectivATI); if(strstr(glext, "GL_EXT_vertex_shader") != NULL) { // the following exist only if ext vertex shader is present - CHECK_ADDRESS(NEL_PFNGLVARIANTARRAYOBJECTATIPROC, glVariantArrayObjectATI); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC, glGetVariantArrayObjectfvATI); - CHECK_ADDRESS(NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC, glGetVariantArrayObjectivATI); + CHECK_ADDRESS(PFNGLVARIANTARRAYOBJECTATIPROC, glVariantArrayObjectATI); + CHECK_ADDRESS(PFNGLGETVARIANTARRAYOBJECTFVATIPROC, glGetVariantArrayObjectfvATI); + CHECK_ADDRESS(PFNGLGETVARIANTARRAYOBJECTIVATIPROC, glGetVariantArrayObjectivATI); } #endif @@ -1144,8 +1145,8 @@ static bool setupATIMapObjectBuffer(const char *glext) CHECK_EXT("GL_ATI_map_object_buffer"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLMAPOBJECTBUFFERATIPROC, glMapObjectBufferATI); - CHECK_ADDRESS(NEL_PFNGLUNMAPOBJECTBUFFERATIPROC, glUnmapObjectBufferATI); + CHECK_ADDRESS(PFNGLMAPOBJECTBUFFERATIPROC, glMapObjectBufferATI); + CHECK_ADDRESS(PFNGLUNMAPOBJECTBUFFERATIPROC, glUnmapObjectBufferATI); #endif return true; @@ -1160,20 +1161,20 @@ static bool setupATIFragmentShader(const char *glext) CHECK_EXT("GL_ATI_fragment_shader"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLGENFRAGMENTSHADERSATIPROC, glGenFragmentShadersATI); - CHECK_ADDRESS(NEL_PFNGLBINDFRAGMENTSHADERATIPROC, glBindFragmentShaderATI); - CHECK_ADDRESS(NEL_PFNGLDELETEFRAGMENTSHADERATIPROC, glDeleteFragmentShaderATI); - CHECK_ADDRESS(NEL_PFNGLBEGINFRAGMENTSHADERATIPROC, glBeginFragmentShaderATI); - CHECK_ADDRESS(NEL_PFNGLENDFRAGMENTSHADERATIPROC, glEndFragmentShaderATI); - CHECK_ADDRESS(NEL_PFNGLPASSTEXCOORDATIPROC, glPassTexCoordATI); - CHECK_ADDRESS(NEL_PFNGLSAMPLEMAPATIPROC, glSampleMapATI); - CHECK_ADDRESS(NEL_PFNGLCOLORFRAGMENTOP1ATIPROC, glColorFragmentOp1ATI); - CHECK_ADDRESS(NEL_PFNGLCOLORFRAGMENTOP2ATIPROC, glColorFragmentOp2ATI); - CHECK_ADDRESS(NEL_PFNGLCOLORFRAGMENTOP3ATIPROC, glColorFragmentOp3ATI); - CHECK_ADDRESS(NEL_PFNGLALPHAFRAGMENTOP1ATIPROC, glAlphaFragmentOp1ATI); - CHECK_ADDRESS(NEL_PFNGLALPHAFRAGMENTOP2ATIPROC, glAlphaFragmentOp2ATI); - CHECK_ADDRESS(NEL_PFNGLALPHAFRAGMENTOP3ATIPROC, glAlphaFragmentOp3ATI); - CHECK_ADDRESS(NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC, glSetFragmentShaderConstantATI); + CHECK_ADDRESS(PFNGLGENFRAGMENTSHADERSATIPROC, glGenFragmentShadersATI); + CHECK_ADDRESS(PFNGLBINDFRAGMENTSHADERATIPROC, glBindFragmentShaderATI); + CHECK_ADDRESS(PFNGLDELETEFRAGMENTSHADERATIPROC, glDeleteFragmentShaderATI); + CHECK_ADDRESS(PFNGLBEGINFRAGMENTSHADERATIPROC, glBeginFragmentShaderATI); + CHECK_ADDRESS(PFNGLENDFRAGMENTSHADERATIPROC, glEndFragmentShaderATI); + CHECK_ADDRESS(PFNGLPASSTEXCOORDATIPROC, glPassTexCoordATI); + CHECK_ADDRESS(PFNGLSAMPLEMAPATIPROC, glSampleMapATI); + CHECK_ADDRESS(PFNGLCOLORFRAGMENTOP1ATIPROC, glColorFragmentOp1ATI); + CHECK_ADDRESS(PFNGLCOLORFRAGMENTOP2ATIPROC, glColorFragmentOp2ATI); + CHECK_ADDRESS(PFNGLCOLORFRAGMENTOP3ATIPROC, glColorFragmentOp3ATI); + CHECK_ADDRESS(PFNGLALPHAFRAGMENTOP1ATIPROC, glAlphaFragmentOp1ATI); + CHECK_ADDRESS(PFNGLALPHAFRAGMENTOP2ATIPROC, glAlphaFragmentOp2ATI); + CHECK_ADDRESS(PFNGLALPHAFRAGMENTOP3ATIPROC, glAlphaFragmentOp3ATI); + CHECK_ADDRESS(PFNGLSETFRAGMENTSHADERCONSTANTATIPROC, glSetFragmentShaderConstantATI); #endif return true; @@ -1186,9 +1187,9 @@ static bool setupATIVertexAttribArrayObject(const char *glext) CHECK_EXT("GL_ATI_vertex_attrib_array_object"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC, glVertexAttribArrayObjectATI); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC, glGetVertexAttribArrayObjectfvATI); - CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC, glGetVertexAttribArrayObjectivATI); + CHECK_ADDRESS(PFNGLVERTEXATTRIBARRAYOBJECTATIPROC, glVertexAttribArrayObjectATI); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC, glGetVertexAttribArrayObjectfvATI); + CHECK_ADDRESS(PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC, glGetVertexAttribArrayObjectivATI); #endif return true; @@ -1201,25 +1202,25 @@ static bool setupARBFragmentProgram(const char *glext) CHECK_EXT("GL_ARB_fragment_program"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLPROGRAMSTRINGARBPROC, glProgramStringARB); - CHECK_ADDRESS(NEL_PFNGLBINDPROGRAMARBPROC, glBindProgramARB); - CHECK_ADDRESS(NEL_PFNGLDELETEPROGRAMSARBPROC, glDeleteProgramsARB); - CHECK_ADDRESS(NEL_PFNGLGENPROGRAMSARBPROC, glGenProgramsARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC, glProgramEnvParameter4dARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC, glProgramEnvParameter4dvARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC, glProgramEnvParameter4fARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC, glProgramEnvParameter4fvARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC, glProgramLocalParameter4dARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC, glProgramLocalParameter4dvARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC, glProgramLocalParameter4fARB); - CHECK_ADDRESS(NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC, glProgramLocalParameter4fvARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC, glGetProgramEnvParameterdvARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC, glGetProgramEnvParameterfvARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC, glGetProgramLocalParameterdvARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC, glGetProgramLocalParameterfvARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMIVARBPROC, glGetProgramivARB); - CHECK_ADDRESS(NEL_PFNGLGETPROGRAMSTRINGARBPROC, glGetProgramStringARB); - CHECK_ADDRESS(NEL_PFNGLISPROGRAMARBPROC, glIsProgramARB); + CHECK_ADDRESS(PFNGLPROGRAMSTRINGARBPROC, glProgramStringARB); + CHECK_ADDRESS(PFNGLBINDPROGRAMARBPROC, glBindProgramARB); + CHECK_ADDRESS(PFNGLDELETEPROGRAMSARBPROC, glDeleteProgramsARB); + CHECK_ADDRESS(PFNGLGENPROGRAMSARBPROC, glGenProgramsARB); + CHECK_ADDRESS(PFNGLPROGRAMENVPARAMETER4DARBPROC, glProgramEnvParameter4dARB); + CHECK_ADDRESS(PFNGLPROGRAMENVPARAMETER4DVARBPROC, glProgramEnvParameter4dvARB); + CHECK_ADDRESS(PFNGLPROGRAMENVPARAMETER4FARBPROC, glProgramEnvParameter4fARB); + CHECK_ADDRESS(PFNGLPROGRAMENVPARAMETER4FVARBPROC, glProgramEnvParameter4fvARB); + CHECK_ADDRESS(PFNGLPROGRAMLOCALPARAMETER4DARBPROC, glProgramLocalParameter4dARB); + CHECK_ADDRESS(PFNGLPROGRAMLOCALPARAMETER4DVARBPROC, glProgramLocalParameter4dvARB); + CHECK_ADDRESS(PFNGLPROGRAMLOCALPARAMETER4FARBPROC, glProgramLocalParameter4fARB); + CHECK_ADDRESS(PFNGLPROGRAMLOCALPARAMETER4FVARBPROC, glProgramLocalParameter4fvARB); + CHECK_ADDRESS(PFNGLGETPROGRAMENVPARAMETERDVARBPROC, glGetProgramEnvParameterdvARB); + CHECK_ADDRESS(PFNGLGETPROGRAMENVPARAMETERFVARBPROC, glGetProgramEnvParameterfvARB); + CHECK_ADDRESS(PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC, glGetProgramLocalParameterdvARB); + CHECK_ADDRESS(PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC, glGetProgramLocalParameterfvARB); + CHECK_ADDRESS(PFNGLGETPROGRAMIVARBPROC, glGetProgramivARB); + CHECK_ADDRESS(PFNGLGETPROGRAMSTRINGARBPROC, glGetProgramStringARB); + CHECK_ADDRESS(PFNGLISPROGRAMARBPROC, glIsProgramARB); #endif return true; @@ -1339,13 +1340,13 @@ static bool setupNVOcclusionQuery(const char *glext) CHECK_EXT("GL_NV_occlusion_query"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLGENOCCLUSIONQUERIESNVPROC, glGenOcclusionQueriesNV); - CHECK_ADDRESS(NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC, glDeleteOcclusionQueriesNV); - CHECK_ADDRESS(NEL_PFNGLISOCCLUSIONQUERYNVPROC, glIsOcclusionQueryNV); - CHECK_ADDRESS(NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC, glBeginOcclusionQueryNV); - CHECK_ADDRESS(NEL_PFNGLENDOCCLUSIONQUERYNVPROC, glEndOcclusionQueryNV); - CHECK_ADDRESS(NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC, glGetOcclusionQueryivNV); - CHECK_ADDRESS(NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC, glGetOcclusionQueryuivNV); + CHECK_ADDRESS(PFNGLGENOCCLUSIONQUERIESNVPROC, glGenOcclusionQueriesNV); + CHECK_ADDRESS(PFNGLDELETEOCCLUSIONQUERIESNVPROC, glDeleteOcclusionQueriesNV); + CHECK_ADDRESS(PFNGLISOCCLUSIONQUERYNVPROC, glIsOcclusionQueryNV); + CHECK_ADDRESS(PFNGLBEGINOCCLUSIONQUERYNVPROC, glBeginOcclusionQueryNV); + CHECK_ADDRESS(PFNGLENDOCCLUSIONQUERYNVPROC, glEndOcclusionQueryNV); + CHECK_ADDRESS(PFNGLGETOCCLUSIONQUERYIVNVPROC, glGetOcclusionQueryivNV); + CHECK_ADDRESS(PFNGLGETOCCLUSIONQUERYUIVNVPROC, glGetOcclusionQueryuivNV); #endif return true; @@ -1396,38 +1397,38 @@ static bool setupFrameBufferObject(const char *glext) #ifdef USE_OPENGLES CHECK_EXT("GL_OES_framebuffer_object"); - CHECK_ADDRESS(NEL_PFNGLISRENDERBUFFEROESPROC, glIsRenderbufferOES); - CHECK_ADDRESS(NEL_PFNGLBINDRENDERBUFFEROESPROC, glBindRenderbufferOES); - CHECK_ADDRESS(NEL_PFNGLDELETERENDERBUFFERSOESPROC, glDeleteRenderbuffersOES); - CHECK_ADDRESS(NEL_PFNGLGENRENDERBUFFERSOESPROC, glGenRenderbuffersOES); - CHECK_ADDRESS(NEL_PFNGLRENDERBUFFERSTORAGEOESPROC, glRenderbufferStorageOES); - CHECK_ADDRESS(NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC, glGetRenderbufferParameterivOES); - CHECK_ADDRESS(NEL_PFNGLISFRAMEBUFFEROESPROC, glIsFramebufferOES); - CHECK_ADDRESS(NEL_PFNGLBINDFRAMEBUFFEROESPROC, glBindFramebufferOES); - CHECK_ADDRESS(NEL_PFNGLDELETEFRAMEBUFFERSOESPROC, glDeleteFramebuffersOES); - CHECK_ADDRESS(NEL_PFNGLGENFRAMEBUFFERSOESPROC, glGenFramebuffersOES); - CHECK_ADDRESS(NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC, glCheckFramebufferStatusOES); - CHECK_ADDRESS(NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC, glFramebufferRenderbufferOES); - CHECK_ADDRESS(NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC, glFramebufferTexture2DOES); - CHECK_ADDRESS(NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC, glGetFramebufferAttachmentParameterivOES); - CHECK_ADDRESS(NEL_PFNGLGENERATEMIPMAPOESPROC, glGenerateMipmapOES); + CHECK_ADDRESS(PFNGLISRENDERBUFFEROESPROC, glIsRenderbufferOES); + CHECK_ADDRESS(PFNGLBINDRENDERBUFFEROESPROC, glBindRenderbufferOES); + CHECK_ADDRESS(PFNGLDELETERENDERBUFFERSOESPROC, glDeleteRenderbuffersOES); + CHECK_ADDRESS(PFNGLGENRENDERBUFFERSOESPROC, glGenRenderbuffersOES); + CHECK_ADDRESS(PFNGLRENDERBUFFERSTORAGEOESPROC, glRenderbufferStorageOES); + CHECK_ADDRESS(PFNGLGETRENDERBUFFERPARAMETERIVOESPROC, glGetRenderbufferParameterivOES); + CHECK_ADDRESS(PFNGLISFRAMEBUFFEROESPROC, glIsFramebufferOES); + CHECK_ADDRESS(PFNGLBINDFRAMEBUFFEROESPROC, glBindFramebufferOES); + CHECK_ADDRESS(PFNGLDELETEFRAMEBUFFERSOESPROC, glDeleteFramebuffersOES); + CHECK_ADDRESS(PFNGLGENFRAMEBUFFERSOESPROC, glGenFramebuffersOES); + CHECK_ADDRESS(PFNGLCHECKFRAMEBUFFERSTATUSOESPROC, glCheckFramebufferStatusOES); + CHECK_ADDRESS(PFNGLFRAMEBUFFERRENDERBUFFEROESPROC, glFramebufferRenderbufferOES); + CHECK_ADDRESS(PFNGLFRAMEBUFFERTEXTURE2DOESPROC, glFramebufferTexture2DOES); + CHECK_ADDRESS(PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC, glGetFramebufferAttachmentParameterivOES); + CHECK_ADDRESS(PFNGLGENERATEMIPMAPOESPROC, glGenerateMipmapOES); #else CHECK_EXT("GL_EXT_framebuffer_object"); - CHECK_ADDRESS(NEL_PFNGLISRENDERBUFFEREXTPROC, glIsRenderbufferEXT); - CHECK_ADDRESS(NEL_PFNGLISFRAMEBUFFEREXTPROC, glIsFramebufferEXT); - CHECK_ADDRESS(NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT); - CHECK_ADDRESS(NEL_PFNGLGENFRAMEBUFFERSEXTPROC, glGenFramebuffersEXT); - CHECK_ADDRESS(NEL_PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT); - CHECK_ADDRESS(NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC, glFramebufferTexture2DEXT); - CHECK_ADDRESS(NEL_PFNGLGENRENDERBUFFERSEXTPROC, glGenRenderbuffersEXT); - CHECK_ADDRESS(NEL_PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); - CHECK_ADDRESS(NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT); - CHECK_ADDRESS(NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT); - CHECK_ADDRESS(NEL_PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT); - CHECK_ADDRESS(NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC, glDeleteFramebuffersEXT); - CHECK_ADDRESS(NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC, glGetRenderbufferParameterivEXT); - CHECK_ADDRESS(NEL_PFNGENERATEMIPMAPEXTPROC, glGenerateMipmapEXT); + CHECK_ADDRESS(PFNGLISRENDERBUFFEREXTPROC, glIsRenderbufferEXT); + CHECK_ADDRESS(PFNGLISFRAMEBUFFEREXTPROC, glIsFramebufferEXT); + CHECK_ADDRESS(PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT); + CHECK_ADDRESS(PFNGLGENFRAMEBUFFERSEXTPROC, glGenFramebuffersEXT); + CHECK_ADDRESS(PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT); + CHECK_ADDRESS(PFNGLFRAMEBUFFERTEXTURE2DEXTPROC, glFramebufferTexture2DEXT); + CHECK_ADDRESS(PFNGLGENRENDERBUFFERSEXTPROC, glGenRenderbuffersEXT); + CHECK_ADDRESS(PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); + CHECK_ADDRESS(PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT); + CHECK_ADDRESS(PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT); + CHECK_ADDRESS(PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT); + CHECK_ADDRESS(PFNGLDELETEFRAMEBUFFERSEXTPROC, glDeleteFramebuffersEXT); + CHECK_ADDRESS(PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC, glGetRenderbufferParameterivEXT); + CHECK_ADDRESS(PFNGLGENERATEMIPMAPEXTPROC, glGenerateMipmapEXT); #endif return true; @@ -1440,7 +1441,7 @@ static bool setupFrameBufferBlit(const char *glext) CHECK_EXT("GL_EXT_framebuffer_blit"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLBLITFRAMEBUFFEREXTPROC, glBlitFramebufferEXT); + CHECK_ADDRESS(PFNGLBLITFRAMEBUFFEREXTPROC, glBlitFramebufferEXT); #endif return true; @@ -1453,7 +1454,7 @@ static bool setupFrameBufferMultisample(const char *glext) CHECK_EXT("GL_EXT_framebuffer_multisample"); #ifndef USE_OPENGLES - CHECK_ADDRESS(NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC, glRenderbufferStorageMultisampleEXT); + CHECK_ADDRESS(PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC, glRenderbufferStorageMultisampleEXT); #endif return true; @@ -1714,7 +1715,7 @@ static bool setupGLXEXTSwapControl(const char *glext) CHECK_EXT("GLX_EXT_swap_control"); #if defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - CHECK_ADDRESS(NEL_PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT); + CHECK_ADDRESS(PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT); #endif return true; @@ -1740,8 +1741,8 @@ static bool setupGLXMESASwapControl(const char *glext) CHECK_EXT("GLX_MESA_swap_control"); #if defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - CHECK_ADDRESS(NEL_PFNGLXSWAPINTERVALMESAPROC, glXSwapIntervalMESA); - CHECK_ADDRESS(NEL_PFNGLXGETSWAPINTERVALMESAPROC, glXGetSwapIntervalMESA); + CHECK_ADDRESS(PFNGLXSWAPINTERVALMESAPROC, glXSwapIntervalMESA); + CHECK_ADDRESS(PFNGLXGETSWAPINTERVALMESAPROC, glXGetSwapIntervalMESA); #endif return true; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index fe7738fd8..7a20d6896 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -151,7 +151,6 @@ public: ATIVertexArrayObject= false; ATIEnvMapBumpMap = false; ATIFragmentShader = false; - ATIVertexArrayObject = false; ATIMapObjectBuffer = false; ATIVertexAttribArrayObject = false; EXTVertexShader= false; @@ -294,230 +293,228 @@ void registerGlExtensions(CGlExtensions &ext); // OES_mapbuffer. //=============== -extern NEL_PFNGLMAPBUFFEROESPROC nglMapBufferOES; -extern NEL_PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES; -extern NEL_PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES; +extern PFNGLMAPBUFFEROESPROC nglMapBufferOES; +extern PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES; +extern PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES; -extern NEL_PFNGLBUFFERSUBDATAPROC nglBufferSubData; - -extern PFNGLDRAWTEXFOESPROC nglDrawTexfOES; +extern PFNGLDRAWTEXFOESPROC nglDrawTexfOES; // GL_OES_framebuffer_object -extern NEL_PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES; -extern NEL_PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES; -extern NEL_PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES; -extern NEL_PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES; -extern NEL_PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES; -extern NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES; -extern NEL_PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES; -extern NEL_PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES; -extern NEL_PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES; -extern NEL_PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES; -extern NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES; -extern NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES; -extern NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES; -extern NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES; -extern NEL_PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES; +extern PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES; +extern PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES; +extern PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES; +extern PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES; +extern PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES; +extern PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES; +extern PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES; +extern PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES; +extern PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES; +extern PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES; +extern PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES; +extern PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES; +extern PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES; +extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES; +extern PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES; // GL_OES_texture_cube_map -extern NEL_PFNGLTEXGENFOESPROC nglTexGenfOES; -extern NEL_PFNGLTEXGENFVOESPROC nglTexGenfvOES; -extern NEL_PFNGLTEXGENIOESPROC nglTexGeniOES; -extern NEL_PFNGLTEXGENIVOESPROC nglTexGenivOES; -extern NEL_PFNGLTEXGENXOESPROC nglTexGenxOES; -extern NEL_PFNGLTEXGENXVOESPROC nglTexGenxvOES; -extern NEL_PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES; -extern NEL_PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES; -extern NEL_PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES; +extern PFNGLTEXGENFOESPROC nglTexGenfOES; +extern PFNGLTEXGENFVOESPROC nglTexGenfvOES; +extern PFNGLTEXGENIOESPROC nglTexGeniOES; +extern PFNGLTEXGENIVOESPROC nglTexGenivOES; +extern PFNGLTEXGENXOESPROC nglTexGenxOES; +extern PFNGLTEXGENXVOESPROC nglTexGenxvOES; +extern PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES; +extern PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES; +extern PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES; #else // ARB_multitexture //================= -extern NEL_PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB; -extern NEL_PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB; +extern PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB; +extern PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB; -extern NEL_PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB; -extern NEL_PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB; -extern NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; -extern NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; -extern NEL_PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB; -extern NEL_PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB; -extern NEL_PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB; -extern NEL_PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB; -extern NEL_PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB; -extern NEL_PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB; -extern NEL_PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB; -extern NEL_PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB; -extern NEL_PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB; -extern NEL_PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB; -extern NEL_PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB; -extern NEL_PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB; -extern NEL_PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB; +extern PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB; +extern PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB; +extern PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; +extern PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; +extern PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB; +extern PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB; +extern PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB; +extern PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB; +extern PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB; +extern PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB; +extern PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB; +extern PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB; +extern PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB; +extern PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB; +extern PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB; +extern PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB; +extern PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB; -extern NEL_PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB; -extern NEL_PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB; -extern NEL_PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB; -extern NEL_PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB; -extern NEL_PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB; -extern NEL_PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB; -extern NEL_PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB; -extern NEL_PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB; -extern NEL_PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB; -extern NEL_PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB; -extern NEL_PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB; -extern NEL_PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB; -extern NEL_PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB; -extern NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; -extern NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; -extern NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; +extern PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB; +extern PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB; +extern PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB; +extern PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB; +extern PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB; +extern PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB; +extern PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB; +extern PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB; +extern PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB; +extern PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB; +extern PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB; +extern PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB; +extern PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB; +extern PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; +extern PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; +extern PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; // ARB_TextureCompression. //======================== -extern NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB; -extern NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB; -extern NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB; -extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB; -extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB; -extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB; -extern NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB; +extern PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB; +extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB; +extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB; +extern PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB; +extern PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB; +extern PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB; +extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB; // VertexArrayRangeNV. //==================== -extern NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV; -extern NEL_PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV; +extern PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV; +extern PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV; #ifdef NL_OS_WINDOWS extern PFNWGLALLOCATEMEMORYNVPROC nwglAllocateMemoryNV; extern PFNWGLFREEMEMORYNVPROC nwglFreeMemoryNV; #elif defined(NL_OS_UNIX) && !defined(NL_OS_MAC) -extern NEL_PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV; -extern NEL_PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV; +extern PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV; +extern PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV; #endif // FenceNV. //==================== -extern NEL_PFNGLDELETEFENCESNVPROC nglDeleteFencesNV; -extern NEL_PFNGLGENFENCESNVPROC nglGenFencesNV; -extern NEL_PFNGLISFENCENVPROC nglIsFenceNV; -extern NEL_PFNGLTESTFENCENVPROC nglTestFenceNV; -extern NEL_PFNGLGETFENCEIVNVPROC nglGetFenceivNV; -extern NEL_PFNGLFINISHFENCENVPROC nglFinishFenceNV; -extern NEL_PFNGLSETFENCENVPROC nglSetFenceNV; +extern PFNGLDELETEFENCESNVPROC nglDeleteFencesNV; +extern PFNGLGENFENCESNVPROC nglGenFencesNV; +extern PFNGLISFENCENVPROC nglIsFenceNV; +extern PFNGLTESTFENCENVPROC nglTestFenceNV; +extern PFNGLGETFENCEIVNVPROC nglGetFenceivNV; +extern PFNGLFINISHFENCENVPROC nglFinishFenceNV; +extern PFNGLSETFENCENVPROC nglSetFenceNV; // VertexWeighting. //================== -extern NEL_PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT; -extern NEL_PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT; -extern NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT; +extern PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT; +extern PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT; +extern PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT; // VertexProgramExtension. //======================== -extern NEL_PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV; -extern NEL_PFNGLBINDPROGRAMNVPROC nglBindProgramNV; -extern NEL_PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV; -extern NEL_PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV; -extern NEL_PFNGLGENPROGRAMSNVPROC nglGenProgramsNV; -extern NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV; -extern NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV; -extern NEL_PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV; -extern NEL_PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV; -extern NEL_PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV; -extern NEL_PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV; -extern NEL_PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV; -extern NEL_PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV; -extern NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV; -extern NEL_PFNGLISPROGRAMNVPROC nglIsProgramNV; -extern NEL_PFNGLLOADPROGRAMNVPROC nglLoadProgramNV; -extern NEL_PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV; -extern NEL_PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV; -extern NEL_PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV; -extern NEL_PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV; -extern NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV; -extern NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV; -extern NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV; -extern NEL_PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV; -extern NEL_PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV; -extern NEL_PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV; -extern NEL_PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV; -extern NEL_PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV; -extern NEL_PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV; -extern NEL_PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV; -extern NEL_PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV; -extern NEL_PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV; -extern NEL_PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV; -extern NEL_PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV; -extern NEL_PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV; -extern NEL_PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV; -extern NEL_PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV; -extern NEL_PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV; -extern NEL_PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV; -extern NEL_PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV; -extern NEL_PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV; -extern NEL_PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV; -extern NEL_PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV; -extern NEL_PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV; -extern NEL_PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV; -extern NEL_PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV; -extern NEL_PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV; -extern NEL_PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV; -extern NEL_PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV; -extern NEL_PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV; -extern NEL_PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV; -extern NEL_PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV; -extern NEL_PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV; -extern NEL_PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV; -extern NEL_PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV; -extern NEL_PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV; -extern NEL_PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV; -extern NEL_PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV; -extern NEL_PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV; -extern NEL_PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV; -extern NEL_PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV; -extern NEL_PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV; -extern NEL_PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV; +extern PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV; +extern PFNGLBINDPROGRAMNVPROC nglBindProgramNV; +extern PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV; +extern PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV; +extern PFNGLGENPROGRAMSNVPROC nglGenProgramsNV; +extern PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV; +extern PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV; +extern PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV; +extern PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV; +extern PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV; +extern PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV; +extern PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV; +extern PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV; +extern PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV; +extern PFNGLISPROGRAMNVPROC nglIsProgramNV; +extern PFNGLLOADPROGRAMNVPROC nglLoadProgramNV; +extern PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV; +extern PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV; +extern PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV; +extern PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV; +extern PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV; +extern PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV; +extern PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV; +extern PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV; +extern PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV; +extern PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV; +extern PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV; +extern PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV; +extern PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV; +extern PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV; +extern PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV; +extern PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV; +extern PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV; +extern PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV; +extern PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV; +extern PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV; +extern PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV; +extern PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV; +extern PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV; +extern PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV; +extern PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV; +extern PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV; +extern PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV; +extern PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV; +extern PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV; +extern PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV; +extern PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV; +extern PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV; +extern PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV; +extern PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV; +extern PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV; +extern PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV; +extern PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV; +extern PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV; +extern PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV; +extern PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV; +extern PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV; +extern PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV; +extern PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV; +extern PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV; +extern PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV; +extern PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV; +extern PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV; // VertexShaderExtension. //======================== -extern NEL_PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT; -extern NEL_PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT; -extern NEL_PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT; -extern NEL_PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT; -extern NEL_PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT; -extern NEL_PFNGLSHADEROP1EXTPROC nglShaderOp1EXT; -extern NEL_PFNGLSHADEROP2EXTPROC nglShaderOp2EXT; -extern NEL_PFNGLSHADEROP3EXTPROC nglShaderOp3EXT; -extern NEL_PFNGLSWIZZLEEXTPROC nglSwizzleEXT; -extern NEL_PFNGLWRITEMASKEXTPROC nglWriteMaskEXT; -extern NEL_PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT; -extern NEL_PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT; -extern NEL_PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT; -extern NEL_PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT; -extern NEL_PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT; -extern NEL_PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT; -extern NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT; -extern NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT; -extern NEL_PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT; -extern NEL_PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT; -extern NEL_PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT; -extern NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT; -extern NEL_PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT; -extern NEL_PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT; -extern NEL_PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT; -extern NEL_PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT; -extern NEL_PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT; -extern NEL_PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT; -extern NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT; -extern NEL_PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT; -extern NEL_PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT; -extern NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT; -extern NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT; -extern NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT; +extern PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT; +extern PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT; +extern PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT; +extern PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT; +extern PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT; +extern PFNGLSHADEROP1EXTPROC nglShaderOp1EXT; +extern PFNGLSHADEROP2EXTPROC nglShaderOp2EXT; +extern PFNGLSHADEROP3EXTPROC nglShaderOp3EXT; +extern PFNGLSWIZZLEEXTPROC nglSwizzleEXT; +extern PFNGLWRITEMASKEXTPROC nglWriteMaskEXT; +extern PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT; +extern PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT; +extern PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT; +extern PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT; +extern PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT; +extern PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT; +extern PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT; +extern PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT; +extern PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT; +extern PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT; +extern PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT; +extern PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT; +extern PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT; +extern PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT; +extern PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT; +extern PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT; +extern PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT; +extern PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT; +extern PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT; +extern PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT; +extern PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT; +extern PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT; +extern PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT; +extern PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT; // ATI_envmap_bumpmap extension @@ -530,100 +527,100 @@ extern PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI; // SecondaryColor extension //======================== -extern NEL_PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; -extern NEL_PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; -extern NEL_PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; -extern NEL_PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; -extern NEL_PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; -extern NEL_PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; -extern NEL_PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; -extern NEL_PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; -extern NEL_PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; -extern NEL_PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; -extern NEL_PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; -extern NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; -extern NEL_PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; -extern NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; -extern NEL_PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; -extern NEL_PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; -extern NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; +extern PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; +extern PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; +extern PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; +extern PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; +extern PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; +extern PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; +extern PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; +extern PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; +extern PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; +extern PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; +extern PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; +extern PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; +extern PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; +extern PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; +extern PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; +extern PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; +extern PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; // BlendColor extension //======================== -extern NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; +extern PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; // GL_ATI_vertex_array_object extension //======================== -extern NEL_PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI; -extern NEL_PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI; -extern NEL_PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI; -extern NEL_PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI; -extern NEL_PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI; -extern NEL_PFNGLDELETEOBJECTBUFFERATIPROC nglDeleteObjectBufferATI; -extern NEL_PFNGLARRAYOBJECTATIPROC nglArrayObjectATI; -extern NEL_PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI; -extern NEL_PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI; -extern NEL_PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI; -extern NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI; -extern NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI; +extern PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI; +extern PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI; +extern PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI; +extern PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI; +extern PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI; +extern PFNGLFREEOBJECTBUFFERATIPROC nglFreeObjectBufferATI; +extern PFNGLARRAYOBJECTATIPROC nglArrayObjectATI; +extern PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI; +extern PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI; +extern PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI; +extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI; +extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI; // GL_ATI_map_object_buffer //=================================== -extern NEL_PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI; -extern NEL_PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI; +extern PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI; +extern PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI; // GL_ATI_fragment_shader extension //=================================== -extern NEL_PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; -extern NEL_PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; -extern NEL_PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; -extern NEL_PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; -extern NEL_PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; -extern NEL_PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; -extern NEL_PFNGLSAMPLEMAPATIPROC nglSampleMapATI; -extern NEL_PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; -extern NEL_PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; -extern NEL_PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; -extern NEL_PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; -extern NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; -extern NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; -extern NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; +extern PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; +extern PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; +extern PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; +extern PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; +extern PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; +extern PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; +extern PFNGLSAMPLEMAPATIPROC nglSampleMapATI; +extern PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; +extern PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; +extern PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; +extern PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; +extern PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; +extern PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; +extern PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; // GL_ATI_vertex_attrib_array_object //================================== -extern NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI; -extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI; -extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI; +extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI; +extern PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI; +extern PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI; // GL_ARB_fragment_shader_extension //================================== -extern NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; -extern NEL_PFNGLBINDPROGRAMARBPROC nglBindProgramARB; -extern NEL_PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; -extern NEL_PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; -extern NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; -extern NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; -extern NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; -extern NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; -extern NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; -extern NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; -extern NEL_PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; -extern NEL_PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; -extern NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; +extern PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; +extern PFNGLBINDPROGRAMARBPROC nglBindProgramARB; +extern PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; +extern PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; +extern PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; +extern PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; +extern PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; +extern PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; +extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; +extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; +extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; +extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; +extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; +extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; +extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; +extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; +extern PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; +extern PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; +extern PFNGLISPROGRAMARBPROC nglIsProgramARB; // GL_ARB_vertex_buffer_object //================================== @@ -708,13 +705,13 @@ extern PFNGLISPROGRAMARBPROC nglIsProgramARB; // GL_NV_occlusion_query //================================== -extern NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV; -extern NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV; -extern NEL_PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV; -extern NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV; -extern NEL_PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV; -extern NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; -extern NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; +extern PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV; +extern PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV; +extern PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV; +extern PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV; +extern PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV; +extern PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; +extern PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; @@ -743,46 +740,60 @@ extern PFNWGLGETSWAPINTERVALEXTPROC nwglGetSwapIntervalEXT; // WGL_ARB_extensions_string -extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; +extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; + + +// WGL_AMD_gpu_association +//======================== +extern PFNWGLGETGPUIDSAMDPROC nwglGetGPUIDsAMD; +extern PFNWGLGETGPUINFOAMDPROC nwglGetGPUInfoAMD; +extern PFNWGLGETCONTEXTGPUIDAMDPROC nwglGetContextGPUIDAMD; +extern PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC nwglCreateAssociatedContextAMD; +extern PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC nwglCreateAssociatedContextAttribsAMD; +extern PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC nwglDeleteAssociatedContextAMD; +extern PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC nwglMakeAssociatedContextCurrentAMD; +extern PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC nwglGetCurrentAssociatedContextAMD; +extern PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC nwglBlitContextFramebufferAMD; + #elif defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) // Swap control extensions //=========================== -extern NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; +extern PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; -extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; +extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; -extern NEL_PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA; -extern NEL_PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA; +extern PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA; +extern PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA; #endif // GL_EXT_framebuffer_object -extern NEL_PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; -extern NEL_PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT; -extern NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT; -extern NEL_PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT; -extern NEL_PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT; -extern NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT; -extern NEL_PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT; -extern NEL_PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT; -extern NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT; -extern NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT; -extern NEL_PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT; -extern NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT; -extern NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT; -extern NEL_PFNGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT; +extern PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; +extern PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT; +extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT; +extern PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT; +extern PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT; +extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT; +extern PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT; +extern PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT; +extern PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT; +extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT; +extern PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT; +extern PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT; +extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT; +extern PFNGLGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT; // GL_EXT_framebuffer_blit -extern NEL_PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT; +extern PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT; // GL_EXT_framebuffer_multisample -extern NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT; // GL_ARB_multisample -extern NEL_PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB; +extern PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB; #endif // USE_OPENGLES diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index a11d0cd1c..03d071424 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -94,337 +94,11 @@ typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pnam // *************************************************************************** // *************************************************************************** -#define WGL_COVERAGE_SAMPLES_NV 0x2042 -#define WGL_COLOR_SAMPLES_NV 0x20B9 - -// ARB_multitexture -//================= -typedef void (APIENTRY * NEL_PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * NEL_PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - - -// ARB_TextureCompression. -//======================== -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); - - -// VertexArrayRangeNV. -//==================== -typedef void (APIENTRY * NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRY * NEL_PFNGLVERTEXARRAYRANGENVPROC) (GLsizei size, const GLvoid *pointer); - - -// FenceNV. -//==================== -typedef void (APIENTRY * NEL_PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRY * NEL_PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRY * NEL_PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRY * NEL_PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRY * NEL_PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRY * NEL_PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); - - -// VertexWeighting. -//================== -typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); - - -// VertexProgramExtension. -//======================== -typedef GLboolean (APIENTRY * NEL_PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRY * NEL_PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRY * NEL_PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRY * NEL_PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRY * NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRY * NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRY * NEL_PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRY * NEL_PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRY * NEL_PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRY * NEL_PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); - -// VertexShaderExtension (EXT) -//============================ -typedef void (APIENTRY * NEL_PFNGLBEGINVERTEXSHADEREXTPROC) ( void ); -typedef void (APIENTRY * NEL_PFNGLENDVERTEXSHADEREXTPROC) ( void ); -typedef void (APIENTRY * NEL_PFNGLBINDVERTEXSHADEREXTPROC) ( GLuint id ); -typedef GLuint (APIENTRY * NEL_PFNGLGENVERTEXSHADERSEXTPROC) ( GLuint range ); -typedef void (APIENTRY * NEL_PFNGLDELETEVERTEXSHADEREXTPROC) ( GLuint id ); -typedef void (APIENTRY * NEL_PFNGLSHADEROP1EXTPROC) ( GLenum op, GLuint res, GLuint arg1 ); -typedef void (APIENTRY * NEL_PFNGLSHADEROP2EXTPROC) ( GLenum op, GLuint res, GLuint arg1, GLuint arg2 ); -typedef void (APIENTRY * NEL_PFNGLSHADEROP3EXTPROC) ( GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3 ); -typedef void (APIENTRY * NEL_PFNGLSWIZZLEEXTPROC) ( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW ); -typedef void (APIENTRY * NEL_PFNGLWRITEMASKEXTPROC) ( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW ); -typedef void (APIENTRY * NEL_PFNGLINSERTCOMPONENTEXTPROC) ( GLuint res, GLuint src, GLuint num ); -typedef void (APIENTRY * NEL_PFNGLEXTRACTCOMPONENTEXTPROC) ( GLuint res, GLuint src, GLuint num ); -typedef GLuint (APIENTRY * NEL_PFNGLGENSYMBOLSEXTPROC) ( GLenum datatype, GLenum storagetype, GLenum range, GLuint components ) ; -typedef void (APIENTRY * NEL_PFNGLSETINVARIANTEXTPROC) ( GLuint id, GLenum type, void *addr ); -typedef void (APIENTRY * NEL_PFNGLSETLOCALCONSTANTEXTPROC) ( GLuint id, GLenum type, void *addr ); -typedef void (APIENTRY * NEL_PFNGLVARIANTPOINTEREXTPROC) ( GLuint id, GLenum type, GLuint stride, void *addr ); -typedef void (APIENTRY * NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) ( GLuint id); -typedef void (APIENTRY * NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) ( GLuint id); -typedef GLuint (APIENTRY * NEL_PFNGLBINDLIGHTPARAMETEREXTPROC) ( GLenum light, GLenum value); -typedef GLuint (APIENTRY * NEL_PFNGLBINDMATERIALPARAMETEREXTPROC) ( GLenum face, GLenum value); -typedef GLuint (APIENTRY * NEL_PFNGLBINDTEXGENPARAMETEREXTPROC) ( GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRY * NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) ( GLenum unit, GLenum value); -typedef GLuint (APIENTRY * NEL_PFNGLBINDPARAMETEREXTPROC) ( GLenum value); -typedef GLboolean (APIENTRY * NEL_PFNGLISVARIANTENABLEDEXTPROC) ( GLuint id, GLenum cap); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTPOINTERVEXTPROC) ( GLuint id, GLenum value, void **data); -typedef void (APIENTRY * NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * NEL_PFNGLGETINVARIANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * NEL_PFNGLGETINVARIANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data); - - -// SecondaryColor extension -//======================== -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); - - -// BlendColor extension -//======================== -typedef void (APIENTRY * NEL_PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - - -// GL_ATI_vertex_array_object extension -//======================== -typedef GLuint (APIENTRY * NEL_PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRY * NEL_PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRY * NEL_PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRY * NEL_PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRY * NEL_PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRY * NEL_PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); - - -// GL_ATI_fragment_shader extension -//================================== -typedef GLuint (APIENTRY *NEL_PFNGLGENFRAGMENTSHADERSATIPROC)(GLuint range); -typedef GLvoid (APIENTRY *NEL_PFNGLBINDFRAGMENTSHADERATIPROC)(GLuint id); -typedef GLvoid (APIENTRY *NEL_PFNGLDELETEFRAGMENTSHADERATIPROC)(GLuint id); -typedef GLvoid (APIENTRY *NEL_PFNGLBEGINFRAGMENTSHADERATIPROC)(); -typedef GLvoid (APIENTRY *NEL_PFNGLENDFRAGMENTSHADERATIPROC)(); -typedef GLvoid (APIENTRY *NEL_PFNGLPASSTEXCOORDATIPROC)(GLuint dst, GLuint coord, GLenum swizzle); -typedef GLvoid (APIENTRY *NEL_PFNGLSAMPLEMAPATIPROC)(GLuint dst, GLuint interp, GLenum swizzle); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, - GLuint arg2Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMask, - GLuint dstMod, GLuint arg1, GLuint arg1Rep, - GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, - GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, - GLuint arg3Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, - GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMod, - GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, - GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, - GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef GLvoid (APIENTRY *NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst, const GLfloat *value); - - - -// GL_ATI_map_object_buffer -//================================== -typedef void *(APIENTRY * NEL_PFNGLMAPOBJECTBUFFERATIPROC)(GLuint buffer); -typedef void (APIENTRY * NEL_PFNGLUNMAPOBJECTBUFFERATIPROC)(GLuint buffer); - - -// GL_ATI_vertex_attrib_array_object -//================================== - -typedef GLvoid (APIENTRY * NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef GLvoid (APIENTRY * NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC)(GLuint index, GLenum pname, GLfloat *params); -typedef GLvoid (APIENTRY * NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC)(GLuint index, GLenum pname, GLint *params); - - - - -// GL_ARB_fragment_program -//================================== -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMSTRINGARBPROC)(GLenum target, GLenum format, GLsizei len,const GLvoid *string); -typedef GLvoid (APIENTRY *NEL_PFNGLBINDPROGRAMARBPROC)(GLenum target, GLuint program); -typedef GLvoid (APIENTRY *NEL_PFNGLDELETEPROGRAMSARBPROC)(GLsizei n, const GLuint *programs); -typedef GLvoid (APIENTRY *NEL_PFNGLGENPROGRAMSARBPROC)(GLsizei n, GLuint *programs); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMIVARBPROC)(GLenum target, GLenum pname, int *params); -typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMSTRINGARBPROC)(GLenum target, GLenum pname, GLvoid *string); -typedef GLboolean (APIENTRY *NEL_PFNGLISPROGRAMARBPROC)(GLuint program); - - -typedef GLboolean (APIENTRY * NEL_PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef GLboolean (APIENTRY * NEL_PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef GLenum (APIENTRY * NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum pname); -typedef GLvoid (APIENTRY * NEL_PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLvoid (APIENTRY * NEL_PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef GLvoid (APIENTRY * NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef GLvoid (APIENTRY * NEL_PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef GLvoid (APIENTRY * NEL_PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef GLvoid (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef GLvoid (APIENTRY * NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef GLvoid (APIENTRY * NEL_PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef GLvoid (APIENTRY * NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef GLvoid (APIENTRY * NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLvoid (APIENTRY * NEL_PFNGENERATEMIPMAPEXTPROC) (GLenum target); - -typedef GLvoid (APIENTRY * NEL_PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); - -typedef GLvoid (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); - -#ifndef NL_GL_NV_occlusion_query -#define NL_GL_NV_occlusion_query 1 - -typedef GLvoid (APIENTRY * NEL_PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef GLvoid (APIENTRY * NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRY * NEL_PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef GLvoid (APIENTRY * NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef GLvoid (APIENTRY * NEL_PFNGLENDOCCLUSIONQUERYNVPROC) (); -typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); - -#endif /* GL_NV_occlusion_query */ - -#ifndef NL_GL_ARB_multisample -#define NL_GL_ARB_multisample 1 -typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); -#endif +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B #if defined(NL_OS_MAC) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp index 60109cfb6..79c55ea16 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp @@ -551,7 +551,7 @@ void CVertexArrayRangeATI::free() _HeapMemory.reset(); // Free special memory. - nglDeleteObjectBufferATI(_VertexObjectId); + nglFreeObjectBufferATI(_VertexObjectId); _Allocated= false; _VertexArraySize= 0; @@ -839,7 +839,7 @@ bool CVertexArrayRangeMapObjectATI::allocate(uint32 size, CVertexBuffer::TPrefer if (vertexObjectId) { // free the object - nglDeleteObjectBufferATI(vertexObjectId); + nglFreeObjectBufferATI(vertexObjectId); // _SizeAllocated = size; _VBType = vbType; @@ -924,7 +924,7 @@ CVertexBufferHardGLMapObjectATI::CVertexBufferHardGLMapObjectATI(CDriverGL *drv, CVertexBufferHardGLMapObjectATI::~CVertexBufferHardGLMapObjectATI() { H_AUTO_OGL(CVertexBufferHardGLMapObjectATI_CVertexBufferHardGLMapObjectATIDtor) - if (_VertexObjectId) nglDeleteObjectBufferATI(_VertexObjectId); + if (_VertexObjectId) nglFreeObjectBufferATI(_VertexObjectId); #ifdef NL_DEBUG if (_VertexPtr) { @@ -1114,7 +1114,7 @@ void CVertexArrayRangeMapObjectATI::updateLostBuffers() { nlassert((*it)->_VertexObjectId); nlassert(nglIsObjectBufferATI((*it)->_VertexObjectId)); - nglDeleteObjectBufferATI((*it)->_VertexObjectId); + nglFreeObjectBufferATI((*it)->_VertexObjectId); (*it)->_VertexObjectId = 0; (*it)->VB->setLocation(CVertexBuffer::NotResident); } From 741f806f16074aca52c68fea789f79305ab186aa Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 14:31:32 +0100 Subject: [PATCH 111/138] Changed: Optimize OpenGL driver PCH --- code/nel/src/3d/driver/opengl/stdopengl.h | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/stdopengl.h b/code/nel/src/3d/driver/opengl/stdopengl.h index 336f15f47..544829b19 100644 --- a/code/nel/src/3d/driver/opengl/stdopengl.h +++ b/code/nel/src/3d/driver/opengl/stdopengl.h @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +#ifndef STDOPENGL_H +#define STDOPENGL_H + #include "nel/misc/types_nl.h" #include @@ -67,5 +70,33 @@ #include "nel/misc/mem_stream.h" #include "nel/misc/time_nl.h" #include "nel/misc/command.h" +#include "nel/misc/matrix.h" +#include "nel/misc/smart_ptr.h" +#include "nel/misc/rgba.h" +#include "nel/misc/event_emitter.h" +#include "nel/misc/bit_set.h" +#include "nel/misc/hierarchical_timer.h" +#include "nel/misc/bitmap.h" +#include "nel/misc/heap_memory.h" +#include "nel/misc/event_emitter_multi.h" +#include "nel/misc/time_nl.h" +#include "nel/misc/rect.h" +#include "nel/misc/mouse_device.h" +#include "nel/misc/dynloadlib.h" +#include "nel/misc/file.h" #include "nel/3d/driver.h" +#include "nel/3d/material.h" +#include "nel/3d/vertex_buffer.h" +#include "nel/3d/ptr_set.h" +#include "nel/3d/texture_cube.h" +#include "nel/3d/vertex_program_parse.h" +#include "nel/3d/viewport.h" +#include "nel/3d/scissor.h" +#include "nel/3d/light.h" +#include "nel/3d/occlusion_query.h" +#include "nel/3d/u_driver.h" +#include "nel/3d/light.h" +#include "nel/3d/index_buffer.h" + +#endif From d7f7523bdf95e18822373bfa84a0d321277a2013 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 14:32:00 +0100 Subject: [PATCH 112/138] Changed: Use OpenGL ES functions prototypes from official headers --- .../opengl/driver_opengl_extension_def.h | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index 03d071424..4a627ef2e 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -25,44 +25,8 @@ extern "C" { #endif #ifdef USE_OPENGLES -// OES_mapbuffer -//============== -typedef void* (APIENTRY * NEL_PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRY * NEL_PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (APIENTRY * NEL_PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params); - -typedef void (APIENTRY * NEL_PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); - -// GL_OES_framebuffer_object -//================================== -typedef GLboolean (APIENTRY * NEL_PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); -typedef void (APIENTRY * NEL_PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRY * NEL_PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); -typedef void (APIENTRY * NEL_PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); -typedef void (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRY * NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); -typedef GLboolean (APIENTRY * NEL_PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); -typedef void (APIENTRY * NEL_PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRY * NEL_PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); -typedef void (APIENTRY * NEL_PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); -typedef GLenum (APIENTRY * NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); -typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRY * NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); -typedef void (APIENTRY * NEL_PFNGLGENERATEMIPMAPOESPROC) (GLenum target); - -// GL_OES_texture_cube_map -//================================== -typedef void (APIENTRY * NEL_PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRY * NEL_PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRY * NEL_PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRY * NEL_PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (APIENTRY * NEL_PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -typedef void (APIENTRY * NEL_PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRY * NEL_PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +// use same defines for OpenGL and OpenGL ES to simplify the code #define GL_MULTISAMPLE_ARB GL_MULTISAMPLE #define GL_TEXTURE_CUBE_MAP_ARB GL_TEXTURE_CUBE_MAP_OES #define GL_NONE 0 From 654583807cbe925f08dbb155908b1618d8b600af Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Mar 2014 14:34:07 +0100 Subject: [PATCH 113/138] Changed: Detect available video memory with OpenGL extensions --- .../driver/opengl/driver_opengl_extension.cpp | 80 +++++++++++++++++++ .../driver/opengl/driver_opengl_extension.h | 18 +++++ 2 files changed, 98 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index 9ee14ea6b..3ded67d62 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1474,6 +1474,22 @@ static bool setupPackedDepthStencil(const char *glext) return true; } +// *************************************************************************** +static bool setupNVXGPUMemoryInfo(const char *glext) +{ + H_AUTO_OGL(setupNVXGPUMemoryInfo); + CHECK_EXT("GL_NVX_gpu_memory_info"); + return true; +} + +// *************************************************************************** +static bool setupATIMeminfo(const char *glext) +{ + H_AUTO_OGL(setupATIMeminfo); + CHECK_EXT("GL_ATI_meminfo"); + return true; +} + // *************************************************************************** // Extension Check. void registerGlExtensions(CGlExtensions &ext) @@ -1689,6 +1705,35 @@ void registerGlExtensions(CGlExtensions &ext) ext.ATIMapObjectBuffer = false; ext.ATIVertexAttribArrayObject = false; } + +#ifndef USE_OPENGLES + ext.NVXGPUMemoryInfo = setupNVXGPUMemoryInfo(glext); + + if (ext.NVXGPUMemoryInfo) + { +// GPU_MEMORY_INFO_EVICTION_COUNT_NVX; +// GPU_MEMORY_INFO_EVICTED_MEMORY_NVX; + + GLint nDedicatedMemoryInKB = 0; + glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB); + + GLint nTotalMemoryInKB = 0; + glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB); + + GLint nCurAvailMemoryInKB = 0; + glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB); + + nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB); + } + + ext.ATIMeminfo = setupATIMeminfo(glext); + + if (ext.ATIMeminfo) + { + GLint nCurAvailMemoryInKB = 0; + glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &nCurAvailMemoryInKB); + } +#endif } @@ -1708,6 +1753,27 @@ static bool setupWGLEXTSwapControl(const char *glext) return true; } +// *************************************************************************** +static bool setupWGLAMDGPUAssociation(const char *glext) +{ + H_AUTO_OGL(setupWGLAMDGPUAssociation); + CHECK_EXT("WGL_AMD_gpu_association"); + +#if !defined(USE_OPENGLES) && defined(NL_OS_WINDOWS) + CHECK_ADDRESS(PFNWGLGETGPUIDSAMDPROC, wglGetGPUIDsAMD); + CHECK_ADDRESS(PFNWGLGETGPUINFOAMDPROC, wglGetGPUInfoAMD); + CHECK_ADDRESS(PFNWGLGETCONTEXTGPUIDAMDPROC, wglGetContextGPUIDAMD); + CHECK_ADDRESS(PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC, wglCreateAssociatedContextAMD); + CHECK_ADDRESS(PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC, wglCreateAssociatedContextAttribsAMD); + CHECK_ADDRESS(PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC, wglDeleteAssociatedContextAMD); + CHECK_ADDRESS(PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC, wglMakeAssociatedContextCurrentAMD); + CHECK_ADDRESS(PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC, wglGetCurrentAssociatedContextAMD); + CHECK_ADDRESS(PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC, wglBlitContextFramebufferAMD); +#endif + + return true; +} + // ********************************* static bool setupGLXEXTSwapControl(const char *glext) { @@ -1820,6 +1886,20 @@ bool registerWGlExtensions(CGlExtensions &ext, HDC hDC) // Check for swap control ext.WGLEXTSwapControl= setupWGLEXTSwapControl(glext); + ext.WGLAMDGPUAssociation = setupWGLAMDGPUAssociation(glext); + + if (ext.WGLAMDGPUAssociation) + { + GLuint uNoOfGPUs = nwglGetGPUIDsAMD(0, 0); + GLuint *uGPUIDs = new GLuint[uNoOfGPUs]; + nwglGetGPUIDsAMD(uNoOfGPUs, uGPUIDs); + + GLuint uTotalMemoryInMB = 0; + nwglGetGPUInfoAMD(uGPUIDs[0], WGL_GPU_RAM_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &uTotalMemoryInMB); + + delete [] uGPUIDs; + } + return true; } #elif defined(NL_OS_MAC) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index 7a20d6896..938473029 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -109,6 +109,17 @@ struct CGlExtensions bool OESDrawTexture; bool OESMapBuffer; + // extensions to get memory info + + // GL_NVX_gpu_memory_info + bool NVXGPUMemoryInfo; + + // GL_ATI_meminfo + bool ATIMeminfo; + + // WGL_AMD_gpu_association + bool WGLAMDGPUAssociation; + public: /// \name Disable Hardware feature. False by default. setuped by IDriver @@ -175,6 +186,10 @@ public: OESDrawTexture = false; OESMapBuffer = false; + NVXGPUMemoryInfo = false; + ATIMeminfo = false; + WGLAMDGPUAssociation = false; + /// \name Disable Hardware feature. False by default. setuped by IDriver DisableHardwareVertexProgram= false; DisableHardwarePixelProgram= false; @@ -224,12 +239,15 @@ public: result += NVOcclusionQuery ? "NVOcclusionQuery " : ""; result += NVStateVARWithoutFlush ? "NVStateVARWithoutFlush " : ""; result += ARBMultisample ? "ARBMultisample " : ""; + result += NVXGPUMemoryInfo ? "NVXGPUMemoryInfo " : ""; + result += ATIMeminfo ? "ATIMeminfo " : ""; #ifdef NL_OS_WINDOWS result += "\n WindowsGL: "; result += WGLARBPBuffer ? "WGLARBPBuffer " : ""; result += WGLARBPixelFormat ? "WGLARBPixelFormat " : ""; result += WGLEXTSwapControl ? "WGLEXTSwapControl " : ""; + result += WGLAMDGPUAssociation ? "WGLAMDGPUAssociation " : ""; #elif defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) result += "\n GLX: "; From ccd5355f48f8ac72d414d0994ab9a74b3ccf10a9 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Thu, 27 Mar 2014 16:50:26 +0530 Subject: [PATCH 114/138] changed hardcoded location of ams_lib with location difined in configuration --- code/ryzom/tools/server/ryzom_ams/www/html/index.php | 2 +- .../tools/server/ryzom_ams/www/html/installer/libsetup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/index.php b/code/ryzom/tools/server/ryzom_ams/www/html/index.php index faf3488c6..e93ca5be5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/index.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/index.php @@ -13,7 +13,6 @@ //load required pages and turn error reporting on/off error_reporting(E_ALL); ini_set('display_errors', 'on'); -require_once( '../../ams_lib/libinclude.php' ); if (!file_exists('../is_installed')) { //if is_installed doesnt exist run setup require( 'installer/libsetup.php' ); @@ -24,6 +23,7 @@ if (!file_exists('../is_installed')) { //if config exists then include it require( '../config.php' ); } +require_once( $AMS_LIB'/libinclude.php' ); session_start(); //Running Cron? diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 932d6d2db..206cce4fe 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -34,7 +34,7 @@ if (!isset($_POST['function'])) { //require the pages that are being needed. require_once( '../config.default.php' ); - require_once( '../../ams_lib/libinclude.php' ); + require_once( $AMS_LIB.'/libinclude.php' ); ini_set( "display_errors", true ); error_reporting( E_ALL ); From c159b13f5b093327de130450320e9431a5f39cc4 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 13:03:38 +0100 Subject: [PATCH 116/138] Fixed: Used code being removed by -Wl,-x on Mac OS X --- 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 e88465ae2..b194b5ff9 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -889,7 +889,7 @@ MACRO(NL_SETUP_BUILD) SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g") ELSE(WITH_SYMBOLS) IF(APPLE) - SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip -Wl,-x ${NL_RELEASE_LINKFLAGS}") + SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}") ELSE(APPLE) SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}") ENDIF(APPLE) From 4b89a890049ee0cf1d51553eb283a60407412c45 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 13:39:16 +0100 Subject: [PATCH 117/138] Changed: Updated OpenGL headers --- code/nel/src/3d/driver/opengl/GL/glext.h | 111 ++++++++++++++++++++-- code/nel/src/3d/driver/opengl/GL/glxext.h | 42 +++++++- code/nel/src/3d/driver/opengl/GL/wglext.h | 6 +- 3 files changed, 143 insertions(+), 16 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/GL/glext.h b/code/nel/src/3d/driver/opengl/GL/glext.h index e70266447..0ecf2b867 100644 --- a/code/nel/src/3d/driver/opengl/GL/glext.h +++ b/code/nel/src/3d/driver/opengl/GL/glext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2013 The Khronos Group Inc. +** Copyright (c) 2013-2014 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -33,7 +33,7 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 23855 $ on $Date: 2013-11-02 22:54:48 -0700 (Sat, 02 Nov 2013) $ +** Khronos $Revision: 26007 $ on $Date: 2014-03-19 01:28:09 -0700 (Wed, 19 Mar 2014) $ */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) @@ -53,7 +53,7 @@ extern "C" { #define GLAPI extern #endif -#define GL_GLEXT_VERSION 20131102 +#define GL_GLEXT_VERSION 20140319 /* Generated C header for: * API: gl @@ -1485,7 +1485,7 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum atta typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); @@ -1505,7 +1505,7 @@ GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLui GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); +GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); #endif #endif /* GL_VERSION_3_2 */ @@ -2144,6 +2144,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data) #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); @@ -2432,6 +2436,7 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum #define GL_VERTEX_BINDING_STRIDE 0x82D8 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_VERTEX_BINDING_BUFFER 0x8F4F #define GL_DISPLAY_LIST 0x82E7 typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); @@ -4836,6 +4841,20 @@ GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); #endif #endif /* GL_AMD_name_gen_delete */ +#ifndef GL_AMD_occlusion_query_event +#define GL_AMD_occlusion_query_event 1 +#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F +#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 +#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 +#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 +#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 +#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); +#endif +#endif /* GL_AMD_occlusion_query_event */ + #ifndef GL_AMD_performance_monitor #define GL_AMD_performance_monitor 1 #define GL_COUNTER_TYPE_AMD 0x8BC0 @@ -6163,7 +6182,7 @@ typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintp typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); @@ -6419,7 +6438,7 @@ GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, G GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); @@ -7062,6 +7081,10 @@ GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *strin #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #endif /* GL_EXT_separate_specular_color */ +#ifndef GL_EXT_shader_image_load_formatted +#define GL_EXT_shader_image_load_formatted 1 +#endif /* GL_EXT_shader_image_load_formatted */ + #ifndef GL_EXT_shader_image_load_store #define GL_EXT_shader_image_load_store 1 #define GL_MAX_IMAGE_UNITS_EXT 0x8F38 @@ -8108,6 +8131,52 @@ GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void #endif #endif /* GL_INTEL_parallel_arrays */ +#ifndef GL_INTEL_performance_query +#define GL_INTEL_performance_query 1 +#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +#define GL_PERFQUERY_WAIT_INTEL 0x83FB +#define GL_PERFQUERY_FLUSH_INTEL 0x83FA +#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); +typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); +typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); +typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); +typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); +GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); +GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); +GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); +GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); +GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +#endif +#endif /* GL_INTEL_performance_query */ + #ifndef GL_MESAX_texture_stack #define GL_MESAX_texture_stack 1 #define GL_TEXTURE_1D_STACK_MESAX 0x8759 @@ -8202,6 +8271,15 @@ GLAPI void APIENTRY glEndConditionalRenderNVX (void); #endif #endif /* GL_NVX_conditional_render */ +#ifndef GL_NVX_gpu_memory_info +#define GL_NVX_gpu_memory_info 1 +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B +#endif /* GL_NVX_gpu_memory_info */ + #ifndef GL_NV_bindless_multi_draw_indirect #define GL_NV_bindless_multi_draw_indirect 1 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); @@ -8248,6 +8326,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_NV_blend_equation_advanced 1 #define GL_BLEND_OVERLAP_NV 0x9281 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 #define GL_COLORBURN_NV 0x929A #define GL_COLORDODGE_NV 0x9299 #define GL_CONJOINT_NV 0x9284 @@ -8261,6 +8340,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_DST_OUT_NV 0x928D #define GL_DST_OVER_NV 0x9289 #define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 #define GL_HARDLIGHT_NV 0x929B #define GL_HARDMIX_NV 0x92A9 #define GL_HSL_COLOR_NV 0x92AF @@ -8282,6 +8362,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_PLUS_CLAMPED_NV 0x92B1 #define GL_PLUS_DARKER_NV 0x9292 #define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 #define GL_SCREEN_NV 0x9295 #define GL_SOFTLIGHT_NV 0x929C #define GL_SRC_ATOP_NV 0x928E @@ -8291,6 +8372,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_SRC_OVER_NV 0x9288 #define GL_UNCORRELATED_NV 0x9282 #define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); #ifdef GL_GLEXT_PROTOTYPES @@ -9350,6 +9432,17 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs #define GL_NV_shader_storage_buffer_object 1 #endif /* GL_NV_shader_storage_buffer_object */ +#ifndef GL_NV_shader_thread_group +#define GL_NV_shader_thread_group 1 +#define GL_WARP_SIZE_NV 0x9339 +#define GL_WARPS_PER_SM_NV 0x933A +#define GL_SM_COUNT_NV 0x933B +#endif /* GL_NV_shader_thread_group */ + +#ifndef GL_NV_shader_thread_shuffle +#define GL_NV_shader_thread_shuffle 1 +#endif /* GL_NV_shader_thread_shuffle */ + #ifndef GL_NV_tessellation_program5 #define GL_NV_tessellation_program5 1 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 @@ -9625,7 +9718,7 @@ typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); @@ -9636,7 +9729,7 @@ GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAdd GLAPI void APIENTRY glVDPAUFiniNV (void); GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); diff --git a/code/nel/src/3d/driver/opengl/GL/glxext.h b/code/nel/src/3d/driver/opengl/GL/glxext.h index c81ab4d5c..6236d9244 100644 --- a/code/nel/src/3d/driver/opengl/GL/glxext.h +++ b/code/nel/src/3d/driver/opengl/GL/glxext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2013 The Khronos Group Inc. +** Copyright (c) 2013-2014 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -33,10 +33,10 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 23730 $ on $Date: 2013-10-28 15:16:34 -0700 (Mon, 28 Oct 2013) $ +** Khronos $Revision: 25923 $ on $Date: 2014-03-17 03:54:56 -0700 (Mon, 17 Mar 2014) $ */ -#define GLX_GLXEXT_VERSION 20131028 +#define GLX_GLXEXT_VERSION 20140317 /* Generated C header for: * API: glx @@ -49,6 +49,7 @@ extern "C" { #ifndef GLX_VERSION_1_3 #define GLX_VERSION_1_3 1 +typedef XID GLXContextID; typedef struct __GLXFBConfigRec *GLXFBConfig; typedef XID GLXWindow; typedef XID GLXPbuffer; @@ -272,7 +273,6 @@ __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); #ifndef GLX_EXT_import_context #define GLX_EXT_import_context 1 -typedef XID GLXContextID; #define GLX_SHARE_CONTEXT_EXT 0x800A #define GLX_VISUAL_ID_EXT 0x800B #define GLX_SCREEN_EXT 0x800C @@ -407,6 +407,32 @@ GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixm #endif #endif /* GLX_MESA_pixmap_colormap */ +#ifndef GLX_MESA_query_renderer +#define GLX_MESA_query_renderer 1 +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 +#define GLX_RENDERER_DEVICE_ID_MESA 0x8184 +#define GLX_RENDERER_VERSION_MESA 0x8185 +#define GLX_RENDERER_ACCELERATED_MESA 0x8186 +#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187 +#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188 +#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189 +#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A +#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B +#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C +#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D +#define GLX_RENDERER_ID_MESA 0x818E +typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute); +typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value); +const char *glXQueryCurrentRendererStringMESA (int attribute); +Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute); +#endif +#endif /* GLX_MESA_query_renderer */ + #ifndef GLX_MESA_release_buffers #define GLX_MESA_release_buffers 1 typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); @@ -433,6 +459,14 @@ void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLe #endif #endif /* GLX_NV_copy_image */ +#ifndef GLX_NV_delay_before_swap +#define GLX_NV_delay_before_swap 1 +typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds); +#endif +#endif /* GLX_NV_delay_before_swap */ + #ifndef GLX_NV_float_buffer #define GLX_NV_float_buffer 1 #define GLX_FLOAT_COMPONENTS_NV 0x20B0 diff --git a/code/nel/src/3d/driver/opengl/GL/wglext.h b/code/nel/src/3d/driver/opengl/GL/wglext.h index 783e53d84..e33232fa5 100644 --- a/code/nel/src/3d/driver/opengl/GL/wglext.h +++ b/code/nel/src/3d/driver/opengl/GL/wglext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2013 The Khronos Group Inc. +** Copyright (c) 2013-2014 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -33,7 +33,7 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 23730 $ on $Date: 2013-10-28 15:16:34 -0700 (Mon, 28 Oct 2013) $ +** Khronos $Revision: 25923 $ on $Date: 2014-03-17 03:54:56 -0700 (Mon, 17 Mar 2014) $ */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) @@ -41,7 +41,7 @@ extern "C" { #include #endif -#define WGL_WGLEXT_VERSION 20131028 +#define WGL_WGLEXT_VERSION 20140317 /* Generated C header for: * API: wgl From 0d98d8d0b36ce6ec5b71106fbbba30784d325a8f Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 13:39:46 +0100 Subject: [PATCH 118/138] Changed: Removed useless definitions --- .../opengl/driver_opengl_extension_def.h | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index 4a627ef2e..41d2c1366 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -50,20 +50,6 @@ extern "C" { #else -// *************************************************************************** -// *************************************************************************** -// The NEL Functions Typedefs. -// Must do it for compatibilities with futures version of gl.h -// eg: version 1.2 does not define PFNGLACTIVETEXTUREARBPROC. Hence, do it now, with our special name -// *************************************************************************** -// *************************************************************************** - -#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 -#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 -#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 -#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A -#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B - #if defined(NL_OS_MAC) // Mac GL extensions @@ -71,18 +57,6 @@ extern "C" { #elif defined(NL_OS_UNIX) // GLX extensions -#ifndef NL_GLX_EXT_swap_control -#define NL_GLX_EXT_swap_control 1 - -#ifndef GLX_EXT_swap_control -#define GLX_SWAP_INTERVAL_EXT 0x20F1 -#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 -#endif - -typedef GLint (APIENTRY * NEL_PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, GLint interval); - -#endif // NL_GLX_EXT_swap_control - #ifndef NL_GLX_MESA_swap_control #define NL_GLX_MESA_swap_control 1 From bce1d66c075364c14f160bf08f133e37d27d3128 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 13:40:22 +0100 Subject: [PATCH 119/138] Fixed: Typo detected by clang --- .../ryzom/client/src/interface_v3/bot_chat_page_ring_sessions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_ring_sessions.h b/code/ryzom/client/src/interface_v3/bot_chat_page_ring_sessions.h index 5c9a492c5..2839cc775 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_ring_sessions.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_ring_sessions.h @@ -15,7 +15,7 @@ // along with this program. If not, see . #ifndef CL_BOT_CHAT_PAGE_RING_SESSIONS_H -#define CL_BOT_CHAT_PAGE_RING_SSSIONS_H +#define CL_BOT_CHAT_PAGE_RING_SESSIONS_H #include "bot_chat_page.h" #include "../entity_cl.h" From 479f31ef3bdd5296556b0ed18c79b5eb002b4d2d Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 15:50:58 +0100 Subject: [PATCH 120/138] Fixed: Warnings with clang: wrong ! and == operators order --- code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp | 2 +- code/ryzom/client/src/game_context_menu.cpp | 4 ++-- code/ryzom/client/src/r2/editor.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp index 6df62dfc3..c71e82ce4 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp @@ -1809,7 +1809,7 @@ void CDriverGL::fenceOnCurVBHardIfNeeded(IVertexBufferHardGL *newVBHard) #ifndef USE_OPENGLES // If old is not a VBHard, or if not a NVidia VBHard, no-op. - if( _CurrentVertexBufferHard==NULL || !_CurrentVertexBufferHard->VBType == IVertexBufferHardGL::NVidiaVB) + if( _CurrentVertexBufferHard==NULL || _CurrentVertexBufferHard->VBType != IVertexBufferHardGL::NVidiaVB) return; // if we do not activate the same (NB: newVBHard==NULL if not a VBHard). diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index 852d90931..9cf2e0e64 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -473,7 +473,7 @@ void CGameContextMenu::update() // Action possible only if the client is not already busy and the selection is able to do this with you.. _TextFollow->setActive( selection && - (! selection->slot() == UserEntity->slot()) && + (selection->slot() != UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false) && (((availablePrograms & (1 << BOTCHATTYPE::DontFollow)) == 0))); @@ -484,7 +484,7 @@ void CGameContextMenu::update() if(_TextAssist) { // Action possible only if the client is not already busy and the selection is able to do this with you.. - _TextAssist->setActive(!R2::getEditor().isDMing() && selection && (! selection->slot() == UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false)); + _TextAssist->setActive(!R2::getEditor().isDMing() && selection && (selection->slot() != UserEntity->slot()) && (!selection->isForageSource()) && (selection->isDead()==false)); // See also below for mount/packer } diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index c27001140..bb09bec52 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -206,14 +206,14 @@ CDynamicMapClient(eid, clientGateway, luaState) void CDynamicMapClientEventForwarder::nodeErased(const std::string& instanceId, const std::string& attrName, sint32 position) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeErased) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeErased(instanceId, attrName, position); } void CDynamicMapClientEventForwarder::nodeSet(const std::string& instanceId, const std::string& attrName, CObject* value) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeSet) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeSet(instanceId, attrName, value); } @@ -221,7 +221,7 @@ void CDynamicMapClientEventForwarder::nodeInserted(const std::string& instanceId const std::string& key, CObject* value) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeInserted) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeInserted(instanceId, attrName, position, key, value); } @@ -230,14 +230,14 @@ void CDynamicMapClientEventForwarder::nodeMoved( const std::string& destInstanceId, const std::string& destAttrName, sint32 destPosition) { //H_AUTO(R2_CDynamicMapClientEventForwarder_nodeMoved) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().nodeMoved(instanceId, attrName, position, destInstanceId, destAttrName, destPosition); } void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialActIndex) { //H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated) - if (!getEditor().getMode() == CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode) return; getEditor().scenarioUpdated(highLevel, willTP, initialActIndex); } From 4e755833ea8f84f0967d11514b34fb2e6889a97d Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 15:51:20 +0100 Subject: [PATCH 121/138] Fixed: Wrong header guard warning --- code/ryzom/client/src/interface_v3/interface_options_ryzom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/interface_options_ryzom.h b/code/ryzom/client/src/interface_v3/interface_options_ryzom.h index 8862eaea6..ebce72956 100644 --- a/code/ryzom/client/src/interface_v3/interface_options_ryzom.h +++ b/code/ryzom/client/src/interface_v3/interface_options_ryzom.h @@ -16,7 +16,7 @@ #ifndef IF_OPTIONS_RZ -#define IP_OPTIONS_RZ +#define IF_OPTIONS_RZ #include "nel/gui/interface_options.h" From b118643bbd08064287f14aba58988851bd62c849 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 27 Mar 2014 16:34:55 +0100 Subject: [PATCH 123/138] Changed: Aligned methods names --- code/nel/include/nel/3d/skeleton_shape.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/3d/skeleton_shape.h b/code/nel/include/nel/3d/skeleton_shape.h index 52a7c9e62..a47be7f17 100644 --- a/code/nel/include/nel/3d/skeleton_shape.h +++ b/code/nel/include/nel/3d/skeleton_shape.h @@ -88,7 +88,7 @@ public: /** return the bounding box of the shape. Default is to return Null bbox. */ - virtual void getAABBox(NLMISC::CAABBox &bbox) const; + virtual void getAABBox(NLMISC::CAABBox &bbox) const; /// get an approximation of the number of triangles this instance will render for a fixed distance. virtual float getNumTriangles (float distance); @@ -98,7 +98,7 @@ public: NLMISC_DECLARE_CLASS(CSkeletonShape); /// flush textures used by this shape. - virtual void flushTextures (IDriver &/* driver */, uint /* selectedTexture */) {} + virtual void flushTextures (IDriver &/* driver */, uint /* selectedTexture */) {} // @} From 9edd54c4463d98e50800f93104050116ce00fc1f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 1 Apr 2014 13:14:44 +0200 Subject: [PATCH 125/138] Add interface for HMD with player death support --- code/nel/include/nel/3d/stereo_display.h | 1 + code/nel/include/nel/3d/stereo_ng_hmd.h | 62 +++++++++++++++++++ code/nel/src/3d/CMakeLists.txt | 2 + code/nel/src/3d/stereo_ng_hmd.cpp | 55 ++++++++++++++++ code/ryzom/client/src/global.cpp | 1 + code/ryzom/client/src/global.h | 2 + code/ryzom/client/src/init.cpp | 8 ++- .../client/src/motion/modes/death_mode.cpp | 7 +++ code/ryzom/client/src/release.cpp | 1 + 9 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 code/nel/include/nel/3d/stereo_ng_hmd.h create mode 100644 code/nel/src/3d/stereo_ng_hmd.cpp diff --git a/code/nel/include/nel/3d/stereo_display.h b/code/nel/include/nel/3d/stereo_display.h index 3b9c73b74..570a62739 100644 --- a/code/nel/include/nel/3d/stereo_display.h +++ b/code/nel/include/nel/3d/stereo_display.h @@ -60,6 +60,7 @@ public: { StereoDisplay, StereoHMD, + StereoNGHMD, }; enum TStereoDeviceLibrary diff --git a/code/nel/include/nel/3d/stereo_ng_hmd.h b/code/nel/include/nel/3d/stereo_ng_hmd.h new file mode 100644 index 000000000..1ab8ad144 --- /dev/null +++ b/code/nel/include/nel/3d/stereo_ng_hmd.h @@ -0,0 +1,62 @@ +/** + * \file stereo_ng_hmd.h + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ + +/* + * Copyright (C) 2014 by authors + * + * This file is part of NL3D. + * NL3D 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. + * + * NL3D 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 NL3D. If not, see + * . + */ + +#ifndef NL3D_STEREO_NG_HMD_H +#define NL3D_STEREO_NG_HMD_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include + +namespace NL3D { + +/** + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ +class IStereoNGHMD : public IStereoHMD +{ +public: + IStereoNGHMD(); + virtual ~IStereoNGHMD(); + + /// Kill the player + virtual void killUser() const = 0; + +}; /* class IStereoNGHMD */ + +} /* namespace NL3D */ + +#endif /* #ifndef NL3D_STEREO_NG_HMD_H */ + +/* end of file */ diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index fff343915..d614029f7 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -697,6 +697,8 @@ SOURCE_GROUP(Stereo FILES ../../include/nel/3d/stereo_display.h stereo_hmd.cpp ../../include/nel/3d/stereo_hmd.h + stereo_ng_hmd.cpp + ../../include/nel/3d/stereo_ng_hmd.h stereo_ovr.cpp stereo_ovr_fp.cpp ../../include/nel/3d/stereo_ovr.h diff --git a/code/nel/src/3d/stereo_ng_hmd.cpp b/code/nel/src/3d/stereo_ng_hmd.cpp new file mode 100644 index 000000000..1011b33e4 --- /dev/null +++ b/code/nel/src/3d/stereo_ng_hmd.cpp @@ -0,0 +1,55 @@ +/** + * \file stereo_hmd.cpp + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ + +/* + * Copyright (C) 2014 by authors + * + * This file is part of NL3D. + * NL3D 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. + * + * NL3D 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 NL3D. If not, see + * . + */ + +#include +#include + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace NL3D { + +IStereoNGHMD::IStereoNGHMD() +{ + +} + +IStereoNGHMD::~IStereoNGHMD() +{ + +} + +} /* namespace NL3D */ + +/* end of file */ diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index c965db43f..ac15aafbc 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -28,6 +28,7 @@ using namespace NLMISC; NL3D::UDriver *Driver = 0; // The main 3D Driver NL3D::IStereoDisplay *StereoDisplay = NULL; // Stereo display NL3D::IStereoHMD *StereoHMD = NULL; // Head mount display +NL3D::IStereoNGHMD *StereoNGHMD = NULL; // HMD with player death support CSoundManager *SoundMngr = 0; // the sound manager NL3D::UMaterial GenericMat; // Generic Material NL3D::UTextContext *TextContext = 0; // Context for all the text in the client. diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 5879eeaec..28f98a3a9 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -42,6 +42,7 @@ namespace NL3D class UWaterEnvMap; class IStereoDisplay; class IStereoHMD; + class IStereoNGHMD; } class CEntityAnimationManager; @@ -81,6 +82,7 @@ const float ExtraZoneLoadingVision = 100.f; extern NL3D::UDriver *Driver; // The main 3D Driver extern NL3D::IStereoDisplay *StereoDisplay; // Stereo display extern NL3D::IStereoHMD *StereoHMD; // Head mount display +extern NL3D::IStereoNGHMD *StereoNGHMD; // HMD with player death support extern CSoundManager *SoundMngr; // the sound manager extern NL3D::UMaterial GenericMat; // Generic Material extern NL3D::UTextContext *TextContext; // Context for all the text in the client. diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index d603be4a3..d0a64b0a4 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -40,6 +40,7 @@ #include "nel/3d/u_text_context.h" #include "nel/3d/u_shape_bank.h" #include "nel/3d/stereo_hmd.h" +#include "nel/3d/stereo_ng_hmd.h" // Net. #include "nel/net/email.h" // Ligo. @@ -639,10 +640,15 @@ void initStereoDisplayDevice() StereoDisplay = IStereoDisplay::createDevice(*deviceInfo); if (StereoDisplay) { - if (deviceInfo->Class == CStereoDeviceInfo::StereoHMD) + if (deviceInfo->Class == CStereoDeviceInfo::StereoHMD + || deviceInfo->Class == CStereoDeviceInfo::StereoNGHMD) { nlinfo("VR [C]: Stereo display device is a HMD"); StereoHMD = static_cast(StereoDisplay); + if (deviceInfo->Class == CStereoDeviceInfo::StereoNGHMD) + { + StereoNGHMD = static_cast(StereoDisplay); + } } if (Driver) // VR_DRIVER { diff --git a/code/ryzom/client/src/motion/modes/death_mode.cpp b/code/ryzom/client/src/motion/modes/death_mode.cpp index cd987b635..4e39f394f 100644 --- a/code/ryzom/client/src/motion/modes/death_mode.cpp +++ b/code/ryzom/client/src/motion/modes/death_mode.cpp @@ -21,6 +21,9 @@ // INCLUDES // ////////////// #include "stdpch.h" + +#include "nel/3d/stereo_ng_hmd.h" + // Client. #include "../../input.h" #include "../user_controls.h" @@ -28,6 +31,7 @@ #include "../../view.h" #include "../../interface_v3/interface_manager.h" #include "../../entities.h" +#include "global.h" /////////// @@ -61,6 +65,9 @@ void CUserControls::deathModeStart() _InternalView = false; // Show/hide all or parts of the user body (after _InternaView is set). UserEntity->updateVisualDisplay(); + // Kill the player + if (StereoNGHMD) + StereoNGHMD->killUser(); }// deathModeStart // //----------------------------------------------- diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index b40d68b35..b8f34c277 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -519,6 +519,7 @@ void releaseStereoDisplayDevice() delete StereoDisplay; StereoDisplay = NULL; StereoHMD = NULL; + StereoNGHMD = NULL; } IStereoDisplay::releaseAllLibraries(); } From 7af85d6f2f203dad5e7f4d960d35dff0c0228242 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 1 Apr 2014 13:52:36 +0200 Subject: [PATCH 126/138] Add command to eternally trap players ingame --- code/ryzom/client/src/global.cpp | 2 ++ code/ryzom/client/src/global.h | 2 ++ .../client/src/interface_v3/interface_manager.cpp | 13 +++++++++++++ code/ryzom/client/src/net_manager.cpp | 9 +++++++++ code/ryzom/common/data_common/msg.xml | 4 ++-- 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index ac15aafbc..29db04f5e 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -69,6 +69,8 @@ bool PermanentlyBanned = false; bool IgnoreEntityDbUpdates = false; bool FreeTrial = false; +bool NoLogout = false; + std::vector > VRDeviceCache; diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 28f98a3a9..f22f786d6 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -130,6 +130,8 @@ extern std::string Cookie, FSAddr; extern std::string RingMainURL; extern bool FreeTrial; +extern bool NoLogout; + void resetTextContext (const char *font, bool resetInterfaceManager); #endif // CL_GLOBAL_H diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 8a70e10fd..df2cb0376 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1089,6 +1089,7 @@ void CInterfaceManager::configureQuitDialogBox() // Show Launch Editor if not in editor mode CInterfaceElement *eltCancel = quitDlg->getElement(quitDialogStr+":cancel"); CInterfaceElement *eltEdit = quitDlg->getElement(quitDialogStr+":launch_editor"); + if (eltEdit) { if (UserRoleInSession != R2::TUserRole::ur_editor && !sessionOwner) @@ -1159,6 +1160,18 @@ void CInterfaceManager::configureQuitDialogBox() eltQuitNow->setActive(false); } } + + if (NoLogout) + { + eltEdit->setY(0); + eltEdit->setActive(false); + eltQuit->setY(0); + eltQuit->setActive(false); + eltQuitNow->setY(0); + eltQuitNow->setActive(false); + eltRet->setY(0); + eltRet->setActive(false); + } } // Make all controls have the same size diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 1eedc16c5..487e05358 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3555,6 +3555,13 @@ void impulseSetNpcIconTimer(NLMISC::CBitMemStream &impulse) CNPCIconCache::getInstance().setMissionGiverTimer(delay); } +void impulseEventDisableLogoutButton(NLMISC::CBitMemStream &impulse) +{ + NoLogout = true; + CInterfaceManager *im = CInterfaceManager::getInstance(); + im->configureQuitDialogBox(); +} + //----------------------------------------------- // initializeNetwork : //----------------------------------------------- @@ -3704,6 +3711,8 @@ void initializeNetwork() GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_DESC", impulseSetNpcIconDesc ); GenericMsgHeaderMngr.setCallback( "NPC_ICON:SVR_EVENT_MIS_AVL", impulseServerEventForMissionAvailability ); GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_TIMER", impulseSetNpcIconTimer ); + + GenericMsgHeaderMngr.setCallback( "EVENT:DISABLE_LOGOUT_BUTTON", impulseEventDisableLogoutButton ); } diff --git a/code/ryzom/common/data_common/msg.xml b/code/ryzom/common/data_common/msg.xml index 3fa75650e..9ae6fab16 100644 --- a/code/ryzom/common/data_common/msg.xml +++ b/code/ryzom/common/data_common/msg.xml @@ -1111,8 +1111,8 @@ sendto="EGS" format="u32 u32 uc" description="set the cursom of the item in inventory $inventory in slot $slot to $text" /> - + Date: Tue, 1 Apr 2014 13:54:39 +0200 Subject: [PATCH 127/138] Bugfix: Kill users who attempt to escape the game --- code/ryzom/client/src/release.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index b8f34c277..cdf5dbcb5 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -36,6 +36,7 @@ #include "nel/3d/u_visual_collision_manager.h" #include "nel/3d/u_shape_bank.h" #include "nel/3d/stereo_hmd.h" +#include "nel/3d/stereo_ng_hmd.h" // Client #include "global.h" #include "release.h" @@ -516,6 +517,9 @@ void releaseStereoDisplayDevice() { if (StereoDisplay) { + if (NoLogout && StereoNGHMD) + StereoNGHMD->killUser(); + delete StereoDisplay; StereoDisplay = NULL; StereoHMD = NULL; From 2277f6fbcb4ffad759ff5e8997b946f8467181db Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 7 Apr 2014 06:27:15 -0700 Subject: [PATCH 128/138] missed a ../ --- .../tools/server/ryzom_ams/www/html/installer/libsetup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 98da6a309..597d6b9ab 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -6,7 +6,7 @@ */ //set permissions - if(is_writable('../../../www/login/logs')) { + if(is_writable('../../../../www/login/logs')) { echo "failed to get write permissions on logs"; exit; } From 5e61238b6c9630da6c30ac4d03255d897af9a577 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 7 Apr 2014 06:29:44 -0700 Subject: [PATCH 129/138] missed it on all of them --- .../server/ryzom_ams/www/html/installer/libsetup.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index f152f9ebb..7abf8e397 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -10,23 +10,23 @@ echo "failed to get write permissions on logs"; exit; } - if(is_writable('../../../admin/graphs_output')) { + if(is_writable('../../../../admin/graphs_output')) { echo "failed to get write permissions on graphs_output"; exit; } - if(is_writable('../../../admin/templates/default_c')) { + if(is_writable('../../../../admin/templates/default_c')) { echo "failed to get write permissions on default_c"; exit; } - if(is_writable('../../www')) { + if(is_writable('../../../www')) { echo "failed to get write permissions on www"; exit; } - if(is_writable('../../www/html/cache')) { + if(is_writable('../../../www/html/cache')) { echo "failed to get write permissions on cache"; exit; } - if(is_writable('../../www/html/templates_c')) { + if(is_writable('../../../www/html/templates_c')) { echo "failed to get write permissions on templates_c"; exit; } From 23209d173521043471d2a3f0386d32549a83a6d5 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 7 Apr 2014 06:35:15 -0700 Subject: [PATCH 130/138] display erors on installer --- .../tools/server/ryzom_ams/www/html/installer/libsetup.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 7abf8e397..247f71827 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -4,6 +4,9 @@ * This script will install all databases related to the Ryzom AMS and it will generate an admin account.. * @author Daan Janssens, mentored by Matthew Lagoe */ + + ini_set('display_errors', 1); + error_reporting(E_ALL); //set permissions if(is_writable('../../../../www/login/logs')) { From 7e27e78c255915abfee184fa3744681ec26297f1 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 7 Apr 2014 06:39:41 -0700 Subject: [PATCH 131/138] missing . --- code/ryzom/tools/server/ryzom_ams/www/html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/index.php b/code/ryzom/tools/server/ryzom_ams/www/html/index.php index e93ca5be5..b4827bfe2 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/index.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/index.php @@ -23,7 +23,7 @@ if (!file_exists('../is_installed')) { //if config exists then include it require( '../config.php' ); } -require_once( $AMS_LIB'/libinclude.php' ); +require_once( $AMS_LIB.'/libinclude.php' ); session_start(); //Running Cron? From 01a7736de64d9ba64100f437e289f8855b547abb Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 7 Apr 2014 08:03:55 -0700 Subject: [PATCH 132/138] fix paths --- .../server/ryzom_ams/www/html/installer/libsetup.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 247f71827..73450dcad 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -9,27 +9,27 @@ error_reporting(E_ALL); //set permissions - if(is_writable('../../../../www/login/logs')) { + if(is_writable('../../../www/login/logs')) { echo "failed to get write permissions on logs"; exit; } - if(is_writable('../../../../admin/graphs_output')) { + if(is_writable('../../../admin/graphs_output')) { echo "failed to get write permissions on graphs_output"; exit; } - if(is_writable('../../../../admin/templates/default_c')) { + if(is_writable('../../../admin/templates/default_c')) { echo "failed to get write permissions on default_c"; exit; } - if(is_writable('../../../www')) { + if(is_writable('../../www')) { echo "failed to get write permissions on www"; exit; } - if(is_writable('../../../www/html/cache')) { + if(is_writable('../../www/html/cache')) { echo "failed to get write permissions on cache"; exit; } - if(is_writable('../../../www/html/templates_c')) { + if(is_writable('../../www/html/templates_c')) { echo "failed to get write permissions on templates_c"; exit; } From 3d2b66af7312326ad07ceff708c2813b65737c48 Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Fri, 11 Apr 2014 13:25:12 +0530 Subject: [PATCH 133/138] remove wrong panel from settings page --- .../ryzom_ams/www/html/templates/settings.tpl | 77 ------------------- 1 file changed, 77 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 395071a5b..e4c545c98 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -157,83 +157,6 @@
- -
-
-

Create User

-
- - -
-
-
-
- - Create User - - {if !isset($changesOther) or $changesOther eq "FALSE"} -
- -
-
- - - {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} -
-
-
- {/if} -
- -
-
- - - {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} -
-
-
- -
- -
-
- - - {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} -
-
-
- - - - {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} -
- The password has been changed! -
- {/if} - - {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} -
- The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. -
- {/if} - - - -
- -
- -
-
- -
-
-
From 1c30c1067ed9e82e92f7470d52612a36c70f5b05 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 21 Apr 2014 02:39:29 -0700 Subject: [PATCH 134/138] php is_writable is not reliable --- .../ryzom_ams/www/html/installer/libsetup.php | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 73450dcad..fda43c680 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -7,29 +7,48 @@ ini_set('display_errors', 1); error_reporting(E_ALL); + + function is__writable($path) { + + if ($path{strlen($path)-1}=='/') + return is__writable($path.uniqid(mt_rand()).'.tmp'); + + if (file_exists($path)) { + if (!($f = @fopen($path, 'r+'))) + return false; + fclose($f); + return true; + } + + if (!($f = @fopen($path, 'w'))) + return false; + fclose($f); + unlink($path); + return true; + } //set permissions - if(is_writable('../../../www/login/logs')) { + if(is__writable('../../../www/login/logs')) { echo "failed to get write permissions on logs"; exit; } - if(is_writable('../../../admin/graphs_output')) { + if(is__writable('../../../admin/graphs_output')) { echo "failed to get write permissions on graphs_output"; exit; } - if(is_writable('../../../admin/templates/default_c')) { + if(is__writable('../../../admin/templates/default_c')) { echo "failed to get write permissions on default_c"; exit; } - if(is_writable('../../www')) { + if(is__writable('../../www')) { echo "failed to get write permissions on www"; exit; } - if(is_writable('../../www/html/cache')) { + if(is__writable('../../www/html/cache')) { echo "failed to get write permissions on cache"; exit; } - if(is_writable('../../www/html/templates_c')) { + if(is__writable('../../www/html/templates_c')) { echo "failed to get write permissions on templates_c"; exit; } From 1191a37816931b8f9055b3d9fbe6d2370bb48808 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 21 Apr 2014 03:00:19 -0700 Subject: [PATCH 135/138] fix for missing include --- .../tools/server/ryzom_ams/www/html/installer/libsetup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index fda43c680..e51dc1872 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -56,7 +56,6 @@ if (!isset($_POST['function'])) { //require the pages that are being needed. require_once( '../config.default.php' ); - require_once( $AMS_LIB.'/libinclude.php' ); ini_set( "display_errors", true ); error_reporting( E_ALL ); @@ -85,6 +84,8 @@ } } + require_once( $AMS_LIB.'/libinclude.php' ); + //var used to access the DB; global $cfg; From 10cdf495ca87f8cbdf03e6bebd6d3e77a0437976 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 21 Apr 2014 03:03:39 -0700 Subject: [PATCH 136/138] missing = --- .../ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php index 90730291a..ec09d9780 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php @@ -78,7 +78,7 @@ class WebUsers extends Users{ public static function checkLoginMatch($value,$password){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email:value", array('value' => $value)); + $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email=:value", array('value' => $value)); $row = $statement->fetch(); $salt = substr($row['Password'],0,2); $hashed_input_pass = crypt($password, $salt); From f593aa4eafe28091af582df8889aa1593b1f7cd0 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 23 Apr 2014 23:20:13 +0300 Subject: [PATCH 137/138] Properly restore saved camera distance from config file (issue #130) --- code/ryzom/client/src/client_cfg.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 56decaa63..25229fc49 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -1726,10 +1726,7 @@ void CClientConfig::setValues() } // Initialize the camera distance (after camera dist max) - if (!ClientCfg.FPV) - { - View.cameraDistance(ClientCfg.CameraDistance); - } + View.setCameraDistanceMaxForPlayer(); // draw in client light? if(ClientCfg.Light) From 6217b46193281fdeaf602c37a9cbb04929be2b27 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 23 Apr 2014 23:23:23 +0300 Subject: [PATCH 138/138] Fix compiling on linux with new OpenGL headers (issue #145) --- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 474750d2c..3dbed81ca 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -2195,7 +2195,7 @@ void CDriverGL::setSwapVBLInterval(uint interval) #elif defined(NL_OS_UNIX) if (_win && _Extensions.GLXEXTSwapControl) { - res = nglXSwapIntervalEXT(_dpy, _win, interval) == 0; + nglXSwapIntervalEXT(_dpy, _win, interval); } else if (_Extensions.GLXSGISwapControl) {