Changed: #853 Compilation on 64-bits platforms

This commit is contained in:
kervala 2010-06-21 09:41:39 +02:00
parent 068d666117
commit e6bd85e503
14 changed files with 31 additions and 37 deletions

View file

@ -535,7 +535,7 @@ void CParticleDlg::OnCreateNewPsWorkspace()
checkModifiedWorkSpace();
// ask name of the new workspace to create
CCreateFileDlg cf(getStrRsc(IDS_CHOOSE_WORKSPACE_NAME), "", "pws");
int result = cf.DoModal();
INT_PTR result = cf.DoModal();
if (result = IDOK)
{
if (cf.touchFile())
@ -566,7 +566,7 @@ void CParticleDlg::OnLoadPSWorkspace()
checkModifiedWorkSpace();
static const char BASED_CODE szFilter[] = "particle workspaces(*.pws)|*.pws||";
CFileDialog fd( TRUE, ".pws", "*.pws", 0, szFilter);
int result = fd.DoModal();
INT_PTR result = fd.DoModal();
if (result != IDOK) return;
loadWorkspace((LPCTSTR) fd.GetPathName());
}

View file

@ -885,7 +885,7 @@ BOOL CParticleTreeCtrl::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHA
nlassert(nt->Type = CNodeType::locatedBindable);
nlassert(nt->Bind);
CLBExternIDDlg dlg(nt->Bind->getExternID());
int res = dlg.DoModal();
INT_PTR res = dlg.DoModal();
if ( res == IDOK )
{
nt->Bind->setExternID( dlg.getNewID() );

View file

@ -127,7 +127,7 @@ void CPickSound::OnPlaySound()
}
//========================================================================================
void CPickSound::OnTimer(UINT nIDEvent)
void CPickSound::OnTimer(UINT_PTR nIDEvent)
{
CSoundSystem::poll();

View file

@ -65,7 +65,7 @@ protected:
TNameVect _Names;
NLMISC::TStringId _CurrName;
UINT _Timer;
UINT_PTR _Timer;
NLMISC::CVector _BackupVel;
float _BackupGain;
@ -76,7 +76,7 @@ protected:
virtual BOOL OnInitDialog();
afx_msg void OnSelchange();
afx_msg void OnPlaySound();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnDestroy();
afx_msg void OnDblclkList();
afx_msg void OnClose();

View file

@ -559,7 +559,7 @@ std::string CSnapshotToolDlg::viewToString(uint view)
}
//****************************************************************************************
void CSnapshotToolDlg::OnTimer(UINT nIDEvent)
void CSnapshotToolDlg::OnTimer(UINT_PTR nIDEvent)
{
if (_FilteredFiles.empty()) return;
if (nIDEvent == 1)

View file

@ -101,7 +101,7 @@ protected:
afx_msg void OnSelchangeOutputpathOption();
afx_msg void OnSelchangeFormat();
afx_msg void OnCloseButton();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnStopSnapshots();
afx_msg void OnViewFront();
afx_msg void OnViewLeft();

View file

@ -166,7 +166,7 @@ void CVegetableDlg::setVegetableToEdit(NL3D::CVegetable *vegetable)
// ***************************************************************************
uint CVegetableDlg::getNumVegetables() const
{
return _Vegetables.size();
return (uint)_Vegetables.size();
}
// ***************************************************************************
std::string CVegetableDlg::getVegetableName(uint id) const
@ -286,7 +286,7 @@ void CVegetableDlg::CVegetableDesc::updateVegetableName()
}
else
{
sint pos= Vegetable->ShapeName.find(".veget");
std::string::size_type pos= Vegetable->ShapeName.find(".veget");
VegetableName= Vegetable->ShapeName.substr(0, pos);
// And (to be clearer) append distance of creation.
char str[256];
@ -380,7 +380,7 @@ void CVegetableDlg::buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool
vegetables.push_back(*_Vegetables[i].Vegetable);
// get dst index.
uint dstId= vegetables.size()-1;
uint dstId= (uint)vegetables.size()-1;
// transform degrees in radians.
vegetables[dstId].Rx.Abs*= degToRad;
vegetables[dstId].Rx.Rand*= degToRad;
@ -422,7 +422,7 @@ void CVegetableDlg::appendVegetableSet(NL3D::CTileVegetableDesc &vegetSet)
// Add a new vegetable to the list.
_Vegetables.push_back( CVegetableDesc ());
uint id= _Vegetables.size()-1;
uint id= (uint)_Vegetables.size()-1;
_Vegetables[id].initVegetable(veget);
// update view
@ -512,7 +512,7 @@ void CVegetableDlg::OnButtonVegetableAdd()
{
// Add a new vegetable to the list.
_Vegetables.push_back(CVegetableDesc ());
uint id= _Vegetables.size()-1;
uint id= (uint)_Vegetables.size()-1;
_Vegetables[id].initDefaultVegetable();
// update view
@ -607,7 +607,7 @@ void CVegetableDlg::OnButtonVegetableLoadDesc()
f.serial(veget);
// Add a new vegetable to the list.
_Vegetables.push_back(CVegetableDesc ());
uint id= _Vegetables.size()-1;
uint id= (uint)_Vegetables.size()-1;
_Vegetables[id].initVegetable(veget);
// update view

View file

@ -376,7 +376,7 @@ void displayZones()
if (ViewerCfg.AllPathRelative)
Landscape->Landscape.TileBank.makeAllPathRelative();
sint idx = (sint)ViewerCfg.Bank.find(".");
string::size_type idx = ViewerCfg.Bank.find(".");
string farBank = ViewerCfg.Bank.substr(0,idx);
farBank += ".farbank";

View file

@ -342,7 +342,7 @@ void CBranch_patcherDlg::OnButtonPatch()
}
static DWORD CALLBACK MyStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static unsigned long CALLBACK MyStreamInCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CFile* pFile = (CFile*) dwCookie;
*pcb = pFile->Read(pbBuff, cb);
@ -350,7 +350,7 @@ static DWORD CALLBACK MyStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb,
}
static DWORD CALLBACK MyStreamOutCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static unsigned long CALLBACK MyStreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CFile* pFile = (CFile*) dwCookie;
pFile->Write(pbBuff, cb);
@ -363,7 +363,7 @@ void CBranch_patcherDlg::displayFile( const CString& filename )
{
CFile cFile( filename, CFile::modeRead );
EDITSTREAM es;
es.dwCookie = (DWORD) &cFile;
es.dwCookie = (DWORD_PTR) &cFile;
es.pfnCallback = MyStreamInCallback;
m_Display->StreamIn( SF_TEXT, es );
}
@ -373,7 +373,7 @@ void CBranch_patcherDlg::saveFile( const CString& filename )
{
CFile cFile( filename, CFile::modeCreate | CFile::modeWrite );
EDITSTREAM es;
es.dwCookie = (DWORD) &cFile;
es.dwCookie = (DWORD_PTR) &cFile;
es.pfnCallback = MyStreamOutCallback;
m_Display->StreamOut( SF_TEXT, es );
}

