diff --git a/SamTFE/Sources/WorldEditor/ColoredButton.cpp b/SamTFE/Sources/WorldEditor/ColoredButton.cpp index dbfcc965..0e8c6120 100644 --- a/SamTFE/Sources/WorldEditor/ColoredButton.cpp +++ b/SamTFE/Sources/WorldEditor/ColoredButton.cpp @@ -385,7 +385,7 @@ INT_PTR CColoredButton::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const rectToolTip.top = 50; rectToolTip.bottom = 60; pTI->hwnd = GetParent()->m_hWnd; - pTI->uId = (UINT) m_hWnd; + pTI->uId = (DWORD_PTR) m_hWnd; pTI->rect = rectToolTip; pTI->uFlags = TTF_IDISHWND; return 1; diff --git a/SamTFE/Sources/WorldEditor/CtrlEditFlags.cpp b/SamTFE/Sources/WorldEditor/CtrlEditFlags.cpp index e9701669..0023438a 100644 --- a/SamTFE/Sources/WorldEditor/CtrlEditFlags.cpp +++ b/SamTFE/Sources/WorldEditor/CtrlEditFlags.cpp @@ -262,7 +262,7 @@ INT_PTR CCtrlEditFlags::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const rectToolTip.top = 50; rectToolTip.bottom = 60; pTI->hwnd = GetParent()->m_hWnd; - pTI->uId = (UINT) m_hWnd; + pTI->uId = (DWORD_PTR) m_hWnd; pTI->rect = rectToolTip; pTI->uFlags = TTF_IDISHWND; return 1; diff --git a/SamTFE/Sources/WorldEditor/DlgBrowseByClass.cpp b/SamTFE/Sources/WorldEditor/DlgBrowseByClass.cpp index 65a00382..624798cc 100644 --- a/SamTFE/Sources/WorldEditor/DlgBrowseByClass.cpp +++ b/SamTFE/Sources/WorldEditor/DlgBrowseByClass.cpp @@ -513,7 +513,7 @@ void CDlgBrowseByClass::AddEntity( CEntity *pen) itItem.iSubItem = COLUMN_CLASS; itItem.pszText = achrTemp; itItem.iItem = m_listEntities.InsertItem( &itItem); - m_listEntities.SetItemData( itItem.iItem, (DWORD) pen); + m_listEntities.SetItemData( itItem.iItem, (DWORD_PTR) pen); for( INDEX iColumn=COLUMN_CLASS; iColumnidFrom; + DWORD_PTR nID =pNMHDR->idFrom; if (pTTT->uFlags & TTF_IDISHWND) { // idFrom is actually the HWND of the tool diff --git a/SamTFE/Sources/WorldEditor/SkyFloat.cpp b/SamTFE/Sources/WorldEditor/SkyFloat.cpp index 7da314b7..38b0dd9f 100644 --- a/SamTFE/Sources/WorldEditor/SkyFloat.cpp +++ b/SamTFE/Sources/WorldEditor/SkyFloat.cpp @@ -56,7 +56,7 @@ BOOL FloatFromString(HWND hWnd, float &fNumber, BOOL &bValid) bValid = TRUE; float fTmpNumber = fNumber; - int iNumLen, iRetLen; + size_t iNumLen, iRetLen; iNumLen = strlen( CStringA(szWindowText)); iRetLen = sscanf( CStringA(szWindowText), "%f", &fTmpNumber); if( (iRetLen == 1) || ((iNumLen == 1) && (szWindowText[0] == '-') || (iNumLen == 0)) ) diff --git a/SamTFE/Sources/WorldEditor/WorldEditor.cpp b/SamTFE/Sources/WorldEditor/WorldEditor.cpp index eebb9d58..e582fc6a 100644 --- a/SamTFE/Sources/WorldEditor/WorldEditor.cpp +++ b/SamTFE/Sources/WorldEditor/WorldEditor.cpp @@ -474,8 +474,8 @@ static CTString GetNextParam(void) // if the first char is not quote } else { // find first next space - INDEX iSpace; - INDEX ctChars = strlen(_strCmd); + size_t iSpace; + size_t ctChars = strlen(_strCmd); for(iSpace=0; iSpaceGetClass()->ec_pdecDLLClass; pchrCursor += sprintf(pchrCursor, "Class: %-24.24s\n", pdecDLLClass->dec_strName); - INDEX ctLetters = strlen("Class: ")+strlen(pdecDLLClass->dec_strName); + size_t ctLetters = strlen("Class: ")+strlen(pdecDLLClass->dec_strName); memset(pchrCursor, '�', ctLetters); pchrCursor+=ctLetters; *pchrCursor = '\n'; @@ -8217,11 +8217,11 @@ else {\ "Blend: \""+pDoc->m_woWorld.wo_atbTextureBlendings[mp.s.bpt_ubBlend].tb_strName+"\"");} CBrushPolygon &bpo = *crRayHit.cr_pbpoBrushPolygon; - SET_MAPPING_INFO( bpo.bpo_abptTextures[0], "Texture 1"); - SET_MAPPING_INFO( bpo.bpo_abptTextures[1], "Texture 2"); - SET_MAPPING_INFO( bpo.bpo_abptTextures[2], "Texture 3"); - pchrCursor += sprintf(pchrCursor, "Polygon under mouse has %d edges\n", bpo.bpo_abpePolygonEdges.Count()); - pchrCursor += sprintf(pchrCursor, "Shadow on polygon under mouse occupies %g kb\n", bpo.bpo_smShadowMap.GetShadowSize()/1024.0f); + SET_MAPPING_INFO(bpo.bpo_abptTextures[0], (const char*)"Texture 1"); + SET_MAPPING_INFO( bpo.bpo_abptTextures[1], (const char*)"Texture 2"); + SET_MAPPING_INFO( bpo.bpo_abptTextures[2], (const char*)"Texture 3"); + pchrCursor += sprintf(pchrCursor, (const char*)"Polygon under mouse has %d edges\n", bpo.bpo_abpePolygonEdges.Count()); + pchrCursor += sprintf(pchrCursor, (const char*)"Shadow on polygon under mouse occupies %g kb\n", bpo.bpo_smShadowMap.GetShadowSize()/1024.0f); } } @@ -8238,11 +8238,11 @@ else {\ ctPlanes += itbsc->bsc_abplPlanes.Count(); } pchrCursor += sprintf(pchrCursor, "%-24s %d\n%-24s %d\n%-24s %d\n%-24s %d\n%-24s %d\n%", - "No of sectors:", ctSectors, - "No of polygons:", ctPolygons, - "No of edges:", ctEdges, - "No of vertices:", ctVertices, - "No of planes:", ctPlanes); + (const char*)"No of sectors:", ctSectors, + (const char*)"No of polygons:", ctPolygons, + (const char*)"No of edges:", ctEdges, + (const char*)"No of vertices:", ctVertices, + (const char*)"No of planes:", ctPlanes); } else { diff --git a/SamTSE/Sources/WorldEditor/ColoredButton.cpp b/SamTSE/Sources/WorldEditor/ColoredButton.cpp index dbfcc965..0e8c6120 100644 --- a/SamTSE/Sources/WorldEditor/ColoredButton.cpp +++ b/SamTSE/Sources/WorldEditor/ColoredButton.cpp @@ -385,7 +385,7 @@ INT_PTR CColoredButton::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const rectToolTip.top = 50; rectToolTip.bottom = 60; pTI->hwnd = GetParent()->m_hWnd; - pTI->uId = (UINT) m_hWnd; + pTI->uId = (DWORD_PTR) m_hWnd; pTI->rect = rectToolTip; pTI->uFlags = TTF_IDISHWND; return 1; diff --git a/SamTSE/Sources/WorldEditor/CtrlEditFlags.cpp b/SamTSE/Sources/WorldEditor/CtrlEditFlags.cpp index e9701669..0023438a 100644 --- a/SamTSE/Sources/WorldEditor/CtrlEditFlags.cpp +++ b/SamTSE/Sources/WorldEditor/CtrlEditFlags.cpp @@ -262,7 +262,7 @@ INT_PTR CCtrlEditFlags::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const rectToolTip.top = 50; rectToolTip.bottom = 60; pTI->hwnd = GetParent()->m_hWnd; - pTI->uId = (UINT) m_hWnd; + pTI->uId = (DWORD_PTR) m_hWnd; pTI->rect = rectToolTip; pTI->uFlags = TTF_IDISHWND; return 1; diff --git a/SamTSE/Sources/WorldEditor/DlgBrowseByClass.cpp b/SamTSE/Sources/WorldEditor/DlgBrowseByClass.cpp index 65a00382..624798cc 100644 --- a/SamTSE/Sources/WorldEditor/DlgBrowseByClass.cpp +++ b/SamTSE/Sources/WorldEditor/DlgBrowseByClass.cpp @@ -513,7 +513,7 @@ void CDlgBrowseByClass::AddEntity( CEntity *pen) itItem.iSubItem = COLUMN_CLASS; itItem.pszText = achrTemp; itItem.iItem = m_listEntities.InsertItem( &itItem); - m_listEntities.SetItemData( itItem.iItem, (DWORD) pen); + m_listEntities.SetItemData( itItem.iItem, (DWORD_PTR) pen); for( INDEX iColumn=COLUMN_CLASS; iColumnidFrom; + DWORD_PTR nID =pNMHDR->idFrom; if (pTTT->uFlags & TTF_IDISHWND) { // idFrom is actually the HWND of the tool diff --git a/SamTSE/Sources/WorldEditor/SkyFloat.cpp b/SamTSE/Sources/WorldEditor/SkyFloat.cpp index 7da314b7..38b0dd9f 100644 --- a/SamTSE/Sources/WorldEditor/SkyFloat.cpp +++ b/SamTSE/Sources/WorldEditor/SkyFloat.cpp @@ -56,7 +56,7 @@ BOOL FloatFromString(HWND hWnd, float &fNumber, BOOL &bValid) bValid = TRUE; float fTmpNumber = fNumber; - int iNumLen, iRetLen; + size_t iNumLen, iRetLen; iNumLen = strlen( CStringA(szWindowText)); iRetLen = sscanf( CStringA(szWindowText), "%f", &fTmpNumber); if( (iRetLen == 1) || ((iNumLen == 1) && (szWindowText[0] == '-') || (iNumLen == 0)) ) diff --git a/SamTSE/Sources/WorldEditor/WorldEditor.cpp b/SamTSE/Sources/WorldEditor/WorldEditor.cpp index eebb9d58..e582fc6a 100644 --- a/SamTSE/Sources/WorldEditor/WorldEditor.cpp +++ b/SamTSE/Sources/WorldEditor/WorldEditor.cpp @@ -474,8 +474,8 @@ static CTString GetNextParam(void) // if the first char is not quote } else { // find first next space - INDEX iSpace; - INDEX ctChars = strlen(_strCmd); + size_t iSpace; + size_t ctChars = strlen(_strCmd); for(iSpace=0; iSpaceGetClass()->ec_pdecDLLClass; pchrCursor += sprintf(pchrCursor, "Class: %-24.24s\n", pdecDLLClass->dec_strName); - INDEX ctLetters = strlen("Class: ")+strlen(pdecDLLClass->dec_strName); + size_t ctLetters = strlen("Class: ")+strlen(pdecDLLClass->dec_strName); memset(pchrCursor, '�', ctLetters); pchrCursor+=ctLetters; *pchrCursor = '\n'; @@ -8217,11 +8217,11 @@ else {\ "Blend: \""+pDoc->m_woWorld.wo_atbTextureBlendings[mp.s.bpt_ubBlend].tb_strName+"\"");} CBrushPolygon &bpo = *crRayHit.cr_pbpoBrushPolygon; - SET_MAPPING_INFO( bpo.bpo_abptTextures[0], "Texture 1"); - SET_MAPPING_INFO( bpo.bpo_abptTextures[1], "Texture 2"); - SET_MAPPING_INFO( bpo.bpo_abptTextures[2], "Texture 3"); - pchrCursor += sprintf(pchrCursor, "Polygon under mouse has %d edges\n", bpo.bpo_abpePolygonEdges.Count()); - pchrCursor += sprintf(pchrCursor, "Shadow on polygon under mouse occupies %g kb\n", bpo.bpo_smShadowMap.GetShadowSize()/1024.0f); + SET_MAPPING_INFO(bpo.bpo_abptTextures[0], (const char*)"Texture 1"); + SET_MAPPING_INFO( bpo.bpo_abptTextures[1], (const char*)"Texture 2"); + SET_MAPPING_INFO( bpo.bpo_abptTextures[2], (const char*)"Texture 3"); + pchrCursor += sprintf(pchrCursor, (const char*)"Polygon under mouse has %d edges\n", bpo.bpo_abpePolygonEdges.Count()); + pchrCursor += sprintf(pchrCursor, (const char*)"Shadow on polygon under mouse occupies %g kb\n", bpo.bpo_smShadowMap.GetShadowSize()/1024.0f); } } @@ -8238,11 +8238,11 @@ else {\ ctPlanes += itbsc->bsc_abplPlanes.Count(); } pchrCursor += sprintf(pchrCursor, "%-24s %d\n%-24s %d\n%-24s %d\n%-24s %d\n%-24s %d\n%", - "No of sectors:", ctSectors, - "No of polygons:", ctPolygons, - "No of edges:", ctEdges, - "No of vertices:", ctVertices, - "No of planes:", ctPlanes); + (const char*)"No of sectors:", ctSectors, + (const char*)"No of polygons:", ctPolygons, + (const char*)"No of edges:", ctEdges, + (const char*)"No of vertices:", ctVertices, + (const char*)"No of planes:", ctPlanes); } else {