Merge pull request #12 from dumganhar/minggo-releasing

[Android] Fixing path error and reducing dependence for extension.
This commit is contained in:
minggo 2013-07-25 02:03:33 -07:00
commit 8a2baff4a0
76 changed files with 678 additions and 362 deletions

View File

@ -414,6 +414,8 @@ Developers:
Added some guards to prevent Eclipse to compile twice the same class.
Linux Eclipse projects updates
Refactored emscripten-build.sh, it's no longer need to be edited to make emscripten work.
Creation of CCDeprecated-ext.h
Use of a single emscripten HTML template file.
elmiro
Correction of passed buffer size to readlink and verification of result return by readlink.

View File

@ -1 +1 @@
3e6fb10656859ac83b22bfa48044ade6213d414d
61930829c286fd6ec795bccee6e841a60e8ba34f

View File

@ -170,8 +170,8 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libtiff_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libwebp_static
# define the macro to compile through support/zip_support/ioapi.c
LOCAL_CFLAGS := -Wno-psabi -Wno-deprecated-declarations -DUSE_FILE32API
LOCAL_EXPORT_CFLAGS := -Wno-psabi -Wno-deprecated-declarations -DUSE_FILE32API
LOCAL_CFLAGS := -Wno-psabi -DUSE_FILE32API
LOCAL_EXPORT_CFLAGS := -Wno-psabi -DUSE_FILE32API
include $(BUILD_STATIC_LIBRARY)

View File

@ -29,6 +29,13 @@
#include "sprite_nodes/CCSprite.h"
#include "script_support/CCScriptSupport.h"
#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
NS_CC_BEGIN
//
// InstantAction
@ -473,5 +480,137 @@ CallFuncN * CallFuncN::clone() const
return a;
}
//
// CallFuncND
//
__CCCallFuncND * __CCCallFuncND::create(Object* selectorTarget, SEL_CallFuncND selector, void* d)
{
__CCCallFuncND* pRet = new __CCCallFuncND();
if (pRet && pRet->initWithTarget(selectorTarget, selector, d)) {
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
bool __CCCallFuncND::initWithTarget(Object* selectorTarget, SEL_CallFuncND selector, void* d)
{
if (CallFunc::initWithTarget(selectorTarget))
{
_data = d;
_callFuncND = selector;
return true;
}
return false;
}
void __CCCallFuncND::execute()
{
if (_callFuncND)
{
(_selectorTarget->*_callFuncND)(_target, _data);
}
}
__CCCallFuncND * __CCCallFuncND::clone() const
{
// no copy constructor
auto a = new __CCCallFuncND();
if( _selectorTarget)
{
a->initWithTarget(_selectorTarget, _callFuncND, _data);
}
a->autorelease();
return a;
}
//
// CallFuncO
//
__CCCallFuncO::__CCCallFuncO() :
_object(NULL)
{
}
__CCCallFuncO::~__CCCallFuncO()
{
CC_SAFE_RELEASE(_object);
}
void __CCCallFuncO::execute()
{
if (_callFuncO) {
(_selectorTarget->*_callFuncO)(_object);
}
}
__CCCallFuncO * __CCCallFuncO::create(Object* selectorTarget, SEL_CallFuncO selector, Object* object)
{
__CCCallFuncO *pRet = new __CCCallFuncO();
if (pRet && pRet->initWithTarget(selectorTarget, selector, object)) {
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
bool __CCCallFuncO::initWithTarget(Object* selectorTarget, SEL_CallFuncO selector, Object* object)
{
if (CallFunc::initWithTarget(selectorTarget))
{
_object = object;
CC_SAFE_RETAIN(_object);
_callFuncO = selector;
return true;
}
return false;
}
__CCCallFuncO * __CCCallFuncO::clone() const
{
// no copy constructor
auto a = new __CCCallFuncO();
if( _selectorTarget)
{
a->initWithTarget(_selectorTarget, _callFuncO, _object);
}
a->autorelease();
return a;
}
Object* __CCCallFuncO::getObject() const
{
return _object;
}
void __CCCallFuncO::setObject(Object* obj)
{
if (obj != _object)
{
CC_SAFE_RELEASE(_object);
_object = obj;
CC_SAFE_RETAIN(_object);
}
}
NS_CC_END
#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

View File

@ -341,6 +341,87 @@ protected:
std::function<void(Node*)> _functionN;
};
/**
@deprecated Please use CallFuncN instead.
@brief Calls a 'callback' with the node as the first argument and the 2nd argument is data
* ND means: Node and Data. Data is void *, so it could be anything.
*/
class CC_DLL __CCCallFuncND : public CallFunc
{
public:
/** creates the action with the callback and the data to pass as an argument */
CC_DEPRECATED_ATTRIBUTE static __CCCallFuncND * create(Object* selectorTarget, SEL_CallFuncND selector, void* d);
virtual long getClassTypeInfo() {
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CallFunc).name());
return id;
}
protected:
/** initializes the action with the callback and the data to pass as an argument */
bool initWithTarget(Object* selectorTarget, SEL_CallFuncND selector, void* d);
public:
//
// Overrides
//
virtual __CCCallFuncND* clone() const override;
virtual void execute() override;
protected:
SEL_CallFuncND _callFuncND;
void* _data;
};
/**
@deprecated Please use CallFuncN instead.
@brief Calls a 'callback' with an object as the first argument.
O means Object.
@since v0.99.5
*/
class CC_DLL __CCCallFuncO : public CallFunc, public TypeInfo
{
public:
/** creates the action with the callback
typedef void (Object::*SEL_CallFuncO)(Object*);
*/
CC_DEPRECATED_ATTRIBUTE static __CCCallFuncO * create(Object* selectorTarget, SEL_CallFuncO selector, Object* object);
__CCCallFuncO();
virtual ~__CCCallFuncO();
virtual long getClassTypeInfo() {
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CallFunc).name());
return id;
}
protected:
/** initializes the action with the callback
typedef void (Object::*SEL_CallFuncO)(Object*);
*/
bool initWithTarget(Object* selectorTarget, SEL_CallFuncO selector, Object* object);
public:
//
// Overrides
//
virtual __CCCallFuncO* clone() const override;
virtual void execute() override;
Object* getObject() const;
void setObject(Object* obj);
protected:
/** object to be passed as argument */
Object* _object;
SEL_CallFuncO _callFuncO;
};
// end of actions group
/// @}

View File

@ -30,7 +30,7 @@ NS_CC_BEGIN
const char* cocos2dVersion()
{
return "3.0-alpha0-pre";
return "3.0-pre-alpha0";
}
NS_CC_END

View File

@ -622,6 +622,9 @@ CC_DEPRECATED_ATTRIBUTE typedef FlipX CCFlipX;
CC_DEPRECATED_ATTRIBUTE typedef FlipY CCFlipY;
CC_DEPRECATED_ATTRIBUTE typedef Place CCPlace;
CC_DEPRECATED_ATTRIBUTE typedef CallFunc CCCallFunc;
CC_DEPRECATED_ATTRIBUTE typedef CallFuncN CCCallFuncN;
CC_DEPRECATED_ATTRIBUTE typedef __CCCallFuncND CCCallFuncND;
CC_DEPRECATED_ATTRIBUTE typedef __CCCallFuncO CCCallFuncO;
CC_DEPRECATED_ATTRIBUTE typedef GridAction CCGridAction;
CC_DEPRECATED_ATTRIBUTE typedef Grid3DAction CCGrid3DAction;
CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3DAction CCTiledGrid3DAction;
@ -760,6 +763,7 @@ CC_DEPRECATED_ATTRIBUTE typedef Timer CCTimer;
CC_DEPRECATED_ATTRIBUTE typedef Scheduler CCScheduler;
CC_DEPRECATED_ATTRIBUTE typedef EGLView CCEGLView;
CC_DEPRECATED_ATTRIBUTE typedef Component CCComponent;
CC_DEPRECATED_ATTRIBUTE typedef AffineTransform CCAffineTransform;
CC_DEPRECATED_ATTRIBUTE typedef Point CCPoint;
CC_DEPRECATED_ATTRIBUTE typedef Size CCSize;

View File

@ -83,7 +83,7 @@ struct Color4B
a(_a)
{}
Color4B(): r(0.f), g(0.f), b(0.f), a(0.f) {}
Color4B(): r(0), g(0), b(0), a(0) {}
// This function should use Color4F, so implement it in .cpp file.
explicit Color4B(const Color4F &color4F);

View File

@ -33,6 +33,13 @@ THE SOFTWARE.
#include <stdarg.h>
#include <cstring>
#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
NS_CC_BEGIN
static unsigned int _globalFontSize = kItemSize;
@ -986,3 +993,9 @@ MenuItem* MenuItemToggle::getSelectedItem()
}
NS_CC_END
#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

View File

@ -104,8 +104,11 @@ public:
/* creates a new Image from with the texture's data.
Caller is responsible for releasing it by calling delete.
*/
Image* newImage(bool flipImage = true);
CC_DEPRECATED_ATTRIBUTE Image* newCCImage(bool flipImage = true) { return newImage(flipImage); };
/** saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
Returns YES if the operation is successful.
*/

View File

@ -97,9 +97,12 @@ STATICLIBS = \
SHAREDLIBS += -L$(LIB_DIR) -Wl,-rpath,$(RPATH_REL)/$(LIB_DIR)
LIBS = -lrt -lz
HTMLTPL_DIR = $(COCOS_ROOT)/tools/emscripten-template
HTMLTPL_FILE = index.html
clean:
rm -rf $(OBJ_DIR)
rm -f $(TARGET).js $(TARGET).data $(TARGET).data.js $(BIN_DIR)/index.html core
rm -rf $(TARGET).js $(TARGET).data $(TARGET).data.js $(BIN_DIR) core
.PHONY: all clean
@ -108,7 +111,7 @@ clean:
ifdef EXECUTABLE
TARGET := $(BIN_DIR)/$(EXECUTABLE)
all: $(TARGET).js $(TARGET).data $(BIN_DIR)/index.html
all: $(TARGET).js $(TARGET).data $(BIN_DIR)/$(HTMLTPL_FILE)
run: $(TARGET)
cd $(dir $^) && ./$(notdir $^)

View File

@ -186,6 +186,7 @@ public:
@since v0.8
*/
void setTexParameters(const ccTexParams& texParams);
CC_DEPRECATED_ATTRIBUTE void setTexParameters(const ccTexParams* texParams) { return setTexParameters(*texParams); };
/** sets antialias texture parameters:
- GL_TEXTURE_MIN_FILTER = GL_LINEAR

View File

@ -785,7 +785,7 @@ void VolatileTexture::reloadAllTextures()
if (std::string::npos != lowerCase.find(".pvr"))
{
Texture2DPixelFormat oldPixelFormat = Texture2D::defaultAlphaPixelFormat();
Texture2DPixelFormat oldPixelFormat = Texture2D::getDefaultAlphaPixelFormat();
Texture2D::setDefaultAlphaPixelFormat(vt->_pixelFormat);
vt->_texture->initWithPVRFile(vt->_fileName.c_str());
@ -799,7 +799,7 @@ void VolatileTexture::reloadAllTextures()
if (pImage && pImage->initWithImageData((void*)pBuffer, nSize, vt->_fmtImage))
{
Texture2DPixelFormat oldPixelFormat = Texture2D::defaultAlphaPixelFormat();
Texture2DPixelFormat oldPixelFormat = Texture2D::getDefaultAlphaPixelFormat();
Texture2D::setDefaultAlphaPixelFormat(vt->_pixelFormat);
vt->_texture->initWithImage(pImage);
Texture2D::setDefaultAlphaPixelFormat(oldPixelFormat);

View File

@ -56,6 +56,9 @@ public:
ParallaxNode();
virtual ~ParallaxNode();
// prevents compiler warning: "Included function hides overloaded virtual functions"
using Node::addChild;
void addChild(Node * child, int z, const Point& parallaxRatio, const Point& positionOffset);
/** Sets an array of layers for the Parallax node */

View File

@ -213,6 +213,10 @@ public:
virtual void onSuccess() {};
};
// Deprecated declaration
CC_DEPRECATED_ATTRIBUTE typedef AssetsManager CCAssetsManager;
CC_DEPRECATED_ATTRIBUTE typedef AssetsManagerDelegateProtocol CCAssetsManagerDelegateProtocol;
NS_CC_EXT_END;
#endif /* defined(__AssetsManager__) */

View File

