Changed: #853 Compilation on 64-bits platforms
This commit is contained in:
parent
b3db0fe098
commit
f1b882a068
25 changed files with 106 additions and 116 deletions
|
@ -98,7 +98,7 @@ public:
|
|||
/** Process a win32 message.
|
||||
* Return true if the message must be trapped, false if DefWindowProc must be called afterwards
|
||||
*/
|
||||
bool processMessage (HWND hWnd, uint32 msg, uint32 wParam, uint32 lParam, CEventServer *server=NULL);
|
||||
bool processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPARAM lParam, CEventServer *server=NULL);
|
||||
private:
|
||||
CWinEventServer _InternalServer;
|
||||
HWND _HWnd;
|
||||
|
|
|
@ -2308,13 +2308,13 @@ bool CDriverD3D::setMode (const GfxMode& mode)
|
|||
if( mode.Windowed )
|
||||
{
|
||||
// Set windowed-mode style
|
||||
SetWindowLongPtrW( _HWnd, GWL_STYLE, D3D_WINDOWED_STYLE|WS_VISIBLE);
|
||||
SetWindowLongW( _HWnd, GWL_STYLE, D3D_WINDOWED_STYLE|WS_VISIBLE);
|
||||
_FullScreen = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set fullscreen-mode style
|
||||
SetWindowLongPtrW( _HWnd, GWL_STYLE, D3D_FULLSCREEN_STYLE|WS_VISIBLE);
|
||||
SetWindowLongW( _HWnd, GWL_STYLE, D3D_FULLSCREEN_STYLE|WS_VISIBLE);
|
||||
_FullScreen = true;
|
||||
}
|
||||
|
||||
|
@ -2332,7 +2332,7 @@ bool CDriverD3D::setMode (const GfxMode& mode)
|
|||
WndRect.top=_WindowY;
|
||||
WndRect.right=_WindowX+_CurrentMode.Width;
|
||||
WndRect.bottom=_WindowY+_CurrentMode.Height;
|
||||
AdjustWindowRect(&WndRect, GetWindowLongPtrW (_HWnd, GWL_STYLE), FALSE);
|
||||
AdjustWindowRect(&WndRect, GetWindowLongW (_HWnd, GWL_STYLE), FALSE);
|
||||
|
||||
SetWindowPos( _HWnd, HWND_NOTOPMOST,
|
||||
std::max ((int)WndRect.left, 0), std::max ((int)WndRect.top, 0),
|
||||
|
@ -3742,7 +3742,7 @@ void CDriverD3D::findNearestFullscreenVideoMode()
|
|||
{
|
||||
sint32 nbPixels = _CurrentMode.Width * _CurrentMode.Height;
|
||||
sint32 minError = nbPixels;
|
||||
uint bestMode = modes.size();
|
||||
uint bestMode = (uint)modes.size();
|
||||
for(uint i=0; i < modes.size(); i++)
|
||||
{
|
||||
if(!modes[i].Windowed)
|
||||
|
|
|
@ -3472,7 +3472,7 @@ uint loadARBFragmentProgramStringNative(const char *prog, bool forceNativeProgra
|
|||
}
|
||||
nglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, progID);
|
||||
GLint errorPos, isNative;
|
||||
nglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(prog), prog);
|
||||
nglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(prog), prog);
|
||||
nglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
|
||||
nglGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isNative);
|
||||
|
|
|
@ -664,7 +664,7 @@ void CDriverGL::setupUVPtr(uint stage, CVertexBufferInfo &VB, uint uvId)
|
|||
{
|
||||
case CVertexBufferInfo::HwATI:
|
||||
nglArrayObjectATI(GL_TEXTURE_COORD_ARRAY, numTexCoord, GL_FLOAT, VB.VertexSize, VB.VertexObjectId,
|
||||
/*(uint)*/ (ptrdiff_t) VB.ValuePtr[CVertexBuffer::TexCoord0+uvId]);
|
||||
(ptrdiff_t) VB.ValuePtr[CVertexBuffer::TexCoord0+uvId]);
|
||||
break;
|
||||
case CVertexBufferInfo::HwARB:
|
||||
_DriverGLStates.bindARBVertexBuffer(VB.VertexObjectId);
|
||||
|
@ -928,7 +928,7 @@ void CDriverGL::setupGlArraysStd(CVertexBufferInfo &vb)
|
|||
nlassert (numVertexCoord >= 2);
|
||||
|
||||
_DriverGLStates.enableVertexArray(true);
|
||||
nglArrayObjectATI(GL_VERTEX_ARRAY, numVertexCoord, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Position]);
|
||||
nglArrayObjectATI(GL_VERTEX_ARRAY, numVertexCoord, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Position]);
|
||||
// setup normal ptr.
|
||||
//-----------
|
||||
// Check for normal param in vertex buffer
|
||||
|
@ -937,7 +937,7 @@ void CDriverGL::setupGlArraysStd(CVertexBufferInfo &vb)
|
|||
// Check type
|
||||
nlassert (vb.Type[CVertexBuffer::Normal]==CVertexBuffer::Float3);
|
||||
_DriverGLStates.enableNormalArray(true);
|
||||
nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Normal]);
|
||||
nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Normal]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -287,7 +287,7 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess
|
|||
OutputDebugString("\n");*/
|
||||
|
||||
sint count = 0;
|
||||
uint n = strlen(message);
|
||||
uint n = (uint)strlen(message);
|
||||
std::string s(&str2.c_str()[0], (str2.size() - n));
|
||||
OutputDebugStringW((LPCWSTR)ucstring::makeFromUtf8(s).c_str());
|
||||
|
||||
|
@ -655,7 +655,7 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m
|
|||
|
||||
// procname is host/service_name-sid we only want the service_name to avoid redondant mail
|
||||
string procname;
|
||||
sint pos = args.ProcessName.find ("/");
|
||||
string::size_type pos = args.ProcessName.find ("/");
|
||||
if (pos == string::npos)
|
||||
{
|
||||
procname = args.ProcessName;
|
||||
|
|
|
@ -387,11 +387,15 @@ void CFileContainer::loadRemappedFiles (const std::string &file)
|
|||
{
|
||||
f.getline(sTmp, 512);
|
||||
str = sTmp;
|
||||
if (str.find(','))
|
||||
std::string::size_type pos = str.find(',');
|
||||
if (pos != string::npos)
|
||||
{
|
||||
removeAllUnusedChar(str);
|
||||
if (!str.empty())
|
||||
remapFile( str.substr(0,str.find(',')), str.substr(str.find(',')+1, str.size()) );
|
||||
{
|
||||
pos = str.find(',');
|
||||
remapFile( str.substr(0,pos), str.substr(pos+1, str.size()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1551,7 +1555,7 @@ void CFileContainer::memoryCompress()
|
|||
|
||||
SSMext.memoryCompress();
|
||||
SSMpath.memoryCompress();
|
||||
uint nDbg = _Files.size();
|
||||
uint nDbg = (uint)_Files.size();
|
||||
nlinfo ("PATH: Number of file : %d", nDbg);
|
||||
nDbg = SSMext.getCount();
|
||||
nlinfo ("PATH: Number of different extension : %d", nDbg);
|
||||
|
@ -1570,7 +1574,7 @@ void CFileContainer::memoryCompress()
|
|||
}
|
||||
else
|
||||
{
|
||||
nSize += it->second.Name.size() + 1;
|
||||
nSize += (uint)it->second.Name.size() + 1;
|
||||
}
|
||||
nNb++;
|
||||
it++;
|
||||
|
@ -1591,7 +1595,7 @@ void CFileContainer::memoryCompress()
|
|||
{
|
||||
strcpy(_AllFileNames+nSize, rFE.Name.c_str());
|
||||
_MCFiles[nNb].Name = _AllFileNames+nSize;
|
||||
nSize += rFE.Name.size() + 1;
|
||||
nSize += (uint)rFE.Name.size() + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1678,7 +1682,7 @@ int CFile::getLastSeparator (const string &filename)
|
|||
pos = filename.find_last_of ('@');
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
return (int)pos;
|
||||
}
|
||||
|
||||
string CFile::getFilename (const string &filename)
|
||||
|
@ -2122,7 +2126,7 @@ static bool CopyMoveFile(const char *dest, const char *src, bool copyFile, bool
|
|||
{
|
||||
if (progress)
|
||||
{
|
||||
readSize += s;
|
||||
readSize += (uint32)s;
|
||||
progress->progress((float) readSize / totalSize);
|
||||
}
|
||||
size_t ws = fwrite(buffer, s, 1, fp2);
|
||||
|
@ -2314,7 +2318,7 @@ bool CPath::makePathRelative (const char *basePath, std::string &relativePath)
|
|||
if (strncmp (tmp.c_str (), src.c_str (), tmp.length ()) == 0)
|
||||
{
|
||||
// Truncate
|
||||
uint size = tmp.length ();
|
||||
uint size = (uint)tmp.length ();
|
||||
|
||||
// Same path ?
|
||||
if (size == src.length ())
|
||||
|
|
|
@ -179,7 +179,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
access.value().push_back(str);
|
||||
}
|
||||
cwd->_History.push_back(str);
|
||||
cwd->_PosInHistory = cwd->_History.size();
|
||||
cwd->_PosInHistory = (uint)cwd->_History.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -440,9 +440,9 @@ void CWinDisplayer::open (string titleBar, bool iconified, sint x, sint y, sint
|
|||
_HInputEdit = CreateWindowExW(WS_EX_OVERLAPPEDWINDOW, RICHEDIT_CLASSW, L"", WS_CHILD | WS_VISIBLE
|
||||
/*| ES_MULTILINE*/ | ES_WANTRETURN | ES_NOHIDESEL | ES_AUTOHSCROLL, 0, h-_InputEditHeight, w, _InputEditHeight,
|
||||
_HWnd, NULL, (HINSTANCE) GetWindowLongPtr(_HWnd, GWLP_HINSTANCE), NULL);
|
||||
SendMessage (_HInputEdit, WM_SETFONT, (LONG) _HFont, TRUE);
|
||||
SendMessageW (_HInputEdit, WM_SETFONT, (LONG) _HFont, TRUE);
|
||||
|
||||
DWORD dwEvent = SendMessage(_HInputEdit, EM_GETEVENTMASK, (WPARAM)0, (LPARAM)0);
|
||||
LRESULT dwEvent = SendMessageW(_HInputEdit, EM_GETEVENTMASK, (WPARAM)0, (LPARAM)0);
|
||||
dwEvent |= ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_CHANGE;
|
||||
SendMessage(_HInputEdit, EM_SETEVENTMASK, (WPARAM)0, (LPARAM)dwEvent);
|
||||
|
||||
|
@ -481,23 +481,23 @@ void CWinDisplayer::clear ()
|
|||
}
|
||||
|
||||
// get number of line
|
||||
sint nLine = SendMessage (_HEdit, EM_GETLINECOUNT, 0, 0) - 1;
|
||||
LRESULT nLine = SendMessageW (_HEdit, EM_GETLINECOUNT, 0, 0) - 1;
|
||||
|
||||
// get size of the last line
|
||||
sint nIndex = SendMessage (_HEdit, EM_LINEINDEX, nLine, 0);
|
||||
LRESULT nIndex = SendMessageW (_HEdit, EM_LINEINDEX, nLine, 0);
|
||||
|
||||
// select all the text
|
||||
SendMessage (_HEdit, EM_SETSEL, 0, nIndex);
|
||||
SendMessageW (_HEdit, EM_SETSEL, 0, nIndex);
|
||||
|
||||
// clear all the text
|
||||
SendMessage (_HEdit, EM_REPLACESEL, FALSE, (LONG) "");
|
||||
SendMessageW (_HEdit, EM_REPLACESEL, FALSE, (LONG) "");
|
||||
|
||||
SendMessage(_HEdit,EM_SETMODIFY,(WPARAM)TRUE,(LPARAM)0);
|
||||
SendMessageW(_HEdit,EM_SETMODIFY,(WPARAM)TRUE,(LPARAM)0);
|
||||
|
||||
if ( focus )
|
||||
{
|
||||
SendMessage(_HEdit,EM_SETOPTIONS,ECOOP_OR,(LPARAM)ECO_AUTOVSCROLL);
|
||||
SendMessage(_HEdit,EM_SETOPTIONS,ECOOP_OR,(LPARAM)ECO_AUTOHSCROLL);
|
||||
SendMessageW(_HEdit,EM_SETOPTIONS,ECOOP_OR,(LPARAM)ECO_AUTOVSCROLL);
|
||||
SendMessageW(_HEdit,EM_SETOPTIONS,ECOOP_OR,(LPARAM)ECO_AUTOHSCROLL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ void CWinDisplayer::display_main ()
|
|||
// find how many lines we have to remove in the current output to add new lines
|
||||
|
||||
// get number of line
|
||||
sint nLine = SendMessage (_HEdit, EM_GETLINECOUNT, 0, 0) - 1;
|
||||
LRESULT nLine = SendMessageW (_HEdit, EM_GETLINECOUNT, 0, 0) - 1;
|
||||
|
||||
if (_HistorySize > 0 && nLine+vecSize > _HistorySize)
|
||||
{
|
||||
|
@ -558,15 +558,15 @@ void CWinDisplayer::display_main ()
|
|||
}
|
||||
else
|
||||
{
|
||||
sint oldIndex1 = SendMessage (_HEdit, EM_LINEINDEX, 0, 0);
|
||||
LRESULT oldIndex1 = SendMessageW (_HEdit, EM_LINEINDEX, 0, 0);
|
||||
//nlassert (oldIndex1 != -1);
|
||||
sint oldIndex2 = SendMessage (_HEdit, EM_LINEINDEX, nblineremove, 0);
|
||||
LRESULT oldIndex2 = SendMessageW (_HEdit, EM_LINEINDEX, nblineremove, 0);
|
||||
//nlassert (oldIndex2 != -1);
|
||||
SendMessage (_HEdit, EM_SETSEL, oldIndex1, oldIndex2);
|
||||
SendMessage (_HEdit, EM_REPLACESEL, FALSE, (LONG) "");
|
||||
SendMessageW (_HEdit, EM_SETSEL, oldIndex1, oldIndex2);
|
||||
SendMessageW (_HEdit, EM_REPLACESEL, FALSE, (LONG) "");
|
||||
|
||||
// update the selection due to the erasing
|
||||
sint dt = oldIndex2 - oldIndex1;
|
||||
sint dt = (sint)(oldIndex2 - oldIndex1);
|
||||
if (startSel < 65000)
|
||||
{
|
||||
if ((sint)startSel-dt < 0) startSel = -1;
|
||||
|
|
|
@ -102,7 +102,7 @@ TMouseButton CWinEventEmitter::getButtons() const
|
|||
}
|
||||
|
||||
|
||||
bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, uint32 wParam, uint32 lParam, CEventServer *server)
|
||||
bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPARAM lParam, CEventServer *server)
|
||||
{
|
||||
if (!server)
|
||||
server=&_InternalServer;
|
||||
|
@ -265,7 +265,7 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, uint32 wParam, uin
|
|||
server->postEvent (new CEventDestroyWindow (this));
|
||||
break;
|
||||
case WM_DISPLAYCHANGE:
|
||||
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), wParam, this));
|
||||
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this));
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
if (_MouseEventsEnabled)
|
||||
|
@ -298,7 +298,7 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, uint32 wParam, uin
|
|||
case WM_INPUTLANGCHANGE:
|
||||
if ( _IMEEventsEnabled )
|
||||
{
|
||||
server->postEvent( new CEventIME( msg, wParam, lParam, this ) );
|
||||
server->postEvent( new CEventIME( msg, (uint32)wParam, (uint32)lParam, this ) );
|
||||
return true; // trap message
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#include "events_listener.h"
|
||||
#include "interface_v3/interface_manager.h"
|
||||
|
||||
#include "nel/misc/algo.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
|
@ -520,7 +518,7 @@ void CActionsManager::addCategory (const CCategory &category)
|
|||
for (i=0; i<category.BaseActions.size (); i++)
|
||||
{
|
||||
CCategoryLocator locator;
|
||||
locator.CategoryId = _Categories.size ()-1;
|
||||
locator.CategoryId = (uint)_Categories.size ()-1;
|
||||
locator.BaseActionId = i;
|
||||
_ActionCategory.insert (TActionBaseActionMap::value_type (category.BaseActions[i].Name, locator));
|
||||
}
|
||||
|
|
|
@ -23,19 +23,9 @@
|
|||
/////////////
|
||||
// INCLUDE //
|
||||
/////////////
|
||||
// misc
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/events.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/misc/file.h"
|
||||
|
||||
// client
|
||||
#include "events_listener.h"
|
||||
// std
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
|
||||
///////////
|
||||
// CLASS //
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
/////////////
|
||||
// INCLUDE //
|
||||
/////////////
|
||||
// Misc.
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
||||
// Client
|
||||
#include "actions.h" // Manage Inputs
|
||||
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
/////////////
|
||||
// INCLUDE //
|
||||
/////////////
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/string_mapper.h"
|
||||
|
||||
// 3d
|
||||
#include "nel/3d/u_animation_set.h"
|
||||
#include "nel/sound/sound_anim_manager.h"
|
||||
//
|
||||
#include "game_share/magic_fx.h"
|
||||
#include "client_sheets/animation_set_list_sheet.h"
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
#ifndef CDB_H
|
||||
#define CDB_H
|
||||
|
||||
// misc
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/smart_ptr.h"
|
||||
#include "nel/misc/string_mapper.h"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
namespace NLMISC
|
||||
|
@ -162,7 +157,7 @@ public:
|
|||
/**
|
||||
* Return the count of strings composing this id
|
||||
*/
|
||||
uint size() const { return _Ids.size(); }
|
||||
uint size() const { return (uint)_Ids.size(); }
|
||||
|
||||
/** Return an element. empty if bad index
|
||||
*/
|
||||
|
|
|
@ -707,10 +707,10 @@ ucstring CClientChatManager::getString( CBitMemStream& bms, ucstring& ucstr )
|
|||
// search if a parameter exists in the string
|
||||
sprintf(chTmp,"$%d",dynParamIdx);
|
||||
ucstring ucstrTmp( chTmp );
|
||||
sint32 idx = ucstr.find(ucstrTmp);
|
||||
ucstring::size_type idx = ucstr.find(ucstrTmp);
|
||||
|
||||
// if there's a parameter in the string
|
||||
if( idx != -1 )
|
||||
if( idx != ucstring::npos )
|
||||
{
|
||||
char c = (char)ucstr[idx+ucstrTmp.size()];
|
||||
switch( c )
|
||||
|
@ -856,10 +856,10 @@ bool CClientChatManager::getString( ucstring &result, std::vector<uint64>& args,
|
|||
// search if a parameter exists in the string
|
||||
sprintf(chTmp,"$%d",dynParamIdx);
|
||||
ucstring ucstrTmp( chTmp );
|
||||
sint32 idx = result.find(ucstrTmp);
|
||||
ucstring::size_type idx = result.find(ucstrTmp);
|
||||
|
||||
// if there's a parameter in the string
|
||||
if( idx != -1 )
|
||||
if( idx != ucstring::npos )
|
||||
{
|
||||
ucstring rep;
|
||||
rep = "???";
|
||||
|
|
|
@ -102,7 +102,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
|
|||
if(BrickFamily==BRICK_FAMILIES::Unknown)
|
||||
{
|
||||
string sheetName= Id.toString();
|
||||
sint end= sheetName.find(".sbrick")-2;
|
||||
std::string::size_type end= sheetName.find(".sbrick")-2;
|
||||
BrickFamily = BRICK_FAMILIES::toSBrickFamily ( strupr(sheetName.substr(0,end)) );
|
||||
if(BrickFamily==BRICK_FAMILIES::Unknown)
|
||||
nlwarning("Unknown Family for SBrick: %s", sheetName.c_str());
|
||||
|
|
|
@ -74,9 +74,9 @@ std::string IActionHandler::getParam (const string &Params, const string &ParamN
|
|||
string param = strlwr (ParamName);
|
||||
while (allparam.size() > 0)
|
||||
{
|
||||
int e = allparam.find('=');
|
||||
if (e <= 0) break;
|
||||
int p = allparam.find('|');
|
||||
std::string::size_type e = allparam.find('=');
|
||||
if (e == std::string::npos || e == 0) break;
|
||||
std::string::size_type p = allparam.find('|');
|
||||
string tmp = strlwr(allparam.substr(0,e));
|
||||
skipBlankAtEnd(tmp);
|
||||
if (tmp == param)
|
||||
|
@ -86,7 +86,7 @@ std::string IActionHandler::getParam (const string &Params, const string &ParamN
|
|||
skipBlankAtEnd(tmp2);
|
||||
return tmp2;
|
||||
}
|
||||
if (p <= 0) break;
|
||||
if (p == std::string::npos || p == 0) break;
|
||||
allparam = allparam.substr(p+1,allparam.size());
|
||||
skipBlankAtStart (allparam);
|
||||
}
|
||||
|
@ -100,9 +100,9 @@ void IActionHandler::getAllParams (const string &Params, vector< pair<string,str
|
|||
skipBlankAtStart (allparam);
|
||||
while (allparam.size() > 0)
|
||||
{
|
||||
int e = allparam.find('=');
|
||||
if (e <= 0) break;
|
||||
int p = allparam.find('|');
|
||||
std::string::size_type e = allparam.find('=');
|
||||
if (e == std::string::npos || e == 0) break;
|
||||
std::string::size_type p = allparam.find('|');
|
||||
string tmp = strlwr(allparam.substr(0,e));
|
||||
skipBlankAtEnd(tmp);
|
||||
|
||||
|
@ -112,7 +112,7 @@ void IActionHandler::getAllParams (const string &Params, vector< pair<string,str
|
|||
|
||||
vAllParams.push_back(pair<string,string>(tmp,tmp2));
|
||||
|
||||
if (p <= 0) break;
|
||||
if (p == std::string::npos || p == 0) break;
|
||||
allparam = allparam.substr(p+1,allparam.size());
|
||||
skipBlankAtStart (allparam);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#define RZ_CTRL_EDITBOX_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/3d/u_texture.h"
|
||||
|
||||
|
||||
class CEventDescriptor;
|
||||
|
@ -37,7 +36,7 @@ public:
|
|||
~CGroupEditBox();
|
||||
|
||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
|
||||
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||
|
||||
virtual void draw();
|
||||
|
||||
|
@ -109,7 +108,7 @@ public:
|
|||
sint32 getCurrentHistoricIndex () const {return _CurrentHistoricIndex;}
|
||||
void setCurrentHistoricIndex (sint32 index) {_CurrentHistoricIndex=index;}
|
||||
const ucstring &getHistoric(uint32 index) const {return _Historic[index];}
|
||||
uint32 getNumHistoric() const {return _Historic.size ();}
|
||||
uint32 getNumHistoric() const {return (uint32)_Historic.size ();}
|
||||
|
||||
// Get on change action handler
|
||||
const std::string &getAHOnChange() const {return _AHOnChange;}
|
||||
|
@ -345,7 +344,7 @@ private:
|
|||
//
|
||||
bool isFiltered(ucchar c)
|
||||
{
|
||||
uint length = _NegativeFilter.size();
|
||||
uint length = (uint)_NegativeFilter.size();
|
||||
for (uint k = 0; k < length; ++k)
|
||||
{
|
||||
if ((ucchar) _NegativeFilter[k] == c) return true;
|
||||
|
|
|
@ -168,7 +168,7 @@ void CGroupInSceneBubbleManager::alignMessagePopup (vector<CPopup> &rList, bool
|
|||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
||||
if (pRoot)
|
||||
{
|
||||
sint i = rList.size ()-1;
|
||||
sint i = (sint)rList.size ()-1;
|
||||
|
||||
rList[i].Group->invalidateCoords();
|
||||
rList[i].Group->updateCoords();
|
||||
|
@ -229,7 +229,7 @@ void CGroupInSceneBubbleManager::init ()
|
|||
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||
|
||||
CInterfaceGroup *group = pIM->createGroupInstance ("3dbulle_L",
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||
if (group)
|
||||
{
|
||||
// Link to the interface
|
||||
|
@ -457,7 +457,7 @@ void CGroupInSceneBubbleManager::update ()
|
|||
ucstring finalString = res;
|
||||
for(;;)
|
||||
{
|
||||
uint index = finalString.find (ucstring("{break}"));
|
||||
std::string::size_type index = finalString.find (ucstring("{break}"));
|
||||
if (index == ucstring::npos) break;
|
||||
finalString = finalString.substr (0, index) + finalString.substr(index+7,finalString.size());
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ void CGroupInSceneBubbleManager::addSkillPopup (uint skillId, sint delta, uint t
|
|||
templateParams.push_back (std::pair<std::string,std::string>("delta", toString(delta)));
|
||||
|
||||
CInterfaceGroup *group = pIM->createGroupInstance ("skill_popup",
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||
if (group)
|
||||
{
|
||||
// Skill name
|
||||
|
@ -575,7 +575,7 @@ void CGroupInSceneBubbleManager::addMessagePopup (const ucstring &message, CRGBA
|
|||
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||
|
||||
CInterfaceGroup *group = pIM->createGroupInstance ("message_popup",
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||
if (group)
|
||||
{
|
||||
// Skill name
|
||||
|
@ -624,7 +624,7 @@ void CGroupInSceneBubbleManager::addMessagePopupCenter (const ucstring &message,
|
|||
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||
|
||||
CInterfaceGroup *group = pIM->createGroupInstance ("message_popup_center",
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||
if (group)
|
||||
{
|
||||
// Skill name
|
||||
|
@ -695,7 +695,7 @@ CGroupInSceneBubbleManager::CPopupContext *CGroupInSceneBubbleManager::buildCont
|
|||
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||
|
||||
CInterfaceGroup *group = pIM->createGroupInstance (templateName+v+h,
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
|
||||
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
|
||||
if (group)
|
||||
{
|
||||
// Target available ?
|
||||
|
@ -1331,7 +1331,7 @@ void CGroupInSceneBubble::next()
|
|||
void CGroupInSceneBubble::skip()
|
||||
{
|
||||
if (_TextParts.empty()) return;
|
||||
_CurrentPart = _TextParts.size()-1;
|
||||
_CurrentPart = (uint32)_TextParts.size()-1;
|
||||
_TimeOut = TimeInSec;
|
||||
}
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ void CSPhraseManager::updateBookDB()
|
|||
|
||||
// Fill All the book.
|
||||
TPhraseMap::const_iterator it= _PhraseMap.begin();
|
||||
sint numBookFill= _PhraseMap.size();
|
||||
sint numBookFill= (sint)_PhraseMap.size();
|
||||
sint i= 0;
|
||||
while(i<numBookFill)
|
||||
{
|
||||
|
@ -2731,7 +2731,7 @@ NLMISC::TGameCycle CSPhraseManager::getPowerDisableTime(const CSPhraseCom &phras
|
|||
{
|
||||
for (uint prop = 0; prop < brick->Properties.size(); ++prop)
|
||||
{
|
||||
size_t endPos = brick->Properties[prop].Text.find(":");
|
||||
std::string::size_type endPos = brick->Properties[prop].Text.find(":");
|
||||
if (endPos != std::string::npos)
|
||||
{
|
||||
std::string propName = brick->Properties[prop].Text.substr(0, endPos);
|
||||
|
@ -3432,7 +3432,7 @@ void CSPhraseManager::updatePhraseProgressionDB()
|
|||
// Fill All the progression db.
|
||||
uint numProgressFill= 0;
|
||||
if(_BookSkillFitler!=SKILLS::unknown)
|
||||
numProgressFill= _ProgressionPhrases[_BookSkillFitler].Phrases.size();
|
||||
numProgressFill= (uint)_ProgressionPhrases[_BookSkillFitler].Phrases.size();
|
||||
uint i;
|
||||
uint progressIndex[NumProgressType];
|
||||
for(i=0;i<NumProgressType;i++)
|
||||
|
@ -3756,7 +3756,7 @@ void CSPhraseManager::computePhraseProgression()
|
|||
ucstring newNumber= toString("%3d", number);
|
||||
pse.Text.replace(start, k-start, newNumber);
|
||||
// and skip this number
|
||||
k= start + newNumber.size();
|
||||
k= start + (uint)newNumber.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4035,9 +4035,9 @@ void CSPhraseManager::getCombatWeaponRestriction(ucstring &text, const CSPhra
|
|||
if(i<skills.size()-1)
|
||||
idName+= "_";
|
||||
|
||||
if( skillName.find("SFM") != -1 )
|
||||
if( skillName.find("SFM") != std::string::npos )
|
||||
usableWithMelee = true;
|
||||
if( skillName.find("SFR") != -1 )
|
||||
if( skillName.find("SFR") != std::string::npos )
|
||||
usableWithRange = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -969,7 +969,7 @@ void setRegKey(const string &ValueName, const string &Value)
|
|||
|
||||
if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, RootKey.c_str(), 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwDisp) == ERROR_SUCCESS)
|
||||
{
|
||||
RegSetValueEx(hkey, ValueName.c_str(), 0L, REG_SZ, (const BYTE *)Value.c_str(), (Value.size())+1);
|
||||
RegSetValueEx(hkey, ValueName.c_str(), 0L, REG_SZ, (const BYTE *)Value.c_str(), (DWORD)(Value.size())+1);
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
else
|
||||
|
@ -1922,7 +1922,7 @@ class CAHOpenURL : public IActionHandler
|
|||
return;
|
||||
}
|
||||
|
||||
size_t pos_lang = url.find("/en/");
|
||||
string::size_type pos_lang = url.find("/en/");
|
||||
|
||||
if(pos_lang!=string::npos)
|
||||
url.replace(pos_lang+1, 2, ClientCfg.getHtmlLanguageCode());
|
||||
|
@ -2579,7 +2579,7 @@ class CAHOnCreateAccountSubmit : public IActionHandler
|
|||
params += "&TaC=1";
|
||||
|
||||
std::string md5 = results[0] + results[1] + "" + results[3];
|
||||
md5 = NLMISC::getMD5((uint8*)md5.data(), md5.size()).toString();
|
||||
md5 = NLMISC::getMD5((uint8*)md5.data(), (uint32)md5.size()).toString();
|
||||
|
||||
params += "&SC=" + md5;
|
||||
std::string lang = ClientCfg.LanguageCode;
|
||||
|
@ -2933,7 +2933,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
|
||||
if(pPM->isVerboseLog())
|
||||
{
|
||||
nlinfo ("Exploded, with nl, %d res", lines.size());
|
||||
nlinfo ("Exploded, with nl, %zu res", lines.size());
|
||||
/* for (uint i = 0; i < lines.size(); i++)
|
||||
{
|
||||
nlinfo (" > '%s'", lines[i].c_str());
|
||||
|
@ -2942,7 +2942,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
|
||||
if(lines.size() != nbs+1)
|
||||
{
|
||||
nlwarning("bad shard lines number %d != %d", lines.size(), nbs+1);
|
||||
nlwarning("bad shard lines number %zu != %d", lines.size(), nbs+1);
|
||||
nlwarning("'%s'", res.c_str());
|
||||
return "bad lines numbers (error code 5)";
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
|
||||
if(pPM->isVerboseLog())
|
||||
{
|
||||
nlinfo ("Exploded with '%s', %d res", "|", res.size());
|
||||
nlinfo ("Exploded with '%s', %zu res", "|", res.size());
|
||||
/* for (uint i = 0; i < res.size(); i++)
|
||||
{
|
||||
nlinfo (" > '%s'", res[i].c_str());
|
||||
|
@ -2963,7 +2963,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|||
|
||||
if (res.size() < 7 && res.size() > 8)
|
||||
{
|
||||
nlwarning("bad | numbers %d != %d", res.size(), 8);
|
||||
nlwarning("bad | numbers %zu != %d", res.size(), 8);
|
||||
nlwarning("'%s'", lines[i].c_str());
|
||||
return "bad pipe numbers (error code 6)";
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ void CToolPick::setIgnoreInstances(const std::string & ignoreInstances)
|
|||
string allKind = ignoreInstances;
|
||||
while (allKind.size() > 0)
|
||||
{
|
||||
int e = allKind.find(',');
|
||||
std::string::size_type e = allKind.find(',');
|
||||
string tmp;
|
||||
if (e <= 0)
|
||||
if (e == std::string::npos || e == 0)
|
||||
{
|
||||
tmp = allKind;
|
||||
allKind="";
|
||||
|
|
|
@ -642,10 +642,10 @@ void CSessionBrowserImpl::charsFill(const std::vector <RSMGR::TCharDesc > &chars
|
|||
|
||||
inline double ecoRingPoints(const std::string & ecoPoints, char * c)
|
||||
{
|
||||
uint cPlace = ecoPoints.find(c);
|
||||
std::string::size_type cPlace = ecoPoints.find(c);
|
||||
if(cPlace==string::npos)
|
||||
return 0;
|
||||
uint sepPlace = ecoPoints.find(":", cPlace);
|
||||
std::string::size_type sepPlace = ecoPoints.find(":", cPlace);
|
||||
std::string points = ecoPoints.substr(cPlace+1, sepPlace);
|
||||
double ret;
|
||||
fromString(points, ret);
|
||||
|
|
|
@ -36,7 +36,14 @@
|
|||
#include <nel/misc/command.h>
|
||||
#include <nel/misc/variable.h>
|
||||
#include <nel/misc/hierarchical_timer.h>
|
||||
#include <nel/misc/algo.h>
|
||||
#include <nel/misc/types_nl.h>
|
||||
#include <nel/misc/events.h>
|
||||
#include <nel/misc/file.h>
|
||||
#include <nel/misc/string_mapper.h>
|
||||
#include <nel/misc/smart_ptr.h>
|
||||
|
||||
#include <nel/3d/u_animation_set.h>
|
||||
#include <nel/3d/u_driver.h>
|
||||
#include <nel/3d/u_text_context.h>
|
||||
#include <nel/3d/u_scene.h>
|
||||
|
@ -45,6 +52,7 @@
|
|||
#include <nel/3d/u_material.h>
|
||||
#include <nel/3d/u_instance_group.h>
|
||||
#include <nel/3d/u_instance.h>
|
||||
#include <nel/3d/u_texture.h>
|
||||
|
||||
#include <nel/net/callback_client.h>
|
||||
#include <nel/net/udp_sock.h>
|
||||
|
@ -54,6 +62,8 @@
|
|||
#include <nel/pacs/u_global_position.h>
|
||||
#include <nel/pacs/u_move_primitive.h>
|
||||
|
||||
#include <nel/sound/sound_anim_manager.h>
|
||||
|
||||
#include "game_share/generic_xml_msg_mngr.h"
|
||||
#include "game_share/msg_client_server.h"
|
||||
#include "game_share/action_target_slot.h"
|
||||
|
|
|
@ -48,10 +48,10 @@ void CSTLoader::buildTableFormat( string fileName, list<pair<string,TDataType> >
|
|||
|
||||
// extract type from token
|
||||
string stoken = string( token );
|
||||
sint typeStart = stoken.find_last_of("<");
|
||||
nlassert(typeStart != -1);
|
||||
sint typeEnd = stoken.find_first_of(">",typeStart);
|
||||
nlassert(typeEnd != -1);
|
||||
string::size_type typeStart = stoken.find_last_of("<");
|
||||
nlassert(typeStart != string::npos);
|
||||
string::size_type typeEnd = stoken.find_first_of(">",typeStart);
|
||||
nlassert(typeEnd != string::npos);
|
||||
string type_str = stoken.substr( typeStart+1, (typeEnd-typeStart-1) );
|
||||
TDataType type_enum = convertType(type_str);
|
||||
|
||||
|
@ -75,9 +75,9 @@ void CSTLoader::buildTableFormat( string fileName, list<pair<string,TDataType> >
|
|||
|
||||
// extract type from token
|
||||
typeStart = stoken.find_last_of("<");
|
||||
nlassert(typeStart != -1);
|
||||
nlassert(typeStart != string::npos);
|
||||
typeEnd = stoken.find_first_of(">",typeStart);
|
||||
nlassert(typeEnd != -1);
|
||||
nlassert(typeEnd != string::npos);
|
||||
type_str = stoken.substr( typeStart+1, (typeEnd-typeStart-1) );
|
||||
type_enum = convertType(type_str);
|
||||
|
||||
|
@ -321,7 +321,7 @@ bool CSTLoader::readLine()
|
|||
return false;
|
||||
}
|
||||
|
||||
const uint nbColumn = _Columns.size();
|
||||
const uint nbColumn = (uint)_Columns.size();
|
||||
char readBuffer[4096];
|
||||
char * token;
|
||||
bool firstToken = true;
|
||||
|
|
|
@ -72,8 +72,8 @@ int main(int argc, char **argv)
|
|||
// extract the 2 first param (argv[1] and argv[2]) it must be cookie and addr
|
||||
|
||||
string cmd = cmdline;
|
||||
int pos1 = cmd.find_first_not_of (' ');
|
||||
int pos2;
|
||||
std::string::size_type pos1 = cmd.find_first_not_of (' ');
|
||||
std::string::size_type pos2;
|
||||
if (pos1 != string::npos)
|
||||
{
|
||||
pos2 = cmd.find (' ', pos1);
|
||||
|
|
Loading…
Reference in a new issue