From cf136a91d60509a99f9ba47c7dbc6fbb9cb6240d Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sat, 11 Aug 2018 03:08:26 -0500 Subject: [PATCH] [Core] Completely kill math_2d.h, change includes --- core/image.h | 2 +- core/math/camera_matrix.h | 2 +- core/math/delaunay.h | 2 +- core/math/geometry.h | 2 +- core/math/math_2d.h | 36 ----------------------- core/method_ptrcall.h | 2 +- core/os/input_event.h | 2 +- core/variant.h | 2 +- modules/csg/csg.h | 2 +- modules/gdnative/gdnative/rect2.cpp | 2 +- modules/gdnative/gdnative/transform2d.cpp | 2 +- platform/uwp/os_uwp.h | 2 +- scene/gui/control.h | 2 +- scene/main/viewport.h | 2 +- scene/resources/texture.h | 2 +- servers/physics_2d/broad_phase_2d_sw.h | 2 +- servers/visual_server.h | 2 +- 17 files changed, 16 insertions(+), 52 deletions(-) delete mode 100644 core/math/math_2d.h diff --git a/core/image.h b/core/image.h index c8dd647c312..c450e882902 100644 --- a/core/image.h +++ b/core/image.h @@ -33,7 +33,7 @@ #include "color.h" #include "dvector.h" -#include "math_2d.h" +#include "rect2.h" #include "resource.h" /** diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h index 226b4d572bd..a689c7238af 100644 --- a/core/math/camera_matrix.h +++ b/core/math/camera_matrix.h @@ -31,7 +31,7 @@ #ifndef CAMERA_MATRIX_H #define CAMERA_MATRIX_H -#include "math_2d.h" +#include "rect2.h" #include "transform.h" /** @author Juan Linietsky diff --git a/core/math/delaunay.h b/core/math/delaunay.h index 13fbc0c6aec..46535d5ce9f 100644 --- a/core/math/delaunay.h +++ b/core/math/delaunay.h @@ -1,7 +1,7 @@ #ifndef DELAUNAY_H #define DELAUNAY_H -#include "math_2d.h" +#include "rect2.h" class Delaunay2D { public: diff --git a/core/math/geometry.h b/core/math/geometry.h index 186a05fb376..83b9467a302 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -33,9 +33,9 @@ #include "dvector.h" #include "face3.h" -#include "math_2d.h" #include "object.h" #include "print_string.h" +#include "rect2.h" #include "triangulate.h" #include "vector.h" #include "vector3.h" diff --git a/core/math/math_2d.h b/core/math/math_2d.h deleted file mode 100644 index 6105eba81b1..00000000000 --- a/core/math/math_2d.h +++ /dev/null @@ -1,36 +0,0 @@ -/*************************************************************************/ -/* math_2d.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef MATH_2D_H -#define MATH_2D_H - -#include "transform_2d.h" - -#endif diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h index 2f6dcb3178a..6a33cf4d702 100644 --- a/core/method_ptrcall.h +++ b/core/method_ptrcall.h @@ -31,7 +31,7 @@ #ifndef METHOD_PTRCALL_H #define METHOD_PTRCALL_H -#include "math_2d.h" +#include "transform_2d.h" #include "typedefs.h" #include "variant.h" diff --git a/core/os/input_event.h b/core/os/input_event.h index 07df81488be..8732c7e3778 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -31,9 +31,9 @@ #ifndef INPUT_EVENT_H #define INPUT_EVENT_H -#include "math_2d.h" #include "os/copymem.h" #include "resource.h" +#include "transform_2d.h" #include "typedefs.h" #include "ustring.h" /** diff --git a/core/variant.h b/core/variant.h index b48a0b3e733..577a33aa4d0 100644 --- a/core/variant.h +++ b/core/variant.h @@ -42,7 +42,6 @@ #include "dvector.h" #include "face3.h" #include "io/ip_address.h" -#include "math_2d.h" #include "matrix3.h" #include "node_path.h" #include "plane.h" @@ -50,6 +49,7 @@ #include "ref_ptr.h" #include "rid.h" #include "transform.h" +#include "transform_2d.h" #include "ustring.h" #include "vector3.h" diff --git a/modules/csg/csg.h b/modules/csg/csg.h index 53303a6533a..2e07c23e28a 100644 --- a/modules/csg/csg.h +++ b/modules/csg/csg.h @@ -34,9 +34,9 @@ #include "aabb.h" #include "dvector.h" #include "map.h" -#include "math_2d.h" #include "oa_hash_map.h" #include "plane.h" +#include "rect2.h" #include "scene/resources/material.h" #include "transform.h" #include "vector3.h" diff --git a/modules/gdnative/gdnative/rect2.cpp b/modules/gdnative/gdnative/rect2.cpp index 83c58db520e..54b98fc4e57 100644 --- a/modules/gdnative/gdnative/rect2.cpp +++ b/modules/gdnative/gdnative/rect2.cpp @@ -30,7 +30,7 @@ #include "gdnative/rect2.h" -#include "core/math/math_2d.h" +#include "core/math/transform_2d.h" #include "core/variant.h" #ifdef __cplusplus diff --git a/modules/gdnative/gdnative/transform2d.cpp b/modules/gdnative/gdnative/transform2d.cpp index c69607a18a7..fa0e15d9d20 100644 --- a/modules/gdnative/gdnative/transform2d.cpp +++ b/modules/gdnative/gdnative/transform2d.cpp @@ -30,7 +30,7 @@ #include "gdnative/transform2d.h" -#include "core/math/math_2d.h" +#include "core/math/transform_2d.h" #include "core/variant.h" #ifdef __cplusplus diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 3b48063fe97..89f71f00139 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -31,7 +31,7 @@ #ifndef OSUWP_H #define OSUWP_H -#include "core/math/math_2d.h" +#include "core/math/transform_2d.h" #include "core/ustring.h" #include "drivers/xaudio2/audio_driver_xaudio2.h" #include "gl_context_egl.h" diff --git a/scene/gui/control.h b/scene/gui/control.h index 6bea04345bb..c6bd2f097d2 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -31,13 +31,13 @@ #ifndef CONTROL_H #define CONTROL_H -#include "math_2d.h" #include "rid.h" #include "scene/2d/canvas_item.h" #include "scene/gui/shortcut.h" #include "scene/main/node.h" #include "scene/main/timer.h" #include "scene/resources/theme.h" +#include "transform_2d.h" /** @author Juan Linietsky */ diff --git a/scene/main/viewport.h b/scene/main/viewport.h index e717d270693..e4ef373c77b 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -31,11 +31,11 @@ #ifndef VIEWPORT_H #define VIEWPORT_H -#include "math_2d.h" #include "scene/main/node.h" #include "scene/resources/texture.h" #include "scene/resources/world_2d.h" #include "servers/visual_server.h" +#include "transform_2d.h" /** @author Juan Linietsky */ diff --git a/scene/resources/texture.h b/scene/resources/texture.h index 1c18189b2c0..e5d1166de5d 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -33,9 +33,9 @@ #include "curve.h" #include "io/resource_loader.h" -#include "math_2d.h" #include "os/mutex.h" #include "os/thread_safe.h" +#include "rect2.h" #include "resource.h" #include "scene/resources/color_ramp.h" #include "servers/visual_server.h" diff --git a/servers/physics_2d/broad_phase_2d_sw.h b/servers/physics_2d/broad_phase_2d_sw.h index 80ae970624a..d7d236c4c6a 100644 --- a/servers/physics_2d/broad_phase_2d_sw.h +++ b/servers/physics_2d/broad_phase_2d_sw.h @@ -31,8 +31,8 @@ #ifndef BROAD_PHASE_2D_SW_H #define BROAD_PHASE_2D_SW_H -#include "math_2d.h" #include "math_funcs.h" +#include "rect2.h" class CollisionObject2DSW; diff --git a/servers/visual_server.h b/servers/visual_server.h index 0ec902c18cf..fd7f96339e9 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -34,9 +34,9 @@ #include "bsp_tree.h" #include "geometry.h" #include "image.h" -#include "math_2d.h" #include "object.h" #include "rid.h" +#include "transform_2d.h" #include "variant.h" /**