@ -28,10 +28,46 @@ THE SOFTWARE.
#include "utils/CCArmatureDefine.h"
#include "CCBone.h"
#include "display/CCBatchNode.h"
#include "display/CCShaderNode.h"
#include "animation/CCArmatureAnimation.h"
#include "physics/CCPhysicsWorld.h"
#include "utils/CCSpriteFrameCacheHelper.h"
#include "utils/CCArmatureDataManager.h"
namespace cocos2d { namespace extension { namespace armature {
CC_DEPRECATED_ATTRIBUTE typedef ProcessBase CCProcessBase;
CC_DEPRECATED_ATTRIBUTE typedef BaseData CCBaseData;
CC_DEPRECATED_ATTRIBUTE typedef DisplayData CCDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef SpriteDisplayData CCSpriteDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef ArmatureDisplayData CCArmatureDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef ParticleDisplayData CCParticleDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef ShaderDisplayData CCShaderDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef BoneData CCBoneData;
CC_DEPRECATED_ATTRIBUTE typedef FrameData CCFrameData;
CC_DEPRECATED_ATTRIBUTE typedef MovementBoneData CCMovementBoneData;
CC_DEPRECATED_ATTRIBUTE typedef MovementData CCMovementData;
CC_DEPRECATED_ATTRIBUTE typedef AnimationData CCAnimationData;
CC_DEPRECATED_ATTRIBUTE typedef ContourData CCContourData;
CC_DEPRECATED_ATTRIBUTE typedef TextureData CCTextureData;
CC_DEPRECATED_ATTRIBUTE typedef ShaderNode CCShaderNode;
CC_DEPRECATED_ATTRIBUTE typedef DecorativeDisplay CCDecorativeDisplay;
CC_DEPRECATED_ATTRIBUTE typedef DisplayData CCDisplayData;
CC_DEPRECATED_ATTRIBUTE typedef DisplayFactory CCDisplayFactory;
CC_DEPRECATED_ATTRIBUTE typedef BatchNode CCBatchNode;
CC_DEPRECATED_ATTRIBUTE typedef DecorativeDisplay CCDecorativeDisplay;
CC_DEPRECATED_ATTRIBUTE typedef DisplayManager CCDisplayManager;
CC_DEPRECATED_ATTRIBUTE typedef ColliderBody CCColliderBody;
CC_DEPRECATED_ATTRIBUTE typedef ColliderDetector CCColliderDetector;
CC_DEPRECATED_ATTRIBUTE typedef PhysicsWorld CCPhysicsWorld;
CC_DEPRECATED_ATTRIBUTE typedef SpriteFrameCacheHelper CCSpriteFrameCacheHelper;
CC_DEPRECATED_ATTRIBUTE typedef TweenFunction CCTweenFunction;
CC_DEPRECATED_ATTRIBUTE typedef ArmatureData CCArmatureData;
CC_DEPRECATED_ATTRIBUTE typedef Bone CCBone;
CC_DEPRECATED_ATTRIBUTE typedef ArmatureAnimation CCArmatureAnimation;
CC_DEPRECATED_ATTRIBUTE typedef Armature CCArmature;
CC_DEPRECATED_ATTRIBUTE typedef ArmatureDataManager CCArmatureDataManager;
class Armature : public NodeRGBA, public BlendProtocol
{

View File

@ -617,7 +617,7 @@ Object* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* chann
CCBSelectorResolver* targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
if(targetAsCCBSelectorResolver != NULL) {
selCallFunc = targetAsCCBSelectorResolver->onResolveCCBCallFuncSelector(target, selectorName.c_str ());
selCallFunc = targetAsCCBSelectorResolver->onResolveCCBCCCallFuncSelector(target, selectorName.c_str ());
}
if(selCallFunc == 0) {
CCLOG("Skipping selector '%s' since no CCBSelectorResolver is present.", selectorName.c_str());

View File

@ -23,9 +23,9 @@ NS_CC_EXT_BEGIN
class CCBSelectorResolver {
public:
virtual ~CCBSelectorResolver() {};
virtual SEL_MenuHandler onResolveCCBMenuItemSelector(Object * pTarget, const char* pSelectorName) = 0;
virtual SEL_CallFuncN onResolveCCBCallFuncSelector(Object * pTarget, const char* pSelectorName) { return NULL; };
virtual SEL_CCControlHandler onResolveCCBControlSelector(Object * pTarget, const char* pSelectorName) = 0;
virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(Object * pTarget, const char* pSelectorName) = 0;
virtual SEL_CallFuncN onResolveCCBCCCallFuncSelector(Object * pTarget, const char* pSelectorName) { return NULL; };
virtual SEL_CCControlHandler onResolveCCBCCControlSelector(Object * pTarget, const char* pSelectorName) = 0;
};

View File

@ -754,12 +754,12 @@ BlockData * NodeLoader::parsePropTypeBlock(Node * pNode, Node * pParent, CCBRead
CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
if(targetAsCCBSelectorResolver != NULL) {
selMenuHandler = targetAsCCBSelectorResolver->onResolveCCBMenuItemSelector(target, selectorName.c_str());
selMenuHandler = targetAsCCBSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str());
}
if(selMenuHandler == 0) {
CCBSelectorResolver * ccbSelectorResolver = pCCBReader->getCCBSelectorResolver();
if(ccbSelectorResolver != NULL) {
selMenuHandler = ccbSelectorResolver->onResolveCCBMenuItemSelector(target, selectorName.c_str());
selMenuHandler = ccbSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str());
}
}
@ -816,12 +816,12 @@ BlockControlData * NodeLoader::parsePropTypeBlockControl(Node * pNode, Node * pP
CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
if(targetAsCCBSelectorResolver != NULL) {
selControlHandler = targetAsCCBSelectorResolver->onResolveCCBControlSelector(target, selectorName.c_str());
selControlHandler = targetAsCCBSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str());
}
if(selControlHandler == 0) {
CCBSelectorResolver * ccbSelectorResolver = pCCBReader->getCCBSelectorResolver();
if(ccbSelectorResolver != NULL) {
selControlHandler = ccbSelectorResolver->onResolveCCBControlSelector(target, selectorName.c_str());
selControlHandler = ccbSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str());
}
}

View File

@ -81,7 +81,7 @@ void NodeLoaderLibrary::purge(bool pReleaseNodeLoaders) {
static NodeLoaderLibrary * sSharedNodeLoaderLibrary = NULL;
NodeLoaderLibrary * NodeLoaderLibrary::sharedNodeLoaderLibrary() {
NodeLoaderLibrary * NodeLoaderLibrary::getInstance() {
if(sSharedNodeLoaderLibrary == NULL) {
sSharedNodeLoaderLibrary = new NodeLoaderLibrary();
@ -90,7 +90,7 @@ NodeLoaderLibrary * NodeLoaderLibrary::sharedNodeLoaderLibrary() {
return sSharedNodeLoaderLibrary;
}
void NodeLoaderLibrary::purgeSharedNodeLoaderLibrary() {
void NodeLoaderLibrary::destroyInstance() {
CC_SAFE_DELETE(sSharedNodeLoaderLibrary);
}

View File

@ -30,11 +30,21 @@ class NodeLoaderLibrary : public Object {
//CCNodeLoader * getNodeLoader(String * pClassName);
void purge(bool pDelete);
CC_DEPRECATED_ATTRIBUTE void registerDefaultCCNodeLoaders() { registerDefaultNodeLoaders(); }
CC_DEPRECATED_ATTRIBUTE void registerCCNodeLoader(const char * pClassName, NodeLoader * pNodeLoader) { registerNodeLoader(pClassName, pNodeLoader); };
CC_DEPRECATED_ATTRIBUTE void unregisterCCNodeLoader(const char * pClassName) { unregisterNodeLoader(pClassName); };
CC_DEPRECATED_ATTRIBUTE NodeLoader * getCCNodeLoader(const char * pClassName) { return getNodeLoader(pClassName); };
public:
static NodeLoaderLibrary * sharedNodeLoaderLibrary();
static void purgeSharedNodeLoaderLibrary();
static NodeLoaderLibrary * getInstance();
static void destroyInstance();
static NodeLoaderLibrary * newDefaultNodeLoaderLibrary();
CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * sharedNodeLoaderLibrary() { return NodeLoaderLibrary::getInstance(); };
CC_DEPRECATED_ATTRIBUTE static void purgeSharedNodeLoaderLibrary() { NodeLoaderLibrary::destroyInstance(); };
CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * newDefaultCCNodeLoaderLibrary() { return NodeLoaderLibrary::newDefaultNodeLoaderLibrary(); };
};
NS_CC_EXT_END

View File

@ -0,0 +1,182 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
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.
****************************************************************************/
/** Add deprecated global functions and variables here
*/
#ifndef COCOS2D_CCDEPRECATED_EXT_H__
#define COCOS2D_CCDEPRECATED_EXT_H__
NS_CC_EXT_BEGIN
CC_DEPRECATED_ATTRIBUTE typedef TableView CCTableView;
CC_DEPRECATED_ATTRIBUTE typedef TableViewCell CCTableViewCell;
CC_DEPRECATED_ATTRIBUTE typedef TableViewDelegate CCTableViewDelegate;
CC_DEPRECATED_ATTRIBUTE typedef TableViewDataSource CCTableViewDataSource;
CC_DEPRECATED_ATTRIBUTE typedef TableView CCTableView;
CC_DEPRECATED_ATTRIBUTE typedef ScrollView CCScrollView;
CC_DEPRECATED_ATTRIBUTE typedef ScrollViewDelegate CCScrollViewDelegate;
CC_DEPRECATED_ATTRIBUTE typedef ScrollView CCScrollView;
CC_DEPRECATED_ATTRIBUTE typedef SortableObject CCSortableObject;
CC_DEPRECATED_ATTRIBUTE typedef ArrayForObjectSorting CCArrayForObjectSorting;
CC_DEPRECATED_ATTRIBUTE typedef TableViewCell CCTableViewCell;
CC_DEPRECATED_ATTRIBUTE typedef EditBox CCEditBox;
CC_DEPRECATED_ATTRIBUTE typedef EditBoxDelegate CCEditBoxDelegate;
CC_DEPRECATED_ATTRIBUTE typedef Color3bObject CCColor3bObject;
CC_DEPRECATED_ATTRIBUTE typedef ControlUtils CCControlUtils;
CC_DEPRECATED_ATTRIBUTE typedef Scale9Sprite CCScale9Sprite;
CC_DEPRECATED_ATTRIBUTE typedef ControlSwitchSprite CCControlSwitchSprite;
CC_DEPRECATED_ATTRIBUTE typedef ControlHuePicker CCControlHuePicker;
CC_DEPRECATED_ATTRIBUTE typedef Invocation CCInvocation;
CC_DEPRECATED_ATTRIBUTE typedef ControlSaturationBrightnessPicker CCControlSaturationBrightnessPicker;
CC_DEPRECATED_ATTRIBUTE typedef ControlStepper CCControlStepper;
CC_DEPRECATED_ATTRIBUTE typedef ControlPotentiometer CCControlPotentiometer;
CC_DEPRECATED_ATTRIBUTE typedef ControlSwitchSprite CCControlSwitchSprite;
CC_DEPRECATED_ATTRIBUTE typedef ControlSwitch CCControlSwitch;
CC_DEPRECATED_ATTRIBUTE typedef ControlButton CCControlButton;
CC_DEPRECATED_ATTRIBUTE typedef ControlSlider CCControlSlider;
CC_DEPRECATED_ATTRIBUTE typedef Control CCControl;
CC_DEPRECATED_ATTRIBUTE typedef ControlLoader CCControlLoader;
CC_DEPRECATED_ATTRIBUTE typedef ControlColourPicker CCControlColourPicker;
CC_DEPRECATED_ATTRIBUTE typedef LabelBMFontLoader CCLabelBMFontLoader;
CC_DEPRECATED_ATTRIBUTE typedef ScrollViewLoader CCScrollViewLoader;
CC_DEPRECATED_ATTRIBUTE typedef SpriteLoader CCSpriteLoader;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoader CCNodeLoader;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderLibrary CCNodeLoaderLibrary;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderListener CCNodeLoaderListener;
CC_DEPRECATED_ATTRIBUTE typedef LayerLoader CCLayerLoader;
CC_DEPRECATED_ATTRIBUTE typedef MenuLoader CCMenuLoader;
CC_DEPRECATED_ATTRIBUTE typedef Color3BWapper CCColor3BWapper;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSystemQuadLoader CCParticleSystemQuadLoader;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemImageLoader CCMenuItemImageLoader;
CC_DEPRECATED_ATTRIBUTE typedef ControlButtonLoader CCControlButtonLoader;
CC_DEPRECATED_ATTRIBUTE typedef LayerGradientLoader CCLayerGradientLoader;
CC_DEPRECATED_ATTRIBUTE typedef Scale9SpriteLoader CCScale9SpriteLoader;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderLibrary CCNodeLoaderLibrary;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemLoader CCMenuItemLoader;
CC_DEPRECATED_ATTRIBUTE typedef LayerColorLoader CCLayerColorLoader;
CC_DEPRECATED_ATTRIBUTE typedef LabelTTFLoader CCLabelTTFLoader;
#if CC_ENABLE_BOX2D_INTEGRATION || CC_ENABLE_CHIPMUNK_INTEGRATION
CC_DEPRECATED_ATTRIBUTE typedef PhysicsSprite CCPhysicsSprite;
CC_DEPRECATED_ATTRIBUTE typedef PhysicsDebugNode CCPhysicsDebugNode;
#endif
CC_DEPRECATED_ATTRIBUTE typedef ComController CCComController;
CC_DEPRECATED_ATTRIBUTE typedef ComAttribute CCComAttribute;
CC_DEPRECATED_ATTRIBUTE typedef InputDelegate CCInputDelegate;
CC_DEPRECATED_ATTRIBUTE typedef ComAudio CCComAudio;
CC_DEPRECATED_ATTRIBUTE typedef HttpClient CCHttpClient;
CC_DEPRECATED_ATTRIBUTE typedef HttpResponse CCHttpResponse;
CC_DEPRECATED_ATTRIBUTE typedef HttpRequest CCHttpRequest;
CC_DEPRECATED_ATTRIBUTE typedef Skin CCSkin;
CC_DEPRECATED_ATTRIBUTE typedef AtlasFormat CCAtlasFormat;
CC_DEPRECATED_ATTRIBUTE typedef AtlasFilter CCAtlasFilter;
CC_DEPRECATED_ATTRIBUTE typedef AtlasWrap CCAtlasWrap;
CC_DEPRECATED_ATTRIBUTE typedef AtlasPage CCAtlasPage;
CC_DEPRECATED_ATTRIBUTE typedef AtlasRegion CCAtlasRegion;
CC_DEPRECATED_ATTRIBUTE typedef Atlas CCAtlas;
CC_DEPRECATED_ATTRIBUTE typedef AnimationStateData CCAnimationStateData;
CC_DEPRECATED_ATTRIBUTE typedef SlotData CCSlotData;
CC_DEPRECATED_ATTRIBUTE typedef AttachmentLoader CCAttachmentLoader;
CC_DEPRECATED_ATTRIBUTE typedef AnimationState CCAnimationState;
CC_DEPRECATED_ATTRIBUTE typedef SkeletonJson CCSkeletonJson;
CC_DEPRECATED_ATTRIBUTE typedef Timeline CCTimeline;
CC_DEPRECATED_ATTRIBUTE typedef CurveTimeline CCCurveTimeline;
CC_DEPRECATED_ATTRIBUTE typedef RotateTimeline CCRotateTimeline;
CC_DEPRECATED_ATTRIBUTE typedef TranslateTimeline CCTranslateTimeline;
CC_DEPRECATED_ATTRIBUTE typedef ScaleTimeline CCScaleTimeline;
CC_DEPRECATED_ATTRIBUTE typedef ColorTimeline CCColorTimeline;
CC_DEPRECATED_ATTRIBUTE typedef AttachmentTimeline CCAttachmentTimeline;
CC_DEPRECATED_ATTRIBUTE typedef AtlasAttachmentLoader CCAtlasAttachmentLoader;
CC_DEPRECATED_ATTRIBUTE typedef VertexIndex CCVertexIndex;
CC_DEPRECATED_ATTRIBUTE typedef RegionAttachment CCRegionAttachment;
CC_DEPRECATED_ATTRIBUTE typedef ScrollViewDirection CCScrollViewDirection;
CC_DEPRECATED_ATTRIBUTE typedef TableViewVerticalFillOrder CCTableViewVerticalFillOrder;
CC_DEPRECATED_ATTRIBUTE typedef ControlStepperPart CCControlStepperPart;
CC_DEPRECATED_ATTRIBUTE typedef ControlEvent CCControlEvent;
CC_DEPRECATED_ATTRIBUTE typedef ControlState CCControlState;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderMap CCNodeLoaderMap;
CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderMapEntry CCNodeLoaderMapEntry;
CC_DEPRECATED_ATTRIBUTE typedef EventRegistry CCEventRegistry;
CC_DEPRECATED_ATTRIBUTE typedef AttachmentType CCAttachmentType;
#define kCCTableViewFillTopDown kTableViewFillTopDown
#define kCCTableViewFillBottomUp kTableViewFillBottomUp
#define kCCScrollViewDirectionNone kScrollViewDirectionNone
#define kCCScrollViewDirectionHorizontal kScrollViewDirectionHorizontal
#define kCCScrollViewDirectionVertical kScrollViewDirectionVertical
#define kCCScrollViewDirectionBoth kScrollViewDirectionBoth
#define kCCKeyboardReturnTypeDefault kKeyboardReturnTypeDefault
#define kCCKeyboardReturnTypeDone kKeyboardReturnTypeDone
#define kCCKeyboardReturnTypeSend kKeyboardReturnTypeSend
#define kCCKeyboardReturnTypeSearch kKeyboardReturnTypeSearch
#define kCCKeyboardReturnTypeGo kKeyboardReturnTypeGo
#define kCCEditBoxInputModeAny kEditBoxInputModeAny
#define kCCEditBoxInputModeEmailAddr kEditBoxInputModeEmailAddr
#define kCCEditBoxInputModeNumeric kEditBoxInputModeNumeric
#define kCCEditBoxInputModePhoneNumber kEditBoxInputModePhoneNumber
#define kCCEditBoxInputModeUrl kEditBoxInputModeUrl
#define kCCEditBoxInputModeDecimal kEditBoxInputModeDecimal
#define kCCEditBoxInputModeSingleLine kEditBoxInputModeSingleLine
#define kCCControlStepperPartMinus kControlStepperPartMinus
#define kCCControlStepperPartPlus kControlStepperPartPlus
#define kCCControlStepperPartNone kControlStepperPartNone
#define CCControlEventTouchDown ControlEventTouchDown
#define CCControlEventTouchDragInside ControlEventTouchDragInside
#define CCControlEventTouchDragOutside ControlEventTouchDragOutside
#define CCControlEventTouchDragEnter ControlEventTouchDragEnter
#define CCControlEventTouchDragExit ControlEventTouchDragExit
#define CCControlEventTouchUpInside ControlEventTouchUpInside
#define CCControlEventTouchUpOutside ControlEventTouchUpOutside
#define CCControlEventTouchCancel ControlEventTouchCancel
#define CCControlEventValueChanged ControlEventValueChanged
#define CCControlStateNormal ControlStateNormal
#define CCControlStateHighlighted ControlStateHighlighted
#define CCControlStateDisabled ControlStateDisabled
#define CCControlStateSelected ControlStateSelected
#define kCCCreateFile kCreateFile
#define kCCNetwork kNetwork
#define kCCNoNewVersion kNoNewVersion
#define kCCUncompress kUncompress
#define kCCHttpGet kHttpGet
#define kCCHttpPut kHttpPut
#define kCCHttpPost kHttpPost
#define kCCHttpDelete kHttpDelete
#define kCCHttpUnkown kHttpUnkown
NS_CC_EXT_END
#endif // COCOS2D_CCDEPRECATED_EXT_H__

View File

@ -39,6 +39,8 @@
#include "network/HttpRequest.h"
#include "network/HttpResponse.h"
#include "network/HttpClient.h"
#include "network/WebSocket.h"
#include "network/SocketIO.h"
// Physics integration
#if CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION
@ -52,4 +54,6 @@
#include "Components/CCComAudio.h"
#include "Components/CCComController.h"
#include "CCDeprecated-ext.h"
#endif /* __COCOS2D_EXT_H__ */

View File

@ -28,12 +28,15 @@
****************************************************************************/
#include "WebSocket.h"
#include <thread>
#include <mutex>
#include <queue>
#include <signal.h>
#include <errno.h>
#include "libwebsockets.h"
NS_CC_EXT_BEGIN
class WsMessage
@ -444,7 +447,7 @@ void WebSocket::onSubThreadEnded()
int WebSocket::onSocketCallback(struct libwebsocket_context *ctx,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason,
int reason,
void *user, void *in, size_t len)
{
//CCLOG("socket callback for %d reason", reason);

View File

@ -32,9 +32,12 @@
#include "ExtensionMacros.h"
#include "cocos2d.h"
#include "libwebsockets.h"
#include <list>
struct libwebsocket;
struct libwebsocket_context;
struct libwebsocket_protocols;
NS_CC_EXT_BEGIN
class WsThreadHelper;
@ -132,7 +135,7 @@ private:
friend class WebSocketCallbackWrapper;
int onSocketCallback(struct libwebsocket_context *ctx,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason,
int reason,
void *user, void *in, size_t len);
private:

View File

@ -16,6 +16,7 @@
<meta-data android:name="QHOPENSDK_APPID" android:value="Your app_id" />
<meta-data android:name="QHOPENSDK_APPKEY" android:value="Your app_key" />
<meta-data android:name="QHOPENSDK_PRIVATEKEY" android:value="Your app_private_key" />
<meta-data android:name="QHOPENSDK_CHANNEL" android:value="QH360" />
</applicationCfg>
<permissionCfg>
<uses-permission android:name="android.permission.SEND_SMS" />

View File

@ -181,15 +181,15 @@ public class IAPOnlineQH360 implements InterfaceIAP {
// optional params : ext, app order id, pay type
String ext1 = pInfo.get("QHExtra1");
if (null == ext1 && ! TextUtils.isEmpty(ext1)) {
if (null != ext1 && ! TextUtils.isEmpty(ext1)) {
bundle.putString(ProtocolKeys.APP_EXT_1, ext1);
}
String ext2 = pInfo.get("QHExtra2");
if (null == ext2 && ! TextUtils.isEmpty(ext2)) {
if (null != ext2 && ! TextUtils.isEmpty(ext2)) {
bundle.putString(ProtocolKeys.APP_EXT_2, ext2);
}
String appOrderId = pInfo.get("QHAppOrderID");
if (null == appOrderId && ! TextUtils.isEmpty(appOrderId)) {
if (null != appOrderId && ! TextUtils.isEmpty(appOrderId)) {
bundle.putString(ProtocolKeys.APP_ORDER_ID, appOrderId);
}

View File

@ -63,13 +63,13 @@ public class QH360Wrapper {
Configuration config = ctx.getResources().getConfiguration();
int orientation = config.orientation;
if (orientation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE ||
orientation != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
if (orientation != Configuration.ORIENTATION_LANDSCAPE &&
orientation != Configuration.ORIENTATION_PORTRAIT)
{
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
orientation = Configuration.ORIENTATION_PORTRAIT;
}
return (orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
return (orientation == Configuration.ORIENTATION_LANDSCAPE);
}
private static boolean mLogined = false;

View File

@ -109,13 +109,13 @@ public class UCWrapper {
Configuration config = ctx.getResources().getConfiguration();
int orientation = config.orientation;
if (orientation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE ||
orientation != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
if (orientation != Configuration.ORIENTATION_LANDSCAPE &&
orientation != Configuration.ORIENTATION_PORTRAIT)
{
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
orientation = Configuration.ORIENTATION_PORTRAIT;
}
return (orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
return (orientation == Configuration.ORIENTATION_LANDSCAPE);
}
public static String getSDKVersion() {

View File

@ -89,8 +89,8 @@ bool TestAds::init()
Size visibleSize = Director::getInstance()->getVisibleSize();
Point origin = Director::getInstance()->getVisibleOrigin();
Point posMid = ccp(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2);
Point posBR = ccp(origin.x + visibleSize.width, origin.y);
Point posMid = Point(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2);
Point posBR = Point(origin.x + visibleSize.width, origin.y);
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
@ -99,7 +99,7 @@ bool TestAds::init()
// add a "close" icon to exit the progress. it's an autorelease object
MenuItemFont *pBackItem = MenuItemFont::create("Back", CC_CALLBACK_1(TestAds::menuBackCallback, this));
Size backSize = pBackItem->getContentSize();
pBackItem->setPosition(ccpAdd(posBR, ccp(- backSize.width / 2, backSize.height / 2)));
pBackItem->setPosition(posBR + Point(- backSize.width / 2, backSize.height / 2));
// create menu, it's an autorelease object
Menu* pMenu = Menu::create(pBackItem, NULL);
@ -107,15 +107,15 @@ bool TestAds::init()
LabelTTF* label1 = LabelTTF::create("ShowAds", "Arial", 24);
MenuItemLabel* pItemShow = MenuItemLabel::create(label1, CC_CALLBACK_1(TestAds::testShow, this));
pItemShow->setAnchorPoint(ccp(0.5f, 0));
pItemShow->setAnchorPoint(Point(0.5f, 0));
pMenu->addChild(pItemShow, 0);
pItemShow->setPosition(ccpAdd(posMid, ccp(-100, -120)));
pItemShow->setPosition(posMid + Point(-100, -120));
LabelTTF* label2 = LabelTTF::create("HideAds", "Arial", 24);
MenuItemLabel* pItemHide = MenuItemLabel::create(label2, CC_CALLBACK_1(TestAds::testHide, this));
pItemHide->setAnchorPoint(ccp(0.5f, 0));
pItemHide->setAnchorPoint(Point(0.5f, 0));
pMenu->addChild(pItemHide, 0);
pItemHide->setPosition(ccpAdd(posMid, ccp(100, -120)));
pItemHide->setPosition(posMid + Point(100, -120));
// create optional menu
// cases item
@ -127,7 +127,7 @@ bool TestAds::init()
{
_caseItem->getSubItems()->addObject( MenuItemFont::create( s_aTestCases[i].c_str() ) );
}
_caseItem->setPosition(ccpAdd(posMid, ccp(-200, 120)));
_caseItem->setPosition(posMid + Point(-200, 120));
pMenu->addChild(_caseItem);
// type item
@ -139,7 +139,7 @@ bool TestAds::init()
{
_typeItem->getSubItems()->addObject( MenuItemFont::create( s_aTestTypes[i].c_str() ) );
}
_typeItem->setPosition(ccpAdd(posMid, ccp(0, 120)));
_typeItem->setPosition(posMid + Point(0, 120));
pMenu->addChild(_typeItem);
// poses item
@ -151,7 +151,7 @@ bool TestAds::init()
{
_posItem->getSubItems()->addObject( MenuItemFont::create( s_aTestPoses[i].c_str() ) );
}
_posItem->setPosition(ccpAdd(posMid, ccp(200, 120)));
_posItem->setPosition(posMid + Point(200, 120));
pMenu->addChild(_posItem);
// init options

View File

@ -89,7 +89,7 @@ bool TestAnalytics::init()
Size visibleSize = Director::getInstance()->getVisibleSize();
Point origin = Director::getInstance()->getVisibleOrigin();
Point posBR = ccp(origin.x + visibleSize.width, origin.y);
Point posBR = Point(origin.x + visibleSize.width, origin.y);
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
@ -98,7 +98,7 @@ bool TestAnalytics::init()
// add a "close" icon to exit the progress. it's an autorelease object
MenuItemFont *pBackItem = MenuItemFont::create("Back", CC_CALLBACK_1(TestAnalytics::menuBackCallback, this));
Size backSize = pBackItem->getContentSize();
pBackItem->setPosition(ccpAdd(posBR, ccp(- backSize.width / 2, backSize.height / 2)));
pBackItem->setPosition(posBR + Point(- backSize.width / 2, backSize.height / 2));
// create menu, it's an autorelease object
Menu* pMenu = Menu::create(pBackItem, NULL);
@ -111,15 +111,15 @@ bool TestAnalytics::init()
MenuItemLabel* pMenuItem = MenuItemLabel::create(label, CC_CALLBACK_1(TestAnalytics::eventMenuCallback, this));
pMenu->addChild(pMenuItem, 0, s_EventMenuItem[i].tag);
yPos = visibleSize.height - 35*i - 100;
pMenuItem->setPosition( ccp(visibleSize.width / 2, yPos));
pMenuItem->setPosition( Point(visibleSize.width / 2, yPos));
}
std::string strName = _pluginAnalytics->getPluginName();
std::string strVer = _pluginAnalytics->getSDKVersion();
char ret[256] = { 0 };
sprintf(ret, "Plugin : %s, Ver : %s", strName.c_str(), strVer.c_str());
LabelTTF* pLabel = LabelTTF::create(ret, "Arial", 18, CCSizeMake(visibleSize.width, 0), kTextAlignmentCenter);
pLabel->setPosition(ccp(visibleSize.width / 2, yPos - 80));
LabelTTF* pLabel = LabelTTF::create(ret, "Arial", 18, Point(visibleSize.width, 0), kTextAlignmentCenter);
pLabel->setPosition(Point(visibleSize.width / 2, yPos - 80));
addChild(pLabel);
return true;

View File

@ -48,7 +48,7 @@ MyPurchase::~MyPurchase()
}
}
MyPurchase* MyPurchase::sharedPurchase()
MyPurchase* MyPurchase::getInstance()
{
if (s_pPurchase == NULL) {
s_pPurchase = new MyPurchase();

View File

@ -35,7 +35,7 @@ public:
class MyPurchase
{
public:
static MyPurchase* sharedPurchase();
static MyPurchase* getInstance();
static void purgePurchase();
typedef enum {

View File

@ -70,28 +70,28 @@ bool TestIAP::init()
return false;
}
MyPurchase::sharedPurchase()->loadIAPPlugin();
MyPurchase::getInstance()->loadIAPPlugin();
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
EGLView* pEGLView = EGLView::getInstance();
Point posBR = ccp(pEGLView->getVisibleOrigin().x + pEGLView->getVisibleSize().width, pEGLView->getVisibleOrigin().y);
Point posTL = ccp(pEGLView->getVisibleOrigin().x, pEGLView->getVisibleOrigin().y + pEGLView->getVisibleSize().height);
Point posBR = Point(pEGLView->getVisibleOrigin().x + pEGLView->getVisibleSize().width, pEGLView->getVisibleOrigin().y);
Point posTL = Point(pEGLView->getVisibleOrigin().x, pEGLView->getVisibleOrigin().y + pEGLView->getVisibleSize().height);
// add a "close" icon to exit the progress. it's an autorelease object
MenuItemFont *pBackItem = MenuItemFont::create("Back", CC_CALLBACK_1(TestIAP::menuBackCallback, this));
Size backSize = pBackItem->getContentSize();
pBackItem->setPosition(ccpAdd(posBR, ccp(- backSize.width / 2, backSize.height / 2)));
pBackItem->setPosition(posBR + Point(- backSize.width / 2, backSize.height / 2));
// create menu, it's an autorelease object
Menu* pMenu = Menu::create(pBackItem, NULL);
pMenu->setPosition( Point::ZERO );
this->addChild(pMenu, 1);
Point posStep = ccp(220, -150);
Point beginPos = ccpAdd(posTL, ccpMult(posStep, 0.5f));
Point posStep = Point(220, -150);
Point beginPos = posTL + (posStep * 0.5f);
int line = 0;
int row = 0;
for (int i = 0; i < sizeof(s_EventMenuItem)/sizeof(s_EventMenuItem[0]); i++) {
@ -99,13 +99,13 @@ bool TestIAP::init()
CC_CALLBACK_1(TestIAP::eventMenuCallback, this));
pMenu->addChild(pMenuItem, 0, s_EventMenuItem[i].tag);
Point pos = ccpAdd(beginPos, ccp(posStep.x * row, posStep.y * line));
Point pos = beginPos + Point(posStep.x * row, posStep.y * line);
Size itemSize = pMenuItem->getContentSize();
if ((pos.x + itemSize.width / 2) > posBR.x)
{
line += 1;
row = 0;
pos = ccpAdd(beginPos, ccp(posStep.x * row, posStep.y * line));
pos = beginPos + Point(posStep.x * row, posStep.y * line);
}
row += 1;
pMenuItem->setPosition(pos);
@ -123,7 +123,7 @@ void TestIAP::eventMenuCallback(Object* pSender)
pInfo["productPrice"] = "0.01";
pInfo["productDesc"] = "100个金灿灿的游戏币哦";
pInfo["Nd91ProductId"] = "685994";
MyPurchase::sharedPurchase()->payByMode(pInfo, mode);
MyPurchase::getInstance()->payByMode(pInfo, mode);
}
void TestIAP::menuBackCallback(Object* pSender)

View File

@ -49,7 +49,7 @@ MyIAPOLManager::~MyIAPOLManager()
}
}
MyIAPOLManager* MyIAPOLManager::sharedManager()
MyIAPOLManager* MyIAPOLManager::getInstance()
{
if (s_pIAPOnline == NULL) {
s_pIAPOnline = new MyIAPOLManager();

View File

@ -36,7 +36,7 @@ public:
class MyIAPOLManager
{
public:
static MyIAPOLManager* sharedManager();
static MyIAPOLManager* getInstance();
static void purge();
typedef enum {

View File

@ -74,7 +74,7 @@ bool TestIAPOnline::init()
return false;
}
MyIAPOLManager::sharedManager()->loadPlugins();
MyIAPOLManager::getInstance()->loadPlugins();
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
@ -153,7 +153,7 @@ void TestIAPOnline::eventMenuCallback(Object* pSender)
// pInfo["QHAppOrderID"] = "Order ID in game"; // The order ID in game (Game defined this)
}
MyIAPOLManager::sharedManager()->payByMode(pInfo, mode);
MyIAPOLManager::getInstance()->payByMode(pInfo, mode);
}
void TestIAPOnline::menuBackCallback(Object* pSender)

View File

@ -48,7 +48,7 @@ MyShareManager::~MyShareManager()
}
}
MyShareManager* MyShareManager::sharedManager()
MyShareManager* MyShareManager::getInstance()
{
if (s_pManager == NULL) {
s_pManager = new MyShareManager();

View File

@ -35,7 +35,7 @@ public:
class MyShareManager
{
public:
static MyShareManager* sharedManager();
static MyShareManager* getInstance();
static void purgeManager();
typedef enum {

View File

@ -70,7 +70,7 @@ bool TestShare::init()
return false;
}
MyShareManager::sharedManager()->loadSharePlugin();
MyShareManager::getInstance()->loadSharePlugin();
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
@ -120,7 +120,7 @@ void TestShare::eventMenuCallback(Object* pSender)
pInfo["SharedText"] = "Share message : HelloShare!";
// pInfo["SharedImagePath"] = "Full/path/to/image";
MyShareManager::MyShareMode mode = (MyShareManager::MyShareMode) (pMenuItem->getTag() - TAG_SHARE_BY_TWWITER + 1);
MyShareManager::sharedManager()->shareByMode(pInfo, mode);
MyShareManager::getInstance()->shareByMode(pInfo, mode);
}
void TestShare::menuBackCallback(Object* pSender)

View File

@ -41,7 +41,7 @@ MySocialManager::~MySocialManager()
unloadPlugins();
}
MySocialManager* MySocialManager::sharedManager()
MySocialManager* MySocialManager::getInstance()
{
if (s_pManager == NULL) {
s_pManager = new MySocialManager();

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
class MySocialManager : public cocos2d::plugin::SocialListener
{
public:
static MySocialManager* sharedManager();
static MySocialManager* getInstance();
static void purgeManager();
typedef enum {

View File

@ -59,7 +59,7 @@ bool TestSocial::init()
return false;
}
MySocialManager::sharedManager()->loadPlugins();
MySocialManager::getInstance()->loadPlugins();
Size visibleSize = Director::getInstance()->getVisibleSize();
Point origin = Director::getInstance()->getVisibleOrigin();
@ -119,7 +119,7 @@ bool TestSocial::init()
void TestSocial::testSubmit(Object* pSender)
{
int nIdx = _caseItem->getSelectedIndex();
MySocialManager::sharedManager()->submitScore((MySocialManager::MySocialMode)(nIdx + 1), "0", 30000);
MySocialManager::getInstance()->submitScore((MySocialManager::MySocialMode)(nIdx + 1), "0", 30000);
}
void TestSocial::testUnlock(Object* pSender)
@ -129,19 +129,19 @@ void TestSocial::testUnlock(Object* pSender)
info["AchievementID"] = "MyAchiID";
info["NDDisplayText"] = "Fighter";
info["NDScore"] = "100";
MySocialManager::sharedManager()->unlockAchievement((MySocialManager::MySocialMode)(nIdx + 1), info);
MySocialManager::getInstance()->unlockAchievement((MySocialManager::MySocialMode)(nIdx + 1), info);
}
void TestSocial::testLeaderboard(Object* pSender)
{
int nIdx = _caseItem->getSelectedIndex();
MySocialManager::sharedManager()->showLeaderboard((MySocialManager::MySocialMode)(nIdx + 1), "0");
MySocialManager::getInstance()->showLeaderboard((MySocialManager::MySocialMode)(nIdx + 1), "0");
}
void TestSocial::testAchievement(Object* pSender)
{
int nIdx = _caseItem->getSelectedIndex();
MySocialManager::sharedManager()->showAchievement((MySocialManager::MySocialMode)(nIdx + 1));
MySocialManager::getInstance()->showAchievement((MySocialManager::MySocialMode)(nIdx + 1));
}
void TestSocial::menuBackCallback(Object* pSender)

View File

@ -49,7 +49,7 @@ MyUserManager::~MyUserManager()
}
}
MyUserManager* MyUserManager::sharedManager()
MyUserManager* MyUserManager::getInstance()
{
if (s_pManager == NULL) {
s_pManager = new MyUserManager();

View File

@ -36,7 +36,7 @@ public:
class MyUserManager
{
public:
static MyUserManager* sharedManager();
static MyUserManager* getInstance();
static void purgeManager();
typedef enum {

View File

@ -60,7 +60,7 @@ bool TestUser::init()
return false;
}
MyUserManager::sharedManager()->loadPlugin();
MyUserManager::getInstance()->loadPlugin();
Size visibleSize = Director::getInstance()->getVisibleSize();
Point origin = Director::getInstance()->getVisibleOrigin();
Point posMid = Point(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2);
@ -117,12 +117,12 @@ void TestUser::caseChanged(Object* pSender)
void TestUser::testLogin(Object* pSender)
{
MyUserManager::sharedManager()->loginByMode((MyUserManager::MyUserMode) (_selectedCase + 1));
MyUserManager::getInstance()->loginByMode((MyUserManager::MyUserMode) (_selectedCase + 1));
}
void TestUser::testLogout(Object* pSender)
{
MyUserManager::sharedManager()->logoutByMode((MyUserManager::MyUserMode) (_selectedCase + 1));
MyUserManager::getInstance()->logoutByMode((MyUserManager::MyUserMode) (_selectedCase + 1));
}
void TestUser::menuBackCallback(Object* pSender)

View File

@ -61,16 +61,16 @@ bool AppDelegate::applicationDidFinishLaunching()
void AppDelegate::applicationDidEnterBackground()
{
Director::getInstance()->stopAnimation();
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
SimpleAudioEngine::sharedEngine()->pauseAllEffects();
SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
SimpleAudioEngine::getInstance()->pauseAllEffects();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
Director::getInstance()->startAnimation();
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
SimpleAudioEngine::sharedEngine()->resumeAllEffects();
SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
SimpleAudioEngine::getInstance()->resumeAllEffects();
}
UpdateLayer::UpdateLayer()
@ -149,16 +149,16 @@ bool UpdateLayer::init()
pItemEnter = MenuItemFont::create("enter", CC_CALLBACK_1(UpdateLayer::enter, this));
pItemUpdate = MenuItemFont::create("update", CC_CALLBACK_1(UpdateLayer::update, this));
pItemEnter->setPosition(ccp(size.width/2, size.height/2 + 50));
pItemReset->setPosition(ccp(size.width/2, size.height/2));
pItemUpdate->setPosition(ccp(size.width/2, size.height/2 - 50));
pItemEnter->setPosition(Point(size.width/2, size.height/2 + 50));
pItemReset->setPosition(Point(size.width/2, size.height/2));
pItemUpdate->setPosition(Point(size.width/2, size.height/2 - 50));
Menu *menu = Menu::create(pItemUpdate, pItemEnter, pItemReset, NULL);
menu->setPosition(ccp(0,0));
menu->setPosition(Point(0,0));
addChild(menu);
pProgressLabel = LabelTTF::create("", "Arial", 20);
pProgressLabel->setPosition(ccp(100, 50));
pProgressLabel->setPosition(Point(100, 50));
addChild(pProgressLabel);
return true;

View File

@ -51,7 +51,7 @@ fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# ... use paths relative to current directory
COCOS2DX_ROOT="../../../../"
COCOS2DX_ROOT="$DIR/../../../.."
APP_ROOT="$DIR/.."
APP_ANDROID_ROOT="$DIR"
BINDINGS_JS_ROOT="$APP_ROOT/../../../scripting/javascript/bindings/js"

View File

@ -26,9 +26,9 @@ $(TARGET).js: $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST)
ifeq ($(shell uname -s),Darwin)
ARIEL_TTF := /Library/Fonts/Arial.ttf
ARIAL_TTF := /Library/Fonts/Arial.ttf
else
ARIEL_TTF := $(COCOS_ROOT)/samples/Cpp/TestCpp/Resources/fonts/arial.ttf
ARIAL_TTF := $(COCOS_ROOT)/samples/Cpp/TestCpp/Resources/fonts/arial.ttf
endif
$(TARGET).data:
@ -39,15 +39,16 @@ $(TARGET).data:
(cd $(RESOURCE_PATH) && cp -a $(RESOURCES) $(RESTMP))
(cd $(FONT_PATH) && cp -a * $(RESTMP)/fonts)
# NOTE: we copy the system arial.ttf so that there is always a fallback.
cp $(ARIEL_TTF) $(RESTMP)/fonts/arial.ttf
cp $(ARIAL_TTF) $(RESTMP)/fonts/arial.ttf
(cd $(RESTMP); python $(PACKAGER) $(EXECUTABLE).data $(patsubst %,--preload %,$(RESOURCES)) --preload fonts --pre-run > $(EXECUTABLE).data.js)
mv $(RESTMP)/$(EXECUTABLE).data $@
mv $(RESTMP)/$(EXECUTABLE).data.js $@.js
rm -rf $(RESTMP)
$(BIN_DIR)/index.html: index.html
$(BIN_DIR)/$(HTMLTPL_FILE): $(HTMLTPL_DIR)/$(HTMLTPL_FILE)
@mkdir -p $(@D)
cp index.html $(@D)
@cp -Rf $(HTMLTPL_DIR)/* $(BIN_DIR)
@sed -i -e "s/JS_APPLICATION/$(EXECUTABLE)/g" $(BIN_DIR)/$(HTMLTPL_FILE)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)

View File

@ -1,93 +0,0 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Emscripten-Generated Code</title>
<style>
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten { font-family: monospace; width: 80%; }
div.emscripten { text-align: center; }
div.emscripten_border { border: 1px solid black; }
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten { border: 0px none; }
</style>
</head>
<body>
<hr/>
<div class="emscripten" id="status">Downloading...</div>
<div class="emscripten">
<progress value="0" max="100" id="progress" hidden=1></progress>
</div>
<div class="emscripten_border">
<canvas width="1024" height="768" class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<hr/>
<div class="emscripten">
<input type="checkbox" id="resize">Resize canvas
<input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer
&nbsp;&nbsp;&nbsp;
<input type="button" value="Fullscreen" onclick="Module.requestFullScreen(document.getElementById('pointerLock').checked,
document.getElementById('resize').checked)">
</div>
<hr/>
<textarea class="emscripten" id="output" rows="8"></textarea>
<hr>
<script type='text/javascript'>
// connect to canvas
var Module = {
preRun: [],
postRun: [],
print: (function() {
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&amp;");
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
};
})(),
printErr: function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
console.log(text);
}
},
canvas: document.getElementById('canvas'),
setStatus: function(text) {
if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
var statusElement = document.getElementById('status');
var progressElement = document.getElementById('progress');
if (m) {
text = m[1];
progressElement.value = parseInt(m[2])*100;
progressElement.max = parseInt(m[4])*100;
progressElement.hidden = false;
} else {
progressElement.value = null;
progressElement.max = null;
progressElement.hidden = true;
}
statusElement.innerHTML = text;
},
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
Module.setStatus('Downloading...');
</script>
<script type="text/javascript" src="HelloCpp.data.js"></script>
<script type="text/javascript" src="HelloCpp.js"></script>
</body>
</html>

View File

@ -57,9 +57,10 @@ $(TARGET).data:
mv $(RESTMP)/$(EXECUTABLE).data.js $@.js
rm -rf $(RESTMP)
$(BIN_DIR)/index.html: index.html
$(BIN_DIR)/$(HTMLTPL_FILE): $(HTMLTPL_DIR)/$(HTMLTPL_FILE)
@mkdir -p $(@D)
cp index.html $(@D)
@cp -Rf $(HTMLTPL_DIR)/* $(BIN_DIR)
@sed -i -e "s/JS_APPLICATION/$(EXECUTABLE)/g" $(BIN_DIR)/$(HTMLTPL_FILE)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)

View File

@ -1,93 +0,0 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SimpleGame</title>
<style>
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten { font-family: monospace; width: 80%; }
div.emscripten { text-align: center; }
div.emscripten_border { border: 1px solid black; }
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten { border: 0px none; }
</style>
</head>
<body>
<hr/>
<div class="emscripten" id="status">Downloading...</div>
<div class="emscripten">
<progress value="0" max="100" id="progress" hidden=1></progress>
</div>
<div class="emscripten_border">
<canvas width="1024" height="768" class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<hr/>
<div class="emscripten">
<input type="checkbox" id="resize">Resize canvas
<input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer
&nbsp;&nbsp;&nbsp;
<input type="button" value="Fullscreen" onclick="Module.requestFullScreen(document.getElementById('pointerLock').checked,
document.getElementById('resize').checked)">
</div>
<hr/>
<textarea class="emscripten" id="output" rows="8"></textarea>
<hr>
<script type='text/javascript'>
// connect to canvas
var Module = {
preRun: [],
postRun: [],
print: (function() {
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&amp;");
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
};
})(),
printErr: function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
console.log(text);
}
},
canvas: document.getElementById('canvas'),
setStatus: function(text) {
if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
var statusElement = document.getElementById('status');
var progressElement = document.getElementById('progress');
if (m) {
text = m[1];
progressElement.value = parseInt(m[2])*100;
progressElement.max = parseInt(m[4])*100;
progressElement.hidden = false;
} else {
progressElement.value = null;
progressElement.max = null;
progressElement.hidden = true;
}
statusElement.innerHTML = text;
},
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
Module.setStatus('Downloading...');
</script>
<script type="text/javascript" src="SimpleGame.data.js"></script>
<script type="text/javascript" src="SimpleGame.js"></script>
</body>
</html>

View File

@ -12,12 +12,12 @@ AnimationsTestLayer::~AnimationsTestLayer()
CC_SAFE_RELEASE_NULL(mAnimationManager);
}
SEL_MenuHandler AnimationsTestLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName)
SEL_MenuHandler AnimationsTestLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName)
{
return NULL;
}
SEL_CCControlHandler AnimationsTestLayer::onResolveCCBControlSelector(Object *pTarget, const char*pSelectorName) {
SEL_CCControlHandler AnimationsTestLayer::onResolveCCBCCControlSelector(Object *pTarget, const char*pSelectorName) {
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onControlButtonIdleClicked", AnimationsTestLayer::onControlButtonIdleClicked);
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onControlButtonWaveClicked", AnimationsTestLayer::onControlButtonWaveClicked);
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onControlButtonJumpClicked", AnimationsTestLayer::onControlButtonJumpClicked);

View File

@ -15,8 +15,8 @@ public:
AnimationsTestLayer();
virtual ~AnimationsTestLayer();
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * node);
void onControlButtonIdleClicked(cocos2d::Object * pSender, cocos2d::extension::ControlEvent pControlEvent);

View File

@ -12,11 +12,11 @@ ButtonTestLayer::~ButtonTestLayer()
CC_SAFE_RELEASE(mControlEventLabel);
}
SEL_MenuHandler ButtonTestLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName) {
SEL_MenuHandler ButtonTestLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}
SEL_CCControlHandler ButtonTestLayer::onResolveCCBControlSelector(Object * pTarget, const char * pSelectorName) {
SEL_CCControlHandler ButtonTestLayer::onResolveCCBCCControlSelector(Object * pTarget, const char * pSelectorName) {
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onControlButtonClicked", ButtonTestLayer::onControlButtonClicked);
return NULL;

View File

@ -15,8 +15,8 @@ public:
ButtonTestLayer();
virtual ~ButtonTestLayer();
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * node);
void onControlButtonClicked(cocos2d::Object * pSender, cocos2d::extension::ControlEvent pControlEvent);

View File

@ -68,11 +68,11 @@ void HelloCocosBuilderLayer::onNodeLoaded(cocos2d::Node * node, cocos2d::extens
}
SEL_MenuHandler HelloCocosBuilderLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName) {
SEL_MenuHandler HelloCocosBuilderLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}
SEL_CCControlHandler HelloCocosBuilderLayer::onResolveCCBControlSelector(Object * pTarget, const char * pSelectorName) {
SEL_CCControlHandler HelloCocosBuilderLayer::onResolveCCBCCControlSelector(Object * pTarget, const char * pSelectorName) {
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onMenuTestClicked", HelloCocosBuilderLayer::onMenuTestClicked);
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onSpriteTestClicked", HelloCocosBuilderLayer::onSpriteTestClicked);
CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onButtonTestClicked", HelloCocosBuilderLayer::onButtonTestClicked);

View File

@ -28,8 +28,8 @@ class HelloCocosBuilderLayer
void openTest(const char * pCCBFileName, const char * nodeName = NULL, cocos2d::extension::NodeLoader * nodeLoader = NULL);
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * node);
virtual bool onAssignCCBCustomProperty(Object* pTarget, const char* pMemberVariableName, cocos2d::extension::CCBValue* pCCBValue);
virtual void onNodeLoaded(cocos2d::Node * node, cocos2d::extension::NodeLoader * nodeLoader);

View File

@ -12,7 +12,7 @@ MenuTestLayer::~MenuTestLayer()
CC_SAFE_RELEASE(mMenuItemStatusLabelBMFont);
}
SEL_MenuHandler MenuTestLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName) {
SEL_MenuHandler MenuTestLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName) {
CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(this, "onMenuItemAClicked", MenuTestLayer::onMenuItemAClicked);
CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(this, "onMenuItemBClicked", MenuTestLayer::onMenuItemBClicked);
CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(this, "onMenuItemCClicked", MenuTestLayer::onMenuItemCClicked);
@ -20,7 +20,7 @@ SEL_MenuHandler MenuTestLayer::onResolveCCBMenuItemSelector(Object * pTarget, co
return NULL;
}
SEL_CCControlHandler MenuTestLayer::onResolveCCBControlSelector(Object * pTarget, const char * pSelectorName) {
SEL_CCControlHandler MenuTestLayer::onResolveCCBCCControlSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}

View File

@ -15,8 +15,8 @@ class MenuTestLayer
MenuTestLayer();
virtual ~MenuTestLayer();
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * node);
void onMenuItemAClicked(cocos2d::Object * pSender);

View File

@ -3,13 +3,13 @@
USING_NS_CC;
USING_NS_CC_EXT;
SEL_MenuHandler TestHeaderLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName) {
SEL_MenuHandler TestHeaderLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName) {
CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(this, "onBackClicked", TestHeaderLayer::onBackClicked);
return NULL;
}
SEL_CCControlHandler TestHeaderLayer::onResolveCCBControlSelector(Object * pTarget, const char * pSelectorName) {
SEL_CCControlHandler TestHeaderLayer::onResolveCCBCCControlSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}

View File

@ -12,8 +12,8 @@ class TestHeaderLayer
public:
CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(TestHeaderLayer, create);
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual void onNodeLoaded(cocos2d::Node * node, cocos2d::extension::NodeLoader * nodeLoader);
void onBackClicked(cocos2d::Object * pSender);

View File

@ -14,11 +14,11 @@ TimelineCallbackTestLayer::~TimelineCallbackTestLayer()
CocosDenshion::SimpleAudioEngine::end();
}
SEL_MenuHandler TimelineCallbackTestLayer::onResolveCCBMenuItemSelector(Object * pTarget, const char * pSelectorName) {
SEL_MenuHandler TimelineCallbackTestLayer::onResolveCCBCCMenuItemSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}
SEL_CCControlHandler TimelineCallbackTestLayer::onResolveCCBControlSelector(Object * pTarget, const char * pSelectorName) {
SEL_CCControlHandler TimelineCallbackTestLayer::onResolveCCBCCControlSelector(Object * pTarget, const char * pSelectorName) {
return NULL;
}

View File

@ -15,8 +15,8 @@ class TimelineCallbackTestLayer
TimelineCallbackTestLayer();
virtual ~TimelineCallbackTestLayer();
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget, const char * pSelectorName);
virtual cocos2d::SEL_CallFuncN onResolveCCBCallFuncSelector(Object * pTarget, const char* pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * node);

View File

@ -35,17 +35,18 @@ void EnemyController::onEnter()
// Determine speed of the target
int minDuration = (int)2.0;
int maxDuration = (int)4.0;
int minDuration = 2;
int maxDuration = 4;
int rangeDuration = maxDuration - minDuration;
// srand( TimGetTicks() );
int actualDuration = ( rand() % rangeDuration ) + minDuration;
// Create the actions
FiniteTimeAction* actionMove = MoveTo::create( (float)actualDuration,
FiniteTimeAction* actionMove = MoveTo::create( actualDuration,
Point(0 - getOwner()->getContentSize().width/2, actualY) );
FiniteTimeAction* actionMoveDone = CallFuncN::create(getOwner()->getParent()->getComponent("SceneController"),
callfuncN_selector(SceneController::spriteMoveFinished));
FiniteTimeAction* actionMoveDone = CallFuncN::create(
CC_CALLBACK_1(SceneController::spriteMoveFinished, static_cast<SceneController*>( getOwner()->getParent()->getComponent("SceneController") )));
_owner->runAction( Sequence::create(actionMove, actionMoveDone, NULL) );
}

View File

@ -93,6 +93,10 @@ ProjectileController* ProjectileController::create(void)
return pRet;
}
void freeFunction( Node *ignore )
{
log("hello");
}
void ProjectileController::move(float flocationX, float flocationY)
{
@ -121,19 +125,25 @@ void ProjectileController::move(float flocationX, float flocationY)
float velocity = 480/1; // 480pixels/1sec
float realMoveDuration = length/velocity;
// Move projectile to actual endpoint
_owner->runAction( Sequence::create(
MoveTo::create(realMoveDuration, realDest),
CallFuncN::create(getOwner()->getParent()->getComponent("SceneController"),
callfuncN_selector(SceneController::spriteMoveFinished)),
NULL) );
auto callfunc = CallFuncN::create(
CC_CALLBACK_1(
SceneController::spriteMoveFinished,
static_cast<SceneController*>( getOwner()->getParent()->getComponent("SceneController")
) ) );
// Move projectile to actual endpoint
_owner->runAction(
Sequence::create(
MoveTo::create(realMoveDuration, realDest),
callfunc,
NULL)
);
}
void ProjectileController::die()
{
Component *com = _owner->getParent()->getComponent("SceneController");
cocos2d::Array *_projectiles = ((SceneController*)com)->getProjectiles();
cocos2d::Array *_projectiles = static_cast<SceneController*>(com)->getProjectiles();
_projectiles->removeObject(_owner);
_owner->removeFromParentAndCleanup(true);
}

View File

@ -143,9 +143,10 @@ $(TARGET).data: $(CORE_MAKEFILE_LIST) $(patsubst %,$(RESOURCE_PATH)/%,$(RESOURCE
cp -av $(RESOURCE_PATH)/* $(shell dirname $@)
rm -rf $(RESTMP)
$(BIN_DIR)/index.html: index.html $(CORE_MAKEFILE_LIST)
$(BIN_DIR)/$(HTMLTPL_FILE): $(HTMLTPL_DIR)/$(HTMLTPL_FILE) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
cp index.html $(@D)
@cp -Rf $(HTMLTPL_DIR)/* $(BIN_DIR)
@sed -i -e "s/JS_APPLICATION/$(EXECUTABLE)/g" $(BIN_DIR)/$(HTMLTPL_FILE)
####### Compile
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)

View File

@ -21,7 +21,7 @@ AppDelegate::AppDelegate()
AppDelegate::~AppDelegate()
{
ScriptEngineManager::purgeSharedManager();
ScriptEngineManager::destroyInstance();
}
bool AppDelegate::applicationDidFinishLaunching()

View File

@ -21,7 +21,7 @@ AppDelegate::AppDelegate()
AppDelegate::~AppDelegate()
{
ScriptEngineManager::purgeSharedManager();
ScriptEngineManager::destroyInstance();
}
bool AppDelegate::applicationDidFinishLaunching()

View File

@ -39,9 +39,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/generated
LOCAL_WHOLE_STATIC_LIBRARIES := spidermonkey_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
LOCAL_LDLIBS := -landroid
LOCAL_LDLIBS += -llog
@ -49,6 +47,4 @@ LOCAL_LDLIBS += -llog
include $(BUILD_STATIC_LIBRARY)
$(call import-module,scripting/javascript/spidermonkey-android)
$(call import-module,cocos2dx)
$(call import-module,extensions)
$(call import-module,external/chipmunk)

View File

@ -22,14 +22,14 @@ static void removeSelector(std::string &str) {
}
}
SEL_MenuHandler CCBScriptCallbackProxy::onResolveCCBMenuItemSelector(cocos2d::Object * pTarget,
SEL_MenuHandler CCBScriptCallbackProxy::onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget,
const char * pSelectorName) {
this->callBackProp = pSelectorName;
removeSelector(this->callBackProp);
return menu_selector(CCBScriptCallbackProxy::menuItemCallback);
}
SEL_CCControlHandler CCBScriptCallbackProxy::onResolveCCBControlSelector(Object * pTarget,
SEL_CCControlHandler CCBScriptCallbackProxy::onResolveCCBCCControlSelector(Object * pTarget,
const char * pSelectorName) {
this->callBackProp = pSelectorName;
@ -273,7 +273,7 @@ JSBool js_cocos2dx_CCBReader_createSceneWithNodeGraphFromFile(JSContext *cx, uin
JSBool js_CocosBuilder_create(JSContext *cx, uint32_t argc, jsval *vp)
{
NodeLoaderLibrary * ccNodeLoaderLibrary = NodeLoaderLibrary::sharedNodeLoaderLibrary();
NodeLoaderLibrary * ccNodeLoaderLibrary = NodeLoaderLibrary::getInstance();
ccNodeLoaderLibrary->registerNodeLoader("", JSLayerLoader::loader());

View File

@ -27,10 +27,10 @@ public:
virtual ~CCBScriptCallbackProxy() {}
CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(CCBScriptCallbackProxy, create);
virtual cocos2d::SEL_MenuHandler onResolveCCBMenuItemSelector(cocos2d::Object * pTarget,
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::Object * pTarget,
const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBControlSelector(cocos2d::Object * pTarget,
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::Object * pTarget,
const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName,
cocos2d::Node * pNode);

View File

@ -125,9 +125,9 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\cocos2dx;$(ProjectDir)..\..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32\pthread;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\..\CocosDenshion\include;$(ProjectDir)..;$(ProjectDir)..\..\spidermonkey-win32\include;$(ProjectDir)..\..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\..\external\libwebsockets\win32\include;$(ProjectDir)..\..\..\..\extensions;$(ProjectDir)..\..\..\..\extensions\LocalStorage;$(ProjectDir)..\..\..\..\extensions\network;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4996;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
@ -148,9 +148,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\sqlite3\libraries\win32\*.*" "$(O
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\cocos2dx;$(ProjectDir)..\..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32\pthread;$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\..\CocosDenshion\include;$(ProjectDir)..;$(ProjectDir)..\..\spidermonkey-win32\include;$(ProjectDir)..\..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\..\external\libwebsockets\win32\include;$(ProjectDir)..\..\..\..\extensions;$(ProjectDir)..\..\..\..\extensions\LocalStorage;$(ProjectDir)..\..\..\..\extensions\network;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4996;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>

View File

@ -27,7 +27,7 @@
CCBReader* CCBProxy::createCCBReader()
{
NodeLoaderLibrary *ccNodeLoaderLibrary = NodeLoaderLibrary::sharedNodeLoaderLibrary();
NodeLoaderLibrary *ccNodeLoaderLibrary = NodeLoaderLibrary::getInstance();
ccNodeLoaderLibrary->registerNodeLoader("", CCBLayerLoader::loader());

View File

@ -63,7 +63,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\pthread;$(ProjectDir)..\..\..\CocosDenshion\include;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\extensions\network;$(ProjectDir)..\..\..\external\libwebsockets\win32\include;$(ProjectDir)..\tolua;$(ProjectDir)..\luajit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -75,7 +75,7 @@
</PrecompiledHeaderOutputFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4996;4800;4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4800;4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
@ -95,7 +95,7 @@ xcopy /Y /Q "$(ProjectDir)..\luajit\win32\*.*" "$(OutDir)"</Command>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\pthread;$(ProjectDir)..\..\..\CocosDenshion\include;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\extensions\network;$(ProjectDir)..\..\..\external\libwebsockets\win32\include;$(ProjectDir)..\tolua;$(ProjectDir)..\luajit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
@ -106,7 +106,7 @@ xcopy /Y /Q "$(ProjectDir)..\luajit\win32\*.*" "$(OutDir)"</Command>
</PrecompiledHeaderOutputFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;4800;4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4800;4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>TestCpp</title>
<title>JS_APPLICATION</title>
<style>
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten { font-family: monospace; width: 80%; }
@ -101,7 +101,7 @@
};
Module.setStatus('Downloading...');
</script>
<script type="text/javascript" src="TestCpp.data.js"></script>
<script type="text/javascript" src="TestCpp.js"></script>
<script type="text/javascript" src="JS_APPLICATION.data.js"></script>
<script type="text/javascript" src="JS_APPLICATION.js"></script>
</body>
</html>