mirror of https://github.com/axmolengine/axmol.git
issue #2433:Modify platform config and some test samples
This commit is contained in:
parent
1e54fdec00
commit
f56c6f7087
|
@ -100,7 +100,6 @@ public class Cocos2dxHelper {
|
||||||
|
|
||||||
//Cocos2dxHelper.nativeSetAssetManager(sAssetManager);
|
//Cocos2dxHelper.nativeSetAssetManager(sAssetManager);
|
||||||
Cocos2dxBitmap.setContext(activity);
|
Cocos2dxBitmap.setContext(activity);
|
||||||
Cocos2dxETCLoader.setContext(activity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Activity getActivity() {
|
public static Activity getActivity() {
|
||||||
|
|
|
@ -107,7 +107,7 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
|
||||||
</Command>
|
</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\libfreetype2;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\libfreetype2;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;$(ProjectDir)..\platform\third_party\common\etc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
|
|
|
@ -954,7 +954,7 @@ local function ActionFollow()
|
||||||
local x = winSize.width * 2 - 100
|
local x = winSize.width * 2 - 100
|
||||||
local y = winSize.height
|
local y = winSize.height
|
||||||
local vertices = { cc.p(5, 5), cc.p(x - 5, 5), cc.p(x - 5,y - 5), cc.p(5,y - 5) }
|
local vertices = { cc.p(5, 5), cc.p(x - 5, 5), cc.p(x - 5,y - 5), cc.p(5,y - 5) }
|
||||||
gl.DrawPrimitives.ccDrawPoly(vertices, 4, true)
|
cc.DrawPrimitives.ccDrawPoly(vertices, 4, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local glNode = gl.glNodeCreate()
|
local glNode = gl.glNodeCreate()
|
||||||
|
|
|
@ -86,55 +86,55 @@ local function drawPrimitivesMainLayer()
|
||||||
glNode:setAnchorPoint(cc.p(0.5, 0.5))
|
glNode:setAnchorPoint(cc.p(0.5, 0.5))
|
||||||
|
|
||||||
local function primitivesDraw()
|
local function primitivesDraw()
|
||||||
gl.DrawPrimitives.ccDrawLine(VisibleRect:leftBottom(), VisibleRect:rightTop() )
|
cc.DrawPrimitives.ccDrawLine(VisibleRect:leftBottom(), VisibleRect:rightTop() )
|
||||||
|
|
||||||
gl.lineWidth( 5.0 )
|
gl.lineWidth( 5.0 )
|
||||||
gl.DrawPrimitives.ccDrawColor4B(255,0,0,255)
|
cc.DrawPrimitives.ccDrawColor4B(255,0,0,255)
|
||||||
gl.DrawPrimitives.ccDrawLine( VisibleRect:leftTop(), VisibleRect:rightBottom() )
|
cc.DrawPrimitives.ccDrawLine( VisibleRect:leftTop(), VisibleRect:rightBottom() )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gl.DrawPrimitives.ccPointSize(64)
|
cc.DrawPrimitives.ccPointSize(64)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(0, 0, 255, 128)
|
cc.DrawPrimitives.ccDrawColor4B(0, 0, 255, 128)
|
||||||
gl.DrawPrimitives.ccDrawPoint(VisibleRect:center())
|
cc.DrawPrimitives.ccDrawPoint(VisibleRect:center())
|
||||||
|
|
||||||
local points = {cc.p(60,60), cc.p(70,70), cc.p(60,70), cc.p(70,60) }
|
local points = {cc.p(60,60), cc.p(70,70), cc.p(60,70), cc.p(70,60) }
|
||||||
gl.DrawPrimitives.ccPointSize(4)
|
cc.DrawPrimitives.ccPointSize(4)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(0,255,255,255)
|
cc.DrawPrimitives.ccDrawColor4B(0,255,255,255)
|
||||||
gl.DrawPrimitives.ccDrawPoints(points,4)
|
cc.DrawPrimitives.ccDrawPoints(points,4)
|
||||||
|
|
||||||
gl.lineWidth(16)
|
gl.lineWidth(16)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(0, 255, 0, 255)
|
cc.DrawPrimitives.ccDrawColor4B(0, 255, 0, 255)
|
||||||
gl.DrawPrimitives.ccDrawCircle( VisibleRect:center(), 100, 0, 10, false)
|
cc.DrawPrimitives.ccDrawCircle( VisibleRect:center(), 100, 0, 10, false)
|
||||||
|
|
||||||
gl.lineWidth(2)
|
gl.lineWidth(2)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(0, 255, 255, 255)
|
cc.DrawPrimitives.ccDrawColor4B(0, 255, 255, 255)
|
||||||
gl.DrawPrimitives.ccDrawCircle( VisibleRect:center(), 50, math.pi / 2, 50, true)
|
cc.DrawPrimitives.ccDrawCircle( VisibleRect:center(), 50, math.pi / 2, 50, true)
|
||||||
|
|
||||||
gl.lineWidth(2)
|
gl.lineWidth(2)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(255, 0, 255, 255)
|
cc.DrawPrimitives.ccDrawColor4B(255, 0, 255, 255)
|
||||||
gl.DrawPrimitives.ccDrawSolidCircle( cc.p(VisibleRect:center().x + 140 ,VisibleRect:center().y), 40, math.rad(90), 50, 1.0, 1.0)
|
cc.DrawPrimitives.ccDrawSolidCircle( cc.p(VisibleRect:center().x + 140 ,VisibleRect:center().y), 40, math.rad(90), 50, 1.0, 1.0)
|
||||||
|
|
||||||
gl.lineWidth(10)
|
gl.lineWidth(10)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(255, 255, 0, 255)
|
cc.DrawPrimitives.ccDrawColor4B(255, 255, 0, 255)
|
||||||
local yellowPoints = { cc.p(0,0), cc.p(50,50), cc.p(100,50), cc.p(100,100), cc.p(50,100)}
|
local yellowPoints = { cc.p(0,0), cc.p(50,50), cc.p(100,50), cc.p(100,100), cc.p(50,100)}
|
||||||
gl.DrawPrimitives.ccDrawPoly( yellowPoints, 5, false)
|
cc.DrawPrimitives.ccDrawPoly( yellowPoints, 5, false)
|
||||||
|
|
||||||
gl.lineWidth(1)
|
gl.lineWidth(1)
|
||||||
local filledVertices = { cc.p(0,120), cc.p(50,120), cc.p(50,170), cc.p(25,200), cc.p(0,170) }
|
local filledVertices = { cc.p(0,120), cc.p(50,120), cc.p(50,170), cc.p(25,200), cc.p(0,170) }
|
||||||
gl.DrawPrimitives.ccDrawSolidPoly(filledVertices, 5, cc.c4f(0.5, 0.5, 1, 1))
|
cc.DrawPrimitives.ccDrawSolidPoly(filledVertices, 5, cc.c4f(0.5, 0.5, 1, 1))
|
||||||
|
|
||||||
gl.lineWidth(2)
|
gl.lineWidth(2)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(255, 0, 255, 255)
|
cc.DrawPrimitives.ccDrawColor4B(255, 0, 255, 255)
|
||||||
local closePoints= { cc.p(30,130), cc.p(30,230), cc.p(50,200) }
|
local closePoints= { cc.p(30,130), cc.p(30,230), cc.p(50,200) }
|
||||||
gl.DrawPrimitives.ccDrawPoly( closePoints, 3, true)
|
cc.DrawPrimitives.ccDrawPoly( closePoints, 3, true)
|
||||||
|
|
||||||
gl.DrawPrimitives.ccDrawQuadBezier(VisibleRect:leftTop(), VisibleRect:center(), VisibleRect:rightTop(), 50)
|
cc.DrawPrimitives.ccDrawQuadBezier(VisibleRect:leftTop(), VisibleRect:center(), VisibleRect:rightTop(), 50)
|
||||||
|
|
||||||
gl.DrawPrimitives.ccDrawCubicBezier(VisibleRect:center(), cc.p(VisibleRect:center().x + 30, VisibleRect:center().y + 50), cc.p(VisibleRect:center().x + 60,VisibleRect:center().y - 50), VisibleRect:right(), 100)
|
cc.DrawPrimitives.ccDrawCubicBezier(VisibleRect:center(), cc.p(VisibleRect:center().x + 30, VisibleRect:center().y + 50), cc.p(VisibleRect:center().x + 60,VisibleRect:center().y - 50), VisibleRect:right(), 100)
|
||||||
|
|
||||||
local solidvertices = {cc.p(60,160), cc.p(70,190), cc.p(100,190), cc.p(90,160)}
|
local solidvertices = {cc.p(60,160), cc.p(70,190), cc.p(100,190), cc.p(90,160)}
|
||||||
gl.DrawPrimitives.ccDrawSolidPoly( solidvertices, 4, cc.c4f(1, 1, 0, 1) )
|
cc.DrawPrimitives.ccDrawSolidPoly( solidvertices, 4, cc.c4f(1, 1, 0, 1) )
|
||||||
|
|
||||||
local array = {
|
local array = {
|
||||||
cc.p(0, 0),
|
cc.p(0, 0),
|
||||||
|
@ -143,13 +143,13 @@ local function drawPrimitivesMainLayer()
|
||||||
cc.p(0, size.height - 80),
|
cc.p(0, size.height - 80),
|
||||||
cc.p(0, 0),
|
cc.p(0, 0),
|
||||||
}
|
}
|
||||||
gl.DrawPrimitives.ccDrawCatmullRom( array, 5)
|
cc.DrawPrimitives.ccDrawCatmullRom( array, 5)
|
||||||
|
|
||||||
gl.DrawPrimitives.ccDrawCardinalSpline( array, 0,100)
|
cc.DrawPrimitives.ccDrawCardinalSpline( array, 0,100)
|
||||||
|
|
||||||
gl.lineWidth(1)
|
gl.lineWidth(1)
|
||||||
gl.DrawPrimitives.ccDrawColor4B(255,255,255,255)
|
cc.DrawPrimitives.ccDrawColor4B(255,255,255,255)
|
||||||
gl.DrawPrimitives.ccPointSize(1)
|
cc.DrawPrimitives.ccPointSize(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
glNode:registerScriptDrawHandler(primitivesDraw)
|
glNode:registerScriptDrawHandler(primitivesDraw)
|
||||||
|
|
|
@ -121,12 +121,12 @@ end
|
||||||
-- class Lens3DTarget : public cc.Node
|
-- class Lens3DTarget : public cc.Node
|
||||||
|
|
||||||
-- public:
|
-- public:
|
||||||
-- virtual void setPosition(const cc.p& var)
|
-- virtual void setPosition(const CCPoint& var)
|
||||||
|
|
||||||
-- m_pLens3D:setPosition(var)
|
-- m_pLens3D:setPosition(var)
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- virtual const cc.p& getPosition()
|
-- virtual const CCPoint& getPosition()
|
||||||
|
|
||||||
-- return m_pLens3D:getPosition()
|
-- return m_pLens3D:getPosition()
|
||||||
-- end
|
-- end
|
||||||
|
|
|
@ -120,8 +120,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\libwebsockets\win32\lib\*.*" "$(O
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<ExceptionHandling>
|
<ExceptionHandling>
|
||||||
</ExceptionHandling>
|
</ExceptionHandling>
|
||||||
<DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</DebugInformationFormat>
|
|
||||||
<PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
@ -131,6 +130,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\libwebsockets\win32\lib\*.*" "$(O
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libcocos2d.lib;libExtensions.lib;libBox2d.lib;libchipmunk.lib;libCocosDenshion.lib;liblua.lib;lua51.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
|
|
|
@ -610,102 +610,12 @@ void LuaEngine::extendLuaObject()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lua_State* lua_S = _stack->getLuaState();
|
lua_State* lua_S = _stack->getLuaState();
|
||||||
extendNode(lua_S);
|
|
||||||
extendMenuItem(lua_S);
|
|
||||||
extendLayer(lua_S);
|
|
||||||
extendControl(lua_S);
|
|
||||||
extendWebsocket(lua_S);
|
extendWebsocket(lua_S);
|
||||||
extendGLNode(lua_S);
|
extendGLNode(lua_S);
|
||||||
extendScrollView(lua_S);
|
|
||||||
extendDrawNode(lua_S);
|
|
||||||
|
|
||||||
_stack->clean();
|
_stack->clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaEngine::extendNode(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if(NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCNode");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"registerScriptHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_registerScriptHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
lua_pushstring(lua_S,"unregisterScriptHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_unregisterScriptHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LuaEngine::extendMenuItem(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if (NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCMenuItem");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"registerScriptTapHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_registerScriptTapHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
lua_pushstring(lua_S, "unregisterScriptTapHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_unregisterScriptTapHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LuaEngine::extendLayer(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if (NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCLayer");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"registerScriptTouchHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_registerScriptTouchHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
lua_pushstring(lua_S, "unregisterScriptTouchHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_unregisterScriptTouchHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
lua_pushstring(lua_S, "registerScriptKeypadHandler");
|
|
||||||
lua_pushcfunction(lua_S, tolua_Cocos2d_registerScriptKeypadHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
lua_pushstring(lua_S, "unregisterScriptKeypadHandler");
|
|
||||||
lua_pushcfunction(lua_S, tolua_Cocos2d_unregisterScriptKeypadHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
lua_pushstring(lua_S, "registerScriptAccelerateHandler");
|
|
||||||
lua_pushcfunction(lua_S, tolua_Cocos2d_registerScriptAccelerateHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
lua_pushstring(lua_S, "unregisterScriptAccelerateHandler");
|
|
||||||
lua_pushcfunction(lua_S, tolua_Cocos2d_unregisterScriptAccelerateHandler00);
|
|
||||||
lua_rawset(lua_S, -3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LuaEngine::extendControl(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if (NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCControl");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"registerControlEventHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_registerControlEventHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
lua_pushstring(lua_S,"unregisterControlEventHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_unregisterControlEventHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LuaEngine::extendWebsocket(lua_State* lua_S)
|
void LuaEngine::extendWebsocket(lua_State* lua_S)
|
||||||
{
|
{
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||||
|
@ -743,38 +653,4 @@ void LuaEngine::extendGLNode(lua_State* lua_S)
|
||||||
lua_rawset(lua_S,-3);
|
lua_rawset(lua_S,-3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaEngine::extendScrollView(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if (NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCScrollView");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"registerScriptHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_ScrollView_registerScriptHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
lua_pushstring(lua_S,"unregisterScriptHandler");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_ScrollView_unregisterScriptHandler00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LuaEngine::extendDrawNode(lua_State* lua_S)
|
|
||||||
{
|
|
||||||
if (NULL == lua_S)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lua_pushstring(lua_S,"CCDrawNode");
|
|
||||||
lua_rawget(lua_S,LUA_REGISTRYINDEX);
|
|
||||||
if (lua_istable(lua_S,-1))
|
|
||||||
{
|
|
||||||
lua_pushstring(lua_S,"drawPolygon");
|
|
||||||
lua_pushcfunction(lua_S,tolua_Cocos2d_CCDrawNode_drawPolygon00);
|
|
||||||
lua_rawset(lua_S,-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -138,14 +138,8 @@ private:
|
||||||
int handleTouchEvent(void* data);
|
int handleTouchEvent(void* data);
|
||||||
int handleTouchesEvent(void* data);
|
int handleTouchesEvent(void* data);
|
||||||
int handlerControlEvent(void* data);
|
int handlerControlEvent(void* data);
|
||||||
void extendNode(lua_State* lua_S);
|
|
||||||
void extendMenuItem(lua_State* lua_S);
|
|
||||||
void extendLayer(lua_State* lua_S);
|
|
||||||
void extendControl(lua_State* lua_S);
|
|
||||||
void extendWebsocket(lua_State* lua_S);
|
void extendWebsocket(lua_State* lua_S);
|
||||||
void extendGLNode(lua_State* lua_S);
|
void extendGLNode(lua_State* lua_S);
|
||||||
void extendScrollView(lua_State* lua_S);
|
|
||||||
void extendDrawNode(lua_State* lua_S);
|
|
||||||
private:
|
private:
|
||||||
static LuaEngine* _defaultEngine;
|
static LuaEngine* _defaultEngine;
|
||||||
LuaStack *_stack;
|
LuaStack *_stack;
|
||||||
|
|
|
@ -63,6 +63,25 @@ void luaval_to_native_err(lua_State* L,const char* msg,tolua_Error* err)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
extern int lua_isusertype (lua_State* L, int lo, const char* type);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool luaval_is_usertype(lua_State* L,int lo,const char* type, int def)
|
||||||
|
{
|
||||||
|
if (def && lua_gettop(L)<abs(lo))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (lua_isnil(L,lo) || lua_isusertype(L,lo,type))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool luaval_to_int32(lua_State* L,int lo,int* outValue)
|
bool luaval_to_int32(lua_State* L,int lo,int* outValue)
|
||||||
{
|
{
|
||||||
|
@ -70,14 +89,15 @@ bool luaval_to_int32(lua_State* L,int lo,int* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -93,14 +113,15 @@ bool luaval_to_uint32(lua_State* L, int lo, unsigned int* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -116,14 +137,15 @@ bool luaval_to_uint16(lua_State* L,int lo,uint16_t* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -139,14 +161,15 @@ bool luaval_to_boolean(lua_State* L,int lo,bool* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isboolean(L,lo,0,&tolua_err))
|
if (!tolua_isboolean(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -162,14 +185,15 @@ bool luaval_to_number(lua_State* L,int lo,double* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -185,14 +209,15 @@ bool luaval_to_long_long(lua_State* L,int lo,long long* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -208,14 +233,15 @@ bool luaval_to_std_string(lua_State* L, int lo, std::string* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_iscppstring(L,lo,0,&tolua_err))
|
if (!tolua_iscppstring(L,lo,0,&tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -231,14 +257,16 @@ bool luaval_to_point(lua_State* L,int lo,Point* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -261,14 +289,15 @@ bool luaval_to_size(lua_State* L,int lo,Size* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -292,14 +321,15 @@ bool luaval_to_rect(lua_State* L,int lo,Rect* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -333,14 +363,15 @@ bool luaval_to_color4b(lua_State* L,int lo,Color4B* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if(ok)
|
if(ok)
|
||||||
{
|
{
|
||||||
|
@ -374,14 +405,15 @@ bool luaval_to_color4f(lua_State* L,int lo,Color4F* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -415,14 +447,15 @@ bool luaval_to_color3b(lua_State* L,int lo,Color3B* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -451,14 +484,15 @@ bool luaval_to_affinetransform(lua_State* L,int lo, AffineTransform* outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -501,14 +535,15 @@ bool luaval_to_fontdefinition(lua_State* L, int lo, FontDefinition* outValue )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -641,14 +676,15 @@ bool luaval_to_array(lua_State* L,int lo, Array** outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -740,14 +776,15 @@ bool luaval_to_dictionary(lua_State* L,int lo, Dictionary** outValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -843,14 +880,15 @@ bool luaval_to_array_of_Point(lua_State* L,int lo,Point **points, int *numPoints
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >=1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
|
|
||||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -866,7 +904,9 @@ bool luaval_to_array_of_Point(lua_State* L,int lo,Point **points, int *numPoints
|
||||||
lua_gettable(L,lo);
|
lua_gettable(L,lo);
|
||||||
if (!tolua_istable(L,-1, 0, &tolua_err))
|
if (!tolua_istable(L,-1, 0, &tolua_err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||||
|
#endif
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
free(array);
|
free(array);
|
||||||
return false;
|
return false;
|
||||||
|
@ -918,7 +958,9 @@ bool luavals_variadic_to_array(lua_State* L,int argc, Array** ret)
|
||||||
tolua_Error err;
|
tolua_Error err;
|
||||||
if (!tolua_isusertype(L, i + 2, "Object", 0, &err))
|
if (!tolua_isusertype(L, i + 2, "Object", 0, &err))
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >=1
|
||||||
luaval_to_native_err(L,"#ferror:",&err);
|
luaval_to_native_err(L,"#ferror:",&err);
|
||||||
|
#endif
|
||||||
ok = false;
|
ok = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,12 @@ extern std::map<int, std::string> g_luaType;
|
||||||
void luaval_to_native_err(lua_State* L,const char* msg,tolua_Error* err);
|
void luaval_to_native_err(lua_State* L,const char* msg,tolua_Error* err);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LUA_PRECONDITION( condition, ...) if( ! (condition) ) { \
|
||||||
|
cocos2d::log("lua: ERROR: File %s: Line: %d, Function: %s", __FILE__, __LINE__, __FUNCTION__ ); \
|
||||||
|
cocos2d::log(__VA_ARGS__); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
extern bool luaval_is_usertype(lua_State* L,int lo,const char* type, int def);
|
||||||
// to native
|
// to native
|
||||||
extern bool luaval_to_int32(lua_State* L,int lo,int* outValue);
|
extern bool luaval_to_int32(lua_State* L,int lo,int* outValue);
|
||||||
extern bool luaval_to_uint32(lua_State* L, int lo, unsigned int* outValue);
|
extern bool luaval_to_uint32(lua_State* L, int lo, unsigned int* outValue);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
e2ec824824096631a51472eab29643b0f55ef6f3
|
9cc1dd2f5d0c8ac7d482c43073ce89bacf13e216
|
|
@ -1 +1 @@
|
||||||
530998c7faef0242beb39b48b0bd0708eacef53e
|
e16b5f13abf18c6bce128ea42f2872085bab4723
|
|
@ -251,11 +251,10 @@ static int tolua_cocos2d_Menu_create(lua_State* tolua_S)
|
||||||
uint32_t i = 1;
|
uint32_t i = 1;
|
||||||
while (i <= argc)
|
while (i <= argc)
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
if (!tolua_isusertype(tolua_S, 1 + i, "MenuItem", 0, &tolua_err))
|
if (!tolua_isusertype(tolua_S, 1 + i, "MenuItem", 0, &tolua_err))
|
||||||
{
|
|
||||||
goto tolua_lerror;
|
goto tolua_lerror;
|
||||||
return 0;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
||||||
if (NULL != item)
|
if (NULL != item)
|
||||||
|
@ -660,6 +659,8 @@ static int tolua_cocos2d_Layer_registerScriptKeypadHandler(lua_State* tolua_S)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S) - 1;
|
||||||
|
|
||||||
if (1 == argc)
|
if (1 == argc)
|
||||||
{
|
{
|
||||||
#if COCOS2D_DEBUG >= 1
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
@ -705,6 +706,8 @@ static int tolua_cocos2d_Layer_unregisterScriptKeypadHandler(lua_State* tolua_S)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S) - 1;
|
||||||
|
|
||||||
if (0 == argc)
|
if (0 == argc)
|
||||||
{
|
{
|
||||||
ScriptHandlerMgr::getInstance()->removeObjectHandler(self, ScriptHandlerMgr::kKeypadHandler);
|
ScriptHandlerMgr::getInstance()->removeObjectHandler(self, ScriptHandlerMgr::kKeypadHandler);
|
||||||
|
@ -927,11 +930,10 @@ int tolua_cocos2d_Sequence_create(lua_State* tolua_S)
|
||||||
uint32_t i = 1;
|
uint32_t i = 1;
|
||||||
while (i <= argc)
|
while (i <= argc)
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
if (!tolua_isusertype(tolua_S, 1 + i, "Object", 0, &tolua_err))
|
if (!tolua_isusertype(tolua_S, 1 + i, "Object", 0, &tolua_err))
|
||||||
{
|
|
||||||
goto tolua_lerror;
|
goto tolua_lerror;
|
||||||
return 0;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
||||||
if (NULL != item)
|
if (NULL != item)
|
||||||
|
@ -1248,11 +1250,10 @@ static int tolua_cocos2d_Spawn_create(lua_State* tolua_S)
|
||||||
uint32_t i = 1;
|
uint32_t i = 1;
|
||||||
while (i <= argc)
|
while (i <= argc)
|
||||||
{
|
{
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
if (!tolua_isusertype(tolua_S, 1 + i, "Object", 0, &tolua_err))
|
if (!tolua_isusertype(tolua_S, 1 + i, "Object", 0, &tolua_err))
|
||||||
{
|
|
||||||
goto tolua_lerror;
|
goto tolua_lerror;
|
||||||
return 0;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
cocos2d::Object* item = static_cast<cocos2d::Object*>(tolua_tousertype(tolua_S, 1 + i, NULL));
|
||||||
if (NULL != item)
|
if (NULL != item)
|
||||||
|
@ -1604,8 +1605,8 @@ static int tolua_cocos2d_DrawNode_drawPolygon(lua_State* tolua_S)
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
DrawNode* self = nullptr;
|
DrawNode* self = nullptr;
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
if (!tolua_isusertype(tolua_S,1,"DrawNode",0,&tolua_err)) goto tolua_lerror;
|
if (!tolua_isusertype(tolua_S,1,"DrawNode",0,&tolua_err)) goto tolua_lerror;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1645,7 +1646,9 @@ static int tolua_cocos2d_DrawNode_drawPolygon(lua_State* tolua_S)
|
||||||
if (!tolua_istable(tolua_S,-1, 0, &tolua_err))
|
if (!tolua_istable(tolua_S,-1, 0, &tolua_err))
|
||||||
{
|
{
|
||||||
CC_SAFE_DELETE_ARRAY(points);
|
CC_SAFE_DELETE_ARRAY(points);
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
goto tolua_lerror;
|
goto tolua_lerror;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!luaval_to_point(tolua_S, lua_gettop(tolua_S), &points[i]))
|
if(!luaval_to_point(tolua_S, lua_gettop(tolua_S), &points[i]))
|
||||||
|
|
|
@ -3,6 +3,24 @@ cc = cc or {}
|
||||||
cc.DIRECTOR_PROJECTION_2D = 0
|
cc.DIRECTOR_PROJECTION_2D = 0
|
||||||
cc.DIRECTOR_PROJECTION_3D = 1
|
cc.DIRECTOR_PROJECTION_3D = 1
|
||||||
|
|
||||||
|
function cc.clampf(value, min_inclusive, max_inclusive)
|
||||||
|
-- body
|
||||||
|
local temp = 0
|
||||||
|
if min_inclusive > max_inclusive then
|
||||||
|
temp = min_inclusive
|
||||||
|
min_inclusive = max_inclusive
|
||||||
|
max_inclusive = temp
|
||||||
|
end
|
||||||
|
|
||||||
|
if value < min_inclusive then
|
||||||
|
return min_inclusive
|
||||||
|
elseif value < max_inclusive then
|
||||||
|
return value
|
||||||
|
else
|
||||||
|
return max_inclusive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--Point
|
--Point
|
||||||
function cc.p(_x,_y)
|
function cc.p(_x,_y)
|
||||||
if nil == _y then
|
if nil == _y then
|
||||||
|
@ -24,6 +42,10 @@ function cc.pMul(pt1,factor)
|
||||||
return { x = pt1.x * factor , y = pt1.y * factor }
|
return { x = pt1.x * factor , y = pt1.y * factor }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function cc.pMidpoint(pt1,pt2)
|
||||||
|
return { x = (pt1.x + pt2.x) / 2.0 , y = ( pt1.y + pt2.y) / 2.0 }
|
||||||
|
end
|
||||||
|
|
||||||
function cc.pForAngle(a)
|
function cc.pForAngle(a)
|
||||||
return { x = math.cos(a), y = math.sin(a) }
|
return { x = math.cos(a), y = math.sin(a) }
|
||||||
end
|
end
|
||||||
|
@ -53,7 +75,7 @@ function cc.pToAngleSelf(self)
|
||||||
return math.atan2(self.y, self.x)
|
return math.atan2(self.y, self.x)
|
||||||
end
|
end
|
||||||
|
|
||||||
function cc.pToAngle(self,other)
|
function cc.pGetAngle(self,other)
|
||||||
local a2 = cc.pNormalize(self)
|
local a2 = cc.pNormalize(self)
|
||||||
local b2 = cc.pNormalize(other)
|
local b2 = cc.pNormalize(other)
|
||||||
local angle = math.atan2(cc.pCross(a2, b2), cc.pDot(a2, b2) )
|
local angle = math.atan2(cc.pCross(a2, b2), cc.pDot(a2, b2) )
|
||||||
|
@ -98,6 +120,78 @@ function cc.pIsLineIntersect(A, B, C, D, s, t)
|
||||||
return true,s,t
|
return true,s,t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function cc.pPerp(pt)
|
||||||
|
return { x = -pt.y, y = pt.x }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.RPerp(pt)
|
||||||
|
return { x = pt.y, y = -pt.x }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pProject(pt1, pt2)
|
||||||
|
return { x = pt2.x * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) , y = pt2.y * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pRotate(pt1, pt2)
|
||||||
|
return { x = pt1.x * pt2.x - pt1.y * pt2.y, y = pt1.x * pt2.y + pt1.y * pt2.x }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pUnrotate(pt1, pt2)
|
||||||
|
return { x = pt1.x * pt2.x + pt1.y * pt2.y, pt1.y * pt2.x - pt1.x * pt2.y }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pLengthSQ(pt)
|
||||||
|
return cc.pDot(pt)
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pDistanceSQ(pt1,pt2)
|
||||||
|
return cc.pLengthSQ(cc.pSub(pt1,pt2))
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pGetClampPoint(pt1,pt2,pt3)
|
||||||
|
return { x = cc.clampf(pt1.x, pt2.x, pt3.x), y = cc.clampf(pt1.y, pt2.y, pt3.y) }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pFromSize(sz)
|
||||||
|
return { x = sz.width, y = sz.height }
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pLerp(pt1,pt2,alpha)
|
||||||
|
return cc.pAdd(cc.pMul(pt1, 1.0 - alpha), cc.pMul(pt2,alpha) )
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pFuzzyEqual(pt1,pt2,variance)
|
||||||
|
if (pt1.x - variance <= pt2.x) and (pt2.x <= pt1.x + variance) and (pt1.y - variance <= pt2.y) and (pt2.y <= pt1.y + variance) then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pRotateByAngle(pt1, pt2, angle)
|
||||||
|
return cc.pAdd(pt2, cc.pRotate( cc.pSub(pt1, pt2),cc.pForAngle(angle)))
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
|
||||||
|
local s,t,ret = 0,0,false
|
||||||
|
ret,s,t =cc.pIsLineIntersect(pt1, pt2, pt3, pt4,s,t)
|
||||||
|
|
||||||
|
if ret and s >= 0.0 and s <= 1.0 and t >= 0.0 and t <= 0.0 then
|
||||||
|
return true;
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
|
||||||
|
local s,t, ret = 0,0,false
|
||||||
|
ret,s,t = cc.pIsLineIntersect(pt1,pt2,pt3,pt4,s,t)
|
||||||
|
if ret then
|
||||||
|
return cc.p(pt1.x + s * (pt2.x - pt1.x), pt1.y + s * (pt2.y - pt1.y))
|
||||||
|
else
|
||||||
|
return cc.p(0,0)
|
||||||
|
end
|
||||||
|
end
|
||||||
--Size
|
--Size
|
||||||
function cc.size( _width,_height )
|
function cc.size( _width,_height )
|
||||||
return { width = _width, height = _height }
|
return { width = _width, height = _height }
|
||||||
|
|
|
@ -104,9 +104,10 @@ end
|
||||||
rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic)
|
rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic)
|
||||||
--functions of SimpleAudioEngine will be deprecated end
|
--functions of SimpleAudioEngine will be deprecated end
|
||||||
|
|
||||||
|
--functions of CCMenu will be deprecated begin
|
||||||
local CCMenuDeprecated = { }
|
local CCMenuDeprecated = { }
|
||||||
function CCMenuDeprecated.createWithItem(self,...)
|
function CCMenuDeprecated.createWithItem(self,...)
|
||||||
deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:create")
|
deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem")
|
||||||
return self:create(...)
|
return self:create(...)
|
||||||
end
|
end
|
||||||
rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem)
|
rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem)
|
||||||
|
@ -129,17 +130,17 @@ end
|
||||||
rawset(CCNode,"numberOfRunningActions",CCNodeDeprecated.numberOfRunningActions)
|
rawset(CCNode,"numberOfRunningActions",CCNodeDeprecated.numberOfRunningActions)
|
||||||
|
|
||||||
|
|
||||||
function CCNodeDeprecated.removeFromParentAndCleanup(self)
|
function CCNodeDeprecated.removeFromParentAndCleanup(self,...)
|
||||||
deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent")
|
deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent")
|
||||||
return self:removeFromParent()
|
return self:removeFromParent(...)
|
||||||
end
|
end
|
||||||
rawset(CCNode,"removeFromParentAndCleanup",CCNodeDeprecated.removeFromParentAndCleanup)
|
rawset(CCNode,"removeFromParentAndCleanup",CCNodeDeprecated.removeFromParentAndCleanup)
|
||||||
--functions of CCNode will be deprecated end
|
--functions of CCNode will be deprecated end
|
||||||
|
|
||||||
--CCDrawPrimitives will be deprecated begin
|
--CCDrawPrimitives will be deprecated begin
|
||||||
local function CCDrawPrimitivesClassDeprecated()
|
local function CCDrawPrimitivesClassDeprecated()
|
||||||
deprecatedTip("CCDrawPrimitives","gl.DrawPrimitives")
|
deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives")
|
||||||
return gl.DrawPrimitives
|
return cc.DrawPrimitives
|
||||||
end
|
end
|
||||||
_G["CCDrawPrimitives"] = CCDrawPrimitivesClassDeprecated()
|
_G["CCDrawPrimitives"] = CCDrawPrimitivesClassDeprecated()
|
||||||
--functions of CCDrawPrimitives will be deprecated begin
|
--functions of CCDrawPrimitives will be deprecated begin
|
||||||
|
@ -283,17 +284,35 @@ function CCCameraDeprecated.setUpXYZ(self,...)
|
||||||
end
|
end
|
||||||
rawset(CCCamera,"setUpXYZ",CCCameraDeprecated.setUpXYZ)
|
rawset(CCCamera,"setUpXYZ",CCCameraDeprecated.setUpXYZ)
|
||||||
|
|
||||||
|
function CCCameraDeprecated.getUpXYZ(self)
|
||||||
|
deprecatedTip("CCCameraDeprecated:getUpXYZ","CCCameraDeprecated:getUp")
|
||||||
|
return self:getUp()
|
||||||
|
end
|
||||||
|
rawset(CCCamera,"getUpXYZ",CCCameraDeprecated.getUpXYZ)
|
||||||
|
|
||||||
function CCCameraDeprecated.setEyeXYZ(self,...)
|
function CCCameraDeprecated.setEyeXYZ(self,...)
|
||||||
deprecatedTip("CCCameraDeprecated:setEyeXYZ","CCCameraDeprecated:setEye")
|
deprecatedTip("CCCameraDeprecated:setEyeXYZ","CCCameraDeprecated:setEye")
|
||||||
return self:setEye(...)
|
return self:setEye(...)
|
||||||
end
|
end
|
||||||
rawset(CCCamera,"setEyeXYZ",CCCameraDeprecated.setEyeXYZ)
|
rawset(CCCamera,"setEyeXYZ",CCCameraDeprecated.setEyeXYZ)
|
||||||
|
|
||||||
|
function CCCameraDeprecated.getEyeXYZ(self)
|
||||||
|
deprecatedTip("CCCameraDeprecated:getEyeXYZ","CCCameraDeprecated:getEye")
|
||||||
|
return self:getEye()
|
||||||
|
end
|
||||||
|
rawset(CCCamera,"getEyeXYZ",CCCameraDeprecated.getEyeXYZ)
|
||||||
|
|
||||||
function CCCameraDeprecated.setCenterXYZ(self,...)
|
function CCCameraDeprecated.setCenterXYZ(self,...)
|
||||||
deprecatedTip("CCCameraDeprecated:setCenterXYZ","CCCameraDeprecated:setCenter")
|
deprecatedTip("CCCameraDeprecated:setCenterXYZ","CCCameraDeprecated:setCenter")
|
||||||
return self:setCenter(...)
|
return self:setCenter(...)
|
||||||
end
|
end
|
||||||
rawset(CCCamera,"setCenterXYZ",CCCameraDeprecated.setCenterXYZ)
|
rawset(CCCamera,"setCenterXYZ",CCCameraDeprecated.setCenterXYZ)
|
||||||
|
|
||||||
|
function CCCameraDeprecated.getCenterXYZ(self)
|
||||||
|
deprecatedTip("CCCameraDeprecated:getCenterXYZ","CCCameraDeprecated:getCenter")
|
||||||
|
return self:getCenter()
|
||||||
|
end
|
||||||
|
rawset(CCCamera,"getCenterXYZ",CCCameraDeprecated.getCenterXYZ)
|
||||||
--functions of CCCamera will be deprecated end
|
--functions of CCCamera will be deprecated end
|
||||||
|
|
||||||
|
|
||||||
|
@ -372,8 +391,8 @@ rawset(_G,"CCPointMake",CCPointMake)
|
||||||
|
|
||||||
|
|
||||||
local function ccpNeg(pt)
|
local function ccpNeg(pt)
|
||||||
deprecatedTip("ccpNeg","CCPoint.__sub")
|
deprecatedTip("ccpNeg","cc.pSub")
|
||||||
return CCPoint.__sub(CCPoint:new_local(0,0),pt)
|
return cc.pSub({x = 0,y = 0}, pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpNeg",ccpNeg)
|
rawset(_G,"ccpNeg",ccpNeg)
|
||||||
|
|
||||||
|
@ -396,68 +415,68 @@ end
|
||||||
rawset(_G,"ccpMult",ccpMult)
|
rawset(_G,"ccpMult",ccpMult)
|
||||||
|
|
||||||
local function ccpMidpoint(pt1,pt2)
|
local function ccpMidpoint(pt1,pt2)
|
||||||
deprecatedTip("ccpMidpoint","CCPoint:getMidpoint")
|
deprecatedTip("ccpMidpoint","cc.pMidpoint")
|
||||||
return pt1:getMidpoint(pt2)
|
return cc.pMidpoint(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpMidpoint",ccpMidpoint)
|
rawset(_G,"ccpMidpoint",ccpMidpoint)
|
||||||
|
|
||||||
local function ccpDot(pt1,pt2)
|
local function ccpDot(pt1,pt2)
|
||||||
deprecatedTip("ccpDot","CCPoint:dot")
|
deprecatedTip("ccpDot","cc.pDot")
|
||||||
return pt1:dot(pt2)
|
return cc.pDot(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpDot",ccpDot)
|
rawset(_G,"ccpDot",ccpDot)
|
||||||
|
|
||||||
local function ccpCross(pt1,pt2)
|
local function ccpCross(pt1,pt2)
|
||||||
deprecatedTip("ccpCross","CCPoint:cross")
|
deprecatedTip("ccpCross","cc.pCross")
|
||||||
return pt1:cross(pt2)
|
return cc.pCross(pt1, pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpCross",ccpCross)
|
rawset(_G,"ccpCross",ccpCross)
|
||||||
|
|
||||||
local function ccpPerp(pt)
|
local function ccpPerp(pt)
|
||||||
deprecatedTip("ccpPerp","CCPoint:getPerp")
|
deprecatedTip("ccpPerp","cc.pPerp")
|
||||||
return pt:getPerp()
|
return cc.pPerp(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpPerp",ccpPerp)
|
rawset(_G,"ccpPerp",ccpPerp)
|
||||||
|
|
||||||
local function ccpRPerp(pt)
|
local function ccpRPerp(pt)
|
||||||
deprecatedTip("ccpRPerp","CCPoint:getRPerp")
|
deprecatedTip("ccpRPerp","cc.RPerp")
|
||||||
return pt:getRPerp()
|
return cc.RPerp(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpRPerp",ccpRPerp)
|
rawset(_G,"ccpRPerp",ccpRPerp)
|
||||||
|
|
||||||
local function ccpProject(pt1,pt2)
|
local function ccpProject(pt1,pt2)
|
||||||
deprecatedTip("ccpProject","CCPoint:project")
|
deprecatedTip("ccpProject","cc.pProject")
|
||||||
return pt1:project(pt2)
|
return cc.pProject(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpProject",ccpProject)
|
rawset(_G,"ccpProject",ccpProject)
|
||||||
|
|
||||||
local function ccpRotate(pt1,pt2)
|
local function ccpRotate(pt1,pt2)
|
||||||
deprecatedTip("ccpRotate","CCPoint:rotate")
|
deprecatedTip("ccpRotate","cc.pRotate")
|
||||||
return pt1:rotate(pt2)
|
return cc.pRotate(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpRotate",ccpRotate)
|
rawset(_G,"ccpRotate",ccpRotate)
|
||||||
|
|
||||||
local function ccpUnrotate(pt1,pt2)
|
local function ccpUnrotate(pt1,pt2)
|
||||||
deprecatedTip("ccpUnrotate","CCPoint:unrotate")
|
deprecatedTip("ccpUnrotate","cc.pUnrotate")
|
||||||
return pt1:unrotate(pt2)
|
return cc.pUnrotate(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpUnrotate",ccpUnrotate)
|
rawset(_G,"ccpUnrotate",ccpUnrotate)
|
||||||
|
|
||||||
local function ccpLengthSQ(pt)
|
local function ccpLengthSQ(pt)
|
||||||
deprecatedTip("ccpLengthSQ","CCPoint:getLengthSq")
|
deprecatedTip("ccpLengthSQ","cc.pLengthSQ")
|
||||||
return pt:getLengthSq(pt)
|
return cc.pLengthSQ(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpLengthSQ",ccpLengthSQ)
|
rawset(_G,"ccpLengthSQ",ccpLengthSQ)
|
||||||
|
|
||||||
local function ccpDistanceSQ(pt1,pt2)
|
local function ccpDistanceSQ(pt1,pt2)
|
||||||
deprecatedTip("ccpDistanceSQ","CCPoint:__sub(pt1,pt2):getLengthSq")
|
deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ")
|
||||||
return (CCPoint.__sub(pt1,pt2)):getLengthSq()
|
return cc.pDistanceSQ(pt1,pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpDistanceSQ",ccpDistanceSQ)
|
rawset(_G,"ccpDistanceSQ",ccpDistanceSQ)
|
||||||
|
|
||||||
local function ccpLength(pt)
|
local function ccpLength(pt)
|
||||||
deprecatedTip("ccpLength","CCPoint:getLength")
|
deprecatedTip("ccpLength","cc.pGetLength")
|
||||||
return pt:getLength()
|
return cc.pGetLength(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpLength",ccpLength)
|
rawset(_G,"ccpLength",ccpLength)
|
||||||
|
|
||||||
|
@ -468,81 +487,81 @@ end
|
||||||
rawset(_G,"ccpDistance",ccpDistance)
|
rawset(_G,"ccpDistance",ccpDistance)
|
||||||
|
|
||||||
local function ccpNormalize(pt)
|
local function ccpNormalize(pt)
|
||||||
deprecatedTip("ccpNormalize","CCPoint:normalize")
|
deprecatedTip("ccpNormalize","cc.pNormalize")
|
||||||
return pt:normalize()
|
return cc.pNormalize(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpNormalize",ccpNormalize)
|
rawset(_G,"ccpNormalize",ccpNormalize)
|
||||||
|
|
||||||
local function ccpForAngle(angle)
|
local function ccpForAngle(angle)
|
||||||
deprecatedTip("ccpForAngle","CCPoint:forAngle")
|
deprecatedTip("ccpForAngle","cc.pForAngle")
|
||||||
return CCPoint:forAngle(angle)
|
return cc.pForAngle(angle)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpForAngle",ccpForAngle)
|
rawset(_G,"ccpForAngle",ccpForAngle)
|
||||||
|
|
||||||
local function ccpToAngle(pt)
|
local function ccpToAngle(pt)
|
||||||
deprecatedTip("ccpToAngle","CCPoint:getAngle")
|
deprecatedTip("ccpToAngle","cc.pToAngleSelf")
|
||||||
return pt:getAngle()
|
return cc.pToAngleSelf(pt)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpToAngle",ccpToAngle)
|
rawset(_G,"ccpToAngle",ccpToAngle)
|
||||||
|
|
||||||
local function ccpClamp(pt1,pt2,pt3)
|
local function ccpClamp(pt1,pt2,pt3)
|
||||||
deprecatedTip("ccpClamp","CCPoint:getClampPoint")
|
deprecatedTip("ccpClamp","cc.pGetClampPoint")
|
||||||
return pt1:getClampPoint(pt2, pt3)
|
return cc.pGetClampPoint(pt1,pt2,pt3)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpClamp",ccpClamp)
|
rawset(_G,"ccpClamp",ccpClamp)
|
||||||
|
|
||||||
|
|
||||||
local function ccpFromSize(sz)
|
local function ccpFromSize(sz)
|
||||||
deprecatedTip("ccpFromSize(sz)","CCPoint(sz)")
|
deprecatedTip("ccpFromSize(sz)","cc.pFromSize")
|
||||||
return CCPoint(sz)
|
return cc.pFromSize(sz)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpFromSize",ccpFromSize)
|
rawset(_G,"ccpFromSize",ccpFromSize)
|
||||||
|
|
||||||
local function ccpLerp(pt1,pt2,alpha)
|
local function ccpLerp(pt1,pt2,alpha)
|
||||||
deprecatedTip("ccpLerp","CCPoint:lerp")
|
deprecatedTip("ccpLerp","cc.pLerp")
|
||||||
return pt1:lerp(pt2,alpha)
|
return cc.pLerp(pt1,pt2,alpha)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpLerp",ccpLerp)
|
rawset(_G,"ccpLerp",ccpLerp)
|
||||||
|
|
||||||
local function ccpFuzzyEqual(pt1,pt2,variance)
|
local function ccpFuzzyEqual(pt1,pt2,variance)
|
||||||
deprecatedTip("ccpFuzzyEqual","CCPoint:fuzzyEquals")
|
deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual")
|
||||||
return pt1:fuzzyEquals(pt2,variance)
|
return cc.pFuzzyEqual(pt1,pt2,variance)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpFuzzyEqual",ccpFuzzyEqual)
|
rawset(_G,"ccpFuzzyEqual",ccpFuzzyEqual)
|
||||||
|
|
||||||
local function ccpCompMult(pt1,pt2)
|
local function ccpCompMult(pt1,pt2)
|
||||||
deprecatedTip("ccpCompMult","CCPoint")
|
deprecatedTip("ccpCompMult","cc.p")
|
||||||
return CCPoint(pt1.x * pt2.x , pt1.y * pt2.y)
|
return cc.p(pt1.x * pt2.x , pt1.y * pt2.y)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpCompMult",ccpCompMult)
|
rawset(_G,"ccpCompMult",ccpCompMult)
|
||||||
|
|
||||||
local function ccpAngleSigned(pt1,pt2)
|
local function ccpAngleSigned(pt1,pt2)
|
||||||
deprecatedTip("ccpAngleSigned","CCPoint:getAngle")
|
deprecatedTip("ccpAngleSigned","cc.pGetAngle")
|
||||||
return pt1:getAngle(pt2)
|
return cc.pGetAngle(pt1, pt2)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpAngleSigned",ccpAngleSigned)
|
rawset(_G,"ccpAngleSigned",ccpAngleSigned)
|
||||||
|
|
||||||
local function ccpAngle(pt1,pt2)
|
local function ccpAngle(pt1,pt2)
|
||||||
deprecatedTip("ccpAngle","CCPoint:getAngle")
|
deprecatedTip("ccpAngle","cc.pGetAngle")
|
||||||
return pt1:getAngle(pt2)
|
return cc.pGetAngle(pt1,ptw)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpAngle",ccpAngle)
|
rawset(_G,"ccpAngle",ccpAngle)
|
||||||
|
|
||||||
local function ccpRotateByAngle(pt1,pt2,angle)
|
local function ccpRotateByAngle(pt1,pt2,angle)
|
||||||
deprecatedTip("ccpRotateByAngle","CCPoint:rotateByAngle")
|
deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle")
|
||||||
return pt1:rotateByAngle(pt2, angle)
|
return cc.pRotateByAngle(pt1, pt2, angle)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpRotateByAngle",ccpRotateByAngle)
|
rawset(_G,"ccpRotateByAngle",ccpRotateByAngle)
|
||||||
|
|
||||||
local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
|
local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
|
||||||
deprecatedTip("ccpSegmentIntersect","CCPoint:isSegmentIntersect")
|
deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect")
|
||||||
return CCPoint:isSegmentIntersect(pt1,pt2,pt3,pt4)
|
return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpSegmentIntersect",ccpSegmentIntersect)
|
rawset(_G,"ccpSegmentIntersect",ccpSegmentIntersect)
|
||||||
|
|
||||||
local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
|
local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
|
||||||
deprecatedTip("ccpIntersectPoint","CCPoint:getIntersectPoint")
|
deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint")
|
||||||
return CCPoint:getIntersectPoint(pt1,pt2,pt3,pt4)
|
return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
|
||||||
end
|
end
|
||||||
rawset(_G,"ccpIntersectPoint",ccpIntersectPoint)
|
rawset(_G,"ccpIntersectPoint",ccpIntersectPoint)
|
||||||
|
|
||||||
|
@ -967,11 +986,6 @@ if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTar
|
||||||
end
|
end
|
||||||
--functions of WebSocket will be deprecated end
|
--functions of WebSocket will be deprecated end
|
||||||
|
|
||||||
--enums of CCParticleSystem will be deprecated begin
|
|
||||||
_G["kParticleStartSizeEqualToEndSize"] = _G["kCCParticleStartSizeEqualToEndSize"]
|
|
||||||
_G["kParticleDurationInfinity"] = _G["kCCParticleDurationInfinity"]
|
|
||||||
--enums of CCParticleSystem will be deprecated end
|
|
||||||
|
|
||||||
--enums of CCRenderTexture will be deprecated begin
|
--enums of CCRenderTexture will be deprecated begin
|
||||||
local CCRenderTextureDeprecated = { }
|
local CCRenderTextureDeprecated = { }
|
||||||
function CCRenderTextureDeprecated.newCCImage(self)
|
function CCRenderTextureDeprecated.newCCImage(self)
|
||||||
|
|
|
@ -44,8 +44,8 @@ _G.kCCParticleStartRadiusEqualToEndRadius = cc.PARTICLE_START_RADIUS_EQUAL_TO_EN
|
||||||
_G.kCCParticleModeGravity = cc.PARTICLE_MODE_GRAVITY
|
_G.kCCParticleModeGravity = cc.PARTICLE_MODE_GRAVITY
|
||||||
_G.kCCParticleModeRadius = cc.PARTICLE_MODE_RADIUS
|
_G.kCCParticleModeRadius = cc.PARTICLE_MODE_RADIUS
|
||||||
_G.kCCPositionTypeFree = cc.POSITION_TYPE_FREE
|
_G.kCCPositionTypeFree = cc.POSITION_TYPE_FREE
|
||||||
_G.kCCPositionTypeRelative = cc.POSITION_TYPE_GROUPED
|
_G.kCCPositionTypeRelative = cc.POSITION_TYPE_RELATIVE
|
||||||
_G.kCCPositionTypeGrouped = cc.POSITION_TYPE_RELATIVE
|
_G.kCCPositionTypeGrouped = cc.POSITION_TYPE_GROUPED
|
||||||
_G.kCCProgressTimerTypeRadial = cc.PROGRESS_TIMER_TYPE_RADIAL
|
_G.kCCProgressTimerTypeRadial = cc.PROGRESS_TIMER_TYPE_RADIAL
|
||||||
_G.kCCProgressTimerTypeBar = cc.PROGRESS_TIMER_TYPE_BAR
|
_G.kCCProgressTimerTypeBar = cc.PROGRESS_TIMER_TYPE_BAR
|
||||||
_G.kCCTMXTileHorizontalFlag = cc.TMX_TILE_HORIZONTAL_FLAG
|
_G.kCCTMXTileHorizontalFlag = cc.TMX_TILE_HORIZONTAL_FLAG
|
||||||
|
|
|
@ -161,7 +161,7 @@ int push_table_instance(lua_State* L, int lo) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* the equivalent of lua_is* for usertype */
|
/* the equivalent of lua_is* for usertype */
|
||||||
static int lua_isusertype (lua_State* L, int lo, const char* type)
|
int lua_isusertype (lua_State* L, int lo, const char* type)
|
||||||
{
|
{
|
||||||
if (!lua_isuserdata(L,lo)) {
|
if (!lua_isuserdata(L,lo)) {
|
||||||
if (!push_table_instance(L, lo)) {
|
if (!push_table_instance(L, lo)) {
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
1525771E17CEFBD400BE417B /* DeprecatedClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525771B17CEFBD400BE417B /* DeprecatedClass.lua */; };
|
||||||
|
1525771F17CEFBD400BE417B /* DeprecatedEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525771C17CEFBD400BE417B /* DeprecatedEnum.lua */; };
|
||||||
|
1525772017CEFBD400BE417B /* DeprecatedOpenglEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525771D17CEFBD400BE417B /* DeprecatedOpenglEnum.lua */; };
|
||||||
15C1568E1683131500D239F2 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C1568D1683131500D239F2 /* libcurl.a */; };
|
15C1568E1683131500D239F2 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C1568D1683131500D239F2 /* libcurl.a */; };
|
||||||
15C156981683138E00D239F2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15C156911683138E00D239F2 /* Default-568h@2x.png */; };
|
15C156981683138E00D239F2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15C156911683138E00D239F2 /* Default-568h@2x.png */; };
|
||||||
15C156991683138E00D239F2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 15C156921683138E00D239F2 /* Default.png */; };
|
15C156991683138E00D239F2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 15C156921683138E00D239F2 /* Default.png */; };
|
||||||
|
@ -192,6 +195,9 @@
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
1525771B17CEFBD400BE417B /* DeprecatedClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedClass.lua; path = ../../../scripting/lua/script/DeprecatedClass.lua; sourceTree = "<group>"; };
|
||||||
|
1525771C17CEFBD400BE417B /* DeprecatedEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedEnum.lua; path = ../../../scripting/lua/script/DeprecatedEnum.lua; sourceTree = "<group>"; };
|
||||||
|
1525771D17CEFBD400BE417B /* DeprecatedOpenglEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedOpenglEnum.lua; path = ../../../scripting/lua/script/DeprecatedOpenglEnum.lua; sourceTree = "<group>"; };
|
||||||
15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = "<group>"; };
|
15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = "<group>"; };
|
||||||
15C156911683138E00D239F2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = SOURCE_ROOT; };
|
15C156911683138E00D239F2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = SOURCE_ROOT; };
|
||||||
15C156921683138E00D239F2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = SOURCE_ROOT; };
|
15C156921683138E00D239F2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -270,6 +276,9 @@
|
||||||
1A0227A417A3AA1A00B867AD /* Lua Common */ = {
|
1A0227A417A3AA1A00B867AD /* Lua Common */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
1525771B17CEFBD400BE417B /* DeprecatedClass.lua */,
|
||||||
|
1525771C17CEFBD400BE417B /* DeprecatedEnum.lua */,
|
||||||
|
1525771D17CEFBD400BE417B /* DeprecatedOpenglEnum.lua */,
|
||||||
1A0227A517A3AA3500B867AD /* AudioEngine.lua */,
|
1A0227A517A3AA3500B867AD /* AudioEngine.lua */,
|
||||||
1A0227A617A3AA3500B867AD /* CCBReaderLoad.lua */,
|
1A0227A617A3AA3500B867AD /* CCBReaderLoad.lua */,
|
||||||
1ADB273717CCA0C200634B5E /* Cocos2d.lua */,
|
1ADB273717CCA0C200634B5E /* Cocos2d.lua */,
|
||||||
|
@ -579,6 +588,9 @@
|
||||||
1A0227B117A3AA3500B867AD /* Opengl.lua in Resources */,
|
1A0227B117A3AA3500B867AD /* Opengl.lua in Resources */,
|
||||||
1A0227B217A3AA3500B867AD /* OpenglConstants.lua in Resources */,
|
1A0227B217A3AA3500B867AD /* OpenglConstants.lua in Resources */,
|
||||||
1ADB273817CCA0C200634B5E /* Cocos2d.lua in Resources */,
|
1ADB273817CCA0C200634B5E /* Cocos2d.lua in Resources */,
|
||||||
|
1525771E17CEFBD400BE417B /* DeprecatedClass.lua in Resources */,
|
||||||
|
1525771F17CEFBD400BE417B /* DeprecatedEnum.lua in Resources */,
|
||||||
|
1525772017CEFBD400BE417B /* DeprecatedOpenglEnum.lua in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
1501825E17A74F8000E674E5 /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1501825717A74F8000E674E5 /* Opengl.lua */; };
|
1501825E17A74F8000E674E5 /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1501825717A74F8000E674E5 /* Opengl.lua */; };
|
||||||
1501825F17A74F8000E674E5 /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1501825817A74F8000E674E5 /* OpenglConstants.lua */; };
|
1501825F17A74F8000E674E5 /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1501825817A74F8000E674E5 /* OpenglConstants.lua */; };
|
||||||
1501826E17A7513400E674E5 /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A02F0B17A64D060035E92B /* libchipmunk Mac.a */; };
|
1501826E17A7513400E674E5 /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A02F0B17A64D060035E92B /* libchipmunk Mac.a */; };
|
||||||
|
1525770C17CEFB6300BE417B /* DeprecatedClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525770917CEFB6200BE417B /* DeprecatedClass.lua */; };
|
||||||
|
1525770D17CEFB6300BE417B /* DeprecatedEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525770A17CEFB6300BE417B /* DeprecatedEnum.lua */; };
|
||||||
|
1525770E17CEFB6300BE417B /* DeprecatedOpenglEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1525770B17CEFB6300BE417B /* DeprecatedOpenglEnum.lua */; };
|
||||||
15A02F3817A64D1E0035E92B /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2417A64D1E0035E92B /* background.mp3 */; };
|
15A02F3817A64D1E0035E92B /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2417A64D1E0035E92B /* background.mp3 */; };
|
||||||
15A02F3917A64D1E0035E92B /* background.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2517A64D1E0035E92B /* background.ogg */; };
|
15A02F3917A64D1E0035E92B /* background.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2517A64D1E0035E92B /* background.ogg */; };
|
||||||
15A02F3C17A64D1E0035E92B /* crop.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2817A64D1E0035E92B /* crop.png */; };
|
15A02F3C17A64D1E0035E92B /* crop.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A02F2817A64D1E0035E92B /* crop.png */; };
|
||||||
|
@ -200,6 +203,9 @@
|
||||||
1501825617A74F8000E674E5 /* DrawPrimitives.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DrawPrimitives.lua; sourceTree = "<group>"; };
|
1501825617A74F8000E674E5 /* DrawPrimitives.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DrawPrimitives.lua; sourceTree = "<group>"; };
|
||||||
1501825717A74F8000E674E5 /* Opengl.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Opengl.lua; sourceTree = "<group>"; };
|
1501825717A74F8000E674E5 /* Opengl.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Opengl.lua; sourceTree = "<group>"; };
|
||||||
1501825817A74F8000E674E5 /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OpenglConstants.lua; sourceTree = "<group>"; };
|
1501825817A74F8000E674E5 /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OpenglConstants.lua; sourceTree = "<group>"; };
|
||||||
|
1525770917CEFB6200BE417B /* DeprecatedClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeprecatedClass.lua; sourceTree = "<group>"; };
|
||||||
|
1525770A17CEFB6300BE417B /* DeprecatedEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeprecatedEnum.lua; sourceTree = "<group>"; };
|
||||||
|
1525770B17CEFB6300BE417B /* DeprecatedOpenglEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeprecatedOpenglEnum.lua; sourceTree = "<group>"; };
|
||||||
15A02E6017A647C90035E92B /* HelloLua.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloLua.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
15A02E6017A647C90035E92B /* HelloLua.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloLua.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
15A02E6817A647C90035E92B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
15A02E6817A647C90035E92B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
15A02EF317A64D050035E92B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
|
15A02EF317A64D050035E92B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
|
||||||
|
@ -256,6 +262,9 @@
|
||||||
1501825117A74F8000E674E5 /* Lua Common */ = {
|
1501825117A74F8000E674E5 /* Lua Common */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
1525770917CEFB6200BE417B /* DeprecatedClass.lua */,
|
||||||
|
1525770A17CEFB6300BE417B /* DeprecatedEnum.lua */,
|
||||||
|
1525770B17CEFB6300BE417B /* DeprecatedOpenglEnum.lua */,
|
||||||
1501825217A74F8000E674E5 /* AudioEngine.lua */,
|
1501825217A74F8000E674E5 /* AudioEngine.lua */,
|
||||||
1501825317A74F8000E674E5 /* CCBReaderLoad.lua */,
|
1501825317A74F8000E674E5 /* CCBReaderLoad.lua */,
|
||||||
1ADB273A17CCA0F500634B5E /* Cocos2d.lua */,
|
1ADB273A17CCA0F500634B5E /* Cocos2d.lua */,
|
||||||
|
@ -565,6 +574,9 @@
|
||||||
1501825E17A74F8000E674E5 /* Opengl.lua in Resources */,
|
1501825E17A74F8000E674E5 /* Opengl.lua in Resources */,
|
||||||
1501825F17A74F8000E674E5 /* OpenglConstants.lua in Resources */,
|
1501825F17A74F8000E674E5 /* OpenglConstants.lua in Resources */,
|
||||||
1ADB273B17CCA0F500634B5E /* Cocos2d.lua in Resources */,
|
1ADB273B17CCA0F500634B5E /* Cocos2d.lua in Resources */,
|
||||||
|
1525770C17CEFB6300BE417B /* DeprecatedClass.lua in Resources */,
|
||||||
|
1525770D17CEFB6300BE417B /* DeprecatedEnum.lua in Resources */,
|
||||||
|
1525770E17CEFB6300BE417B /* DeprecatedOpenglEnum.lua in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue