This commit is contained in:
sfb 2013-05-02 14:34:40 -05:00
commit 70397fe3bd
15 changed files with 80 additions and 47 deletions

View file

@ -41,6 +41,11 @@ INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
# Force out of source builds. # Force out of source builds.
CHECK_OUT_OF_SOURCE() CHECK_OUT_OF_SOURCE()
# Specify Mac OS X deployment target before including Darwin.cmake
IF(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
ENDIF(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(RyzomCore CXX C) PROJECT(RyzomCore CXX C)
SET(NL_VERSION_MAJOR 0) SET(NL_VERSION_MAJOR 0)

View file

@ -33,7 +33,7 @@ class CEventEmitterMulti : public IEventEmitter
{ {
public: public:
/// dtor /// dtor
~CEventEmitterMulti(); virtual ~CEventEmitterMulti();
/// add an emitter /// add an emitter
void addEmitter(IEventEmitter *e, bool mustDelete); void addEmitter(IEventEmitter *e, bool mustDelete);
/// remove an emitter (and delete it if necessary) /// remove an emitter (and delete it if necessary)

View file

@ -65,6 +65,7 @@ const CClassId EventStringId (0x49b5af8f, 0x7f52cd26);
const CClassId EventActivateId (0x7da66b0a, 0x1ef74519); const CClassId EventActivateId (0x7da66b0a, 0x1ef74519);
const CClassId EventSetFocusId (0x17650fac, 0x19f85dde); const CClassId EventSetFocusId (0x17650fac, 0x19f85dde);
const CClassId EventDestroyWindowId (0x69be73fe, 0x4b07603b); const CClassId EventDestroyWindowId (0x69be73fe, 0x4b07603b);
const CClassId EventCloseWindowId (0xb5cb1333, 0xd092e63a);
// Mouse events // Mouse events
const CClassId EventMouseMoveId (0x3dd12fdb, 0x472f548b); const CClassId EventMouseMoveId (0x3dd12fdb, 0x472f548b);
@ -504,6 +505,19 @@ public:
virtual CEvent *clone() const {return new CEventDestroyWindow(*this);} virtual CEvent *clone() const {return new CEventDestroyWindow(*this);}
}; };
/**
* CEventCloseWindow
*/
class CEventCloseWindow : public CEvent
{
public:
CEventCloseWindow (IEventEmitter* emitter) : CEvent (emitter, EventCloseWindowId)
{
}
virtual CEvent *clone() const {return new CEventCloseWindow(*this);}
};
/** /**
* CEventIME * CEventIME
*/ */

View file

@ -29,10 +29,6 @@ extern "C"
#include "nel/gui/group_html.h" #include "nel/gui/group_html.h"
#include "nel/gui/libwww_nel_stream.h" #include "nel/gui/libwww_nel_stream.h"
#ifdef HAVE_REVISION_H
#include "revision.h"
#endif
using namespace NLMISC; using namespace NLMISC;
// The HText structure for libwww // The HText structure for libwww
@ -554,35 +550,6 @@ namespace NLGUI
HTTrace_setCallback(NelTracer); HTTrace_setCallback(NelTracer);
/* Initiate libwww */ /* Initiate libwww */
#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
/*
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
*/
HTLib_setAppName( CGroupHTML::options.appName.c_str() ); HTLib_setAppName( CGroupHTML::options.appName.c_str() );
HTLib_setAppVersion( CGroupHTML::options.appVersion.c_str() ); HTLib_setAppVersion( CGroupHTML::options.appVersion.c_str() );

View file

@ -29,8 +29,9 @@
#include "nel/misc/uv.h" #include "nel/misc/uv.h"
#include "nel/misc/hierarchical_timer.h" #include "nel/misc/hierarchical_timer.h"
#if NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#define NOMINMAX #define NOMINMAX
#include <WinSock2.h>
#include <windows.h> #include <windows.h>
#endif #endif

View file

@ -281,6 +281,9 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPA
case WM_DESTROY: case WM_DESTROY:
server->postEvent (new CEventDestroyWindow (this)); server->postEvent (new CEventDestroyWindow (this));
break; break;
case WM_CLOSE:
server->postEvent (new CEventCloseWindow (this));
return true;
case WM_DISPLAYCHANGE: case WM_DISPLAYCHANGE:
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this)); server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this));
break; break;

