diff --git a/other/freetype/freetype.lua b/other/freetype/freetype.lua index 3c7f918ed..476e6d755 100644 --- a/other/freetype/freetype.lua +++ b/other/freetype/freetype.lua @@ -1,18 +1,18 @@ FreeType = { basepath = PathDir(ModuleFilename()), - - OptFind = function (name, required) + + OptFind = function (name, required) local check = function(option, settings) option.value = false option.use_pkgconfig = false option.use_winlib = 0 option.lib_path = nil - + if family ~= "windows" and ExecuteSilent("pkg-config freetype2") == 0 then option.value = true option.use_pkgconfig = true end - + if platform == "win32" then option.value = true option.use_winlib = 32 @@ -21,15 +21,15 @@ FreeType = { option.use_winlib = 64 end end - + local apply = function(option, settings) -- include path settings.cc.includes:Add(FreeType.basepath .. "/include") - + if option.use_pkgconfig == true then settings.cc.flags:Add("`pkg-config freetype2 --cflags`") settings.link.flags:Add("`pkg-config freetype2 --libs`") - + elseif option.use_winlib > 0 then if option.use_winlib == 32 then settings.link.libpath:Add(FreeType.basepath .. "/lib32") @@ -39,13 +39,13 @@ FreeType = { settings.link.libs:Add("freetype") end end - + local save = function(option, output) output:option(option, "value") output:option(option, "use_pkgconfig") output:option(option, "use_winlib") end - + local display = function(option) if option.value == true then if option.use_pkgconfig == true then return "using pkg-config" end @@ -60,7 +60,7 @@ FreeType = { end end end - + local o = MakeOption(name, 0, check, save, display) o.Apply = apply o.include_path = nil diff --git a/src/engine/client/fetcher.cpp b/src/engine/client/fetcher.cpp index 3b11cacad..0336505b2 100644 --- a/src/engine/client/fetcher.cpp +++ b/src/engine/client/fetcher.cpp @@ -144,7 +144,7 @@ void CFetcher::FetchFile(CFetchTask *pTask) curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask); curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback); curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L); - + dbg_msg("fetcher", "downloading %s", pTask->m_aDest); pTask->m_State = CFetchTask::STATE_RUNNING; int ret = curl_easy_perform(m_pHandle); diff --git a/src/engine/client/updater.cpp b/src/engine/client/updater.cpp index 218a9e7ea..dc598182d 100644 --- a/src/engine/client/updater.cpp +++ b/src/engine/client/updater.cpp @@ -74,7 +74,7 @@ void CUpdater::FetchFile(const char *pFile, const char *pDestPath) CFetchTask *Task = new CFetchTask(false); m_pFetcher->QueueAdd(Task, aBuf, aPath, -2, this, &CUpdater::CompletionCallback, &CUpdater::ProgressCallback); } - + void CUpdater::MoveFile(const char *pFile) { char aBuf[256]; diff --git a/src/game/client/components/background.h b/src/game/client/components/background.h index 5c8ea439a..f97f65b9a 100644 --- a/src/game/client/components/background.h +++ b/src/game/client/components/background.h @@ -17,7 +17,7 @@ class CBackground : public CComponent int64 m_LastLoad; //to avoid memory leak when switching to %current% - IEngineMap *m_pBackgroundMap; + IEngineMap *m_pBackgroundMap; CLayers *m_pBackgroundLayers; CMapImages *m_pBackgroundImages; diff --git a/src/game/client/components/ghost.cpp b/src/game/client/components/ghost.cpp index 600db0373..15c7aa195 100644 --- a/src/game/client/components/ghost.cpp +++ b/src/game/client/components/ghost.cpp @@ -559,7 +559,7 @@ void CGhost::OnMessage(int MsgType, void *pRawMsg) int FinishedPos = pFinished - pMsg->m_pMessage; if (!pFinished || FinishedPos == 0 || FinishedPos >= (int)sizeof(aName)) return; - + str_copy(aName, pMsg->m_pMessage, FinishedPos + 1); // prepare values and state for saving diff --git a/src/game/client/components/mapimages.h b/src/game/client/components/mapimages.h index 0c24e5c56..ee5b278fc 100644 --- a/src/game/client/components/mapimages.h +++ b/src/game/client/components/mapimages.h @@ -7,7 +7,7 @@ class CMapImages : public CComponent { friend class CBackground; - + int m_aTextures[64]; int m_Count; diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 9e504209d..cc705b7f3 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -150,7 +150,7 @@ void CMapLayers::OnRender() float y0 = (pGroup->m_ClipY - Points[1]) / (Points[3]-Points[1]); float x1 = ((pGroup->m_ClipX+pGroup->m_ClipW) - Points[0]) / (Points[2]-Points[0]); float y1 = ((pGroup->m_ClipY+pGroup->m_ClipH) - Points[1]) / (Points[3]-Points[1]); - + if(x1 < 0.0f || x0 > 1.0f || y1 < 0.0f || y0 > 1.0f) continue; diff --git a/src/game/client/components/maplayers.h b/src/game/client/components/maplayers.h index cff896d90..44ebcca11 100644 --- a/src/game/client/components/maplayers.h +++ b/src/game/client/components/maplayers.h @@ -7,7 +7,7 @@ class CMapLayers : public CComponent { friend class CBackground; - + CLayers *m_pLayers; // todo refactor: maybe remove it and access it through client* int m_Type; int m_CurrentLocalTick; diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index c50ba54a7..3c7792f30 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -385,7 +385,7 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS else aInputing[s_AtIndex + i] = Text[i]; } - //s_AtIndex = s_AtIndex+FillCharLen; + //s_AtIndex = s_AtIndex+FillCharLen; pDisplayStr = aInputing; } } diff --git a/src/game/client/components/race_demo.cpp b/src/game/client/components/race_demo.cpp index 944374db0..1cf3c2382 100644 --- a/src/game/client/components/race_demo.cpp +++ b/src/game/client/components/race_demo.cpp @@ -117,7 +117,7 @@ void CRaceDemo::OnMessage(int MsgType, void *pRawMsg) int FinishedPos = pFinished - pMsg->m_pMessage; if (!pFinished || FinishedPos == 0 || FinishedPos >= (int)sizeof(aName)) return; - + // store the name str_copy(aName, pMsg->m_pMessage, FinishedPos + 1); diff --git a/src/game/client/components/race_demo.h b/src/game/client/components/race_demo.h index 45bba4d21..26a2923cc 100644 --- a/src/game/client/components/race_demo.h +++ b/src/game/client/components/race_demo.h @@ -19,22 +19,22 @@ class CRaceDemo : public CComponent public: int m_RaceState; - + enum { RACE_NONE = 0, RACE_STARTED, RACE_FINISHED, }; - + CRaceDemo(); - + virtual void OnReset(); virtual void OnStateChange(int NewState, int OldState); virtual void OnRender(); virtual void OnShutdown(); virtual void OnMessage(int MsgType, void *pRawMsg); - + void CheckDemo(); void SaveDemo(const char* pDemo); }; diff --git a/src/game/client/lineinput.cpp b/src/game/client/lineinput.cpp index b1c965fc1..ef272a940 100644 --- a/src/game/client/lineinput.cpp +++ b/src/game/client/lineinput.cpp @@ -48,7 +48,7 @@ void CLineInput::Editing(const char *pString, int Cursor) m_DisplayStr[m_CursorPos + i] = Texting[i]; } m_FakeLen = str_length(m_DisplayStr); - m_FakeCursorPos = m_CursorPos + Cursor + 1; + m_FakeCursorPos = m_CursorPos + Cursor + 1; } void CLineInput::Add(const char *pString) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index c46096add..30a84f6f0 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -2790,7 +2790,7 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * ((pProps[i].m_Value >> s_aShift[1])&0xff)/255.0f, ((pProps[i].m_Value >> s_aShift[2])&0xff)/255.0f, 1.0f); - + static int s_ColorPicker, s_ColorPickerID; if(DoButton_ColorPicker(&s_ColorPicker, &ColorBox, &Color)) { @@ -3808,7 +3808,7 @@ void CEditor::RenderFileDialog() aPath[0] = 0; str_format(aBuf, sizeof(aBuf), "Current path: %s", aPath); UI()->DoLabel(&PathBox, aBuf, 10.0f, -1, -1); - + if(m_FileDialogStorageType == IStorage::TYPE_SAVE) { // filebox @@ -3829,11 +3829,11 @@ void CEditor::RenderFileDialog() FileBox.VSplitRight(250, &FileBox, 0); CUIRect ClearBox; FileBox.VSplitRight(15, &FileBox, &ClearBox); - + static float s_SearchBoxID = 0; UI()->DoLabel(&FileBoxLabel, "Search:", 10.0f, -1, -1); DoEditBox(&s_SearchBoxID, &FileBox, m_aFileDialogSearchText, sizeof(m_aFileDialogSearchText), 10.0f, &s_SearchBoxID,false,CUI::CORNER_L); - + // clearSearchbox button { static int s_ClearButton = 0; @@ -5334,8 +5334,8 @@ void CEditor::Reset(bool CreateDefault) m_UndoRunning = false; m_ShowEnvelopePreview = 0; - m_ShiftBy = 1; - + m_ShiftBy = 1; + m_Map.m_Modified = false; m_Map.m_UndoModified = 0; m_LastUndoUpdateTime = time_get(); diff --git a/src/game/editor/editor.h b/src/game/editor/editor.h index ab5142693..1a92bb5a3 100644 --- a/src/game/editor/editor.h +++ b/src/game/editor/editor.h @@ -753,7 +753,7 @@ public: void Reset(bool CreateDefault=true); int Save(const char *pFilename); int Load(const char *pFilename, int StorageType); - int Append(const char *pFilename, int StorageType); + int Append(const char *pFilename, int StorageType); void LoadCurrentMap(); void Render(); diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index 8ceebb61c..9f6122b7b 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -1597,7 +1597,7 @@ int CEditor::PopupColorPicker(CEditor *pEditor, CUIRect View) if(pEditor->UI()->DoPickerLogic(&pEditor->ms_SVPicker, &SVPicker, &X, &Y)) { hsv.y = X/SVPicker.w; - hsv.z = 1.0f - Y/SVPicker.h; + hsv.z = 1.0f - Y/SVPicker.h; } // hue slider @@ -1637,7 +1637,7 @@ int CEditor::PopupColorPicker(CEditor *pEditor, CUIRect View) if(pEditor->UI()->DoPickerLogic(&pEditor->ms_HuePicker, &HuePicker, &X, &Y)) { - hsv.x = 1.0f - Y/HuePicker.h; + hsv.x = 1.0f - Y/HuePicker.h; } pEditor->ms_PickerColor = hsv; diff --git a/src/game/layers.cpp b/src/game/layers.cpp index 73f9d96f2..9f17658f8 100644 --- a/src/game/layers.cpp +++ b/src/game/layers.cpp @@ -114,7 +114,7 @@ void CLayers::InitBackground(class IMap *pMap) m_pMap = pMap; m_pMap->GetType(MAPITEMTYPE_GROUP, &m_GroupsStart, &m_GroupsNum); m_pMap->GetType(MAPITEMTYPE_LAYER, &m_LayersStart, &m_LayersNum); - + //following is here to prevent crash using standard map as background m_pTeleLayer = 0; m_pSpeedupLayer = 0; @@ -152,8 +152,7 @@ void CLayers::InitBackground(class IMap *pMap) m_pGameGroup->m_ClipW = 0; m_pGameGroup->m_ClipH = 0; } - - //We don't care about tile layers. + //We don't care about tile layers. } } } diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 5cc4dfb14..aebbf7b63 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -665,7 +665,7 @@ void CCharacter::RemoveNinja() m_Ninja.m_CurrentMoveTime = 0; m_aWeapons[WEAPON_NINJA].m_Got = false; m_Core.m_ActiveWeapon = m_LastWeapon; - + SetWeapon(m_Core.m_ActiveWeapon); } @@ -2124,7 +2124,7 @@ void CCharacter::GiveWeapon(int Weapon, bool Remove) GiveNinja(); return; } - + if (Remove) { if (GetActiveWeapon()== Weapon)