mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
127 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f67206940e | ||
![]() |
bb69871c93 | ||
![]() |
6abfa19dd8 | ||
![]() |
f8cbd788a1 | ||
![]() |
5516c85f1d | ||
![]() |
dfc4f524fc | ||
![]() |
0b9728030a | ||
![]() |
8aeb7bfacb | ||
![]() |
966105fcc4 | ||
![]() |
51a6c935d9 | ||
![]() |
0d34568afc | ||
![]() |
b68d24e8e4 | ||
![]() |
13d5069bd3 | ||
![]() |
01372c9589 | ||
![]() |
e7498fd8f3 | ||
![]() |
846eceabdf | ||
![]() |
64692e405e | ||
![]() |
1adb4febb1 | ||
![]() |
ff24bf7af6 | ||
![]() |
d705f7503a | ||
![]() |
61b01aa1a1 | ||
![]() |
0296162cda | ||
![]() |
c11ffca94a | ||
![]() |
2fce1fc16f | ||
![]() |
2a3657abef | ||
![]() |
da4dc223f7 | ||
![]() |
eeb0dc8a63 | ||
![]() |
f6f56d77a0 | ||
![]() |
749c383fd7 | ||
![]() |
98c822bfb4 | ||
![]() |
2ed48d302d | ||
![]() |
7e7e93b94c | ||
![]() |
848df5aa5b | ||
![]() |
7a6f3ffe7c | ||
![]() |
21012c3445 | ||
![]() |
5485b28b19 | ||
![]() |
d313f13475 | ||
![]() |
a4e88bd504 | ||
![]() |
f446a75fd8 | ||
![]() |
e64bb8a6f7 | ||
![]() |
1cd4226427 | ||
![]() |
817fba1114 | ||
![]() |
37a0c3c919 | ||
![]() |
fc4b12803d | ||
![]() |
51f09d1bb6 | ||
![]() |
8ce9afff6b | ||
![]() |
84711a25c3 | ||
![]() |
d33042cece | ||
![]() |
719032f91d | ||
![]() |
73c0bf56c8 | ||
![]() |
acd8d54c5e | ||
![]() |
99b0c8345c | ||
![]() |
c97fea1a9e | ||
![]() |
cd7457eba8 | ||
![]() |
c9a0cc9afd | ||
![]() |
0f990cc913 | ||
![]() |
656921b9c8 | ||
![]() |
246bde6dec | ||
![]() |
d54eadf39d | ||
![]() |
3a2f6a2ac7 | ||
![]() |
feb243d2f7 | ||
![]() |
aea43b96d5 | ||
![]() |
64f077bcb2 | ||
![]() |
9e5893883f | ||
![]() |
99681bb89b | ||
![]() |
13dcc9a1bd | ||
![]() |
7eb96d97af | ||
![]() |
8e8b49f27d | ||
![]() |
226f67f114 | ||
![]() |
0c2600ccf4 | ||
![]() |
d3d37afea6 | ||
![]() |
507c23f401 | ||
![]() |
961513f81b | ||
![]() |
de45e12245 | ||
![]() |
746bdd0114 | ||
![]() |
8a0d0d332d | ||
![]() |
40be4153c2 | ||
![]() |
9bae415530 | ||
![]() |
fad17d7901 | ||
![]() |
35f857060c | ||
![]() |
90b8854ecf | ||
![]() |
cbb79a2d52 | ||
![]() |
116411a300 | ||
![]() |
7f3ef4002d | ||
![]() |
7ad5358451 | ||
![]() |
acd08be06a | ||
![]() |
12071e8645 | ||
![]() |
9aad6a89df | ||
![]() |
927632cd0f | ||
![]() |
f44d2ec219 | ||
![]() |
1006cf3fcb | ||
![]() |
fd8b6ce4ba | ||
![]() |
2dac7b12bb | ||
![]() |
cab91ebb8b | ||
![]() |
95709fbd4d | ||
![]() |
72a5d32979 | ||
![]() |
dca642ebb1 | ||
![]() |
d1b486f3cf | ||
![]() |
35c7328a48 | ||
![]() |
e68e814853 | ||
![]() |
117722621a | ||
![]() |
ce1c1c3cea | ||
![]() |
18626964eb | ||
![]() |
f2f40a4275 | ||
![]() |
77e4a1a614 | ||
![]() |
bec51c705b | ||
![]() |
3df427fb7c | ||
![]() |
7a6d549f53 | ||
![]() |
34981bd794 | ||
![]() |
c499817bed | ||
![]() |
f1be2948cf | ||
![]() |
976ea58f6b | ||
![]() |
12323965e0 | ||
![]() |
804e8c8718 | ||
![]() |
a549f220cb | ||
![]() |
452a4ec616 | ||
![]() |
1af2bb6023 | ||
![]() |
21dcb391b4 | ||
![]() |
8602bbfa51 | ||
![]() |
99e4c394fe | ||
![]() |
dc85bbacea | ||
![]() |
b24060f8d0 | ||
![]() |
40ba9526c4 | ||
![]() |
12106192b9 | ||
![]() |
d306c8f3fd | ||
![]() |
57c1b66a25 | ||
![]() |
54b6a7f295 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -50,6 +50,7 @@ Binaries/Packaging/logs
|
||||
!/Binaries/Output/Release_Linux/CppPlatform/
|
||||
/Binaries/**/MinGW32
|
||||
/Binaries/**/CppPlatform/Runtime
|
||||
/Binaries/**/CppPlatform/Sources
|
||||
/Binaries/**/CppPlatform/include
|
||||
/Binaries/**/CppPlatform/Extensions/include
|
||||
/Binaries/**/JsPlatform/Runtime
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "TextObject/TextObject.h" //but do not forget extensions includes
|
||||
#include <iostream>
|
||||
|
||||
|
Binary file not shown.
14824
Binaries/Output/Release_Windows/locale/de_DE/GD.po
Executable file → Normal file
14824
Binaries/Output/Release_Windows/locale/de_DE/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
13425
Binaries/Output/Release_Windows/locale/es_ES/GD.po
Executable file → Normal file
13425
Binaries/Output/Release_Windows/locale/es_ES/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
13255
Binaries/Output/Release_Windows/locale/fi_FI/GD.po
Executable file → Normal file
13255
Binaries/Output/Release_Windows/locale/fi_FI/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
14512
Binaries/Output/Release_Windows/locale/fr_FR/GD.po
Executable file → Normal file
14512
Binaries/Output/Release_Windows/locale/fr_FR/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
12979
Binaries/Output/Release_Windows/locale/it_IT/GD.po
Executable file → Normal file
12979
Binaries/Output/Release_Windows/locale/it_IT/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
13248
Binaries/Output/Release_Windows/locale/nl_NL/GD.po
Executable file → Normal file
13248
Binaries/Output/Release_Windows/locale/nl_NL/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
17380
Binaries/Output/Release_Windows/locale/pl_PL/GD.po
Executable file → Normal file
17380
Binaries/Output/Release_Windows/locale/pl_PL/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
13296
Binaries/Output/Release_Windows/locale/pt_PT/GD.po
Executable file → Normal file
13296
Binaries/Output/Release_Windows/locale/pt_PT/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
13406
Binaries/Output/Release_Windows/locale/ru_RU/GD.po
Executable file → Normal file
13406
Binaries/Output/Release_Windows/locale/ru_RU/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
17479
Binaries/Output/Release_Windows/locale/zh_CN/GD.po
Executable file → Normal file
17479
Binaries/Output/Release_Windows/locale/zh_CN/GD.po
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,9 +40,9 @@ IF "%SKIPINSTALLER%"=="1" echo (Skipped)
|
||||
|
||||
echo.
|
||||
echo --Creating archive...
|
||||
if exist Releases\gd3xxxx.zip (del Releases\gd3xxxx.zip)
|
||||
if exist Releases\gd4xxxx.7z (del Releases\gd4xxxx.7z)
|
||||
cd Output\Release_Windows\
|
||||
IF NOT "%SKIPINSTALLERANDARCHIVE%"=="1" "..\..\..\ExtLibs\7za.exe" a ..\..\Releases\gd3xxxx.zip * > ..\..\Packaging\logs\zipArchiveLog.txt
|
||||
IF NOT "%SKIPINSTALLERANDARCHIVE%"=="1" "..\..\..\ExtLibs\7za.exe" a ..\..\Releases\gd4xxxx.7z * > ..\..\Packaging\logs\7zArchiveLog.txt
|
||||
IF "%SKIPINSTALLERANDARCHIVE%"=="1" echo (Skipped)
|
||||
cd ..\..\..
|
||||
|
||||
@@ -50,4 +50,4 @@ echo. >CON
|
||||
echo Finished. Do not forget to : >CON
|
||||
echo -Update news.txt >CON
|
||||
echo -Update pad file >CON
|
||||
pause >CON
|
||||
pause >CON
|
||||
|
@@ -13,7 +13,7 @@ AllowNoIcons=yes
|
||||
LicenseFile=..\Output\Release_Windows\License-en.rtf
|
||||
InfoBeforeFile=..\Output\Release_Windows\Informations-en.rtf
|
||||
OutputDir=.\
|
||||
OutputBaseFilename=gd4083
|
||||
OutputBaseFilename=gd4090
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
SetupIconFile=..\Output\Release_Windows\res\icon.ico
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<News>
|
||||
<Version Major="4" Minor="0" Build="88" Revision="0"/>
|
||||
<Info Info="La version 4.0.88 est disponible.

Importants changements en interne pour supporter l'Unicode dans les jeux, c'est <20> dire la possibilit<69> de pouvoir utiliser des charact<63>res de d'autres alphabets.
Nouvel objet AdMob, pour afficher des banni<6E>res publicitaires (ou <20>crans interstitiels) dans les jeux HTML5 export<72>s sur Android/iOS avec Intel XDK.
Les automatismes sont maintenant appel<65>s des Comportements (Behavior en anglais).
Nouvelle fonctionnalit<69>, la 'pile de sc<73>nes' : une nouvelle action permet de mettre en pause la sc<73>ne courante et d'en lancer une autre. On peut ensuite revenir <20> la sc<73>ne pr<70>c<EFBFBD>dente avec une autre action. Id<49>al pour faire des menus de pause, des <20>crans de combats, des <20>crans d'int<6E>rieurs de batiments..
Am<41>lioration de l'export des jeux HTML5 pour Cordova/Intel XDK.
Nouvel <20>diteur pour les objets textes
Ajout de la fonctionnalit<69> 'Sauvegarder en tant que projet dossier': les projets peuvent <20>tre sauvegard<72>s avec les sc<73>nes, <20>v<EFBFBD>nements externes et agencements externes sauvegard<72>s dans diff<66>rents fichiers. Cela rend beaucoup plus facile la collaboration dans une <20>quipe.
L'appui sur Shift dans l'<27>diteur de sc<73>ne permet de redimensionner un objet en gardant ses proportions.
L'appui sur Shift dans l'<27>diteur de sc<73>ne permet de tourner un objet par incr<63>ment r<>guliers de 15 degr<67>s.
La grille aimant<6E>e de l'<27>diteur de sc<73>ne s'applique aussi lors du redimensionnement d'objets.
Am<41>lioration de l'objet Carte de Tuiles, notamment une baisse de la consommation m<>moire pour les grandes cartes.
Am<41>lioration pour les <20>crans haute d<>finition ('retina').
Plusieurs corrections de bugs pour la recherche de chemin, qui devrait maintenant fonctionner correctement dans tous les cas.
Correction de la recherche dans l'<27>diteur d'objets.
Correction de la condition sur la bordure suppl<70>mentaire du comportement 'D<>truire <20> la sortie de l'<27>cran'
Nouvel d<>mo utilisant les fonctionnalit<EFBFBD>s Javascript 'PIXI Particles'
Correction dans l'<27>diteur de sc<73>ne o<> les objets sur des calques cach<63>s pouvaient encore <20>tre selectionn<6E>s.
Am<41>lioration et nettoyage du code en interne.
Corrections pour Mac OS X dans l'<27>diteur de sc<73>ne.
Suppression de la compilation en un fichier unique (trop instable et detect<63> comme un virus par certains antivirus).
Ajout du support pour les molettes <20> d<>filement horizontal dans l'<27>diteur de sc<73>ne.
Divers bugs corrig<69>s." Lien="http://compilgames.net"/>
|
||||
<CommunityNews text="GDevApp est une web app de cr<EFBFBD>ation de jeux bas<EFBFBD>e sur GDevelop : venez essayer la plus avanc<EFBFBD>e des applications online de cr<EFBFBD>ation de jeux. Compatible avec les tablettes et fournie avec des superbes packs de graphismes pr<EFBFBD>-pr<EFBFBD>par<EFBFBD>s." link1="https://github.com/4ian/GD" linkLabel1="GDevelop sur GitHub" link2="https://gdevapp.com?utm_source=software&utm_medium=link_fr&utm_campaign=launch" linkLabel2="Tester GDevApp, la nouvelle app de cr<EFBFBD>ation de jeux"/>
|
||||
<Version Major="4" Minor="0" Build="89" Revision="0"/>
|
||||
<Info Info="La version 4.0.89 est disponible.

