Skip to content

Commit 1a27f68

Browse files
authored
Remove deprecated/unused/unmaintained GDCpp code (#2930)
* This also includes extensions code. Only show in developer changelog
1 parent ef198b2 commit 1a27f68

File tree

909 files changed

+199
-220888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

909 files changed

+199
-220888
lines changed

.clang_complete

-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
-fPIC
1414
-I./ExtLibs/SFML/include
1515
-I./Core
16-
-I./GDCpp/.
1716
-I./GDJS/.
1817
-F./ExtLibs/SFML/extlibs/libs-osx/Frameworks

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Core/GDCore/Serialization/rapidjson/rapidjson.h/* linguist-vendored
22
Core/GDCore/TinyXml/* linguist-vendored
3-
GDCpp/GDCpp/Runtime/TinyXml/* linguist-vendored
43
Extensions/ParticleSystem/SPARK/* linguist-vendored
54
Extensions/PhysicsBehavior/Box2D/* linguist-vendored
65
Extensions/PhysicsBehavior/box2djs/* linguist-vendored

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/Core/GDCore/Tools/VersionPriv.h
21
/docs
32
/docs-wiki
43
/ExtLibs/SFML
@@ -16,7 +15,6 @@
1615
*.bc
1716
/Binaries/Output
1817
*.autosave
19-
!/GDCpp/scripts/bcp.exe
2018
!/scripts/libgettextlib-0-17.dll
2119
!/scripts/libgettextsrc-0-17.dll
2220
!/xgettext.exe

.travis.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Travis CI configuration to build and run all tests
2-
# (and typing/formatting) for the Core, newIDE, GDJS (and even GDCpp).
2+
# (and typing/formatting) for the Core, newIDE, GDJS.
33
#
44
# This builds GDevelop.js and store it on a S3 so it can be used to run
55
# GDevelop without building it.
@@ -62,7 +62,7 @@ before_install:
6262
install:
6363
#Get the correct version of gcc/g++
6464
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
65-
#Compile the tests only for GDCore and GDCpp
65+
#Compile the tests only for GDCore
6666
- mkdir .build-tests
6767
- cd .build-tests
6868
- cmake -DBUILD_GDJS=FALSE -DBUILD_TESTS=TRUE -DCMAKE_CXX_COMPILER=$(which $CXX) -DCMAKE_C_COMPILER=$(which $CC) ..
@@ -89,12 +89,9 @@ install:
8989
- cd ../..
9090

9191
script:
92-
# GDCore and GDCpp game engine tests:
92+
# GDCore tests:
9393
- cd .build-tests
9494
- Core/GDCore_tests
95-
- GDCpp/GDCpp_tests
96-
- Extensions/PathfindingBehavior/PathfindingBehavior_Runtime_tests
97-
- Extensions/LinkedObjects/LinkedObjects_Runtime_tests
9895
- cd ..
9996
# GDevelop.js tests
10097
- cd GDevelop.js

.vscode/c_cpp_properties.json

-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"name": "Mac",
55
"includePath": [
66
"${workspaceRoot}",
7-
"${workspaceRoot}/GDCpp",
87
"${workspaceRoot}/GDJS",
98
"${workspaceRoot}/Extensions",
109
"${workspaceRoot}/Core",
@@ -43,7 +42,6 @@
4342
"name": "Linux",
4443
"includePath": [
4544
"${workspaceRoot}",
46-
"${workspaceRoot}/GDCpp",
4745
"${workspaceRoot}/GDJS",
4846
"${workspaceRoot}/Extensions",
4947
"${workspaceRoot}/Core",
@@ -70,7 +68,6 @@
7068
"name": "Win32",
7169
"includePath": [
7270
"${workspaceRoot}",
73-
"${workspaceRoot}/GDCpp",
7471
"${workspaceRoot}/GDJS",
7572
"${workspaceRoot}/Extensions",
7673
"${workspaceRoot}/Core",

Binaries/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
This is the directory where native or WebAssembly binaries of the C++ code of GDCore, GDCpp and GDJS are produced.
1+
This is the directory where native or WebAssembly binaries of the C++ code of GDCore and GDJS are produced.
22

33
See GDevelop.js README for the instructions to compile after a change in the C++ source code.

CMakeLists.txt

+2-11
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ macro(gd_set_option var default type docstring)
1414
endif()
1515
set(${var} ${${var}} CACHE ${type} ${docstring} FORCE)
1616
endmacro()
17-
gd_set_option(BUILD_CORE TRUE BOOL "TRUE to build GDevelop Core library, FALSE to use the already compiled binaries")
18-
gd_set_option(BUILD_GDCPP TRUE BOOL "TRUE to build GDevelop C++ Platform")
17+
gd_set_option(BUILD_CORE TRUE BOOL "TRUE to build GDevelop Core library")
1918
gd_set_option(BUILD_GDJS TRUE BOOL "TRUE to build GDevelop JS Platform")
2019
gd_set_option(BUILD_EXTENSIONS TRUE BOOL "TRUE to build the extensions")
2120
gd_set_option(BUILD_TESTS FALSE BOOL "TRUE to build the tests")
22-
gd_set_option(FULL_VERSION_NUMBER TRUE BOOL "TRUE to build GDevelop with its full version number (lastest tag + commit hash), FALSE to only use the lastest tag (avoid rebulding many source file when developping)")
2321

2422
# Disable deprecated code
2523
set(NO_GUI TRUE CACHE BOOL "" FORCE) #Force disable old GUI related code.
@@ -55,9 +53,6 @@ IF ("${CMAKE_BUILD_TYPE}" STREQUAL "")
5553
message( "CMAKE_BUILD_TYPE is empty, assuming build type is Release" )
5654
set(CMAKE_BUILD_TYPE Release)
5755
ENDIF()
58-
IF (EMSCRIPTEN)
59-
set(BUILD_GDCPP FALSE CACHE BOOL "" FORCE) #Force disable GDC++ when compiling with emscripten.
60-
ENDIF()
6156

6257
IF("${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
6358
SET(CMAKE_SHARED_LINKER_FLAGS "-s") #Force stripping to avoid errors when packaging for linux.
@@ -84,18 +79,14 @@ endif()
8479
set(GD_base_dir ${CMAKE_CURRENT_SOURCE_DIR})
8580

8681
#Add all the CMakeLists:
87-
ADD_SUBDIRECTORY(Version)
8882
ADD_SUBDIRECTORY(ExtLibs)
8983
IF(BUILD_CORE)
9084
ADD_SUBDIRECTORY(Core)
9185
ENDIF()
9286
IF(BUILD_GDJS)
9387
ADD_SUBDIRECTORY(GDJS)
9488
ENDIF()
95-
IF(BUILD_GDCPP)
96-
ADD_SUBDIRECTORY(GDCpp)
97-
ENDIF()
98-
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/GDevelop.js/CMakeLists.txt" AND EMSCRIPTEN)
89+
IF(EMSCRIPTEN)
9990
ADD_SUBDIRECTORY(GDevelop.js)
10091
ENDIF()
10192
IF(BUILD_EXTENSIONS)

Core/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ IF(EMSCRIPTEN)
5757
ELSE()
5858
add_library(GDCore SHARED ${source_files})
5959
ENDIF()
60-
add_dependencies(GDCore GDVersion)
6160
IF(EMSCRIPTEN)
6261
set_target_properties(GDCore PROPERTIES SUFFIX ".bc")
6362
ELSEIF(WIN32)

Core/GDCore/DocMainPage.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
*
1515
* \section other Other documentations
1616
*
17-
* GDevelop is architectured around a `Core` (this library), platforms (`GDJS`, `GDCpp`) and extensions (`Extensions` folder). The editor (`newIDE` folder) is using all of these libraries.
17+
* GDevelop is architectured around a `Core` (this library), a game engine (`GDJS`) and extensions (`Extensions` folder). The editor (`newIDE` folder) is using all of these libraries.
1818
*
19-
* - [Open GDevelop C++ Platform documentation](../GDCpp Documentation/index.html)
2019
* - [Open GDevelop JS Platform documentation](../GDJS Documentation/index.html)
2120
* - <a href="https://github.com/4ian/GDevelop/blob/master/newIDE/README.md">Getting started with the editor</a>
2221
* - <a href="https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md">Getting started with the extensions</a>

Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.h

+4-7
Original file line numberDiff line numberDiff line change
@@ -462,24 +462,21 @@ class GD_CORE_API EventsCodeGenerator {
462462
* Other standard parameters type that should be implemented by platforms:
463463
* - currentScene: Reference to the current runtime scene.
464464
* - objectList : a map containing lists of objects which are specified by the
465-
object name in another parameter. (C++: std::map <gd::String,
466-
std::vector<RuntimeObject*> *>). Example:
465+
object name in another parameter. Example:
467466
* \code
468467
AddExpression("Count", _("Object count"), _("Count the number of picked
469468
objects"), _("Objects"), "res/conditions/nbObjet.png")
470469
.AddParameter("objectList", _("Object"))
471-
.SetFunctionName("PickedObjectsCount").SetIncludeFile("GDCpp/Extensions/Builtin/ObjectTools.h");
470+
.SetFunctionName("getPickedObjectsCount");
472471
473472
* \endcode
474473
* - objectListWithoutPicking : Same as objectList but do not pick object if
475474
they are not already picked.
476-
* - objectPtr : Return a pointer to object specified by the object name in
477-
another parameter ( C++: RuntimeObject* ). Example:
475+
* - objectPtr : Return a reference to the object specified by the object name in
476+
another parameter. Example:
478477
* \code
479478
.AddParameter("object", _("Object"))
480479
.AddParameter("objectPtr", _("Target object"))
481-
//The called function will be called with this signature on the C++ platform:
482-
Function(gd::String, RuntimeObject*)
483480
* \endcode
484481
*/
485482
virtual gd::String GenerateParameterCodes(

Core/GDCore/Events/Event.h

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "GDCore/String.h"
1717
namespace gd {
1818
class EventsList;
19-
class MainFrameWrapper;
2019
class Project;
2120
class Layout;
2221
class EventsCodeGenerator;

Core/GDCore/Extensions/Builtin/AllBuiltinExtensions.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class GD_CORE_API BuiltinExtensionsImplementer {
3232
static void ImplementsExternalLayoutsExtension(
3333
gd::PlatformExtension& extension);
3434
static void ImplementsFileExtension(gd::PlatformExtension& extension);
35-
static void ImplementsJoystickExtension(gd::PlatformExtension& extension);
3635
static void ImplementsKeyboardExtension(gd::PlatformExtension& extension);
3736
static void ImplementsMathematicalToolsExtension(
3837
gd::PlatformExtension& extension);

Core/GDCore/Extensions/Builtin/JoystickExtension.cpp

-77
This file was deleted.

Core/GDCore/Extensions/Builtin/SpriteExtension/Sprite.cpp

+1-53
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <SFML/Graphics/Sprite.hpp>
88
#include <iostream>
99
#include "GDCore/Extensions/Builtin/SpriteExtension/Polygon2d.h"
10-
#include "GDCore/Project/ImageManager.h"
1110

1211
using namespace std;
1312

@@ -16,11 +15,7 @@ namespace gd {
1615
Point Sprite::badPoint("");
1716

1817
Sprite::Sprite()
19-
:
20-
#if !defined(EMSCRIPTEN)
21-
hasItsOwnImage(false),
22-
#endif
23-
automaticCollisionMask(true),
18+
: automaticCollisionMask(true),
2419
origine("origine"),
2520
centre("centre"),
2621
automaticCentre(true) {
@@ -73,36 +68,10 @@ Point& Sprite::GetPoint(const gd::String& name) {
7368

7469
bool Sprite::SetDefaultCenterPoint(bool enabled) {
7570
automaticCentre = enabled;
76-
77-
#if !defined(EMSCRIPTEN)
78-
if (automaticCentre)
79-
centre.SetXY(sfmlSprite.getLocalBounds().width / 2,
80-
sfmlSprite.getLocalBounds().height / 2);
81-
#endif
82-
8371
return true;
8472
}
8573

8674
std::vector<Polygon2d> Sprite::GetCollisionMask() const {
87-
// TODO(perf): Cache to avoid re-creating a mask at every call
88-
#if !defined(EMSCRIPTEN)
89-
if (automaticCollisionMask) {
90-
std::vector<Polygon2d> mask;
91-
92-
Polygon2d rectangle;
93-
rectangle.vertices.push_back(sf::Vector2f(0, 0));
94-
rectangle.vertices.push_back(
95-
sf::Vector2f(sfmlSprite.getLocalBounds().width, 0));
96-
rectangle.vertices.push_back(sf::Vector2f(
97-
sfmlSprite.getLocalBounds().width, sfmlSprite.getLocalBounds().height));
98-
rectangle.vertices.push_back(
99-
sf::Vector2f(0, sfmlSprite.getLocalBounds().height));
100-
101-
mask.push_back(rectangle);
102-
return mask;
103-
}
104-
#endif
105-
10675
return customCollisionMask;
10776
}
10877

@@ -111,25 +80,4 @@ void Sprite::SetCustomCollisionMask(
11180
customCollisionMask = collisionMask;
11281
}
11382

114-
#if !defined(EMSCRIPTEN)
115-
void Sprite::LoadImage(std::shared_ptr<SFMLTextureWrapper> image_) {
116-
sfmlImage = image_;
117-
sfmlSprite.setTexture(sfmlImage->texture, true);
118-
hasItsOwnImage = false;
119-
120-
if (automaticCentre)
121-
centre.SetXY(sfmlSprite.getLocalBounds().width / 2,
122-
sfmlSprite.getLocalBounds().height / 2);
123-
}
124-
125-
void Sprite::MakeSpriteOwnsItsImage() {
126-
if (!hasItsOwnImage || sfmlImage == std::shared_ptr<SFMLTextureWrapper>()) {
127-
sfmlImage = std::make_shared<SFMLTextureWrapper>(
128-
sfmlImage->texture); // Copy the texture.
129-
sfmlSprite.setTexture(sfmlImage->texture);
130-
hasItsOwnImage = true;
131-
}
132-
}
133-
#endif
134-
13583
} // namespace gd

0 commit comments

Comments
 (0)