View file

@ -6,7 +6,11 @@ ADD_SUBDIRECTORY(log)
ADD_SUBDIRECTORY(disp_sheet_id) ADD_SUBDIRECTORY(disp_sheet_id)
ADD_SUBDIRECTORY(object_viewer) ADD_SUBDIRECTORY(object_viewer)
ADD_SUBDIRECTORY(georges_editor) ADD_SUBDIRECTORY(georges_editor)
IF(WITH_GUI)
ADD_SUBDIRECTORY(gui_editor) ADD_SUBDIRECTORY(gui_editor)
ENDIF(WITH_GUI)
ADD_SUBDIRECTORY(translation_manager) ADD_SUBDIRECTORY(translation_manager)
ADD_SUBDIRECTORY(bnp_manager) ADD_SUBDIRECTORY(bnp_manager)
# Note: Temporarily disabled until development continues. # Note: Temporarily disabled until development continues.

View file

@ -1139,7 +1139,7 @@ NLMISC_COMMAND (kill, "kill a service and send an unregister broadcast to other
NLMISC_DYNVARIABLE(uint32, NbRegisteredServices, "display the number of service that are registered in naming service") NLMISC_DYNVARIABLE(uint32, NbRegisteredServices, "display the number of service that are registered in naming service")
{ {
if (get) *pointer = RegisteredServices.size(); if (get) *pointer = (uint32)RegisteredServices.size();
} }
NLMISC_COMMAND( displayServiceInstances, "SIM: Display info on service instances", "" ) NLMISC_COMMAND( displayServiceInstances, "SIM: Display info on service instances", "" )

View file

@ -90,6 +90,7 @@ void CEventsListener::addToServer(CEventServer& server)
server.addListener(EventKeyDownId, this); server.addListener(EventKeyDownId, this);
server.addListener(EventKeyUpId, this); server.addListener(EventKeyUpId, this);
server.addListener(EventDestroyWindowId,this); server.addListener(EventDestroyWindowId,this);
server.addListener(EventCloseWindowId, this);
server.addListener(EventSetFocusId, this); server.addListener(EventSetFocusId, this);
server.addListener(EventDisplayChangeId, this); server.addListener(EventDisplayChangeId, this);
}// addToServer // }// addToServer //
@ -108,6 +109,7 @@ void CEventsListener::removeFromServer (CEventServer& server)
server.removeListener(EventKeyDownId, this); server.removeListener(EventKeyDownId, this);
server.removeListener(EventKeyUpId, this); server.removeListener(EventKeyUpId, this);
server.removeListener(EventDestroyWindowId,this); server.removeListener(EventDestroyWindowId,this);
server.removeListener(EventCloseWindowId, this);
server.removeListener(EventSetFocusId, this); server.removeListener(EventSetFocusId, this);
}// removeFromServer // }// removeFromServer //
@ -141,6 +143,11 @@ void CEventsListener::operator()(const CEvent& event)
// kill process // kill process
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
// Window close button pressed.
if(event == EventCloseWindowId)
{
CAHManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:quit_dialog");
}
// Event from the Mouse (ANGLE) // Event from the Mouse (ANGLE)
if(event == EventGDMouseMove) if(event == EventGDMouseMove)
{ {

View file

@ -94,6 +94,7 @@ void CInputHandlerManager::addToServer(NLMISC::CEventServer * server)
// System // System
server->addListener(EventGDMouseMove, this); server->addListener(EventGDMouseMove, this);
server->addListener(EventDestroyWindowId, this); server->addListener(EventDestroyWindowId, this);
server->addListener(EventCloseWindowId, this);
server->addListener(EventSetFocusId, this); server->addListener(EventSetFocusId, this);
server->addListener(EventDisplayChangeId, this); server->addListener(EventDisplayChangeId, this);
@ -118,6 +119,7 @@ void CInputHandlerManager::release()
// System // System
_EventServer->removeListener(EventGDMouseMove, this); _EventServer->removeListener(EventGDMouseMove, this);
_EventServer->removeListener(EventDestroyWindowId, this); _EventServer->removeListener(EventDestroyWindowId, this);
_EventServer->removeListener(EventCloseWindowId, this);
_EventServer->removeListener(EventSetFocusId, this); _EventServer->removeListener(EventSetFocusId, this);
_EventServer->removeListener(EventDisplayChangeId, this); _EventServer->removeListener(EventDisplayChangeId, this);
@ -133,10 +135,8 @@ void CInputHandlerManager::release()
_EventServer->removeListener(EventCharId, this); _EventServer->removeListener(EventCharId, this);
_EventServer->removeListener(EventKeyDownId, this); _EventServer->removeListener(EventKeyDownId, this);
_EventServer->removeListener(EventKeyUpId, this); _EventServer->removeListener(EventKeyUpId, this);
} }
// *************************************************************************** // ***************************************************************************
void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
{ {

View file

@ -132,6 +132,29 @@ using namespace NLGUI;
#include "../global.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
using namespace NLMISC; using namespace NLMISC;
namespace NLGUI namespace NLGUI
@ -465,10 +488,19 @@ CInterfaceManager::CInterfaceManager()
CViewRenderer::getInstance(); CViewRenderer::getInstance();
CViewTextID::setTextProvider( &SMTextProvider ); CViewTextID::setTextProvider( &SMTextProvider );
CViewTextFormated::setFormatter( &RyzomTextFormatter ); 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.trustedDomains = ClientCfg.WebIgTrustedDomains;
CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode(); CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode();
CGroupHTML::options.appName = "Ryzom"; CGroupHTML::options.appName = "Ryzom";
CGroupHTML::options.appVersion = RYZOM_VERSION; CGroupHTML::options.appVersion = buffer;
NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS ); NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS );
interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater(); interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater();