Ajout des traductions en Néerlandais et Finnois.
Correction de la position par défaut des bannières AdMob.
Amélioration et changements en interne.
Correction de la condition 'Toujours' pour les jeux HTML5
Correction d'un crash avec l'objet Carte de Tuiles lors de l'utilisation d'une image vide.
Support de l'importation des fichiers TMX (créés avec Tiled Map Editor: http://www.mapeditor.org/) pour les objets Carte de Tuiles.
Correction des actions de stockage qui n'enregistrait pas les données dans certaines conditions.
Amélioration des performances de l'objet Panneau pour les jeux HTML5.
Mise à jour du moteur de rendu des jeux HTML5 (pixi.js v3.0.8)
Les fichiers Audio peuvent maintenant être ajoutés comme des ressources pour les précharger dans les jeux HTML5.
Amélioration des performances des musiques des jeux HTML5 sur Android
Correction pour les jeux natifs qui ne se lançaient pas dans les répertoires avec des caractères spéciaux.
Correction de problèmes avec l'éditeur d'agencements externes.
Correction d'une erreur 404 lors de l'aperçu de jeux HTML5 sur les distributions linux récentes." Lien="http://compilgames.net"/>
|
||||
<CommunityNews text="GDevApp est une web app de création de jeux basée sur GDevelop : venez essayer la plus avancée des applications online de création de jeux. Compatible avec les tablettes et fournie avec des superbes packs de graphismes pré-préparés." link1="https://github.com/4ian/GD" linkLabel1="GDevelop sur GitHub" link2="https://gdevapp.com?utm_source=software&utm_medium=link_fr&utm_campaign=launch" linkLabel2="Tester GDevApp, la nouvelle app de création de jeux"/>
|
||||
</News>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<News>
|
||||
<Version Major="4" Minor="0" Build="88" Revision="0"/>
|
||||
<Info Info="Version 4.0.88 is available.

Huge internal changes to have multi-language support ('Unicode') in games.
New AdMob object, that can be used to display ad banners (or interstitial screens) in HTML5 games exported to iOS/Android with Intel XDK.
Automatisms are now called Behaviors for objects (more intuitive and easier to understand).
New scene stacking feature: a new action allows to pause the current scene and launch a new one. You can then go back to the previous one with another action. This makes it easy to create a pause menu, a RPG combat system, rooms/building that you enter from a map...
Improved export of HTML5 games to Cordova/Intel XDK.
New editor for text objects
Add 'Save as a folder project': projects can be saved with scenes, external events and external layouts stored in a different file for each. This makes it easier to collaborate on a game as a team.
Hold Shift in scene editor to resize object while keeping its aspect ratio.
Hold Shift in scene editor to rotate an object in increments.
'Snap to grid' now snaps objects when resizing them in scene editor.
Improvements on TileMap objects, including a reduced memory consumption for large maps.
Improvements for HDPI ('retina') screens.
Several bugfixes for pathfinding that should now work properly in all cases.
Fixed search not working in the objects editor.
Fixed extra border condition of Destroy Outside Behavior.
New PIXI Particles advanced Javascript demo.
Fixed objects from hidden layers could still be selected and moved in scene editor
Internal code cleaning and improvements.
Fixes for Mac OS X in the scene editor.
Removed compilation of native games to a single file executable (was too unstable and prone to antivirus blocking).
Add support for horizontal mouse wheel in the scene editor.
Fixed Vertical Synchronization and framerate limit not applied after changing the window resolution in native games
Fix small bug in Destroy Outside behavior of HTML5 games
Add an option to repeat borders and center textures of PanelSprite objects for HTML5 games
Improve performances of PanelSprite objects for HTML5 games
Fix hitboxes collision condition for HTML5 games
Fix conflicts when exporting a game using different images with the same file name.
Fix error when deactivating a behavior of an object that was just created.
Fix scene editor not properly refreshed after being resized on OS X." Lien="http://compilgames.net"/>
|
||||
<Version Major="4" Minor="0" Build="89" Revision="0"/>
|
||||
<Info Info="Version 4.0.89 is available.

