Merge pull request #10 from cocos2d/v3

update
This commit is contained in:
Jeff Wang 2014-09-17 19:19:19 +08:00
commit 721311f106
147 changed files with 10826 additions and 3624 deletions

View File

@ -1001,6 +1001,12 @@ Developers:
denpen
Fixed a bug that scroll view hidden picks up the touch events.
joewan
Fixed memory leak when use menu_selector
zhongfq
Optimize decompress jpg data
Retired Core Developers:
WenSheng Yang
Author of windows port, CCTextField,

View File

@ -1,4 +1,5 @@
cocos2d-x-3.3?? ??
[NEW] 3d: added `BillBoard`
[NEW] ActionManager: added removeAllActionsByTag()
[NEW] Audio: added new audio system for iOS and Android
[FIX] DrawNode: has any many functions as `DrawPrimitive`
@ -11,13 +12,16 @@ cocos2d-x-3.3?? ??
[FIX] C++: CMake works for Mac builds
[FIX] C++: Reorganized cocos2d/platform folder. Easier to add new platforms
[FIX] EditBox: moved to ui:EditBox
[FIX] External: ScrollView: scroll view hidden picks up the touch events
[FIX] FastTileMap: change indices to short because not all devices support int indices
[FIX] HttpClient: condition variable sleep on unrelated mutex
[FIX] Image: optimize decompress jpg data
[FIX] Label: outline effect may be wrong if outline width is big and font size is big too
[FIX] MenuItem: memory leak if using menu_selector
[FIX] MeshCommand: generate wrong meterial id which will cause problem that only first mesh is drawn
[FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()`
[FIX] Node: skew effect is wrong
[FIX] Node: setNormalizedPosition can not take effect if parent position is not changed
[FIX] External: ScrollView: scroll view hidden picks up the touch events
[FIX] TextureAtlas: may crash if only drawing part of it
[FIX] UI: Button: a button can not be touched if it only contains title
[FIX] UI: Button: title can not be scaled if a button is scaled
@ -49,17 +53,17 @@ cocos2d-x-3.3alpha0 Aug.28 2014
[NEW] UI: ui::Button: support customize how much zoom scale is when pressing a button
[NEW] UI: ui::PageView: added `customScrollThreshold`, could determine the swipe distance to trigger a PageView scroll event
[NEW] UI: ui::TextField: support utf8
[NEW] UI: ui::TextField: support set color and placehold color
[NEW] UI: ui::TextField: support set color and placeholder color
[NEW] UI: ui::Widget: support swallowing touch events
[NEW] Text: added getter and setter for TextColor
[FIX] EditBox: font size is not scaled when glview is scaled on Mac OS X
[FIX] EditBox: font size is not scaled when GLview is scaled on Mac OS X
[FIX] EditBox: began/end events not work
[FIX] Label: can not set charmap after it is created
[FIX] Label: setTextColor does not have any effect on Mac OS X
[FIX] Label: result of LabelTTF::getBoundingBox() is wrong
[FIX] Label: can not set outline color correctly if using system font on iOS
[FIX] Label: character edeg will be cut a little if character size is small
[FIX] Label: character edge will be cut a little if character size is small
[FIX] LabelBMFont: result of LabelBMFont::getBoundingBox() is wrong
[FIX] ListView: can not insert an item in specific position, it is added at bottom
[FIX] LoadingBar: position is changed if changing direction
@ -69,7 +73,7 @@ cocos2d-x-3.3alpha0 Aug.28 2014
[FIX] Scale9Sprite: new added sprite will be hidden
[FIX] Slider: if the UISlider is faded, the slide ball won't fade together
[FIX] Sprite: will turn black if opacity is set other than 255 and be added into SpriteBatchNode
[FIX] TabelView: can handle touch event though its parents are invisible
[FIX] TableView: can handle touch event though its parents are invisible
[FIX] TextField: can not use backspace to delete a character
[FIX] Widget: may crash if remove itself in touch call back function
[FIX] Widget: not support cascaded opacity and cascaded color by default
@ -78,7 +82,7 @@ cocos2d-x-3.3alpha0 Aug.28 2014
[FIX] VideoPlayer: video player not showing on iOS if it's not in FullScreen mode
[FIX] Others: can not import java library shift by engine correctly when using Eclispe on Android
[FIX] Others: optimize FPS contorl algorithm on Android
[FIX] Others: optimize FPS control algorithm on Android
[FIX] Lua-binding: replace dynamic_cast to std::is_base_of in object_to_luaval
@ -86,10 +90,10 @@ cocos2d-x-3.3alpha0 Aug.28 2014
cocos2d-x-3.2 Jul.17 2014
[NEW] Node: added getChildByName method for get a node that can be cast to Type T
[NEW] FileUtils: could add seach path and resolution order path in front
[NEW] FileUtils: could add search path and resolution order path in front
[FIX] Animation3D: getOrCreate is deprecated and replaced with Animation3D::create
[FIX] Animate3D: setSpeed() accept negtive value, which means play reverse, getPlayback and setPlayBack are deprecated
[FIX] Animate3D: setSpeed() accept negative value, which means play reverse, getPlayback and setPlayBack are deprecated
[FIX] EditBox: can not set/get text in password mode on Mac OS X
[FIX] Game Controller: joystick y value inversed on iOS
[FIX] GLView: cursor position is not correct if design resolution is different from device resolution
@ -141,7 +145,7 @@ cocos2d-x-3.2rc0 Jul.7 2014
[FIX] Node: Node::setScale(float) may not work properly
[FIX] Physics integration: child node can move with its father
[FIX] Physics integration: support scale
[FIX] Sprite3D: 20% performce improved, simplify shader, use VAO and batch draw
[FIX] Sprite3D: 20% performance improved, simplify shader, use VAO and batch draw
[FIX] Studio support: NodeReader may cause crash
[FIX] UIButton: doesn't support TTF font
[FIX] UIButton: `getTitleColor()` doesn't equal to the value set by `setTitleColor()`
@ -167,7 +171,7 @@ cocos2d-x-3.2-alpha0 Jun.17 2014
[FIX] Android: don't trigger EVENT_COME_TO_BACKGROUND event when go to background
[FIX] Cocos2dxGLSurfaceView.java: prevent flickering when opening another activity
[FIX] Director: Director->convertToUI() returns wrong value.
[FIX] GLProgram: not abort if shader compilation fails, just retuan false.
[FIX] GLProgram: not abort if shader compilation fails, just return false.
[FIX] GLProgramState: sampler can not be changed
[FIX] Image: Set jpeg save quality to 90
[FIX] Image: premultiply alpha when loading png file to resolve black border issue

View File

@ -27,7 +27,7 @@ cmake_minimum_required(VERSION 2.8)
project (Cocos2d-X)
# The version number
set(COCOS2D_X_VERSION 3.3.0)
set(COCOS2D_X_VERSION 3.3.0-beta0)
#set(CMAKE_C_COMPILER_INIT g++)
include(build/BuildHelpers.CMakeLists.txt)

View File

@ -21,12 +21,17 @@ cocos2d-x is:
Git user attention
-----------------------
1. After cloning the repo, please execute `download-deps.py` to download and install dependencies.
1. clone the repo from GitHub.
$ git clone git@github.com:cocos2d/cocos2d-x.git
2. After cloning the repo, please execute `download-deps.py` to download and install dependencies.
$ cd cocos2d-x
$ python download-deps.py
2. Please execute `download-deps.py` once you synchronize with this repo. If there aren't any updates, it will not download dependencies again.
3. After running `download-deps.py`.
$ cd cocos2d-x
$ git submodule update --init
How to start a new game
-----------------------

View File

@ -873,6 +873,9 @@
38FA2E77194AECF800FF2BE4 /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
3E2BDAD019BEA3410055CDCD /* NewAudioEngineTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDACE19BEA3410055CDCD /* NewAudioEngineTest.cpp */; };
3E2BDAD219BEA3E20055CDCD /* audio in Resources */ = {isa = PBXBuildFile; fileRef = 3E2BDAD119BEA3E20055CDCD /* audio */; };
3E2BDAFF19C5E5B40055CDCD /* audio in Resources */ = {isa = PBXBuildFile; fileRef = 3E2BDAD119BEA3E20055CDCD /* audio */; };
3E2BDB0119C5E5D40055CDCD /* background.wav in Resources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0019C5E5D40055CDCD /* background.wav */; };
3E2BDB0219C5E5D40055CDCD /* background.wav in Resources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0019C5E5D40055CDCD /* background.wav */; };
3E6177221960FAED00DE83F5 /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46A15FBE1807A4F9005B8026 /* libcocos2d iOS.a */; };
3E6177241960FAED00DE83F5 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D60AE43317F7FFE100757E4B /* CoreMotion.framework */; };
3E6177251960FAED00DE83F5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C6482E165F399D007D4F18 /* libz.dylib */; };
@ -2899,6 +2902,7 @@
3E2BDACE19BEA3410055CDCD /* NewAudioEngineTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewAudioEngineTest.cpp; sourceTree = "<group>"; };
3E2BDACF19BEA3410055CDCD /* NewAudioEngineTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewAudioEngineTest.h; sourceTree = "<group>"; };
3E2BDAD119BEA3E20055CDCD /* audio */ = {isa = PBXFileReference; lastKnownFileType = folder; name = audio; path = "../tests/cpp-tests/Resources/audio"; sourceTree = "<group>"; };
3E2BDB0019C5E5D40055CDCD /* background.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = background.wav; path = "../tests/cpp-tests/Resources/background.wav"; sourceTree = "<group>"; };
3E6176B71960FA6300DE83F5 /* AppDelegate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
3E6176B81960FA6300DE83F5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
3E6176B91960FA6300DE83F5 /* AppMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppMacros.h; sourceTree = "<group>"; };
@ -6456,6 +6460,7 @@
1AC35CA818CED83500F37B72 /* Resources */ = {
isa = PBXGroup;
children = (
3E2BDB0019C5E5D40055CDCD /* background.wav */,
3E2BDAD119BEA3E20055CDCD /* audio */,
38FA2E75194AECF800FF2BE4 /* ActionTimeline */,
B2507B6A192589AF00FA4972 /* Shaders3D */,
@ -7688,6 +7693,7 @@
15D1FD251998637C00302043 /* luaoc.lua in Resources */,
1AC35DD718CEE65200F37B72 /* Particles in Resources */,
15D1FD761998642800302043 /* experimentalUIConstants.lua in Resources */,
3E2BDB0219C5E5D40055CDCD /* background.wav in Resources */,
1AC35D9D18CEE5D100F37B72 /* Icon-120.png in Resources */,
15D1FD781998642800302043 /* GuiConstants.lua in Resources */,
15C90B3E18E66BF200D69802 /* http.lua in Resources */,
@ -7724,6 +7730,7 @@
15D1FCF81998637C00302043 /* Cocos2dConstants.lua in Resources */,
1AC35DD318CEE65200F37B72 /* Images in Resources */,
1AC35DF018CEE65B00F37B72 /* effect2.ogg in Resources */,
3E2BDAFF19C5E5B40055CDCD /* audio in Resources */,
1AC35DEB18CEE65B00F37B72 /* CocosBuilderExample.ccbproj in Resources */,
15D1FD56199863F900302043 /* DeprecatedExtensionFunc.lua in Resources */,
1AC35DCA18CEE65200F37B72 /* animations in Resources */,
@ -7854,6 +7861,7 @@
1AC35D0118CED84500F37B72 /* pew-pew-lei.wav in Resources */,
1AC35D0518CED84500F37B72 /* Shaders in Resources */,
1AC35CD318CED84500F37B72 /* background.ogg in Resources */,
3E2BDB0119C5E5D40055CDCD /* background.wav in Resources */,
1AC35CCB18CED84500F37B72 /* animations in Resources */,
3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */,
3E92EA861921A7720094CD21 /* Sprite3DTest in Resources */,

View File

@ -209,7 +209,6 @@ void ClippingNode::drawFullScreenQuadClearStencil()
};
auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_U_COLOR);
glProgram->retain();
int colorLocation = glProgram->getUniformLocation("u_color");
CHECK_GL_ERROR_DEBUG();
@ -221,15 +220,8 @@ void ClippingNode::drawFullScreenQuadClearStencil()
glProgram->setUniformLocationWith4fv(colorLocation, (GLfloat*) &color.r, 1);
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION );
GLuint vbo;
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(Vec2)*4, vertices, GL_STREAM_DRAW);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, 0);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glBindBuffer(GL_ARRAY_BUFFER, 0);
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, 4);

View File

@ -264,7 +264,7 @@ bool DrawNode::init()
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
glBindBuffer(GL_ARRAY_BUFFER, 0);
if (Configuration::getInstance()->supportsShareableVAO())
{
GL::bindVAO(0);

View File

@ -300,7 +300,7 @@ void TMXLayer::updateIndexBuffer()
{
if(nullptr == _indexBuffer)
{
_indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_UINT_32, (int)_indices.size());
_indexBuffer = IndexBuffer::create(IndexBuffer::IndexType::INDEX_TYPE_SHORT_16, (int)_indices.size());
CC_SAFE_RETAIN(_indexBuffer);
}
_indexBuffer->updateIndices(&_indices[0], (int)_indices.size(), 0);

View File

@ -241,7 +241,7 @@ protected:
bool _quadsDirty;
std::vector<int> _tileToQuadIndex;
std::vector<V3F_C4B_T2F_Quad> _totalQuads;
std::vector<int> _indices;
std::vector<GLushort> _indices;
std::map<int/*vertexZ*/, int/*offset to _indices by quads*/> _indicesVertexZOffsets;
std::unordered_map<int/*vertexZ*/, int/*number to quads*/> _indicesVertexZNumber;
std::vector<PrimitiveCommand> _renderCommands;

View File

@ -97,6 +97,11 @@ bool MenuItem::initWithCallback(const ccMenuCallback& callback)
MenuItem::~MenuItem()
{
}
void MenuItem::onExit()
{
Node::onExit();
CC_SAFE_RELEASE(_target);
}

View File

@ -81,6 +81,8 @@ public:
/** returns whether or not the item is selected */
virtual bool isSelected() const;
virtual void onExit() override;
/** set the callback to the menu item
* @code
* In js,can contain two params,the second param is jsptr

View File

@ -173,8 +173,8 @@
</Link>
<Lib>
<AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\chipmunk\prebuilt\wp8\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;libchipmunk.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">

View File

@ -118,8 +118,8 @@
</Link>
<Lib>
<AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
@ -144,8 +144,8 @@
</Link>
<Lib>
<AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
@ -170,8 +170,8 @@
</Link>
<Lib>
<AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -43,6 +43,7 @@ Mesh::Mesh()
, _visibleChanged(nullptr)
, _glProgramState(nullptr)
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
, _isTransparent(false)
{
}

View File

@ -132,8 +132,8 @@ protected:
Texture2D* _texture; //texture that submesh is using
MeshSkin* _skin; //skin
bool _visible; // is the submesh visible
bool _isTransparent; // is this mesh transparent, it is a property of material in fact
//since 3.3
std::string _name;
MeshIndexData* _meshIndexData;
GLProgramState* _glProgramState;

View File

@ -257,6 +257,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c
texParams.wrapT = textureData->wrapT;
tex->setTexParameters(texParams);
mesh->setTexture(tex);
mesh->_isTransparent = (materialData->getTextureData(NTextureData::Usage::Transparency) != nullptr);
}
}
@ -375,6 +376,7 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m
texParams.wrapT = textureData->wrapT;
tex->setTexParameters(texParams);
mesh->setTexture(tex);
mesh->_isTransparent = (materialData->getTextureData(NTextureData::Usage::Transparency) != nullptr);
}
}
@ -510,7 +512,10 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
}
//support tint and fade
meshCommand.setDisplayColor(Vec4(color.r, color.g, color.b, color.a));
renderer->addCommand(&meshCommand);
if (mesh->_isTransparent)
renderer->addCommandToTransparentQueue(&meshCommand);
else
renderer->addCommand(&meshCommand);
}
}

View File

@ -36,6 +36,7 @@
#define TIME_DELAY_PRECISION 0.0001
using namespace cocos2d;
using namespace cocos2d::experimental;
const int AudioEngine::INVAILD_AUDIO_ID = -1;
const float AudioEngine::TIME_UNKNOWN = -1.0f;
@ -235,6 +236,9 @@ void AudioEngine::remove(int audioID)
void AudioEngine::stopAll()
{
if(!_audioEngineImpl){
return;
}
_audioEngineImpl->stopAll();
auto itEnd = _audioIDInfoMap.end();
for (auto it = _audioIDInfoMap.begin(); it != itEnd; ++it)
@ -270,6 +274,9 @@ void AudioEngine::uncache(const std::string &filePath)
void AudioEngine::uncacheAll()
{
if(!_audioEngineImpl){
return;
}
stopAll();
_audioEngineImpl->uncacheAll();
}

View File

@ -39,6 +39,7 @@
#include <jni.h>
using namespace cocos2d;
using namespace cocos2d::experimental;
void PlayOverEvent(SLPlayItf caller, void* context, SLuint32 playEvent)
{
@ -251,7 +252,8 @@ void AudioEngineImpl::playerFinishCallback(SLPlayItf caller, SLuint32 playEvent)
{
iter->second._finishCallback(iter->second._audioID, *AudioEngine::_audioIDInfoMap[iter->second._audioID].filePath);
}
AudioEngine::stop(iter->second._audioID);
AudioEngine::remove(iter->second._audioID);
_audioPlayers.erase(iter);
break;
}
}

View File

@ -37,7 +37,7 @@
#define ERRORLOG(msg) log("fun:%s,line:%d,msg:%s",__func__,__LINE__,#msg)
NS_CC_BEGIN
namespace experimental{
class AudioEngineImpl;
class AudioPlayer
@ -102,7 +102,7 @@ private:
};
#endif // __AUDIO_ENGINE_INL_H_
}
NS_CC_END
#endif

View File

@ -36,6 +36,7 @@
#endif // ERROR
NS_CC_BEGIN
namespace experimental{
class EXPORT_DLL AudioProfile
{
@ -265,6 +266,7 @@ protected:
friend class AudioEngineImpl;
};
}
NS_CC_END
#endif // __AUDIO_ENGINE_H_

View File

@ -39,6 +39,7 @@
#define QUEUEBUFFER_TIME_STEP 0.1
NS_CC_BEGIN
namespace experimental{
class AudioEngineImpl;
class AudioPlayer;
@ -91,6 +92,7 @@ private:
friend class AudioPlayer;
} ;
}
NS_CC_END
#endif // __AUDIO_CACHE_H_

View File

@ -44,6 +44,7 @@ static ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* da
return;
}
using namespace cocos2d;
using namespace cocos2d::experimental;
AudioCache::AudioCache()
: _pcmData(nullptr)
@ -96,14 +97,14 @@ void AudioCache::readDataTask()
auto error = ExtAudioFileOpenURL(fileURL, &extRef);
if(error) {
printf("%s: ExtAudioFileOpenURL FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileOpenURL FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
// Get the audio data format
error = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat);
if(error) {
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
if (theFileFormat.mChannelsPerFrame > 2) {
@ -126,7 +127,7 @@ void AudioCache::readDataTask()
error = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(outputFormat), &outputFormat);
if(error) {
printf("%s: ExtAudioFileSetProperty FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileSetProperty FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}
@ -134,7 +135,7 @@ void AudioCache::readDataTask()
thePropertySize = sizeof(theFileLengthInFrames);
error = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames);
if(error) {
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitThread;
}

View File

@ -33,7 +33,7 @@
#include "AudioPlayer.h"
NS_CC_BEGIN
namespace experimental{
#define MAX_AUDIOINSTANCES 32
class AudioEngineThreadPool;
@ -88,6 +88,7 @@ private:
int _currentAudioID;
};
}
NS_CC_END
#endif // __AUDIO_ENGINE_INL_H_
#endif

View File

@ -31,6 +31,7 @@
#include "base/ccUtils.h"
using namespace cocos2d;
using namespace cocos2d::experimental;
static ALCdevice *s_ALDevice = nullptr;
static ALCcontext *s_ALContext = nullptr;
@ -47,88 +48,90 @@ static void AudioInterrupionListenerCallback(void* user_data, UInt32 interruptio
}
namespace cocos2d {
class AudioEngineThreadPool
{
public:
AudioEngineThreadPool()
: _running(true)
, _numThread(6)
namespace experimental {
class AudioEngineThreadPool
{
_threads.reserve(_numThread);
_tasks.reserve(_numThread);
public:
AudioEngineThreadPool()
: _running(true)
, _numThread(6)
{
_threads.reserve(_numThread);
_tasks.reserve(_numThread);
for (int index = 0; index < _numThread; ++index) {
_tasks.push_back(nullptr);
_threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,index) ) );
}
}
void addTask(const std::function<void()> &task){
_taskMutex.lock();
int targetIndex = -1;
for (int index = 0; index < _numThread; ++index) {
if (_tasks[index] == nullptr) {
targetIndex = index;
_tasks[index] = task;
break;
for (int index = 0; index < _numThread; ++index) {
_tasks.push_back(nullptr);
_threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,index) ) );
}
}
if (targetIndex == -1) {
_tasks.push_back(task);
_threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,_numThread) ) );
_numThread++;
}
_taskMutex.unlock();
_sleepCondition.notify_all();
}
void destroy()
{
_running = false;
_sleepCondition.notify_all();
for (int index = 0; index < _numThread; ++index) {
_threads[index].join();
}
}
private:
bool _running;
std::vector<std::thread> _threads;
std::vector< std::function<void ()> > _tasks;
void threadFunc(int index)
{
while (_running) {
std::function<void ()> task = nullptr;
void addTask(const std::function<void()> &task){
_taskMutex.lock();
task = _tasks[index];
_taskMutex.unlock();
if (nullptr == task)
{
std::unique_lock<std::mutex> lk(_sleepMutex);
_sleepCondition.wait(lk);
continue;
int targetIndex = -1;
for (int index = 0; index < _numThread; ++index) {
if (_tasks[index] == nullptr) {
targetIndex = index;
_tasks[index] = task;
break;
}
}
if (targetIndex == -1) {
_tasks.push_back(task);
_threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,_numThread) ) );
task();
_taskMutex.lock();
_tasks[index] = nullptr;
_numThread++;
}
_taskMutex.unlock();
_sleepCondition.notify_all();
}
}
int _numThread;
void destroy()
{
_running = false;
_sleepCondition.notify_all();
std::mutex _taskMutex;
std::mutex _sleepMutex;
std::condition_variable _sleepCondition;
for (int index = 0; index < _numThread; ++index) {
_threads[index].join();
}
}
};
private:
bool _running;
std::vector<std::thread> _threads;
std::vector< std::function<void ()> > _tasks;
void threadFunc(int index)
{
while (_running) {
std::function<void ()> task = nullptr;
_taskMutex.lock();
task = _tasks[index];
_taskMutex.unlock();
if (nullptr == task)
{
std::unique_lock<std::mutex> lk(_sleepMutex);
_sleepCondition.wait(lk);
continue;
}
task();
_taskMutex.lock();
_tasks[index] = nullptr;
_taskMutex.unlock();
}
}
int _numThread;
std::mutex _taskMutex;
std::mutex _sleepMutex;
std::condition_variable _sleepCondition;
};
}
}
AudioEngineImpl::AudioEngineImpl()

View File

@ -32,6 +32,8 @@
#include "CCPlatformMacros.h"
NS_CC_BEGIN
namespace experimental{
class AudioCache;
class AudioEngineImpl;
@ -70,6 +72,8 @@ private:
friend class AudioEngineImpl;
};
}
NS_CC_END
#endif // __AUDIO_PLAYER_H_
#endif

View File

@ -27,6 +27,7 @@
#import <AudioToolbox/ExtendedAudioFile.h>
using namespace cocos2d;
using namespace cocos2d::experimental;
AudioPlayer::AudioPlayer()
: _exitThread(false)
@ -120,7 +121,7 @@ void AudioPlayer::rotateBufferThread(int offsetFrame)
auto error = ExtAudioFileOpenURL(fileURL, &extRef);
if(error) {
printf("%s: ExtAudioFileOpenURL FAILED, Error = %d\n", __PRETTY_FUNCTION__, error);
printf("%s: ExtAudioFileOpenURL FAILED, Error = %ld\n", __PRETTY_FUNCTION__, error);
goto ExitBufferThread;
}

View File

@ -161,6 +161,7 @@ void MciPlayer::Stop()
{
_SendGenericCommand(MCI_STOP);
_playing = false;
_times = 0;
}
void MciPlayer::Rewind()

View File

@ -1008,7 +1008,19 @@ void Director::purgeDirector()
FontFreeType::shutdownFreeType();
// purge all managed caches
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
DrawPrimitives::free();
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
AnimationCache::destroyInstance();
SpriteFrameCache::destroyInstance();
GLProgramCache::destroyInstance();

View File

@ -1097,7 +1097,7 @@ void WidgetPropertiesReader0250::setPropsForTextFieldFromJsonDictionary(Widget*w
{
textField->setPlaceHolder(DICTOOL->getStringValue_json(options, "placeHolder"));
}
textField->setText(DICTOOL->getStringValue_json(options, "text"));
textField->setString(DICTOOL->getStringValue_json(options, "text"));
bool fs = DICTOOL->checkObjectExist_json(options, "fontSize");
if (fs)
{

View File

@ -63,7 +63,7 @@ namespace cocostudio
else if(key == P_PlaceHolder){
textField->setPlaceHolder(value);
}else if(key == P_Text){
textField->setText(value);
textField->setString(value);
}else if(key == P_FontSize){
textField->setFontSize(valueToInt(value));
}else if(key == P_FontName){
@ -96,7 +96,7 @@ namespace cocostudio
{
textField->setPlaceHolder(DICTOOL->getStringValue_json(options, P_PlaceHolder,"input words here"));
}
textField->setText(DICTOOL->getStringValue_json(options, P_Text,"Text Tield"));
textField->setString(DICTOOL->getStringValue_json(options, P_Text,"Text Tield"));
textField->setFontSize(DICTOOL->getIntValue_json(options, P_FontSize,20));

View File

@ -65,6 +65,8 @@ typedef size_t (*write_callback)(void *ptr, size_t size, size_t nmemb, void *str
static std::string s_cookieFilename = "";
static std::string s_sslCaFilename = "";
// Callback function used by libcurl for collect response data
static size_t writeData(void *ptr, size_t size, size_t nmemb, void *stream)
{
@ -205,8 +207,14 @@ static bool configureCURL(CURL *handle, char *errorBuffer)
if (code != CURLE_OK) {
return false;
}
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L);
if (s_sslCaFilename.empty()) {
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L);
} else {
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L);
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L);
curl_easy_setopt(handle, CURLOPT_CAINFO, s_sslCaFilename.c_str());
}
// FIXED #3224: The subthread of CCHttpClient interrupts main thread if timeout comes.
// Document is here: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOSIGNAL
@ -439,6 +447,11 @@ void HttpClient::enableCookies(const char* cookieFile) {
}
}
void HttpClient::setSSLVerification(const std::string& caFile)
{
s_sslCaFilename = caFile;
}
HttpClient::HttpClient()
: _timeoutForConnect(30)
, _timeoutForRead(60)

View File

@ -56,6 +56,13 @@ public:
/** Enable cookie support. **/
void enableCookies(const char* cookieFile);
/**
* Set root certificate path for SSL verification.
* @param caFile a full path of root certificate.
* if it is empty, SSL verification is disabled.
*/
void setSSLVerification(const std::string& caFile);
/**
* Add a get request to task queue
* @param request a HttpRequest object, which includes url, response callback etc.

View File

@ -751,7 +751,9 @@ std::string FileUtils::fullPathForFilename(const std::string &filename)
}
}
CCLOG("cocos2d: fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str());
if(isPopupNotify()){
CCLOG("cocos2d: fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str());
}
// FIXME: Should it return nullptr ? or an empty string ?
// The file wasn't found, return the file name passed in.

View File

@ -835,7 +835,6 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen)
/* libjpeg data structure for storing one row, that is, scanline of an image */
JSAMPROW row_pointer[1] = {0};
unsigned long location = 0;
unsigned int i = 0;
bool ret = false;
do
@ -885,8 +884,6 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen)
_width = cinfo.output_width;
_height = cinfo.output_height;
_hasPremultipliedAlpha = false;
row_pointer[0] = static_cast<unsigned char*>(malloc(cinfo.output_width*cinfo.output_components * sizeof(unsigned char)));
CC_BREAK_IF(! row_pointer[0]);
_dataLen = cinfo.output_width*cinfo.output_height*cinfo.output_components;
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
@ -896,28 +893,22 @@ bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen)
/* read one scan line at a time */
while (cinfo.output_scanline < cinfo.output_height)
{
jpeg_read_scanlines( &cinfo, row_pointer, 1 );
for (i=0; i<cinfo.output_width*cinfo.output_components; i++)
{
_data[location++] = row_pointer[0][i];
}
row_pointer[0] = _data + location;
location += cinfo.output_width*cinfo.output_components;
jpeg_read_scanlines(&cinfo, row_pointer, 1);
}
/* When read image file with broken data, jpeg_finish_decompress() may cause error.
* Besides, jpeg_destroy_decompress() shall deallocate and release all memory associated
* with the decompression object.
* So it doesn't need to call jpeg_finish_decompress().
*/
//jpeg_finish_decompress( &cinfo );
/* When read image file with broken data, jpeg_finish_decompress() may cause error.
* Besides, jpeg_destroy_decompress() shall deallocate and release all memory associated
* with the decompression object.
* So it doesn't need to call jpeg_finish_decompress().
*/
//jpeg_finish_decompress( &cinfo );
jpeg_destroy_decompress( &cinfo );
/* wrap up decompression, destroy objects, free pointers and close open files */
ret = true;
} while (0);
if (row_pointer[0] != nullptr)
{
free(row_pointer[0]);
};
return ret;
#else
return false;

View File

@ -101,7 +101,7 @@ GLViewImpl::GLViewImpl()
GLViewImpl::~GLViewImpl()
{
CCEAGLView *glview = (CCEAGLView*) _eaglview;
//CCEAGLView *glview = (CCEAGLView*) _eaglview;
//[glview release];
}

View File

@ -27,6 +27,10 @@
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCRenderer.h"
#include "base/CCDirector.h"
#include "xxhash.h"
NS_CC_BEGIN
@ -77,6 +81,7 @@ void PrimitiveCommand::execute() const
_glProgramState->apply(_mv);
_primitive->draw();
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_primitive->getCount());
}
NS_CC_END

View File

@ -0,0 +1,82 @@
--------------------------------
-- @module Animate3D
-- @extend ActionInterval
-- @parent_module cc
--------------------------------
--
-- @function [parent=#Animate3D] setSpeed
-- @param self
-- @param #float speed
--------------------------------
--
-- @function [parent=#Animate3D] setWeight
-- @param self
-- @param #float weight
--------------------------------
-- get & set speed, negative speed means playing reverse
-- @function [parent=#Animate3D] getSpeed
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- get & set blend weight, weight must positive
-- @function [parent=#Animate3D] getWeight
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @overload self, cc.Animation3D, float, float
-- @overload self, cc.Animation3D
-- @function [parent=#Animate3D] create
-- @param self
-- @param #cc.Animation3D animation
-- @param #float fromTime
-- @param #float duration
-- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D)
--------------------------------
-- animate transistion time
-- @function [parent=#Animate3D] getTransitionTime
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [parent=#Animate3D] startWithTarget
-- @param self
-- @param #cc.Node target
--------------------------------
--
-- @function [parent=#Animate3D] reverse
-- @param self
-- @return Animate3D#Animate3D ret (return value: cc.Animate3D)
--------------------------------
--
-- @function [parent=#Animate3D] clone
-- @param self
-- @return Animate3D#Animate3D ret (return value: cc.Animate3D)
--------------------------------
--
-- @function [parent=#Animate3D] stop
-- @param self
--------------------------------
--
-- @function [parent=#Animate3D] update
-- @param self
-- @param #float t
--------------------------------
--
-- @function [parent=#Animate3D] step
-- @param self
-- @param #float dt
return nil

View File

@ -0,0 +1,21 @@
--------------------------------
-- @module Animation3D
-- @extend Ref
-- @parent_module cc
--------------------------------
-- get duration
-- @function [parent=#Animation3D] getDuration
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- read all animation or only the animation with given animationName? animationName == "" read the first.
-- @function [parent=#Animation3D] create
-- @param self
-- @param #string filename
-- @param #string animationName
-- @return Animation3D#Animation3D ret (return value: cc.Animation3D)
return nil

View File

@ -0,0 +1,29 @@
--------------------------------
-- @module AttachNode
-- @extend Node
-- @parent_module cc
--------------------------------
-- creates an AttachNode<br>
-- param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent
-- @function [parent=#AttachNode] create
-- @param self
-- @param #cc.Bone3D attachBone
-- @return AttachNode#AttachNode ret (return value: cc.AttachNode)
--------------------------------
--
-- @function [parent=#AttachNode] getWorldToNodeTransform
-- @param self
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
--
-- @function [parent=#AttachNode] visit
-- @param self
-- @param #cc.Renderer renderer
-- @param #mat4_table parentTransform
-- @param #unsigned int parentFlags
return nil

View File

@ -0,0 +1,186 @@
--------------------------------
-- @module AudioEngine
-- @parent_module ccexp
--------------------------------
--
-- @function [parent=#AudioEngine] lazyInit
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the current playback position of an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return
-- @function [parent=#AudioEngine] setCurrentTime
-- @param self
-- @param #int audioID
-- @param #float time
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Gets the volume value of an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return volume value (range from 0.0 to 1.0)
-- @function [parent=#AudioEngine] getVolume
-- @param self
-- @param #int audioID
-- @return float#float ret (return value: float)
--------------------------------
-- Uncache the audio data from internal buffer.<br>
-- AudioEngine cache audio data on ios platform<br>
-- warning This can lead to stop related audio first.<br>
-- param filePath The path of an audio file
-- @function [parent=#AudioEngine] uncache
-- @param self
-- @param #string filePath
--------------------------------
-- Resume all suspended audio instances
-- @function [parent=#AudioEngine] resumeAll
-- @param self
--------------------------------
-- Stop all audio instances
-- @function [parent=#AudioEngine] stopAll
-- @param self
--------------------------------
-- Pause an audio instance.<br>
-- param audioID an audioID returned by the play2d function
-- @function [parent=#AudioEngine] pause
-- @param self
-- @param #int audioID
--------------------------------
-- Release related objects<br>
-- warning It must be called before the application exit
-- @function [parent=#AudioEngine] end
-- @param self
--------------------------------
--
-- @function [parent=#AudioEngine] getMaxAudioInstance
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Gets the current playback position of an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return the current playback position of an audio instance
-- @function [parent=#AudioEngine] getCurrentTime
-- @param self
-- @param #int audioID
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [parent=#AudioEngine] setMaxAudioInstance
-- @param self
-- @param #int maxInstances
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Checks whether an audio instance is loop.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return Whether or not an audio instance is loop.
-- @function [parent=#AudioEngine] isLoop
-- @param self
-- @param #int audioID
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Pause all playing audio instances
-- @function [parent=#AudioEngine] pauseAll
-- @param self
--------------------------------
-- Uncache all audio data from internal buffer.<br>
-- warning All audio will be stopped first.<br>
-- param
-- @function [parent=#AudioEngine] uncacheAll
-- @param self
--------------------------------
-- Sets volume for an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- param volume volume value (range from 0.0 to 1.0)
-- @function [parent=#AudioEngine] setVolume
-- @param self
-- @param #int audioID
-- @param #float volume
--------------------------------
-- Play 2d sound<br>
-- param filePath The path of an audio file<br>
-- param loop Whether audio instance loop or not<br>
-- param volume volume value (range from 0.0 to 1.0)<br>
-- param profile a profile for audio instance<br>
-- return an audio ID. It allows you to dynamically change the behavior of an audio instance on the fly.
-- @function [parent=#AudioEngine] play2d
-- @param self
-- @param #string filePath
-- @param #bool loop
-- @param #float volume
-- @param #cc.experimental::AudioProfile profile
-- @return int#int ret (return value: int)
--------------------------------
-- Returns the state of an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return the status of an audio instance
-- @function [parent=#AudioEngine] getState
-- @param self
-- @param #int audioID
-- @return int#int ret (return value: int)
--------------------------------
-- Resume an audio instance.<br>
-- param audioID an audioID returned by the play2d function
-- @function [parent=#AudioEngine] resume
-- @param self
-- @param #int audioID
--------------------------------
-- Stop an audio instance.<br>
-- param audioID an audioID returned by the play2d function
-- @function [parent=#AudioEngine] stop
-- @param self
-- @param #int audioID
--------------------------------
-- Gets the duration of an audio instance.<br>
-- param audioID an audioID returned by the play2d function<br>
-- return the duration of an audio instance
-- @function [parent=#AudioEngine] getDuration
-- @param self
-- @param #int audioID
-- @return float#float ret (return value: float)
--------------------------------
-- Sets whether an audio instance loop or not. <br>
-- param audioID an audioID returned by the play2d function<br>
-- param loop Whether audio instance loop or not
-- @function [parent=#AudioEngine] setLoop
-- @param self
-- @param #int audioID
-- @param #bool loop
--------------------------------
-- Gets the default profile of audio instances<br>
-- return the default profile of audio instances
-- @function [parent=#AudioEngine] getDefaultProfile
-- @param self
-- @return experimental::AudioProfile#experimental::AudioProfile ret (return value: cc.experimental::AudioProfile)
--------------------------------
-- @overload self, string
-- @overload self, int
-- @function [parent=#AudioEngine] getProfile
-- @param self
-- @param #int audioID
-- @return experimental::AudioProfile#experimental::AudioProfile ret (retunr value: cc.experimental::AudioProfile)
return nil

View File

@ -0,0 +1,11 @@
--------------------------------
-- @module AudioProfile
-- @parent_module ccexp
--------------------------------
--
-- @function [parent=#AudioProfile] AudioProfile
-- @param self
return nil

View File

@ -24,7 +24,15 @@
-- @param #bool able
--------------------------------
-- brief Return a zoom scale
-- Return the inner title renderer of Button<br>
-- since v3.3
-- @function [parent=#Button] getTitleRenderer
-- @param self
-- @return Label#Label ret (return value: cc.Label)
--------------------------------
-- brief Return a zoom scale <br>
-- since v3.3
-- @function [parent=#Button] getZoomScale
-- @param self
-- @return float#float ret (return value: float)
@ -166,7 +174,8 @@
--------------------------------
-- When user pressed the button, the button will zoom to a scale.<br>
-- The final scale of the button equals (button original scale + _zoomScale)
-- The final scale of the button equals (button original scale + _zoomScale)<br>
-- since v3.3
-- @function [parent=#Button] setZoomScale
-- @param self
-- @param #float scale

View File

@ -0,0 +1,259 @@
--------------------------------
-- @module EditBox
-- @extend Widget,IMEDelegate
-- @parent_module ccui
--------------------------------
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] keyboardDidShow
-- @param self
-- @param #cc.IMEKeyboardNotificationInfo info
--------------------------------
-- get a script Handler<br>
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] getScriptEditBoxHandler
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Get the text entered in the edit box.<br>
-- return The text entered in the edit box.
-- @function [parent=#EditBox] getText
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] keyboardDidHide
-- @param self
-- @param #cc.IMEKeyboardNotificationInfo info
--------------------------------
-- Set the placeholder's font name.<br>
-- param pFontName The font name.
-- @function [parent=#EditBox] setPlaceholderFontName
-- @param self
-- @param #char pFontName
--------------------------------
-- Get a text in the edit box that acts as a placeholder when an<br>
-- edit box is empty.
-- @function [parent=#EditBox] getPlaceHolder
-- @param self
-- @return char#char ret (return value: char)
--------------------------------
-- Set the font name.<br>
-- param pFontName The font name.
-- @function [parent=#EditBox] setFontName
-- @param self
-- @param #char pFontName
--------------------------------
-- Registers a script function that will be called for EditBox events.<br>
-- This handler will be removed automatically after onExit() called.<br>
-- code<br>
-- -- lua sample<br>
-- local function editboxEventHandler(eventType)<br>
-- if eventType == "began" then<br>
-- -- triggered when an edit box gains focus after keyboard is shown<br>
-- elseif eventType == "ended" then<br>
-- -- triggered when an edit box loses focus after keyboard is hidden.<br>
-- elseif eventType == "changed" then<br>
-- -- triggered when the edit box text was changed.<br>
-- elseif eventType == "return" then<br>
-- -- triggered when the return button was pressed or the outside area of keyboard was touched.<br>
-- end<br>
-- end<br>
-- local editbox = EditBox:create(Size(...), Scale9Sprite:create(...))<br>
-- editbox = registerScriptEditBoxHandler(editboxEventHandler)<br>
-- endcode<br>
-- param handler A number that indicates a lua function.<br>
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] registerScriptEditBoxHandler
-- @param self
-- @param #int handler
--------------------------------
-- Set the placeholder's font size.<br>
-- param fontSize The font size.
-- @function [parent=#EditBox] setPlaceholderFontSize
-- @param self
-- @param #int fontSize
--------------------------------
-- Set the input mode of the edit box.<br>
-- param inputMode One of the EditBox::InputMode constants.
-- @function [parent=#EditBox] setInputMode
-- @param self
-- @param #int inputMode
--------------------------------
-- Unregisters a script function that will be called for EditBox events.<br>
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] unregisterScriptEditBoxHandler
-- @param self
--------------------------------
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] keyboardWillShow
-- @param self
-- @param #cc.IMEKeyboardNotificationInfo info
--------------------------------
-- Set the font color of the placeholder text when the edit box is empty.<br>
-- Not supported on IOS.
-- @function [parent=#EditBox] setPlaceholderFontColor
-- @param self
-- @param #color3b_table color
--------------------------------
-- Set the font color of the widget's text.
-- @function [parent=#EditBox] setFontColor
-- @param self
-- @param #color3b_table color
--------------------------------
-- js NA<br>
-- lua NA
-- @function [parent=#EditBox] keyboardWillHide
-- @param self
-- @param #cc.IMEKeyboardNotificationInfo info
--------------------------------
--
-- @function [parent=#EditBox] touchDownAction
-- @param self
-- @param #cc.Ref sender
-- @param #int controlEvent
--------------------------------
-- Set the placeholder's font.<br>
-- param pFontName The font name.<br>
-- param fontSize The font size.
-- @function [parent=#EditBox] setPlaceholderFont
-- @param self
-- @param #char pFontName
-- @param #int fontSize
--------------------------------
-- Set the font size.<br>
-- param fontSize The font size.
-- @function [parent=#EditBox] setFontSize
-- @param self
-- @param #int fontSize
--------------------------------
-- @overload self, size_table, ccui.Scale9Sprite
-- @overload self, size_table, string, int
-- @function [parent=#EditBox] initWithSizeAndBackgroundSprite
-- @param self
-- @param #size_table size
-- @param #string pNormal9SpriteBg
-- @param #int texType
-- @return bool#bool ret (retunr value: bool)
--------------------------------
-- Set a text in the edit box that acts as a placeholder when an<br>
-- edit box is empty.<br>
-- param pText The given text.
-- @function [parent=#EditBox] setPlaceHolder
-- @param self
-- @param #char pText
--------------------------------
-- Set the return type that are to be applied to the edit box.<br>
-- param returnType One of the EditBox::KeyboardReturnType constants.
-- @function [parent=#EditBox] setReturnType
-- @param self
-- @param #int returnType
--------------------------------
-- Set the input flags that are to be applied to the edit box.<br>
-- param inputFlag One of the EditBox::InputFlag constants.
-- @function [parent=#EditBox] setInputFlag
-- @param self
-- @param #int inputFlag
--------------------------------
-- Gets the maximum input length of the edit box.<br>
-- return Maximum input length.
-- @function [parent=#EditBox] getMaxLength
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Set the text entered in the edit box.<br>
-- param pText The given text.
-- @function [parent=#EditBox] setText
-- @param self
-- @param #char pText
--------------------------------
-- Sets the maximum input length of the edit box.<br>
-- Setting this value enables multiline input mode by default.<br>
-- Available on Android, iOS and Windows Phone.<br>
-- param maxLength The maximum length.
-- @function [parent=#EditBox] setMaxLength
-- @param self
-- @param #int maxLength
--------------------------------
-- Set the font.<br>
-- param pFontName The font name.<br>
-- param fontSize The font size.
-- @function [parent=#EditBox] setFont
-- @param self
-- @param #char pFontName
-- @param #int fontSize
--------------------------------
-- @overload self, size_table, string, int
-- @overload self, size_table, ccui.Scale9Sprite, ccui.Scale9Sprite, ccui.Scale9Sprite
-- @function [parent=#EditBox] create
-- @param self
-- @param #size_table size
-- @param #ccui.Scale9Sprite normalSprite
-- @param #ccui.Scale9Sprite pressedSprite
-- @param #ccui.Scale9Sprite disabledSprite
-- @return EditBox#EditBox ret (retunr value: ccui.EditBox)
--------------------------------
--
-- @function [parent=#EditBox] setAnchorPoint
-- @param self
-- @param #vec2_table anchorPoint
--------------------------------
--
-- @function [parent=#EditBox] setPosition
-- @param self
-- @param #vec2_table pos
--------------------------------
--
-- @function [parent=#EditBox] setVisible
-- @param self
-- @param #bool visible
--------------------------------
--
-- @function [parent=#EditBox] setContentSize
-- @param self
-- @param #size_table size
--------------------------------
-- Constructor.<br>
-- js ctor
-- @function [parent=#EditBox] EditBox
-- @param self
return nil

View File

@ -0,0 +1,124 @@
--------------------------------
-- @module Mesh
-- @extend Ref
-- @parent_module cc
--------------------------------
-- get mesh vertex attribute count
-- @function [parent=#Mesh] getMeshVertexAttribCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- @overload self, cc.Texture2D
-- @overload self, string
-- @function [parent=#Mesh] setTexture
-- @param self
-- @param #string texPath
--------------------------------
-- mesh index data getter
-- @function [parent=#Mesh] getMeshIndexData
-- @param self
-- @return MeshIndexData#MeshIndexData ret (return value: cc.MeshIndexData)
--------------------------------
--
-- @function [parent=#Mesh] getTexture
-- @param self
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
--------------------------------
-- skin getter
-- @function [parent=#Mesh] getSkin
-- @param self
-- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin)
--------------------------------
-- name getter
-- @function [parent=#Mesh] getName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#Mesh] setBlendFunc
-- @param self
-- @param #cc.BlendFunc blendFunc
--------------------------------
-- get index format
-- @function [parent=#Mesh] getIndexFormat
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- get per vertex size in bytes
-- @function [parent=#Mesh] getVertexSizeInBytes
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
--
-- @function [parent=#Mesh] getBlendFunc
-- @param self
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
--------------------------------
-- get GLProgramState
-- @function [parent=#Mesh] getGLProgramState
-- @param self
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- get index count
-- @function [parent=#Mesh] getIndexCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- get vertex buffer
-- @function [parent=#Mesh] getVertexBuffer
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- get MeshVertexAttribute by index
-- @function [parent=#Mesh] getMeshVertexAttribute
-- @param self
-- @param #int idx
-- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib)
--------------------------------
--
-- @function [parent=#Mesh] isVisible
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- get index buffer
-- @function [parent=#Mesh] getIndexBuffer
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- has vertex attribute?
-- @function [parent=#Mesh] hasVertexAttrib
-- @param self
-- @param #int attrib
-- @return bool#bool ret (return value: bool)
--------------------------------
-- get primitive type
-- @function [parent=#Mesh] getPrimitiveType
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- visible getter and setter
-- @function [parent=#Mesh] setVisible
-- @param self
-- @param #bool visible
return nil

View File

@ -0,0 +1,52 @@
--------------------------------
-- @module Skeleton3D
-- @extend Ref
-- @parent_module cc
--------------------------------
--
-- @function [parent=#Skeleton3D] getBoneByName
-- @param self
-- @param #string id
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
--------------------------------
--
-- @function [parent=#Skeleton3D] getRootBone
-- @param self
-- @param #int index
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
--------------------------------
-- refresh bone world matrix
-- @function [parent=#Skeleton3D] updateBoneMatrix
-- @param self
--------------------------------
-- get bone
-- @function [parent=#Skeleton3D] getBoneByIndex
-- @param self
-- @param #unsigned int index
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
--------------------------------
-- get & set root bone
-- @function [parent=#Skeleton3D] getRootCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- get bone index
-- @function [parent=#Skeleton3D] getBoneIndex
-- @param self
-- @param #cc.Bone3D bone
-- @return int#int ret (return value: int)
--------------------------------
-- get total bone count
-- @function [parent=#Skeleton3D] getBoneCount
-- @param self
-- @return long#long ret (return value: long)
return nil

View File

@ -0,0 +1,110 @@
--------------------------------
-- @module Sprite3D
-- @extend Node,BlendProtocol
-- @parent_module cc
--------------------------------
--
-- @function [parent=#Sprite3D] setCullFaceEnabled
-- @param self
-- @param #bool enable
--------------------------------
-- @overload self, cc.Texture2D
-- @overload self, string
-- @function [parent=#Sprite3D] setTexture
-- @param self
-- @param #string texFile
--------------------------------
-- remove all attach nodes
-- @function [parent=#Sprite3D] removeAllAttachNode
-- @param self
--------------------------------
--
-- @function [parent=#Sprite3D] setBlendFunc
-- @param self
-- @param #cc.BlendFunc blendFunc
--------------------------------
-- get mesh
-- @function [parent=#Sprite3D] getMesh
-- @param self
-- @return Mesh#Mesh ret (return value: cc.Mesh)
--------------------------------
--
-- @function [parent=#Sprite3D] getBlendFunc
-- @param self
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
--------------------------------
--
-- @function [parent=#Sprite3D] setCullFace
-- @param self
-- @param #unsigned int cullFace
--------------------------------
-- remove attach node
-- @function [parent=#Sprite3D] removeAttachNode
-- @param self
-- @param #string boneName
--------------------------------
-- get SubMeshState by index
-- @function [parent=#Sprite3D] getMeshByIndex
-- @param self
-- @param #int index
-- @return Mesh#Mesh ret (return value: cc.Mesh)
--------------------------------
-- get SubMeshState by Name
-- @function [parent=#Sprite3D] getMeshByName
-- @param self
-- @param #string name
-- @return Mesh#Mesh ret (return value: cc.Mesh)
--------------------------------
--
-- @function [parent=#Sprite3D] getSkeleton
-- @param self
-- @return Skeleton3D#Skeleton3D ret (return value: cc.Skeleton3D)
--------------------------------
-- get AttachNode by bone name, return nullptr if not exist
-- @function [parent=#Sprite3D] getAttachNode
-- @param self
-- @param #string boneName
-- @return AttachNode#AttachNode ret (return value: cc.AttachNode)
--------------------------------
-- @overload self, string, string
-- @overload self, string
-- @function [parent=#Sprite3D] create
-- @param self
-- @param #string modelPath
-- @param #string texturePath
-- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D)
--------------------------------
-- Returns 2d bounding-box<br>
-- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate.
-- @function [parent=#Sprite3D] getBoundingBox
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
-- set GLProgramState, you should bind attributes by yourself
-- @function [parent=#Sprite3D] setGLProgramState
-- @param self
-- @param #cc.GLProgramState glProgramState
--------------------------------
-- just rember bind attributes
-- @function [parent=#Sprite3D] setGLProgram
-- @param self
-- @param #cc.GLProgram glprogram
return nil

View File

@ -39,7 +39,8 @@
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- brief Allow widget touch events to propagate to its parents. Set false will disable propagation
-- brief Allow widget touch events to propagate to its parents. Set false will disable propagation<br>
-- since v3.3
-- @function [parent=#Widget] setPropagateTouchEvents
-- @param self
-- @param #bool isPropagate
@ -59,7 +60,8 @@
-- @param #vec2_table percent
--------------------------------
-- brief Specify widget to swallow touches or not
-- brief Specify widget to swallow touches or not<br>
-- since v3.3
-- @function [parent=#Widget] setSwallowTouches
-- @param self
-- @param #bool swallow
@ -290,7 +292,8 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- Return whether the widget is propagate touch events to its parents or not<br>
-- since v3.3
-- @function [parent=#Widget] isPropagateTouchEvents
-- @param self
-- @return bool#bool ret (return value: bool)
@ -399,7 +402,8 @@
-- @param #bool bright
--------------------------------
--
-- Return whether the widget is swallowing touch or not<br>
-- since v3.3
-- @function [parent=#Widget] isSwallowTouches
-- @param self
-- @return bool#bool ret (return value: bool)

View File

@ -1,4 +1,34 @@
--------------------------------
-- @module cc
--------------------------------------------------------
-- the cc Skeleton3D
-- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module
--------------------------------------------------------
-- the cc Sprite3D
-- @field [parent=#cc] Sprite3D#Sprite3D Sprite3D preloaded module
--------------------------------------------------------
-- the cc Mesh
-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module
--------------------------------------------------------
-- the cc Animation3D
-- @field [parent=#cc] Animation3D#Animation3D Animation3D preloaded module
--------------------------------------------------------
-- the cc Animate3D
-- @field [parent=#cc] Animate3D#Animate3D Animate3D preloaded module
--------------------------------------------------------
-- the cc AttachNode
-- @field [parent=#cc] AttachNode#AttachNode AttachNode preloaded module
return nil

View File

@ -0,0 +1,14 @@
--------------------------------
-- @module ccexp
--------------------------------------------------------
-- the ccexp AudioProfile
-- @field [parent=#ccexp] AudioProfile#AudioProfile AudioProfile preloaded module
--------------------------------------------------------
-- the ccexp AudioEngine
-- @field [parent=#ccexp] AudioEngine#AudioEngine AudioEngine preloaded module
return nil

View File

@ -136,4 +136,9 @@
-- @field [parent=#ccui] Scale9Sprite#Scale9Sprite Scale9Sprite preloaded module
--------------------------------------------------------
-- the ccui EditBox
-- @field [parent=#ccui] EditBox#EditBox EditBox preloaded module
return nil

File diff suppressed because it is too large Load Diff

View File

@ -12,4 +12,58 @@ extern "C" {
int register_all_cocos2dx_3d(lua_State* tolua_S);
#endif // __cocos2dx_3d_h__

View File

@ -0,0 +1,909 @@
#include "lua_cocos2dx_audioengine_auto.hpp"
#include "AudioEngine.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
int lua_cocos2dx_audioengine_AudioProfile_constructor(lua_State* tolua_S)
{
int argc = 0;
cocos2d::experimental::AudioProfile* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cobj = new cocos2d::experimental::AudioProfile();
tolua_pushusertype(tolua_S,(void*)cobj,"ccexp.AudioProfile");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.AudioProfile:AudioProfile",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioProfile_constructor'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_audioengine_AudioProfile_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (AudioProfile)");
return 0;
}
int lua_register_cocos2dx_audioengine_AudioProfile(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccexp.AudioProfile");
tolua_cclass(tolua_S,"AudioProfile","ccexp.AudioProfile","",nullptr);
tolua_beginmodule(tolua_S,"AudioProfile");
tolua_function(tolua_S,"new",lua_cocos2dx_audioengine_AudioProfile_constructor);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::experimental::AudioProfile).name();
g_luaType[typeName] = "ccexp.AudioProfile";
g_typeCast["AudioProfile"] = "ccexp.AudioProfile";
return 1;
}
int lua_cocos2dx_audioengine_AudioEngine_lazyInit(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
bool ret = cocos2d::experimental::AudioEngine::lazyInit();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:lazyInit",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_lazyInit'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_setCurrentTime(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 2)
{
int arg0;
double arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setCurrentTime");
ok &= luaval_to_number(tolua_S, 3,&arg1, "ccexp.AudioEngine:setCurrentTime");
if(!ok)
return 0;
bool ret = cocos2d::experimental::AudioEngine::setCurrentTime(arg0, arg1);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setCurrentTime",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_setCurrentTime'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getVolume(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getVolume");
if(!ok)
return 0;
double ret = cocos2d::experimental::AudioEngine::getVolume(arg0);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getVolume",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getVolume'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_uncache(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:uncache");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::uncache(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:uncache",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_uncache'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_resumeAll(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::resumeAll();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:resumeAll",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_resumeAll'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_stopAll(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::stopAll();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:stopAll",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_stopAll'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_pause(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:pause");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::pause(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:pause",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_pause'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_end(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::end();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:end",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_end'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
int ret = cocos2d::experimental::AudioEngine::getMaxAudioInstance();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getMaxAudioInstance",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getCurrentTime(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getCurrentTime");
if(!ok)
return 0;
double ret = cocos2d::experimental::AudioEngine::getCurrentTime(arg0);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getCurrentTime",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getCurrentTime'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setMaxAudioInstance");
if(!ok)
return 0;
bool ret = cocos2d::experimental::AudioEngine::setMaxAudioInstance(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setMaxAudioInstance",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_isLoop(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:isLoop");
if(!ok)
return 0;
bool ret = cocos2d::experimental::AudioEngine::isLoop(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:isLoop",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_isLoop'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_pauseAll(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::pauseAll();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:pauseAll",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_pauseAll'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_uncacheAll(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::uncacheAll();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:uncacheAll",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_uncacheAll'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_setVolume(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 2)
{
int arg0;
double arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setVolume");
ok &= luaval_to_number(tolua_S, 3,&arg1, "ccexp.AudioEngine:setVolume");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::setVolume(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setVolume",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_setVolume'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
if(!ok)
return 0;
int ret = cocos2d::experimental::AudioEngine::play2d(arg0);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
if (argc == 2)
{
std::string arg0;
bool arg1;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
if(!ok)
return 0;
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
if (argc == 3)
{
std::string arg0;
bool arg1;
double arg2;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
ok &= luaval_to_number(tolua_S, 4,&arg2, "ccexp.AudioEngine:play2d");
if(!ok)
return 0;
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
if (argc == 4)
{
std::string arg0;
bool arg1;
double arg2;
const cocos2d::experimental::AudioProfile* arg3;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
ok &= luaval_to_number(tolua_S, 4,&arg2, "ccexp.AudioEngine:play2d");
ok &= luaval_to_object<const cocos2d::experimental::AudioProfile>(tolua_S, 5, "ccexp.AudioProfile",&arg3);
if(!ok)
return 0;
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2, arg3);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:play2d",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getState(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getState");
if(!ok)
return 0;
int ret = (int)cocos2d::experimental::AudioEngine::getState(arg0);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getState",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getState'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_resume(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:resume");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::resume(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:resume",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_resume'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_stop(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:stop");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::stop(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:stop",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_stop'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getDuration(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getDuration");
if(!ok)
return 0;
double ret = cocos2d::experimental::AudioEngine::getDuration(arg0);
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getDuration",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getDuration'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_setLoop(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 2)
{
int arg0;
bool arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setLoop");
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:setLoop");
if(!ok)
return 0;
cocos2d::experimental::AudioEngine::setLoop(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setLoop",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_setLoop'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getDefaultProfile();
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getDefaultProfile",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_audioengine_AudioEngine_getProfile(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:getProfile");
if (!ok) { break; }
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getProfile(arg0);
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getProfile");
if (!ok) { break; }
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getProfile(arg0);
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
return 1;
}
} while (0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "ccexp.AudioEngine:getProfile",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_getProfile'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_audioengine_AudioEngine_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (AudioEngine)");
return 0;
}
int lua_register_cocos2dx_audioengine_AudioEngine(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccexp.AudioEngine");
tolua_cclass(tolua_S,"AudioEngine","ccexp.AudioEngine","",nullptr);
tolua_beginmodule(tolua_S,"AudioEngine");
tolua_function(tolua_S,"lazyInit", lua_cocos2dx_audioengine_AudioEngine_lazyInit);
tolua_function(tolua_S,"setCurrentTime", lua_cocos2dx_audioengine_AudioEngine_setCurrentTime);
tolua_function(tolua_S,"getVolume", lua_cocos2dx_audioengine_AudioEngine_getVolume);
tolua_function(tolua_S,"uncache", lua_cocos2dx_audioengine_AudioEngine_uncache);
tolua_function(tolua_S,"resumeAll", lua_cocos2dx_audioengine_AudioEngine_resumeAll);
tolua_function(tolua_S,"stopAll", lua_cocos2dx_audioengine_AudioEngine_stopAll);
tolua_function(tolua_S,"pause", lua_cocos2dx_audioengine_AudioEngine_pause);
tolua_function(tolua_S,"end", lua_cocos2dx_audioengine_AudioEngine_end);
tolua_function(tolua_S,"getMaxAudioInstance", lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance);
tolua_function(tolua_S,"getCurrentTime", lua_cocos2dx_audioengine_AudioEngine_getCurrentTime);
tolua_function(tolua_S,"setMaxAudioInstance", lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance);
tolua_function(tolua_S,"isLoop", lua_cocos2dx_audioengine_AudioEngine_isLoop);
tolua_function(tolua_S,"pauseAll", lua_cocos2dx_audioengine_AudioEngine_pauseAll);
tolua_function(tolua_S,"uncacheAll", lua_cocos2dx_audioengine_AudioEngine_uncacheAll);
tolua_function(tolua_S,"setVolume", lua_cocos2dx_audioengine_AudioEngine_setVolume);
tolua_function(tolua_S,"play2d", lua_cocos2dx_audioengine_AudioEngine_play2d);
tolua_function(tolua_S,"getState", lua_cocos2dx_audioengine_AudioEngine_getState);
tolua_function(tolua_S,"resume", lua_cocos2dx_audioengine_AudioEngine_resume);
tolua_function(tolua_S,"stop", lua_cocos2dx_audioengine_AudioEngine_stop);
tolua_function(tolua_S,"getDuration", lua_cocos2dx_audioengine_AudioEngine_getDuration);
tolua_function(tolua_S,"setLoop", lua_cocos2dx_audioengine_AudioEngine_setLoop);
tolua_function(tolua_S,"getDefaultProfile", lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile);
tolua_function(tolua_S,"getProfile", lua_cocos2dx_audioengine_AudioEngine_getProfile);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::experimental::AudioEngine).name();
g_luaType[typeName] = "ccexp.AudioEngine";
g_typeCast["AudioEngine"] = "ccexp.AudioEngine";
return 1;
}
TOLUA_API int register_all_cocos2dx_audioengine(lua_State* tolua_S)
{
tolua_open(tolua_S);
tolua_module(tolua_S,"ccexp",0);
tolua_beginmodule(tolua_S,"ccexp");
lua_register_cocos2dx_audioengine_AudioProfile(tolua_S);
lua_register_cocos2dx_audioengine_AudioEngine(tolua_S);
tolua_endmodule(tolua_S);
return 1;
}

View File

@ -0,0 +1,41 @@
#include "base/ccConfig.h"
#ifndef __cocos2dx_audioengine_h__
#define __cocos2dx_audioengine_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_audioengine(lua_State* tolua_S);
#endif // __cocos2dx_audioengine_h__

File diff suppressed because it is too large Load Diff

View File

@ -429,6 +429,36 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);

View File

@ -0,0 +1,319 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS
#include "lua_cocos2dx_audioengine_manual.h"
#include "lua_cocos2dx_audioengine_auto.hpp"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
#include "CCLuaEngine.h"
#include "AudioEngine.h"
static int lua_get_AudioProfile_name(lua_State* L)
{
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_get_AudioProfile_name'\n", nullptr);
return 0;
}
#endif
lua_pushstring(L, self->name.c_str());
return 1;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_get_AudioProfile_name'.",&tolua_err);
return 0;
#endif
}
static int lua_set_AudioProfile_name(lua_State* L)
{
int argc = 0;
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_set_AudioProfile_name'\n", nullptr);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!tolua_isstring(L, 2, 0, &tolua_err))
goto tolua_lerror;
#endif
self->name = tolua_tostring(L, 2, 0);
return 0;
}
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_set_AudioProfile_name'.",&tolua_err);
return 0;
#endif
}
static int lua_get_AudioProfile_maxInstances(lua_State* L)
{
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_get_AudioProfile_maxInstances'\n", nullptr);
return 0;
}
#endif
tolua_pushnumber(L, (lua_Number)self->maxInstances);
return 1;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_get_AudioProfile_maxInstances'.",&tolua_err);
return 0;
#endif
}
static int lua_set_AudioProfile_maxInstances(lua_State* L)
{
int argc = 0;
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_set_AudioProfile_maxInstances'\n", nullptr);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(L, 2, 0, &tolua_err))
goto tolua_lerror;
#endif
self->maxInstances = (unsigned)tolua_tonumber(L, 2, 0);
return 0;
}
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_set_AudioProfile_maxInstances'.",&tolua_err);
return 0;
#endif
}
static int lua_get_AudioProfile_minDelay(lua_State* L)
{
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_get_AudioProfile_minDelay'\n", nullptr);
return 0;
}
#endif
tolua_pushnumber(L, (lua_Number)self->minDelay);
return 1;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_get_AudioProfile_minDelay'.",&tolua_err);
return 0;
#endif
}
static int lua_set_AudioProfile_minDelay(lua_State* L)
{
int argc = 0;
cocos2d::experimental::AudioProfile* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
#endif
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(L,"invalid 'self' in function 'lua_set_AudioProfile_minDelay'\n", nullptr);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(L, 2, 0, &tolua_err))
goto tolua_lerror;
#endif
self->minDelay = tolua_tonumber(L, 2, 0);
return 0;
}
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_set_AudioProfile_minDelay'.",&tolua_err);
return 0;
#endif
}
int lua_cocos2dx_audioengine_AudioEngine_setFinishCallback(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 2)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setFinishCallback");
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,3,"LUA_FUNCTION",0,&tolua_err))
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,3,0));
cocos2d::experimental::AudioEngine::setFinishCallback(arg0, [handler](int audioID, std::string filePath){
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
stack->pushInt(audioID);
stack->pushString(filePath.c_str());
stack->executeFunctionByHandler(handler, 2);
LuaEngine::getInstance()->removeScriptHandler(handler);
});
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setFinishCallback",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_setFinishCallback'.",&tolua_err);
#endif
return 0;
}
int register_audioengine_module(lua_State* L)
{
lua_getglobal(L, "_G");
if (lua_istable(L,-1))//stack:...,_G,
{
register_all_cocos2dx_audioengine(L);
if (L)
{
lua_pushstring(L, "ccexp.AudioProfile");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_variable(L, "name", lua_get_AudioProfile_name, lua_set_AudioProfile_name);
tolua_variable(L, "maxInstances", lua_get_AudioProfile_maxInstances, lua_set_AudioProfile_maxInstances);
tolua_variable(L, "minDelay", lua_get_AudioProfile_minDelay, lua_set_AudioProfile_minDelay);
}
lua_pop(L, 1);
lua_pushstring(L, "ccexp.AudioEngine");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "setFinishCallback", lua_cocos2dx_audioengine_AudioEngine_setFinishCallback);
}
lua_pop(L, 1);
}
}
lua_pop(L, 1);
return 1;
}
#endif

View File

@ -0,0 +1,40 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__
#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int register_audioengine_module(lua_State* L);
#endif
#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__

View File

@ -77,7 +77,7 @@ const char* CCBProxy::getNodeTypeName(Node* pNode)
return "cc.LayerColor";
}
if (NULL != dynamic_cast<Scale9Sprite*>(pNode)) {
if (NULL != dynamic_cast<ui::Scale9Sprite*>(pNode)) {
return "cc.LayerGradient";
}

View File

@ -356,110 +356,7 @@ static void extendControl(lua_State* tolua_S)
lua_pop(tolua_S, 1);
}
static int tolua_cocos2d_EditBox_registerScriptEditBoxHandler(lua_State* tolua_S)
{
if (NULL == tolua_S)
return 0;
int argc = 0;
EditBox* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"cc.EditBox",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<EditBox*>(tolua_tousertype(tolua_S,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_EditBox_registerScriptEditBoxHandler'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(tolua_S) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err))
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0));
self->registerScriptEditBoxHandler(handler);
return 0;
}
CCLOG("%s function of EditBox has wrong number of arguments: %d, was expecting %d\n", "cc.EditBox:registerScriptEditBoxHandler", argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_EditBox_registerScriptEditBoxHandler'.",&tolua_err);
return 0;
#endif
}
static int tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler(lua_State* tolua_S)
{
if (NULL == tolua_S)
return 0;
int argc = 0;
EditBox* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"cc.EditBox",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<EditBox*>(tolua_tousertype(tolua_S,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(tolua_S) - 1;
if (0 == argc)
{
self->unregisterScriptEditBoxHandler();
return 0;
}
CCLOG("%s function of EditBox has wrong number of arguments: %d, was expecting %d\n", "cc.EditBox:unregisterScriptEditBoxHandler", argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler'.",&tolua_err);
return 0;
#endif
}
static void extendEditBox(lua_State* tolua_S)
{
lua_pushstring(tolua_S, "cc.EditBox");
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
if (lua_istable(tolua_S,-1))
{
lua_pushstring(tolua_S,"registerScriptEditBoxHandler");
lua_pushcfunction(tolua_S,tolua_cocos2d_EditBox_registerScriptEditBoxHandler );
lua_rawset(tolua_S,-3);
lua_pushstring(tolua_S,"unregisterScriptEditBoxHandler");
lua_pushcfunction(tolua_S,tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
class LuaAssetsManagerDelegateProtocol:public Ref, public AssetsManagerDelegateProtocol
{
@ -1045,7 +942,6 @@ static void extendTableView(lua_State* L)
int register_all_cocos2dx_extension_manual(lua_State* tolua_S)
{
extendControl(tolua_S);
/* extendEditBox(tolua_S); */
extendAssetsManager(tolua_S);
extendScrollView(tolua_S);
extendTableView(tolua_S);

View File

@ -671,6 +671,112 @@ static void extendLayoutParameter(lua_State* L)
lua_pop(L, 1);
}
static int tolua_cocos2d_EditBox_registerScriptEditBoxHandler(lua_State* tolua_S)
{
if (NULL == tolua_S)
return 0;
int argc = 0;
EditBox* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"ccui.EditBox",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<EditBox*>(tolua_tousertype(tolua_S,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_EditBox_registerScriptEditBoxHandler'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(tolua_S) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err))
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0));
self->registerScriptEditBoxHandler(handler);
return 0;
}
CCLOG("%s function of EditBox has wrong number of arguments: %d, was expecting %d\n", "ccui.EditBox:registerScriptEditBoxHandler", argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_EditBox_registerScriptEditBoxHandler'.",&tolua_err);
return 0;
#endif
}
static int tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler(lua_State* tolua_S)
{
if (NULL == tolua_S)
return 0;
int argc = 0;
EditBox* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"ccui.EditBox",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<EditBox*>(tolua_tousertype(tolua_S,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(tolua_S) - 1;
if (0 == argc)
{
self->unregisterScriptEditBoxHandler();
return 0;
}
CCLOG("%s function of EditBox has wrong number of arguments: %d, was expecting %d\n", "ccui.EditBox:unregisterScriptEditBoxHandler", argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler'.",&tolua_err);
return 0;
#endif
}
static void extendEditBox(lua_State* tolua_S)
{
lua_pushstring(tolua_S, "ccui.EditBox");
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
if (lua_istable(tolua_S,-1))
{
lua_pushstring(tolua_S,"registerScriptEditBoxHandler");
lua_pushcfunction(tolua_S,tolua_cocos2d_EditBox_registerScriptEditBoxHandler );
lua_rawset(tolua_S,-3);
lua_pushstring(tolua_S,"unregisterScriptEditBoxHandler");
lua_pushcfunction(tolua_S,tolua_cocos2d_EditBox_unregisterScriptEditBoxHandler );
lua_rawset(tolua_S,-3);
}
lua_pop(tolua_S, 1);
}
int register_all_cocos2dx_ui_manual(lua_State* L)
{
if (nullptr == L)
@ -683,6 +789,7 @@ int register_all_cocos2dx_ui_manual(lua_State* L)
extendScrollView(L);
extendListView(L);
extendLayoutParameter(L);
extendEditBox(L);
return 0;
}

View File

@ -28,7 +28,9 @@ LOCAL_SRC_FILES := ../manual/CCLuaBridge.cpp \
../../../../external/lua/tolua/tolua_map.c \
../../../../external/lua/tolua/tolua_push.c \
../../../../external/lua/tolua/tolua_to.c \
../../../../external/xxtea/xxtea.cpp
../../../../external/xxtea/xxtea.cpp \
../auto/lua_cocos2dx_audioengine_auto.cpp \
../manual/audioengine/lua_cocos2dx_audioengine_manual.cpp
#3d
LOCAL_SRC_FILES += ../manual/3d/lua_cocos2dx_3d_manual.cpp \
@ -100,6 +102,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \
$(LOCAL_PATH)/../manual/cocos2d \
$(LOCAL_PATH)/../manual/3d \
$(LOCAL_PATH)/../manual/cocosdenshion \
$(LOCAL_PATH)/../manual/audioengine \
$(LOCAL_PATH)/../manual/network \
$(LOCAL_PATH)/../manual/extension \
$(LOCAL_PATH)/../manual/cocostudio \
@ -121,6 +124,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \
$(LOCAL_PATH)/../manual/cocos2d \
$(LOCAL_PATH)/../manual/3d \
$(LOCAL_PATH)/../manual/cocosdenshion \
$(LOCAL_PATH)/../manual/audioengine \
$(LOCAL_PATH)/../manual/network \
$(LOCAL_PATH)/../manual/cocosbuilder \
$(LOCAL_PATH)/../manual/cocostudio \

View File

@ -236,6 +236,10 @@
15EFA64E198B3342000C57D3 /* lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E718CD8F470087CE3A /* lua.h */; };
15EFA64F198B3342000C57D3 /* luaconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E818CD8F470087CE3A /* luaconf.h */; };
15EFA650198B3342000C57D3 /* lualib.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E918CD8F470087CE3A /* lualib.h */; };
3E2BDB0519C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0319C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp */; };
3E2BDB0619C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */; };
3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */; };
3E2BDB0B19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */; };
566F015F19B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */; };
566F016019B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */; };
566F016119B5EB0F00FCA620 /* CustomGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */; };
@ -368,6 +372,10 @@
1ABCA1FF18CD8F6E0087CE3A /* tolua++.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tolua++.h"; path = "../../../../external/lua/tolua/tolua++.h"; sourceTree = "<group>"; };
2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_ui_auto.cpp; sourceTree = "<group>"; };
2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_ui_auto.hpp; sourceTree = "<group>"; };
3E2BDB0319C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_audioengine_auto.cpp; sourceTree = "<group>"; };
3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_audioengine_auto.hpp; sourceTree = "<group>"; };
3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_audioengine_manual.cpp; sourceTree = "<group>"; };
3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_audioengine_manual.h; sourceTree = "<group>"; };
566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomGUIReader.cpp; sourceTree = "<group>"; };
566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIReader.h; sourceTree = "<group>"; };
C0D9BAFA1974D30000EC35BB /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../../../external/lua/lua/prebuilt/ios/liblua.a; sourceTree = "<group>"; };
@ -524,6 +532,8 @@
1AACE74818BC45C200215002 /* auto */ = {
isa = PBXGroup;
children = (
3E2BDB0319C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp */,
3E2BDB0419C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp */,
1516227F19A0F3E3006099B8 /* lua_cocos2dx_3d_auto.cpp */,
1516228019A0F3E3006099B8 /* lua_cocos2dx_3d_auto.hpp */,
15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */,
@ -554,6 +564,7 @@
1AACE75B18BC45C200215002 /* manual */ = {
isa = PBXGroup;
children = (
3E2BDB0719C5E6100055CDCD /* audioengine */,
158C128419A0FA1300781A76 /* 3d */,
15427D41198F73F700DC375D /* cocosdenshion */,
15EFA400198B2AB2000C57D3 /* cocostudio */,
@ -703,6 +714,15 @@
path = ../../../../external/lua/luasocket;
sourceTree = "<group>";
};
3E2BDB0719C5E6100055CDCD /* audioengine */ = {
isa = PBXGroup;
children = (
3E2BDB0819C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp */,
3E2BDB0919C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h */,
);
path = audioengine;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@ -790,6 +810,7 @@
15EFA64C198B3320000C57D3 /* tolua++.h in Headers */,
155C7DF919A71C4500F08B25 /* lua_cocos2dx_cocosdenshion_manual.h in Headers */,
15415AB019A71A53004F1E71 /* except.h in Headers */,
3E2BDB0B19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.h in Headers */,
155C7E0519A71C6F00F08B25 /* lua_cocos2dx_cocosbuilder_manual.h in Headers */,
15415ACC19A71A53004F1E71 /* socket.h in Headers */,
15415AE019A71A53004F1E71 /* usocket.h in Headers */,
@ -825,6 +846,7 @@
15415AC819A71A53004F1E71 /* select.h in Headers */,
155C7E1D19A71CC300F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */,
15EFA624198B2E74000C57D3 /* lua_cocos2dx_physics_auto.hpp in Headers */,
3E2BDB0619C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.hpp in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -967,6 +989,7 @@
files = (
15415AC619A71A53004F1E71 /* select.c in Sources */,
15EFA646198B3311000C57D3 /* tolua_event.c in Sources */,
3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */,
15415AA619A71A53004F1E71 /* auxiliar.c in Sources */,
15EFA647198B3311000C57D3 /* tolua_is.c in Sources */,
15EFA648198B3311000C57D3 /* tolua_map.c in Sources */,
@ -1008,6 +1031,7 @@
155C7DEA19A71BDA00F08B25 /* lua_cocos2dx_3d_auto.cpp in Sources */,
566F016019B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */,
155C7DF119A71C2300F08B25 /* lua_cocos2dx_studio_auto.cpp in Sources */,
3E2BDB0519C5E5FE0055CDCD /* lua_cocos2dx_audioengine_auto.cpp in Sources */,
155C7E0B19A71C8D00F08B25 /* lua_cocos2dx_network_manual.cpp in Sources */,
15415AAE19A71A53004F1E71 /* except.c in Sources */,
15415AAA19A71A53004F1E71 /* buffer.c in Sources */,

View File

@ -499,3 +499,6 @@ cc.ConfigType =
NONE = 0,
COCOSTUDIO = 1,
}
cc.AUDIO_INVAILD_ID = -1
cc.AUDIO_TIME_UNKNOWN = -1.0

View File

@ -17,10 +17,17 @@ _G["CCControl"] = DeprecatedExtensionClass.CCControl()
--CCEditBox class will be Deprecated,begin
function DeprecatedExtensionClass.CCEditBox()
deprecatedTip("CCEditBox","cc.EditBox")
return cc.EditBox
deprecatedTip("CCEditBox","ccui.EditBox")
return ccui.EditBox
end
_G["CCEditBox"] = DeprecatedExtensionClass.CCEditBox()
function DeprecatedExtensionClass.CCUIEditBox()
deprecatedTip("cc.EditBox","ccui.EditBox")
return ccui.EditBox
end
_G["cc"]["EditBox"] = DeprecatedExtensionClass.CCUIEditBox()
--CCEditBox class will be Deprecated,end
--CCScrollView class will be Deprecated,begin
@ -97,10 +104,16 @@ _G["CCControlButton"] = DeprecatedExtensionClass.CCControlButton()
--CCScale9Sprite class will be Deprecated,begin
function DeprecatedExtensionClass.CCScale9Sprite()
deprecatedTip("CCScale9Sprite","cc.Scale9Sprite")
return cc.Scale9Sprite
deprecatedTip("CCScale9Sprite","ccui.Scale9Sprite")
return ccui.Scale9Sprite
end
_G["CCScale9Sprite"] = DeprecatedExtensionClass.CCScale9Sprite()
function DeprecatedExtensionClass.UIScale9Sprite()
deprecatedTip("cc.Scale9Sprite","ccui.Scale9Sprite")
return ccui.Scale9Sprite
end
_G["cc"]["Scale9Sprite"] = DeprecatedExtensionClass.UIScale9Sprite()
--CCScale9Sprite class will be Deprecated,end
--CCControlColourPicker class will be Deprecated,begin

View File

@ -67,5 +67,6 @@
#define CREATE_CLASS_WIDGET_READER_INFO(className) \
cocos2d::ObjectFactory::TInfo(#className, &className::createInstance) \
#define CC_VIDEOPLAYER_DEBUG_DRAW 0
#endif /* defined(__TestCpp__GUIDefine__) */

View File

@ -362,15 +362,23 @@ void Button::onPressStateChangedToNormal()
{
if (_pressedActionEnabled)
{
this->stopAllActions();
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, 1.0, 1.0);
this->runAction(zoomAction);
_buttonNormalRenderer->stopAllActions();
_buttonClickedRenderer->stopAllActions();
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, _normalTextureScaleXInSize, _normalTextureScaleYInSize);
_buttonNormalRenderer->runAction(zoomAction);
_buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize);
_titleRenderer->stopAllActions();
_titleRenderer->runAction(zoomAction->clone());
}
}
else
{
this->stopAllActions();
this->setScale(1.0, 1.0);
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
_titleRenderer->stopAllActions();
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
}
}
@ -384,9 +392,15 @@ void Button::onPressStateChangedToPressed()
if (_pressedActionEnabled)
{
this->stopAllActions();
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, 1.0 + _zoomScale, 1.0 + _zoomScale);
this->runAction(zoomAction);
_buttonNormalRenderer->stopAllActions();
_buttonClickedRenderer->stopAllActions();
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, _pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
_buttonClickedRenderer->runAction(zoomAction);
_buttonNormalRenderer->setScale(_pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
_titleRenderer->stopAllActions();
//we must call zoomAction->clone here
_titleRenderer->runAction(zoomAction->clone());
}
}
else
@ -400,8 +414,12 @@ void Button::onPressStateChangedToPressed()
}
else
{
this->stopAllActions();
this->setScale(1.0 +_zoomScale, 1.0 + _zoomScale);
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize +_zoomScale, _normalTextureScaleYInSize + _zoomScale);
_titleRenderer->stopAllActions();
_titleRenderer->setScaleX(_normalTextureScaleXInSize + _zoomScale);
_titleRenderer->setScaleY(_normalTextureScaleYInSize + _zoomScale);
}
}
}
@ -411,6 +429,8 @@ void Button::onPressStateChangedToDisabled()
_buttonNormalRenderer->setVisible(false);
_buttonClickedRenderer->setVisible(false);
_buttonDisableRenderer->setVisible(true);
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
_buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize);
}
void Button::updateFlippedX()
@ -528,6 +548,7 @@ void Button::normalTextureScaleChangedWithSize()
_normalTextureScaleYInSize = scaleY;
}
}
_buttonNormalRenderer->setPosition(_contentSize.width / 2.0f, _contentSize.height / 2.0f);
}
@ -670,6 +691,11 @@ void Button::setTitleFontName(const std::string& fontName)
_fontName = fontName;
}
Label* Button::getTitleRenderer()const
{
return _titleRenderer;
}
const std::string& Button::getTitleFontName() const
{
return _fontName;

View File

@ -175,6 +175,12 @@ public:
//override "getVirtualRenderer" method of widget.
virtual Node* getVirtualRenderer() override;
/**
* Return the inner title renderer of Button
* @since v3.3
*/
Label* getTitleRenderer()const;
/**
* Returns the "class name" of widget.
*/
@ -190,10 +196,12 @@ public:
const std::string& getTitleFontName() const;
/** When user pressed the button, the button will zoom to a scale.
* The final scale of the button equals (button original scale + _zoomScale)
* @since v3.3
*/
void setZoomScale(float scale);
/**
* @brief Return a zoom scale
* @since v3.3
*/
float getZoomScale()const;

View File

@ -367,7 +367,6 @@ void Layout::drawFullScreenQuadClearStencil()
};
auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_U_COLOR);
glProgram->retain();
int colorLocation = glProgram->getUniformLocation("u_color");
CHECK_GL_ERROR_DEBUG();
@ -380,14 +379,8 @@ void Layout::drawFullScreenQuadClearStencil()
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION );
GLuint vbo;
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(Vec2)*4, vertices, GL_STREAM_DRAW);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, 0);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glBindBuffer(GL_ARRAY_BUFFER, 0);
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, 4);

View File

@ -278,7 +278,7 @@ VideoPlayer::VideoPlayer()
#if CC_VIDEOPLAYER_DEBUG_DRAW
_debugDrawNode = DrawNode::create();
addchild(_debugDrawNode);
addChild(_debugDrawNode);
#endif
}
@ -338,7 +338,7 @@ void VideoPlayer::draw(Renderer* renderer, const Mat4 &transform, uint32_t flags
Point(size.width, size.height),
Point(0, size.height)
};
_debugdrawNode->drawPoly(vertices, 4, true, Color4F(1.0, 1.0, 1.0, 1.0));
_debugDrawNode->drawPoly(vertices, 4, true, Color4F(1.0, 1.0, 1.0, 1.0));
#endif
}

View File

@ -35,7 +35,11 @@ namespace experimental{
namespace ui{
WebView::WebView()
: _impl(new WebViewImpl(this))
: _impl(new WebViewImpl(this)),
_onJSCallback(nullptr),
_onShouldStartLoading(nullptr),
_onDidFinishLoading(nullptr),
_onDidFailLoading(nullptr)
{
}
@ -74,9 +78,9 @@ namespace experimental{
_impl->loadHTMLString(string, baseURL);
}
void WebView::loadUrl(const std::string &url)
void WebView::loadURL(const std::string &url)
{
_impl->loadUrl(url);
_impl->loadURL(url);
}
void WebView::loadFile(const std::string &fileName)
@ -135,6 +139,65 @@ namespace experimental{
Node::setVisible(visible);
_impl->setVisible(visible);
}
cocos2d::ui::Widget* WebView::createCloneInstance()
{
return WebView::create();
}
void WebView::copySpecialProperties(Widget* model)
{
WebView* webView = dynamic_cast<WebView*>(model);
if (webView)
{
this->_impl = webView->_impl;
this->_onShouldStartLoading = webView->_onShouldStartLoading;
this->_onDidFinishLoading = webView->_onDidFinishLoading;
this->_onDidFailLoading = webView->_onDidFailLoading;
this->_onJSCallback = webView->_onJSCallback;
}
}
void WebView::setOnDidFailLoading(const ccWebViewCallbak &callback)
{
_onDidFailLoading = callback;
}
void WebView::setOnDidFinishLoading(const ccWebViewCallbak &callback)
{
_onDidFinishLoading = callback;
}
void WebView::setOnShouldStartLoading(const std::function<bool(WebView *sender, std::string url)> &callback)
{
_onShouldStartLoading = callback;
}
void WebView::setOnJSCallback(const ccWebViewCallbak &callback)
{
_onJSCallback = callback;
}
std::function<bool(WebView *sender, std::string url)> WebView::getOnShouldStartLoading()const
{
return _onShouldStartLoading;
}
WebView::ccWebViewCallbak WebView::getOnDidFailLoading()const
{
return _onDidFailLoading;
}
WebView::ccWebViewCallbak WebView::getOnDidFinishLoading()const
{
return _onDidFinishLoading;
}
WebView::ccWebViewCallbak WebView::getOnJSCallback()const
{
return _onJSCallback;
}
} // namespace ui
} // namespace experimental
} //namespace cocos2d

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifndef __Cocos2d_Plugin_WebView_H_
#define __Cocos2d_Plugin_WebView_H_
#ifndef __COCOS2D_UI_WEBVIEW_H
#define __COCOS2D_UI_WEBVIEW_H
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
@ -44,46 +44,12 @@ public:
*/
static WebView *create();
/**
* Default constructor
*/
WebView();
/**
* Default destructor
*/
virtual ~WebView();
/**
* Call before a web view begins loading.
* @param sender The web view that is about to load new content.
* @param url content URL.
* @return YES if the web view should begin loading content; otherwise, NO .
*/
std::function<bool(WebView *sender, std::string url)> shouldStartLoading;
/**
* Call after a web view finishes loading.
* @param sender The web view that has finished loading.
* @param url content URL.
*/
std::function<void(WebView *sender, std::string url)> didFinishLoading;
/**
* Call if a web view failed to load content.
* @param sender The web view that has failed loading.
* @param url content URL.
*/
std::function<void(WebView *sender, std::string url)> didFailLoading;
/**
* Set javascript interface scheme.
* @see #onJsCallback
*/
void setJavascriptInterfaceScheme(const std::string &scheme);
/**
* This callback called when load URL that start with javascript interface scheme.
*/
std::function<void(WebView *sender, std::string message)> onJsCallback;
/**
* Sets the main page contents, MIME type, content encoding, and base URL.
@ -109,7 +75,7 @@ public:
* Loads the given URL.
* @param url content URL
*/
void loadUrl(const std::string &url);
void loadURL(const std::string &url);
/**
* Loads the given fileName.
@ -163,8 +129,66 @@ public:
virtual void setVisible(bool visible) override;
typedef std::function<void(WebView *sender, std::string url)> ccWebViewCallbak;
/**
* Call before a web view begins loading.
* @param sender The web view that is about to load new content.
* @param url content URL.
* @return YES if the web view should begin loading content; otherwise, NO .
*/
void setOnShouldStartLoading(const std::function<bool(WebView *sender, std::string url)>& callback);
/**
* Call after a web view finishes loading.
* @param sender The web view that has finished loading.
* @param url content URL.
*/
void setOnDidFinishLoading(const ccWebViewCallbak& callback);
/**
* Call if a web view failed to load content.
* @param sender The web view that has failed loading.
* @param url content URL.
*/
void setOnDidFailLoading(const ccWebViewCallbak& callback);
/**
* This callback called when load URL that start with javascript interface scheme.
*/
void setOnJSCallback(const ccWebViewCallbak& callback);
std::function<bool(WebView *sender, std::string url)> getOnShouldStartLoading()const;
ccWebViewCallbak getOnDidFinishLoading()const;
ccWebViewCallbak getOnDidFailLoading()const;
ccWebViewCallbak getOnJSCallback()const;
protected:
virtual cocos2d::ui::Widget* createCloneInstance() override;
virtual void copySpecialProperties(Widget* model) override;
std::function<bool(WebView *sender, std::string url)> _onShouldStartLoading;
ccWebViewCallbak _onDidFinishLoading;
ccWebViewCallbak _onDidFailLoading;
ccWebViewCallbak _onJSCallback;
/**
* Default constructor
*/
WebView();
/**
* Default destructor
*/
virtual ~WebView();
private:
WebViewImpl *_impl;
friend class WebViewImpl;
};
} // namespace ui
@ -173,4 +197,4 @@ private:
#endif
#endif //__Cocos2d_Plugin_WebView_H_
#endif //__COCOS2D_UI_WEBVIEW_H

View File

@ -322,7 +322,7 @@ namespace cocos2d {
loadHTMLStringJNI(_viewTag, string, baseURL);
}
void WebViewImpl::loadUrl(const std::string &url) {
void WebViewImpl::loadURL(const std::string &url) {
loadUrlJNI(_viewTag, url);
}
@ -371,8 +371,8 @@ namespace cocos2d {
auto it = s_WebViewImpls.find(viewTag);
if (it != s_WebViewImpls.end()) {
auto webView = s_WebViewImpls[viewTag]->_webView;
if (webView->shouldStartLoading) {
return webView->shouldStartLoading(webView, url);
if (webView->_onShouldStartLoading) {
return webView->_onShouldStartLoading(webView, url);
}
}
return true;
@ -382,8 +382,8 @@ namespace cocos2d {
auto it = s_WebViewImpls.find(viewTag);
if (it != s_WebViewImpls.end()) {
auto webView = s_WebViewImpls[viewTag]->_webView;
if (webView->didFinishLoading) {
webView->didFinishLoading(webView, url);
if (webView->_onDidFinishLoading) {
webView->_onDidFinishLoading(webView, url);
}
}
}
@ -392,8 +392,8 @@ namespace cocos2d {
auto it = s_WebViewImpls.find(viewTag);
if (it != s_WebViewImpls.end()) {
auto webView = s_WebViewImpls[viewTag]->_webView;
if (webView->didFailLoading) {
webView->didFailLoading(webView, url);
if (webView->_onDidFailLoading) {
webView->_onDidFailLoading(webView, url);
}
}
}
@ -402,8 +402,8 @@ namespace cocos2d {
auto it = s_WebViewImpls.find(viewTag);
if (it != s_WebViewImpls.end()) {
auto webView = s_WebViewImpls[viewTag]->_webView;
if (webView->onJsCallback) {
webView->onJsCallback(webView, message);
if (webView->_onJSCallback) {
webView->_onJSCallback(webView, message);
}
}
}

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifndef __cocos2d_plugin_WebViewImpl_android_H_
#define __cocos2d_plugin_WebViewImpl_android_H_
#ifndef __COCOS2D__UI__WEBVIEWIMPL_ANDROID_H_
#define __COCOS2D__UI__WEBVIEWIMPL_ANDROID_H_
#ifdef __ANDROID__
@ -57,7 +57,7 @@ namespace cocos2d {
void loadHTMLString(const std::string &string, const std::string &baseURL);
void loadUrl(const std::string &url);
void loadURL(const std::string &url);
void loadFile(const std::string &fileName);
@ -97,4 +97,4 @@ namespace cocos2d {
#endif // __ANDROID__
#endif //__cocos2d_plugin_WebViewImpl_android_H_
#endif /* __COCOS2D__UI__WEBVIEWIMPL_ANDROID_H_ */

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifndef __cocos2d_plugin_WebViewImpl_IOS_H_
#define __cocos2d_plugin_WebViewImpl_IOS_H_
#ifndef __COCOS2D_UI_WEBVIEWIMPL_IOS_H_
#define __COCOS2D_UI_WEBVIEWIMPL_IOS_H_
#include <iosfwd>
@ -55,7 +55,7 @@ public:
void loadHTMLString(const std::string &string, const std::string &baseURL);
void loadUrl(const std::string &url);
void loadURL(const std::string &url);
void loadFile(const std::string &fileName);
@ -88,4 +88,4 @@ private:
} // namespace experimental
}//namespace cocos2d
#endif //__cocos2d_plugin_WebViewImpl_IOS_H_
#endif /* __COCOS2D_UI_WEBVIEWIMPL_IOS_H_ */

View File

@ -231,24 +231,24 @@ WebViewImpl::WebViewImpl(WebView *webView)
[_uiWebViewWrapper retain];
_uiWebViewWrapper.shouldStartLoading = [this](std::string url) {
if (this->_webView->shouldStartLoading) {
return this->_webView->shouldStartLoading(this->_webView, url);
if (this->_webView->_onShouldStartLoading) {
return this->_webView->_onShouldStartLoading(this->_webView, url);
}
return true;
};
_uiWebViewWrapper.didFinishLoading = [this](std::string url) {
if (this->_webView->didFinishLoading) {
this->_webView->didFinishLoading(this->_webView, url);
if (this->_webView->_onDidFinishLoading) {
this->_webView->_onDidFinishLoading(this->_webView, url);
}
};
_uiWebViewWrapper.didFailLoading = [this](std::string url) {
if (this->_webView->didFailLoading) {
this->_webView->didFailLoading(this->_webView, url);
if (this->_webView->_onDidFailLoading) {
this->_webView->_onDidFailLoading(this->_webView, url);
}
};
_uiWebViewWrapper.onJsCallback = [this](std::string url) {
if (this->_webView->onJsCallback) {
this->_webView->onJsCallback(this->_webView, url);
if (this->_webView->_onJSCallback) {
this->_webView->_onJSCallback(this->_webView, url);
}
};
}
@ -275,7 +275,7 @@ void WebViewImpl::loadHTMLString(const std::string &string, const std::string &b
[_uiWebViewWrapper loadHTMLString:string baseURL:baseURL];
}
void WebViewImpl::loadUrl(const std::string &url) {
void WebViewImpl::loadURL(const std::string &url) {
[_uiWebViewWrapper loadUrl:url];
}

View File

@ -510,14 +510,28 @@ public:
int getActionTag()const;
/**
*@brief Allow widget touch events to propagate to its parents. Set false will disable propagation
* @brief Allow widget touch events to propagate to its parents. Set false will disable propagation
* @since v3.3
*/
void setPropagateTouchEvents(bool isPropagate);
bool isPropagateTouchEvents()const;
/**
*@brief Specify widget to swallow touches or not
* Return whether the widget is propagate touch events to its parents or not
* @since v3.3
*/
bool isPropagateTouchEvents()const;
/**
* @brief Specify widget to swallow touches or not
* @since v3.3
*/
void setSwallowTouches(bool swallow);
/**
* Return whether the widget is swallowing touch or not
* @since v3.3
*/
bool isSwallowTouches()const;
/**

View File

@ -1,8 +1,8 @@
# cocos2d-x v3.3alpha0 Release Notes #
# cocos2d-x v3.3beta0 Release Notes #
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
- [cocos2d-x v3.3alpha0 Release Notes](#user-content-cocos2d-x-v33alpha0-release-notes)
- [cocos2d-x v3.3beta0 Release Notes](#user-content-cocos2d-x-v33beta0-release-notes)
- [Misc Information](#user-content-misc-information)
- [Requirements](#user-content-requirements)
- [Runtime Requirements](#user-content-runtime-requirements)
@ -13,7 +13,7 @@
- [Windows](#user-content-windows)
- [Linux](#user-content-linux)
- [How to start a new game](#user-content-how-to-start-a-new-game)
- [Highlights of v3.3alpha0](#user-content-highlights-of-v33alpha0)
- [Highlights of v3.3beta0](#user-content-highlights-of-v33beta0)
- [Features in detail](#user-content-features-in-detail)
- [Camera](#user-content-camera)
- [Reskin](#user-content-reskin)
@ -21,11 +21,11 @@
- [Better support for FBX](#user-content-better-support-for-fbx)
- [New fbx-conv](#user-content-new-fbx-conv)
- [AABB, OBB and Ray](#user-content-aabb-obb-and-ray)
- [ui::Scale9Sprite](#user-content-uiscale9sprite)
- [c++11 random support](#user-content-c11-random-support)
- [RenderTexture save function](#user-content-rendertexture-save-function)
- [BillBoard](#user-content-billboard)
- [Primitive](#user-content-primitive)
- [Consistent way to set GL context attributes](#user-content-consistent-way-to-set-gl-context-attributes)
- [Triangles command](#user-content-triangles-command)
- [WebView](#user-content-webview)
- [New audio](#user-content-new-audio)
- [Only two libraries left](#user-content-only-two-libraries-left)
# Misc Information
@ -117,17 +117,14 @@ Run
Please refer to this document: [ReadMe](../README.md)
# Highlights of v3.3alpha0
# Highlights of v3.3beta0
* 3d: `Camera`, 'Reskin', 'Attachment', 'Better support for FBX', 'New fbx-conv', `AABB`, `OBB` and `Ray`
* ui: added `Scale9Sprite`
* FileUitls: added `isDirectoryExist()`, `createDirectory()`, `removeDirectory()`, `removeFile()`, `renameFile()` and `getFileSize()`
* Device: added `setKeepScreenOn()` on iOS and Android
* Added c++11 random support
* RenderTexture: added a call back function for `saveToFile()`
* 3d: `Camera`, 'Reskin', 'Attachment', 'Better support for FBX', 'New fbx-conv', `AABB`, `OBB`, `Ray` and `BillBoard`
* audio: new audio is added on iOS and Android
* DrawNode: added as many functions as `DrawPrimitive`, and `DrawPrimitive` is deprecated
* Primitive: Support Points, Lines and Triagles for rendering
* SpriteFrameCache: support loading from plist file content data
* Added a consistent way to set GL context attributes for all platforms
* Renderer: added `trianle command`
* UI: added `WebView` on iOS and Android
* Only two libraries in cocos2d-x, one for c++ codes, another one for lua-binding codes
* Many other small features added and many bugs fixed
@ -185,7 +182,7 @@ auto mesh1 = sprite3d->getMeshByName("coat1");
mesh1->setVisible(false);
```
Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'
Full test case please refer to `tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp`.
## Attachment
@ -200,7 +197,7 @@ auto attachNode = sprite->getAttachNode("left_hand");
attachNode->addChild(weapon);
```
Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'
Full test case please refer to `tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp`.
## Better support for FBX
@ -234,56 +231,28 @@ ray._direction = farP - nearP;
ray.intersects(sprite3d->getAABB( ) );
```
Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'
Full test case please refer to `tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp`.
## ui::Scale9Sprite
## BillBoard
Now we have implemented a new Scale9Sprite class under ui module. Its internal implementation is concise than the previous one plus more features.
The main reason of reimplementing this class is that the Scale9Sprite is heavily used in ui module. Now the ui module is not dependent from extension module.
By applying the new ui::Scale9Sprite, the code inside many widget classes are more cleaner and elegant.
`BillBoard` is a rectangle always faces to the camera. It is useful in the 3D world. People use BillBoard to create trees in some racing games. It looks real, but the cost is much lower than 3d tree.
We could manually toggle "slice 9" feature by one function call:
`BillBoard` inherits from Sprite, so it also supports animate. Here is example of creating BillBoard.
```c++
//ui::Scale9Sprite is slice 9 enabled on default
auto sprite = ui::Scale9Sprite::create("foo.png");
sprite->setScale9Enabled(false);
//create billboard from .png
auto billboard = BillBoard::create("Images/Icon.png");
addChild(billboard);
//create camera that is looking at this billboard. Otherwise, it is seen by the default camera
auto camera = Camera::createPerspective(60, (GLfloat)s.width/s.height, 1, 1000);
camera->setCameraFlag(CameraFlag::CAMERA_USER1);
addChild(camera); //add this camera
//This billboard is only seen by the camera with flag CameraFlag::CAMERA_USER1.
billboard->setCameraMask((unsigned short)CameraFlag::CAMERA_USER1);
```
It also supports Flipping now.
```c++
auto sprite = ui::Scale9Sprite::create("bar.png");
sprite->setFlippedX(true);
sprite->setFlippedY(false);
```
Since the ui::Scale9Sprite is a Node rather than a Sprite, so you can't add it to a batch node. If you do want to do some actions on the internal sprite,
you could call `sprite->getSprite()` to access it.
Full test case please refer to `tests/cpp-tests/Classes/UITests/CocostudioGUITest/UIScale9SpriteTest.cpp`.
## c++11 random support
Since `rand()` is not good(refer to [this document](http://c-faq.com/lib/randrange.html)), we use c++11 random library to do generate random number, and provide a function to easily using:
```c++
int randInt = cocos2d::random(1, 10);
float randFloat = cocos2d::random(1.f, 10.f);
```
## RenderTexture save function
`RenderTexture::saveToFile()` will not save rendertexture when the function returns, because it just send render command to renderer. The file will be saved after render command is executed. It is not convenient if you want to use the saved file to do some work. So we added a parameter in `RenderTexture::saveToFile()` to set a call back function when the file is saved.
```c++
renderTexture->begin();
...
renderTexture->end();
renderTexture->saveToFile("myFile.png", true, callback);
```
## Primitive
@ -293,59 +262,115 @@ Here is a simple example of rendering a quad in `Sprite`.
1. create verexBuffer
```c++
auto vertexBuffer = VerexBuffer::create(sizeof(V3F_C4B_T2F), 4);
vertexBuffer->updateVertices(&_quad, 4, 0);
```
```c++
auto vertexBuffer = VerexBuffer::create(sizeof(V3F_C4B_T2F), 4);
vertexBuffer->updateVertices(&_quad, 4, 0);
```
2. create vertexData
```c++
auto vertexData = VertexData::create();
vertexData->addStream(vertexBuffer, VertexStreamAttribute(0, VERTEX_ATTRIB_POSITION, GL_FLOAT, 3, fasle));
vertexData->addStream(vertexBuffer, VertexStreamAttribute(12, VERTEX_ATTRIB_COLOR, GL_UNSIGNED_BTYE, 4, true));
vertexData->addStream(vertexBuffer, VertexStreamAttribute(16, VERTEX_ATTRIB_TEX_COORD, GL_FLOAT, 2, fasle));
```c++
auto vertexData = VertexData::create();
vertexData->addStream(vertexBuffer, VertexStreamAttribute(0, VERTEX_ATTRIB_POSITION, GL_FLOAT, 3, fasle));
vertexData->addStream(vertexBuffer, VertexStreamAttribute(12, VERTEX_ATTRIB_COLOR, GL_UNSIGNED_BTYE, 4, true));
vertexData->addStream(vertexBuffer, VertexStreamAttribute(16, VERTEX_ATTRIB_TEX_COORD, GL_FLOAT, 2, fasle));
```
3. create IndexBuffer
```c++
auto indexBuffer = IndexBuffer::create(IndexType::INDEX_TYPE_SHORT_16, 6);
short indices[6] = {0,1,2,3,2,1};
indexBuffer->updateIndices(indices,6, 0);
```
```c++
auto indexBuffer = IndexBuffer::create(IndexType::INDEX_TYPE_SHORT_16, 6);
short indices[6] = {0,1,2,3,2,1};
indexBuffer->updateIndices(indices,6, 0);
```
4. create primitive
```c++
auto primitve = Primitive::create(vertexData, indexBuffer, GL_TRIANGLES);
primitive->setStart(0);
primitive->setCount(6);
```
```c++
auto primitve = Primitive::create(vertexData, indexBuffer, GL_TRIANGLES);
primitive->setStart(0);
primitive->setCount(6);
```
5. add command to renderer
```c++
_command->init(globalZorder,textureID, glprogramState, blend, primitve, modelViewMatrix);
renderer->addCommand(&_command);
```
```c++
_command->init(globalZorder,textureID, glprogramState, blend, primitve, modelViewMatrix);
renderer->addCommand(&_command);
```
Primitive supports three typs of primitives (POINTS, LINES, TRIANGLES), vertex and index sharing, multiple streams. It has some constrains:
1. The size of vertex and index Buffer is fixed, which means data must be pre allocated.
2. Batching is not supported.
## Consistent way to set GL context attributes
## Triangles command
Now you can set GL context attributes by override `Application::initGLContextAttrs()`, then set GL context attributes there.
We have enhanced auto batching feature by introduce `TrianglesCommand`, the rendering of the `Triangles` can be auto batched. Now if we have anything which can be rendered by `Triangles`, we can use `TrianglesCommand` or inherit from `TrianglesCommand` to take use of auto batching feature and gain rendering improvements. The `QuadCommand`, which is used for `Quad` rendering, is a good example of inheriting from `TrianglesCommand`.
```c++
void AppDelegate::initGLContextAttrs()
{
// r:8 g:8 a:8 depth:24 stencil:8
GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8};
GLView::setGLContextAttrs(glContextAttrs);
}
The step to use Triangle Command is very simple.
```
Triangles trs{verts, indices, vertCount, indexCount};
command->init(globalZOrder,textureID, glProgramState,blend,trs,matrix);
renderer->addCommand(command);
```
To improve performance, `Triangles` will hold a weak reference to the vertices and indices data to be rendered, which is the same like `QuadCommand`. The userer should not release any rendered data before the `Command` is executed by `Renderer`.
## WebView
WebView is an new widget type which allows you to display web content inside Cocos2D-X. We only provide iOS and Android implementation currently, more platform might be added in the future.
The class is under `cocos2d::ui::experimental` namespace.
As we clarified the `experimental` namespace before, the `experimental` namespace doesn't mean the widget is incomplete, but only due to the lack of full platform support. Feel free to use the WebView
widget in your game.
To display the website Google in a WebView, we could simply write:
```cpp
_webView = cocos2d::experimental::ui::WebView::create();
_webView->setPosition(winSize/2);
_webView->setContentSize(winSize * 0.5);
_webView->loadUrl("http://www.google.com");
_webView->setScalesPageToFit(true);
```
Now can only support setting bits of `r`, `g`, `b`, `a`, `depth buffer` and `stencil buffer`. We will support other attributes if needed.
The `setscalesPageToFit` method will adjust the WebView content to fit the content size you set.
We could also set some callback to the WebView:
```cpp
//we should check the validation of the URL and decide whether to continue or not
_webView->shouldStartLoading = CC_CALLBACK_2(WebViewTest::onWebViewShouldStartLoading, this);
//called when web page is finish loading
_webView->didFinishLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFinishLoading, this);
//called when web page is fail loading
_webView->didFailLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFailLoading, this);
```
For full test case, please refer to [WebViewTest](https://github.com/cocos2d/cocos2d-x/blob/v3/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp)
## New audio
New audio is more powerful than old one, and it is not compatible with old one. We will deprecated old one when new audio is ready on all supported platforms. Now it only supports iOS and Android. We plan to finish it on v3.4.
What's enhanced in new audio engine:
* can play more than one backgournd music
* can have a call back when an audio(music or effect) finishs
* can get duration of an audio
* can get/set playback position of a playing audio
* can change loop state when playing
The difference compared to old audio engine
* all functions are static, which means you can more easy to invoke function, such as `Audio::play2d()`
* there is only one method `play2d()` to play music or effect
* should use `Audio::getState()` to determine an audio is playing, paused
* its class name is `cocos2d::experimental::AudioEngine` in c++, and its module name is `ccexp.AudioEngine` in lua-binding
* there is not preload function, you can play an audio immediately
Full test case please refer to `tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp`.
## Only two libraries left

View File

@ -3588,7 +3588,9 @@
"cocos/scripting/lua-bindings/auto/api/ActionTween.lua",
"cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua",
"cocos/scripting/lua-bindings/auto/api/Animate.lua",
"cocos/scripting/lua-bindings/auto/api/Animate3D.lua",
"cocos/scripting/lua-bindings/auto/api/Animation.lua",
"cocos/scripting/lua-bindings/auto/api/Animation3D.lua",
"cocos/scripting/lua-bindings/auto/api/AnimationCache.lua",
"cocos/scripting/lua-bindings/auto/api/AnimationData.lua",
"cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua",
@ -3600,6 +3602,9 @@
"cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua",
"cocos/scripting/lua-bindings/auto/api/AssetsManager.lua",
"cocos/scripting/lua-bindings/auto/api/AtlasNode.lua",
"cocos/scripting/lua-bindings/auto/api/AttachNode.lua",
"cocos/scripting/lua-bindings/auto/api/AudioEngine.lua",
"cocos/scripting/lua-bindings/auto/api/AudioProfile.lua",
"cocos/scripting/lua-bindings/auto/api/BaseData.lua",
"cocos/scripting/lua-bindings/auto/api/BatchNode.lua",
"cocos/scripting/lua-bindings/auto/api/BezierBy.lua",
@ -3678,6 +3683,7 @@
"cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua",
"cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua",
"cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua",
"cocos/scripting/lua-bindings/auto/api/EditBox.lua",
"cocos/scripting/lua-bindings/auto/api/Event.lua",
"cocos/scripting/lua-bindings/auto/api/EventAcceleration.lua",
"cocos/scripting/lua-bindings/auto/api/EventController.lua",
@ -3757,6 +3763,7 @@
"cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua",
"cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua",
"cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua",
"cocos/scripting/lua-bindings/auto/api/Mesh.lua",
"cocos/scripting/lua-bindings/auto/api/MotionStreak.lua",
"cocos/scripting/lua-bindings/auto/api/MoveBy.lua",
"cocos/scripting/lua-bindings/auto/api/MoveTo.lua",
@ -3850,6 +3857,7 @@
"cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua",
"cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua",
"cocos/scripting/lua-bindings/auto/api/Skeleton.lua",
"cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua",
"cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua",
"cocos/scripting/lua-bindings/auto/api/SkewBy.lua",
"cocos/scripting/lua-bindings/auto/api/SkewFrame.lua",
@ -3861,6 +3869,7 @@
"cocos/scripting/lua-bindings/auto/api/SplitCols.lua",
"cocos/scripting/lua-bindings/auto/api/SplitRows.lua",
"cocos/scripting/lua-bindings/auto/api/Sprite.lua",
"cocos/scripting/lua-bindings/auto/api/Sprite3D.lua",
"cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua",
"cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua",
"cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua",
@ -3942,6 +3951,7 @@
"cocos/scripting/lua-bindings/auto/api/Widget.lua",
"cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_audioengine_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_cocosbuilder_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_cocosdenshion_auto_api.lua",
@ -3955,6 +3965,8 @@
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp",
@ -3991,6 +4003,8 @@
"cocos/scripting/lua-bindings/manual/Cocos2dxLuaLoader.h",
"cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp",
"cocos/scripting/lua-bindings/manual/LuaBasicConversions.h",
"cocos/scripting/lua-bindings/manual/audioengine/lua_cocos2dx_audioengine_manual.cpp",
"cocos/scripting/lua-bindings/manual/audioengine/lua_cocos2dx_audioengine_manual.h",
"cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.cpp",
"cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h",
"cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp",
@ -4464,6 +4478,7 @@
"tools/tolua/README.mdown",
"tools/tolua/cocos2dx.ini",
"tools/tolua/cocos2dx_3d.ini",
"tools/tolua/cocos2dx_audioengine.ini",
"tools/tolua/cocos2dx_cocosbuilder.ini",
"tools/tolua/cocos2dx_cocosdenshion.ini",
"tools/tolua/cocos2dx_controller.ini",

View File

@ -39,16 +39,16 @@ endif()
if( UNIX ) #assume linux
set(GAME_SRC
proj.linux/main.cpp
src/AppDelegate.cpp
src/HelloWorldScene.cpp
Classes/AppDelegate.cpp
Classes/HelloWorldScene.cpp
)
elseif ( WIN32 )
set(GAME_SRC
proj.win32/main.cpp
proj.win32/main.h
proj.win32/resource.h
src/AppDelegate.cpp
src/HelloWorldScene.cpp
Classes/AppDelegate.cpp
Classes/HelloWorldScene.cpp
)
endif()
@ -163,14 +163,14 @@ if ( WIN32 )
#also copying dlls to binary directory for the executable to run
pre_build(${APP_NAME}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/res ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/gles/prebuilt/glew32.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/zlib/prebuilt/zlib1.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
)
else()
pre_build(${APP_NAME}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/res ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
)
endif()

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -6,7 +6,7 @@
],
"copy_resources": [
{
"from": "../res",
"from": "../Resources",
"to": ""
}
]

View File

@ -114,7 +114,7 @@ def copy_resources(app_android_root):
# copy resources
os.mkdir(assets_dir)
resources_dir = os.path.join(app_android_root, "../res")
resources_dir = os.path.join(app_android_root, "../Resources")
if os.path.isdir(resources_dir):
copy_files(resources_dir, assets_dir)

View File

@ -11,10 +11,10 @@ LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../src/AppDelegate.cpp \
../../src/HelloWorldScene.cpp
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../src
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
LOCAL_STATIC_LIBRARIES := cocos2dx_static

View File

@ -7,21 +7,23 @@
objects = {
/* Begin PBXBuildFile section */
15A6DA93199CFB1100B56DBF /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */; };
15A6DA94199CFB1100B56DBF /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */; };
15A6DA95199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */; };
15A6DA96199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */; };
15A6DA9B199CFB9800B56DBF /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA98199CFB9800B56DBF /* CloseNormal.png */; };
15A6DA9C199CFB9800B56DBF /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA98199CFB9800B56DBF /* CloseNormal.png */; };
15A6DA9D199CFB9800B56DBF /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA99199CFB9800B56DBF /* CloseSelected.png */; };
15A6DA9E199CFB9800B56DBF /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA99199CFB9800B56DBF /* CloseSelected.png */; };
15A6DA9F199CFB9800B56DBF /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA9A199CFB9800B56DBF /* HelloWorld.png */; };
15A6DAA0199CFB9800B56DBF /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA9A199CFB9800B56DBF /* HelloWorld.png */; };
1AC6FB21180E996B004C840B /* libcocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAF9180E9839004C840B /* libcocos2d Mac.a */; };
1AC6FB30180E99EB004C840B /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB07180E9839004C840B /* libcocos2d iOS.a */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; };
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; };
46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
46880B8119C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8419C43A87006E1F66 /* AppDelegate.cpp */; };
46880B8919C43A87006E1F66 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8419C43A87006E1F66 /* AppDelegate.cpp */; };
46880B8A19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */; };
46880B8B19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */; };
503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 503AE0F617EB97AB00D1A890 /* Icon.icns */; };
503AE10017EB989F00D1A890 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FB17EB989F00D1A890 /* AppController.mm */; };
503AE10117EB989F00D1A890 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FC17EB989F00D1A890 /* main.m */; };
@ -95,19 +97,20 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../src/AppDelegate.cpp; sourceTree = "<group>"; };
15A6DA90199CFB1100B56DBF /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../src/AppDelegate.h; sourceTree = "<group>"; };
15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelloWorldScene.cpp; path = ../src/HelloWorldScene.cpp; sourceTree = "<group>"; };
15A6DA92199CFB1100B56DBF /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelloWorldScene.h; path = ../src/HelloWorldScene.h; sourceTree = "<group>"; };
15A6DA98199CFB9800B56DBF /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CloseNormal.png; path = ../res/CloseNormal.png; sourceTree = "<group>"; };
15A6DA99199CFB9800B56DBF /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CloseSelected.png; path = ../res/CloseSelected.png; sourceTree = "<group>"; };
15A6DA9A199CFB9800B56DBF /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HelloWorld.png; path = ../res/HelloWorld.png; sourceTree = "<group>"; };
1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* HelloCpp iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloCpp iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
46880B7619C43A67006E1F66 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = "<group>"; };
46880B7719C43A67006E1F66 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = "<group>"; };
46880B7919C43A67006E1F66 /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = "<group>"; };
46880B7A19C43A67006E1F66 /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HelloWorld.png; sourceTree = "<group>"; };
46880B8419C43A87006E1F66 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
46880B8519C43A87006E1F66 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HelloWorldScene.cpp; sourceTree = "<group>"; };
46880B8719C43A87006E1F66 /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloWorldScene.h; sourceTree = "<group>"; };
503AE0F617EB97AB00D1A890 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = "<group>"; };
503AE0F717EB97AB00D1A890 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
503AE0FA17EB989F00D1A890 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = SOURCE_ROOT; };
@ -205,27 +208,6 @@
path = Classes;
sourceTree = "<group>";
};
15A6DA8E199CFB0100B56DBF /* src */ = {
isa = PBXGroup;
children = (
15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */,
15A6DA90199CFB1100B56DBF /* AppDelegate.h */,
15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */,
15A6DA92199CFB1100B56DBF /* HelloWorldScene.h */,
);
name = src;
sourceTree = "<group>";
};
15A6DA97199CFB8700B56DBF /* res */ = {
isa = PBXGroup;
children = (
15A6DA98199CFB9800B56DBF /* CloseNormal.png */,
15A6DA99199CFB9800B56DBF /* CloseSelected.png */,
15A6DA9A199CFB9800B56DBF /* HelloWorld.png */,
);
name = res;
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
@ -247,13 +229,13 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
46880B8319C43A87006E1F66 /* Classes */,
46880B7519C43A67006E1F66 /* Resources */,
1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */,
15A6DA8E199CFB0100B56DBF /* src */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
080E96DDFE201D6D7F000001 /* ios */,
503AE10617EB990700D1A890 /* mac */,
19C28FACFE9D520D11CA2CBB /* Products */,
15A6DA97199CFB8700B56DBF /* res */,
);
name = CustomTemplate;
sourceTree = "<group>";
@ -280,6 +262,38 @@
name = Frameworks;
sourceTree = "<group>";
};
46880B7519C43A67006E1F66 /* Resources */ = {
isa = PBXGroup;
children = (
46880B7619C43A67006E1F66 /* CloseNormal.png */,
46880B7719C43A67006E1F66 /* CloseSelected.png */,
46880B7819C43A67006E1F66 /* fonts */,
46880B7A19C43A67006E1F66 /* HelloWorld.png */,
);
name = Resources;
path = ../Resources;
sourceTree = "<group>";
};
46880B7819C43A67006E1F66 /* fonts */ = {
isa = PBXGroup;
children = (
46880B7919C43A67006E1F66 /* Marker Felt.ttf */,
);
path = fonts;
sourceTree = "<group>";
};
46880B8319C43A87006E1F66 /* Classes */ = {
isa = PBXGroup;
children = (
46880B8419C43A87006E1F66 /* AppDelegate.cpp */,
46880B8519C43A87006E1F66 /* AppDelegate.h */,
46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */,
46880B8719C43A87006E1F66 /* HelloWorldScene.h */,
);
name = Classes;
path = ../Classes;
sourceTree = "<group>";
};
503AE0F517EB97AB00D1A890 /* Icons */ = {
isa = PBXGroup;
children = (
@ -426,23 +440,24 @@
buildActionMask = 2147483647;
files = (
5087E78117EB970100C73F5D /* Icon-120.png in Resources */,
15A6DA9F199CFB9800B56DBF /* HelloWorld.png in Resources */,
5087E78617EB970100C73F5D /* Icon-76.png in Resources */,
5087E77F17EB970100C73F5D /* Default@2x.png in Resources */,
50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */,
5087E78317EB970100C73F5D /* Icon-152.png in Resources */,
15A6DA9D199CFB9800B56DBF /* CloseSelected.png in Resources */,
46880B8119C43A67006E1F66 /* HelloWorld.png in Resources */,
46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */,
5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */,
5087E78517EB970100C73F5D /* Icon-72.png in Resources */,
50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */,
5087E78017EB970100C73F5D /* Icon-114.png in Resources */,
46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */,
50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */,
50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */,
5087E78217EB970100C73F5D /* Icon-144.png in Resources */,
50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */,
5087E78417EB970100C73F5D /* Icon-57.png in Resources */,
5087E77E17EB970100C73F5D /* Default.png in Resources */,
15A6DA9B199CFB9800B56DBF /* CloseNormal.png in Resources */,
46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */,
50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -451,10 +466,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */,
46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */,
503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */,
15A6DAA0199CFB9800B56DBF /* HelloWorld.png in Resources */,
15A6DA9C199CFB9800B56DBF /* CloseNormal.png in Resources */,
15A6DA9E199CFB9800B56DBF /* CloseSelected.png in Resources */,
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */,
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -465,8 +481,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15A6DA93199CFB1100B56DBF /* AppDelegate.cpp in Sources */,
15A6DA95199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */,
46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */,
46880B8A19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */,
503AE10017EB989F00D1A890 /* AppController.mm in Sources */,
503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */,
503AE10117EB989F00D1A890 /* main.m in Sources */,
@ -477,9 +493,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15A6DA94199CFB1100B56DBF /* AppDelegate.cpp in Sources */,
46880B8919C43A87006E1F66 /* AppDelegate.cpp in Sources */,
503AE10517EB98FF00D1A890 /* main.cpp in Sources */,
15A6DA96199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */,
46880B8B19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -8,6 +8,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "HelloCpp.vcxpro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\cocos2d\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -22,6 +26,14 @@ Global
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -73,7 +73,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\src;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -106,7 +106,7 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"</C
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\src;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@ -137,13 +137,13 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"</C
</PreLinkEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\AppDelegate.cpp" />
<ClCompile Include="..\src\HelloWorldScene.cpp" />
<ClCompile Include="..\Classes\AppDelegate.cpp" />
<ClCompile Include="..\Classes\HelloWorldScene.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\AppDelegate.h" />
<ClInclude Include="..\src\HelloWorldScene.h" />
<ClInclude Include="..\Classes\AppDelegate.h" />
<ClInclude Include="..\Classes\HelloWorldScene.h" />
<ClInclude Include="main.h" />
</ItemGroup>
<ItemGroup>
@ -151,6 +151,12 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"</C
<Project>{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj">
<Project>{b7c2a162-dec9-4418-972e-240ab3cbfcae}</Project>
</ProjectReference>
<ProjectReference Include="..\cocos2d\external\Box2D\proj.win32\libbox2d.vcxproj">
<Project>{929480e7-23c0-4df6-8456-096d71547116}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="game.rc" />

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\res</LocalDebuggerWorkingDirectory>
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\Resources</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\res</LocalDebuggerWorkingDirectory>
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\Resources</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -102,7 +102,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\res\fonts\Marker Felt.ttf">
<None Include="..\..\Resources\fonts\Marker Felt.ttf">
<Link>Assets\Resources\fonts\Marker Felt.ttf</Link>
</None>
<None Include="Properties\AppManifest.xml" />
@ -111,13 +111,13 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\res\CloseNormal.png">
<Content Include="..\..\Resources\CloseNormal.png">
<Link>Assets\Resources\CloseNormal.png</Link>
</Content>
<Content Include="..\..\res\CloseSelected.png">
<Content Include="..\..\Resources\CloseSelected.png">
<Link>Assets\Resources\CloseSelected.png</Link>
</Content>
<Content Include="..\..\res\HelloWorld.png">
<Content Include="..\..\Resources\HelloWorld.png">
<Link>Assets\Resources\HelloWorld.png</Link>
</Content>
<Content Include="Assets\AlignmentGrid.png" />

View File

@ -90,7 +90,7 @@
<CompileAsWinRT>true</CompileAsWinRT>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -110,7 +110,7 @@
<CompileAsWinRT>true</CompileAsWinRT>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -130,7 +130,7 @@
<CompileAsWinRT>true</CompileAsWinRT>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -150,7 +150,7 @@
<CompileAsWinRT>true</CompileAsWinRT>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -198,13 +198,10 @@
<ProjectReference Include="..\..\cocos2d\external\Box2D\proj.wp8\Box2D.vcxproj">
<Project>{c55734a3-702c-4fa1-b950-32c8e169302f}</Project>
</ProjectReference>
<ProjectReference Include="..\..\cocos2d\external\chipmunk\proj.wp8\chipmunk.vcxproj">
<Project>{ba568a33-98f9-4d2a-bfff-c065adcb447a}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\AppDelegate.cpp" />
<ClCompile Include="..\..\src\HelloWorldScene.cpp" />
<ClCompile Include="..\..\Classes\AppDelegate.cpp" />
<ClCompile Include="..\..\Classes\HelloWorldScene.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
@ -218,8 +215,8 @@
<ClCompile Include="src\EditBoxEvent.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\AppDelegate.h" />
<ClInclude Include="..\..\src\HelloWorldScene.h" />
<ClInclude Include="..\..\Classes\AppDelegate.h" />
<ClInclude Include="..\..\Classes\HelloWorldScene.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="src\Cocos2dRenderer.h" />
<ClInclude Include="src\Direct3DContentProvider.h" />

View File

@ -17,11 +17,11 @@
<ClCompile Include="src\EditBoxEvent.cpp">
<Filter>platform_src</Filter>
</ClCompile>
<ClCompile Include="..\..\src\HelloWorldScene.cpp">
<Filter>src</Filter>
<ClCompile Include="..\..\Classes\AppDelegate.cpp">
<Filter>Classes</Filter>
</ClCompile>
<ClCompile Include="..\..\src\AppDelegate.cpp">
<Filter>src</Filter>
<ClCompile Include="..\..\Classes\HelloWorldScene.cpp">
<Filter>Classes</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -44,19 +44,19 @@
<ClInclude Include="src\EditBoxEvent.h">
<Filter>platform_src</Filter>
</ClInclude>
<ClInclude Include="..\..\src\AppDelegate.h">
<Filter>src</Filter>
<ClInclude Include="..\..\Classes\AppDelegate.h">
<Filter>Classes</Filter>
</ClInclude>
<ClInclude Include="..\..\src\HelloWorldScene.h">
<Filter>src</Filter>
<ClInclude Include="..\..\Classes\HelloWorldScene.h">
<Filter>Classes</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="platform_src">
<UniqueIdentifier>{6fcff44b-bb9f-4ed9-8553-558855bc91e3}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{6e41adf9-1cf5-4085-ae27-accb4c9eab3d}</UniqueIdentifier>
<Filter Include="Classes">
<UniqueIdentifier>{ddb0f381-1dc4-44a0-ab28-0f672a551265}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloCpp", "App\HelloCpp.csproj", "{83CC88FE-7E79-4E1E-A129-742987130B5C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCppComponent", "AppComponent\HelloCppComponent.vcxproj", "{60EC6889-C3C4-45AD-A006-47D9EE689212}"
@ -8,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\co
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDenshion", "..\cocos2d\cocos\audio\proj.wp8\CocosDenshion.vcxproj", "{DF125891-EEE9-4466-B903-F828FD272158}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "..\cocos2d\external\chipmunk\proj.wp8\chipmunk.vcxproj", "{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.wp8\libExtensions.vcxproj", "{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d\cocos\editor-support\cocosbuilder\proj.wp8\libCocosBuilder.vcxproj", "{20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}"
@ -124,24 +124,6 @@ Global
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.Build.0 = Release|Win32
{DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.ActiveCfg = Release|Win32
{DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.Build.0 = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Any CPU.ActiveCfg = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.ActiveCfg = Debug|ARM
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.Build.0 = Debug|ARM
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.ActiveCfg = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.Build.0 = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.ActiveCfg = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.Build.0 = Debug|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Any CPU.ActiveCfg = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.ActiveCfg = Release|ARM
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.Build.0 = Release|ARM
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.Build.0 = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.ActiveCfg = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.Build.0 = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.ActiveCfg = Release|Win32
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.Build.0 = Release|Win32
{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Any CPU.ActiveCfg = Debug|Win32
{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.ActiveCfg = Debug|ARM
{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.Build.0 = Debug|ARM

View File

@ -9,18 +9,22 @@
#include "ui/lua_cocos2dx_ui_manual.hpp"
#include "spine/lua_cocos2dx_spine_manual.hpp"
#include "3d/lua_cocos2dx_3d_manual.h"
#include "audioengine/lua_cocos2dx_audioengine_manual.h"
int lua_module_register(lua_State* L)
{
//Dont' change the module register order unless you know what your are doing
register_cocosdenshion_module(L);
register_network_module(L);
register_cocosbuilder_module(L);
register_cocostudio_module(L);
register_extension_module(L);
register_ui_moudle(L);
register_extension_module(L);
register_spine_module(L);
register_cocos3d_module(L);
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS
register_audioengine_module(L);
#endif
return 1;
}

Some files were not shown because too many files have changed in this diff Show More