From f788a04892a25efb33d638a32305e505885f678b Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sat, 4 May 2024 10:51:13 +0800 Subject: [PATCH] Remove tools camel case style exception --- src/tools/.clang-tidy | 1 - src/tools/map_find_env.cpp | 6 +++--- src/tools/map_replace_area.cpp | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 src/tools/.clang-tidy diff --git a/src/tools/.clang-tidy b/src/tools/.clang-tidy deleted file mode 100644 index 6d6f9e5d5..000000000 --- a/src/tools/.clang-tidy +++ /dev/null @@ -1 +0,0 @@ -Checks: '-readability-identifier-naming' diff --git a/src/tools/map_find_env.cpp b/src/tools/map_find_env.cpp index 6acd92230..99ee009b9 100644 --- a/src/tools/map_find_env.cpp +++ b/src/tools/map_find_env.cpp @@ -50,7 +50,7 @@ int FxToTilePos(const int FxPos) bool GetEnvelopedQuads(const CQuad *pQuads, const int NumQuads, const int EnvId, const int GroupId, const int LayerId, int &QuadsCounter, EnvelopedQuad pEnvQuads[1024]) { - bool bFound = false; + bool Found = false; for(int i = 0; i < NumQuads; i++) { if(pQuads[i].m_PosEnv != EnvId && pQuads[i].m_ColorEnv != EnvId) @@ -62,10 +62,10 @@ bool GetEnvelopedQuads(const CQuad *pQuads, const int NumQuads, const int EnvId, pEnvQuads[QuadsCounter].m_TilePosY = FxToTilePos(pQuads[i].m_aPoints[4].y); QuadsCounter++; - bFound = true; + Found = true; } - return bFound; + return Found; } void PrintEnvelopedQuads(const EnvelopedQuad pEnvQuads[1024], const int EnvId, const int QuadsCounter) diff --git a/src/tools/map_replace_area.cpp b/src/tools/map_replace_area.cpp index 1aef8f46e..7ad30c9ba 100644 --- a/src/tools/map_replace_area.cpp +++ b/src/tools/map_replace_area.cpp @@ -235,9 +235,9 @@ void CompareGroups(const char aaMapNames[3][64], CDataFileReader aInputMaps[2]) for(int j = 0; j < 2; j++) apItem[j] = (CMapItemGroup *)aInputMaps[j].GetItem(aStart[j] + i); - bool bSameConfig = apItem[0]->m_ParallaxX == apItem[1]->m_ParallaxX && apItem[0]->m_ParallaxY == apItem[1]->m_ParallaxY && apItem[0]->m_OffsetX == apItem[1]->m_OffsetX && apItem[0]->m_OffsetY == apItem[1]->m_OffsetY && apItem[0]->m_UseClipping == apItem[1]->m_UseClipping && apItem[0]->m_ClipX == apItem[1]->m_ClipX && apItem[0]->m_ClipY == apItem[1]->m_ClipY && apItem[0]->m_ClipW == apItem[1]->m_ClipW && apItem[0]->m_ClipH == apItem[1]->m_ClipH; + bool SameConfig = apItem[0]->m_ParallaxX == apItem[1]->m_ParallaxX && apItem[0]->m_ParallaxY == apItem[1]->m_ParallaxY && apItem[0]->m_OffsetX == apItem[1]->m_OffsetX && apItem[0]->m_OffsetY == apItem[1]->m_OffsetY && apItem[0]->m_UseClipping == apItem[1]->m_UseClipping && apItem[0]->m_ClipX == apItem[1]->m_ClipX && apItem[0]->m_ClipY == apItem[1]->m_ClipY && apItem[0]->m_ClipW == apItem[1]->m_ClipW && apItem[0]->m_ClipH == apItem[1]->m_ClipH; - if(!bSameConfig) + if(!SameConfig) dbg_msg("map_replace_area", "WARNING: different configuration on layergroup #%d, this might lead to unexpected results", i); } } @@ -378,10 +378,10 @@ void ReplaceAreaQuads(CDataFileReader aInputMaps[2], const float aaaGameAreas[][ apQuads[2] = new CQuad[apQuadLayer[0]->m_NumQuads + apQuadLayer[1]->m_NumQuads]; int QuadsCounter = 0; - bool bDataChanged = RemoveDestinationQuads(aaaGameAreas[1], apQuads[1], apQuadLayer[1]->m_NumQuads, apLayerGroups[1], apQuads[2], QuadsCounter); - bDataChanged |= InsertDestinationQuads(aaaGameAreas, apQuads[0], apQuadLayer[0]->m_NumQuads, apLayerGroups, apQuads[2], QuadsCounter); + bool DataChanged = RemoveDestinationQuads(aaaGameAreas[1], apQuads[1], apQuadLayer[1]->m_NumQuads, apLayerGroups[1], apQuads[2], QuadsCounter); + DataChanged |= InsertDestinationQuads(aaaGameAreas, apQuads[0], apQuadLayer[0]->m_NumQuads, apLayerGroups, apQuads[2], QuadsCounter); - if(bDataChanged) + if(DataChanged) { g_apNewData[apQuadLayer[1]->m_Data] = apQuads[2]; g_aNewDataSize[apQuadLayer[1]->m_Data] = ((int)sizeof(CQuad)) * QuadsCounter; @@ -394,7 +394,7 @@ void ReplaceAreaQuads(CDataFileReader aInputMaps[2], const float aaaGameAreas[][ bool RemoveDestinationQuads(const float aaGameArea[2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *pLayerGroup, CQuad *pDestQuads, int &QuadsCounter) { - bool bDataChanged = false; + bool DataChanged = false; for(int i = 0; i < NumQuads; i++) { @@ -402,7 +402,7 @@ bool RemoveDestinationQuads(const float aaGameArea[2][2], const CQuad *pQuads, c if(GetVisibleArea(aaGameArea, Ob)) { - bDataChanged = true; + DataChanged = true; continue; } @@ -410,12 +410,12 @@ bool RemoveDestinationQuads(const float aaGameArea[2][2], const CQuad *pQuads, c QuadsCounter++; } - return bDataChanged; + return DataChanged; } bool InsertDestinationQuads(const float aaaGameAreas[2][2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *apLayerGroups[2], CQuad *pDestQuads, int &QuadsCounter) { - bool bDataChanged = false; + bool DataChanged = false; for(int i = 0; i < NumQuads; i++) { @@ -439,11 +439,11 @@ bool InsertDestinationQuads(const float aaaGameAreas[2][2][2], const CQuad *pQua } QuadsCounter++; - bDataChanged = true; + DataChanged = true; } } - return bDataChanged; + return DataChanged; } bool AdaptVisiblePoint(const float aaaGameAreas[2][2][2], const float aaVisibleArea[2][2], const MapObject aObs[2], float aPos[2])