View file

@ -62,7 +62,7 @@ BOOL CData_mirrorApp::InitInstance()
{
if (exePath[0] == '\"')
{
uint end=exePath.find ('\"', 1);
string::size_type end=exePath.find ('\"', 1);
if (end != string::npos)
{
exePath = exePath.substr (1, end-1);
@ -74,7 +74,7 @@ BOOL CData_mirrorApp::InitInstance()
}
else
{
uint end=exePath.find (' ', 1);
string::size_type end=exePath.find (' ', 1);
exePath = exePath.substr (0, end);
}
}

View file

@ -781,7 +781,7 @@ void CViewDialog::resizeView( int nbViews, int top, int left )
*/
int CViewDialog::getNbLines() const
{
return Buffer.size();
return (int)Buffer.size();
}
@ -812,7 +812,7 @@ void CViewDialog::fillGaps( int maxNbLines )
*/
void CViewDialog::commitAddedLines()
{
m_ListCtrl.SetItemCount( Buffer.size() );
m_ListCtrl.SetItemCount( (int)Buffer.size() );
m_ListCtrl.SetColumnWidth( 0, LVSCW_AUTOSIZE );
}
@ -1124,7 +1124,7 @@ bool matchString( const CString& str, const CString& substr, bool matchCase, int
/*
*
*/
afx_msg LONG CViewDialog::OnFindReplace(WPARAM wParam, LPARAM lParam)
afx_msg LRESULT CViewDialog::OnFindReplace(WPARAM wParam, LPARAM lParam)
{
// Test 'Cancel'
if ( FindDialog->IsTerminating() )

View file

@ -175,7 +175,7 @@ public:
// Implementation
protected:
afx_msg LONG OnFindReplace(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
// Generated message map functions
//{{AFX_MSG(CViewDialog)

View file

@ -46,15 +46,9 @@ BOOL CLog_analyserApp::InitInstance()
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CLog_analyserDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is

View file

@ -403,7 +403,7 @@ void CLog_analyserDlg::addView( std::vector<CString>& pathNames )
{
// Ensure that a log file without number comes *after* the ones with a number
string name = string(pathNames[i]);
unsigned int dotpos = name.find_last_of('.');
string::size_type dotpos = name.find_last_of('.');
if ( (dotpos!=string::npos) && (dotpos > 2) )
{
if ( ! (isNumberChar(name[dotpos-1]) && isNumberChar(name[dotpos-2]) && isNumberChar(name[dotpos-3])) )
@ -418,7 +418,7 @@ void CLog_analyserDlg::addView( std::vector<CString>& pathNames )
{
// Set the original names back
string name = pathNames[i];
unsigned int tokenpos = name.find( "ZZZ." );
string::size_type tokenpos = name.find( "ZZZ." );
if ( tokenpos != string::npos )
{
name = name.substr( 0, tokenpos ) + name.substr( tokenpos + 3 );
@ -487,7 +487,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector<CString>& filenames )
// Create view
CViewDialog *view = new CViewDialog();
view->Create( IDD_View, this );
view->Index = Views.size();
view->Index = (int)Views.size();
RECT editRect;
m_Edit.GetWindowRect( &editRect );
ScreenToClient( &editRect );
@ -498,7 +498,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector<CString>& filenames )
for ( i=0; i!=(int)Views.size(); ++i )
{
Views[i]->WidthR = 1.0f/(float)Views.size();
Views[i]->resizeView( Views.size(), editRect.bottom+10, w );
Views[i]->resizeView( (int)Views.size(), editRect.bottom+10, w );
w += (int)(Views[i]->WidthR*(parentRect.right-32));
}
view->ShowWindow( SW_SHOW );
@ -901,7 +901,7 @@ void CLog_analyserDlg::resizeViews()
int i, w = 0;
for ( i=0; i!=(int)Views.size(); ++i )
{
Views[i]->resizeView( Views.size(), editRect.bottom+10, w );
Views[i]->resizeView( (int)Views.size(), editRect.bottom+10, w );
w += (int)(Views[i]->WidthR*(parentRect.right-32));
}
}