mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-28 20:00:54 +00:00
Changed: #853 Compilation on 64-bits platforms
This commit is contained in:
parent
068d666117
commit
e6bd85e503
14 changed files with 31 additions and 37 deletions
|
@ -535,7 +535,7 @@ void CParticleDlg::OnCreateNewPsWorkspace()
|
||||||
checkModifiedWorkSpace();
|
checkModifiedWorkSpace();
|
||||||
// ask name of the new workspace to create
|
// ask name of the new workspace to create
|
||||||
CCreateFileDlg cf(getStrRsc(IDS_CHOOSE_WORKSPACE_NAME), "", "pws");
|
CCreateFileDlg cf(getStrRsc(IDS_CHOOSE_WORKSPACE_NAME), "", "pws");
|
||||||
int result = cf.DoModal();
|
INT_PTR result = cf.DoModal();
|
||||||
if (result = IDOK)
|
if (result = IDOK)
|
||||||
{
|
{
|
||||||
if (cf.touchFile())
|
if (cf.touchFile())
|
||||||
|
@ -566,7 +566,7 @@ void CParticleDlg::OnLoadPSWorkspace()
|
||||||
checkModifiedWorkSpace();
|
checkModifiedWorkSpace();
|
||||||
static const char BASED_CODE szFilter[] = "particle workspaces(*.pws)|*.pws||";
|
static const char BASED_CODE szFilter[] = "particle workspaces(*.pws)|*.pws||";
|
||||||
CFileDialog fd( TRUE, ".pws", "*.pws", 0, szFilter);
|
CFileDialog fd( TRUE, ".pws", "*.pws", 0, szFilter);
|
||||||
int result = fd.DoModal();
|
INT_PTR result = fd.DoModal();
|
||||||
if (result != IDOK) return;
|
if (result != IDOK) return;
|
||||||
loadWorkspace((LPCTSTR) fd.GetPathName());
|
loadWorkspace((LPCTSTR) fd.GetPathName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -885,7 +885,7 @@ BOOL CParticleTreeCtrl::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHA
|
||||||
nlassert(nt->Type = CNodeType::locatedBindable);
|
nlassert(nt->Type = CNodeType::locatedBindable);
|
||||||
nlassert(nt->Bind);
|
nlassert(nt->Bind);
|
||||||
CLBExternIDDlg dlg(nt->Bind->getExternID());
|
CLBExternIDDlg dlg(nt->Bind->getExternID());
|
||||||
int res = dlg.DoModal();
|
INT_PTR res = dlg.DoModal();
|
||||||
if ( res == IDOK )
|
if ( res == IDOK )
|
||||||
{
|
{
|
||||||
nt->Bind->setExternID( dlg.getNewID() );
|
nt->Bind->setExternID( dlg.getNewID() );
|
||||||
|
|
|
@ -127,7 +127,7 @@ void CPickSound::OnPlaySound()
|
||||||
}
|
}
|
||||||
|
|
||||||
//========================================================================================
|
//========================================================================================
|
||||||
void CPickSound::OnTimer(UINT nIDEvent)
|
void CPickSound::OnTimer(UINT_PTR nIDEvent)
|
||||||
{
|
{
|
||||||
CSoundSystem::poll();
|
CSoundSystem::poll();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ protected:
|
||||||
TNameVect _Names;
|
TNameVect _Names;
|
||||||
NLMISC::TStringId _CurrName;
|
NLMISC::TStringId _CurrName;
|
||||||
|
|
||||||
UINT _Timer;
|
UINT_PTR _Timer;
|
||||||
|
|
||||||
NLMISC::CVector _BackupVel;
|
NLMISC::CVector _BackupVel;
|
||||||
float _BackupGain;
|
float _BackupGain;
|
||||||
|
@ -76,7 +76,7 @@ protected:
|
||||||
virtual BOOL OnInitDialog();
|
virtual BOOL OnInitDialog();
|
||||||
afx_msg void OnSelchange();
|
afx_msg void OnSelchange();
|
||||||
afx_msg void OnPlaySound();
|
afx_msg void OnPlaySound();
|
||||||
afx_msg void OnTimer(UINT nIDEvent);
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
||||||
afx_msg void OnDestroy();
|
afx_msg void OnDestroy();
|
||||||
afx_msg void OnDblclkList();
|
afx_msg void OnDblclkList();
|
||||||
afx_msg void OnClose();
|
afx_msg void OnClose();
|
||||||
|
|
|
@ -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 (_FilteredFiles.empty()) return;
|
||||||
if (nIDEvent == 1)
|
if (nIDEvent == 1)
|
||||||
|
|
|
@ -101,7 +101,7 @@ protected:
|
||||||
afx_msg void OnSelchangeOutputpathOption();
|
afx_msg void OnSelchangeOutputpathOption();
|
||||||
afx_msg void OnSelchangeFormat();
|
afx_msg void OnSelchangeFormat();
|
||||||
afx_msg void OnCloseButton();
|
afx_msg void OnCloseButton();
|
||||||
afx_msg void OnTimer(UINT nIDEvent);
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
||||||
afx_msg void OnStopSnapshots();
|
afx_msg void OnStopSnapshots();
|
||||||
afx_msg void OnViewFront();
|
afx_msg void OnViewFront();
|
||||||
afx_msg void OnViewLeft();
|
afx_msg void OnViewLeft();
|
||||||
|
|
|
@ -166,7 +166,7 @@ void CVegetableDlg::setVegetableToEdit(NL3D::CVegetable *vegetable)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
uint CVegetableDlg::getNumVegetables() const
|
uint CVegetableDlg::getNumVegetables() const
|
||||||
{
|
{
|
||||||
return _Vegetables.size();
|
return (uint)_Vegetables.size();
|
||||||
}
|
}
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
std::string CVegetableDlg::getVegetableName(uint id) const
|
std::string CVegetableDlg::getVegetableName(uint id) const
|
||||||
|
@ -286,7 +286,7 @@ void CVegetableDlg::CVegetableDesc::updateVegetableName()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sint pos= Vegetable->ShapeName.find(".veget");
|
std::string::size_type pos= Vegetable->ShapeName.find(".veget");
|
||||||
VegetableName= Vegetable->ShapeName.substr(0, pos);
|
VegetableName= Vegetable->ShapeName.substr(0, pos);
|
||||||
// And (to be clearer) append distance of creation.
|
// And (to be clearer) append distance of creation.
|
||||||
char str[256];
|
char str[256];
|
||||||
|
@ -380,7 +380,7 @@ void CVegetableDlg::buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool
|
||||||
|
|
||||||
vegetables.push_back(*_Vegetables[i].Vegetable);
|
vegetables.push_back(*_Vegetables[i].Vegetable);
|
||||||
// get dst index.
|
// get dst index.
|
||||||
uint dstId= vegetables.size()-1;
|
uint dstId= (uint)vegetables.size()-1;
|
||||||
// transform degrees in radians.
|
// transform degrees in radians.
|
||||||
vegetables[dstId].Rx.Abs*= degToRad;
|
vegetables[dstId].Rx.Abs*= degToRad;
|
||||||
vegetables[dstId].Rx.Rand*= degToRad;
|
vegetables[dstId].Rx.Rand*= degToRad;
|
||||||
|
@ -422,7 +422,7 @@ void CVegetableDlg::appendVegetableSet(NL3D::CTileVegetableDesc &vegetSet)
|
||||||
|
|
||||||
// Add a new vegetable to the list.
|
// Add a new vegetable to the list.
|
||||||
_Vegetables.push_back( CVegetableDesc ());
|
_Vegetables.push_back( CVegetableDesc ());
|
||||||
uint id= _Vegetables.size()-1;
|
uint id= (uint)_Vegetables.size()-1;
|
||||||
_Vegetables[id].initVegetable(veget);
|
_Vegetables[id].initVegetable(veget);
|
||||||
|
|
||||||
// update view
|
// update view
|
||||||
|
@ -512,7 +512,7 @@ void CVegetableDlg::OnButtonVegetableAdd()
|
||||||
{
|
{
|
||||||
// Add a new vegetable to the list.
|
// Add a new vegetable to the list.
|
||||||
_Vegetables.push_back(CVegetableDesc ());
|
_Vegetables.push_back(CVegetableDesc ());
|
||||||
uint id= _Vegetables.size()-1;
|
uint id= (uint)_Vegetables.size()-1;
|
||||||
_Vegetables[id].initDefaultVegetable();
|
_Vegetables[id].initDefaultVegetable();
|
||||||
|
|
||||||
// update view
|
// update view
|
||||||
|
@ -607,7 +607,7 @@ void CVegetableDlg::OnButtonVegetableLoadDesc()
|
||||||
f.serial(veget);
|
f.serial(veget);
|
||||||
// Add a new vegetable to the list.
|
// Add a new vegetable to the list.
|
||||||
_Vegetables.push_back(CVegetableDesc ());
|
_Vegetables.push_back(CVegetableDesc ());
|
||||||
uint id= _Vegetables.size()-1;
|
uint id= (uint)_Vegetables.size()-1;
|
||||||
_Vegetables[id].initVegetable(veget);
|
_Vegetables[id].initVegetable(veget);
|
||||||
|
|
||||||
// update view
|
// update view
|
||||||
|
|
|
@ -376,7 +376,7 @@ void displayZones()
|
||||||
if (ViewerCfg.AllPathRelative)
|
if (ViewerCfg.AllPathRelative)
|
||||||
Landscape->Landscape.TileBank.makeAllPathRelative();
|
Landscape->Landscape.TileBank.makeAllPathRelative();
|
||||||
|
|
||||||
sint idx = (sint)ViewerCfg.Bank.find(".");
|
string::size_type idx = ViewerCfg.Bank.find(".");
|
||||||
string farBank = ViewerCfg.Bank.substr(0,idx);
|
string farBank = ViewerCfg.Bank.substr(0,idx);
|
||||||
farBank += ".farbank";
|
farBank += ".farbank";
|
||||||
|
|
||||||
|
|
|
@ -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;
|
CFile* pFile = (CFile*) dwCookie;
|
||||||
*pcb = pFile->Read(pbBuff, cb);
|
*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;
|
CFile* pFile = (CFile*) dwCookie;
|
||||||
pFile->Write(pbBuff, cb);
|
pFile->Write(pbBuff, cb);
|
||||||
|
@ -363,7 +363,7 @@ void CBranch_patcherDlg::displayFile( const CString& filename )
|
||||||
{
|
{
|
||||||
CFile cFile( filename, CFile::modeRead );
|
CFile cFile( filename, CFile::modeRead );
|
||||||
EDITSTREAM es;
|
EDITSTREAM es;
|
||||||
es.dwCookie = (DWORD) &cFile;
|
es.dwCookie = (DWORD_PTR) &cFile;
|
||||||
es.pfnCallback = MyStreamInCallback;
|
es.pfnCallback = MyStreamInCallback;
|
||||||
m_Display->StreamIn( SF_TEXT, es );
|
m_Display->StreamIn( SF_TEXT, es );
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ void CBranch_patcherDlg::saveFile( const CString& filename )
|
||||||
{
|
{
|
||||||
CFile cFile( filename, CFile::modeCreate | CFile::modeWrite );
|
CFile cFile( filename, CFile::modeCreate | CFile::modeWrite );
|
||||||
EDITSTREAM es;
|
EDITSTREAM es;
|
||||||
es.dwCookie = (DWORD) &cFile;
|
es.dwCookie = (DWORD_PTR) &cFile;
|
||||||
es.pfnCallback = MyStreamOutCallback;
|
es.pfnCallback = MyStreamOutCallback;
|
||||||
m_Display->StreamOut( SF_TEXT, es );
|
m_Display->StreamOut( SF_TEXT, es );
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ BOOL CData_mirrorApp::InitInstance()
|
||||||
{
|
{
|
||||||
if (exePath[0] == '\"')
|
if (exePath[0] == '\"')
|
||||||
{
|
{
|
||||||
uint end=exePath.find ('\"', 1);
|
string::size_type end=exePath.find ('\"', 1);
|
||||||
if (end != string::npos)
|
if (end != string::npos)
|
||||||
{
|
{
|
||||||
exePath = exePath.substr (1, end-1);
|
exePath = exePath.substr (1, end-1);
|
||||||
|
@ -74,7 +74,7 @@ BOOL CData_mirrorApp::InitInstance()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint end=exePath.find (' ', 1);
|
string::size_type end=exePath.find (' ', 1);
|
||||||
exePath = exePath.substr (0, end);
|
exePath = exePath.substr (0, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -781,7 +781,7 @@ void CViewDialog::resizeView( int nbViews, int top, int left )
|
||||||
*/
|
*/
|
||||||
int CViewDialog::getNbLines() const
|
int CViewDialog::getNbLines() const
|
||||||
{
|
{
|
||||||
return Buffer.size();
|
return (int)Buffer.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -812,7 +812,7 @@ void CViewDialog::fillGaps( int maxNbLines )
|
||||||
*/
|
*/
|
||||||
void CViewDialog::commitAddedLines()
|
void CViewDialog::commitAddedLines()
|
||||||
{
|
{
|
||||||
m_ListCtrl.SetItemCount( Buffer.size() );
|
m_ListCtrl.SetItemCount( (int)Buffer.size() );
|
||||||
m_ListCtrl.SetColumnWidth( 0, LVSCW_AUTOSIZE );
|
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'
|
// Test 'Cancel'
|
||||||
if ( FindDialog->IsTerminating() )
|
if ( FindDialog->IsTerminating() )
|
||||||
|
|
|
@ -175,7 +175,7 @@ public:
|
||||||
// Implementation
|
// Implementation
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
afx_msg LONG OnFindReplace(WPARAM wParam, LPARAM lParam);
|
afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
//{{AFX_MSG(CViewDialog)
|
//{{AFX_MSG(CViewDialog)
|
||||||
|
|
|
@ -46,15 +46,9 @@ BOOL CLog_analyserApp::InitInstance()
|
||||||
// of your final executable, you should remove from the following
|
// of your final executable, you should remove from the following
|
||||||
// the specific initialization routines you do not need.
|
// 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;
|
CLog_analyserDlg dlg;
|
||||||
m_pMainWnd = &dlg;
|
m_pMainWnd = &dlg;
|
||||||
int nResponse = dlg.DoModal();
|
INT_PTR nResponse = dlg.DoModal();
|
||||||
if (nResponse == IDOK)
|
if (nResponse == IDOK)
|
||||||
{
|
{
|
||||||
// TODO: Place code here to handle when the dialog is
|
// TODO: Place code here to handle when the dialog is
|
||||||
|
|
|
@ -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
|
// Ensure that a log file without number comes *after* the ones with a number
|
||||||
string name = string(pathNames[i]);
|
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 ( (dotpos!=string::npos) && (dotpos > 2) )
|
||||||
{
|
{
|
||||||
if ( ! (isNumberChar(name[dotpos-1]) && isNumberChar(name[dotpos-2]) && isNumberChar(name[dotpos-3])) )
|
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
|
// Set the original names back
|
||||||
string name = pathNames[i];
|
string name = pathNames[i];
|
||||||
unsigned int tokenpos = name.find( "ZZZ." );
|
string::size_type tokenpos = name.find( "ZZZ." );
|
||||||
if ( tokenpos != string::npos )
|
if ( tokenpos != string::npos )
|
||||||
{
|
{
|
||||||
name = name.substr( 0, tokenpos ) + name.substr( tokenpos + 3 );
|
name = name.substr( 0, tokenpos ) + name.substr( tokenpos + 3 );
|
||||||
|
@ -487,7 +487,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector<CString>& filenames )
|
||||||
// Create view
|
// Create view
|
||||||
CViewDialog *view = new CViewDialog();
|
CViewDialog *view = new CViewDialog();
|
||||||
view->Create( IDD_View, this );
|
view->Create( IDD_View, this );
|
||||||
view->Index = Views.size();
|
view->Index = (int)Views.size();
|
||||||
RECT editRect;
|
RECT editRect;
|
||||||
m_Edit.GetWindowRect( &editRect );
|
m_Edit.GetWindowRect( &editRect );
|
||||||
ScreenToClient( &editRect );
|
ScreenToClient( &editRect );
|
||||||
|
@ -498,7 +498,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector<CString>& filenames )
|
||||||
for ( i=0; i!=(int)Views.size(); ++i )
|
for ( i=0; i!=(int)Views.size(); ++i )
|
||||||
{
|
{
|
||||||
Views[i]->WidthR = 1.0f/(float)Views.size();
|
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));
|
w += (int)(Views[i]->WidthR*(parentRect.right-32));
|
||||||
}
|
}
|
||||||
view->ShowWindow( SW_SHOW );
|
view->ShowWindow( SW_SHOW );
|
||||||
|
@ -901,7 +901,7 @@ void CLog_analyserDlg::resizeViews()
|
||||||
int i, w = 0;
|
int i, w = 0;
|
||||||
for ( i=0; i!=(int)Views.size(); ++i )
|
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));
|
w += (int)(Views[i]->WidthR*(parentRect.right-32));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue