From 742b636f706b664850f3d4d7ddaa471f75f28193 Mon Sep 17 00:00:00 2001 From: vladislavbelov Date: Tue, 30 Mar 2021 21:14:36 +0000 Subject: [PATCH] Moves CRect from ps to maths to related geometric primitives. This was SVN commit r25165. --- source/graphics/TextRenderer.h | 4 ++-- source/gui/CGUI.h | 2 +- source/gui/CGUIText.h | 2 +- source/gui/GUIRenderer.h | 2 +- source/gui/ObjectBases/IGUITextOwner.h | 2 +- source/gui/SettingTypes/CGUISize.h | 4 ++-- source/{ps/Shapes.cpp => maths/Rect.cpp} | 2 +- source/{ps/Shapes.h => maths/Rect.h} | 6 +++--- source/ps/Game.cpp | 1 - source/simulation2/scripting/EngineScriptConversions.cpp | 4 ++-- source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp | 3 +-- 11 files changed, 15 insertions(+), 17 deletions(-) rename source/{ps/Shapes.cpp => maths/Rect.cpp} (99%) rename source/{ps/Shapes.h => maths/Rect.h} (97%) diff --git a/source/graphics/TextRenderer.h b/source/graphics/TextRenderer.h index f1030700ee..9cf486fd4d 100644 --- a/source/graphics/TextRenderer.h +++ b/source/graphics/TextRenderer.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,8 +21,8 @@ #include "graphics/Color.h" #include "graphics/ShaderProgramPtr.h" #include "maths/Matrix3D.h" +#include "maths/Rect.h" #include "ps/CStrIntern.h" -#include "ps/Shapes.h" #include diff --git a/source/gui/CGUI.h b/source/gui/CGUI.h index fc2fcc95b8..80c1d51453 100644 --- a/source/gui/CGUI.h +++ b/source/gui/CGUI.h @@ -28,9 +28,9 @@ #include "gui/SGUIIcon.h" #include "gui/SGUIStyle.h" #include "lib/input.h" +#include "maths/Rect.h" #include "maths/Size2D.h" #include "maths/Vector2D.h" -#include "ps/Shapes.h" #include "ps/XML/Xeromyces.h" #include "scriptinterface/ScriptInterface.h" diff --git a/source/gui/CGUIText.h b/source/gui/CGUIText.h index ebe2f070b3..6c17f69d17 100644 --- a/source/gui/CGUIText.h +++ b/source/gui/CGUIText.h @@ -21,10 +21,10 @@ #include "gui/CGUISprite.h" #include "gui/SettingTypes/CGUIColor.h" #include "gui/SettingTypes/EAlign.h" +#include "maths/Rect.h" #include "maths/Size2D.h" #include "maths/Vector2D.h" #include "ps/CStrIntern.h" -#include "ps/Shapes.h" #include #include diff --git a/source/gui/GUIRenderer.h b/source/gui/GUIRenderer.h index 8d5e65680e..1a71b657c7 100644 --- a/source/gui/GUIRenderer.h +++ b/source/gui/GUIRenderer.h @@ -22,7 +22,7 @@ #include "graphics/ShaderTechniquePtr.h" #include "graphics/Texture.h" #include "lib/res/handle.h" -#include "ps/Shapes.h" +#include "maths/Rect.h" #include #include diff --git a/source/gui/ObjectBases/IGUITextOwner.h b/source/gui/ObjectBases/IGUITextOwner.h index aa1339ae91..049463f53c 100644 --- a/source/gui/ObjectBases/IGUITextOwner.h +++ b/source/gui/ObjectBases/IGUITextOwner.h @@ -30,7 +30,7 @@ GUI Object Base - Text Owner #ifndef INCLUDED_IGUITEXTOWNER #define INCLUDED_IGUITEXTOWNER -#include "ps/Shapes.h" +#include "maths/Rect.h" #include diff --git a/source/gui/SettingTypes/CGUISize.h b/source/gui/SettingTypes/CGUISize.h index e033c626fc..6dcda831dc 100644 --- a/source/gui/SettingTypes/CGUISize.h +++ b/source/gui/SettingTypes/CGUISize.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ #ifndef INCLUDED_CGUISIZE #define INCLUDED_CGUISIZE -#include "ps/Shapes.h" +#include "maths/Rect.h" #include "scriptinterface/ScriptForward.h" class CStr8; diff --git a/source/ps/Shapes.cpp b/source/maths/Rect.cpp similarity index 99% rename from source/ps/Shapes.cpp rename to source/maths/Rect.cpp index 547e48bfd1..394a032262 100644 --- a/source/ps/Shapes.cpp +++ b/source/maths/Rect.cpp @@ -17,7 +17,7 @@ #include "precompiled.h" -#include "Shapes.h" +#include "Rect.h" #include "maths/Size2D.h" #include "maths/Vector2D.h" diff --git a/source/ps/Shapes.h b/source/maths/Rect.h similarity index 97% rename from source/ps/Shapes.h rename to source/maths/Rect.h index 54aac8148f..ed1df24f32 100644 --- a/source/ps/Shapes.h +++ b/source/maths/Rect.h @@ -15,8 +15,8 @@ * along with 0 A.D. If not, see . */ -#ifndef INCLUDED_SHAPES -#define INCLUDED_SHAPES +#ifndef INCLUDED_RECT +#define INCLUDED_RECT class CSize2D; class CVector2D; @@ -118,4 +118,4 @@ public: float left, top, right, bottom; }; -#endif // INCLUDED_SHAPES +#endif // INCLUDED_RECT diff --git a/source/ps/Game.cpp b/source/ps/Game.cpp index 0647a24d33..266e7a2401 100644 --- a/source/ps/Game.cpp +++ b/source/ps/Game.cpp @@ -36,7 +36,6 @@ #include "ps/LoaderThunks.h" #include "ps/Profile.h" #include "ps/Replay.h" -#include "ps/Shapes.h" #include "ps/World.h" #include "ps/GameSetup/GameSetup.h" #include "renderer/Renderer.h" diff --git a/source/simulation2/scripting/EngineScriptConversions.cpp b/source/simulation2/scripting/EngineScriptConversions.cpp index 5c12f9f16b..2572e2d4cc 100644 --- a/source/simulation2/scripting/EngineScriptConversions.cpp +++ b/source/simulation2/scripting/EngineScriptConversions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,8 +23,8 @@ #include "maths/Fixed.h" #include "maths/FixedVector2D.h" #include "maths/FixedVector3D.h" +#include "maths/Rect.h" #include "ps/CLogger.h" -#include "ps/Shapes.h" #include "ps/utf16string.h" #include "simulation2/helpers/CinemaPath.h" #include "simulation2/helpers/Grid.h" diff --git a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp index 0c4417329d..55af31b097 100644 --- a/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -40,7 +40,6 @@ #include "ps/Game.h" #include "ps/GameSetup/GameSetup.h" #include "ps/Loader.h" -#include "ps/Shapes.h" #include "ps/World.h" #include "renderer/Renderer.h" #include "renderer/WaterManager.h"