diff --git a/src/Layers/xrRender/Blender_Recorder_R2.cpp b/src/Layers/xrRender/Blender_Recorder_R2.cpp index 98ea1bf6137..cd969f7372c 100644 --- a/src/Layers/xrRender/Blender_Recorder_R2.cpp +++ b/src/Layers/xrRender/Blender_Recorder_R2.cpp @@ -40,7 +40,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _ps, bool bFog, BOOL bZtest, BO ctable.merge(&vs->constants); // Last Stage - disable - if (0 == stricmp(_ps, "null")) + if (0 == _stricmp(_ps, "null")) { RS.SetTSS(0, D3DTSS_COLOROP, D3DTOP_DISABLE); RS.SetTSS(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); diff --git a/src/Layers/xrRender/FHierrarhyVisual.cpp b/src/Layers/xrRender/FHierrarhyVisual.cpp index 48b561907de..4534c08cd5e 100644 --- a/src/Layers/xrRender/FHierrarhyVisual.cpp +++ b/src/Layers/xrRender/FHierrarhyVisual.cpp @@ -71,7 +71,7 @@ void FHierrarhyVisual::Load(const char* N, IReader* data, u32 dwFlags) xr_strcpy(short_name, N); if (strext(short_name)) *strext(short_name) = 0; - strconcat(sizeof(name_load), name_load, short_name, ":", itoa(count, num, 10)); + strconcat(sizeof(name_load), name_load, short_name, ":", _itoa(count, num, 10)); children.push_back((dxRender_Visual*)GlobalEnv.Render->model_CreateChild(name_load, O)); O->close(); O = OBJ->open_chunk(count); diff --git a/src/Layers/xrRender/HW.cpp b/src/Layers/xrRender/HW.cpp index 32ce2377c82..12a20a826b7 100644 --- a/src/Layers/xrRender/HW.cpp +++ b/src/Layers/xrRender/HW.cpp @@ -590,7 +590,7 @@ struct _uniq_mode { _uniq_mode(LPCSTR v) : _val(v) {} LPCSTR _val; - bool operator()(LPCSTR _other) { return !stricmp(_val, _other); } + bool operator()(LPCSTR _other) { return !_stricmp(_val, _other); } }; #ifndef _EDITOR diff --git a/src/Layers/xrRender/ModelPool.cpp b/src/Layers/xrRender/ModelPool.cpp index 4abfb268382..a041068f579 100644 --- a/src/Layers/xrRender/ModelPool.cpp +++ b/src/Layers/xrRender/ModelPool.cpp @@ -220,7 +220,7 @@ dxRender_Visual* CModelPool::Create(const char* name, IReader* data) string_path low_name; VERIFY(xr_strlen(name) < sizeof(low_name)); xr_strcpy(low_name, name); - strlwr(low_name); + _strlwr(low_name); if (strext(low_name)) *strext(low_name) = 0; // Msg ("-CREATE %s",low_name); @@ -266,7 +266,7 @@ dxRender_Visual* CModelPool::CreateChild(LPCSTR name, IReader* data) string256 low_name; VERIFY(xr_strlen(name) < 256); xr_strcpy(low_name, name); - strlwr(low_name); + _strlwr(low_name); if (strext(low_name)) *strext(low_name) = 0; diff --git a/src/Layers/xrRender/PSLibrary.cpp b/src/Layers/xrRender/PSLibrary.cpp index e26c7ece9e3..8f8777cb407 100644 --- a/src/Layers/xrRender/PSLibrary.cpp +++ b/src/Layers/xrRender/PSLibrary.cpp @@ -155,7 +155,7 @@ bool CPSLibrary::Load2() #endif xr_sprintf(_path, sizeof(_path), "%s%s", p_path, p_name); - if (0 == stricmp(p_ext, ".pe")) + if (0 == _stricmp(p_ext, ".pe")) { PS::CPEDef* def = new PS::CPEDef(); def->m_Name = _path; @@ -164,7 +164,7 @@ bool CPSLibrary::Load2() else xr_delete(def); } - else if (0 == stricmp(p_ext, ".pg")) + else if (0 == _stricmp(p_ext, ".pg")) { PS::CPGDef* def = new PS::CPGDef(); def->m_Name = _path; diff --git a/src/Layers/xrRender/ResourceManager.cpp b/src/Layers/xrRender/ResourceManager.cpp index d0533424f1d..782b106998c 100644 --- a/src/Layers/xrRender/ResourceManager.cpp +++ b/src/Layers/xrRender/ResourceManager.cpp @@ -21,11 +21,11 @@ void fix_texture_name(LPSTR fn); void fix_texture_name(LPSTR fn) { LPSTR _ext = strext(fn); - if( _ext && - (0==stricmp(_ext,".tga") || - 0==stricmp(_ext,".dds") || - 0==stricmp(_ext,".bmp") || - 0==stricmp(_ext,".ogm") ) ) + if (_ext && + (0==_stricmp(_ext, ".tga") || + 0==_stricmp(_ext, ".dds") || + 0==_stricmp(_ext, ".bmp") || + 0==_stricmp(_ext, ".ogm"))) *_ext = 0; } */ @@ -120,7 +120,7 @@ void CResourceManager::_ParseList(sh_list& dest, LPCSTR names) { // flush N.push_back(0); - strlwr(N.begin()); + _strlwr(N.begin()); fix_texture_name(N.begin()); //. andy if (strext(N.begin())) *strext(N.begin())=0; @@ -137,7 +137,7 @@ void CResourceManager::_ParseList(sh_list& dest, LPCSTR names) { // flush N.push_back(0); - strlwr(N.begin()); + _strlwr(N.begin()); fix_texture_name(N.begin()); //. andy if (strext(N.begin())) *strext(N.begin())=0; diff --git a/src/Layers/xrRender/ResourceManager_Resources.cpp b/src/Layers/xrRender/ResourceManager_Resources.cpp index 45155f54e5a..9e1a4b97e67 100644 --- a/src/Layers/xrRender/ResourceManager_Resources.cpp +++ b/src/Layers/xrRender/ResourceManager_Resources.cpp @@ -180,7 +180,7 @@ SVS* CResourceManager::_CreateVS(LPCSTR _name) SVS* _vs = new SVS(); _vs->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_vs.insert(std::make_pair(_vs->set_name(name), _vs)); - if (0 == stricmp(_name, "null")) + if (0 == _stricmp(_name, "null")) { _vs->vs = NULL; return _vs; @@ -266,7 +266,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR name) SPS* _ps = new SPS(); _ps->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_ps.insert(std::make_pair(_ps->set_name(name), _ps)); - if (0 == stricmp(name, "null")) + if (0 == _stricmp(name, "null")) { _ps->ps = NULL; return _ps; @@ -558,7 +558,7 @@ void CResourceManager::DBG_VerifyTextures() CMatrix* CResourceManager::_CreateMatrix(LPCSTR Name) { R_ASSERT(Name && Name[0]); - if (0 == stricmp(Name, "$null")) + if (0 == _stricmp(Name, "$null")) return NULL; LPSTR N = LPSTR(Name); @@ -596,7 +596,7 @@ void CResourceManager::ED_UpdateMatrix(LPCSTR Name, CMatrix* data) CConstant* CResourceManager::_CreateConstant(LPCSTR Name) { R_ASSERT(Name && Name[0]); - if (0 == stricmp(Name, "$null")) + if (0 == _stricmp(Name, "$null")) return NULL; LPSTR N = LPSTR(Name); @@ -784,7 +784,7 @@ SVS* CResourceManager::_CreateVS(LPCSTR _name) SVS* _vs = new SVS(); _vs->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_vs.insert(mk_pair(_vs->set_name(name), _vs)); - if (0 == stricmp(_name, "null")) + if (0 == _stricmp(_name, "null")) { _vs->vs = NULL; return _vs; @@ -906,7 +906,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR name) SPS* _ps = new SPS(); _ps->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_ps.insert(mk_pair(_ps->set_name(name), _ps)); - if (0 == stricmp(name, "null")) + if (0 == _stricmp(name, "null")) { _ps->ps = NULL; return _ps; diff --git a/src/Layers/xrRender/SH_Texture.cpp b/src/Layers/xrRender/SH_Texture.cpp index 0820a3bf5f9..b1bd6e62d2f 100644 --- a/src/Layers/xrRender/SH_Texture.cpp +++ b/src/Layers/xrRender/SH_Texture.cpp @@ -158,7 +158,7 @@ void CTexture::Load() flags.bUser = false; flags.MemoryUsage = 0; - if (0 == stricmp(*cName, "$null")) + if (0 == _stricmp(*cName, "$null")) return; if (0 != strstr(*cName, "$user$")) { @@ -245,7 +245,7 @@ void CTexture::Load() flags.seqCycles = FALSE; _fs->r_string(buffer, sizeof(buffer)); - if (0 == stricmp(buffer, "cycled")) + if (0 == _stricmp(buffer, "cycled")) { flags.seqCycles = TRUE; _fs->r_string(buffer, sizeof(buffer)); diff --git a/src/Layers/xrRender/ShaderResourceTraits.h b/src/Layers/xrRender/ShaderResourceTraits.h index 427d0b09bb4..929363be037 100644 --- a/src/Layers/xrRender/ShaderResourceTraits.h +++ b/src/Layers/xrRender/ShaderResourceTraits.h @@ -94,7 +94,7 @@ inline T* CResourceManager::CreateShader(const char* name) sh->dwFlags |= xr_resource_flagged::RF_REGISTERED; sh_map.insert(std::make_pair(sh->set_name(name), sh)); - if (0 == stricmp(name, "null")) + if (0 == _stricmp(name, "null")) { sh->sh = NULL; return sh; diff --git a/src/Layers/xrRender/SkeletonAnimated.cpp b/src/Layers/xrRender/SkeletonAnimated.cpp index 23b059a84f7..8571b45d36d 100644 --- a/src/Layers/xrRender/SkeletonAnimated.cpp +++ b/src/Layers/xrRender/SkeletonAnimated.cpp @@ -175,7 +175,7 @@ u16 CKinematicsAnimated::LL_PartID(LPCSTR B) CPartDef& P = (*m_Partition)[id]; if (0 == P.Name) continue; - if (0 == stricmp(B, *P.Name)) + if (0 == _stricmp(B, *P.Name)) return id; } return BI_NONE; diff --git a/src/Layers/xrRender/SkeletonCustom.cpp b/src/Layers/xrRender/SkeletonCustom.cpp index 56a016b0f19..c7b8d3574f0 100644 --- a/src/Layers/xrRender/SkeletonCustom.cpp +++ b/src/Layers/xrRender/SkeletonCustom.cpp @@ -237,7 +237,7 @@ void CKinematics::Load(const char* N, IReader* data, u32 dwFlags) // Bone u16 ID = u16(bones->size()); data->r_stringZ(buf, sizeof(buf)); - strlwr(buf); + _strlwr(buf); CBoneData* pBone = CreateBoneData(ID); pBone->name = shared_str(buf); pBone->child_faces.resize(children.size()); @@ -247,7 +247,7 @@ void CKinematics::Load(const char* N, IReader* data, u32 dwFlags) // It's parent data->r_stringZ(buf, sizeof(buf)); - strlwr(buf); + _strlwr(buf); L_parents.push_back(buf); data->r(&pBone->obb, sizeof(Fobb)); diff --git a/src/Layers/xrRender/Texture.cpp b/src/Layers/xrRender/Texture.cpp index 0a9e0f207fa..df1a89e9ea1 100644 --- a/src/Layers/xrRender/Texture.cpp +++ b/src/Layers/xrRender/Texture.cpp @@ -13,8 +13,8 @@ void fix_texture_name(LPSTR fn) { LPSTR _ext = strext(fn); - if (_ext && (!stricmp(_ext, ".tga") || !stricmp(_ext, ".dds") || - !stricmp(_ext, ".bmp") || !stricmp(_ext, ".ogm"))) + if (_ext && (!_stricmp(_ext, ".tga") || !_stricmp(_ext, ".dds") || + !_stricmp(_ext, ".bmp") || !_stricmp(_ext, ".ogm"))) { *_ext = 0; } @@ -367,7 +367,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) } _DDS_2D: { - strlwr(fn); + _strlwr(fn); // Load SYS-MEM-surface, bound to device restrictions ID3DTexture2D* T_sysmem; HRESULT const result = @@ -380,7 +380,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) Msg("! Can't load texture '%s'", fn); string_path temp; R_ASSERT(FS.exist(temp, "$game_textures$", "ed\\ed_not_existing_texture", ".dds")); - strlwr(temp); + _strlwr(temp); R_ASSERT(xr_strcmp(temp, fn)); xr_strcpy(fn, temp); goto _DDS; diff --git a/src/Layers/xrRender/TextureDescrManager.cpp b/src/Layers/xrRender/TextureDescrManager.cpp index fc66ce8ec1e..99e50072874 100644 --- a/src/Layers/xrRender/TextureDescrManager.cpp +++ b/src/Layers/xrRender/TextureDescrManager.cpp @@ -17,8 +17,8 @@ class cl_dt_scaler : public R_constant_setup void fix_texture_thm_name(LPSTR fn) { LPSTR _ext = strext(fn); - if (_ext && (!stricmp(_ext, ".tga") || !stricmp(_ext, ".thm") || !stricmp(_ext, ".dds") || - !stricmp(_ext, ".bmp") || !stricmp(_ext, ".ogm"))) + if (_ext && (!_stricmp(_ext, ".tga") || !_stricmp(_ext, ".thm") || !_stricmp(_ext, ".dds") || + !_stricmp(_ext, ".bmp") || !_stricmp(_ext, ".ogm"))) { *_ext = 0; } diff --git a/src/Layers/xrRender/blenders/Blender.cpp b/src/Layers/xrRender/blenders/Blender.cpp index 6c0011d30b8..67e902d6c0b 100644 --- a/src/Layers/xrRender/blenders/Blender.cpp +++ b/src/Layers/xrRender/blenders/Blender.cpp @@ -16,7 +16,7 @@ void CBlender_DESC::Setup(LPCSTR N) VERIFY(xr_strlen(N) < 128); VERIFY(0 == strchr(N, '.')); xr_strcpy(cName, N); - strlwr(cName); + _strlwr(cName); xr_strcpy(cComputer, Core.CompName); // Computer #ifndef _EDITOR diff --git a/src/Layers/xrRender/blenders/Blender_Palette.cpp b/src/Layers/xrRender/blenders/Blender_Palette.cpp index f0cfb13b354..b43dff43f19 100644 --- a/src/Layers/xrRender/blenders/Blender_Palette.cpp +++ b/src/Layers/xrRender/blenders/Blender_Palette.cpp @@ -5,7 +5,7 @@ ////////////////////////////////////////////////////////////////////// #include "blender_clsid.h" -IC bool p_sort(IBlender* A, IBlender* B) { return stricmp(A->getComment(), B->getComment()) < 0; } +IC bool p_sort(IBlender* A, IBlender* B) { return _stricmp(A->getComment(), B->getComment()) < 0; } #ifdef __BORLANDC__ #define TYPES_EQUAL(A, B) (typeid(A) == typeid(B)) #else diff --git a/src/Layers/xrRender/blenders/Blender_Recorder.cpp b/src/Layers/xrRender/blenders/Blender_Recorder.cpp index 1340b08ef09..0a13a62b247 100644 --- a/src/Layers/xrRender/blenders/Blender_Recorder.cpp +++ b/src/Layers/xrRender/blenders/Blender_Recorder.cpp @@ -205,13 +205,13 @@ void CBlender_Compile::PassEnd() void CBlender_Compile::PassSET_PS(LPCSTR name) { xr_strcpy(pass_ps, name); - strlwr(pass_ps); + _strlwr(pass_ps); } void CBlender_Compile::PassSET_VS(LPCSTR name) { xr_strcpy(pass_vs, name); - strlwr(pass_vs); + _strlwr(pass_vs); } void CBlender_Compile::PassSET_ZB(BOOL bZTest, BOOL bZWrite, BOOL bInvertZTest) diff --git a/src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp b/src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp index 50a5aedd961..f8e128aebe5 100644 --- a/src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp +++ b/src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp @@ -203,7 +203,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _gs, LPCSTR _ps, bool bFog, BOO ctable.merge(&gs->constants); // Last Stage - disable - if (0 == stricmp(_ps, "null")) + if (0 == _stricmp(_ps, "null")) { RS.SetTSS(0, D3DTSS_COLOROP, D3DTOP_DISABLE); RS.SetTSS(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); diff --git a/src/Layers/xrRenderDX10/dx10HW.cpp b/src/Layers/xrRenderDX10/dx10HW.cpp index 71647fe2032..e9a98efc618 100644 --- a/src/Layers/xrRenderDX10/dx10HW.cpp +++ b/src/Layers/xrRenderDX10/dx10HW.cpp @@ -758,7 +758,7 @@ struct _uniq_mode { _uniq_mode(LPCSTR v) : _val(v) {} LPCSTR _val; - bool operator()(LPCSTR _other) { return !stricmp(_val, _other); } + bool operator()(LPCSTR _other) { return !_stricmp(_val, _other); } }; #ifndef _EDITOR diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp index 80dc6f3b654..3ef8d81fb5f 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp @@ -142,7 +142,7 @@ SVS* CResourceManager::_CreateVS(LPCSTR _name) m_vs.insert(std::make_pair(_vs->set_name(name), _vs)); //_vs->vs = NULL; //_vs->signature = NULL; - if (0 == stricmp(_name, "null")) + if (0 == _stricmp(_name, "null")) { return _vs; } @@ -265,7 +265,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR _name) SPS* _ps = new SPS(); _ps->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_ps.insert(std::make_pair(_ps->set_name(name), _ps)); - if (0 == stricmp(_name, "null")) + if (0 == _stricmp(_name, "null")) { _ps->ps = NULL; return _ps; @@ -370,7 +370,7 @@ SGS* CResourceManager::_CreateGS(LPCSTR name) SGS* _gs = new SGS(); _gs->dwFlags |= xr_resource_flagged::RF_REGISTERED; m_gs.insert(std::make_pair(_gs->set_name(name), _gs)); - if (0 == stricmp(name, "null")) + if (0 == _stricmp(name, "null")) { _gs->gs = NULL; return _gs; @@ -687,7 +687,7 @@ void CResourceManager::DBG_VerifyTextures() CMatrix* CResourceManager::_CreateMatrix(LPCSTR Name) { R_ASSERT(Name && Name[0]); - if (0 == stricmp(Name, "$null")) + if (0 == _stricmp(Name, "$null")) return NULL; LPSTR N = LPSTR(Name); @@ -725,7 +725,7 @@ void CResourceManager::ED_UpdateMatrix(LPCSTR Name, CMatrix* data) CConstant* CResourceManager::_CreateConstant(LPCSTR Name) { R_ASSERT(Name && Name[0]); - if (0 == stricmp(Name, "$null")) + if (0 == _stricmp(Name, "$null")) return NULL; LPSTR N = LPSTR(Name); diff --git a/src/Layers/xrRenderDX10/dx10SH_Texture.cpp b/src/Layers/xrRenderDX10/dx10SH_Texture.cpp index 4f3811cbd6e..32ec768cdf5 100644 --- a/src/Layers/xrRenderDX10/dx10SH_Texture.cpp +++ b/src/Layers/xrRenderDX10/dx10SH_Texture.cpp @@ -375,7 +375,7 @@ void CTexture::Load() flags.bUser = false; flags.MemoryUsage = 0; - if (0 == stricmp(*cName, "$null")) + if (0 == _stricmp(*cName, "$null")) return; if (0 != strstr(*cName, "$user$")) { @@ -498,7 +498,7 @@ void CTexture::Load() flags.seqCycles = FALSE; _fs->r_string(buffer, sizeof(buffer)); - if (0 == stricmp(buffer, "cycled")) + if (0 == _stricmp(buffer, "cycled")) { flags.seqCycles = TRUE; _fs->r_string(buffer, sizeof(buffer)); diff --git a/src/Layers/xrRenderDX10/dx10Texture.cpp b/src/Layers/xrRenderDX10/dx10Texture.cpp index d7bc215a2c3..3eed2fab39d 100644 --- a/src/Layers/xrRenderDX10/dx10Texture.cpp +++ b/src/Layers/xrRenderDX10/dx10Texture.cpp @@ -11,8 +11,8 @@ void fix_texture_name(LPSTR fn) { LPSTR _ext = strext(fn); - if (_ext && (!stricmp(_ext, ".tga") || !stricmp(_ext, ".dds") || !stricmp(_ext, ".bmp") || - !stricmp(_ext, ".ogm"))) + if (_ext && (!_stricmp(_ext, ".tga") || !_stricmp(_ext, ".dds") || !_stricmp(_ext, ".bmp") || + !_stricmp(_ext, ".ogm"))) { *_ext = 0; } diff --git a/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp b/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp index 45f20b1a0e9..cd29805c923 100644 --- a/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp +++ b/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp @@ -42,7 +42,7 @@ void CBlender_LaEmB::Compile(CBlender_Compile& C) { IBlender::Compile(C); - BOOL bConstant = (0 != stricmp(oT2_const, "$null")); + BOOL bConstant = (0 != _stricmp(oT2_const, "$null")); if (C.bEditor) { if (bConstant) diff --git a/src/Layers/xrRenderPC_R4/CSCompiler.cpp b/src/Layers/xrRenderPC_R4/CSCompiler.cpp index 23a47360d41..cf7b1751bb8 100644 --- a/src/Layers/xrRenderPC_R4/CSCompiler.cpp +++ b/src/Layers/xrRenderPC_R4/CSCompiler.cpp @@ -179,7 +179,7 @@ void CSCompiler::end() void CSCompiler::compile(const char* name) { - if (0 == stricmp(name, "null")) + if (0 == _stricmp(name, "null")) { m_cs = 0; return; diff --git a/src/editors/ActorEditor/BonePart.cpp b/src/editors/ActorEditor/BonePart.cpp index cbe637e3ee2..d54c785c934 100644 --- a/src/editors/ActorEditor/BonePart.cpp +++ b/src/editors/ActorEditor/BonePart.cpp @@ -282,7 +282,7 @@ void __fastcall TfrmBonePart::ebLoadFromClick(TObject* Sender) CInifile::SectCIt e = S.Data.end(); for (; it != e; ++it) { - if (0 != stricmp(it->first.c_str(), "partition_name")) + if (0 != _stricmp(it->first.c_str(), "partition_name")) { FHelper.AppendObject(T[i], it->first.c_str(), false, true); } diff --git a/src/editors/ActorEditor/BottomBar.cpp b/src/editors/ActorEditor/BottomBar.cpp index f191febf0a1..888d1e59dff 100644 --- a/src/editors/ActorEditor/BottomBar.cpp +++ b/src/editors/ActorEditor/BottomBar.cpp @@ -199,7 +199,7 @@ void __fastcall TfraBottomBar::pmOptionsPopup(TObject* Sender) { TMenuItem* mi = miWeather->Items[i]; BOOL bch; - bch = ((EPrefs->sWeather.size()) && (0 == stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || + bch = ((EPrefs->sWeather.size()) && (0 == _stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || (mi->Caption == "none" && EPrefs->sWeather.size() == 0); mi->Checked = bch; } diff --git a/src/editors/ActorEditor/UI_ActorToolsUndo.cpp b/src/editors/ActorEditor/UI_ActorToolsUndo.cpp index e6c56714ff9..9c5b46e0f87 100644 --- a/src/editors/ActorEditor/UI_ActorToolsUndo.cpp +++ b/src/editors/ActorEditor/UI_ActorToolsUndo.cpp @@ -9,12 +9,12 @@ void CActorTools::UndoClear() { while (!m_RedoStack.empty()) { - unlink(m_RedoStack.back().m_FileName); + _unlink(m_RedoStack.back().m_FileName); m_RedoStack.pop_back(); } while (!m_UndoStack.empty()) { - unlink(m_UndoStack.back().m_FileName); + _unlink(m_UndoStack.back().m_FileName); m_UndoStack.pop_back(); } } @@ -33,13 +33,13 @@ void CActorTools::UndoSave() while (!m_RedoStack.empty()) { - unlink(m_RedoStack.back().m_FileName); + _unlink(m_RedoStack.back().m_FileName); m_RedoStack.pop_back(); } if (m_UndoStack.size() > EPrefs->scene_undo_level) { - unlink(m_UndoStack.front().m_FileName); + _unlink(m_UndoStack.front().m_FileName); m_UndoStack.pop_front(); } } @@ -54,7 +54,7 @@ bool CActorTools::Undo() if (m_RedoStack.size() > EPrefs->scene_undo_level) { - unlink(m_RedoStack.front().m_FileName); + _unlink(m_RedoStack.front().m_FileName); m_RedoStack.pop_front(); } @@ -83,7 +83,7 @@ bool CActorTools::Redo() if (m_UndoStack.size() > EPrefs->scene_undo_level) { - unlink(m_UndoStack.front().m_FileName); + _unlink(m_UndoStack.front().m_FileName); m_UndoStack.pop_front(); } diff --git a/src/editors/ECore/Editor/EditMesh.cpp b/src/editors/ECore/Editor/EditMesh.cpp index 28265bd9c99..8c0677554ce 100644 --- a/src/editors/ECore/Editor/EditMesh.cpp +++ b/src/editors/ECore/Editor/EditMesh.cpp @@ -543,7 +543,7 @@ int CEditableMesh::FindVMapByName(VMapVec& vmaps, const char* name, u8 t, bool p { for (VMapIt vm_it = vmaps.begin(); vm_it != vmaps.end(); vm_it++) { - if (((*vm_it)->type == t) && (stricmp((*vm_it)->name.c_str(), name) == 0) && (polymap == (*vm_it)->polymap)) + if (((*vm_it)->type == t) && (_stricmp((*vm_it)->name.c_str(), name) == 0) && (polymap == (*vm_it)->polymap)) return vm_it - vmaps.begin(); } return -1; diff --git a/src/editors/ECore/Editor/EditObject.cpp b/src/editors/ECore/Editor/EditObject.cpp index 00137fe3d1c..e6d0d4c2842 100644 --- a/src/editors/ECore/Editor/EditObject.cpp +++ b/src/editors/ECore/Editor/EditObject.cpp @@ -96,7 +96,7 @@ bool CEditableObject::ContainsMesh(const CEditableMesh* m) CEditableMesh* CEditableObject::FindMeshByName(const char* name, CEditableMesh* Ignore) { for (EditMeshIt m = m_Meshes.begin(); m != m_Meshes.end(); m++) - if ((Ignore != (*m)) && (stricmp((*m)->Name().c_str(), name) == 0)) + if ((Ignore != (*m)) && (_stricmp((*m)->Name().c_str(), name) == 0)) return (*m); return 0; } @@ -194,7 +194,7 @@ void CEditableObject::TranslateToWorld(const Fmatrix& parent) CSurface* CEditableObject::FindSurfaceByName(const char* surf_name, int* s_id) { for (SurfaceIt s_it = m_Surfaces.begin(); s_it != m_Surfaces.end(); s_it++) - if (stricmp((*s_it)->_Name(), surf_name) == 0) + if (_stricmp((*s_it)->_Name(), surf_name) == 0) { if (s_id) *s_id = s_it - m_Surfaces.begin(); diff --git a/src/editors/ECore/Editor/EditObjectImport.cpp b/src/editors/ECore/Editor/EditObjectImport.cpp index 2297a9c6d5a..7267e90fcfd 100644 --- a/src/editors/ECore/Editor/EditObjectImport.cpp +++ b/src/editors/ECore/Editor/EditObjectImport.cpp @@ -53,7 +53,7 @@ bool CEditableObject::ImportLWO(const char* fn, bool optimize) surf->SetName(lwSurf->name && lwSurf->name[0] ? lwSurf->name : "Default"); surf->m_Flags.set(CSurface::sf2Sided, lwSurf->sideflags == 3); AnsiString enName = "default", lcName = "default", gmName = "default"; - if (lwSurf->nshaders && !stricmp(lwSurf->shader->name, SH_PLUGIN_NAME)) + if (lwSurf->nshaders && !_stricmp(lwSurf->shader->name, SH_PLUGIN_NAME)) { auto shader = (XRShader*)lwSurf->shader->data; enName = shader->en_name; diff --git a/src/editors/ECore/Editor/EditObjectMotions.cpp b/src/editors/ECore/Editor/EditObjectMotions.cpp index 8e18f4762e2..4b60198b868 100644 --- a/src/editors/ECore/Editor/EditObjectMotions.cpp +++ b/src/editors/ECore/Editor/EditObjectMotions.cpp @@ -313,7 +313,7 @@ bool CEditableObject::RemoveSMotion(const char* name) { SMotionVec& lst = m_SMotions; for (SMotionIt m = lst.begin(); m != lst.end(); m++) - if ((stricmp((*m)->Name(), name) == 0)) + if ((_stricmp((*m)->Name(), name) == 0)) { if (m_ActiveSMotion == *m) SetActiveSMotion(0); @@ -361,7 +361,7 @@ bool CEditableObject::AppendSMotion(LPCSTR fname, SMotionVec* inserted) bool bRes = true; LPCSTR ext = strext(fname); - if (0 == stricmp(ext, ".skl")) + if (0 == _stricmp(ext, ".skl")) { CSMotion* M = new CSMotion(); if (!M->LoadMotion(fname)) @@ -394,7 +394,7 @@ bool CEditableObject::AppendSMotion(LPCSTR fname, SMotionVec* inserted) } } } - else if (0 == stricmp(ext, ".skls")) + else if (0 == _stricmp(ext, ".skls")) { IReader* F = FS.r_open(fname); if (!F) @@ -460,7 +460,7 @@ bool CEditableObject::SaveSMotions(const char* fname) bool CEditableObject::RenameSMotion(const char* old_name, const char* new_name) { - if (stricmp(old_name, new_name) == 0) + if (_stricmp(old_name, new_name) == 0) return true; if (FindSMotionByName(new_name)) return false; @@ -476,7 +476,7 @@ CSMotion* CEditableObject::FindSMotionByName(const char* name, const CSMotion* I { SMotionVec& lst = m_SMotions; for (SMotionIt m = lst.begin(); m != lst.end(); m++) - if ((Ignore != (*m)) && (stricmp((*m)->Name(), name) == 0)) + if ((Ignore != (*m)) && (_stricmp((*m)->Name(), name) == 0)) return (*m); } return 0; @@ -491,7 +491,7 @@ void CEditableObject::GenerateSMotionName(char* buffer, const char* start_name, sprintf(buffer, "%s_%2d", start_name, idx); idx++; } - strlwr(buffer); + _strlwr(buffer); } ICF diff --git a/src/editors/ECore/Editor/ExportSkeleton.cpp b/src/editors/ECore/Editor/ExportSkeleton.cpp index 408e3515a8f..9d29fb71f29 100644 --- a/src/editors/ECore/Editor/ExportSkeleton.cpp +++ b/src/editors/ECore/Editor/ExportSkeleton.cpp @@ -1244,7 +1244,7 @@ bool CExportSkeleton::ExportMotionDefs(IWriter& F) { string512 buff; strcpy(buff, bp_it->alias.c_str()); - strlwr(buff); + _strlwr(buff); F.w_stringZ(buff); F.w_u16((u16)bp_it->bones.size()); for (int i = 0; i < int(bp_it->bones.size()); ++i) diff --git a/src/editors/ECore/Editor/Library.cpp b/src/editors/ECore/Editor/Library.cpp index 3cdbae9b11f..efb2a5080f4 100644 --- a/src/editors/ECore/Editor/Library.cpp +++ b/src/editors/ECore/Editor/Library.cpp @@ -78,7 +78,7 @@ void ELibrary::ReloadObject(LPCSTR nm) R_ASSERT(nm && nm[0]); string512 name; strcpy(name, nm); - strlwr(name); + _strlwr(name); EditObjPairIt it = m_EditObjects.find(name); if (it != m_EditObjects.end()) it->second->Reload(); diff --git a/src/editors/ECore/Editor/UI_MainCommand.cpp b/src/editors/ECore/Editor/UI_MainCommand.cpp index 18a802bf6fb..75ee5ad7f57 100644 --- a/src/editors/ECore/Editor/UI_MainCommand.cpp +++ b/src/editors/ECore/Editor/UI_MainCommand.cpp @@ -58,7 +58,7 @@ SECommand* FindCommandByName(LPCSTR nm) for (u32 cmd_idx = 0; cmd_idx < cmds.size(); cmd_idx++) { SECommand*& CMD = cmds[cmd_idx]; - if (CMD && (0 == stricmp(CMD->name, nm))) + if (CMD && (0 == _stricmp(CMD->name, nm))) return CMD; } return 0; @@ -70,7 +70,7 @@ SESubCommand* FindSubCommandByName(SECommand* CMD, LPCSTR nm) for (u32 sub_cmd_idx = 0; sub_cmd_idx < CMD->sub_commands.size(); sub_cmd_idx++) { SESubCommand* SUB_CMD = CMD->sub_commands[sub_cmd_idx]; - if (0 == stricmp(SUB_CMD->desc.c_str(), nm)) + if (0 == _stricmp(SUB_CMD->desc.c_str(), nm)) return SUB_CMD; } return 0; diff --git a/src/editors/ECore/Editor/UI_ToolsCustom.cpp b/src/editors/ECore/Editor/UI_ToolsCustom.cpp index 15cbc00b193..15b357c9b65 100644 --- a/src/editors/ECore/Editor/UI_ToolsCustom.cpp +++ b/src/editors/ECore/Editor/UI_ToolsCustom.cpp @@ -180,13 +180,13 @@ bool __fastcall CToolCustom::MouseStart(TShiftState Shift) if (pinfo.e_mesh) { LPCSTR mn = pinfo.e_mesh->Name().c_str(); - if (0 == stricmp(mn, "axis_x")) + if (0 == _stricmp(mn, "axis_x")) SetAxis(etAxisX); - else if (0 == stricmp(mn, "axis_y")) + else if (0 == _stricmp(mn, "axis_y")) SetAxis(etAxisY); - else if (0 == stricmp(mn, "axis_z")) + else if (0 == _stricmp(mn, "axis_z")) SetAxis(etAxisZ); - else if (0 == stricmp(mn, "center")) + else if (0 == _stricmp(mn, "center")) SetAxis(etAxisZX); else R_ASSERT2(0, "fix axis name"); diff --git a/src/editors/ECore/Editor/xrLoadSurface.cpp b/src/editors/ECore/Editor/xrLoadSurface.cpp index 08edeca9465..0017960cde2 100644 --- a/src/editors/ECore/Editor/xrLoadSurface.cpp +++ b/src/editors/ECore/Editor/xrLoadSurface.cpp @@ -12,7 +12,7 @@ struct SExts if (ext && ext[0]) { for (u32 i = 0; i < exts.size(); i++) - if (0 == stricmp(exts[i], ext)) + if (0 == _stricmp(exts[i], ext)) return; exts.push_back(xr_strdup(ext)); } diff --git a/src/editors/LevelEditor/BottomBar.cpp b/src/editors/LevelEditor/BottomBar.cpp index e1fb28fd92a..4db82b72b6b 100644 --- a/src/editors/LevelEditor/BottomBar.cpp +++ b/src/editors/LevelEditor/BottomBar.cpp @@ -196,7 +196,7 @@ void __fastcall TfraBottomBar::pmOptionsPopup(TObject* Sender) { TMenuItem* mi = miWeather->Items[i]; BOOL bch; - bch = ((EPrefs->sWeather.size()) && (0 == stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || + bch = ((EPrefs->sWeather.size()) && (0 == _stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || (mi->Caption == "none" && EPrefs->sWeather.size() == 0); mi->Checked = bch; } diff --git a/src/editors/LevelEditor/Edit/BuilderRemote.cpp b/src/editors/LevelEditor/Edit/BuilderRemote.cpp index 4be98ac3248..34d6374e957 100644 --- a/src/editors/LevelEditor/Edit/BuilderRemote.cpp +++ b/src/editors/LevelEditor/Edit/BuilderRemote.cpp @@ -1274,7 +1274,7 @@ int SceneBuilder::BuildShaderXRLC(const char* s) int SceneBuilder::FindInTextures(const char* name) { for (u32 i = 0; i < l_textures.size(); i++) - if (stricmp(l_textures[i].name, name) == 0) + if (_stricmp(l_textures[i].name, name) == 0) return i; return -1; } diff --git a/src/editors/LevelEditor/Edit/CustomObject.h b/src/editors/LevelEditor/Edit/CustomObject.h index ee1f9437ee1..3098558ea39 100644 --- a/src/editors/LevelEditor/Edit/CustomObject.h +++ b/src/editors/LevelEditor/Edit/CustomObject.h @@ -118,7 +118,7 @@ class ECORE_API CCustomObject { string256 tmp; strcpy(tmp, N); - strlwr(tmp); + _strlwr(tmp); FName = tmp; } diff --git a/src/editors/LevelEditor/Edit/EParticlesObject.h b/src/editors/LevelEditor/Edit/EParticlesObject.h index 611f75dea4e..e7235fd39dc 100644 --- a/src/editors/LevelEditor/Edit/EParticlesObject.h +++ b/src/editors/LevelEditor/Edit/EParticlesObject.h @@ -55,7 +55,7 @@ class EParticlesObject : public CCustomObject RefCompare(LPCSTR ref_name) { VERIFY(ref_name && ref_name[0]); - return (0 == stricmp(ref_name, GetReferenceName())); + return (0 == _stricmp(ref_name, GetReferenceName())); } bool Compile(LPCSTR ref_name); diff --git a/src/editors/LevelEditor/Edit/ESceneDOTools_Generate.cpp b/src/editors/LevelEditor/Edit/ESceneDOTools_Generate.cpp index 930a11a9e30..d818da9cdd0 100644 --- a/src/editors/LevelEditor/Edit/ESceneDOTools_Generate.cpp +++ b/src/editors/LevelEditor/Edit/ESceneDOTools_Generate.cpp @@ -514,7 +514,7 @@ bool EDetailManager::UpdateObjects(bool bUpdateTex, bool bUpdateSelectedOnly) CDetailManager::DetailIt EDetailManager::FindDOByNameIt(LPCSTR name) { for (DetailIt it = objects.begin(); it != objects.end(); it++) - if (stricmp(((EDetail*)(*it))->GetName(), name) == 0) + if (_stricmp(((EDetail*)(*it))->GetName(), name) == 0) return it; return objects.end(); } @@ -588,7 +588,7 @@ EDetail* EDetailManager::FindObjectInColorIndices(u32 index, LPCSTR name) { DOVec& lst = CI->second; for (DOIt it = lst.begin(); it != lst.end(); it++) - if (stricmp((*it)->GetName(), name) == 0) + if (_stricmp((*it)->GetName(), name) == 0) return *it; } return 0; diff --git a/src/editors/LevelEditor/Edit/ESceneObjectTools.cpp b/src/editors/LevelEditor/Edit/ESceneObjectTools.cpp index 90b20b5a110..273535faf0c 100644 --- a/src/editors/LevelEditor/Edit/ESceneObjectTools.cpp +++ b/src/editors/LevelEditor/Edit/ESceneObjectTools.cpp @@ -209,7 +209,7 @@ void ESceneObjectTool::HighlightTexture(LPCSTR tex_name, bool allow_ratio, u32 t SurfaceVec& s_vec = e_obj->Surfaces(); for (SurfaceIt it = s_vec.begin(); it != s_vec.end(); it++) { - if (0 == stricmp((*it)->_Texture(), tex_name)) + if (0 == _stricmp((*it)->_Texture(), tex_name)) { Fvector verts[3]; for (EditMeshIt mesh_it = e_obj->FirstMesh(); mesh_it != e_obj->LastMesh(); mesh_it++) diff --git a/src/editors/LevelEditor/Edit/ESceneObjectTools_.cpp b/src/editors/LevelEditor/Edit/ESceneObjectTools_.cpp index 0fca4138627..91f6dc8cbaf 100644 --- a/src/editors/LevelEditor/Edit/ESceneObjectTools_.cpp +++ b/src/editors/LevelEditor/Edit/ESceneObjectTools_.cpp @@ -181,7 +181,7 @@ void ESceneObjectTools::HighlightTexture(LPCSTR tex_name, bool allow_ratio, u32 SurfaceVec& s_vec = e_obj->Surfaces(); for (SurfaceIt it = s_vec.begin(); it != s_vec.end(); it++) { - if (0 == stricmp((*it)->_Texture(), tex_name)) + if (0 == _stricmp((*it)->_Texture(), tex_name)) { Fvector verts[3]; for (EditMeshIt mesh_it = e_obj->FirstMesh(); mesh_it != e_obj->LastMesh(); mesh_it++) diff --git a/src/editors/LevelEditor/Edit/ESceneObjectTools__.cpp b/src/editors/LevelEditor/Edit/ESceneObjectTools__.cpp index be589bf70c6..c6a3ee3fcfb 100644 --- a/src/editors/LevelEditor/Edit/ESceneObjectTools__.cpp +++ b/src/editors/LevelEditor/Edit/ESceneObjectTools__.cpp @@ -180,7 +180,7 @@ void ESceneObjectTools::HighlightTexture(LPCSTR tex_name, bool allow_ratio, u32 SurfaceVec& s_vec = e_obj->Surfaces(); for (SurfaceIt it = s_vec.begin(); it != s_vec.end(); it++) { - if (0 == stricmp((*it)->_Texture(), tex_name)) + if (0 == _stricmp((*it)->_Texture(), tex_name)) { Fvector verts[3]; for (EditMeshIt mesh_it = e_obj->FirstMesh(); mesh_it != e_obj->LastMesh(); mesh_it++) diff --git a/src/editors/LevelEditor/Edit/SceneSummaryInfo.cpp b/src/editors/LevelEditor/Edit/SceneSummaryInfo.cpp index cd020ac90d6..f52b9ca1841 100644 --- a/src/editors/LevelEditor/Edit/SceneSummaryInfo.cpp +++ b/src/editors/LevelEditor/Edit/SceneSummaryInfo.cpp @@ -35,7 +35,7 @@ void SSceneSummary::Prepare() xr_string _itoa(int val) { string64 tmp; - return itoa(val, tmp, 10); + return _itoa(val, tmp, 10); } void SSceneSummary::SObjectInfo::Prepare() diff --git a/src/editors/LevelEditor/Edit/SceneUndo.cpp b/src/editors/LevelEditor/Edit/SceneUndo.cpp index bc64e234c2e..91acc285dba 100644 --- a/src/editors/LevelEditor/Edit/SceneUndo.cpp +++ b/src/editors/LevelEditor/Edit/SceneUndo.cpp @@ -25,12 +25,12 @@ void EScene::UndoClear() { while (!m_RedoStack.empty()) { - unlink(m_RedoStack.back().m_FileName); + _unlink(m_RedoStack.back().m_FileName); m_RedoStack.pop_back(); } while (!m_UndoStack.empty()) { - unlink(m_UndoStack.back().m_FileName); + _unlink(m_UndoStack.back().m_FileName); m_UndoStack.pop_back(); } } @@ -53,13 +53,13 @@ void EScene::UndoSave() while (!m_RedoStack.empty()) { - unlink(m_RedoStack.back().m_FileName); + _unlink(m_RedoStack.back().m_FileName); m_RedoStack.pop_back(); } if (m_UndoStack.size() > EPrefs->scene_undo_level) { - unlink(m_UndoStack.front().m_FileName); + _unlink(m_UndoStack.front().m_FileName); m_UndoStack.pop_front(); } } @@ -74,7 +74,7 @@ bool EScene::Undo() if (m_RedoStack.size() > EPrefs->scene_undo_level) { - unlink(m_RedoStack.front().m_FileName); + _unlink(m_RedoStack.front().m_FileName); m_RedoStack.pop_front(); } @@ -104,7 +104,7 @@ bool EScene::Redo() if (m_UndoStack.size() > EPrefs->scene_undo_level) { - unlink(m_UndoStack.front().m_FileName); + _unlink(m_UndoStack.front().m_FileName); m_UndoStack.pop_front(); } diff --git a/src/editors/LevelEditor/Edit/sector.cpp b/src/editors/LevelEditor/Edit/sector.cpp index 868005c3e03..b32890f56c0 100644 --- a/src/editors/LevelEditor/Edit/sector.cpp +++ b/src/editors/LevelEditor/Edit/sector.cpp @@ -44,7 +44,7 @@ CSectorItem::CSectorItem(CSceneObject* o, CEditableMesh* m) void CSectorItem::GetTransform(Fmatrix& parent) { object->GetFullTransformToWorld(parent); } bool CSectorItem::IsItem(const char* O, const char* M) { - return (0 == stricmp(O, object->Name)) && (0 == stricmp(M, mesh->Name().c_str())); + return (0 == _stricmp(O, object->Name)) && (0 == _stricmp(M, mesh->Name().c_str())); } //------------------------------------------------------------------------------ diff --git a/src/editors/LevelEditor/EditLibrary.cpp b/src/editors/LevelEditor/EditLibrary.cpp index 2141bce541c..ffcafb7b734 100644 --- a/src/editors/LevelEditor/EditLibrary.cpp +++ b/src/editors/LevelEditor/EditLibrary.cpp @@ -663,7 +663,7 @@ void TfrmEditLibrary::ChangeReference(const RStringVec& items) // save new position CEditableObject* E = m_pEditObject->GetReference(); - if (E && new_name && (stricmp(E->GetName(),new_name))==0 ) return; + if (E && new_name && (_stricmp(E->GetName(),new_name))==0 ) return; if (E) { diff --git a/src/editors/LevelEditor/ShaderFunction.cpp b/src/editors/LevelEditor/ShaderFunction.cpp index 8e3696501ef..39920a07434 100644 --- a/src/editors/LevelEditor/ShaderFunction.cpp +++ b/src/editors/LevelEditor/ShaderFunction.cpp @@ -52,7 +52,7 @@ AnsiString& GetTokenNameFromVal_EQ(u32 val, AnsiString& res, const xr_token* tok u32 GetTokenValFromName(const LPCSTR val, const xr_token* token_list) { for (int i = 0; token_list[i].name; i++) - if (!stricmp(val, token_list[i].name)) + if (!_stricmp(val, token_list[i].name)) return token_list[i].id; return 0; } diff --git a/src/editors/ParticleEditor/BottomBar.cpp b/src/editors/ParticleEditor/BottomBar.cpp index b5ce81c1d78..3c5697d1cfd 100644 --- a/src/editors/ParticleEditor/BottomBar.cpp +++ b/src/editors/ParticleEditor/BottomBar.cpp @@ -197,7 +197,7 @@ void __fastcall TfraBottomBar::pmOptionsPopup(TObject* Sender) { TMenuItem* mi = miWeather->Items[i]; BOOL bch; - bch = ((EPrefs->sWeather.size()) && (0 == stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || + bch = ((EPrefs->sWeather.size()) && (0 == _stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || (mi->Caption == "none" && EPrefs->sWeather.size() == 0); mi->Checked = bch; } diff --git a/src/editors/ParticleEditor/ParticleEffectEditor.cpp b/src/editors/ParticleEditor/ParticleEffectEditor.cpp index c2cdfb6255f..cb6721d5feb 100644 --- a/src/editors/ParticleEditor/ParticleEffectEditor.cpp +++ b/src/editors/ParticleEditor/ParticleEffectEditor.cpp @@ -79,7 +79,7 @@ void __fastcall PS::CPEDef::FindActionByName(LPCSTR new_name, bool& res) { res = false; for (EPAVecIt s_it = m_EActionList.begin(); s_it != m_EActionList.end(); s_it++) - if (0 == stricmp(new_name, *(*s_it)->actionName)) + if (0 == _stricmp(new_name, *(*s_it)->actionName)) { res = true; break; diff --git a/src/editors/ParticleEditor/ParticleEffectParser.cpp b/src/editors/ParticleEditor/ParticleEffectParser.cpp index 77a69c6bf80..70a7a79d141 100644 --- a/src/editors/ParticleEditor/ParticleEffectParser.cpp +++ b/src/editors/ParticleEditor/ParticleEffectParser.cpp @@ -505,8 +505,8 @@ IC bool get_bool(LPCSTR a, var& val) { - bool b0 = (0 == stricmp(a, "false")); - bool b1 = (0 == stricmp(a, "true")); + bool b0 = (0 == _stricmp(a, "false")); + bool b1 = (0 == _stricmp(a, "true")); if (b0 == b1) return false; val = (BOOL)b1; diff --git a/src/editors/ParticleEditor/UI_ParticleTools.cpp b/src/editors/ParticleEditor/UI_ParticleTools.cpp index 453521353fd..ec226860f6f 100644 --- a/src/editors/ParticleEditor/UI_ParticleTools.cpp +++ b/src/editors/ParticleEditor/UI_ParticleTools.cpp @@ -394,7 +394,7 @@ void CheckEffect(const xr_string& group_path, const shared_str& eff_full_name, x { res_name = group_path + "effects\\" + EFS.ExtractFileName(eff_full_name.c_str()); - if (0 != stricmp(res_name.c_str(), eff_full_name.c_str())) + if (0 != _stricmp(res_name.c_str(), eff_full_name.c_str())) { PS::CPEDef* old_ped = ::Render->PSLibrary.FindPED(eff_full_name.c_str()); PS::CPEDef* new_ped = ::Render->PSLibrary.FindPED(res_name.c_str()); @@ -413,7 +413,7 @@ void CheckEffect(const xr_string& group_path, const shared_str& eff_full_name, x else Msg("create new effect [%s]", res_name.c_str()); } - VERIFY(0 == stricmp(new_ped->m_Name.c_str(), res_name.c_str())); + VERIFY(0 == _stricmp(new_ped->m_Name.c_str(), res_name.c_str())); } } diff --git a/src/editors/ShaderEditor/BottomBar.cpp b/src/editors/ShaderEditor/BottomBar.cpp index beccf206de0..08a80b96319 100644 --- a/src/editors/ShaderEditor/BottomBar.cpp +++ b/src/editors/ShaderEditor/BottomBar.cpp @@ -198,7 +198,7 @@ void __fastcall TfraBottomBar::pmOptionsPopup(TObject* Sender) { TMenuItem* mi = miWeather->Items[i]; BOOL bch; - bch = ((EPrefs->sWeather.size()) && (0 == stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || + bch = ((EPrefs->sWeather.size()) && (0 == _stricmp(mi->Caption.c_str(), EPrefs->sWeather.c_str()))) || (mi->Caption == "none" && EPrefs->sWeather.size() == 0); mi->Checked = bch; } diff --git a/src/utils/xrAI/game_spawn_constructor.cpp b/src/utils/xrAI/game_spawn_constructor.cpp index 2c12c7ce405..d573719fa43 100644 --- a/src/utils/xrAI/game_spawn_constructor.cpp +++ b/src/utils/xrAI/game_spawn_constructor.cpp @@ -69,7 +69,7 @@ void CGameSpawnConstructor::load_spawns(LPCSTR name, bool no_separator_check) xr_vector needed_levels; string4096 levels_string; xr_strcpy(levels_string, name); - strlwr(levels_string); + _strlwr(levels_string); fill_needed_levels(levels_string, needed_levels); // fill level info diff --git a/src/utils/xrAI/xrAI.cpp b/src/utils/xrAI/xrAI.cpp index d1c1caa55f1..40f3d13f228 100644 --- a/src/utils/xrAI/xrAI.cpp +++ b/src/utils/xrAI/xrAI.cpp @@ -160,7 +160,7 @@ void Startup(LPSTR lpCmdLine) BOOL bModifyOptions = FALSE; xr_strcpy(cmd, lpCmdLine); - strlwr(cmd); + _strlwr(cmd); if (strstr(cmd, "-?") || strstr(cmd, "-h")) { Help(); diff --git a/src/utils/xrAI/xr_graph_merge.cpp b/src/utils/xrAI/xr_graph_merge.cpp index 15dc638bbea..d8ba8ed3c93 100644 --- a/src/utils/xrAI/xr_graph_merge.cpp +++ b/src/utils/xrAI/xr_graph_merge.cpp @@ -421,7 +421,7 @@ void read_levels(CInifile* Ini, xr_set& levels, bool rebuild_graph, { string256 N; xr_strcpy(N, _N); - strlwr(N); + _strlwr(N); if (!Ini->section_exist(N)) { @@ -451,7 +451,7 @@ void read_levels(CInifile* Ini, xr_set& levels, bool rebuild_graph, auto _S = Ini->r_string(N, "name"); string256 S; xr_strcpy(S, _S); - strlwr(S); + _strlwr(S); if (needed_levels) { @@ -584,7 +584,7 @@ CGraphMerger::CGraphMerger(LPCSTR game_graph_id, LPCSTR name, bool rebuild) xr_vector needed_levels; string4096 levels_string; xr_strcpy(levels_string, name); - strlwr(levels_string); + _strlwr(levels_string); fill_needed_levels(levels_string, needed_levels); read_levels(Ini, levels, rebuild, &needed_levels); @@ -652,7 +652,7 @@ CGraphMerger::CGraphMerger(LPCSTR game_graph_id, LPCSTR name, bool rebuild) R_ASSERT(M != (*K).second->m_tVertexMap.end()); } - // if (!stricmp("l06_rostok",*(*I).second->m_tLevel.name())) { + // if (!_stricmp("l06_rostok",*(*I).second->m_tLevel.name())) { // __asm int 3; // } Msg("Level %s with id %d has VALID connection point %s,\nwhich references to graph point %s on the " diff --git a/src/utils/xrCompress/xrCompress.cpp b/src/utils/xrCompress/xrCompress.cpp index 89232827f81..40be8f08d40 100644 --- a/src/utils/xrCompress/xrCompress.cpp +++ b/src/utils/xrCompress/xrCompress.cpp @@ -44,48 +44,48 @@ bool xrCompressor::testSKIP(LPCSTR path) if (strstr(path, "textures\\det\\")) return true; - if (stricmp(p_ext, ".thm") && strstr(path, "textures\\terrain\\terrain_") && !is_tail(p_name, "_mask", 5)) + if (_stricmp(p_ext, ".thm") && strstr(path, "textures\\terrain\\terrain_") && !is_tail(p_name, "_mask", 5)) return true; if (strstr(path, "textures\\") && is_tail(p_name, "_nmap", 5) && !strstr(p_name, "water_flowing_nmap")) return true; - if (0 == stricmp(p_name, "build")) + if (0 == _stricmp(p_name, "build")) { - if (0 == stricmp(p_ext, ".aimap")) + if (0 == _stricmp(p_ext, ".aimap")) return true; - if (0 == stricmp(p_ext, ".cform")) + if (0 == _stricmp(p_ext, ".cform")) return true; - if (0 == stricmp(p_ext, ".details")) + if (0 == _stricmp(p_ext, ".details")) return true; - if (0 == stricmp(p_ext, ".prj")) + if (0 == _stricmp(p_ext, ".prj")) return true; - if (0 == stricmp(p_ext, ".lights")) + if (0 == _stricmp(p_ext, ".lights")) return false; } - if (0 == stricmp(p_name, "do_light") && 0 == stricmp(p_ext, ".ltx")) + if (0 == _stricmp(p_name, "do_light") && 0 == _stricmp(p_ext, ".ltx")) return true; - if (0 == stricmp(p_ext, ".txt")) + if (0 == _stricmp(p_ext, ".txt")) return true; - if (0 == stricmp(p_ext, ".tga")) + if (0 == _stricmp(p_ext, ".tga")) return true; - if (0 == stricmp(p_ext, ".db")) + if (0 == _stricmp(p_ext, ".db")) return true; - if (0 == stricmp(p_ext, ".smf")) + if (0 == _stricmp(p_ext, ".smf")) return true; if ('~' == p_ext[1]) return true; if ('_' == p_ext[1]) return true; - if (0 == stricmp(p_ext, ".vcproj")) + if (0 == _stricmp(p_ext, ".vcproj")) return true; - if (0 == stricmp(p_ext, ".sln")) + if (0 == _stricmp(p_ext, ".sln")) return true; - if (0 == stricmp(p_ext, ".old")) + if (0 == _stricmp(p_ext, ".old")) return true; - if (0 == stricmp(p_ext, ".rc")) + if (0 == _stricmp(p_ext, ".rc")) return true; for (xr_vector::iterator it = exclude_exts.begin(); it != exclude_exts.end(); ++it) @@ -103,13 +103,13 @@ bool xrCompressor::testVFS(LPCSTR path) string256 p_ext; _splitpath(path, 0, 0, 0, p_ext); - if (!stricmp(p_ext, ".xml")) + if (!_stricmp(p_ext, ".xml")) return (false); - if (!stricmp(p_ext, ".ltx")) + if (!_stricmp(p_ext, ".ltx")) return (FALSE); - if (!stricmp(p_ext, ".script")) + if (!_stricmp(p_ext, ".script")) return (FALSE); return (TRUE); @@ -332,11 +332,11 @@ void xrCompressor::OpenPack(LPCSTR tgt_folder, int num) string_path fname; string128 s_num; #ifdef MOD_COMPRESS - strconcat(sizeof(fname), fname, tgt_folder, ".xdb", itoa(num, s_num, 10)); + strconcat(sizeof(fname), fname, tgt_folder, ".xdb", _itoa(num, s_num, 10)); #else - strconcat(sizeof(fname), fname, tgt_folder, ".pack_#", itoa(num, s_num, 10)); + strconcat(sizeof(fname), fname, tgt_folder, ".pack_#", _itoa(num, s_num, 10)); #endif - unlink(fname); + _unlink(fname); fs_pack_writer = FS.w_open(fname); fs_desc.clear(); aliases.clear(); diff --git a/src/utils/xrDO_Light/xrDO_Light.cpp b/src/utils/xrDO_Light/xrDO_Light.cpp index 7b3734b9bc9..de4fa5267cf 100644 --- a/src/utils/xrDO_Light/xrDO_Light.cpp +++ b/src/utils/xrDO_Light/xrDO_Light.cpp @@ -47,7 +47,7 @@ void Startup(LPSTR lpCmdLine) // BOOL bModifyOptions = FALSE; bool bNet = false; xr_strcpy(cmd, lpCmdLine); - strlwr(cmd); + _strlwr(cmd); if (strstr(cmd, "-?") || strstr(cmd, "-h")) { Help(); diff --git a/src/utils/xrDXT/DXT.cpp b/src/utils/xrDXT/DXT.cpp index 6307d457ddc..8e7ec75c5c1 100644 --- a/src/utils/xrDXT/DXT.cpp +++ b/src/utils/xrDXT/DXT.cpp @@ -283,7 +283,7 @@ int DXTCompressImage(LPCSTR out_name, u8* raw_data, u32 w, u32 h, u32 pitch, STe _close(gFileOut); if (!result) { - unlink(out_name); + _unlink(out_name); return 0; } return 1; diff --git a/src/utils/xrDXT/Image_DXTC.cpp b/src/utils/xrDXT/Image_DXTC.cpp index e1b01717470..5a1f27dc15a 100644 --- a/src/utils/xrDXT/Image_DXTC.cpp +++ b/src/utils/xrDXT/Image_DXTC.cpp @@ -76,7 +76,7 @@ bool Image_DXTC::LoadFromFile(LPCSTR filename) int next = 1; char fileupper[256]; strcpy_s(fileupper, filename); - strupr(fileupper); + _strupr(fileupper); // TRACE( "\n" ); // TRACE( "\n" ); bool knownformat = false; diff --git a/src/utils/xrLC/Build_Load.cpp b/src/utils/xrLC/Build_Load.cpp index b96362855b9..ff602ae2c30 100644 --- a/src/utils/xrLC/Build_Load.cpp +++ b/src/utils/xrLC/Build_Load.cpp @@ -257,17 +257,17 @@ void CBuild::Load(const b_params& Params, const IReader& _in_FS) for (u32 LH = 0; LH < L_layers.size(); LH++) { R_Layer& TEST = L_layers[LH]; - if (0 == stricmp(TEST.control.name, LCONTROL_HEMI)) + if (0 == _stricmp(TEST.control.name, LCONTROL_HEMI)) { // Hemi found L_static().hemi = TEST.lights; } - if (0 == stricmp(TEST.control.name, LCONTROL_SUN)) + if (0 == _stricmp(TEST.control.name, LCONTROL_SUN)) { // Sun found L_static().sun = TEST.lights; } - if (0 == stricmp(TEST.control.name, LCONTROL_STATIC)) + if (0 == _stricmp(TEST.control.name, LCONTROL_STATIC)) { // Static found L_static().rgb = TEST.lights; @@ -304,7 +304,7 @@ void CBuild::Load(const b_params& Params, const IReader& _in_FS) LPSTR N = BT.name; if (strchr(N, '.')) *(strchr(N, '.')) = 0; - strlwr(N); + _strlwr(N); if (0 == xr_strcmp(N, "level_lods")) { // HACK for merged lod textures diff --git a/src/utils/xrLC/xrLC.cpp b/src/utils/xrLC/xrLC.cpp index ec69172791c..31eee22d614 100644 --- a/src/utils/xrLC/xrLC.cpp +++ b/src/utils/xrLC/xrLC.cpp @@ -56,7 +56,7 @@ void Startup(LPSTR lpCmdLine) BOOL bModifyOptions = FALSE; xr_strcpy(cmd, lpCmdLine); - strlwr(cmd); + _strlwr(cmd); if (strstr(cmd, "-?") || strstr(cmd, "-h")) { Help(); diff --git a/src/utils/xrLC/xrSaveOGF.cpp b/src/utils/xrLC/xrSaveOGF.cpp index 83572ea595e..6022b41adb9 100644 --- a/src/utils/xrLC/xrSaveOGF.cpp +++ b/src/utils/xrLC/xrSaveOGF.cpp @@ -25,7 +25,7 @@ static u32 g_batch_5000; u16 RegisterShader(LPCSTR T) { for (u32 it = 0; it < pBuild->g_Shaders.size(); it++) - if (0 == stricmp(T, pBuild->g_Shaders[it])) + if (0 == _stricmp(T, pBuild->g_Shaders[it])) return it; pBuild->g_Shaders.push_back(xr_strdup(T)); return pBuild->g_Shaders.size() - 1; diff --git a/src/utils/xrLC_Light/file_compress.cpp b/src/utils/xrLC_Light/file_compress.cpp index 53066277a76..cbf4ce2dd18 100644 --- a/src/utils/xrLC_Light/file_compress.cpp +++ b/src/utils/xrLC_Light/file_compress.cpp @@ -57,7 +57,7 @@ void compress(LPCSTR f_in_out) compress(f_in_out, tmp); if (GetFileAttributes(f_in_out) != u32(-1)) - unlink(f_in_out); + _unlink(f_in_out); // physically rename file VerifyPath(f_in_out); rename(tmp, f_in_out); @@ -69,7 +69,7 @@ void decompress(LPCSTR f_in_out) strconcat(sizeof(tmp), tmp, f_in_out, "___dtmp"); decompress(f_in_out, tmp); if (GetFileAttributes(f_in_out) != u32(-1)) - unlink(f_in_out); + _unlink(f_in_out); // physically rename file VerifyPath(f_in_out); rename(tmp, f_in_out); diff --git a/src/utils/xrLC_Light/gl_base_cl_data.cpp b/src/utils/xrLC_Light/gl_base_cl_data.cpp index a3a2adfc1bd..9fd5110186e 100644 --- a/src/utils/xrLC_Light/gl_base_cl_data.cpp +++ b/src/utils/xrLC_Light/gl_base_cl_data.cpp @@ -35,7 +35,7 @@ bool net_global_data_impl::create_data(LPCSTR path) VERIFY(inlc_global_data()); inlc_global_data()->read_base(r_global); - // unlink( fn ); + // _unlink( fn ); FPU::m64r(); Memory.mem_compact(); diff --git a/src/utils/xrLC_Light/global_calculation_data.cpp b/src/utils/xrLC_Light/global_calculation_data.cpp index df2c4ceab49..c20868730c9 100644 --- a/src/utils/xrLC_Light/global_calculation_data.cpp +++ b/src/utils/xrLC_Light/global_calculation_data.cpp @@ -129,7 +129,7 @@ void global_claculation_data::xrLoad() LPSTR N = BT.name; if (strchr(N, '.')) *(strchr(N, '.')) = 0; - strlwr(N); + _strlwr(N); if (0 == xr_strcmp(N, "level_lods")) { diff --git a/src/utils/xrLC_Light/lm_net_global_data.cpp b/src/utils/xrLC_Light/lm_net_global_data.cpp index 36d09e37e67..e7bcb2ca211 100644 --- a/src/utils/xrLC_Light/lm_net_global_data.cpp +++ b/src/utils/xrLC_Light/lm_net_global_data.cpp @@ -37,7 +37,7 @@ bool net_global_data_impl::create_data(LPCSTR path) INetReaderFile r_global(path); inlc_global_data()->read_lm_data(r_global); } - // unlink( fn ); + // _unlink( fn ); // inlc_global_data()->create_read_faces(); // inlc_global_data()->create_write_faces(); FPU::m64r(); diff --git a/src/utils/xrLC_Light/ref_model_net_global_data.cpp b/src/utils/xrLC_Light/ref_model_net_global_data.cpp index ffd278afdf4..3eefb1f0fbe 100644 --- a/src/utils/xrLC_Light/ref_model_net_global_data.cpp +++ b/src/utils/xrLC_Light/ref_model_net_global_data.cpp @@ -27,7 +27,7 @@ bool net_global_data_impl::create_data(LPCSTR path) inlc_global_data()->read_mu_model_refs(r_global); inlc_global_data()->read_modes_color(r_global); } - // unlink( fn ); + // _unlink( fn ); FPU::m64r(); Memory.mem_compact(); return true; diff --git a/src/xrCore/SubAlloc.hpp b/src/xrCore/SubAlloc.hpp index 67d11908a76..0b96435b9dc 100644 --- a/src/xrCore/SubAlloc.hpp +++ b/src/xrCore/SubAlloc.hpp @@ -26,11 +26,11 @@ struct BLK_NODE p->next = next; next = p; } - void unlink() { next = next->next; } + void _unlink() { next = next->next; } void* remove() { BLK_NODE* p = next; - unlink(); + _unlink(); Stamp--; return p; } @@ -276,7 +276,7 @@ static inline void ExpandTextArea() for (p = BList + i; Count[i] != 0; p = p->next) while (!p->next->Stamp) { - p->unlink(); + p->_unlink(); BList[i].Stamp--; if (!--Count[i]) break; diff --git a/src/xrCore/_std_extensions.h b/src/xrCore/_std_extensions.h index 289207615d7..aaf234b9dae 100644 --- a/src/xrCore/_std_extensions.h +++ b/src/xrCore/_std_extensions.h @@ -47,7 +47,7 @@ IC char* xr_strcpy(char* strDestination, size_t sizeInBytes, const char* strSour } IC char* xr_strcpy(char* strDestination, const char* strSource) { return strcpy(strDestination, strSource); } -IC char* _strlwr_s(char* strDestination, size_t sizeInBytes) { return strlwr(strDestination); } +IC char* _strlwr_s(char* strDestination, size_t sizeInBytes) { return _strlwr(strDestination); } IC char* xr_strcat(char* strDestination, size_t sizeInBytes, const char* strSource) { return strncat(strDestination, strSource, sizeInBytes); diff --git a/src/xrCore/memory_monitor.cpp b/src/xrCore/memory_monitor.cpp index 2c991a4874a..007d6919c26 100644 --- a/src/xrCore/memory_monitor.cpp +++ b/src/xrCore/memory_monitor.cpp @@ -89,7 +89,7 @@ void memory_monitor::monitor_alloc( { counter++; counter_alloc++; - // if(0==stricmp(allocation_description,"char")) + // if(0==_stricmp(allocation_description,"char")) //{ // int d = 65+56; //} diff --git a/src/xrCore/ptmalloc3/malloc.c b/src/xrCore/ptmalloc3/malloc.c index 31ad3c595ec..b8c31ad94ba 100644 --- a/src/xrCore/ptmalloc3/malloc.c +++ b/src/xrCore/ptmalloc3/malloc.c @@ -1921,7 +1921,7 @@ static MLOCK_T morecore_mutex = NULL_LOCK_INITIALIZER; Given a pointer to a chunk (which can be derived trivially from the payload pointer) we can, in O(1) time, find out whether the adjacent - chunks are free, and if so, unlink them from the lists that they + chunks are free, and if so, _unlink them from the lists that they are on and merge them with the current chunk. Chunks always begin on even word boundaries, so the mem portion @@ -3434,7 +3434,7 @@ static void internal_malloc_stats(mstate m) { /* Unlink steps: - 1. If x is a chained node, unlink it from its same-sized fd/bk links + 1. If x is a chained node, _unlink it from its same-sized fd/bk links and choose its bk node as its replacement. 2. If x was the last node of its size, but not a leaf node, it must be replaced with a leaf node (not merely one with an open left or @@ -3962,7 +3962,7 @@ static void* sys_alloc(mstate m, size_t nb) { /* ----------------------- system deallocation -------------------------- */ -/* Unmap and unlink any mmapped segments that don't contain used chunks */ +/* Unmap and _unlink any mmapped segments that don't contain used chunks */ static size_t release_unused_segments(mstate m) { size_t released = 0; int nsegs = 0; @@ -3990,7 +3990,7 @@ static size_t release_unused_segments(mstate m) { if (CALL_MUNMAP(base, size) == 0) { released += size; m->footprint -= size; - /* unlink obsoleted record */ + /* _unlink obsoleted record */ sp = pred; sp->next = next; } diff --git a/src/xrCore/ptmalloc3/sysdeps/win32/win32.c b/src/xrCore/ptmalloc3/sysdeps/win32/win32.c index 29947943225..c11243ec4fd 100644 --- a/src/xrCore/ptmalloc3/sysdeps/win32/win32.c +++ b/src/xrCore/ptmalloc3/sysdeps/win32/win32.c @@ -175,7 +175,7 @@ static int region_list_append (region_list_entry **last, void *base_reserved, IN *last = next; return TRUE; } -/* Free and unlink the last region entry from the region list */ +/* Free and _unlink the last region entry from the region list */ static int region_list_remove (region_list_entry **last) { region_list_entry *previous = (*last)->previous; if (! HeapFree (GetProcessHeap (), sizeof (region_list_entry), *last)) diff --git a/src/xrEngine/EventAPI.cpp b/src/xrEngine/EventAPI.cpp index 5e4905b10cd..3175ac40fd9 100644 --- a/src/xrEngine/EventAPI.cpp +++ b/src/xrEngine/EventAPI.cpp @@ -21,7 +21,7 @@ class ENGINE_API CEvent LPCSTR GetFull() { return Name; } u32 RefCount() { return dwRefCount; } - BOOL Equal(CEvent& E) { return stricmp(Name, E.Name) == 0; } + BOOL Equal(CEvent& E) { return _stricmp(Name, E.Name) == 0; } void Attach(IEventReceiver* H) { if (std::find(Handlers.begin(), Handlers.end(), H) == Handlers.end()) @@ -144,11 +144,11 @@ void CEventAPI::Defer(LPCSTR N, u64 P1, u64 P2) #ifdef DEBUG void msParse(LPCSTR c) { - if (0 == stricmp(c, "exit")) + if (0 == _stricmp(c, "exit")) { Console->Execute("quit"); } - if (0 == stricmp(c, "quit")) + if (0 == _stricmp(c, "quit")) { TerminateProcess(GetCurrentProcess(), 0); Console->Execute("quit"); @@ -188,7 +188,7 @@ BOOL CEventAPI::Peek(LPCSTR EName) for (u32 I = 0; I < Events_Deferred.size(); I++) { Deferred& DEF = Events_Deferred[I]; - if (stricmp(DEF.E->GetFull(), EName) == 0) + if (_stricmp(DEF.E->GetFull(), EName) == 0) { CS.Leave(); return TRUE; diff --git a/src/xrEngine/FDemoRecord.cpp b/src/xrEngine/FDemoRecord.cpp index 541f43cfe5f..c499155d6f7 100644 --- a/src/xrEngine/FDemoRecord.cpp +++ b/src/xrEngine/FDemoRecord.cpp @@ -267,10 +267,10 @@ void CDemoRecord::MakeCubeMapFace(Fvector& D, Fvector& N) case 5: N.set(cmNorm[m_Stage]); D.set(cmDir[m_Stage]); - GlobalEnv.Render->Screenshot(IRender::SM_FOR_CUBEMAP, itoa(m_Stage, buf, 10)); + GlobalEnv.Render->Screenshot(IRender::SM_FOR_CUBEMAP, _itoa(m_Stage, buf, 10)); break; case 6: - GlobalEnv.Render->Screenshot(IRender::SM_FOR_CUBEMAP, itoa(m_Stage, buf, 10)); + GlobalEnv.Render->Screenshot(IRender::SM_FOR_CUBEMAP, _itoa(m_Stage, buf, 10)); N.set(m_Camera.j); D.set(m_Camera.k); psHUD_Flags.assign(s_hud_flag); diff --git a/src/xrEngine/IGame_ObjectPool.cpp b/src/xrEngine/IGame_ObjectPool.cpp index 6bf77bc5dbe..48fde1f2787 100644 --- a/src/xrEngine/IGame_ObjectPool.cpp +++ b/src/xrEngine/IGame_ObjectPool.cpp @@ -106,7 +106,7 @@ map_POOL.clear(); IGameObject* IGame_ObjectPool::create ( LPCSTR name ) { string256 l_name; -POOL_IT it = map_POOL.find (shared_str(strlwr(xr_strcpy(l_name,name)))); +POOL_IT it = map_POOL.find (shared_str(_strlwr(xr_strcpy(l_name,name)))); if (it!=map_POOL.end()) { // Instance found diff --git a/src/xrEngine/Text_Console.cpp b/src/xrEngine/Text_Console.cpp index 466289d980f..c8d939006fe 100644 --- a/src/xrEngine/Text_Console.cpp +++ b/src/xrEngine/Text_Console.cpp @@ -251,7 +251,7 @@ void CTextConsole::DrawLog(HDC hDC, RECT* pRect) SetTextColor(hDC, RGB(205, 205, 225)); u32 log_line = LogFile->size() - 1; string16 q, q2; - itoa(log_line, q, 10); + _itoa(log_line, q, 10); xr_strcpy(q2, sizeof(q2), "["); xr_strcat(q2, sizeof(q2), q); xr_strcat(q2, sizeof(q2), "]"); diff --git a/src/xrEngine/XR_IOConsole.cpp b/src/xrEngine/XR_IOConsole.cpp index 30980b65439..28ad8ec8477 100644 --- a/src/xrEngine/XR_IOConsole.cpp +++ b/src/xrEngine/XR_IOConsole.cpp @@ -352,7 +352,7 @@ void CConsole::OnRender() } string16 q; - itoa(log_line, q, 10); + _itoa(log_line, q, 10); u32 qn = xr_strlen(q); pFont->SetColor(total_font_color); pFont->OutI(0.95f - 0.03f * qn, fMaxY - 2.0f * LDIST, "[%d]", log_line); @@ -559,7 +559,7 @@ void CConsole::ExecuteCommand(LPCSTR cmd_str, bool record_cmd) { if (cc->bLowerCaseArgs) { - strlwr(last); + _strlwr(last); } if (last[0] == 0) { @@ -765,7 +765,7 @@ bool CConsole::add_internal_cmds(LPCSTR in_str, vecTipsEx& out_v) if (name_sz >= in_sz) { name2.assign(name, in_sz); - if (!stricmp(name2.c_str(), in_str)) + if (!_stricmp(name2.c_str(), in_str)) { shared_str temp; temp._set(name); diff --git a/src/xrEngine/edit_actions.cpp b/src/xrEngine/edit_actions.cpp index 228d49fca51..ec9164b0cec 100644 --- a/src/xrEngine/edit_actions.cpp +++ b/src/xrEngine/edit_actions.cpp @@ -71,7 +71,7 @@ void type_pair::on_key_press(line_edit_control* const control) // The following 3 lines looks useless LPSTR loc; - STRCONCAT ( loc, ".", itoa( GetACP(), code_page, 10 ) ); + STRCONCAT ( loc, ".", _itoa( GetACP(), code_page, 10 ) ); setlocale ( LC_ALL, loc );*/ static _locale_t current_locale = _create_locale(LC_ALL, ""); diff --git a/src/xrEngine/x_ray.cpp b/src/xrEngine/x_ray.cpp index 1afa7ae5fa5..0ce4f9768ce 100644 --- a/src/xrEngine/x_ray.cpp +++ b/src/xrEngine/x_ray.cpp @@ -381,7 +381,7 @@ void gen_logo_name(string_path& dest, LPCSTR level_name, int num) string16 buff; xr_strcat(dest, sizeof(dest), "_"); - xr_strcat(dest, sizeof(dest), itoa(num + 1, buff, 10)); + xr_strcat(dest, sizeof(dest), _itoa(num + 1, buff, 10)); } void CApplication::Level_Set(u32 L) @@ -434,7 +434,7 @@ int CApplication::Level_ID(LPCSTR name, LPCSTR ver, bool bSet) { LPCSTR ln = A.header->r_string("header", "level_name"); LPCSTR lv = A.header->r_string("header", "level_ver"); - if (0 == stricmp(ln, name) && 0 == stricmp(lv, ver)) + if (0 == _stricmp(ln, name) && 0 == _stricmp(lv, ver)) { FS.LoadArchive(A); arch_res = true; @@ -449,7 +449,7 @@ int CApplication::Level_ID(LPCSTR name, LPCSTR ver, bool bSet) strconcat(sizeof(buffer), buffer, name, "\\"); for (u32 I = 0; I < Levels.size(); ++I) { - if (0 == stricmp(buffer, Levels[I].folder)) + if (0 == _stricmp(buffer, Levels[I].folder)) { result = int(I); break; @@ -475,7 +475,7 @@ CInifile* CApplication::GetArchiveHeader(LPCSTR name, LPCSTR ver) LPCSTR ln = A.header->r_string("header", "level_name"); LPCSTR lv = A.header->r_string("header", "level_ver"); - if (0 == stricmp(ln, name) && 0 == stricmp(lv, ver)) + if (0 == _stricmp(ln, name) && 0 == _stricmp(lv, ver)) { return A.header; } diff --git a/src/xrEngine/xrLoadSurface.cpp b/src/xrEngine/xrLoadSurface.cpp index 1fcdd02b917..2bd5bd8b4eb 100644 --- a/src/xrEngine/xrLoadSurface.cpp +++ b/src/xrEngine/xrLoadSurface.cpp @@ -11,7 +11,7 @@ struct SExts if (ext && ext[0]) { for (u32 i = 0; i < exts.size(); i++) - if (0 == stricmp(exts[i], ext)) + if (0 == _stricmp(exts[i], ext)) return; exts.push_back(xr_strdup(ext)); } diff --git a/src/xrEngine/xr_ioc_cmd.cpp b/src/xrEngine/xr_ioc_cmd.cpp index 28fd8861011..f92032bcec2 100644 --- a/src/xrEngine/xr_ioc_cmd.cpp +++ b/src/xrEngine/xr_ioc_cmd.cpp @@ -305,7 +305,7 @@ class CCC_Start : public IConsole_Command { string4096 out; xr_strcpy(out, sizeof(out), str); - strlwr(str); + _strlwr(str); LPCSTR name_str = "name="; LPCSTR name1 = strstr(str, name_str); @@ -348,7 +348,7 @@ class CCC_Start : public IConsole_Command parse(op_client, args, "client"); // 2. client parse(op_demo, args, "demo"); // 3. demo - strlwr(op_server); + _strlwr(op_server); protect_Name_strlwr(op_client); if (!op_client[0] && strstr(op_server, "single")) diff --git a/src/xrEngine/xr_ioc_cmd.h b/src/xrEngine/xr_ioc_cmd.h index ff42c222400..5f942b71ee0 100644 --- a/src/xrEngine/xr_ioc_cmd.h +++ b/src/xrEngine/xr_ioc_cmd.h @@ -168,7 +168,7 @@ class ENGINE_API CCC_Token : public IConsole_Command xr_token* tok = tokens; while (tok->name) { - if (stricmp(tok->name, args) == 0) + if (_stricmp(tok->name, args) == 0) { *value = tok->id; break; @@ -347,7 +347,7 @@ class ENGINE_API CCC_Integer : public IConsole_Command else *value = v; } - virtual void Status(TStatus& S) { itoa(*value, S, 10); } + virtual void Status(TStatus& S) { _itoa(*value, S, 10); } virtual void Info(TInfo& I) { xr_sprintf(I, sizeof(I), "integer value in range [%d,%d]", min, max); } virtual void fill_tips(vecTips& tips, u32 mode) { diff --git a/src/xrGame/Actor.cpp b/src/xrGame/Actor.cpp index a07671524b1..ebbc800efff 100644 --- a/src/xrGame/Actor.cpp +++ b/src/xrGame/Actor.cpp @@ -258,9 +258,9 @@ void set_box(LPCSTR section, CPHMovementControl& mc, u32 box_num) Fvector vBOX_center, vBOX_size; // m_PhysicMovementControl: BOX string64 buff, buff1; - strconcat(sizeof(buff), buff, "ph_box", itoa(box_num, buff1, 10), "_center"); + strconcat(sizeof(buff), buff, "ph_box", _itoa(box_num, buff1, 10), "_center"); vBOX_center = pSettings->r_fvector3(section, buff); - strconcat(sizeof(buff), buff, "ph_box", itoa(box_num, buff1, 10), "_size"); + strconcat(sizeof(buff), buff, "ph_box", _itoa(box_num, buff1, 10), "_size"); vBOX_size = pSettings->r_fvector3(section, buff); vBOX_size.y += cammera_into_collision_shift / 2.f; bb.set(vBOX_center, vBOX_center); diff --git a/src/xrGame/ActorAnimation.cpp b/src/xrGame/ActorAnimation.cpp index bdebc354cda..0e7940c341b 100644 --- a/src/xrGame/ActorAnimation.cpp +++ b/src/xrGame/ActorAnimation.cpp @@ -174,7 +174,7 @@ void SActorState::CreateClimb(IKinematicsAnimated* K) landing[1] = K->ID_Cycle(strconcat(sizeof(buf), buf, base, "_jump_end_1")); for (int k = 0; k < 12; ++k) - m_damage[k] = K->ID_FX(strconcat(sizeof(buf), buf, base, "_damage_", itoa(k, buf1, 10))); + m_damage[k] = K->ID_FX(strconcat(sizeof(buf), buf, base, "_damage_", _itoa(k, buf1, 10))); } void SActorState::Create(IKinematicsAnimated* K, LPCSTR base) @@ -209,7 +209,7 @@ void SActorState::Create(IKinematicsAnimated* K, LPCSTR base) landing[1] = K->ID_Cycle(strconcat(sizeof(buf), buf, base, "_jump_end_1")); for (int k = 0; k < 12; ++k) - m_damage[k] = K->ID_FX(strconcat(sizeof(buf), buf, base, "_damage_", itoa(k, buf1, 10))); + m_damage[k] = K->ID_FX(strconcat(sizeof(buf), buf, base, "_damage_", _itoa(k, buf1, 10))); } void SActorSprintState::Create(IKinematicsAnimated* K) @@ -254,13 +254,13 @@ SVehicleAnimCollection::SVehicleAnimCollection() void SVehicleAnimCollection::Create(IKinematicsAnimated* V, u16 num) { string128 buf, buff1, buff2; - strconcat(sizeof(buff1), buff1, itoa(num, buf, 10), "_"); + strconcat(sizeof(buff1), buff1, _itoa(num, buf, 10), "_"); steer_left = V->ID_Cycle(strconcat(sizeof(buf), buf, "steering_idle_", buff1, "ls")); steer_right = V->ID_Cycle(strconcat(sizeof(buf), buf, "steering_idle_", buff1, "rs")); for (int i = 0; MAX_IDLES > i; ++i) { - idles[i] = V->ID_Cycle_Safe(strconcat(sizeof(buf), buf, "steering_idle_", buff1, itoa(i, buff2, 10))); + idles[i] = V->ID_Cycle_Safe(strconcat(sizeof(buf), buf, "steering_idle_", buff1, _itoa(i, buff2, 10))); if (idles[i]) idles_num++; else diff --git a/src/xrGame/CharacterPhysicsSupport.cpp b/src/xrGame/CharacterPhysicsSupport.cpp index 47678ac933e..98ef8ee611a 100644 --- a/src/xrGame/CharacterPhysicsSupport.cpp +++ b/src/xrGame/CharacterPhysicsSupport.cpp @@ -248,7 +248,7 @@ void CCharacterPhysicsSupport::SpawnInitPhysics(CSE_Abstract* e) { #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && - stricmp(PH_DBG_ObjectTrackName(), *m_EntityAlife.cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *m_EntityAlife.cName()) == 0) { Msg("CCharacterPhysicsSupport::SpawnInitPhysics obj %s before collision correction %f,%f,%f", PH_DBG_ObjectTrackName(), m_EntityAlife.Position().x, m_EntityAlife.Position().y, @@ -267,7 +267,7 @@ void CCharacterPhysicsSupport::SpawnInitPhysics(CSE_Abstract* e) #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && - stricmp(PH_DBG_ObjectTrackName(), *m_EntityAlife.cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *m_EntityAlife.cName()) == 0) { Msg("CCharacterPhysicsSupport::SpawnInitPhysics obj %s after collision correction %f,%f,%f", PH_DBG_ObjectTrackName(), m_EntityAlife.Position().x, m_EntityAlife.Position().y, diff --git a/src/xrGame/GameObject.cpp b/src/xrGame/GameObject.cpp index 94de3ddd1cf..adef6d87184 100644 --- a/src/xrGame/GameObject.cpp +++ b/src/xrGame/GameObject.cpp @@ -466,7 +466,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) XFORM().setXYZ(E->o_Angle); Position().set(E->o_Position); #ifdef DEBUG - if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) + if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) { Msg("CGameObject::net_Spawn obj %s Position set from CSE_Abstract %f,%f,%f", PH_DBG_ObjectTrackName(), Position().x, Position().y, Position().z); @@ -520,7 +520,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) if (!g_dedicated_server) scriptBinder.reinit(); #ifdef DEBUG - if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) + if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) { Msg("CGameObject::net_Spawn obj %s After Script Binder reinit %f,%f,%f", PH_DBG_ObjectTrackName(), Position().x, Position().y, Position().z); @@ -599,7 +599,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) m_bObjectRemoved = false; spawn_supplies(); #ifdef DEBUG - if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) + if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) { Msg("CGameObject::net_Spawn obj %s Before CScriptBinder::net_Spawn %f,%f,%f", PH_DBG_ObjectTrackName(), Position().x, Position().y, Position().z); @@ -610,7 +610,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) #endif #ifdef DEBUG - if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) + if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) { Msg("CGameObject::net_Spawn obj %s Before CScriptBinder::net_Spawn %f,%f,%f", PH_DBG_ObjectTrackName(), Position().x, Position().y, Position().z); @@ -675,7 +675,7 @@ void CGameObject::net_Load(IReader& ireader) #endif // ---------------------------------------------------------- #ifdef DEBUG - if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) + if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrackName(), *cName()) == 0) { Msg("CGameObject::net_Load obj %s (loaded) %f,%f,%f", PH_DBG_ObjectTrackName(), Position().x, Position().y, Position().z); diff --git a/src/xrGame/GamePersistent.cpp b/src/xrGame/GamePersistent.cpp index afe27716b9e..3b3650f0c78 100644 --- a/src/xrGame/GamePersistent.cpp +++ b/src/xrGame/GamePersistent.cpp @@ -497,7 +497,7 @@ void CGamePersistent::start_game_intro() if (g_pGameLevel && g_pGameLevel->bReady && Device.dwPrecacheFrame <= 2) { m_intro_event.bind(this, &CGamePersistent::update_game_intro); - if (0 == stricmp(m_game_params.m_new_or_load, "new")) + if (0 == _stricmp(m_game_params.m_new_or_load, "new")) { VERIFY(NULL == m_intro); m_intro = new CUISequencer(); diff --git a/src/xrGame/HudSound.h b/src/xrGame/HudSound.h index b1c4a028605..fc92938ca54 100644 --- a/src/xrGame/HudSound.h +++ b/src/xrGame/HudSound.h @@ -45,7 +45,7 @@ struct HUD_SOUND_ITEM bool m_b_exclusive; xr_vector sounds; - bool operator==(LPCSTR alias) const { return 0 == stricmp(m_alias.c_str(), alias); } + bool operator==(LPCSTR alias) const { return 0 == _stricmp(m_alias.c_str(), alias); } }; class HUD_SOUND_COLLECTION diff --git a/src/xrGame/Level_network_digest_computer.cpp b/src/xrGame/Level_network_digest_computer.cpp index 46bdb873d4f..200f95a7cc7 100644 --- a/src/xrGame/Level_network_digest_computer.cpp +++ b/src/xrGame/Level_network_digest_computer.cpp @@ -14,7 +14,7 @@ char const* ComputeClientDigest(string128& dest) dest[0] = 0; return dest; } - strupr(cd_key); + _strupr(cd_key); MD5Digest(reinterpret_cast(cd_key), cd_keylen, md5hash); md5hash[33] = 0; xr_strcpy(dest, sizeof(dest), md5hash); diff --git a/src/xrGame/NET_Queue.h b/src/xrGame/NET_Queue.h index 5506fcc9709..b6d1290b299 100644 --- a/src/xrGame/NET_Queue.h +++ b/src/xrGame/NET_Queue.h @@ -97,7 +97,7 @@ class NET_Queue_Event case 2: EventName = "GE_OWNERSHIP_REJECT [2]"; break; case 5: EventName = "GE_DIE [5]"; break; case 7: EventName = "GE_DESTROY [7]"; break; - default: EventName = itoa(E.type, tmp, 10); break; + default: EventName = _itoa(E.type, tmp, 10); break; } Msg("Event %s to %d - at %d", *EventName, E.destination, E.timestamp); diff --git a/src/xrGame/PHMovementControl.cpp b/src/xrGame/PHMovementControl.cpp index 55142c5192b..8abd3510fb8 100644 --- a/src/xrGame/PHMovementControl.cpp +++ b/src/xrGame/PHMovementControl.cpp @@ -43,7 +43,7 @@ CPHMovementControl::CPHMovementControl(IGameObject* parent) #ifdef DEBUG if (debug_output().ph_dbg_draw_mask1().test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(debug_output().PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(debug_output().PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::CPHMovementControl %s (constructor) %f,%f,%pObjectf", debug_output().PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, @@ -319,7 +319,7 @@ void CPHMovementControl::Calculate( { #ifdef DEBUG if (debug_output().ph_dbg_draw_mask1().test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(debug_output().PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(debug_output().PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::Calculate in %s (Object Position) %f,%f,%f", debug_output().PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -577,7 +577,7 @@ void CPHMovementControl::PathNearestPoint(const xr_vectorcName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::Calculate out %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -967,7 +967,7 @@ void CPHMovementControl::SetPosition(const Fvector& P) { #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::SetPosition %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -986,7 +986,7 @@ bool CPHMovementControl::TryPosition(Fvector& pos) #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::TryPosition %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -1012,7 +1012,7 @@ void CPHMovementControl::GetPosition(Fvector& P) #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::GetPosition %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -1042,7 +1042,7 @@ void CPHMovementControl::AllocateCharacterObject(CharacterType type) m_character->SetPosition(vPosition); #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::AllocateCharacterObject %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); @@ -1204,7 +1204,7 @@ void CPHMovementControl::CreateCharacter() m_character->SetAirControlFactor(fAirControlParam); #ifdef DEBUG if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && (!!pObject->cName()) && - stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) + _stricmp(PH_DBG_ObjectTrackName(), *pObject->cName()) == 0) { Msg("CPHMovementControl::CreateCharacter %s (Object Position) %f,%f,%f", PH_DBG_ObjectTrackName(), pObject->Position().x, pObject->Position().y, pObject->Position().z); diff --git a/src/xrGame/Torch.cpp b/src/xrGame/Torch.cpp index 6dcd1cb83e1..e56280c0c74 100644 --- a/src/xrGame/Torch.cpp +++ b/src/xrGame/Torch.cpp @@ -115,7 +115,7 @@ void CTorch::SwitchNightVision(bool vision_on, bool use_sounds) for (u32 i = 0; i < cnt; ++i) { _GetItem(disabled_names, i, tmp); - if (0 == stricmp(tmp, curr_map)) + if (0 == _stricmp(tmp, curr_map)) { b_allow = false; break; diff --git a/src/xrGame/UIGameCTA.cpp b/src/xrGame/UIGameCTA.cpp index 4495ba03ad4..8670404df1c 100644 --- a/src/xrGame/UIGameCTA.cpp +++ b/src/xrGame/UIGameCTA.cpp @@ -644,7 +644,7 @@ s8 CUIGameCTA::GetSelectedSkinIndex() void CUIGameCTA::SetReinforcementTimes(u32 curTime, u32 maxTime) { string128 _buff; - m_pReinforcementInidcator->SetText(itoa(curTime / 1000, _buff, 10)); + m_pReinforcementInidcator->SetText(_itoa(curTime / 1000, _buff, 10)); } void CUIGameCTA::DisplayMoneyChange(LPCSTR deltaMoney) { m_pMoneyIndicator->SetMoneyChange(deltaMoney); } @@ -886,7 +886,7 @@ void CUIGameCTA::LoadDefItemsForRank() char tmp[5]; for (int i = 1; i <= local_player->rank; i++) { - strconcat(sizeof(RankStr), RankStr, "rank_", itoa(i, tmp, 10)); + strconcat(sizeof(RankStr), RankStr, "rank_", _itoa(i, tmp, 10)); if (!pSettings->section_exist(RankStr)) continue; for (u32 it = 0; it < PlayerDefItems.size(); it++) diff --git a/src/xrGame/action_planner_inline.h b/src/xrGame/action_planner_inline.h index 7c6247c367c..8fa6888159f 100644 --- a/src/xrGame/action_planner_inline.h +++ b/src/xrGame/action_planner_inline.h @@ -158,7 +158,7 @@ LPCSTR CPlanner::action2string(const _action_id_type& action_id) { return (actio TEMPLATE_SPECIALIZATION LPCSTR CPlanner::property2string(const _condition_type& property_id) { - return (evaluator(property_id).m_evaluator_name); // itoa(property_id,m_temp_string,10)); + return (evaluator(property_id).m_evaluator_name); // _itoa(property_id,m_temp_string,10)); } TEMPLATE_SPECIALIZATION diff --git a/src/xrGame/ai/ai_monsters_misc.cpp b/src/xrGame/ai/ai_monsters_misc.cpp index 5cd3175cd4f..cd30693881c 100644 --- a/src/xrGame/ai/ai_monsters_misc.cpp +++ b/src/xrGame/ai/ai_monsters_misc.cpp @@ -208,7 +208,7 @@ void CAniVector::Load(IKinematicsAnimated* tpKinematics, LPCSTR caBaseName) string256 S1, S2; MotionID tpMotionDef; for (int i = 0;; ++i) - if (!!(tpMotionDef = tpKinematics->ID_Cycle_Safe(strconcat(sizeof(S1), S1, caBaseName, itoa(i, S2, 10))))) + if (!!(tpMotionDef = tpKinematics->ID_Cycle_Safe(strconcat(sizeof(S1), S1, caBaseName, _itoa(i, S2, 10))))) { A.push_back(tpMotionDef); #ifdef DEBUG @@ -216,7 +216,7 @@ void CAniVector::Load(IKinematicsAnimated* tpKinematics, LPCSTR caBaseName) Msg("* Loaded animation %s", S1); #endif } - else if (!!(tpMotionDef = tpKinematics->ID_FX_Safe(strconcat(sizeof(S1), S1, caBaseName, itoa(i, S2, 10))))) + else if (!!(tpMotionDef = tpKinematics->ID_FX_Safe(strconcat(sizeof(S1), S1, caBaseName, _itoa(i, S2, 10))))) { A.push_back(tpMotionDef); #ifdef DEBUG diff --git a/src/xrGame/ai/monsters/control_animation_base.cpp b/src/xrGame/ai/monsters/control_animation_base.cpp index 6de8837bb27..a69c52073f2 100644 --- a/src/xrGame/ai/monsters/control_animation_base.cpp +++ b/src/xrGame/ai/monsters/control_animation_base.cpp @@ -132,7 +132,7 @@ bool CControlAnimationBase::get_animation_info(EMotionAnim anim, u32 index, Moti char index_string_buffer[128]; char* animation_name_buffer; - STRCONCAT(animation_name_buffer, anim_it->target_name, itoa(index, index_string_buffer, 10)); + STRCONCAT(animation_name_buffer, anim_it->target_name, _itoa(index, index_string_buffer, 10)); IKinematicsAnimated* animated = smart_cast(m_object->Visual()); if (!animated) @@ -221,7 +221,7 @@ void CControlAnimationBase::select_animation(bool anim_end) // установить анимацию string128 s1, s2; MotionID cur_anim = smart_cast( - m_object->Visual())->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *anim_it->target_name, itoa(index, s1, 10))); + m_object->Visual())->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *anim_it->target_name, _itoa(index, s1, 10))); if (!cur_anim.valid()) FATAL(s2); @@ -232,7 +232,7 @@ void CControlAnimationBase::select_animation(bool anim_end) // Заполнить текущую анимацию string64 st, tmp; - strconcat(sizeof(st), st, *anim_it->target_name, itoa(index, tmp, 10)); + strconcat(sizeof(st), st, *anim_it->target_name, _itoa(index, tmp, 10)); // xr_sprintf (st, "%s%d", *anim_it->second.target_name, index); m_cur_anim.name = st; m_cur_anim.index = u8(index); @@ -517,7 +517,7 @@ void CControlAnimationBase::UpdateAnimCount() for (int i = 0;; ++i) { - strconcat(sizeof(s_temp), s_temp, *((*it)->target_name), itoa(i, s, 10)); + strconcat(sizeof(s_temp), s_temp, *((*it)->target_name), _itoa(i, s, 10)); LPCSTR name = s_temp; MotionID id = skel->ID_Cycle_Safe(name); @@ -546,7 +546,7 @@ CMotionDef* CControlAnimationBase::get_motion_def(SAnimItem* it, u32 index) string128 s1, s2; IKinematicsAnimated* skeleton_animated = smart_cast(m_object->Visual()); const MotionID& motion_id = - skeleton_animated->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *it->target_name, itoa(index, s1, 10))); + skeleton_animated->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *it->target_name, _itoa(index, s1, 10))); return (skeleton_animated->LL_GetMotionDef(motion_id)); } @@ -585,7 +585,7 @@ MotionID CControlAnimationBase::get_motion_id(EMotionAnim a, u32 index) string128 s1, s2; return (smart_cast(m_object->Visual()) - ->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *anim_it->target_name, itoa(index, s1, 10)))); + ->ID_Cycle_Safe(strconcat(sizeof(s2), s2, *anim_it->target_name, _itoa(index, s1, 10)))); } void CControlAnimationBase::stop_now() diff --git a/src/xrGame/alife_simulator_base.cpp b/src/xrGame/alife_simulator_base.cpp index 2493499278d..08d0fcd63c6 100644 --- a/src/xrGame/alife_simulator_base.cpp +++ b/src/xrGame/alife_simulator_base.cpp @@ -115,7 +115,7 @@ CSE_Abstract* CALifeSimulatorBase::spawn_item(LPCSTR section, const Fvector& pos if (abstract->ID < 10) xr_strcat(s_name_replace, "0"); string16 S1; - xr_strcat(s_name_replace, itoa(abstract->ID, S1, 10)); + xr_strcat(s_name_replace, _itoa(abstract->ID, S1, 10)); abstract->set_name_replace(s_name_replace); CSE_ALifeDynamicObject* dynamic_object = smart_cast(abstract); @@ -172,7 +172,7 @@ CSE_Abstract* CALifeSimulatorBase::create(CSE_ALifeGroupAbstract* tpALifeGroupAb if (k->ID < 10) xr_strcat(s_name_replace, "0"); string16 S1; - xr_strcat(s_name_replace, itoa(k->ID, S1, 10)); + xr_strcat(s_name_replace, _itoa(k->ID, S1, 10)); k->set_name_replace(s_name_replace); register_object(k, true); diff --git a/src/xrGame/console_commands_mp.cpp b/src/xrGame/console_commands_mp.cpp index 0bf0a7f7568..fdef25a1765 100644 --- a/src/xrGame/console_commands_mp.cpp +++ b/src/xrGame/console_commands_mp.cpp @@ -273,7 +273,7 @@ class CCC_GSCDKey : public CCC_String virtual void Execute(LPCSTR arguments) { string64 cdkey; - if (0 == stricmp(arguments, "clear")) + if (0 == _stricmp(arguments, "clear")) { cdkey[0] = 0; } diff --git a/src/xrGame/encyclopedia_article.cpp b/src/xrGame/encyclopedia_article.cpp index ec4453589d0..94378510799 100644 --- a/src/xrGame/encyclopedia_article.cpp +++ b/src/xrGame/encyclopedia_article.cpp @@ -116,19 +116,19 @@ void CEncyclopediaArticle::load_shared(LPCSTR) // Тип статьи xr_string atricle_type = pXML->ReadAttrib(pNode, "article_type", "encyclopedia"); - if (0 == stricmp(atricle_type.c_str(), "encyclopedia")) + if (0 == _stricmp(atricle_type.c_str(), "encyclopedia")) { data()->articleType = ARTICLE_DATA::eEncyclopediaArticle; } - else if (0 == stricmp(atricle_type.c_str(), "journal")) + else if (0 == _stricmp(atricle_type.c_str(), "journal")) { data()->articleType = ARTICLE_DATA::eJournalArticle; } - else if (0 == stricmp(atricle_type.c_str(), "task")) + else if (0 == _stricmp(atricle_type.c_str(), "task")) { data()->articleType = ARTICLE_DATA::eTaskArticle; } - else if (0 == stricmp(atricle_type.c_str(), "info")) + else if (0 == _stricmp(atricle_type.c_str(), "info")) { data()->articleType = ARTICLE_DATA::eInfoArticle; } diff --git a/src/xrGame/game_cl_artefacthunt.cpp b/src/xrGame/game_cl_artefacthunt.cpp index 5e7148ea329..0766fc017cb 100644 --- a/src/xrGame/game_cl_artefacthunt.cpp +++ b/src/xrGame/game_cl_artefacthunt.cpp @@ -458,7 +458,7 @@ void game_cl_ArtefactHunt::shedule_Update(u32 dt) dTime = iCeil(float(dReinforcementTime - CurTime) / 1000); string128 _buff; - m_game_ui->m_pReinforcementInidcator->SetText(itoa(dTime, _buff, 10)); + m_game_ui->m_pReinforcementInidcator->SetText(_itoa(dTime, _buff, 10)); } else m_game_ui->m_pReinforcementInidcator->SetText("0"); diff --git a/src/xrGame/game_cl_capture_the_artefact.cpp b/src/xrGame/game_cl_capture_the_artefact.cpp index efb45356214..0a25ef1effd 100644 --- a/src/xrGame/game_cl_capture_the_artefact.cpp +++ b/src/xrGame/game_cl_capture_the_artefact.cpp @@ -243,7 +243,7 @@ void game_cl_CaptureTheArtefact::UpdateMoneyIndicator() } if (total_money != last_money) { - itoa(total_money, MoneyStr, 10); + _itoa(total_money, MoneyStr, 10); m_game_ui->ChangeTotalMoneyIndicator(MoneyStr); last_money = total_money; } diff --git a/src/xrGame/game_cl_deathmatch_buywnd.cpp b/src/xrGame/game_cl_deathmatch_buywnd.cpp index c98f69e9e9a..3c8f00eb117 100644 --- a/src/xrGame/game_cl_deathmatch_buywnd.cpp +++ b/src/xrGame/game_cl_deathmatch_buywnd.cpp @@ -419,7 +419,7 @@ void game_cl_Deathmatch::LoadDefItemsForRank(IBuyWnd* pBuyMenu) char tmp[5]; for (int i = 1; i <= local_player->rank; i++) { - strconcat(sizeof(RankStr), RankStr, "rank_", itoa(i, tmp, 10)); + strconcat(sizeof(RankStr), RankStr, "rank_", _itoa(i, tmp, 10)); if (!pSettings->section_exist(RankStr)) continue; for (u32 it = 0; it < PlayerDefItems.size(); it++) diff --git a/src/xrGame/game_cl_mp.cpp b/src/xrGame/game_cl_mp.cpp index adba9298a31..9ec96ab4c03 100644 --- a/src/xrGame/game_cl_mp.cpp +++ b/src/xrGame/game_cl_mp.cpp @@ -1207,7 +1207,7 @@ void game_cl_mp::OnEventMoneyChanged(NET_Packet& P) OnMoneyChanged(); { string256 MoneyStr; - itoa(local_player->money_for_round, MoneyStr, 10); + _itoa(local_player->money_for_round, MoneyStr, 10); m_game_ui_custom->ChangeTotalMoneyIndicator(MoneyStr); } s32 Money_Added = P.r_s32(); @@ -1446,7 +1446,7 @@ void game_cl_mp::OnRadminMessage(u16 type, NET_Packet* P) if (!m_pAdminMenuWindow) m_pAdminMenuWindow = new CUIMpAdminMenu(); - if (0 == stricmp(buff, "Access permitted.")) + if (0 == _stricmp(buff, "Access permitted.")) m_pAdminMenuWindow->ShowDialog(true); else m_pAdminMenuWindow->ShowMessageBox(CUIMessageBox::MESSAGEBOX_OK, buff); diff --git a/src/xrGame/game_sv_base.cpp b/src/xrGame/game_sv_base.cpp index e0f443bac1b..6560d39fd56 100644 --- a/src/xrGame/game_sv_base.cpp +++ b/src/xrGame/game_sv_base.cpp @@ -769,7 +769,7 @@ void game_sv_GameState::OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, Clie default: { string16 tmp; - R_ASSERT3(0, "Game Event not implemented!!!", itoa(type, tmp, 10)); + R_ASSERT3(0, "Game Event not implemented!!!", _itoa(type, tmp, 10)); }; }; } diff --git a/src/xrGame/game_sv_mp.cpp b/src/xrGame/game_sv_mp.cpp index 1f952c139d3..dba64ef0d2a 100644 --- a/src/xrGame/game_sv_mp.cpp +++ b/src/xrGame/game_sv_mp.cpp @@ -1033,7 +1033,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) m_bVotingReal = false; while (votecommands[i].command) { - if (!stricmp(votecommands[i].name, CommandName)) + if (!_stricmp(votecommands[i].name, CommandName)) { m_bVotingReal = true; if (!IsVotingEnabled(votecommands[i].flag)) @@ -1054,7 +1054,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) m_uVoteStartTime = CurTime; if (m_bVotingReal) { - if (!stricmp(votecommands[i].name, "changeweather")) + if (!_stricmp(votecommands[i].name, "changeweather")) { string256 WeatherTime = "", WeatherName = ""; sscanf(CommandParams, "%255s %255s", WeatherName, WeatherTime); @@ -1062,7 +1062,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) m_pVoteCommand.printf("%s %s", votecommands[i].command, WeatherTime); xr_sprintf(resVoteCommand, "%s %s", votecommands[i].name, WeatherName); } - else if (!stricmp(votecommands[i].name, "changemap")) + else if (!_stricmp(votecommands[i].name, "changemap")) { string256 LevelName; string256 LevelVersion; @@ -1078,7 +1078,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) m_pVoteCommand = sv_vote_command; xr_sprintf(resVoteCommand, "%s %s [%s]", votecommands[i].name, LevelName, LevelVersion); } - else if (!stricmp(votecommands[i].name, "kick")) + else if (!_stricmp(votecommands[i].name, "kick")) { SearcherClientByName tmp_predicate(CommandParams); IClient* tmp_client = m_server->FindClient(tmp_predicate); @@ -1092,7 +1092,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) } xr_strcpy(resVoteCommand, VoteCommand); } - else if (!stricmp(votecommands[i].name, "ban")) + else if (!_stricmp(votecommands[i].name, "ban")) { string256 tmp_victim_name; s32 ban_time = ExcludeBanTimeFromVoteStr(CommandParams, tmp_victim_name, sizeof(tmp_victim_name)); @@ -1340,7 +1340,7 @@ void game_sv_mp::SetPlayersDefItems(game_PlayerState* ps) char tmp[5]; for (int i = 1; i <= ps->rank; i++) { - strconcat(sizeof(RankStr), RankStr, "rank_", itoa(i, tmp, 10)); + strconcat(sizeof(RankStr), RankStr, "rank_", _itoa(i, tmp, 10)); if (!pSettings->section_exist(RankStr)) continue; for (u32 it = 0; it < ps->pItemList.size(); it++) diff --git a/src/xrGame/ik/IKLimb.cpp b/src/xrGame/ik/IKLimb.cpp index 6592972292f..b2d3b85e55d 100644 --- a/src/xrGame/ik/IKLimb.cpp +++ b/src/xrGame/ik/IKLimb.cpp @@ -309,7 +309,7 @@ void CIKLimb::Create(u16 id, IKinematicsAnimated* K, bool collide_) { string32 section; string32 buff; - strconcat(sizeof(section), section, "ik_limb", itoa(id, buff, 10)); + strconcat(sizeof(section), section, "ik_limb", _itoa(id, buff, 10)); parse_bones_string(CK, CK->LL_UserData()->r_string(section, "bones"), m_bones); m_foot.Create(CK, section, m_bones); } diff --git a/src/xrGame/reward_manager.cpp b/src/xrGame/reward_manager.cpp index 03f5985c027..12dffc2d8e7 100644 --- a/src/xrGame/reward_manager.cpp +++ b/src/xrGame/reward_manager.cpp @@ -42,13 +42,13 @@ void reward_manager::load_rewards() LPCSTR section_name = NULL; char tmp_dst_buff[16]; - STRCONCAT(section_name, section_name_prefix, itoa(reward_index, tmp_dst_buff, 10)); + STRCONCAT(section_name, section_name_prefix, _itoa(reward_index, tmp_dst_buff, 10)); while (rewards_config.section_exist(section_name)) { load_reward_item(rewards_config, reward_index, section_name); ++reward_index; - STRCONCAT(section_name, section_name_prefix, itoa(reward_index, tmp_dst_buff, 10)); + STRCONCAT(section_name, section_name_prefix, _itoa(reward_index, tmp_dst_buff, 10)); } FS.r_close(tmp_reader); diff --git a/src/xrGame/seniority_hierarchy_space.h b/src/xrGame/seniority_hierarchy_space.h index 38d6732cd78..3155f13faca 100644 --- a/src/xrGame/seniority_hierarchy_space.h +++ b/src/xrGame/seniority_hierarchy_space.h @@ -15,7 +15,7 @@ namespace SeniorityHierarchy IC shared_str to_string(u32 number) { string16 S; - itoa(number, S, 10); + _itoa(number, S, 10); return (shared_str(S)); } diff --git a/src/xrGame/ui/ServerList.cpp b/src/xrGame/ui/ServerList.cpp index 95a7f75691a..db000b5f4df 100644 --- a/src/xrGame/ui/ServerList.cpp +++ b/src/xrGame/ui/ServerList.cpp @@ -797,7 +797,7 @@ void CServerList::SrvInfo2LstSrvInfo(const ServerInfo* pServerInfo) xr_string address = pServerInfo->m_HostName; char port[8]; address += "/port="; - address += itoa(pServerInfo->m_Port, port, 10); + address += _itoa(pServerInfo->m_Port, port, 10); m_itemInfo.info.address = address.c_str(); m_itemInfo.info.map = pServerInfo->m_SessionName; m_itemInfo.info.game = GameTypeToString((EGameIDs)pServerInfo->m_GameType, true); diff --git a/src/xrGame/ui/TeamInfo.cpp b/src/xrGame/ui/TeamInfo.cpp index 3933a1090e8..420545ab0af 100644 --- a/src/xrGame/ui/TeamInfo.cpp +++ b/src/xrGame/ui/TeamInfo.cpp @@ -70,7 +70,7 @@ shared_str CTeamInfo::GetTeam2_name() LPCSTR CTeamInfo::GetTeam_name(int team) { string32 tmp; - R_ASSERT2(team == 1 || team == 2 || team == 3, itoa(team, tmp, 10)); + R_ASSERT2(team == 1 || team == 2 || team == 3, _itoa(team, tmp, 10)); if (team == 1) return *GetTeam1_name(); else @@ -80,7 +80,7 @@ LPCSTR CTeamInfo::GetTeam_name(int team) LPCSTR CTeamInfo::GetTeam_color_tag(int team) { string32 tmp; - R_ASSERT2(team == 1 || team == 2 || team == 3, itoa(team, tmp, 10)); + R_ASSERT2(team == 1 || team == 2 || team == 3, _itoa(team, tmp, 10)); // if (flags.test(flTeam1_col_t)) return *team1_color_tag; // if (flags.test(flTeam2_col_t)) return *team2_color_tag; if (team == 3) diff --git a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp index 2b1aa849526..8d4947180c3 100644 --- a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp +++ b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp @@ -250,22 +250,22 @@ void CUISequenceSimpleItem::Start() bool bShowPda = false; CUIGameSP* ui_game_sp = smart_cast(CurrentGameUI()); - if (!stricmp(m_pda_section, "pda_tasks")) + if (!_stricmp(m_pda_section, "pda_tasks")) { ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptTasks"); bShowPda = true; } - else if (!stricmp(m_pda_section, "pda_ranking")) + else if (!_stricmp(m_pda_section, "pda_ranking")) { ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptRanking"); bShowPda = true; } - else if (!stricmp(m_pda_section, "pda_logs")) + else if (!_stricmp(m_pda_section, "pda_logs")) { ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptLogs"); bShowPda = true; } - else if (!stricmp(m_pda_section, "pda_show_second_task_wnd")) + else if (!_stricmp(m_pda_section, "pda_show_second_task_wnd")) { ui_game_sp->GetPdaMenu().Show_SecondTaskWnd(true); bShowPda = true; diff --git a/src/xrGame/ui/UIKickPlayer.cpp b/src/xrGame/ui/UIKickPlayer.cpp index cba95383264..2382f328748 100644 --- a/src/xrGame/ui/UIKickPlayer.cpp +++ b/src/xrGame/ui/UIKickPlayer.cpp @@ -155,13 +155,13 @@ void CUIKickPlayer::Update() for (; I != E; ++I) { game_PlayerState* pI = I->second; - if (m_selected_item_text.size() && !stricmp(pI->getName(), m_selected_item_text.c_str())) + if (m_selected_item_text.size() && !_stricmp(pI->getName(), m_selected_item_text.c_str())) bHasSelected = true; fit = std::find(m_current_set.begin(), m_current_set.end(), pI); if (fit == m_current_set.end()) bNeedRefresh = true; - else if (stricmp((*fit)->getName(), pI->getName())) + else if (_stricmp((*fit)->getName(), pI->getName())) bNeedRefresh = true; } if (m_current_set.size() != items.size()) diff --git a/src/xrGame/ui/UIMainIngameWnd.cpp b/src/xrGame/ui/UIMainIngameWnd.cpp index 069b53aa7fb..880603c8ac9 100644 --- a/src/xrGame/ui/UIMainIngameWnd.cpp +++ b/src/xrGame/ui/UIMainIngameWnd.cpp @@ -397,7 +397,7 @@ void CUIMainIngameWnd::RenderQuickInfos() if (NULL != actor_action) { - if (stricmp(actor_action, UIStaticQuickHelp->GetText())) + if (_stricmp(actor_action, UIStaticQuickHelp->GetText())) UIStaticQuickHelp->SetTextST(actor_action); } diff --git a/src/xrGame/ui/UIMessageBox.cpp b/src/xrGame/ui/UIMessageBox.cpp index ce5e65b6d70..5ba6754387e 100644 --- a/src/xrGame/ui/UIMessageBox.cpp +++ b/src/xrGame/ui/UIMessageBox.cpp @@ -81,43 +81,43 @@ void CUIMessageBox::InitMessageBox(LPCSTR box_template) R_ASSERT(_type); m_eMessageBoxStyle = MESSAGEBOX_OK; - if (0 == stricmp(_type, "ok")) + if (0 == _stricmp(_type, "ok")) { m_eMessageBoxStyle = MESSAGEBOX_OK; } - else if (0 == stricmp(_type, "yes_no")) + else if (0 == _stricmp(_type, "yes_no")) { m_eMessageBoxStyle = MESSAGEBOX_YES_NO; } - else if (0 == stricmp(_type, "yes_no_cancel")) + else if (0 == _stricmp(_type, "yes_no_cancel")) { m_eMessageBoxStyle = MESSAGEBOX_YES_NO_CANCEL; } - else if (0 == stricmp(_type, "yes_no_copy")) + else if (0 == _stricmp(_type, "yes_no_copy")) { m_eMessageBoxStyle = MESSAGEBOX_YES_NO_COPY; } - else if (0 == stricmp(_type, "direct_ip")) + else if (0 == _stricmp(_type, "direct_ip")) { m_eMessageBoxStyle = MESSAGEBOX_DIRECT_IP; } - else if (0 == stricmp(_type, "ra_login")) + else if (0 == _stricmp(_type, "ra_login")) { m_eMessageBoxStyle = MESSAGEBOX_RA_LOGIN; } - else if (0 == stricmp(_type, "password")) + else if (0 == _stricmp(_type, "password")) { m_eMessageBoxStyle = MESSAGEBOX_PASSWORD; } - else if (0 == stricmp(_type, "quit_windows")) + else if (0 == _stricmp(_type, "quit_windows")) { m_eMessageBoxStyle = MESSAGEBOX_QUIT_WINDOWS; } - else if (0 == stricmp(_type, "quit_game")) + else if (0 == _stricmp(_type, "quit_game")) { m_eMessageBoxStyle = MESSAGEBOX_QUIT_GAME; } - else if (0 == stricmp(_type, "info")) + else if (0 == _stricmp(_type, "info")) { m_eMessageBoxStyle = MESSAGEBOX_INFO; }; diff --git a/src/xrGame/ui/UIProgressShape.cpp b/src/xrGame/ui/UIProgressShape.cpp index 28038073902..851125cf1e8 100644 --- a/src/xrGame/ui/UIProgressShape.cpp +++ b/src/xrGame/ui/UIProgressShape.cpp @@ -27,7 +27,7 @@ void CUIProgressShape::SetPos(int pos, int max) if (m_bText) { string256 _buff; - TextItemControl()->SetText(itoa(pos, _buff, 10)); + TextItemControl()->SetText(_itoa(pos, _buff, 10)); } } diff --git a/src/xrGame/ui/UISkinSelector.cpp b/src/xrGame/ui/UISkinSelector.cpp index 8f48266dc8a..73a91f33961 100644 --- a/src/xrGame/ui/UISkinSelector.cpp +++ b/src/xrGame/ui/UISkinSelector.cpp @@ -99,7 +99,7 @@ void CUISkinSelectorWnd::UpdateSkins() string16 buf; if (m_firstSkin + i < 10) { - itoa((m_firstSkin + 1 + i) % 10, buf, 10); + _itoa((m_firstSkin + 1 + i) % 10, buf, 10); xr_strcat(buf, sizeof(buf), " "); m_pImage[i]->TextItemControl()->SetText(buf); } diff --git a/src/xrGame/ui/UISpinNum.cpp b/src/xrGame/ui/UISpinNum.cpp index 242daf9d4cd..5f4f030bc0e 100644 --- a/src/xrGame/ui/UISpinNum.cpp +++ b/src/xrGame/ui/UISpinNum.cpp @@ -77,7 +77,7 @@ void CUISpinNum::OnBtnDownClick() void CUISpinNum::SetValue(int v) { string16 buff; - m_pLines->SetText(itoa(v, buff, 10)); + m_pLines->SetText(_itoa(v, buff, 10)); } bool CUISpinNum::CanPressUp() { return m_iVal + m_iStep <= m_iMax; } diff --git a/src/xrGame/ui/UIXmlInit.cpp b/src/xrGame/ui/UIXmlInit.cpp index acf36caf007..ae7279fb77b 100644 --- a/src/xrGame/ui/UIXmlInit.cpp +++ b/src/xrGame/ui/UIXmlInit.cpp @@ -120,13 +120,13 @@ bool CUIXmlInit::InitOptionsItem(CUIXml& xml_doc, LPCSTR path, int index, CUIOpt { CUIOptionsItem::ESystemDepends d = CUIOptionsItem::sdNothing; - if (0 == stricmp(depends, "vid")) + if (0 == _stricmp(depends, "vid")) d = CUIOptionsItem::sdVidRestart; - else if (0 == stricmp(depends, "snd")) + else if (0 == _stricmp(depends, "snd")) d = CUIOptionsItem::sdSndRestart; - else if (0 == stricmp(depends, "restart")) + else if (0 == _stricmp(depends, "restart")) d = CUIOptionsItem::sdSystemRestart; - else if (0 == stricmp(depends, "runtime")) + else if (0 == _stricmp(depends, "runtime")) d = CUIOptionsItem::sdApplyOnChange; else Msg("! unknown param [%s] in optionsItem [%s]", depends, entry.c_str()); @@ -543,19 +543,19 @@ bool CUIXmlInit::InitProgressBar(CUIXml& xml_doc, LPCSTR path, int index, CUIPro { mode = CUIProgressBar::om_horz; } - else if (stricmp(mode_str, "horz") == 0) + else if (_stricmp(mode_str, "horz") == 0) { mode = CUIProgressBar::om_horz; } - else if (stricmp(mode_str, "vert") == 0) + else if (_stricmp(mode_str, "vert") == 0) { mode = CUIProgressBar::om_vert; } - else if (stricmp(mode_str, "back") == 0) + else if (_stricmp(mode_str, "back") == 0) { mode = CUIProgressBar::om_back; } - else if (stricmp(mode_str, "down") == 0) + else if (_stricmp(mode_str, "down") == 0) { mode = CUIProgressBar::om_down; } @@ -662,7 +662,7 @@ void CUIXmlInit::InitAutoStaticGroup(CUIXml& xml_doc, LPCSTR path, int index, CU while (node) { LPCSTR node_name = node->Value(); - if (0 == stricmp(node_name, "auto_static")) + if (0 == _stricmp(node_name, "auto_static")) { CUIStatic* pUIStatic = new CUIStatic(); InitStatic(xml_doc, "auto_static", cnt_static, pUIStatic); @@ -673,7 +673,7 @@ void CUIXmlInit::InitAutoStaticGroup(CUIXml& xml_doc, LPCSTR path, int index, CU ++cnt_static; } - else if (0 == stricmp(node_name, "auto_frameline")) + else if (0 == _stricmp(node_name, "auto_frameline")) { CUIFrameLineWnd* pUIFrameline = new CUIFrameLineWnd(); InitFrameLine(xml_doc, "auto_frameline", cnt_frameline, pUIFrameline); @@ -684,7 +684,7 @@ void CUIXmlInit::InitAutoStaticGroup(CUIXml& xml_doc, LPCSTR path, int index, CU ++cnt_frameline; } - else if (0 == stricmp(node_name, "auto_text")) + else if (0 == _stricmp(node_name, "auto_text")) { ++cnt_text; } diff --git a/src/xrGame/xrGameSpyServer.cpp b/src/xrGame/xrGameSpyServer.cpp index 3cfba90ca12..e459e9a57f3 100644 --- a/src/xrGame/xrGameSpyServer.cpp +++ b/src/xrGame/xrGameSpyServer.cpp @@ -258,9 +258,9 @@ void xrGameSpyServer::GetServerInfo(CServerInfo* si) si->AddItem("Server name", HostName.c_str(), RGB(128, 128, 255)); si->AddItem("Map", MapName.c_str(), RGB(255, 0, 128)); - xr_strcpy(tmp, itoa(GetPlayersCount(), tmp2, 10)); + xr_strcpy(tmp, _itoa(GetPlayersCount(), tmp2, 10)); xr_strcat(tmp, " / "); - xr_strcat(tmp, itoa(m_iMaxPlayers, tmp2, 10)); + xr_strcat(tmp, _itoa(m_iMaxPlayers, tmp2, 10)); si->AddItem("Players", tmp, RGB(255, 128, 255)); string256 res; @@ -281,6 +281,6 @@ void xrGameSpyServer::GetServerInfo(CServerInfo* si) } si->AddItem("Access to server", res, RGB(200, 155, 155)); - si->AddItem("GameSpy port", itoa(iGameSpyBasePort, tmp, 10), RGB(200, 5, 155)); + si->AddItem("GameSpy port", _itoa(iGameSpyBasePort, tmp, 10), RGB(200, 5, 155)); inherited::GetServerInfo(si); } diff --git a/src/xrGame/xrServer.cpp b/src/xrGame/xrServer.cpp index 367746e0a02..c86b35d421a 100644 --- a/src/xrGame/xrServer.cpp +++ b/src/xrGame/xrServer.cpp @@ -646,7 +646,7 @@ u32 xrServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadc shared_str user; shared_str pass; P.r_stringZ(user); - if (0 == stricmp(user.c_str(), "logoff")) + if (0 == _stricmp(user.c_str(), "logoff")) { CL->m_admin_rights.m_has_admin_rights = FALSE; if (CL->ps) @@ -1074,7 +1074,7 @@ void xrServer::GetServerInfo(CServerInfo* si) string32 tmp; string256 tmp256; - si->AddItem("Server port", itoa(GetPort(), tmp, 10), RGB(128, 128, 255)); + si->AddItem("Server port", _itoa(GetPort(), tmp, 10), RGB(128, 128, 255)); LPCSTR time = InventoryUtilities::GetTimeAsString(Device.dwTimeGlobal, InventoryUtilities::etpTimeToSecondsAndDay).c_str(); si->AddItem("Uptime", time, RGB(255, 228, 0)); @@ -1084,13 +1084,13 @@ void xrServer::GetServerInfo(CServerInfo* si) if (game->Type() == eGameIDDeathmatch || game->Type() == eGameIDTeamDeathmatch) { xr_strcat(tmp256, " ["); - xr_strcat(tmp256, itoa(g_sv_dm_dwFragLimit, tmp, 10)); + xr_strcat(tmp256, _itoa(g_sv_dm_dwFragLimit, tmp, 10)); xr_strcat(tmp256, "] "); } else if (game->Type() == eGameIDArtefactHunt || game->Type() == eGameIDCaptureTheArtefact) { xr_strcat(tmp256, " ["); - xr_strcat(tmp256, itoa(g_sv_ah_dwArtefactsNum, tmp, 10)); + xr_strcat(tmp256, _itoa(g_sv_ah_dwArtefactsNum, tmp, 10)); xr_strcat(tmp256, "] "); g_sv_ah_iReinforcementTime; } @@ -1098,13 +1098,13 @@ void xrServer::GetServerInfo(CServerInfo* si) // if ( g_sv_dm_dwTimeLimit > 0 ) { xr_strcat(tmp256, " time limit ["); - xr_strcat(tmp256, itoa(g_sv_dm_dwTimeLimit, tmp, 10)); + xr_strcat(tmp256, _itoa(g_sv_dm_dwTimeLimit, tmp, 10)); xr_strcat(tmp256, "] "); } if (game->Type() == eGameIDArtefactHunt || game->Type() == eGameIDCaptureTheArtefact) { xr_strcat(tmp256, " RT ["); - xr_strcat(tmp256, itoa(g_sv_ah_iReinforcementTime, tmp, 10)); + xr_strcat(tmp256, _itoa(g_sv_ah_iReinforcementTime, tmp, 10)); xr_strcat(tmp256, "]"); } si->AddItem("Game type", tmp256, RGB(128, 255, 255)); @@ -1117,7 +1117,7 @@ void xrServer::GetServerInfo(CServerInfo* si) if (g_sv_mp_iDumpStatsPeriod > 0) { xr_strcat(tmp256, " statistic ["); - xr_strcat(tmp256, itoa(g_sv_mp_iDumpStatsPeriod, tmp, 10)); + xr_strcat(tmp256, _itoa(g_sv_mp_iDumpStatsPeriod, tmp, 10)); xr_strcat(tmp256, "]"); if (g_bCollectStatisticData) { diff --git a/src/xrGame/xr_level_controller.cpp b/src/xrGame/xr_level_controller.cpp index 8ff193e083a..cc1d8843275 100644 --- a/src/xrGame/xr_level_controller.cpp +++ b/src/xrGame/xr_level_controller.cpp @@ -151,7 +151,7 @@ _action* action_name_to_ptr(LPCSTR _name) int idx = 0; while (actions[idx].action_name) { - if (!stricmp(_name, actions[idx].action_name)) + if (!_stricmp(_name, actions[idx].action_name)) return &actions[idx]; ++idx; } @@ -195,7 +195,7 @@ _keyboard* keyname_to_ptr(LPCSTR _name) while (keyboards[idx].key_name) { _keyboard& kb = keyboards[idx]; - if (!stricmp(_name, kb.key_name)) + if (!_stricmp(_name, kb.key_name)) return &keyboards[idx]; ++idx; } diff --git a/src/xrNetServer/NET_Client.cpp b/src/xrNetServer/NET_Client.cpp index ee0ee4efb36..8e286aa23bc 100644 --- a/src/xrNetServer/NET_Client.cpp +++ b/src/xrNetServer/NET_Client.cpp @@ -502,7 +502,7 @@ BOOL IPureClient::Connect(LPCSTR options) R_CHK(NET->SetClientInfo(&Pinfo, 0, 0, DPNSETCLIENTINFO_SYNC)); } - if (stricmp(server_name, "localhost") == 0) + if (_stricmp(server_name, "localhost") == 0) { WCHAR SessionPasswordUNICODE[4096]; if (xr_strlen(password_str)) diff --git a/src/xrNetServer/NET_Server.cpp b/src/xrNetServer/NET_Server.cpp index 0b1163719ed..362e4828786 100644 --- a/src/xrNetServer/NET_Server.cpp +++ b/src/xrNetServer/NET_Server.cpp @@ -502,7 +502,7 @@ HRESULT IPureServer::net_Handler(u32 dwMessageType, PVOID pMessage) PDPNMSG_ENUM_HOSTS_QUERY msg = PDPNMSG_ENUM_HOSTS_QUERY(pMessage); if (0 == msg->dwReceivedDataSize) return S_FALSE; - if (!stricmp((const char*)msg->pvReceivedData, "ToConnect")) + if (!_stricmp((const char*)msg->pvReceivedData, "ToConnect")) return S_OK; if (*((const GUID*)msg->pvReceivedData) != NET_GUID) return S_FALSE; diff --git a/src/xrScriptEngine/script_debugger.cpp b/src/xrScriptEngine/script_debugger.cpp index ddaa1d60090..e0cc49464d4 100644 --- a/src/xrScriptEngine/script_debugger.cpp +++ b/src/xrScriptEngine/script_debugger.cpp @@ -378,7 +378,7 @@ bool CScriptDebugger::HasBreakPoint(const char* fileName, s32 lineNum) for (u32 i = 0; i < m_breakPoints.size(); i++) { SBreakPoint bp(m_breakPoints[i]); - if (bp.nLine == lineNum && xr_strlen(bp.fileName) == xr_strlen(sFileName) && !stricmp(*bp.fileName, sFileName)) + if (bp.nLine == lineNum && xr_strlen(bp.fileName) == xr_strlen(sFileName) && !_stricmp(*bp.fileName, sFileName)) return true; } return false; diff --git a/src/xrScriptEngine/script_lua_helper.cpp b/src/xrScriptEngine/script_lua_helper.cpp index 955854e9c33..70125c42847 100644 --- a/src/xrScriptEngine/script_lua_helper.cpp +++ b/src/xrScriptEngine/script_lua_helper.cpp @@ -235,7 +235,7 @@ void CDbgLuaHelper::DrawStackTrace() xr_strcat(szDesc, " "); } char szTmp[6]; - xr_strcat(szDesc, itoa(ar.currentline, szTmp, 10)); + xr_strcat(szDesc, _itoa(ar.currentline, szTmp, 10)); xr_strcat(szDesc, " "); if (ar.short_src) xr_strcat(szDesc, ar.short_src); diff --git a/src/xrServerEntities/xrServer_Objects_ALife.cpp b/src/xrServerEntities/xrServer_Objects_ALife.cpp index d8a57fd9b38..99c489dce41 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife.cpp @@ -124,7 +124,7 @@ void SFillPropData::load() { VERIFY(locations[i].empty()); string256 caSection, T; - strconcat(sizeof(caSection), caSection, SECTION_HEADER, itoa(i, T, 10)); + strconcat(sizeof(caSection), caSection, SECTION_HEADER, _itoa(i, T, 10)); R_ASSERT(Ini->section_exist(caSection)); for (k = 0; Ini->r_line(caSection, k, &N, &V); ++k) locations[i].push_back(xr_rtoken(V, atoi(N))); diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp index 3b0f4ba4c80..180029c0c4c 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp @@ -446,14 +446,14 @@ void CSE_ALifeTraderAbstract::set_specific_character(shared_str new_spec_char) xr_string n = "name_"; n += subset; n += "_"; - n += itoa(::Random.randI(name_cnt), S, 10); + n += _itoa(::Random.randI(name_cnt), S, 10); m_character_name = *(CStringTable().translate(n.c_str())); m_character_name += " "; n = "lname_"; n += subset; n += "_"; - n += itoa(::Random.randI(last_name_cnt), S, 10); + n += _itoa(::Random.randI(last_name_cnt), S, 10); m_character_name += *(CStringTable().translate(n.c_str())); } u32 min_m = selected_char.MoneyDef().min_money; diff --git a/src/xrSound/OpenALDeviceList.cpp b/src/xrSound/OpenALDeviceList.cpp index e133e37ce67..c0e8d81b2ca 100644 --- a/src/xrSound/OpenALDeviceList.cpp +++ b/src/xrSound/OpenALDeviceList.cpp @@ -86,7 +86,7 @@ void ALDeviceList::Enumerate() // Also we assume that if "Generic Hardware" exists, than "Generic Software" is also exists // Maybe wrong - if (0 == stricmp(m_defaultDeviceName, AL_GENERIC_HARDWARE)) + if (0 == _stricmp(m_defaultDeviceName, AL_GENERIC_HARDWARE)) { xr_strcpy(m_defaultDeviceName, AL_GENERIC_SOFTWARE); Msg("SOUND: OpenAL: default SndDevice name set to %s", m_defaultDeviceName); @@ -169,7 +169,7 @@ void ALDeviceList::Enumerate() { GetDeviceVersion(j, &majorVersion, &minorVersion); Msg("%d. %s, Spec Version %d.%d %s eax[%d] efx[%s] xram[%s]", j + 1, GetDeviceName(j), majorVersion, - minorVersion, (stricmp(GetDeviceName(j), m_defaultDeviceName) == 0) ? "(default)" : "", + minorVersion, (_stricmp(GetDeviceName(j), m_defaultDeviceName) == 0) ? "(default)" : "", GetDeviceDesc(j).props.eax, GetDeviceDesc(j).props.efx ? "yes" : "no", GetDeviceDesc(j).props.xram ? "yes" : "no"); } @@ -191,7 +191,7 @@ void ALDeviceList::SelectBestDevice() u32 new_device_id = snd_device_id; for (u32 i = 0; i < GetNumDevices(); ++i) { - if (stricmp(m_defaultDeviceName, GetDeviceName(i)) != 0) + if (_stricmp(m_defaultDeviceName, GetDeviceName(i)) != 0) continue; GetDeviceVersion(i, &majorVersion, &minorVersion); diff --git a/src/xrSound/SoundRender_Core_SourceManager.cpp b/src/xrSound/SoundRender_Core_SourceManager.cpp index 1043a5aa17a..260b00a9c99 100644 --- a/src/xrSound/SoundRender_Core_SourceManager.cpp +++ b/src/xrSound/SoundRender_Core_SourceManager.cpp @@ -9,7 +9,7 @@ CSoundRender_Source* CSoundRender_Core::i_create_source(LPCSTR name) // Search string256 id; xr_strcpy(id, name); - strlwr(id); + _strlwr(id); if (strext(id)) *strext(id) = 0; for (u32 it = 0; it < s_sources.size(); it++) diff --git a/src/xrSound/SoundRender_Environment.cpp b/src/xrSound/SoundRender_Environment.cpp index f0a57f8e255..4bc795302c8 100644 --- a/src/xrSound/SoundRender_Environment.cpp +++ b/src/xrSound/SoundRender_Environment.cpp @@ -185,14 +185,14 @@ void SoundEnvironment_LIB::Unload() int SoundEnvironment_LIB::GetID(LPCSTR name) { for (SE_IT it = library.begin(); it != library.end(); it++) - if (0 == stricmp(name, *(*it)->name)) + if (0 == _stricmp(name, *(*it)->name)) return int(it - library.begin()); return -1; } CSoundRender_Environment* SoundEnvironment_LIB::Get(LPCSTR name) { for (SE_IT it = library.begin(); it != library.end(); it++) - if (0 == stricmp(name, *(*it)->name)) + if (0 == _stricmp(name, *(*it)->name)) return *it; return NULL; } @@ -205,7 +205,7 @@ CSoundRender_Environment* SoundEnvironment_LIB::Append(CSoundRender_Environment* void SoundEnvironment_LIB::Remove(LPCSTR name) { for (SE_IT it = library.begin(); it != library.end(); it++) - if (0 == stricmp(name, *(*it)->name)) + if (0 == _stricmp(name, *(*it)->name)) { xr_delete(*it); library.erase(it); diff --git a/src/xrSound/SoundRender_Source_loader.cpp b/src/xrSound/SoundRender_Source_loader.cpp index fecb02e27c7..1d3c064cbac 100644 --- a/src/xrSound/SoundRender_Source_loader.cpp +++ b/src/xrSound/SoundRender_Source_loader.cpp @@ -133,7 +133,7 @@ void CSoundRender_Source::load(LPCSTR name) { string_path fn, N; xr_strcpy(N, name); - strlwr(N); + _strlwr(N); if (strext(N)) *strext(N) = 0;