Merge branch 'master' into tilemap-object
10
.gitignore
vendored
@@ -16,10 +16,11 @@
|
||||
/Binaries/.embuild
|
||||
/Binaries/.embuild-debug
|
||||
/Binaries/Releases/*.exe
|
||||
/Binaries/Releases/*.7z
|
||||
/Binaries/Releases/*.tar.bz2
|
||||
/Binaries/Releases/*.tar.lzma
|
||||
/Binaries/Releases/*.zip
|
||||
/Binaries/Releases/**/*.7z
|
||||
/Binaries/Releases/**/*.tar.bz2
|
||||
/Binaries/Releases/**/*.tar.lzma
|
||||
/Binaries/Releases/**/*.zip
|
||||
/Binaries/Releases/**/*.deb
|
||||
/WebIDE
|
||||
*.depend
|
||||
*.layout
|
||||
@@ -50,3 +51,4 @@
|
||||
/Binaries/Output/WebIDE/libGD.raw.js
|
||||
/WebIDE
|
||||
!/GDCpp/scripts/bcp.exe
|
||||
/GDJS/tests/node_modules
|
||||
|
@@ -748,7 +748,6 @@ void LayoutEditorCanvas::UpdateScrollbars()
|
||||
}
|
||||
void LayoutEditorCanvas::UpdateViewAccordingToZoomFactor()
|
||||
{
|
||||
std::cout << "Size:" << GetClientSize().GetWidth()/options.zoomFactor << ";" << GetClientSize().GetHeight()/options.zoomFactor << std::endl;
|
||||
editionView.setSize(GetClientSize().GetWidth()/options.zoomFactor, GetClientSize().GetHeight()/options.zoomFactor);
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
namespace AutoVersion{
|
||||
|
||||
//Date Version Types
|
||||
static const char GDCore_DATE[] = "04";
|
||||
static const char GDCore_DATE[] = "24";
|
||||
static const char GDCore_MONTH[] = "08";
|
||||
static const char GDCore_YEAR[] = "2014";
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace AutoVersion{
|
||||
//Standard Version Type
|
||||
static const long GDCore_MAJOR = 3;
|
||||
static const long GDCore_MINOR = 4;
|
||||
static const long GDCore_BUILD = 72;
|
||||
static const long GDCore_REVISION = 2;
|
||||
static const long GDCore_BUILD = 73;
|
||||
static const long GDCore_REVISION = 0;
|
||||
|
||||
//Miscellaneous Version Types
|
||||
#define GDCore_RC_FILEVERSION 3,4,72,2
|
||||
#define GDCore_RC_FILEVERSION_STRING "3, 4, 72, 2\0"
|
||||
static const char GDCore_FULLVERSION_STRING[] = "3.4.72.2";
|
||||
#define GDCore_RC_FILEVERSION 3,4,73,0
|
||||
#define GDCore_RC_FILEVERSION_STRING "3, 4, 73, 0\0"
|
||||
static const char GDCore_FULLVERSION_STRING[] = "3.4.73.0";
|
||||
|
||||
//These values are to keep track of your versioning state, don't modify them.
|
||||
static const long GDCore_BUILD_HISTORY = 0;
|
||||
|
@@ -520,6 +520,8 @@ bool RuntimeSpriteObject::SetAngle(float newAngle)
|
||||
*/
|
||||
float RuntimeSpriteObject::GetAngle() const
|
||||
{
|
||||
if ( currentAnimation >= GetAnimationsCount() ) return 0;
|
||||
|
||||
if ( !animations[currentAnimation].Get().useMultipleDirections )
|
||||
return currentAngle;
|
||||
else
|
||||
|
@@ -52,7 +52,9 @@ int main( int argc, char *p_argv[] )
|
||||
fullExecutablePath += GetCurrentWorkingDirectory();
|
||||
fullExecutablePath += "/";
|
||||
}
|
||||
#ifndef WINDOWS
|
||||
fullExecutablePath += p_argv[0];
|
||||
#endif
|
||||
std::string executablePath = fullExecutablePath.substr( 0, fullExecutablePath.find_last_of( "/" ) );
|
||||
std::string executableFilename = fullExecutablePath.find_last_of( "/" ) < fullExecutablePath.length() ? fullExecutablePath.substr( fullExecutablePath.find_last_of( "/" ), fullExecutablePath.length() ) : "";
|
||||
std::string executableNameOnly = executableFilename.substr(0, executableFilename.length()-4);
|
||||
@@ -76,7 +78,7 @@ int main( int argc, char *p_argv[] )
|
||||
gd::ExtensionsLoader::ExtensionsLoadingDone(".");
|
||||
//Load resource file
|
||||
gd::RessourcesLoader * resLoader = gd::RessourcesLoader::Get();
|
||||
if ( !resLoader->SetResourceFile( executablePath+"/"+executableNameOnly+".egd" )
|
||||
if (!resLoader->SetResourceFile( executablePath+"/"+executableNameOnly+".egd" )
|
||||
&& !resLoader->SetResourceFile( executableNameOnly+".egd" )
|
||||
&& !resLoader->SetResourceFile( executablePath+"/gam.egd" )
|
||||
&& !resLoader->SetResourceFile( "gam.egd" ) )
|
||||
@@ -229,4 +231,4 @@ int AbortWithMessage(const std::string & message)
|
||||
MessageBox(NULL, message.c_str(), "Fatal error", MB_ICONERROR);
|
||||
#endif
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
@@ -18,12 +18,12 @@
|
||||
* @namespace gdjs
|
||||
* @constructor
|
||||
*/
|
||||
gdjs.Layer = function(name, runtimeScene)
|
||||
gdjs.Layer = function(layerData, runtimeScene)
|
||||
{
|
||||
this._name = name;
|
||||
this._name = layerData.name;
|
||||
this._cameraRotation = 0;
|
||||
this._zoomFactor = 1;
|
||||
this._hidden = false;
|
||||
this._hidden = !layerData.visibility;
|
||||
this._pixiRenderer = runtimeScene.getPIXIRenderer();
|
||||
this._pixiContainer = new PIXI.DisplayObjectContainer(); //The container of the layer
|
||||
this._cameraX = runtimeScene.getGame().getDefaultWidth()/2;
|
||||
@@ -32,6 +32,7 @@ gdjs.Layer = function(name, runtimeScene)
|
||||
this._defaultHeight = runtimeScene.getGame().getDefaultHeight();
|
||||
|
||||
runtimeScene.getPIXIContainer().addChild(this._pixiContainer);
|
||||
this.show(!this._hidden);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -79,8 +79,7 @@ gdjs.RuntimeScene.prototype.loadFromScene = function(sceneData) {
|
||||
//Load layers
|
||||
var that = this;
|
||||
gdjs.iterateOverArray(sceneData.layers, function(layerData) {
|
||||
var name = layerData.name;
|
||||
that._layers.put(name, new gdjs.Layer(name, that));
|
||||
that._layers.put(layerData.name, new gdjs.Layer(layerData, that));
|
||||
//console.log("Created layer : \""+name+"\".");
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 789 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 969 B After Width: | Height: | Size: 969 B |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
39
GDJS/tests/karma.conf.js
Normal file
@@ -0,0 +1,39 @@
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
frameworks: ['mocha'],
|
||||
|
||||
files: [
|
||||
'node_modules/expect.js/index.js',
|
||||
'../Runtime/libs/pixi.js',
|
||||
'../Runtime/libs/jshashtable.js',
|
||||
'../Runtime/gd.js',
|
||||
'../Runtime/libs/hshg.js',
|
||||
'../Runtime/commontools.js',
|
||||
'../Runtime/runtimeobject.js',
|
||||
'../Runtime/runtimescene.js',
|
||||
'../Runtime/polygon.js',
|
||||
'../Runtime/force.js',
|
||||
'../Runtime/layer.js',
|
||||
'../Runtime/timer.js',
|
||||
'../Runtime/imagemanager.js',
|
||||
'../Runtime/runtimegame.js',
|
||||
'../Runtime/variable.js',
|
||||
'../Runtime/variablescontainer.js',
|
||||
'../Runtime/eventscontext.js',
|
||||
'../Runtime/runtimescene.js',
|
||||
'../Runtime/runtimeautomatism.js',
|
||||
'../Runtime/runtimeobject.js',
|
||||
'../Runtime/spriteruntimeobject.js',
|
||||
'../Runtime/soundmanager.js',
|
||||
'../Runtime/runtimescenetools.js',
|
||||
'../Runtime/inputtools.js',
|
||||
'../Runtime/objecttools.js',
|
||||
'../Runtime/cameratools.js',
|
||||
'../Runtime/soundtools.js',
|
||||
'../Runtime/storagetools.js',
|
||||
'../Runtime/stringtools.js',
|
||||
'../Runtime/windowtools.js',
|
||||
'tests/**/*.js'
|
||||
]
|
||||
});
|
||||
};
|
25
GDJS/tests/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "GDJS-tests",
|
||||
"version": "0.0.0",
|
||||
"description": "Tests for the HTML5 engine of Game Develop",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "karma start --browsers Firefox --single-run"
|
||||
},
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"games",
|
||||
"engine",
|
||||
"Game",
|
||||
"Develop"
|
||||
],
|
||||
"author": "Florian Rival",
|
||||
"license": "LPGL",
|
||||
"dependencies": {
|
||||
"mocha": "^1.21.4",
|
||||
"karma": "^0.12.22",
|
||||
"karma-mocha": "^0.1.9",
|
||||
"karma-firefox-launcher": "^0.1.3",
|
||||
"expect.js": "^0.3.1"
|
||||
}
|
||||
}
|
5
GDJS/tests/tests/common.js
Normal file
@@ -0,0 +1,5 @@
|
||||
describe('gdjs', function() {
|
||||
it('should define gdjs', function() {
|
||||
expect(gdjs).to.be.ok();
|
||||
});
|
||||
});
|
@@ -27,8 +27,8 @@ cd ..\..
|
||||
|
||||
echo.
|
||||
echo --Ensuring GDC++ headers and pch up-to-date for release
|
||||
cd IDE/scripts
|
||||
call UpdateHeadersAndPCHRelease.bat
|
||||
cd GDCpp/scripts
|
||||
call CopyHeadersToGD.bat
|
||||
cd ..\..
|
||||
|
||||
echo.
|
||||
|