Add complete Dutch translation
Add Finnish translation
Fix AdMob object banner default position being top of the screen
Internal changes and improvements
Fix 'Always' condition for HTML5 games
Fix tilemap object crash when using an empty image
Add support for importing TMX files (created with Tiled Map Editor: http://www.mapeditor.org/) in TiledMap objects.
Fix storage actions not properly persisting values in some cases
Improve performance of PanelSprite (9-patch) object for HTML5 games.
Update the rendering engine of HTML5 games, pixi.js, to v3.0.8
Audio files can be added as resources (like images) to preload them in HTML5 games
Enhance performance of musics on Android
Fix native games not launching properly when put in a directory containing unicode characters.
Fix issues with external layouts editors.
Wording fixes
Fix 404 error when previewing a HTML5 game on recent linux distributions." Lien="http://compilgames.net"/>
|
||||
<CommunityNews text="GDevelop has a new website! Help us to translate it to your language by going on the Crowdin project.

GDevApp is an online game creator based on GDevelop: Go try the most advanced game creation web app. Compatible with tablets and bundled with awesome graphics assets." link1="https://crowdin.com/project/gdevelop-website/" linkLabel1="Help translate GD website" link2="https://gdevapp.com?utm_source=software&utm_medium=link_en&utm_campaign=launch" linkLabel2="Try GDevApp, the online game creator based on GD"/>
|
||||
</News>
|
||||
|
@@ -337,7 +337,7 @@ make -j4
|
||||
* \section platformstructure Structure of a platform
|
||||
*
|
||||
* A platform for GDevelop Core is a class inheriting from gd::Platform.<br>
|
||||
* They contains the extensions of the platform (see below) and offer various methods, like gd::Platform::GetProjectExporter which
|
||||
* They contains the extensions of the platform (see below) and offer various methods, like gd::Platform::GetProjectExporters which
|
||||
* is called by the IDE to export a gd::Project to a stand-alone game.
|
||||
*
|
||||
* \subsection platformloading Platforms loading
|
||||
@@ -406,7 +406,7 @@ str += " world";
|
||||
str += " " + gd::String::From(2);
|
||||
//str now contains "Hello world 2";
|
||||
|
||||
gd::string twopointfiveStr = "2.5";
|
||||
gd::String twopointfiveStr = "2.5";
|
||||
double twopointfive = twopointfive.To<double>();
|
||||
//twopointfive == 2.5
|
||||
\endcode
|
||||
@@ -499,30 +499,22 @@ Actions are declared like this :
|
||||
* Adding an object is made using gd::PlatformExtension::AddObject method.
|
||||
*
|
||||
* \code
|
||||
gd::ObjectMetadata & obj = AddObject("Name",
|
||||
gd::ObjectMetadata & obj = AddObject<MyObject>(
|
||||
"Name",
|
||||
_("Name displayed to users"),
|
||||
_("Description"),
|
||||
"path-to-a-32-by-32-icon.png",
|
||||
&FunctionForCreatingTheObject);
|
||||
* \endcode
|
||||
*
|
||||
* *FunctionForCreatingTheObject* is a function that must just create the object. It should look like this:
|
||||
*
|
||||
* \code
|
||||
gd::Object * CreateTextObject(std::string name)
|
||||
{
|
||||
return new TextObject(name);
|
||||
}
|
||||
"path-to-a-32-by-32-icon.png");
|
||||
* \endcode
|
||||
*
|
||||
* The *C++ platform* also requires that you call *AddRuntimeObject* to declare the RuntimeObject class associated to the object being declared:<br>
|
||||
* You must pass as parameter the name of the class inheriting from RuntimeObject and a function used to create an instance of the
|
||||
* RuntimeObject.
|
||||
* It has two template parameters: the first one is the corresponding object class declared with *AddObject* (class inheriting from *gd::Object*) and the
|
||||
* second one is the *RuntimeObject* class.
|
||||
* You must pass as parameter the metadata from the object previously declared and the name of the class inheriting from RuntimeObject.
|
||||
*
|
||||
* You will also want to specify the .h file associated to the object using gd::ObjectMetadata::SetIncludeFile. For example:
|
||||
* \code
|
||||
//obj is the gd::ObjectMetadata returned when you called AddObject.
|
||||
AddRuntimeObject(obj, "RuntimeTextObject", CreateRuntimeTextObject);
|
||||
AddRuntimeObject<TextObject, RuntimeTextObject>(obj, "RuntimeTextObject");
|
||||
obj.SetIncludeFile("TextObject/TextObject.h");
|
||||
* \endcode
|
||||
*
|
||||
@@ -785,5 +777,3 @@ extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() {
|
||||
* \brief Part of the tinyxml library
|
||||
* \ingroup TinyXml
|
||||
*/
|
||||
|
||||
|
||||
|
@@ -19,11 +19,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
|
||||
"Florian Rival",
|
||||
"Open source (MIT License)");
|
||||
|
||||
gd::ObjectMetadata & obj = extension.AddObject("",
|
||||
gd::ObjectMetadata & obj = extension.AddObject<gd::Object>("",
|
||||
_("Base object"),
|
||||
_("Base object"),
|
||||
"res/objeticon24.png",
|
||||
&CreateBaseObject);
|
||||
"res/objeticon24.png");
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
obj.AddCondition("PosX",
|
||||
|
@@ -20,11 +20,11 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSpriteExtension(gd::Pla
|
||||
"Florian Rival",
|
||||
"Open source (MIT License)");
|
||||
|
||||
gd::ObjectMetadata & obj = extension.AddObject("Sprite",
|
||||
gd::ObjectMetadata & obj = extension.AddObject<SpriteObject>(
|
||||
"Sprite",
|
||||
_("Sprite"),
|
||||
_("Animated object which can be used for most elements of a game"),
|
||||
"CppPlatform/Extensions/spriteicon.png",
|
||||
&CreateSpriteObject);
|
||||
"CppPlatform/Extensions/spriteicon.png");
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
obj.AddAction("Opacity",
|
||||
|
@@ -292,13 +292,4 @@ void SpriteObject::SwapAnimations(std::size_t firstIndex, std::size_t secondInde
|
||||
std::swap(animations[firstIndex], animations[secondIndex]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function creating an extension Object.
|
||||
* GDevelop can not directly create an extension object
|
||||
*/
|
||||
gd::Object * CreateSpriteObject(gd::String name)
|
||||
{
|
||||
return new SpriteObject(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -128,7 +128,5 @@ private:
|
||||
static Animation badAnimation; //< Bad animation when an out of bound animation is requested.
|
||||
};
|
||||
|
||||
GD_CORE_API gd::Object * CreateSpriteObject(gd::String name);
|
||||
|
||||
}
|
||||
#endif // GDCORE_SPRITEOBJECT_H
|
||||
|
@@ -95,16 +95,16 @@ std::shared_ptr<gd::Object> Platform::CreateObject(gd::String type, const gd::St
|
||||
return std::shared_ptr<gd::Object> (object);
|
||||
}
|
||||
|
||||
gd::Behavior* Platform::CreateBehavior(const gd::String & behaviorType) const
|
||||
std::unique_ptr<gd::Behavior> Platform::CreateBehavior(const gd::String & behaviorType) const
|
||||
{
|
||||
for (std::size_t i =0;i<extensionsLoaded.size();++i)
|
||||
{
|
||||
Behavior* behavior = extensionsLoaded[i]->CreateBehavior(behaviorType);
|
||||
if ( behavior != NULL )
|
||||
std::unique_ptr<gd::Behavior> behavior = extensionsLoaded[i]->CreateBehavior(behaviorType);
|
||||
if ( behavior )
|
||||
return behavior;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<gd::BehaviorsSharedData> Platform::CreateBehaviorSharedDatas(const gd::String & behaviorType) const
|
||||
@@ -138,9 +138,9 @@ std::shared_ptr<gd::LayoutEditorPreviewer> Platform::GetLayoutPreviewer(gd::Layo
|
||||
return std::shared_ptr<gd::LayoutEditorPreviewer>(new gd::LayoutEditorPreviewer);
|
||||
}
|
||||
|
||||
std::shared_ptr<gd::ProjectExporter> Platform::GetProjectExporter() const
|
||||
std::vector<std::shared_ptr<gd::ProjectExporter>> Platform::GetProjectExporters() const
|
||||
{
|
||||
return std::shared_ptr<gd::ProjectExporter>(new gd::ProjectExporter);
|
||||
return std::vector<std::shared_ptr<gd::ProjectExporter>>{std::shared_ptr<gd::ProjectExporter>(new gd::ProjectExporter)};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -6,10 +6,10 @@
|
||||
|
||||
#ifndef GDCORE_PLATFORM_H
|
||||
#define GDCORE_PLATFORM_H
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "GDCore/String.h"
|
||||
#include <map>
|
||||
#include "GDCore/Project/ChangesNotifier.h"
|
||||
#include "GDCore/Project/LayoutEditorPreviewer.h"
|
||||
namespace gd { class InstructionsMetadataHolder; }
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
/**
|
||||
* \brief Create a behavior
|
||||
*/
|
||||
gd::Behavior* CreateBehavior(const gd::String & type) const;
|
||||
std::unique_ptr<gd::Behavior> CreateBehavior(const gd::String & type) const;
|
||||
|
||||
/**
|
||||
* \brief Create a behavior shared data object.
|
||||
@@ -169,12 +169,12 @@ public:
|
||||
virtual std::shared_ptr<gd::LayoutEditorPreviewer> GetLayoutPreviewer(gd::LayoutEditorCanvas & editor) const;
|
||||
|
||||
/**
|
||||
* \brief Must provide a gd::ProjectExporter object that will be used
|
||||
* \brief Must provide at least one gd::ProjectExporter object that will be used
|
||||
* by the IDE to export the project so as to be used without the IDE.
|
||||
*
|
||||
* The default implementation simply return a gd::ProjectExporter object doing nothing.
|
||||
* The default implementation simply return a vector containing a gd::ProjectExporter object doing nothing.
|
||||
*/
|
||||
virtual std::shared_ptr<gd::ProjectExporter> GetProjectExporter() const;
|
||||
virtual std::vector<std::shared_ptr<gd::ProjectExporter>> GetProjectExporters() const;
|
||||
#endif
|
||||
///@}
|
||||
|
||||
|
@@ -85,17 +85,6 @@ gd::ExpressionMetadata & PlatformExtension::AddStrExpression(const gd::String &
|
||||
#endif
|
||||
}
|
||||
|
||||
gd::ObjectMetadata & PlatformExtension::AddObject(const gd::String & name,
|
||||
const gd::String & fullname,
|
||||
const gd::String & informations,
|
||||
const gd::String & icon24x24,
|
||||
CreateFunPtr createFunPtrP)
|
||||
{
|
||||
gd::String nameWithNamespace = GetNameSpace().empty() ? name : GetNameSpace()+name;
|
||||
objectsInfos[nameWithNamespace] = ObjectMetadata(GetNameSpace(), nameWithNamespace, fullname, informations, icon24x24, createFunPtrP);
|
||||
return objectsInfos[nameWithNamespace];
|
||||
}
|
||||
|
||||
gd::BehaviorMetadata & PlatformExtension::AddBehavior(const gd::String & name,
|
||||
const gd::String & fullname,
|
||||
const gd::String & defaultName,
|
||||
@@ -294,12 +283,12 @@ CreateFunPtr PlatformExtension::GetObjectCreationFunctionPtr(gd::String objectTy
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Behavior* PlatformExtension::CreateBehavior(gd::String type) const
|
||||
std::unique_ptr<gd::Behavior> PlatformExtension::CreateBehavior(gd::String type) const
|
||||
{
|
||||
if ( behaviorsInfo.find(type) != behaviorsInfo.end())
|
||||
return behaviorsInfo.find(type)->second.Get()->Clone();
|
||||
return std::unique_ptr<gd::Behavior>(behaviorsInfo.find(type)->second.Get()->Clone());
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* GDevelop Core
|
||||
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
|
||||
* Copyright 2016 Victor Levasseur (victorlevasseur52@gmail.com)
|
||||
* This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
@@ -12,6 +13,7 @@
|
||||
#include "GDCore/Extensions/Metadata/ObjectMetadata.h"
|
||||
#include "GDCore/Extensions/Metadata/BehaviorMetadata.h"
|
||||
#include "GDCore/Extensions/Metadata/EventMetadata.h"
|
||||
#include "GDCore/CommonTools.h"
|
||||
#include "GDCore/String.h"
|
||||
namespace gd { class Instruction; }
|
||||
namespace gd { class InstructionMetadata; }
|
||||
@@ -138,26 +140,19 @@ public:
|
||||
/**
|
||||
* \brief Declare a new object as being part of the extension.
|
||||
* \note This method does nothing when used for GD C++ runtime.
|
||||
* \tparam T the declared class inherited from *gd::Object*
|
||||
* \param name The name of the object
|
||||
* \param fullname The user friendly name of the object
|
||||
* \param description The user friendly description of the object
|
||||
* \param icon The 24x24 icon of the object: res/icons_[SkinName]/[iconName]24.png will be first tried,
|
||||
* and then if it does not exists, the full entered name will be tried.
|
||||
* \param createFunPtr The name of the function that create the object
|
||||
*
|
||||
* Example of the create function:
|
||||
\code
|
||||
gd::Object * CreateMyObject(gd::String name)
|
||||
{
|
||||
return new MyObject(name);
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
template<class T>
|
||||
gd::ObjectMetadata & AddObject(const gd::String & name_,
|
||||
const gd::String & fullname_,
|
||||
const gd::String & description_,
|
||||
const gd::String & icon24x24_,
|
||||
CreateFunPtr createFunPtrP);
|
||||
const gd::String & icon24x24_);
|
||||
|
||||
/**
|
||||
* \brief Declare a new behavior as being part of the extension.
|
||||
@@ -259,7 +254,7 @@ public:
|
||||
*
|
||||
* Return NULL if \a behaviorType is not provided by the extension.
|
||||
*/
|
||||
gd::Behavior* CreateBehavior(gd::String behaviorType) const;
|
||||
std::unique_ptr<gd::Behavior> CreateBehavior(gd::String behaviorType) const;
|
||||
|
||||
/**
|
||||
* \brief Create shared data for a behavior
|
||||
@@ -461,4 +456,6 @@ private:
|
||||
|
||||
#endif
|
||||
|
||||
#include "GDCore/Extensions/PlatformExtension.inl"
|
||||
|
||||
#endif // GDCORE_PLATFORMEXTENSION_H
|
||||
|
34
Core/GDCore/Extensions/PlatformExtension.inl
Normal file
34
Core/GDCore/Extensions/PlatformExtension.inl
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* GDevelop Core
|
||||
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
|
||||
* Copyright 2016 Victor Levasseur (victorlevasseur52@gmail.com)
|
||||
* This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
#ifndef GDCORE_PLATFORMEXTENSION_INL
|
||||
#define GDCORE_PLATFORMEXTENSION_INL
|
||||
|
||||
namespace gd
|
||||
{
|
||||
|
||||
template<class T>
|
||||
gd::ObjectMetadata & PlatformExtension::AddObject(const gd::String & name,
|
||||
const gd::String & fullname, const gd::String & description,
|
||||
const gd::String & icon24x24)
|
||||
{
|
||||
gd::String nameWithNamespace = GetNameSpace().empty() ? name : GetNameSpace()+name;
|
||||
objectsInfos[nameWithNamespace] = ObjectMetadata(
|
||||
GetNameSpace(),
|
||||
nameWithNamespace,
|
||||
fullname,
|
||||
informations,
|
||||
icon24x24,
|
||||
[](gd::String name) -> gd::Object* { return new T(name); }
|
||||
);
|
||||
|
||||
return objectsInfos[nameWithNamespace];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@@ -149,15 +149,15 @@ LayoutEditorCanvas::LayoutEditorCanvas(wxWindow* parent, gd::Project & project_,
|
||||
|
||||
//...and pass it to the sf::RenderWindow.
|
||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||
sf::RenderWindow::create(GDK_WINDOW_XID(win));
|
||||
sf::RenderWindow::create(GDK_WINDOW_XID(win), sf::ContextSettings(24, 8));
|
||||
#else
|
||||
sf::RenderWindow::create(GDK_WINDOW_XWINDOW(win));
|
||||
sf::RenderWindow::create(GDK_WINDOW_XWINDOW(win), sf::ContextSettings(24, 8));
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// Tested under Windows XP only (should work with X11 and other Windows versions - no idea about MacOS)
|
||||
sf::RenderWindow::create(static_cast<sf::WindowHandle>(GetHandle()));
|
||||
sf::RenderWindow::create(static_cast<sf::WindowHandle>(GetHandle()), sf::ContextSettings(24, 8));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -575,6 +575,14 @@ void LayoutEditorCanvas::UpdateContextMenu()
|
||||
if ( selectedInstances.empty() ) return;
|
||||
|
||||
//Can we send the objects on a higher layer ?
|
||||
std::size_t highestLayer = 0;
|
||||
for (auto & it : selectedInstances)
|
||||
{
|
||||
if (it.first == NULL) continue;
|
||||
highestLayer = std::max(highestLayer, layout.GetLayerPosition(it.first->GetLayer()));
|
||||
}
|
||||
|
||||
//Can we send the objects on a lower layer ?
|
||||
std::size_t lowestLayer = layout.GetLayersCount()-1;
|
||||
for (auto & it : selectedInstances)
|
||||
{
|
||||
@@ -585,29 +593,21 @@ void LayoutEditorCanvas::UpdateContextMenu()
|
||||
if (wxMenuItem * layerUpItem = contextMenu.FindItem(ID_LAYERUPMENU))
|
||||
{
|
||||
layerUpItem->Enable(false);
|
||||
if ( lowestLayer+1 < layout.GetLayersCount() )
|
||||
if ( highestLayer+1 < layout.GetLayersCount() )
|
||||
{
|
||||
gd::String name = layout.GetLayer(lowestLayer+1).GetName();
|
||||
gd::String name = layout.GetLayer(highestLayer+1).GetName();
|
||||
if ( name == "" ) name = _("Base layer");
|
||||
layerUpItem->Enable(true);
|
||||
layerUpItem->SetItemLabel(_("Put the object(s) on the layer \"") + name + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
//Can we send the objects on a lower layer ?
|
||||
std::size_t highestLayer = 0;
|
||||
for (auto & it : selectedInstances)
|
||||
{
|
||||
if (it.first == NULL) continue;
|
||||
highestLayer = std::max(highestLayer, layout.GetLayerPosition(it.first->GetLayer()));
|
||||
}
|
||||
|
||||
if (wxMenuItem * layerDownItem = contextMenu.FindItem(ID_LAYERUPMENU))
|
||||
if (wxMenuItem * layerDownItem = contextMenu.FindItem(ID_LAYERDOWNMENU))
|
||||
{
|
||||
layerDownItem->Enable(false);
|
||||
if ( highestLayer >= 1 )
|
||||
if ( lowestLayer >= 1 )
|
||||
{
|
||||
gd::String name = layout.GetLayer(highestLayer-1).GetName();
|
||||
gd::String name = layout.GetLayer(lowestLayer-1).GetName();
|
||||
if ( name == "" ) name = _("Base layer");
|
||||
|
||||
layerDownItem->Enable(true);
|
||||
|
@@ -189,14 +189,18 @@ OpenGLTextureWrapper::OpenGLTextureWrapper(std::shared_ptr<SFMLTextureWrapper> s
|
||||
{
|
||||
sfmlTexture = sfmlTexture_;
|
||||
|
||||
#if !defined(ANDROID) //TODO: OpenGL
|
||||
glGenTextures(1, &texture);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, sfmlTexture->image.getSize().x, sfmlTexture->image.getSize().y, GL_RGBA, GL_UNSIGNED_BYTE, sfmlTexture->image.getPixelsPtr());
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
#endif
|
||||
}
|
||||
|
||||
OpenGLTextureWrapper::~OpenGLTextureWrapper()
|
||||
{
|
||||
#if !defined(ANDROID) //TODO: OpenGL
|
||||
glDeleteTextures(1, &texture);
|
||||
#endif
|
||||
};
|
||||
|
@@ -21,9 +21,7 @@ namespace gd
|
||||
|
||||
Object::~Object()
|
||||
{
|
||||
//Do not forget to delete behaviors which are managed using raw pointers.
|
||||
for (std::map<gd::String, Behavior* >::const_iterator it = behaviors.begin() ; it != behaviors.end(); ++it )
|
||||
delete it->second;
|
||||
|
||||
}
|
||||
|
||||
Object::Object(const gd::String & name_) :
|
||||
@@ -37,13 +35,9 @@ void Object::Init(const gd::Object & object)
|
||||
type = object.type;
|
||||
objectVariables = object.objectVariables;
|
||||
|
||||
//Do not forget to delete behaviors which are managed using raw pointers.
|
||||
for (std::map<gd::String, Behavior* >::const_iterator it = behaviors.begin() ; it != behaviors.end(); ++it )
|
||||
delete it->second;
|
||||
|
||||
behaviors.clear();
|
||||
for (std::map<gd::String, Behavior* >::const_iterator it = object.behaviors.begin() ; it != object.behaviors.end(); ++it )
|
||||
behaviors[it->first] = it->second->Clone();
|
||||
for (auto it = object.behaviors.cbegin() ; it != object.behaviors.cend(); ++it )
|
||||
behaviors[it->first] = std::unique_ptr<Behavior>(it->second->Clone());
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +45,7 @@ std::vector < gd::String > Object::GetAllBehaviorNames() const
|
||||
{
|
||||
std::vector < gd::String > allNameIdentifiers;
|
||||
|
||||
for (std::map<gd::String, Behavior* >::const_iterator it = behaviors.begin() ; it != behaviors.end(); ++it )
|
||||
for (std::map<gd::String, std::unique_ptr<gd::Behavior> >::const_iterator it = behaviors.begin() ; it != behaviors.end(); ++it )
|
||||
allNameIdentifiers.push_back(it->first);
|
||||
|
||||
return allNameIdentifiers;
|
||||
@@ -59,9 +53,6 @@ std::vector < gd::String > Object::GetAllBehaviorNames() const
|
||||
|
||||
void Object::RemoveBehavior(const gd::String & name)
|
||||
{
|
||||
//Do not forget to delete behaviors which are managed using raw pointers.
|
||||
delete(behaviors[name]);
|
||||
|
||||
behaviors.erase(name);
|
||||
}
|
||||
|
||||
@@ -70,10 +61,10 @@ bool Object::RenameBehavior(const gd::String & name, const gd::String & newName)
|
||||
if ( behaviors.find(name) == behaviors.end()
|
||||
|| behaviors.find(newName) != behaviors.end() ) return false;
|
||||
|
||||
Behavior * aut = behaviors.find(name)->second;
|
||||
std::unique_ptr<Behavior> aut = std::move(behaviors.find(name)->second);
|
||||
behaviors.erase(name);
|
||||
behaviors[newName] = aut;
|
||||
aut->SetName(newName);
|
||||
behaviors[newName] = std::move(aut);
|
||||
behaviors[newName]->SetName(newName);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -95,8 +86,9 @@ bool Object::HasBehaviorNamed(const gd::String & name) const
|
||||
|
||||
bool Object::AddBehavior(Behavior * behavior)
|
||||
{
|
||||
if (behavior && !HasBehaviorNamed(behavior->GetName())) {
|
||||
behaviors[behavior->GetName()] = behavior;
|
||||
if (behavior && !HasBehaviorNamed(behavior->GetName()))
|
||||
{
|
||||
behaviors[behavior->GetName()] = std::unique_ptr<Behavior>(behavior);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -112,14 +104,18 @@ std::map<gd::String, gd::PropertyDescriptor> Object::GetProperties(gd::Project &
|
||||
|
||||
gd::Behavior * Object::AddNewBehavior(gd::Project & project, const gd::String & type, const gd::String & name)
|
||||
{
|
||||
Behavior * behavior = project.GetCurrentPlatform().CreateBehavior(type);
|
||||
std::unique_ptr<gd::Behavior> behavior = project.GetCurrentPlatform().CreateBehavior(type);
|
||||
|
||||
if ( behavior != NULL ) {
|
||||
if ( behavior )
|
||||
{
|
||||
behavior->SetName(name);
|
||||
behaviors[behavior->GetName()] = behavior;
|
||||
behaviors[name] = std::move(behavior);
|
||||
return behaviors[name].get();
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return behavior;
|
||||
}
|
||||
|
||||
sf::Vector2f Object::GetInitialInstanceDefaultSize(gd::InitialInstance & instance, gd::Project & project, gd::Layout & layout) const
|
||||
@@ -170,12 +166,12 @@ void Object::UnserializeFrom(gd::Project & project, const SerializerElement & el
|
||||
.FindAndReplace("Automatism", "Behavior");
|
||||
gd::String autoName = behaviorElement.GetStringAttribute("name", "", "Name");
|
||||
|
||||
Behavior* behavior = project.CreateBehavior(autoType);
|
||||
if ( behavior != NULL )
|
||||
std::unique_ptr<Behavior> behavior = project.CreateBehavior(autoType);
|
||||
if ( behavior )
|
||||
{
|
||||
behavior->SetName(autoName);
|
||||
behavior->UnserializeFrom(behaviorElement);
|
||||
behaviors[behavior->GetName()] = behavior;
|
||||
behaviors[autoName] = std::move(behavior);
|
||||
}
|
||||
else
|
||||
std::cout << "WARNING: Unknown behavior " << autoType << std::endl;
|
||||
@@ -194,12 +190,12 @@ void Object::UnserializeFrom(gd::Project & project, const SerializerElement & el
|
||||
.FindAndReplace("Automatism", "Behavior"); //Compatibility with GD <= 4
|
||||
gd::String autoName = behaviorElement.GetStringAttribute("name");
|
||||
|
||||
Behavior* behavior = project.CreateBehavior(autoType);
|
||||
if ( behavior != NULL )
|
||||
std::unique_ptr<Behavior> behavior = project.CreateBehavior(autoType);
|
||||
if ( behavior )
|
||||
{
|
||||
behavior->SetName(autoName);
|
||||
behavior->UnserializeFrom(behaviorElement);
|
||||
behaviors[behavior->GetName()] = behavior;
|
||||
behaviors[autoName] = std::move(behavior);
|
||||
}
|
||||
else
|
||||
std::cout << "WARNING: Unknown behavior " << autoType << std::endl;
|
||||
@@ -233,8 +229,3 @@ void Object::SerializeTo(SerializerElement & element) const
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
gd::Object * CreateBaseObject(gd::String name)
|
||||
{
|
||||
return new gd::Object(name);
|
||||
}
|
||||
|
@@ -9,10 +9,10 @@
|
||||
#include "GDCore/String.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "GDCore/Project/Behavior.h"
|
||||
#include "GDCore/Project/VariablesContainer.h"
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
namespace gd { class PropertyDescriptor; }
|
||||
namespace gd { class Behavior; }
|
||||
namespace gd { class Project; }
|
||||
namespace gd { class Layout; }
|
||||
namespace gd { class MainFrameWrapper; }
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
/**
|
||||
* \brief Get a read-only access to the map containing the behaviors.
|
||||
*/
|
||||
const std::map<gd::String, gd::Behavior* > & GetAllBehaviors() const {return behaviors;};
|
||||
const std::map<gd::String, std::unique_ptr<gd::Behavior> > & GetAllBehaviors() const {return behaviors;};
|
||||
///@}
|
||||
|
||||
/** \name Variable management
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
protected:
|
||||
gd::String name; ///< The full name of the object
|
||||
gd::String type; ///< Which type is the object. ( To test if we can do something reserved to some objects with it )
|
||||
std::map<gd::String, gd::Behavior* > behaviors; ///<Contains all behaviors of the object. Behaviors are the ownership of the object
|
||||
std::map<gd::String, std::unique_ptr<gd::Behavior> > behaviors; ///<Contains all behaviors of the object. Behaviors are the ownership of the object
|
||||
gd::VariablesContainer objectVariables; ///<List of the variables of the object
|
||||
|
||||
/**
|
||||
@@ -345,6 +345,4 @@ typedef std::vector < std::shared_ptr<gd::Object> > ObjList;
|
||||
*/
|
||||
typedef std::shared_ptr<gd::Object> ObjSPtr;
|
||||
|
||||
gd::Object * GD_CORE_API CreateBaseObject(gd::String name);
|
||||
|
||||
#endif // GDCORE_OBJECT_H
|
||||
|
@@ -121,17 +121,17 @@ std::shared_ptr<gd::Object> Project::CreateObject(const gd::String & type, const
|
||||
return std::shared_ptr<gd::Object>();
|
||||
}
|
||||
|
||||
gd::Behavior* Project::CreateBehavior(const gd::String & type, const gd::String & platformName)
|
||||
std::unique_ptr<gd::Behavior> Project::CreateBehavior(const gd::String & type, const gd::String & platformName)
|
||||
{
|
||||
for (std::size_t i = 0;i<platforms.size();++i)
|
||||
{
|
||||
if ( !platformName.empty() && platforms[i]->GetName() != platformName ) continue;
|
||||
|
||||
gd::Behavior* behavior = platforms[i]->CreateBehavior(type);
|
||||
std::unique_ptr<gd::Behavior> behavior = platforms[i]->CreateBehavior(type);
|
||||
if ( behavior ) return behavior;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<gd::BehaviorsSharedData> Project::CreateBehaviorSharedDatas(const gd::String & type, const gd::String & platformName)
|
||||
|
@@ -6,8 +6,9 @@
|
||||
|
||||
#ifndef GDCORE_PROJECT_H
|
||||
#define GDCORE_PROJECT_H
|
||||
#include "GDCore/String.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "GDCore/String.h"
|
||||
class wxPropertyGrid;
|
||||
class wxPropertyGridEvent;
|
||||
class TiXmlElement;
|
||||
@@ -243,7 +244,7 @@ public:
|
||||
* \param type The type of the behavior
|
||||
* \param platformName The name of the platform to be used. If empty, the first platform supporting the object is used.
|
||||
*/
|
||||
gd::Behavior* CreateBehavior(const gd::String & type, const gd::String & platformName = "");
|
||||
std::unique_ptr<gd::Behavior> CreateBehavior(const gd::String & type, const gd::String & platformName = "");
|
||||
|
||||
/**
|
||||
* Create behavior shared data of the given type.
|
||||
|
@@ -140,7 +140,10 @@ String String::FromLocale( const std::string &localizedString )
|
||||
#elif defined(EMSCRIPTEN)
|
||||
return FromUTF8(localizedString); //Assume UTF8 is the current locale
|
||||
#else
|
||||
if(std::locale("").name().find("UTF-8") != std::string::npos)
|
||||
if(std::locale("").name().find("utf-8") != std::string::npos ||
|
||||
std::locale("").name().find("UTF-8") != std::string::npos ||
|
||||
std::locale("").name().find("utf8") != std::string::npos ||
|
||||
std::locale("").name().find("UTF8") != std::string::npos)
|
||||
return FromUTF8(localizedString); //UTF8 is already the current locale
|
||||
else
|
||||
return FromSfString(sf::String(localizedString, std::locale(""))); //Use the current locale (std::locale("")) for conversion
|
||||
@@ -189,7 +192,10 @@ std::string String::ToLocale() const
|
||||
#elif defined(EMSCRIPTEN)
|
||||
return m_string;
|
||||
#else
|
||||
if(std::locale("").name().find("UTF-8") != std::string::npos)
|
||||
if(std::locale("").name().find("utf-8") != std::string::npos ||
|
||||
std::locale("").name().find("UTF-8") != std::string::npos ||
|
||||
std::locale("").name().find("utf8") != std::string::npos ||
|
||||
std::locale("").name().find("UTF8") != std::string::npos)
|
||||
return m_string; //UTF8 is already the current locale on Linux
|
||||
else
|
||||
return ToSfString().toAnsiString(std::locale("")); //Use the current locale for conversion
|
||||
@@ -440,7 +446,7 @@ String String::FindAndReplace(String search, String replacement, bool all) const
|
||||
do {
|
||||
pos = result.find(search, lastPos);
|
||||
lastPos = pos;
|
||||
if (pos != npos)
|
||||
if (pos != npos)
|
||||
{
|
||||
result.replace(pos, search.size(), replacement);
|
||||
lastPos += replacement.size();
|
||||
|
@@ -51,6 +51,11 @@ namespace gd
|
||||
}
|
||||
#else
|
||||
#warning System not supported for dynamic libraries loading
|
||||
Handle OpenLibrary(const char* path) {return nullptr;}
|
||||
void* GetSymbol(Handle library, const char* name) { return nullptr;}
|
||||
void CloseLibrary(Handle library) {}
|
||||
gd::String DynamicLibraryLastError() {return "";}
|
||||
Handle SetLibraryGlobal(const char* path) { return nullptr; }
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ namespace AutoVersion{
|
||||
|
||||
//Date Version Types
|
||||
static const char GDCore_DATE[] = "17";
|
||||
static const char GDCore_MONTH[] = "01";
|
||||
static const char GDCore_MONTH[] = "04";
|
||||
static const char GDCore_YEAR[] = "2016";
|
||||
|
||||
//Software Status
|
||||
@@ -15,12 +15,12 @@ namespace AutoVersion{
|
||||
//Standard Version Type
|
||||
static const long GDCore_MAJOR = 4;
|
||||
static const long GDCore_MINOR = 0;
|
||||
static const long GDCore_BUILD = 89;
|
||||
static const long GDCore_BUILD = 91;
|
||||
static const long GDCore_REVISION = 0;
|
||||
|
||||
//Miscellaneous Version Types
|
||||
#define GDCore_RC_FILEVERSION 4,0,89,0
|
||||
#define GDCore_RC_FILEVERSION_STRING "4, 0, 89, 0\0"
|
||||
static const char GDCore_FULLVERSION_STRING[] = "4.0.89.0";
|
||||
#define GDCore_RC_FILEVERSION 4,0,91,0
|
||||
#define GDCore_RC_FILEVERSION_STRING "4, 0, 91, 0\0"
|
||||
static const char GDCore_FULLVERSION_STRING[] = "4.0.91.0";
|
||||
}
|
||||
#endif //GDCORE_VERSION_H
|
||||
|
@@ -7,7 +7,7 @@ This project is released under the MIT License.
|
||||
|
||||
#include "AESTools.h"
|
||||
|
||||
#include "GDCpp/Tools/AES.h"
|
||||
#include "GDCpp/Runtime/Tools/AES.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef AESACTIONS_H_INCLUDED
|
||||
#define AESACTIONS_H_INCLUDED
|
||||
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
namespace GDpriv
|
||||
{
|
||||
|
@@ -6,14 +6,14 @@ This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
#include "GDCore/IDE/Project/ArbitraryResourceWorker.h"
|
||||
#include "GDCore/IDE/Dialogs/PropertyDescriptor.h"
|
||||
#include "GDCpp/ImageManager.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Project/InitialInstance.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/ImageManager.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/Project/InitialInstance.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "AdMobObject.h"
|
||||
|
||||
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
|
||||
|
@@ -8,8 +8,8 @@ This project is released under the MIT License.
|
||||
#ifndef ADMOBOBJECT_H
|
||||
#define ADMOBOBJECT_H
|
||||
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
namespace gd { class InitialInstance; }
|
||||
namespace gd { class Project; }
|
||||
namespace sf { class Texture; }
|
||||
|
@@ -18,11 +18,11 @@ void DeclareAdMobObjectExtension(gd::PlatformExtension & extension)
|
||||
"Florian Rival",
|
||||
"Open source (MIT License)");
|
||||
|
||||
gd::ObjectMetadata & obj = extension.AddObject("AdMob",
|
||||
gd::ObjectMetadata & obj = extension.AddObject<AdMobObject>(
|
||||
"AdMob",
|
||||
_("AdMob banner"),
|
||||
_("Display an ad banner or interstitial screen using AdMob"),
|
||||
"JsPlatform/Extensions/admobicon.png",
|
||||
&CreateAdMobObject);
|
||||
"JsPlatform/Extensions/admobicon.png");
|
||||
|
||||
obj.SetHelpUrl("/gdevelop/documentation/manual/built_admob");
|
||||
|
||||
|
@@ -10,8 +10,8 @@ This project is released under the MIT License.
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/TinyXml/tinyxml.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/TinyXml/tinyxml.h"
|
||||
|
||||
namespace AdvancedXML
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ This project is released under the MIT License.
|
||||
#define ADVANCEDXMLREFMANAGER_H_INCLUDED
|
||||
|
||||
#include <map>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
class TiXmlNode;
|
||||
class RuntimeScene;
|
||||
|
@@ -6,8 +6,8 @@ This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
#include "AdvancedXMLTools.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/TinyXml/tinyxml.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/TinyXml/tinyxml.h"
|
||||
#include "AdvancedXMLRefManager.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@@ -9,7 +9,7 @@ This project is released under the MIT License.
|
||||
#define ADVANCEDXMLACTIONS_H_INCLUDED
|
||||
|
||||
#include <string>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
class RuntimeScene;
|
||||
|
||||
|
@@ -13,19 +13,19 @@ This project is released under the MIT License.
|
||||
#include "Box3DObject.h"
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <SFML/OpenGL.hpp>
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeGame.h"
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/ImageManager.h"
|
||||
#include "GDCpp/FontManager.h"
|
||||
#include "GDCpp/Project/InitialInstance.h"
|
||||
#include "GDCpp/Polygon2d.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeGame.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/ImageManager.h"
|
||||
#include "GDCpp/Runtime/FontManager.h"
|
||||
#include "GDCpp/Runtime/Project/InitialInstance.h"
|
||||
#include "GDCpp/Runtime/Polygon2d.h"
|
||||
#include "GDCore/Serialization/SerializerElement.h"
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "Box3DObjectEditor.h"
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "GDCore/IDE/Dialogs/PropertyDescriptor.h"
|
||||
@@ -196,14 +196,13 @@ bool RuntimeBox3DObject::Draw( sf::RenderTarget& window )
|
||||
return true;
|
||||
}
|
||||
|
||||
RuntimeBox3DObject::RuntimeBox3DObject(RuntimeScene & scene, const gd::Object & object) :
|
||||
RuntimeObject(scene, object),
|
||||
RuntimeBox3DObject::RuntimeBox3DObject(RuntimeScene & scene, const Box3DObject & box3DObject) :
|
||||
RuntimeObject(scene, box3DObject),
|
||||
zPosition(0),
|
||||
yaw(0),
|
||||
pitch(0),
|
||||
roll(0)
|
||||
{
|
||||
const Box3DObject & box3DObject = static_cast<const Box3DObject&>(object);
|
||||
|
||||
SetWidth(box3DObject.GetWidth());
|
||||
SetHeight(box3DObject.GetHeight());
|
||||
@@ -413,13 +412,3 @@ std::size_t RuntimeBox3DObject::GetNumberOfProperties() const
|
||||
return 7;
|
||||
}
|
||||
#endif
|
||||
|
||||
RuntimeObject * CreateRuntimeBox3DObject(RuntimeScene & scene, const gd::Object & object)
|
||||
{
|
||||
return new RuntimeBox3DObject(scene, object);
|
||||
}
|
||||
|
||||
gd::Object * CreateBox3DObject(gd::String name)
|
||||
{
|
||||
return new Box3DObject(name);
|
||||
}
|
||||
|
@@ -8,8 +8,8 @@ This project is released under the MIT License.
|
||||
#ifndef BOX3DOBJECT_H
|
||||
#define BOX3DOBJECT_H
|
||||
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include <memory>
|
||||
class SFMLTextureWrapper;
|
||||
class RuntimeScene;
|
||||
@@ -85,7 +85,7 @@ class GD_EXTENSION_API RuntimeBox3DObject : public RuntimeObject
|
||||
{
|
||||
public :
|
||||
|
||||
RuntimeBox3DObject(RuntimeScene & scene, const gd::Object & object);
|
||||
RuntimeBox3DObject(RuntimeScene & scene, const Box3DObject & box3DObject);
|
||||
virtual ~RuntimeBox3DObject() {};
|
||||
virtual RuntimeObject * Clone() const { return new RuntimeBox3DObject(*this);}
|
||||
|
||||
@@ -142,8 +142,4 @@ private:
|
||||
std::shared_ptr<SFMLTextureWrapper> backTexture;
|
||||
};
|
||||
|
||||
RuntimeObject * CreateRuntimeBox3DObject(RuntimeScene & scene, const gd::Object & object);
|
||||
gd::Object * CreateBox3DObject(gd::String name);
|
||||
|
||||
#endif // BOX3DOBJECT_H
|
||||
|
||||
|
@@ -15,8 +15,8 @@ This project is released under the MIT License.
|
||||
#include <wx/string.h>
|
||||
//*)
|
||||
#include "GDCore/Tools/Log.h"
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "GDCore/IDE/wxTools/SkinHelper.h"
|
||||
#include "GDCore/IDE/Dialogs/ResourcesEditor.h"
|
||||
|
@@ -30,13 +30,14 @@ public:
|
||||
"Open source (MIT License)");
|
||||
|
||||
{
|
||||
gd::ObjectMetadata & obj = AddObject("Box3D",
|
||||
gd::ObjectMetadata & obj = AddObject<Box3DObject>(
|
||||
"Box3D",
|
||||
_("3D Box"),
|
||||
_("Displays a 3D Box"),
|
||||
"CppPlatform/Extensions/Box3Dicon.png",
|
||||
&CreateBox3DObject);
|
||||
"CppPlatform/Extensions/Box3Dicon.png");
|
||||
|
||||
AddRuntimeObject(obj, "RuntimeBox3DObject", &CreateRuntimeBox3DObject);
|
||||
AddRuntimeObject<Box3DObject, RuntimeBox3DObject>(
|
||||
obj, "RuntimeBox3DObject");
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
|
||||
|
@@ -12,9 +12,9 @@ This project is released under the MIT License.
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/Project/Variable.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/Project/Variable.h"
|
||||
|
||||
//Windows build uses native windows-dialogs
|
||||
#if defined(WINDOWS)
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef COMMONDIALOGS_H_INCLUDED
|
||||
#define COMMONDIALOGS_H_INCLUDED
|
||||
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
class RuntimeScene;
|
||||
namespace gd { class Variable; }
|
||||
|
@@ -9,12 +9,12 @@ This project is released under the MIT License.
|
||||
#include <iostream>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "DestroyOutsideBehavior.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/RuntimeLayer.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/RuntimeLayer.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
|
||||
DestroyOutsideBehavior::DestroyOutsideBehavior() :
|
||||
extraBorder(0)
|
||||
|
@@ -7,8 +7,8 @@ This project is released under the MIT License.
|
||||
|
||||
#ifndef DRAGGABLEBEHAVIOR_H
|
||||
#define DRAGGABLEBEHAVIOR_H
|
||||
#include "GDCpp/Project/Behavior.h"
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/Runtime/Project/Behavior.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <map>
|
||||
class RuntimeScene;
|
||||
|
@@ -67,26 +67,30 @@ void DeclareDestroyOutsideBehaviorExtension(gd::PlatformExtension & extension)
|
||||
/**
|
||||
* \brief This class declares information about the extension.
|
||||
*/
|
||||
class Extension : public ExtensionBase
|
||||
class DestroyOutsideBehaviorCppExtension : public ExtensionBase
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
|
||||
*/
|
||||
Extension()
|
||||
DestroyOutsideBehaviorCppExtension()
|
||||
{
|
||||
DeclareDestroyOutsideBehaviorExtension(*this);
|
||||
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
|
||||
};
|
||||
};
|
||||
|
||||
#if !defined(EMSCRIPTEN)
|
||||
#if defined(ANDROID)
|
||||
extern "C" ExtensionBase * CreateGDCppDestroyOutsideBehaviorExtension() {
|
||||
return new DestroyOutsideBehaviorCppExtension;
|
||||
}
|
||||
#elif !defined(EMSCRIPTEN)
|
||||
/**
|
||||
* Used by GDevelop to create the extension class
|
||||
* -- Do not need to be modified. --
|
||||
*/
|
||||
extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() {
|
||||
return new Extension;
|
||||
return new DestroyOutsideBehaviorCppExtension;
|
||||
}
|
||||
#endif
|
||||
|
@@ -9,12 +9,12 @@ This project is released under the MIT License.
|
||||
#include <iostream>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "DraggableBehavior.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/RuntimeLayer.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/RuntimeLayer.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
|
||||
bool DraggableBehavior::somethingDragged = false;
|
||||
bool DraggableBehavior::leftPressedLastFrame = false;
|
||||
|
@@ -7,8 +7,8 @@ This project is released under the MIT License.
|
||||
|
||||
#ifndef DRAGGABLEBEHAVIOR_H
|
||||
#define DRAGGABLEBEHAVIOR_H
|
||||
#include "GDCpp/Project/Behavior.h"
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/Runtime/Project/Behavior.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <map>
|
||||
class RuntimeScene;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
describe('gdjs.DraggableRuntimeBehavior', function() {
|
||||
var runtimeGame = new gdjs.RuntimeGame({variables: [], properties: {windowWidth: 800, windowHeight: 600}});
|
||||
var runtimeScene = new gdjs.RuntimeScene(runtimeGame, null);
|
||||
var runtimeScene = new gdjs.RuntimeScene(runtimeGame);
|
||||
runtimeScene.loadFromScene({
|
||||
layers:[{name:"", visibility: true}],
|
||||
variables: [],
|
||||
|
@@ -12,9 +12,9 @@ This project is released under the MIT License.
|
||||
#include "GDCore/Events/CodeGeneration/EventsCodeGenerator.h"
|
||||
#include "GDCore/Events/Tools/EventsCodeNameMangler.h"
|
||||
#include "GDCpp/Extensions/CppPlatform.h"
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#if defined(GD_IDE_ONLY)
|
||||
#include "GDCore/Events/Parsers/ExpressionParser.h"
|
||||
#include "GDCore/Events/Instruction.h"
|
||||
|
@@ -9,14 +9,14 @@ This project is released under the MIT License.
|
||||
|
||||
#include "GDCore/Events/Serialization.h"
|
||||
#include "FunctionEvent.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCore/Events/Builtin/LinkEvent.h"
|
||||
#include "GDCore/Events/CodeGeneration/EventsCodeGenerationContext.h"
|
||||
#include "GDCore/Events/CodeGeneration/EventsCodeGenerator.h"
|
||||
#include "GDCore/Events/Tools/EventsCodeNameMangler.h"
|
||||
#include "GDCore/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/TinyXml/tinyxml.h"
|
||||
#include "GDCpp/Runtime/TinyXml/tinyxml.h"
|
||||
#include "GDCore/IDE/Dialogs/EventsEditor/EventsRenderingHelper.h"
|
||||
#include "GDCore/IDE/Dialogs/EventsEditor/EventsEditorItemsAreas.h"
|
||||
#include "GDCore/IDE/Dialogs/EventsEditor/EventsEditorSelection.h"
|
||||
|
@@ -11,8 +11,8 @@ This project is released under the MIT License.
|
||||
#define FUNCTIONEVENT_H
|
||||
#include "GDCore/Events/EventsList.h"
|
||||
#include "GDCore/Events/Event.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/SceneNameMangler.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/SceneNameMangler.h"
|
||||
class RuntimeScene;
|
||||
namespace gd { class Instruction; }
|
||||
namespace gd { class SerializerElement; }
|
||||
|
@@ -10,9 +10,9 @@
|
||||
#include <wx/string.h>
|
||||
//*)
|
||||
#include "GDCore/IDE/Dialogs/ChooseObjectDialog.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "FunctionEvent.h"
|
||||
|
||||
//(*IdInit(FunctionEventEditorDlg)
|
||||
|
@@ -5,7 +5,7 @@ Copyright (c) 2008-2016 Florian Rival (Florian.Rival@gmail.com)
|
||||
This project is released under the MIT License.
|
||||
*/
|
||||
#include "FunctionTools.h"
|
||||
#include "GDCpp/profile.h"
|
||||
#include "GDCpp/Runtime/profile.h"
|
||||
|
||||
namespace GDpriv
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ This project is released under the MIT License.
|
||||
#define FUNCTIONTOOLS_H
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
namespace GDpriv
|
||||
{
|
||||
|
@@ -30,13 +30,14 @@ public:
|
||||
"Florian Rival",
|
||||
"Open source (MIT License)");
|
||||
|
||||
gd::ObjectMetadata & obj = AddObject("Light",
|
||||
gd::ObjectMetadata & obj = AddObject<LightObject>(
|
||||
"Light",
|
||||
_("Light"),
|
||||
_("Emits light that can be stopped by objects"),
|
||||
"CppPlatform/Extensions/lightIcon32.png",
|
||||
&CreateLightObject);
|
||||
"CppPlatform/Extensions/lightIcon32.png");
|
||||
|
||||
AddRuntimeObject(obj, "RuntimeLightObject", CreateRuntimeLightObject);
|
||||
AddRuntimeObject<LightObject, RuntimeLightObject>(
|
||||
obj, "RuntimeLightObject");
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
LightObject::LoadEdittimeIcon();
|
||||
|
@@ -10,20 +10,20 @@ This project is released under the MIT License.
|
||||
#endif
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/ImageManager.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/FontManager.h"
|
||||
#include "GDCpp/Project/InitialInstance.h"
|
||||
#include "GDCpp/Polygon2d.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/ImageManager.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/FontManager.h"
|
||||
#include "GDCpp/Runtime/Project/InitialInstance.h"
|
||||
#include "GDCpp/Runtime/Polygon2d.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
#include "LightObject.h"
|
||||
#include "LightManager.h"
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCore/IDE/Project/ArbitraryResourceWorker.h"
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "LightObjectEditor.h"
|
||||
@@ -89,12 +89,10 @@ void LightObject::DoSerializeTo(gd::SerializerElement & element) const
|
||||
}
|
||||
#endif
|
||||
|
||||
RuntimeLightObject::RuntimeLightObject(RuntimeScene & scene, const gd::Object & object) :
|
||||
RuntimeObject(scene, object),
|
||||
RuntimeLightObject::RuntimeLightObject(RuntimeScene & scene, const LightObject & lightObject) :
|
||||
RuntimeObject(scene, lightObject),
|
||||
angle(0)
|
||||
{
|
||||
const LightObject & lightObject = static_cast<const LightObject&>(object);
|
||||
|
||||
globalLight = lightObject.IsGlobalLight();
|
||||
globalLightColor = lightObject.GetGlobalColor();
|
||||
light = Light(sf::Vector2f(GetX(),GetY()), lightObject.GetIntensity(), lightObject.GetRadius(), lightObject.GetQuality(), lightObject.GetColor());
|
||||
@@ -297,13 +295,3 @@ void RuntimeLightObject::SetGlobalColor(const gd::String & colorStr)
|
||||
|
||||
SetGlobalColor(sf::Color( colors[0].To<int>(),colors[1].To<int>(),colors[2].To<int>() ));
|
||||
}
|
||||
|
||||
RuntimeObject * CreateRuntimeLightObject(RuntimeScene & scene, const gd::Object & object)
|
||||
{
|
||||
return new RuntimeLightObject(scene, object);
|
||||
}
|
||||
|
||||
gd::Object * CreateLightObject(gd::String name)
|
||||
{
|
||||
return new LightObject(name);
|
||||
}
|
||||
|
@@ -8,8 +8,8 @@ This project is released under the MIT License.
|
||||
#ifndef LightObject_H
|
||||
#define LightObject_H
|
||||
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
|
||||
#include <memory>
|
||||
#include <SFML/Graphics/Color.hpp>
|
||||
@@ -92,7 +92,7 @@ class GD_EXTENSION_API RuntimeLightObject : public RuntimeObject
|
||||
{
|
||||
public :
|
||||
|
||||
RuntimeLightObject(RuntimeScene & scene, const gd::Object & object);
|
||||
RuntimeLightObject(RuntimeScene & scene, const LightObject & lightObject);
|
||||
virtual ~RuntimeLightObject() {};
|
||||
virtual RuntimeObject * Clone() const { return new RuntimeLightObject(*this);}
|
||||
|
||||
@@ -154,8 +154,4 @@ private:
|
||||
sf::Color globalLightColor;
|
||||
};
|
||||
|
||||
gd::Object * CreateLightObject(gd::String name);
|
||||
RuntimeObject * CreateRuntimeLightObject(RuntimeScene & scene, const gd::Object & object);
|
||||
|
||||
#endif // LightObject_H
|
||||
|
||||
|
@@ -16,8 +16,8 @@ This project is released under the MIT License.
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "LightObject.h"
|
||||
#include "SceneLightObstacleDatas.h"
|
||||
|
||||
|
@@ -8,8 +8,8 @@ This project is released under the MIT License.
|
||||
#include "LightObstacleBehavior.h"
|
||||
#include "LightObstacleBehaviorEditor.h"
|
||||
#include "LightObject.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
@@ -27,13 +27,13 @@ freely, subject to the following restrictions:
|
||||
#ifndef LIGHTOBSTACLEBEHAVIOR_H
|
||||
#define LIGHTOBSTACLEBEHAVIOR_H
|
||||
|
||||
#include "GDCpp/Project/Behavior.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/Project/Behavior.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "Light.h"
|
||||
#include "LightManager.h"
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
namespace gd { class SerializerElement; }
|
||||
namespace gd { class Layout; }
|
||||
class LightObstacleBehaviorEditor;
|
||||
|
@@ -12,11 +12,11 @@ This project is released under the MIT License.
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
//*)
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "LightObstacleBehavior.h"
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
|
||||
//(*IdInit(LightObstacleBehaviorEditor)
|
||||
//*)
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef RUNTIMESCENELIGHTOBSTACLEDATAS_H
|
||||
#define RUNTIMESCENELIGHTOBSTACLEDATAS_H
|
||||
#include <vector>
|
||||
#include "GDCpp/BehaviorsRuntimeSharedData.h"
|
||||
#include "GDCpp/Runtime/BehaviorsRuntimeSharedData.h"
|
||||
class SceneLightObstacleDatas;
|
||||
class LightObstacleBehavior;
|
||||
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef SCENELIGHTOBSTACLEPHYSICSDATAS_H
|
||||
#define SCENELIGHTOBSTACLEPHYSICSDATAS_H
|
||||
|
||||
#include "GDCpp/Project/BehaviorsSharedData.h"
|
||||
#include "GDCpp/Runtime/Project/BehaviorsSharedData.h"
|
||||
#include "RuntimeSceneLightObstacleDatas.h"
|
||||
|
||||
/**
|
||||
|
@@ -10,9 +10,9 @@ This project is released under the MIT License.
|
||||
#include <string>
|
||||
|
||||
#include <memory>
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeObjectsListsTools.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeObjectsListsTools.h"
|
||||
#include "ObjectsLinksManager.h"
|
||||
|
||||
using namespace std;
|
||||
|
@@ -10,7 +10,7 @@ This project is released under the MIT License.
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
class RuntimeObject;
|
||||
class RuntimeScene;
|
||||
|
||||
|
@@ -12,8 +12,8 @@ This project is released under the MIT License.
|
||||
#include <string>
|
||||
|
||||
#include <memory>
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@@ -13,9 +13,9 @@ This project is released under the MIT License.
|
||||
#include "GDCore/Project/ClassWithObjects.h"
|
||||
#include "GDCore/Project/Layout.h"
|
||||
#include "GDCore/Project/Object.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeGame.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeGame.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Extensions/Builtin/ObjectTools.h"
|
||||
#include "GDCpp/Extensions/Builtin/ObjectTools.h"
|
||||
#include "../LinkedObjectsTools.h"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
class GD_EXTENSION_API ErrorManager
|
||||
{
|
||||
|
@@ -7,7 +7,7 @@ This project is released under the MIT License.
|
||||
|
||||
#include "GDCpp/Extensions/ExtensionBase.h"
|
||||
#include "GDCore/Tools/Version.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "NetworkBehavior.h"
|
||||
#include "NetworkManager.h"
|
||||
|
||||
|
@@ -8,10 +8,10 @@ This project is released under the MIT License.
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <SFML/Network.hpp>
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "ReceivedDataManager.h"
|
||||
#include "NetworkBehaviorEditor.h"
|
||||
#include "NetworkBehavior.h"
|
||||
|
@@ -8,8 +8,8 @@ This project is released under the MIT License.
|
||||
#ifndef NETWORKBEHAVIOR_H
|
||||
#define NETWORKBEHAVIOR_H
|
||||
|
||||
#include "GDCpp/Project/Behavior.h"
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/Runtime/Project/Behavior.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "SceneNetworkDatas.h"
|
||||
#include <map>
|
||||
namespace gd { class SerializerElement; }
|
||||
|
@@ -12,11 +12,11 @@ This project is released under the MIT License.
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
//*)
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "NetworkBehavior.h"
|
||||
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Project/Layout.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Layout.h"
|
||||
|
||||
//(*IdInit(NetworkBehaviorEditor)
|
||||
const long NetworkBehaviorEditor::ID_RADIOBOX1 = wxNewId();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "NetworkManager.h"
|
||||
#include "ReceivedDataManager.h"
|
||||
#include "ErrorManager.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
|
||||
NetworkManager * NetworkManager::_singleton = NULL;
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Copyright (c) 2010-2016 Florian Rival (Florian.Rival@gmail.com)
|
||||
This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "NetworkManager.h"
|
||||
#include "ErrorManager.h"
|
||||
#include "ReceivedDataManager.h"
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef NetworkACTIONS_H_INCLUDED
|
||||
#define NetworkACTIONS_H_INCLUDED
|
||||
#include <string>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
namespace GDpriv
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ This project is released under the MIT License.
|
||||
#define RECEIVEDDATAMANAGER_H
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "GDCpp/String.h"
|
||||
#include "GDCpp/Runtime/String.h"
|
||||
|
||||
/**
|
||||
* Singleton where is stocked receveid data from other peers.
|
||||
|
@@ -9,7 +9,7 @@ This project is released under the MIT License.
|
||||
#define RUNTIMESCENENETWORKDATAS_H
|
||||
|
||||
#include <iostream>
|
||||
#include "GDCpp/BehaviorsRuntimeSharedData.h"
|
||||
#include "GDCpp/Runtime/BehaviorsRuntimeSharedData.h"
|
||||
class SceneNetworkDatas;
|
||||
|
||||
/**
|
||||
|
@@ -8,7 +8,7 @@ This project is released under the MIT License.
|
||||
#ifndef SCENENETWORKDATAS_H
|
||||
#define SCENENETWORKDATAS_H
|
||||
|
||||
#include "GDCpp/Project/BehaviorsSharedData.h"
|
||||
#include "GDCpp/Runtime/Project/BehaviorsSharedData.h"
|
||||
#include "RuntimeSceneNetworkDatas.h"
|
||||
|
||||
/**
|
||||
|
@@ -22,11 +22,11 @@ void DeclarePanelSpriteObjectExtension(gd::PlatformExtension & extension)
|
||||
"Victor Levasseur and Florian Rival",
|
||||
"Open source (MIT License)");
|
||||
|
||||
gd::ObjectMetadata & obj = extension.AddObject("PanelSprite",
|
||||
gd::ObjectMetadata & obj = extension.AddObject<PanelSpriteObject>(
|
||||
"PanelSprite",
|
||||
_("Panel Sprite (\"9-patch\")"),
|
||||
_("An image with edges and corners that are stretched separately from the fill."),
|
||||
"CppPlatform/Extensions/PanelSpriteIcon.png",
|
||||
&CreatePanelSpriteObject);
|
||||
"CppPlatform/Extensions/PanelSpriteIcon.png");
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
obj.SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");
|
||||
@@ -133,29 +133,34 @@ void DeclarePanelSpriteObjectExtension(gd::PlatformExtension & extension)
|
||||
/**
|
||||
* \brief This class declares information about the extension.
|
||||
*/
|
||||
class Extension : public ExtensionBase
|
||||
class PanelSpriteObjectCppExtension : public ExtensionBase
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
|
||||
*/
|
||||
Extension()
|
||||
PanelSpriteObjectCppExtension()
|
||||
{
|
||||
DeclarePanelSpriteObjectExtension(*this);
|
||||
AddRuntimeObject(GetObjectMetadata("PanelSpriteObject::PanelSprite"),
|
||||
"RuntimePanelSpriteObject", CreateRuntimePanelSpriteObject);
|
||||
AddRuntimeObject<PanelSpriteObject, RuntimePanelSpriteObject>(
|
||||
GetObjectMetadata("PanelSpriteObject::PanelSprite"),
|
||||
"RuntimePanelSpriteObject");
|
||||
|
||||
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
|
||||
};
|
||||
};
|
||||
|
||||
#if !defined(EMSCRIPTEN)
|
||||
#if defined(ANDROID)
|
||||
extern "C" ExtensionBase * CreateGDCppPanelSpriteObjectExtension() {
|
||||
return new PanelSpriteObjectCppExtension;
|
||||
}
|
||||
#elif !defined(EMSCRIPTEN)
|
||||
/**
|
||||
* Used by GDevelop to create the extension class
|
||||
* -- Do not need to be modified. --
|
||||
*/
|
||||
extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() {
|
||||
return new Extension;
|
||||
return new PanelSpriteObjectCppExtension;
|
||||
}
|
||||
#endif
|
||||
|
@@ -27,7 +27,10 @@ public:
|
||||
{
|
||||
DeclarePanelSpriteObjectExtension(*this);
|
||||
|
||||
GetObjectMetadata("PanelSpriteObject::PanelSprite").SetIncludeFile("PanelSpriteObject/panelspriteruntimeobject.js");
|
||||
GetObjectMetadata("PanelSpriteObject::PanelSprite")
|
||||
.SetIncludeFile("PanelSpriteObject/panelspriteruntimeobject.js")
|
||||
.AddIncludeFile("PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js")
|
||||
.AddIncludeFile("PanelSpriteObject/panelspriteruntimeobject-cocos-renderer.js");
|
||||
|
||||
GetAllActionsForObject("PanelSpriteObject::PanelSprite")["PanelSpriteObject::Width"].SetFunctionName("setWidth").SetGetter("getWidth");
|
||||
GetAllConditionsForObject("PanelSpriteObject::PanelSprite")["PanelSpriteObject::Width"].SetFunctionName("getWidth");
|
||||
|
@@ -12,16 +12,16 @@ This project is released under the MIT License.
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
#include "PanelSpriteObject.h"
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/ImageManager.h"
|
||||
#include "GDCpp/FontManager.h"
|
||||
#include "GDCpp/RuntimeScene.h"
|
||||
#include "GDCpp/RuntimeGame.h"
|
||||
#include "GDCpp/Project/Project.h"
|
||||
#include "GDCpp/Project/InitialInstance.h"
|
||||
#include "GDCpp/Polygon2d.h"
|
||||
#include "GDCpp/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/CommonTools.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/ImageManager.h"
|
||||
#include "GDCpp/Runtime/FontManager.h"
|
||||
#include "GDCpp/Runtime/RuntimeScene.h"
|
||||
#include "GDCpp/Runtime/RuntimeGame.h"
|
||||
#include "GDCpp/Runtime/Project/Project.h"
|
||||
#include "GDCpp/Runtime/Project/InitialInstance.h"
|
||||
#include "GDCpp/Runtime/Polygon2d.h"
|
||||
#include "GDCpp/Runtime/Serialization/SerializerElement.h"
|
||||
#include "GDCpp/Runtime/CommonTools.h"
|
||||
#include "GDCore/Tools/Localization.h"
|
||||
|
||||
#if defined(GD_IDE_ONLY)
|
||||
@@ -79,14 +79,12 @@ void PanelSpriteObject::LoadResources(gd::Project & project, gd::Layout & layout
|
||||
}
|
||||
#endif
|
||||
|
||||
RuntimePanelSpriteObject::RuntimePanelSpriteObject(RuntimeScene & scene, const gd::Object & object) :
|
||||
RuntimeObject(scene, object),
|
||||
RuntimePanelSpriteObject::RuntimePanelSpriteObject(RuntimeScene & scene, const PanelSpriteObject & panelSpriteObject) :
|
||||
RuntimeObject(scene, panelSpriteObject),
|
||||
width(32),
|
||||
height(32),
|
||||
angle(0)
|
||||
{
|
||||
const PanelSpriteObject & panelSpriteObject = static_cast<const PanelSpriteObject&>(object);
|
||||
|
||||
SetRightMargin(panelSpriteObject.GetRightMargin());
|
||||
SetLeftMargin(panelSpriteObject.GetLeftMargin());
|
||||
SetBottomMargin(panelSpriteObject.GetBottomMargin());
|
||||
@@ -112,64 +110,60 @@ bool RuntimePanelSpriteObject::Draw( sf::RenderTarget& window )
|
||||
float imageWidth = texture->texture.getSize().x;
|
||||
float imageHeight = texture->texture.getSize().y;
|
||||
|
||||
sf::Vertex vertices[] =
|
||||
{
|
||||
//Center part (streched)
|
||||
sf::Vertex centerVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
};
|
||||
|
||||
sf::Vertex topVertices[] = {
|
||||
//Top-left
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 ), sf::Vector2f(0 ,0 )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 ), sf::Vector2f(leftMargin ,0 )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
|
||||
//Top
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 ), sf::Vector2f(leftMargin ,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 ), sf::Vector2f(imageWidth - rightMargin,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
|
||||
//Top-right
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 ), sf::Vector2f(imageWidth - rightMargin,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 ), sf::Vector2f(imageWidth ,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 + topMargin ), sf::Vector2f(imageWidth ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
};
|
||||
|
||||
//Right
|
||||
sf::Vertex rightVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 + topMargin ), sf::Vector2f(imageWidth ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin))
|
||||
};
|
||||
|
||||
sf::Vertex bottomVertices[] = {
|
||||
//Bottom-left
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 - bottomMargin), sf::Vector2f(0 ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 ), sf::Vector2f(0 ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 ), sf::Vector2f(leftMargin ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 ), sf::Vector2f(0 ,imageHeight )),
|
||||
|
||||
//Bottom
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 ), sf::Vector2f(imageWidth - rightMargin,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 ), sf::Vector2f(leftMargin ,imageHeight )),
|
||||
|
||||
//Bottom-right
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 ), sf::Vector2f(imageWidth ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 ), sf::Vector2f(imageWidth - rightMargin,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 ), sf::Vector2f(imageWidth ,imageHeight ))
|
||||
};
|
||||
|
||||
//Left
|
||||
sf::Vertex leftVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 - bottomMargin), sf::Vector2f(0 ,imageHeight - bottomMargin)),
|
||||
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin))
|
||||
};
|
||||
|
||||
|
||||
sf::Transform matrix;
|
||||
matrix.translate(centerPosition);
|
||||
matrix.rotate(angle);
|
||||
@@ -178,7 +172,11 @@ bool RuntimePanelSpriteObject::Draw( sf::RenderTarget& window )
|
||||
states.transform = matrix;
|
||||
states.texture = &texture->texture;
|
||||
|
||||
window.draw(vertices, 36, sf::Quads, states);
|
||||
window.draw(centerVertices, 4, sf::TrianglesStrip, states);
|
||||
window.draw(leftVertices, 4, sf::TrianglesStrip, states);
|
||||
window.draw(rightVertices, 4, sf::TrianglesStrip, states);
|
||||
window.draw(topVertices, 8, sf::TrianglesStrip, states);
|
||||
window.draw(bottomVertices, 8, sf::TrianglesStrip, states);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -201,66 +199,61 @@ void PanelSpriteObject::DrawInitialInstance(gd::InitialInstance & instance, sf::
|
||||
float width = instance.HasCustomSize() ? instance.GetCustomWidth() : GetInitialInstanceDefaultSize(instance, project, layout).x;
|
||||
float height = instance.HasCustomSize() ? instance.GetCustomHeight() : GetInitialInstanceDefaultSize(instance, project, layout).y;
|
||||
|
||||
sf::Vertex vertices[] =
|
||||
{
|
||||
//Center part (streched)
|
||||
sf::Vertex centerVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
};
|
||||
|
||||
sf::Vertex topVertices[] = {
|
||||
//Top-left
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 ), sf::Vector2f(0 ,0 )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 ), sf::Vector2f(leftMargin ,0 )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
|
||||
//Top
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 ), sf::Vector2f(leftMargin ,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 ), sf::Vector2f(imageWidth - rightMargin,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
|
||||
//Top-right
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 ), sf::Vector2f(imageWidth - rightMargin,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 ), sf::Vector2f(imageWidth ,0 )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 + topMargin ), sf::Vector2f(imageWidth ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
};
|
||||
|
||||
//Right
|
||||
sf::Vertex rightVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,-height/2 + topMargin ), sf::Vector2f(imageWidth - rightMargin,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,-height/2 + topMargin ), sf::Vector2f(imageWidth ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin))
|
||||
};
|
||||
|
||||
sf::Vertex bottomVertices[] = {
|
||||
//Bottom-left
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 - bottomMargin), sf::Vector2f(0 ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 ), sf::Vector2f(0 ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 ), sf::Vector2f(leftMargin ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 ), sf::Vector2f(0 ,imageHeight )),
|
||||
|
||||
//Bottom
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 ), sf::Vector2f(imageWidth - rightMargin,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 ), sf::Vector2f(leftMargin ,imageHeight )),
|
||||
|
||||
//Bottom-right
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 - bottomMargin), sf::Vector2f(imageWidth - rightMargin,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 - bottomMargin), sf::Vector2f(imageWidth ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 ), sf::Vector2f(imageWidth ,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 - rightMargin,+height/2 ), sf::Vector2f(imageWidth - rightMargin,imageHeight )),
|
||||
sf::Vertex( sf::Vector2f(+width/2 ,+height/2 ), sf::Vector2f(imageWidth ,imageHeight ))
|
||||
};
|
||||
|
||||
//Left
|
||||
sf::Vertex leftVertices[] = {
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,-height/2 + topMargin ), sf::Vector2f(0 ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,-height/2 + topMargin ), sf::Vector2f(leftMargin ,topMargin )),
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin)),
|
||||
sf::Vertex( sf::Vector2f(-width/2 ,+height/2 - bottomMargin), sf::Vector2f(0 ,imageHeight - bottomMargin)),
|
||||
|
||||
sf::Vertex( sf::Vector2f(-width/2 + leftMargin ,+height/2 - bottomMargin), sf::Vector2f(leftMargin ,imageHeight - bottomMargin))
|
||||
};
|
||||
sf::Vector2f centerPosition = sf::Vector2f(instance.GetX()+width/2, instance.GetY()+height/2);
|
||||
|
||||
sf::Transform matrix;
|
||||
sf::Vector2f centerPosition = sf::Vector2f(instance.GetX()+width/2, instance.GetY()+height/2);
|
||||
matrix.translate(centerPosition);
|
||||
matrix.rotate(instance.GetAngle());
|
||||
|
||||
@@ -268,9 +261,11 @@ void PanelSpriteObject::DrawInitialInstance(gd::InitialInstance & instance, sf::
|
||||
states.transform = matrix;
|
||||
states.texture = &texture->texture;
|
||||
|
||||
renderTarget.draw(vertices, 36, sf::Quads, states);
|
||||
|
||||
return;
|
||||
renderTarget.draw(centerVertices, 4, sf::TrianglesStrip, states);
|
||||
renderTarget.draw(leftVertices, 4, sf::TrianglesStrip, states);
|
||||
renderTarget.draw(rightVertices, 4, sf::TrianglesStrip, states);
|
||||
renderTarget.draw(topVertices, 8, sf::TrianglesStrip, states);
|
||||
renderTarget.draw(bottomVertices, 8, sf::TrianglesStrip, states);
|
||||
}
|
||||
|
||||
void PanelSpriteObject::ExposeResources(gd::ArbitraryResourceWorker & worker)
|
||||
@@ -329,13 +324,3 @@ void RuntimePanelSpriteObject::ChangeAndReloadImage(const gd::String &txtName, c
|
||||
textureName = txtName;
|
||||
texture = scene.GetImageManager()->GetSFMLTexture(textureName);
|
||||
}
|
||||
|
||||
RuntimeObject * CreateRuntimePanelSpriteObject(RuntimeScene & scene, const gd::Object & object)
|
||||
{
|
||||
return new RuntimePanelSpriteObject(scene, object);
|
||||
}
|
||||
|
||||
gd::Object * CreatePanelSpriteObject(gd::String name)
|
||||
{
|
||||
return new PanelSpriteObject(name);
|
||||
}
|
||||
|
@@ -7,8 +7,8 @@ This project is released under the MIT License.
|
||||
|
||||
#ifndef TILEDSPRITEOBJECT_H
|
||||
#define TILEDSPRITEOBJECT_H
|
||||
#include "GDCpp/Project/Object.h"
|
||||
#include "GDCpp/RuntimeObject.h"
|
||||
#include "GDCpp/Runtime/Project/Object.h"
|
||||
#include "GDCpp/Runtime/RuntimeObject.h"
|
||||
#include <memory>
|
||||
class SFMLTextureWrapper;
|
||||
namespace gd { class ImageManager; }
|
||||
@@ -89,7 +89,7 @@ class GD_EXTENSION_API RuntimePanelSpriteObject : public RuntimeObject
|
||||
{
|
||||
public :
|
||||
|
||||
RuntimePanelSpriteObject(RuntimeScene & scene, const gd::Object & object);
|
||||
RuntimePanelSpriteObject(RuntimeScene & scene, const PanelSpriteObject & panelSpriteObject);
|
||||
virtual ~RuntimePanelSpriteObject() {};
|
||||
virtual RuntimeObject * Clone() const { return new RuntimePanelSpriteObject(*this);}
|
||||
|
||||
@@ -141,8 +141,4 @@ private:
|
||||
std::shared_ptr<SFMLTextureWrapper> texture;
|
||||
};
|
||||
|
||||
RuntimeObject * CreateRuntimePanelSpriteObject(RuntimeScene & scene, const gd::Object & object);
|
||||
gd::Object * CreatePanelSpriteObject(gd::String name);
|
||||
|
||||
#endif // TILEDSPRITEOBJECT_H
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user