diff --git a/code/nel/include/nel/3d/zone_lighter.h b/code/nel/include/nel/3d/zone_lighter.h index f096fe130..83e4fdea5 100644 --- a/code/nel/include/nel/3d/zone_lighter.h +++ b/code/nel/include/nel/3d/zone_lighter.h @@ -469,12 +469,12 @@ private: volatile uint _ProcessExited; // *** Bitmap sharing - std::map _Bitmaps; + std::map _Bitmaps; // *** The zbuffer // ZBuffer mutex - NLMISC::CFastMutex _Mutex; + NLMISC::CFastMutex _Mutex; public: // Zbuffer pixels in meters diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index 82f73befc..2870c55b2 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -2078,7 +2078,7 @@ private: // Directx uint32 _Adapter; - D3DDEVTYPE _Rasterizer; + D3DDEVTYPE _Rasterizer; LPDIRECT3D9 _D3D; public: IDirect3DDevice9 *_DeviceInterface; diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp index 9ac6332a9..f38e15dd2 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp @@ -15,12 +15,11 @@ // along with this program. If not, see . #include "stddirect3d.h" +#include "driver_direct3d.h" #include "nel/misc/di_event_emitter.h" #include "nel/misc/mouse_device.h" -#include "driver_direct3d.h" - using namespace std; using namespace NLMISC; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index f7bf07762..1dbf9cc23 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -46,30 +46,33 @@ # endif //XF86VIDMODE #endif // NL_OS_UNIX -#include "driver_opengl_extension.h" - -#include "nel/3d/driver.h" -#include "nel/3d/material.h" -#include "nel/3d/shader.h" -#include "nel/3d/vertex_buffer.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/3d/ptr_set.h" +#include "nel/misc/bitmap.h" +#include "nel/misc/common.h" #include "nel/misc/heap_memory.h" #include "nel/misc/event_emitter_multi.h" -#include "driver_opengl_states.h" +#include "nel/misc/time_nl.h" + +#include "nel/3d/driver.h" +#include "nel/3d/material.h" +#include "nel/3d/shader.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/misc/time_nl.h" #include "nel/3d/occlusion_query.h" +#include "driver_opengl_states.h" +#include "driver_opengl_extension.h" + #ifdef NL_OS_WINDOWS #include "nel/misc/win_event_emitter.h" 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 8d0679d4f..da1f919bf 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -928,14 +928,14 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re { _win = wnd; - /* The NSView* extracted from a QWidget using winId() has bounds set to + /* The NSView* extracted from a QWidget using winId() has bounds set to * (QWidget::x(), QWidget::y(), QWidget::width(), QWidget::height()). * This causes cocoa to draw at an offset of x(), y() leaving an unhandled - * border in the NSView. The code below fixes this by translating the + * border in the NSView. The code below fixes this by translating the * coordinate system of the NSView back to 0,0. - * In my opinion this is an error in Qt since QWidget::x/y() are relative to - * parent and [NSView bounds.origin] is relative to it's own coordinate - * system. This are incompatible notations. Qt should handle the conversion. + * In my opinion this is an error in Qt since QWidget::x/y() are relative to + * parent and [NSView bounds.origin] is relative to it's own coordinate + * system. This are incompatible notations. Qt should handle the conversion. * Fixes: #1013 Viewport size when embedding NeL Cocoa view in Qt * (http://dev.ryzom.com/issues/1013) */ @@ -968,7 +968,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re // create a opengl view with the created format _glView = [[CocoaOpenGLView alloc] - initWithFrame:NSMakeRect(0, 0, mode.Width, mode.Height) + initWithFrame:NSMakeRect(0, 0, mode.Width, mode.Height) pixelFormat:format]; if(!_glView) @@ -997,7 +997,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re // let the open gl view handle the input [[containerView() window] makeFirstResponder:_glView]; - + // prevents scrambled content in the view before first swap [_ctx flushBuffer]; [_glView display]; @@ -1433,12 +1433,12 @@ bool CDriverGL::createWindow(const GfxMode &mode) initWithContentRect:NSMakeRect(0, 0, mode.Width, mode.Height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]; - if(!cocoa_window) + if(!cocoa_window) { nlerror("cannot create cocoa window"); return false; } - + // set the delegate which will handle window move events [cocoa_window setDelegate:[[CocoaWindowDelegate alloc] initWithDriver:this]]; @@ -1459,7 +1459,7 @@ bool CDriverGL::createWindow(const GfxMode &mode) // create a dummy view which works like the window on other platforms // the open gl view will be created as subview of this one. - window = [[NSView alloc] + window = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, mode.Width, mode.Height)]; [cocoa_window setContentView: (NSView*)window]; @@ -1547,7 +1547,7 @@ bool CDriverGL::destroyWindow() [containerView() release]; [_glView release]; } - + _ctx = nil; #elif defined (NL_OS_UNIX) @@ -1779,15 +1779,15 @@ bool CDriverGL::setMode(const GfxMode& mode) static int bppFromDisplayMode(CGDisplayModeRef mode) { CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding(mode); - - if(CFStringCompare(pixelEncoding, CFSTR(IO32BitDirectPixels), - kCFCompareCaseInsensitive) == kCFCompareEqualTo) + + if(CFStringCompare(pixelEncoding, CFSTR(IO32BitDirectPixels), + kCFCompareCaseInsensitive) == kCFCompareEqualTo) return 32; - - else if(CFStringCompare(pixelEncoding, CFSTR(IO16BitDirectPixels), + + else if(CFStringCompare(pixelEncoding, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) return 16; - + return 0; } @@ -1883,8 +1883,8 @@ bool CDriverGL::getModes(std::vector &modes) uint16 w = CGDisplayModeGetWidth(mode); uint16 h = CGDisplayModeGetHeight(mode); #else - uint16 w = (uint16)GetModeWidth(mode); - uint16 h = (uint16)GetModeHeight(mode); + uint16 w = (uint16)GetModeWidth(mode); + uint16 h = (uint16)GetModeHeight(mode); #endif // AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER // Add this mode @@ -2028,7 +2028,7 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode) mode.Width = _backBufferWidth; mode.Height = _backBufferHeight; } - + // in windowed mode else { @@ -2886,44 +2886,44 @@ bool CDriverGL::setMonitorColorProperties (const CMonitorColorProperties &proper } #ifdef NL_OS_MAC -void CDriverGL::setupApplicationMenu() +void CDriverGL::setupApplicationMenu() { NSMenu* menu; NSMenuItem* menuItem; NSString* title; NSString* appName; - + // get the applications name from it's process info appName = [[NSProcessInfo processInfo] processName]; - + // create an empty menu object menu = [[NSMenu alloc] initWithTitle:@""]; - + // add the about menu item title = [@"About " stringByAppendingString:appName]; [menu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; - + // separator [menu addItem:[NSMenuItem separatorItem]]; - + // add the hide application menu item title = [@"Hide " stringByAppendingString:appName]; [menu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; - + // add the hide others menu item menuItem = [menu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; - + // add the show all menu item [menu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; - + // separator [menu addItem:[NSMenuItem separatorItem]]; - + /* TODO on quit send EventDestroyWindowId */ @@ -2931,17 +2931,17 @@ void CDriverGL::setupApplicationMenu() title = [@"Quit " stringByAppendingString:appName]; [menu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; - + // create an empty menu item and put the new menu into it as a subitem menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; [menuItem setSubmenu:menu]; - + // create a menu for the application [NSApp setMainMenu:[[NSMenu alloc] initWithTitle:@""]]; - + // attach the new menu to the applications menu - [[NSApp mainMenu] addItem:menuItem]; + [[NSApp mainMenu] addItem:menuItem]; } #endif diff --git a/code/nel/src/misc/co_task.cpp b/code/nel/src/misc/co_task.cpp index 89eb89c7a..ca0a7fe58 100644 --- a/code/nel/src/misc/co_task.cpp +++ b/code/nel/src/misc/co_task.cpp @@ -78,7 +78,7 @@ namespace NLMISC // the thread of the task IThread *_TaskThread; /// The mutex of the task task - CFastMutex _TaskMutex; + CFastMutex _TaskMutex; CCoTask *_CoTask; @@ -371,7 +371,7 @@ namespace NLMISC nlverify(getcontext(&_PImpl->_Ctx) == 0); // change the task context - _PImpl->_Ctx.uc_stack.ss_sp = _PImpl->_Stack; + _PImpl->_Ctx.uc_stack.ss_sp = _PImpl->_Stack; _PImpl->_Ctx.uc_stack.ss_size = NL_TASK_STACK_SIZE; _PImpl->_Ctx.uc_link = NULL; diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 4b0fa1212..c07081704 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -3874,7 +3874,7 @@ public: void execute (CCtrlBase * /* pCaller */, const std::string &sParams) { bool loop = getParam(sParams, "loop")=="1"; - + uint xFade; fromString(getParam(sParams, "xfade"), xFade); diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp index 3fa53ef42..46f0cd9e7 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp @@ -141,7 +141,6 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) { HandleSystemCursorCapture(event); - if (event == EventDisplayChangeId) { switch (getCurrentColorDepth()) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 89f6a82f5..60317aa1a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -5718,7 +5718,7 @@ void CInterfaceManager::connectYuboChat() if(KlientChatPort != 0 && !_YuboChat.connected()) { // NB: hard code url, to avoid "client.cfg trojan" - // (a client.cfg with an url pointing to a hackcer site, to grab login/password) + // (a client.cfg with an url pointing to a hacker site, to grab login/password) extern std::string LoginLogin, LoginPassword; _YuboChat.connect(string("chat.ryzom.com:")+toString(KlientChatPort), LoginLogin, LoginPassword); diff --git a/code/ryzom/client/src/interface_v3/view_renderer.cpp b/code/ryzom/client/src/interface_v3/view_renderer.cpp index ffe61b1cb..42e105a45 100644 --- a/code/ryzom/client/src/interface_v3/view_renderer.cpp +++ b/code/ryzom/client/src/interface_v3/view_renderer.cpp @@ -765,6 +765,7 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std: // Insert in map. _TextureMap.insert( make_pair(image.Name, textureId) ); } + // if this is a cursor texture, extract it now (supported for rgba only now, because of the blit) if (CustomMouse.isAlphaBlendedCursorSupported()) { diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 726d8aa2b..6f06d1b5f 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -1095,8 +1095,6 @@ void initShardDisplay() void onlogin(bool vanishScreen = true) { - - CInterfaceManager *pIM = CInterfaceManager::getInstance(); // Remove space before and after each string login & password diff --git a/code/ryzom/client/src/view.cpp b/code/ryzom/client/src/view.cpp index 21ffe7252..704ead91d 100644 --- a/code/ryzom/client/src/view.cpp +++ b/code/ryzom/client/src/view.cpp @@ -271,7 +271,7 @@ void CView::cameraDistance(float dist) void CView::changeCameraHeight(bool up, bool down) { // If the user is not inside a building. - if(UserEntity->forceIndoorFPV() == false) + if(!UserEntity->forceIndoorFPV()) { if(up) { @@ -293,7 +293,7 @@ void CView::changeCameraHeight(bool up, bool down) void CView::changeCameraDist(bool forward, bool backward) { // If the user is not inside a building. - if(UserEntity->forceIndoorFPV() == false) + if(!UserEntity->forceIndoorFPV()) { if(forward) decreaseCameraDist();