Lua compiles and runs

This commit is contained in:
Ricardo Quesada 2014-06-04 09:26:39 -07:00
parent 79ebc546f8
commit 0c2f8ed401
3 changed files with 6 additions and 4 deletions

View File

@ -5514,6 +5514,7 @@
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx; SDKROOT = macosx;
@ -5540,6 +5541,7 @@
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx; SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk"; USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk";

View File

@ -38,10 +38,10 @@ using namespace cocos2d::extension;
void GLNode::draw(Renderer *renderer, const cocos2d::Mat4& transform, bool transformUpdated) void GLNode::draw(Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags)
{ {
_renderCmd.init(_globalZOrder); _renderCmd.init(_globalZOrder);
_renderCmd.func = CC_CALLBACK_0(GLNode::onDraw, this, transform, transformUpdated); _renderCmd.func = CC_CALLBACK_0(GLNode::onDraw, this, transform, flags);
renderer->addCommand(&_renderCmd); renderer->addCommand(&_renderCmd);
} }
@ -60,7 +60,7 @@ void GLNode::onDraw(const cocos2d::Mat4 &transform, uint32_t flags)
stack->pushFloat(transform.m[i]); stack->pushFloat(transform.m[i]);
lua_rawseti(L, -2, i + 1); lua_rawseti(L, -2, i + 1);
} }
stack->pushBoolean(transformUpdated); stack->pushInt(flags);
stack->executeFunctionByHandler(handler, 2); stack->executeFunctionByHandler(handler, 2);
stack->clean(); stack->clean();
} }

View File

@ -39,7 +39,7 @@ class GLNode:public cocos2d::Node
{ {
public: public:
virtual ~GLNode(){} virtual ~GLNode(){}
virtual void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4& transform, bool transformUpdated) override; virtual void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags) override;
protected: protected:
cocos2d::CustomCommand _renderCmd; cocos2d::CustomCommand _renderCmd;
void onDraw(const cocos2d::Mat4 &transform, uint32_t flags); void onDraw(const cocos2d::Mat4 &transform, uint32_t flags);