From c2c930035c6b90c3a6af639c15912f547c314740 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 7 Nov 2015 22:56:45 +0100 Subject: [PATCH 1/9] Changed: Use new Ryzom icon under Windows --HG-- branch : develop --- code/ryzom/client/src/client.rc | 2 +- code/ryzom/client/src/ryzom.ico | Bin 155683 -> 145555 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/client.rc b/code/ryzom/client/src/client.rc index d256df313..b0bb98b9e 100644 --- a/code/ryzom/client/src/client.rc +++ b/code/ryzom/client/src/client.rc @@ -54,7 +54,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_MAIN_ICON ICON DISCARDABLE "ryzom_small.ico" +IDI_MAIN_ICON ICON DISCARDABLE "ryzom.ico" #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/client/src/ryzom.ico b/code/ryzom/client/src/ryzom.ico index 5f4f39ed37f7bfba784f11dd7ac4fb4463868b08..3470b6c1605fba898a56b98cadc8128f162a2e51 100644 GIT binary patch delta 161 zcmZ2{fOGOkj!*^$Mg|rJ0Ra%Lz>vYhz~IKfz@VT2;jaLSuLFu17(n@|3=CnSKm|Ym zQa|-CBf~!{1_livAE*>40v4a_$f~*hb2QTj=E>949i|I=Gl@)gV|Cb`?#*ZmU>V)V5k&s@7WTwAShBXrJjm^K_k#o%eaB?@a)Q&hz~7em?KPlXLGm=bpRY zbME~)_=DHp@yD!y8)iZ#V-f0srWwEi03jh0`LEmoUnam}P2?lpfL|U1(RY^f!XaNE z*xRW;nfC&&1~~O6@=cz=6Z42c0&WPw*8g_HUC~te5FAPh2U^43Ck+q=DagrnpEMAH zCJ*4%3U@>j1EfyWxC{{{0o&kl&j5{$B%B%B1R=j9NzjJz@o^&f&Giqz{pL&&B!5oU zZ@&#*^a!&$97Orw!Hagmze|{Oqs2luc64<7u7JI^CaI+yD|S&MaO!ctj46xq#YgWRVsQ)--~9L*@X=kr2V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Pb@FMn+C#7RY_hSEvqc}?N#pAEy%;{q|dG=Mj^7?B*I6eM4u3UQq z*Wb8^H{QO1OK;u62gJeL{_q|NHun#1ir+TK;^i^OYmU=z^p|#!H<|98lS_0^S7M-g zdW&+lyBK|0hV<(A`kLiAMXr1um6yKMR~9&%Ju8bawlTfL>17F$`Sblf7(+nY%;cuP zIT}d}$8DxN`7qHM7NMw&2;na1FXBG77%^E2)7 zRp}IYlAqx@HzhHybxY^ESl(JvgF+sh9FnGOduFk3xw8esNx_R1k?{?yOzZ(?9wW^a z4fHaOxK1KRA_=HDF&p#8+{4>FA>woi{@wJR#4MFEuX(!mi2i%aj|0H)hCw(~hf<~~w&6#v+k{=>*-S_^>Nt2!N`!qTia5>%Cdi@*W&vsJM{bVQo%{KKd{ZGyT`~9^g#91qBEOOad zc+%bT{n^(0Oj5$lHLPUdl8Lpsq~_W8$>#(oj+0uZ&_+7+Z}_PDATV7vPRiY%KqjF~ zr%hsi?qn;izm2<*1wQ*X*S9 Date: Sat, 7 Nov 2015 22:57:41 +0100 Subject: [PATCH 2/9] Changed: Minor changes --HG-- branch : develop --- code/ryzom/client/src/browse_faq.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/ryzom/client/src/browse_faq.cpp b/code/ryzom/client/src/browse_faq.cpp index 8311087eb..3899a2960 100644 --- a/code/ryzom/client/src/browse_faq.cpp +++ b/code/ryzom/client/src/browse_faq.cpp @@ -24,21 +24,26 @@ void browseFAQ(NLMISC::CConfigFile &cf) std::string url; std::string languageCode = "wk"; CConfigFile::CVar *languageCodeVarPtr = cf.getVarPtr("LanguageCode"); + if (languageCodeVarPtr) { languageCode = languageCodeVarPtr->asString(); } + CConfigFile::CVar *helpPages = cf.getVarPtr("HelpPages"); + if (helpPages) { for (uint i = 0; i < helpPages->size(); ++i) { std::string entry = helpPages->asString(i); + if (entry.size() >= languageCode.size()) { if (nlstricmp(entry.substr(0, languageCode.size()), languageCode) == 0) { std::string::size_type pos = entry.find("="); + if (pos != std::string::npos) { url = entry.substr(pos + 1); From 3ac728872e371a530d81ae718cc4762ec803b4fc Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 11:53:46 +0100 Subject: [PATCH 3/9] Fixed: Typos (renamed restaure to restore) --HG-- branch : develop --- code/nel/include/nel/3d/index_buffer.h | 2 +- code/nel/include/nel/3d/vertex_buffer.h | 2 +- code/nel/src/3d/cloud.cpp | 4 ++-- .../3d/driver/direct3d/driver_direct3d.cpp | 8 +++---- .../driver/direct3d/driver_direct3d_index.cpp | 2 +- .../direct3d/driver_direct3d_material.cpp | 2 +- .../direct3d/driver_direct3d_vertex.cpp | 2 +- .../src/3d/driver/opengl/driver_opengl.cpp | 2 +- code/nel/src/3d/driver/opengl/driver_opengl.h | 2 +- .../driver/opengl/driver_opengl_material.cpp | 2 +- .../3d/driver/opengl/driver_opengl_vertex.cpp | 2 +- .../3d/driver/opengl/driver_opengl_window.cpp | 6 ++--- code/nel/src/3d/index_buffer.cpp | 14 ++++++------ code/nel/src/3d/vertex_buffer.cpp | 22 +++++++++---------- code/ryzom/client/src/connection.cpp | 10 ++++----- .../src/interface_v3/interface_3d_scene.cpp | 2 +- .../client/src/interface_v3/music_player.cpp | 4 ++-- .../client/src/motion/modes/mount_mode.cpp | 2 +- code/ryzom/client/src/user_entity.cpp | 2 +- 19 files changed, 46 insertions(+), 46 deletions(-) diff --git a/code/nel/include/nel/3d/index_buffer.h b/code/nel/include/nel/3d/index_buffer.h index d5872f5e9..3d9c289ee 100644 --- a/code/nel/include/nel/3d/index_buffer.h +++ b/code/nel/include/nel/3d/index_buffer.h @@ -429,7 +429,7 @@ private: void resetTouchFlags() {_InternalFlags &= (uint16)(~TouchedAll);} // Force non resident memory - void restaureNonResidentMemory(); + void restoreNonResidentMemory(); // Convert current index to a serializable vector void buildSerialVector(std::vector &dest) const; diff --git a/code/nel/include/nel/3d/vertex_buffer.h b/code/nel/include/nel/3d/vertex_buffer.h index 6c269ec6c..1f1c789ae 100644 --- a/code/nel/include/nel/3d/vertex_buffer.h +++ b/code/nel/include/nel/3d/vertex_buffer.h @@ -653,7 +653,7 @@ private: void resetTouchFlags() {_InternalFlags &= (uint16)(~TouchedAll);} // Force non resident memory - void restaureNonResidentMemory(); + void restoreNonResidentMemory(); private: diff --git a/code/nel/src/3d/cloud.cpp b/code/nel/src/3d/cloud.cpp index 2606f9ad5..eb53589ce 100644 --- a/code/nel/src/3d/cloud.cpp +++ b/code/nel/src/3d/cloud.cpp @@ -178,7 +178,7 @@ void CCloud::generate (CNoise3d &noise) _Driver->activeVertexBuffer (rVB); _Driver->renderRawQuads (_CloudTexClamp->ToClamp, 0, 1); - // Restaure render target + // Restore render target _Driver->setRenderTarget (NULL); _CloudTexTmp->Tex->setFilterMode (ITexture::Nearest, ITexture::NearestMipMapOff); @@ -685,7 +685,7 @@ void CCloud::genBill (CCamera *pCam, uint32 nBillSize) dispXYZ (&_CloudTexTmp->ToBill); - // Restaure render target + // Restore render target _Driver->setRenderTarget (NULL); // This is the end of render to texture like so reset all stuff diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 8a7be80d2..5ffaceda6 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1912,7 +1912,7 @@ bool CDriverD3D::clear2D(CRGBA rgba) bool result = _DeviceInterface->Clear( 0, NULL, D3DCLEAR_TARGET, NL_D3DCOLOR_RGBA(rgba), 1.0f, 0 ) == D3D_OK; - // Restaure the old viewport + // Restore the old viewport setupViewport (oldViewport); return result; } @@ -1931,7 +1931,7 @@ bool CDriverD3D::clearZBuffer(float zval) bool result = _DeviceInterface->Clear( 0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0,0,0,0), zval, 0 ) == D3D_OK; - // Restaure the old viewport + // Restore the old viewport setupViewport (oldViewport); // NVidia driver 56.72 needs to reset the vertex buffer after a clear Z @@ -1954,7 +1954,7 @@ bool CDriverD3D::clearStencilBuffer(float stencilval) bool result = _DeviceInterface->Clear( 0, NULL, D3DCLEAR_STENCIL, D3DCOLOR_ARGB(0,0,0,0), 1.0f, (unsigned long)stencilval ) == D3D_OK; - // Restaure the old viewport + // Restore the old viewport setupViewport (oldViewport); return result; @@ -2526,7 +2526,7 @@ bool CDriverD3D::reset (const GfxMode& mode) _CurrentMaterial = NULL; _CurrentMaterialInfo = NULL; - // Restaure non managed vertex buffer in system memory + // Restore non managed vertex buffer in system memory ItVBDrvInfoPtrList iteVb = _VBDrvInfos.begin(); while (iteVb != _VBDrvInfos.end()) { diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp index b75a21d9d..dfdc48670 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp @@ -49,7 +49,7 @@ uint indexCount=0; CIBDrvInfosD3D::~CIBDrvInfosD3D() { H_AUTO_D3D(CIBDrvInfosD3D_CIBDrvInfosD3DDtor); - // Restaure non resident memory + // Restore non resident memory if (IndexBufferPtr) { IndexBufferPtr->setLocation(CIndexBuffer::NotResident); diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp index f22cba111..1e8878fb9 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp @@ -818,7 +818,7 @@ bool CDriverD3D::setupMaterial(CMaterial &mat) if (_CurrentMaterial != &mat) { // Material has changed ? - // Restaure fog state to its current value + // Restore fog state to its current value { H_AUTO_D3D(CDriverD3D_setupMaterial_updateFog) setRenderState (D3DRS_FOGENABLE, _FogEnabled?TRUE:FALSE); diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp index d37c272a2..ad5bb04b9 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp @@ -63,7 +63,7 @@ CVBDrvInfosD3D::~CVBDrvInfosD3D() { H_AUTO_D3D(CVBDrvInfosD3D_CVBDrvInfosD3D) CDriverD3D *driver = static_cast(_Driver); - // Restaure non resident memory + // Restore non resident memory if (VertexBufferPtr) { VertexBufferPtr->setLocation(CVertexBuffer::NotResident); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 35cf9c094..3539948ac 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -234,7 +234,7 @@ CDriverGL::CDriverGL() _CursorScale = 1.f; _MouseCaptured = false; - _NeedToRestaureGammaRamp = false; + _NeedToRestoreGammaRamp = false; _win = EmptyWindow; _WindowX = 0; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index c4540b9da..1a7ca6825 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -1558,7 +1558,7 @@ private: // Monitor color parameters backup - bool _NeedToRestaureGammaRamp; + bool _NeedToRestoreGammaRamp; uint16 _GammaRampBackuped[3*256]; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp index 95c8e61f2..e5375a49c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp @@ -532,7 +532,7 @@ bool CDriverGL::setupMaterial(CMaterial& mat) } else { - // Restaure fog state to its current value + // Restore fog state to its current value _DriverGLStates.enableFog(_FogEnabled); } 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 cab62f094..39f71d77a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp @@ -71,7 +71,7 @@ CVBDrvInfosGL::CVBDrvInfosGL(CDriverGL *drv, ItVBDrvInfoPtrList it, CVertexBuffe CVBDrvInfosGL::~CVBDrvInfosGL() { H_AUTO_OGL(CVBDrvInfosGL_CVBDrvInfosGLDtor) - // Restaure non resident memory + // Restore non resident memory if (VertexBufferPtr) { VertexBufferPtr->setLocation(CVertexBuffer::NotResident); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 55e94bb4f..c76f2943b 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -329,7 +329,7 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc) HDC dc = CreateDC ("DISPLAY", NULL, NULL, NULL); if (dc) { - _NeedToRestaureGammaRamp = GetDeviceGammaRamp (dc, _GammaRampBackuped) != FALSE; + _NeedToRestoreGammaRamp = GetDeviceGammaRamp (dc, _GammaRampBackuped) != FALSE; // Release the DC ReleaseDC (NULL, dc); @@ -465,8 +465,8 @@ bool CDriverGL::unInit() } _Registered = 0; - // Restaure monitor color parameters - if (_NeedToRestaureGammaRamp) + // Restore monitor color parameters + if (_NeedToRestoreGammaRamp) { HDC dc = CreateDC ("DISPLAY", NULL, NULL, NULL); if (dc) diff --git a/code/nel/src/3d/index_buffer.cpp b/code/nel/src/3d/index_buffer.cpp index b9e1356dc..7bb2e1cd5 100644 --- a/code/nel/src/3d/index_buffer.cpp +++ b/code/nel/src/3d/index_buffer.cpp @@ -106,7 +106,7 @@ CIndexBuffer::~CIndexBuffer() // Single value if (DrvInfos) - DrvInfos->IndexBufferPtr = NULL; // Tell the driver info to not restaure memory when it will die + DrvInfos->IndexBufferPtr = NULL; // Tell the driver info to not restore memory when it will die // Must kill the drv mirror of this VB. DrvInfos.kill(); @@ -144,7 +144,7 @@ void CIndexBuffer::setPreferredMemory (TPreferredMemory preferredMemory, bool ke _KeepLocalMemory = keepLocalMemory; // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -159,7 +159,7 @@ void CIndexBuffer::reserve(uint32 n) _NbIndexes=std::min (_NbIndexes,_Capacity); // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -206,7 +206,7 @@ void CIndexBuffer::deleteAllIndexes() } // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); // Delete driver info nlassert (DrvInfos == NULL); @@ -276,12 +276,12 @@ void CIndexBuffer::setLocation (TLocation newLocation) // *************************************************************************** -void CIndexBuffer::restaureNonResidentMemory() +void CIndexBuffer::restoreNonResidentMemory() { setLocation (NotResident); if (DrvInfos) - DrvInfos->IndexBufferPtr = NULL; // Tell the driver info to not restaure memory when it will die + DrvInfos->IndexBufferPtr = NULL; // Tell the driver info to not restore memory when it will die // Must kill the drv mirror of this VB. DrvInfos.kill(); @@ -407,7 +407,7 @@ void CIndexBuffer::serial(NLMISC::IStream &f) if (f.isReading()) { // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } diff --git a/code/nel/src/3d/vertex_buffer.cpp b/code/nel/src/3d/vertex_buffer.cpp index ea3ec5100..fc09dc956 100644 --- a/code/nel/src/3d/vertex_buffer.cpp +++ b/code/nel/src/3d/vertex_buffer.cpp @@ -166,7 +166,7 @@ CVertexBuffer::~CVertexBuffer() * ***********************************************/ if (DrvInfos) - DrvInfos->VertexBufferPtr = NULL; // Tell the driver info to not restaure memory when it will die + DrvInfos->VertexBufferPtr = NULL; // Tell the driver info to not restore memory when it will die // Must kill the drv mirror of this VB. DrvInfos.kill(); @@ -302,7 +302,7 @@ bool CVertexBuffer::setVertexFormat(uint32 flags) initEx (); // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); return (true); } @@ -468,7 +468,7 @@ void CVertexBuffer::initEx () _Capacity = 0; // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } // -------------------------------------------------- @@ -482,7 +482,7 @@ void CVertexBuffer::reserve(uint32 n) _NbVerts=std::min (_NbVerts,_Capacity); // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -518,7 +518,7 @@ void CVertexBuffer::deleteAllVertices() } // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); // Delete driver info nlassert (DrvInfos == NULL); @@ -725,7 +725,7 @@ void CVertexBuffer::serialOldV1Minus(NLMISC::IStream &f, sint ver) if(f.isReading()) { // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -979,7 +979,7 @@ void CVertexBuffer::serialSubset(NLMISC::IStream &f, uint vertexStart, uint ver if(f.isReading()) { // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -1029,7 +1029,7 @@ bool CVertexBuffer::setVertexColorFormat (TVertexColorType format) _VertexColorFormat = (uint8)format; // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } return true; } @@ -1044,7 +1044,7 @@ void CVertexBuffer::setPreferredMemory (TPreferredMemory preferredMemory, bool k _KeepLocalMemory = keepLocalMemory; // Force non resident - restaureNonResidentMemory(); + restoreNonResidentMemory(); } } @@ -1110,12 +1110,12 @@ void CVertexBuffer::setLocation (TLocation newLocation) } // -------------------------------------------------- -void CVertexBuffer::restaureNonResidentMemory() +void CVertexBuffer::restoreNonResidentMemory() { setLocation (NotResident); if (DrvInfos) - DrvInfos->VertexBufferPtr = NULL; // Tell the driver info to not restaure memory when it will die + DrvInfos->VertexBufferPtr = NULL; // Tell the driver info to not restore memory when it will die // Must kill the drv mirror of this VB. DrvInfos.kill(); diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 3f3a3d809..6c24bcd8d 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -187,7 +187,7 @@ bool hasPrivilegeEG() { return (UserPrivileges.find(":EG:") != std::string::npos // Restore the video mode (fullscreen for example) after the connection (done in a window) -void connectionRestaureVideoMode () +void connectionRestoreVideoMode () { // Setup full screen if we have to UDriver::CMode mode; @@ -342,7 +342,7 @@ bool connection (const string &cookie, const string &fsaddr) // init the string manager cache. STRING_MANAGER::CStringManagerClient::instance()->initCache("", ClientCfg.LanguageCode); // VOIR BORIS #endif - connectionRestaureVideoMode (); + connectionRestoreVideoMode (); return true; } @@ -513,7 +513,7 @@ bool reconnection() // init the string manager cache. STRING_MANAGER::CStringManagerClient::instance()->initCache("", ClientCfg.LanguageCode); // VOIR BORIS #endif - connectionRestaureVideoMode (); + connectionRestoreVideoMode (); return true; } */ @@ -1266,10 +1266,10 @@ TInterfaceState globalMenu() } - // Restaure video mode + // Restore video mode if (ClientCfg.SelectCharacter == -1) { - connectionRestaureVideoMode (); + connectionRestoreVideoMode (); } // Skip intro next time diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index 6acc2a17b..f17270143 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -539,7 +539,7 @@ void CInterface3DScene::draw () Driver->setViewport(oldVP); Driver->setFrustum(oldFrustum); - // Restaure render states + // Restore render states CViewRenderer::getInstance()->setRenderStates(); restoreClip (oldSciX, oldSciY, oldSciW, oldSciH); diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index cfa23540f..c53dad13c 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -291,11 +291,11 @@ public: Driver->endDialogMode(); } - // Restaure mouse + // Restore mouse InitMouseWithCursor (wasHardware); Driver->showCursor (wasHardware); - // Restaure current path + // Restore current path CPath::setCurrentPath (currentPath.c_str()); #endif // NL_OS_WINDOWS } diff --git a/code/ryzom/client/src/motion/modes/mount_mode.cpp b/code/ryzom/client/src/motion/modes/mount_mode.cpp index d2c808fe2..f52d5c9ba 100644 --- a/code/ryzom/client/src/motion/modes/mount_mode.cpp +++ b/code/ryzom/client/src/motion/modes/mount_mode.cpp @@ -93,7 +93,7 @@ void CUserControls::mountModeStart() //----------------------------------------------- void CUserControls::mountModeStop() { - // Restaure la hauteur des yeux. + // Restore eyes height. UserEntity->eyesHeight(ClientCfg.EyesHeight); // \todo GUIGUI : remove this after the UBI Demo. diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 62d45f330..dcf0ccf41 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -755,7 +755,7 @@ bool CUserEntity::mode(MBEHAV::EMode m) break; // Leave DEATH Mode case MBEHAV::DEATH: - // Restaure the last view. + // Restore the last view. viewMode(viewMode()); break; case MBEHAV::SWIM: From 2b155c2d506691b49177cffa6cb31b832740fbec Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:22:33 +0100 Subject: [PATCH 4/9] Changed: Minor changes --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 8 ++++---- .../src/3d/driver/opengl/mac/cocoa_window_delegate.mm | 3 +-- code/nel/src/misc/rgba.cpp | 3 ++- code/ryzom/client/src/connection.cpp | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index c76f2943b..e45d031a6 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1758,14 +1758,14 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle) #elif defined(NL_OS_MAC) // leave fullscreen mode, enter windowed mode - if(windowStyle == EWSWindowed && [containerView() isInFullScreenMode]) + if (windowStyle == EWSWindowed && [containerView() isInFullScreenMode]) { // disable manual setting of back buffer size, cocoa handles this // automatically as soon as the view gets resized CGLError error = CGLDisable((CGLContextObj)[_ctx CGLContextObj], kCGLCESurfaceBackingSize); - if(error != kCGLNoError) + if (error != kCGLNoError) nlerror("cannot disable kCGLCESurfaceBackingSize (%s)", CGLErrorString(error)); @@ -1780,13 +1780,13 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle) } // enter fullscreen, leave windowed mode - else if(windowStyle == EWSFullscreen && ![containerView() isInFullScreenMode]) + else if (windowStyle == EWSFullscreen && ![containerView() isInFullScreenMode]) { // enable manual back buffer size for mode setting in fullscreen CGLError error = CGLEnable((CGLContextObj)[_ctx CGLContextObj], kCGLCESurfaceBackingSize); - if(error != kCGLNoError) + if (error != kCGLNoError) nlerror("cannot enable kCGLCESurfaceBackingSize (%s)", CGLErrorString(error)); diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm index a2eb54a6b..2e5faf852 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm @@ -31,8 +31,7 @@ static void windowDidMove(NSWindow* window, CDriverGL* driver) driver->_WindowX = windowRect.origin.x; // map y from cocoa to NeL coordinates before setting in driver - driver->_WindowY = - screenRect.size.height - windowRect.size.height - windowRect.origin.y; + driver->_WindowY = screenRect.size.height - windowRect.size.height - windowRect.origin.y; } @implementation CocoaWindowDelegate diff --git a/code/nel/src/misc/rgba.cpp b/code/nel/src/misc/rgba.cpp index 2ab5eabf3..944ca50d3 100644 --- a/code/nel/src/misc/rgba.cpp +++ b/code/nel/src/misc/rgba.cpp @@ -298,7 +298,8 @@ void CRGBA::modulateColors(CRGBA *dest, const CRGBA *src1, const CRGBA *src2, ui uint64 blank = 0; /// well, this could be further optimized when stride is 4 if (dup == 1) - { __asm + { + __asm { push ebp movq mm2, blank diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 6c24bcd8d..285bbfab8 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -213,11 +213,11 @@ void connectionRestoreVideoMode () (ClientCfg.Width != mode.Width) || (ClientCfg.Height != mode.Height))) { - mode.Windowed = ClientCfg.Windowed; - mode.Depth = uint8(ClientCfg.Depth); - mode.Width = ClientCfg.Width; - mode.Height = ClientCfg.Height; - mode.Frequency= ClientCfg.Frequency; + mode.Windowed = ClientCfg.Windowed; + mode.Depth = uint8(ClientCfg.Depth); + mode.Width = ClientCfg.Width; + mode.Height = ClientCfg.Height; + mode.Frequency = ClientCfg.Frequency; setVideoMode(mode); } From 2be81c544596bda55349123a2a180bb713093b85 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:25:36 +0100 Subject: [PATCH 5/9] Changed: Replace int 3 asm by __debugbreak() --HG-- branch : develop --- code/nel/src/misc/mutex.cpp | 4 ++-- code/ryzom/client/src/client.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/nel/src/misc/mutex.cpp b/code/nel/src/misc/mutex.cpp index 8135d954f..af0e850ab 100644 --- a/code/nel/src/misc/mutex.cpp +++ b/code/nel/src/misc/mutex.cpp @@ -677,7 +677,7 @@ void CFairMutex::debugEndEnter() if (_Mutex == (void*)0x88) { OutputDebugString (str); - if (entered) __asm int 3; + if (entered) __debugbreak(); entered = true; } */ @@ -704,7 +704,7 @@ void CFairMutex::debugLeave() if (_Mutex == (void*)0x88) { OutputDebugString (str); - if (!entered) __asm int 3; + if (!entered) __debugbreak(); entered = false; } */ diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 70e5a36c4..82044e0e1 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -440,10 +440,9 @@ int main(int argc, char **argv) if (string(cmdline) == "/crash") volatile int toto = *(int*)0; if (string(cmdline) == "/break") - __asm - { - int 3 - }; + { + __debugbreak(); + } #endif // TEST_CRASH_COUNTER HInstance = hInstance; From a49723178d25dbabe76f05440d18fcd706b60896 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:35:16 +0100 Subject: [PATCH 6/9] Changed: Centralize OS X 10.6 check in NL_MAC_VERSION_10_6_UP --HG-- branch : develop --- .../3d/driver/opengl/driver_opengl_window.cpp | 17 ++++++++++------- .../opengl/mac/cocoa_application_delegate.h | 2 +- .../driver/opengl/mac/cocoa_event_emitter.cpp | 3 ++- .../3d/driver/opengl/mac/cocoa_opengl_view.m | 2 +- .../driver/opengl/mac/cocoa_window_delegate.h | 2 +- code/nel/src/3d/driver/opengl/stdopengl.h | 6 ++++++ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index e45d031a6..8cfd26228 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1793,7 +1793,7 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle) // put the view in fullscreen mode, hiding the dock but enabling the menubar // to pop up if the mouse hits the top screen border. // NOTE: withOptions:nil disables + application switching! -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP [containerView() enterFullScreenMode:[NSScreen mainScreen] withOptions: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: @@ -1917,8 +1917,9 @@ bool CDriverGL::setMode(const GfxMode& mode) return true; } -#if defined(NL_OS_MAC) && defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_OS_MAC +#ifdef NL_MAC_VERSION_10_6_UP /// helper to extract bits per pixel value from screen mode, only 16 or 32 bits static int bppFromDisplayMode(CGDisplayModeRef mode) @@ -1936,7 +1937,7 @@ static int bppFromDisplayMode(CGDisplayModeRef mode) return 0; } -#elif defined(NL_OS_MAC) +#else long GetDictionaryLong(CFDictionaryRef theDict, const void* key) { @@ -1953,7 +1954,9 @@ long GetDictionaryLong(CFDictionaryRef theDict, const void* key) #define GetModeHeight(mode) GetDictionaryLong((mode), kCGDisplayHeight) #define GetModeBitsPerPixel(mode) GetDictionaryLong((mode), kCGDisplayBitsPerPixel) -#endif // defined(NL_OS_MAC) +#endif + +#endif // NL_OS_MAC // -------------------------------------------------- bool CDriverGL::getModes(std::vector &modes) @@ -2000,7 +2003,7 @@ bool CDriverGL::getModes(std::vector &modes) { CGDirectDisplayID dspy = display[i]; -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP CFArrayRef modeList = CGDisplayCopyAllDisplayModes(dspy, NULL); #else CFArrayRef modeList = CGDisplayAvailableModes(dspy); @@ -2014,7 +2017,7 @@ bool CDriverGL::getModes(std::vector &modes) for (CFIndex j = 0; j < CFArrayGetCount(modeList); ++j) { -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP CGDisplayModeRef mode = (CGDisplayModeRef)CFArrayGetValueAtIndex(modeList, j); uint8 bpp = bppFromDisplayMode(mode); #else @@ -2024,7 +2027,7 @@ bool CDriverGL::getModes(std::vector &modes) if (bpp >= 16) { -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP uint16 w = CGDisplayModeGetWidth(mode); uint16 h = CGDisplayModeGetHeight(mode); #else diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h b/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h index da033c7c1..9577bda40 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h @@ -27,7 +27,7 @@ using NL3D::CDriverGL; #endif @interface CocoaApplicationDelegate : NSObject -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP #endif { diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp index 6206d94c3..e4a531b9b 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +#include "../stdopengl.h" #include "cocoa_event_emitter.h" namespace NLMISC @@ -380,7 +381,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) case NSOtherMouseDown:break; case NSOtherMouseUp:break; case NSOtherMouseDragged:break; -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP case NSEventTypeGesture:break; case NSEventTypeMagnify:break; case NSEventTypeSwipe:break; diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.m b/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.m index 17500389c..e989f94d5 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.m +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.m @@ -47,7 +47,7 @@ static void viewDidResize(NSView* view, CDriverGL* driver) -(void)keyDown:(NSEvent*)event { -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP [[self inputContext] handleEvent:event]; #endif } diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h index 53078e95a..3f13a7345 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h @@ -28,7 +28,7 @@ using NL3D::CDriverGL; #endif @interface CocoaWindowDelegate : NSObject -#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NL_MAC_VERSION_10_6_UP #endif { diff --git a/code/nel/src/3d/driver/opengl/stdopengl.h b/code/nel/src/3d/driver/opengl/stdopengl.h index ab4eb8316..0894b8f72 100644 --- a/code/nel/src/3d/driver/opengl/stdopengl.h +++ b/code/nel/src/3d/driver/opengl/stdopengl.h @@ -100,4 +100,10 @@ #include "nel/3d/light.h" #include "nel/3d/index_buffer.h" +#ifdef NL_OS_MAC +#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#define NL_MAC_VERSION_10_6_UP +#else +#endif + #endif From b56686b9b7185777ac80aaef6f7aa4295a8f13db Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:42:31 +0100 Subject: [PATCH 7/9] Changed: Release modes list under OS X --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 8cfd26228..36ac67281 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -2050,6 +2050,10 @@ bool CDriverGL::getModes(std::vector &modes) // nldebug(" Display 0x%x: Mode %dx%d, %d BPP", dspy, w, h, bpp); } } + +#ifdef NL_MAC_VERSION_10_6_UP + CFRelease(modeList); +#endif } #elif defined (NL_OS_UNIX) From 744966acd6323bbb98e2f94aa6e5b2e79e98516c Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:43:02 +0100 Subject: [PATCH 8/9] Changed: More comments --HG-- branch : develop --- code/ryzom/client/src/misc.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index fd58729e6..e6b15c2d7 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -1403,19 +1403,25 @@ bool getRyzomModes(std::vector &videoModes, std::vectorgetModes(videoModes); + // Remove modes under 800x600 and get the unique strings sint i, j; - for (i=0; i < (sint)videoModes.size(); ++i) + for (i = 0; i < (sint)videoModes.size(); ++i) { if ((videoModes[i].Width < 800) || (videoModes[i].Height < 600)) { + // discard modes under 800x600 videoModes.erase(videoModes.begin()+i); --i; } else { bool bFound = false; + + // create string format with width and height string res = toString(videoModes[i].Width)+" x "+toString(videoModes[i].Height); + + // check if video mode already found in list for (j = 0; j < (sint)stringModeList.size(); ++j) { if (stringModeList[j] == res) @@ -1424,12 +1430,17 @@ bool getRyzomModes(std::vector &videoModes, std::vector &videoModes, std::vector= videoModes[nFoundMode].Width) && (videoModes[i].Height >= videoModes[nFoundMode].Height)) { @@ -1459,8 +1471,9 @@ bool getRyzomModes(std::vector &videoModes, std::vector Date: Sun, 8 Nov 2015 13:43:31 +0100 Subject: [PATCH 9/9] Fixed: If frequency is 0, use the first one in list --HG-- branch : develop --- code/ryzom/client/src/misc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index e6b15c2d7..775e9cc41 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -1478,7 +1478,8 @@ bool getRyzomModes(std::vector &videoModes, std::vector 0 && freq == ClientCfg.Frequency) + // if frequency is 0, take the first one else use the exact one + if (nFoundStringFreq == -1 && ((ClientCfg.Frequency == 0) || (freq == ClientCfg.Frequency))) { nFoundStringFreq = stringFreqList.size(); }