Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2010-11-02 14:00:32 +01:00
parent e6889998a6
commit d60bcaec05
12 changed files with 57 additions and 57 deletions

View file

@ -469,12 +469,12 @@ private:
volatile uint _ProcessExited;
// *** Bitmap sharing
std::map<std::string, NLMISC::CBitmap> _Bitmaps;
std::map<std::string, NLMISC::CBitmap> _Bitmaps;
// *** The zbuffer
// ZBuffer mutex
NLMISC::CFastMutex _Mutex;
NLMISC::CFastMutex _Mutex;
public:
// Zbuffer pixels in meters

View file

@ -2078,7 +2078,7 @@ private:
// Directx
uint32 _Adapter;
D3DDEVTYPE _Rasterizer;
D3DDEVTYPE _Rasterizer;
LPDIRECT3D9 _D3D;
public:
IDirect3DDevice9 *_DeviceInterface;

View file

@ -15,12 +15,11 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#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;

View file

@ -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"

View file

@ -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<GfxMode> &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

View file

@ -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;

View file

@ -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);

View file

@ -141,7 +141,6 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
{
HandleSystemCursorCapture(event);
if (event == EventDisplayChangeId)
{
switch (getCurrentColorDepth())

View file

@ -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);

View file

@ -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())
{

View file

@ -1095,8 +1095,6 @@ void initShardDisplay()
void onlogin(bool vanishScreen = true)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
// Remove space before and after each string login & password

View file

@ -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();