View file

@ -507,7 +507,7 @@ bool CObject::getShortestName(std::string &instanceId, std::string &attrName, si
return false; return false;
} }
instanceId = parent2->getAttr("InstanceId")->toString(); instanceId = parent2->getAttr("InstanceId")->toString();
attrName == parent2->getKey(index2); attrName = parent2->getKey(index2);
position = index; position = index;
return true; return true;
} }

View file

@ -135,7 +135,7 @@ void CGrpProfileDynFollowPath::updateProfile(uint ticksSinceLastUpdate)
_FollowRoute.setAIProfile(fr); _FollowRoute.setAIProfile(fr);
// faire gaffe à l'init du CGrpProfileFollowRouteSpawn dans le cadre statique .. :\ (adapter?) // pay attention to CGrpProfileFollowRouteSpawn init in static case .. :\ (to adapt ?)
#ifdef NL_DEBUG #ifdef NL_DEBUG
nlassert(_CurrentZone==_CurrentRoad->startZone() || _CurrentZone==_CurrentRoad->endZone()); nlassert(_CurrentZone==_CurrentRoad->startZone() || _CurrentZone==_CurrentRoad->endZone());
#endif #endif

View file

@ -50,7 +50,7 @@ extern bool VerboseAliasDescriptionNodeLog;
class CAIAliasDescriptionNode; class CAIAliasDescriptionNode;
// à faire .. // TODO...
class CAIAliasDescriptionNode : public NLMISC::CRefCount class CAIAliasDescriptionNode : public NLMISC::CRefCount
{ {
public: public:

View file

@ -157,11 +157,11 @@ public:
/// params as strings /// params as strings
std::vector<std::string> StringParams; std::vector<std::string> StringParams;
//* Break when hit: Si une créature frappe le joueur, la consommation est immédiatement interrompue //* Break when hit: If a creature hits the player, consumption is immediatly aborted
//* Assis: le joueur peut consommer assis. //* Sit: player can consume item sit down
//* Debout: Le joueur peut consommer l'item debout, y compris en combat //* Stand Up: player can consume item stand up, including while fighting
//* Nage: le joueur peut consommer l'item lorsqu'il nage //* Swim: player can consume item while swiming
//* Mektoub: le joueur peut consommer l'item lorsqu'il chevauche un mektoub //* Mektoub: player can consume item while riding a mektoub
union union
{ {
uint16 Data; uint16 Data;