From f1b969219a5b8742db86b68a7a216a4aac7d5ae9 Mon Sep 17 00:00:00 2001 From: Zero Fanker Date: Sun, 19 May 2024 11:19:13 -0400 Subject: [PATCH] Format adjustment . --- MissionEditor/INIMeta.cpp | 2 +- MissionEditor/IsoView.cpp | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/MissionEditor/INIMeta.cpp b/MissionEditor/INIMeta.cpp index cdfdf0e..fcce812 100644 --- a/MissionEditor/INIMeta.cpp +++ b/MissionEditor/INIMeta.cpp @@ -13,7 +13,7 @@ const CIniFile* IniFileGroup::Nth(int idx) const return m_group.at(idx); } -const CString& IniFileGroup::GetString(const CString & section, const CString & key) const +const CString& IniFileGroup::GetString(const CString& section, const CString & key) const { for (auto it = m_group.rbegin(); it != m_group.rend(); ++it) { auto const& got = (*it)->GetString(section, key); diff --git a/MissionEditor/IsoView.cpp b/MissionEditor/IsoView.cpp index eed8806..9a08cd1 100644 --- a/MissionEditor/IsoView.cpp +++ b/MissionEditor/IsoView.cpp @@ -547,24 +547,33 @@ inline void CalculateHouseColorPalette(int house_pal[houseColorRelMax + 1], cons /* There is no need for newpal */ -__forceinline void BlitPic(void* dst, int x, int y, int dleft, int dtop, int dpitch, int dright, int dbottom, PICDATA& pd, int* color = NULL, const int* newPal = NULL)//BYTE* src, int swidth, int sheight) +__forceinline void BlitPic(void* dst, int x, int y, int dleft, int dtop, int dpitch, int dright, int dbottom, + PICDATA& pd, int* color = NULL, const int* newPal = NULL)//BYTE* src, int swidth, int sheight) { ASSERT(pd.bType != PICDATA_TYPE_BMP); - if (newPal == NULL) newPal = pd.pal; + if (newPal == NULL) { + newPal = pd.pal; + } BYTE* src = (BYTE*)pd.pic; int swidth = pd.wMaxWidth; int sheight = pd.wMaxHeight; - if (src == NULL || dst == NULL) return; + if (src == NULL || dst == NULL) { + return; + } //x += 1; //y += 1; //y -= f_y; - if (x + swidth < dleft || y + sheight < dtop) return; - if (x >= dright || y >= dbottom) return; + if (x + swidth < dleft || y + sheight < dtop) { + return; + } + if (x >= dright || y >= dbottom) { + return; + } RECT blrect;