diff --git a/.gitignore b/.gitignore index 863d29c9fd..270f81832d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ _ReSharper*/ [Tt]est[Rr]esult* ipch/ *.opensdf +SubmissionInfo +Generated Files # Ignore files build by ndk and eclipse libs/ @@ -133,7 +135,9 @@ project.properties /external/websockets/ /external/win32-specific/ /external/winrt-specific/ +/external/winrt_8.1-specific/ /external/wp8-specific/ +/external/wp_8.1-specific/ /external/version.json /templates/lua-template-runtime/runtime /v*-deps-*.zip diff --git a/AUTHORS b/AUTHORS index f67996154b..02c00f0548 100644 --- a/AUTHORS +++ b/AUTHORS @@ -855,6 +855,7 @@ Developers: Fixed memory leak in 'Image' Fixed loosing precision when using 'recv' in 'Console' Fixed link error with Xcode 6 when building with 32-bit architecture + Fixed CMake for Mac OS X ololomax Fixed a potential crash in SceneReader::createNodeWithSceneFile diff --git a/CHANGELOG b/CHANGELOG index 8542848645..2222f70ba9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,15 +1,18 @@ -cocos2d-x-3.3-beta1 +cocos2d-x-3.3-rc0 Oct.21 2014 [NEW] 3d: added light support: direction light, point light, spot light and ambient light + [NEW] Added ClippingRectangleNode + [NEW] Added AssetsManagerEx, which is more powerful than AssetsManager + [NEW] Added a test case of sprite lamp effect + [NEW] Animate3D: can create with start frame and end frame [NEW] Audio: new audio supports Mac OS X and Windows [NEW] Application: added openUrl() [NEW] Armature: added getOffsetPoints() - [NEW] C++: added ClippingRectangleNode [NEW] Lua-binding: added Camera3DTest ,BillBoradTest [NEW] Node: schedule/unschedule lambda functions [NEW] Rect: added merge() + [NEW] Spine: update to 2.0.18 [NEW] TileMap: added staggered tile map support [NEW] Utils: added getCascadeBoundingBox() - [NEW] UI: `WebView` support on windows [NEW] WP8: enabled screen orientation change handling [FIX] Accelerometer: using Accelerometer will freeze app and then crash on WP8 @@ -812,1176 +815,4 @@ cocos2d-x-3.0alpha0-pre @Jul.30 2013 [Refactor] #2300: Using clone() pattern instead of 'copyWithZone' pattern [Refactor] #2305: Use std::thread instead of pthread [Refactor] #2328: ETC support for all platforms - [Refactor] #2373: Change some member functions to const - [Refactor] #2378: Remove the usage of CC_PROPERTY_XXX in engine code - [Refactor] #2388: Creating a default texture for CCSprite if setTexture(nullptr) is invoked - [Refactor] #2397: Singleton refactor, sharedXXX --> getInstance, purgeXXX --> destroyInstance - [Refactor] #2404: Move all deprecated global functions and variables into CCDeprecated.h - [Refactor] #2430: Uses strongly typed enums (enum class) instead of simple enums -[iOS] - [FIX] #2274: compile and run for iOS7 and Xcode5 - [Refactor] #2371: use one single Xcode project for iOS and Mac projects -[Android] - [FIX] #2306: CCLabelTTF::setString crash - [Refactor] #2329: use Android "asset manager" to improve file system read performance - [Refactor] #2400: use onWindowFocusChanged(bool) instead of onResume()/onPause() -[OS X] - [FIX] #2275: LabelTTF vertical alignment - [FIX] #2398: Add support for initializing Image with raw data -[windows] - [FIX] #2322: link error becasue of using multiply inheritance -[JavaScript bindings] - [FIX] #2307: PhysicsSprite::getCPBody return wrong type - [FIX] #2313: bind cc.ClippingNode - [FIX] #2315: iterating through cc.Node children crash - [Feature] #2285: bind MontionStreak - [Feature] #2340: Updates SpiderMonekey to Firefox v22 (JS Bindings) - [Feature] #2427: bind FileUtils.getInstance().createDictionaryWithContentsOfFile -[Lua bindings] - [Feature] #2276: Add CCScrollView Lua binding and corresponding test sample - [Feature] #2277: Add OpenGL Lua binding and corresponding test sample - [Feature] #2324: Add OpenGL Lua module - [Feature] #2343: Redesign the mechanism of invoking Lua func from c++ - [Feature] #2344: make some execute functions into one function in ScriptEngineProtocol - [Feature] #2426: Add DrawPrimitives test sample - [Feature] #2429: LuaWebSocket supports sending binary string -[plugin-x] - [FIX] #2348: event will not be sent to server when paramMap argument of logEvent function is nil -[Emscript] - [Feature] #2289: Asynchronous Image loading - - -2.1rc0-x-2.1.4 @Jnue.12 2013 -[all platforms] - Bug #2098: fix TouchPriority issue of CCScrollView - Bug #2107: fix crash in HttpClient request on 64Bit - Bug #2115: fix linking errors for TestCPP with libcurl - Bug #2128: remove setting ignoreAnchorPoint for child CCB files and fix crash while trying to load sprite frame when the file is missing - Bug #2140: fix a bug that the displayed color of CCDrawNode is incorrect when VAO is disabled - Bug #2142: adding CCDataVisitor and implementing CCPrettyPrinter - Bug #2143: fix a crash caused by ScrollView.setDelegate(tmp function) - Bug #2146: unpack texture data correctly - Bug #2147: fix null pointer access in CCBAnimationManager::getRunningSequenceName() - Bug #2150: fix a bug that setColor and setOpacity of CCControlButton and CCScale9Sprite are broken - Bug #2251: fix a logical error in CCDrawNode::drawPolygon() - Bug #2271: fix memory leak as possible - Feature #1859: make AssetsManager download resources in a new thread - Feature #2086: make CCLabelTTF supports shadows and stroke - Feature #2100: add CCDirector::popToSceneStackLevel(int level) - Feature #2105: add Travis build support - Feature #2108: add example for russian language in TestCpp - Feature #2111: add CC_DISABLE_COPY macro - Feature #2114: add __attribute__(__format__()) for CCLog and CCString - Feature #2116: support negative node scales for CCScrollView - Feature #2117: implement CCDictionary::writeToFile() - Feature #2122: add method to create a CCMenuItemToggle from a CCArray with a target selector - Feature #2132: add encrypted PVR.CCZ support to ZipUtils + Tests - Feature #2157: add Mingw-crt Support without breaking VS SDK - Feature #2265: add CCLabelTTF::createWithFontDefinition() - Feature #2270: add Armature(CocoStudio runtime) support - Refactor #2109: add const modifier for classes CCArray, CCObject - Refactor #2118: move ccpX functions to CCPoint methods and operators - Refactor #2119: use httpresponse_selector instead of callfuncND_selector for the callback function of CCHttpRequest - Refactor #2123: refactor network extension, fixing unlikely memory leaks, adding PUT/DELETE methods - Refactor #2127: add CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging - Refactor #2149: add const qualification to some CCNode's getters - Refactor #2189: CCLabelTTF::enableShadow() const update - Refactor #2215: refactor CCConfiguration - Refactor #2217: use CCLabelAtlas instead of CCLabelTTF to show FPS - Refactor #2231: implement a format of CCConfiguration - Refactor #2233: add support for "CCString" types for boolean and integers in CCConfiguration - Refactor #2236: fix memory hot spot of CCTextureAtlas::updateQuad() -[android] - Bug #1284: fix a bug that SimpleAudioEngine may cause crash on i9100 - Bug #2151: fix custom font loading on Android for resource mapped font files - Bug #2190: updat .classpath of Android project to latest ADT 22 build tool compatibility - Bug #2266: fix a bug that CCFileUtils::getFileData() may not get file data correctly on Android - Feature #2161: add ETC1 image format -[iOS] - Bug #2102: fix missing protocol method warning for iOS 6.0 addition - Bug #2104: fix a bug that JPEG picture not displayed correctly on iOS 4.3 - Bug #2260: fix a bug that CCDirectory::createWithContentsOfFile() returns a valid pointer though the file is missing on iOS - Refactor #2101: update cocos2dx Xcode project to detect more warnings - Refactor #2253: add UITextField only when keyboard was opened, removing it when keyboard was closed -[mac] - Bug #2249: fix linebreaks on Mac OSX -[win32] - Bug #2131: fix memory leak of SimpleAudioEngine::preloadEffect() - Bug #2145: center the window correctly on windows -[emscripten] - Feature #2120: compile c++ to js - Bug #2159: use browser font rendering instead of FreeType - Refactor #2133: compile for Emscripten in asm.js mode - Document #2121: write a document to describe the usage of emscriptenate port -[tizen] - Feature #2185: add support for Tizen -[JavaScript bindings] - Bug #2099: fix a bug in ScriptingCore::evalString() not setting the outval - Bug #2179: fix a bug that pointQueryFirst returns invalid Shape when a shape is not found - Bug #2186: fix a bug that new PivotJoint can't access 4 parameters like in html5 version - Bug #2187: JavaScript debugger improved and bug fixed - Bug #2243: fix a bug that XMLHttpRequest dones't support non-ascii characters - Bug #2244: fix a bug that cc.Camera.getEyeXYZ, cc.Camera.getCenterXYZ, cc.Camera.getUpXYZ return bad values - Feature #1647: Bind websocket to JavaScript - Feature #2092: add XMLHttpRequest and bind it to JSB - Feature #2106: add support for JavaScript byte code - Feature #2162: add command line tool for generating JavaScript bytecode - Feature #2214: upgrade Spidermonkey to Firefox v21 - Refactor #2152: log assert messages to the console and renaming CCScriptSupport::executeAssert to CCScriptSupport::handleAssert - Refactor #2247: use functions instead of macros to speeding up building for JSB project -[Lua bindings] - Feature #2103: implement most test cases - -cocos2d-2.1rc0-x-2.1.3 @May.01 2013 -[all platforms] - Bug #1853: use SHELLOPTS instead of "-o igncr" for Android Eclipse project - Bug #1860: fix a bug that onNodeLoaded will be called twice if ccb was added as a CCBFile - Bug #1862: fix a bug that CCScrollView::setContainer may cause dangling pointer when NULL is passed into - Bug #1876: fix a bug that CCScale9Sprite::setColor() & setOpacity() are broken - Bug #1935: fix a bug that use "==" for float comparison of CCPoint and CCSize - Bug #1937: fix a bug that CCControl's touch priority is not set correctly, m_nDefaultTouchPriority is never used - Bug #1943: added some missing function for setting integer shader uniforms in CCGLProgram - Bug #1999: allowing to set fontName and fontSize separately for CCEditBox - Bug #2003: fix a potential crash in CCScheduler::removeHashElement() - Bug #2030: fix a bug that scissor rectangle in nested CCScrollView is wrong - Bug #2031: make CCFileUtils::createXXXXWithContentsOfFile() support relative path - Bug #2035: fix a potential crash in CCSaxParser - Bug #2037: fix a wrong logic in CCArray::initWithObjects() - Bug #2040: get scale property from sub-ccb node may trigger an assert - Bug #2054: fix a bug that anchorPoint property of CCScale9Sprite doesn't work in CCBReader - Bug #2055: enable easy switching between Box2D and chipmunk - Bug #2058: properly resets the tile's Y flipping - Bug #2061: fix a bug that wrong type of argument signature is used in setAccelerometerIntervalJNI function - Bug #2073: fix a memory leak in CCUserDefault - Bug #2080: fix a bug that _realOpacity isn't assigned in CCLayerColor::initWithColor - Feature #2001: add CCRemoveSelf Action - Feature #2048: support variable cell sizes in CCTableView - Feature #2065: adding kResolutionFixedHeight and kResolutionFixedWidth resolution policy - Feature #2068: adding a secureTextEntry property to CCTextFieldTTF - Feature #2069: adding new macro CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK to CCBMemberVariableAssigner.h - Feature #2075: support spine editor - Feature #2076: adding a method CCBReader::setResolutionScale for setting resolution scale manually - Refactor #1592: updating UTHASH to v1.9.8 - Refactor #2042: remove libxml2 - Refactor #2097: use pthread mutex and condition variable instead of pthread semaphore to load image asynchronizely -[android] - Bug #1996: adding missing JNIEXPORT / JNICALL declarations - Bug #2028: fix a bug taht application can not run correctly on Android simulator - Bug #2045: some small fixes to CocosPlayer - Bug #2062: fix for spaces at the beginning of wrapped lines - Bug #2083: fix a bug that Bytecode of LuaJIT can't work on android - Refactor #1613: not reload resources when coming from background on Android - Refactor #1861: CocosPlayer Android update - Refactor #1904: strip libcurl.a on x86 architecture - Refactor #2027: reduce function call in nativeInitBitmapDC to improve performance - Refactor #2047: clean up linked libraries for android -[iOS] - Bug #1863: fix a bug that CCUserDefault on iOS may not save immediately - Feature #2096: adding Cocosplayer for iOS and bug fixes -[linux] - Bug #1932: fix a bug that font rendering crashed for certain fonts - Bug #2036: correct passed buffer size to readlink - Bug #2044: link libpthread and libGL - Bug #2046: strip newlines from log message and fixing linux library location - Bug #2052: fix a bug that [-Werror=array-bounds] error appears when compiling Box2dTestBed - Feature #2032: Linux OpenAL support - Refactor #2000: improve font rendering performance for linux platform - Refactor #2053: set writable path to "/.config/" -[mac] - Bug #2051: fix a bug that TestCpp/ExtensionsTest/CocosbuilderTest crashes under x86_64 target - Feature #1856: adding 64bit target for Mac project -[JavaScript bindings] - Bug #1855: fix a bug that std_string_to_jsval generates messy js string when passed a non-ascii UTF8 std::string - Bug #2057: adding response for back and menu keypad event for Android - Bug #2059: fix a bug that cc.FileUtils.getInstance().getStringFromFile(filename) doesn't return a whole string - Bug #2071: fix a bug that cc.TMXLayer.getTiles() can't work - Feature #1841: find a way to obfuscate JavaScript code on the top of JSB - Feature #1936: adding OpenGL Bindings to Javascript - Feature #2043: upgrading SpiderMonkey to Firefox20.0 - Feature #2060: support for cc.FileUtils.getInstance().getByteArrayFromFile(filename) - Feature #2064: exposing cc.Node.nodeTo***Transform to JS - Refactor #1944: subclass of cc.Sprite,cc.Layer... doesn't need cc.associateWithNative anymore -[Lua bindings] - Feature #1814: add menutest - Feature #1941: add TileMapTest - Feature #1942: add LayerTest - Feature #1945: use CCLOG to implement print() function - Feature #1993: add ParallaxTest - Feature #1994: add ActionManagerTest - Feature #1997: add IntervalTest - Feature #1998: add SceneTest - Feature #2002: add Texture2dTest, RenderTexture, ZwoptexTest, FontTest, CocosDenshionTest and EffectsAdvancedTest - Feature #2004: add UserDefaultTest - Feature #2005: add CurrentLanguageTest - Refactor #1847: use luajit - Refactor #2084: unify the method of loading Lua files on all platforms - -cocos2d-2.1rc0-x-2.1.2 @Mar.20 2013 -[all platforms] - Bug #1529: use NSUserDefaults on iOS and SharedPreferences on Android implement CCUserDefault - Bug #1672: fix a bug that CCTableView is too sensitive on some devices with high density display - Bug #1689: support horizontal alignment for Custom TTF fonts - Bug #1691: fix a bug that CCControlSwitch::setOn(isOn,false) doesn't work - Bug #1692: add TMX polygon parsing - Bug #1697: fix a logical error in CCRenderTexture::initWithWidthAndHeight() - Bug #1710: add simpler,correct handling of spritesheet sources for CCScale9Sprite - Bug #1711: fix a bug that clipping rectangle of CCScrollView is wrong when the scale of its ancestors isn't equal to 1 - Bug #1731: change declaration of CCSize, CCPoint and CCRect in pkg file - Bug #1751: fix a bug that clicking outside of CCTableViewCell will also get response when container size is smaller than view size - Bug #1754: fix a bug that offset of the container is wrong in CCTableView - Bug #1821: fix a bug that the display result is wrong when invoking CCControlButton::setHighlighted() - Feature #1686: synchronize to cocos2d-iphone v2.1rc0 - Feature #1708: adding Portuguese and Arabic language support - Feature #1712: add an interface to get DPI - Feature #1741: CCLens3d can be concave - Feature #1742: add 'rotationIsDir' property to ParticleSystem - Feature #1761: implement setVisible() for CCEditBox - Feature #1807: add getStartLocationInView() and getStartLocation() methods in CCTouch - Feature #1822: add CCNotificationCenter::removeAllObservers(CCObject *target) - Feature #1838: synchronize CCBReader to the lastest version - Feature #1489: add AssetsManager - Refactor #1687: refactor CCFileUtils and CCImage - Refactor #1700: add webp image format support - Refactor #1702: change return value of CCFileUtils::getWritablePath() - Refactor #1703: replace libxml2 with tinyxml2 - Refactor #1749: add 'setFont' and 'setAnchorPoint' to CCEditBox -[android] - Bug #1752: fix a bug that libcurl.a causes link error after being stripped - Bug #1760: fix a bug that cpufeatures module is redefined - Bug #1775: fix a bug that OpenSLEngine can not load resources from SD card - Bug #1812: fix a warning of getStringWithEllipsisJni() function when compiling it with clang - Feature #1827: support building android project, including native codes, in Eclipse -[iOS] - Bug #1750: fix a bug that CCEditBox's position is incorrect when it's added to a non-fullscreen CCNode - Bug #1804: fix for loading custom fonts on iOS when referenced from a CCB file - Feature #1842: support kEditBoxInputFlagSensitive setting for CCEditBox on iOS - Refactor #1755: add CocosDenshion xcode project - Refactor #1825: use CCLabelTTF to show text for CCEditBox -[JavaScript bindings] - Bug #1707: fix a crash caused by unaligned memory access in CCBReader::readFloat() - Bug #1726: fix crash of JSB application on android device with armv6 architecture - Bug #1729: fix compiling error of ScriptingCore.cpp with C++11 on iOS - Bug #1747: fix a crash when passing null to cc.AnimationFrame.initWithSpriteFrame() - Bug #1823: use shared NodeLoaderLibrary in CCBReader bindings - Feature #1724: add HelloJS sample - Feature #1730: bind CCScrollView and CCTableView to js - Feature #1748: separate chipmunk and sqlite from js_binding_core.cpp - Feature #1753: upgrade SpiderMonkey to Firefox19. - Feature #1808: make cxx_generator support parsing functions that have default parameters - Feature #1811: add a method to get file data for JSB - Feature #1824: bind CCEditBox to JS - Refactor #1682: add ScriptingCore::getGlobalObject() function - Refactor #1740: add cleanup and reset methods to ScriptingCore - Refactor #1830: use JS::CompileOptions::setUTF8(true) to compile script - Refactor #1836: make js target of "cc.Scheduler().scheduleCallbackForTarget()" accept a object that not depend on CCNode or its subclass - Refactor #1837: refactor schedule binding codes -[Lua bindings] - Bug #1745: fix a bug that CCRepeat:create() receives error argument - Feature #1425: fix errors in Lua test cases and add more test cases - Feature #1698: add CCLuaObjcBridge - Feature #1802: add TouchesTest for Lua binding - Refactor #1818: cleanup the tolua++ bindings build system -[win32] - Feature #1634: CCEditBox support - Feature #1746: add VS2012 Express template installing support -[linux] - Bug #1688: fix a bug that truetype fonts from resource directory can't be found - Bug #1810: fix a bug that SimpleAudioEngine::playEffect() and playBackgroundMusic() play twice on linux - Bug #1819: fix a bug that building script exits when missing packages - Bug #1834: fix the size calculations for true type fonts (especially for italic fonts) - Refactor #1806: refactor linux build system - Refactor #1820: add 'make run' target for linux projects -[mac os] - Bug #1637: fix a bug that CCLabelTTF & CCMenuItemLabel cannot display on Mac Retina -[black berry] - Refactor #1709: add support for multiple background music sources -[chrome native client] - Feature #1762: add Native Client support - - -cocos2d-2.1beta3-x-2.1.1 @Jan.29 2013 -[ all platforms] - Bug #1547: fix a bug that when CCMenuItem is removed before touch ended, application will crash if keeping moving - Bug #1553: fix a memory leak in CCControllButton - Bug #1604: fix a bug that the enum values in ccPVR3TexturePixelFormat are truncated to 32bit - Bug #1605: fix a crash that when adding just one action to CCSequence - Bug #1639: fix a bug that CCBReader miss parsing some properties - Bug #1659: fix a bug that invoking runAnimation() in CCBAnimationManagerDelegate::completedAnimationSequenceNamed will cause crash - Bug #1662: fix a bug that returns wrong full path if texture name in the plist doesn't contain relative path - Bug #1664: fix a logical error in CCAtlasNode::setOpacityModifyRGB - Bug #1670: fix a memory leak in CCBReader - Bug #1674: fix a logical error in CCScale9Sprite constructor - Bug #1680: fix a bug that can't set touch priority by invoking CCMenu::setTouchPriority() - Bug #1681: fix a bug that CCTableView crashes if CCTableViewDelegate is not provided - Feature #1598: add japanese language support - Feature #1625: add stackable action support and exchange the order of parameters for 3d relative actions - Feature #1667: add file name lookup support - Refactor #1593: remove all deprecated methods - Refactor #1599: do some improvements of CCScrollView and CCTableView - Refactor #1602: add randomObject to CCDictionary - Refactor #1603: adjust samples directory structure - Refactor #1606: return CCSequence pointer for CCSequence::create - Refactor #1648: make CCPoint, CCRect and CCSize not inherit from CCObject - Refactor #1649: change return type to const reference for member variable accessing - Refactor #1654: report function and line number for CCAssert - Refactor #1683: refactor CCFileUtils to make it be compatible with the resource searching strategy of cocos2d-iphone - Document #1650: add detailed comments for CCDictionary - Document #1678: add detailed doxygen comments for CCNode -[android] - Bug #1544: fix a bug that CCRenderTexture works wrong after coming back to foreground - Bug #1580: fix a bug that application may lost focus after popping up keyboard - Bug #1607: fix a bug that the path CCUserDefault saves in may cause issue - Bug #1610: fix a bug that CCLabelTTF will lost a character at the end of a line - Bug #1623: fix a bug that SimpleAudioEngine::playBackgroundMusic() may not take effect - Bug #1679: upload unstripped prebuilt libraries for armeabi-v7a architectures - Refactor #1673: add to AndroidManifest.xml -[iOS] - Bug #1600: fix a bug that application created by xCode template will crash after coming to foreground - Bug #1612: fix some compilation errors when using c++11 compiler - Bug #1657: fix a memory leak in CCTextureCache::addImageAsync() - Refactor #1636: refactor CCEditBox -[win32] - Refactor #1627: add VS version check in project file -[marmalade] - Bug #1631: make SimpleGame force landscape - Refactor #1629: add marmalade third party cleanup - Refactor #1630: add TestLua post-build script - Refactor #1632: remove grskia dependency and add in freetype support to the builds. -[linux] - Feature #1611: add Lua support - Refactor #1621: add linux 64bit target for eclipse project - Refactor #1676: refactor makefile and eclipse project configuration -[JavaScript bindings] - Bug #1550: fix some memory leaks in JSBinding - Bug #1614: fix a crash caused by DrawNodeTest - Bug #1622: fix a crash when cc.Node.getChildren is invoked if it has no children - Bug #1641: fix a bug that the coins in WatermelonWithMe don't animate - Bug #1644: fix a crash caused by passing NULL parameter to ccdictionary_to_jsval - Bug #1645: fix a bug that JS Project created by xXode template doesn't work correctly - Bug #1653: handle correctly when parsing int value in JSB - Feature #1620: add sys.localStorage support for JSB - Feature #1642: add tools for generating js-binding codes on windows - Feature #1646: update SpiderMonkey to v18.0 - Feature #1660: add js-debugger for js-binding - Feature #1661: add jsb sample game CrystalCraze - Refactor #1530: do some improvements to JS Bindings - Refactor #1633: implement sys.capabilities for JSB -[Lua bindings] - Refactor #1608: add CCNode::scheduleUpdateWithPriorityLua() for LuaBinding - Refactor #1626: add CCDirector::setDisplayStats() for luabinding - -cocos2d-2.1beta3-x-2.1.0 @Dec.5 2012 - [all platforms] - Bug #1556: set a default texture for CCParticleFire, CCParticleFireworks, etc - Feature #1555: update to cocos2d-iphone v2.1 beta3 - Feature #1564: update tests to cocos2d-iphone v2.1beta3 - Feature #1572: add sample game WatermelonWithMe - Feature #1573: add sample game CocosDragonJS - Refactor #1545: remove the usage of NODE_FUNC and CREATE_FUNC - Refactor #1565: remove VS2008 support - Refactor #1576: update CCBReader to latest version of CocosBuilder - Refactor #1589: add CCBReader::setCCBRootPath() - [iOS] - Bug #1548: update libcurl header files to 7.26.0 on iOS - [android] - Bug #1551: add error handler when reading image data using libjpeg - Refactor #1558: improve the speed of accessing to files from apk - [marmalade] - Bug #1559: fix a bug that if a file in resource directory doesn't exist, it will not search from root directory - Bug #1571: add box2d rope to marmalade project - Bug #1590: JPEG and File fixes for marmalade - Feature #1557: Marmalade support - Refactor #1574: update marmalade languages - Refactor #1575: update samples/TestCpp to compatible with marmalade - Refactor #1578: create cocos2dx-ext marmalade project - Refactor #1591: add TestLua marmalade project - [JavaScript bindings] - Bug #1577: fix a bug that touch events lost on Win32 when using JSBinding - Bug #1586: fix a crash in WatermelonWithMe - Bug #1588: rescheduleCallback support for JSBinding - Refactor #1570: improve the debugger for JSBinding - [Lua bindings] - Bug #1587: remove Lua script handler in CCCallFunc's destructor - -cocos2d-2.0-x-2.0.4 @Nov.2 2012 - [all platforms] - Bug #1473: fix a bug that CCScale9Sprite does not support rotated spriteframe in atlas - Bug #1494: fix a bug that missing removing auto-release object from AutoReleasePool if it invokes 'autorelease' method more than one time - Bug #1495: fix a bug that CCScrollView display area and touch area are wrong if its parent's postion isn't at CCPointZero in world - Bug #1508: fix a bug that potential observer array modification while it's traversed in CCNotificationCenter - Bug #1510: fix a bug that application will freeze when 'numberOfCellsInTableView' returns zero - Bug #1516: fix a bug that the font size of labels for displaying FPS,SPF,DrawCount is incorrect in different design resolutions - Bug #1536: CCControl* should not respond to touches if the control is not visible - Bug #1538: fix a logic error in CCControlHuePicker::checkSliderPosition() - Bug #1543: fix a bug that CCLayerGradient background of CocosBuilderTest can't be shown - Feature #1515: add a zoom function for debugging large resolution (e.g.new ipad) app on desktop - Refactor #1312: upgrade libcurl to 7.26.0 - Refactor #1486: apply multi-resolution mechanic on iOS, especially for iphone5 - Refactor #1520: add comments to describe the usage of multiresolution in HelloCpp - Refactor #1521: use relative coordinates in TestCpp - Document #1532: write a document describes how to debug games for ipad3 on low-resolution PC - Document #1493: add doxygen comments in CCNotificationCenter.h - [android] - Bug #1466: reload shader for test case "ShaderTest" after it comes from background - Bug #1500: fix a bug that CCRenderTexture cannot render properly on some Qualcomm Adreno GPUs - Bug #1507: fix a bug that can not play effect for the first time without pre-load effect - [iOS] - Bug #1527: fix a bug that MoonWarriors can not run on iOS simulator sometimes - Refactor #1491: remove dependency of FontLabel lib - [JavaScript bindings] - Bug #1526: fix a bug that JavaScript binding related samples will crash on iOS devices - Feature #1469: add MoonWarriors as a sample game - Refactor #1487: use shared JavaScript test cases with cocos2d-html5 and cocos2d-iphone - Refactor #1517: upgrade SpiderMonkey to FF 17.0 beta3 - [Lua bindings] - Bug #1506: fix a compilation error of TestLua if the path of cocos2d-x contains spaces - [win32] - Bug #1496: fix an error of comparing font's face name in CCImage of win32 port - Bug #1511: fix openGL framebuffer access violation - Bug #1540: fix win32 CCLuaLog memory leaks and invalid console UTF8 output - Feature #1513: add Multi-Touch support for win7/8 tablet or ultrabook - Refactor #1512: change writable directory to "C:\Documents and Settings\username\Local Settings\Application Data\your app name" if the app be built in release mode - -cocos2d-2.0-x-2.0.3 @Sep.26 2012 - [all platforms] - Bug #1452: change CCRGBAProtocol to public in order for actions like CCTintTo to have an affect on the CCScale9Sprite - Bug #1454: make JavaScript binding work together with Lua binding and c++ codes - Bug #1464: fix a crash caused by CCLabelBMFont - Bug #1478: fix a bug that TMX parser causes tileset images not to be loaded - Bug #1479: fix a bug that CCNotificationCenter does not check whether the object is valid before post notification - Bug #1485: fix potential memory leak in CCNotificationObserver - Feature #1458: add CCTableView - Feature #1460: min/max allowed value for CCControlSlider - Feature #1470: update CCBReader to cocosbuilder v2.1 beta - Feature #1483: synchronize CCControlExtension to newest version - Refactor #1477: abstracts Lua and JS binding protocol, some bugs fixes in lua-binding, adding custom menu on win32 and mac for switching resolutions - [iOS] - Bug #1482: fix a bug that orientation is wrong on iOS 6 SDK - Bug #1453: fix a bug that CCGL.h includes wrong path of a header file - Bug #1484: fix a minor memory-logic error in EditBoxImplIOS.mm - Feature #1455: add Xcode template for cocos2dx-js - [android] - Refactor #1481: refactor android Java+JNI - [mac os] - Bug #1456: remove code signing from MAC TestCpp project - [linux] - [win32] - Feature #1457: Add vs2012 sln - Feature #1474: popup a warning dialog instead of crash directly when OpenGL version is too old to run 2dx - [js-bindings] - Feature #1451: merge new js-binding codes - Refactor #1476: update location of spidermonkey-android makefile - [lua] - Refactor #1480: Update lua-binding for overloaded functions - [tools] - Feature #1404: add scripts for jenkins-ci - -cocos2d-2.0-x-2.0.2 @Aug.30 2012 - [all platforms] - Bug #1298: fix a logical error of CCSequence - Bug #1371: fix a particle crashes if setAutoRemoveOnFinish(true) - Bug #1379: fix a typo error of comment in CCNode.cpp - Bug #1381: fix a bug that CCLayerColor::setContentSize() declared differently with CCNode::setContentSize() - Bug #1382: fix a crash of CCBReader caused by null pointer - Bug #1384: fix an error when loading CCControlButton from ccbi - Bug #1385: fix a logic error in BitmapFontMultiLineAlignment - Bug #1386: fix a crash of PauseResumeActionsTest - Bug #1395: fix a bug that CCTextureCache::addImage ignores error in CCTexture2D::initWithImage() - Bug #1400: re-assign texture rect of CCControlSlider to consider SpriteFrame orientation - Bug #1403: fix a bug that do not support png8 format - Bug #1408: fix a bug that CCMenuItemImage is not loaded when the target and selector are empty in CCBReader - Bug #1409: fix a bug that loading CCControlButton from ccbi failed - Bug #1427: fix a bug that CCArray::randomObject() may use index that out of range - Bug #1430: fix a bug that can not compute correct label's width or height when its value is 0 - Bug #1440: fix a bug that CCSprite::displayFrame() uses wrong offset to create a sprite frame - Feature #1416: add object-oriented API of CCGeometry - Feature #1405: implement multi-resolution adaption solution - Feature #1424: add a simple wrapper of http access - Feature #1429: add CCEditBox which wraps system edit control - Feature #1439: synchronize to cocos2d-iphone 2.0 stable version - Refactor #1399: adjust directory structure - Refactor #1402: improve static creator function names to avoid confusion - Refactor #1413: improve CCTouch::getLocation(), getDelta() which returns OpenGL coordinates directly - Refactor #1437: change the return type of CCApplication::sharedApplication() and CCGLView::sharedOpenGLView() to a pointer - Refactor #1441: put hd and iPad resources of TestCpp into separate directories - Refactor #1442: use CREATE_FUNC to replace LAYER_CREATE_FUNC and SCENE_CREATE_FUNC - [iOS] - Bug #1389: fix a Xcode 4.5-specific compiling errors that can not convert -1 to unsigned int - Bug #1432: fix a bug that "MutiTouchTest" crashes on IOS if putting more than 5 fingers on the screen - Refactor #1383: change the file path that CCUserDefault saves xml file in - Refactor #1433: remove fpsxxx.png in template - Refactor #1443: Fix some warnings - [android] - Bug #1284: use OpenSL ES to play effects when the device is i9100 - Bug #1372: fix a typo error in platform/android/CCEGLView.h - Bug #1377: fix TMX Tile cracks in the Test App - Refactor #1407: cleaner build script - Refactor #1438: make android template use its own source files - [mac os] - Bug #1417: fix a compiling error when building TestCpp for mac port using command line - Feature #1401: add mac port - [win32] - Bug #1390: fix a win32 error says "The application failed to initialize properly" - [linux] - Bug #1445: fix compiling errors on linux - Feature #1419: add linux port - [blackberry] - Feature #1420: add blackberry port - -cocos2d-2.0-rc2-x-2.0.1 @Jun.28 2012 - [all platforms] - Bug #1257: synchronize CCGrabber.cpp - Bug #1280: fix a bug that BitmapFontMultiLineAlignment test doesn't work correctly - Bug #1286: fix the declaration of tgaLoadRLEImageData() - Bug #1293: fix a bug that CCDirector::getFrames() returns wrong value - Bug #1296: fix a logical error in CCTMXTiledMap::tilesetForLayer() - Bug #1300: fix a typo of CC_ENABLE_CACHE_TEXTTURE_DATA - Bug #1301: apply scissor with points in CCGLView::sharedOpenGLView().setScissorInPoints() - Bug #1302: change the parameter type of CCMenu::setHandlerPriority to signed int - Bug #1308: fix a logical bug in CCTouchDispatcher - Bug #1326: fix a bug that the compilation of HelloLua and testjs project was broken after synchronizing to rc2 - Bug #1330: fix bugs of CCBIReader - Bug #1335: fix memory leaks in cocos2dx and CCBReader - Bug #1368: implement a test case(Effect4) in EffectsAdvancedTest - Feature #1202: remove CCFileData - Feature #1310: synchronize to rc2 - Feature #1323: support CCBIReader - Feature #1324: add create() for static member functions that new an autorelease object - Feature #1332: add macro COCOS2D_VERSION in cocos2d.h - Feature #1333: support CCScrollView - Feature #1334: add ScrollViewTest to CocosBuilderTest - Refactor #1181: refactor CCRenderTexture - Refactor #1283: use relative path in cocos2d.h - Refactor #1288: enhances CCTransitionScene to work even if there is no running scene - Refactor #1289: update CCControlButton: add zoomOnTouchDown property and setPreferredSize - Refactor #1292: modify some function names to make them more readable - Refactor #1336: use CC_DEPRECATED_ATTRIBUTE macro to mark deprecated interfaces - Refactor #1367: change some function names that start with "createWith" to "create" - [iOS] - Bug #1290: fix a bug that a project generated by template can not find Shaders folder - Bug #1297: fix a bug that the effect is wrong when using projection 2d and enabling retina - Bug #1299: fix a bug that SimpleAudioEngine::resumeEffect and SimpleAudioEngine::resumeAllEffects will play effects that are played previously - Bug #1315: fix wrong effect of TileMapTest when enabling retina - Bug #1338: fix a crash of CocosdenshionTest when playing effect then clicking HOME menu - Bug #1343: fix a bug of Xcode template - Bug #1364: fix a bug that can not resume background music after pausing it - Refactor #1269: generate project for cocos2dx, then HelloWorld, tests, HelloLua and testjs can refer it - [android] - Bug #1239: fix a bug that can not stop effect if play effect with loop mode twice - Bug #1278: fix a bug that CocosDenshion::unloadEffect() can not stop playing effect - Bug #1322: make CCLabelTTF support vertical alignment - Refactor #1287: make android template's build_native.sh automatically copy new icons - Refactor #1329: move all java files part of engine into a certain directory, then all projects refer them - [win32] - Bug #1282: fix a crash that if the display card is ATI - Bug #1344: fix a bug of win32 template - Bug #1365: fix a bug that some files of Resources folder which is copied by build_native.sh will lost authority in cygwin - Bug #1366: fix a crash of tests - [lua] - Bug #1369: fix a crash when invoking CCLabelTTF:setPosition(x,y) - Feature #1327: export 'create' method for Lua bindings - -cocos2d-2.0-rc0a-x-2.0 @May.31 2012 - [all platforms] - Bug #1094: fix a bug that nothing will be shown when using CCParticleBatchNode - Bug #1115: fix a bug that CCFileUtils::fullPathFromRelativePath() with resolution parameter return error value with empty string - Bug #1137: fix a memory leak in CCLabelBMFont and sync the implementation of CCLabelBMFont to gles20 branch - Bug #1138: fix a memory leak in CCTextureCache::addPVRImage. - Bug #1155: revert CCDirector singleton to original implementation - Bug #1157: fix a bug that nothing is shown in TMX Orthogonal Test - Bug #1158: fix a bug in CCParticleSystemQuad - Bug #1159: update "CallFuncND + auto remove" test demo - Bug #1160: rename 'CGFloat' to 'CCFloat' - Bug #1164: add the render mode which uses VBO without VAO in CCParticleSystemQuad - Bug #1165: merge pull request #842 - Bug #1187: fix a bug that spanish(Buen día) cannot be shown completely in CCLabelBMFont unicode test - Bug #1189: CCLabelBMFont updateLabel() optimizations and fixes - Bug #1212: fix a bug that TMXBug787Test crash. - Bug #1217: fix a bug that EaseActions reverse broken - Bug #1232: fix a bug that CCLayerGradient::updateColor() assign wrong value to m_pSquareColors - Bug #1244: fix memory leak in CCParticleSystem::initWithDictionary() - Bug #1273: fix a bug that app will crash after clicking closed button in TextureCacheTest - Bug #1275: fix memory leaks in tests project - Bug #1277: implement CCToggleVisibility::copyWithZone() - Feature #1114: integrate CCControlExtension and implement corresponding tests - Feature #1180: synchronize CCConfiguration - Feature #1194: merge texturewatcher contributed by NetGragon - Feature #1205: add ccbreader and test case for CocosBuilder - Feature #1240: support TIFF format picture - Feature #1258: merge Rolando's testjs into gles20 branch - Refactor #1156: synchronize CCDirector - Refactor #1166: improve CCString and CCArray, optimize CCDictionary - Refactor #1176: change linebreak symbol to UNIX format ('\n'), replace 'tab' with four spaces - Refactor #1177: refactor platform - Refactor #1178: use macro NS_CC_BEGIN instead of "namespace cocos2d {", NS_CC_END instead of "}" - Refactor #1188: refactor directory structure - Refactor #1191: update templates for all platforms - Refactor #1198: optimize CCTextureCache::removeUnusedTextures() - Refactor #1203: remove CCFileUtils::setResource(const char* pszZipFileName) and SimpleAudioEngine::setResource - Refactor #1204: refactor AppDelegate::initInstance() - Refactor #1206: remove some unused files, only supports iOS, win32 and android - Refactor #1211: translate Chinese comments to English for CCTextureWatcher and CCListView - Refactor #1246: fix CCDirector using CCLabelBMFont instead of CCLabelTTF - Refactor #1252: add CCEGLViewProtocol::getFrameSize() method for getting the real screen size of device - Refactor #1253: add static method "purgeConfiguration" for CCConfiguration to avoid memory leak - [iOS] - Bug #1109: add parentheses to remove Xcode warnings - Bug #1230: fix a bug that Calculation of string width may be wrong on iOS - Bug #1266: fix a bug that CCTextureCahce::addImageAsync() don't work correctly on iOS - Feature #1095: IOS screen resolution support - [android] - Bug #1139: fix a bug that screen becomes black when backing from background - Bug #1140: fix a bug that ParticleTest crashed - Bug #1141: fix a bug that NodeTest crashed in StressTest1 and StressTest2 - Bug #1142: fix a bug that TouchesTest crashed - Bug #1143: fix a bug that MenuTest crashed - Bug #1144: fix a bug that ParallaxTest crashed - Bug #1145: fix a bug that TileMap crashed - Bug #1146: fix a bug that IntervalTest crashed - Bug #1147: fix a bug that ChipmunkAccelTouchTest crashed - Bug #1148: fix a bug that LabelTest crashed - Bug #1149: fix a bug that SpriteTest crashed when go to second test case - Bug #1150: fix a bug that RenderTextureTest crashed at second test case - Bug #1151: fix a bug that Box2DTest crashed - Bug #1152: fix a bug that PerformanceTest crashed at 1, 2, 5 test cases - Bug #1185: fix a bug that when backing to foreground, will lost texture if it uses sprite batch node - Bug #1216: fix JNI memory leaks - Bug #1229: fix a bug that android port can not be compiled on ndk android-8 level - Bug #1236: fix a bug that JniHelper::jstring2string may crash when parameter is null - Bug #1237: fix a bug that line number message printed by CCAssert is wrong - Bug #1279: fix a bug that NodeNonOpaqueTest can't be shown correctly - Feature #1247: add profiler support for android - Feature #1265: build dynamic library of SpiderMonkey for Android, and implement testjs for android - Refactor #1179: popup a message box when invoking CCAssert() on Android - Refactor #1201: simplify the usage of writing Android.mk - [windows] - Bug #1215: fix a bug that Win32 retina cannot work - Bug #1251: add CocosBuilderTest to the test project for VS2008 - Bug #1264: fix wrong string alignment when using utf-8 encoded text with CCLabelTTF - Bug #1268: fix a bug that Testjs will crash after clicking the close button on win32 - Bug #1270: fix some warning on win32 - Feature #1186: add console window for Win32 application, all debug message output to this console window - Feature #1263: build dynamic library of SpiderMonkey for win32, and add testjs project to solution - Refactor #1170: remove win32 template of wophone - [lua] - Refactor #1190: update Lua binding to 2.0 - Refactor #1220: using CCString::stringWithContentsOfFile to get string from Lua script files - - -cocos2d-1.0.1-x-0.12.0 @ Mar.5 2012 - [all platforms] - Bug #925: rename HelloWorld/Resource to HelloWorld/Resources - Bug #948: fix a bug that CCMutableArray::getIndexOfObject returns 0 on both "index 0" and "not existing" - Bug #951: remove definition of NSMutableSet - Bug #961: fix mad behaviour in second stage of CCEaseBackInOut - Bug #965: remove some dynamic_cast calling since selector_protocol.h was removed - Bug #967: fix a bug that PVR Textures cannot be reloaded after GL context lost - Bug #986: add init() funciton in CCMenu class - Feature #952: make CCLabelBMFont supports other languages, include Chinese, Korean, Janpanese and so on. - Feature #972: add Support for CCNotificationCenter - Refactor #933: refactor CCUserDefault - Refactor #958: move the implement of SelectorProtocol to CCObject - Document #975: add comment for CCTMXTiledMap::getMapSize and more methods - [iOS] - Bug #946: fix a bug that can not load HD image for both Retina and Normal correctly - Bug #762: fix a bug that CCLabelTTF is in different position (higher) than in previous version on iphone - Refactor #985: remove template for xcode3 - [android] - Bug #947: fix a bug that long chinese string causes closed loop on android - Bug #950: fix a crash when touching the screen because of RTTI - Bug #954: fix a bug that accelerometer axes inverted on android tablet when setting orientation to portrait - Bug #957: fix a bug that when running textInputTest, application enters background after input character and click back key on android devices - Bug #959: fix a bug that get wrong multitouch id - Bug #964: fix a bug that can not show whole charactor - Bug #971: fix dynamic_cast error on android - Feature #982: make android template supports box2d, chipmunk and lua - Refactor #970: use modules in the Android NDK build - Bug #1008: fix a bug that missing "return" in SimpleAudioEngine::getEffectsVolume() method on android platform - [bada] - Bug #984: use static library for cocos2dx project on bada and qnx platform - [blackberry] - Bug #960: detect when the application goes and return from background in QNX (Black Berry Playbook) - Bug #962: fix some bugs on qnx port - Bug #963: fix a bug that applicationWillEnterForeground will be invoked twice when application is launched - Bug #968: fix a bug about "Out of bound" in CCFileUtils::getWriteablePath() for BlackBerry - Feature #994: add support for bbndk2.0 - [marmalade] - Bug #995: modify project configure for marmalade port after adding extension support and refactor resource folder - [win32] - Feature #969: implement Accelerometer Simulation for Win32. - [lua] - Bug #942: fix a crash when invoking CCScheduler:sharedScheduler():scheduleScriptFunc in lua - Bug #953: add tolua++ for Mac - Refactor #973: refactor Lua support - -cocos2d-1.0.1-x-0.11.0 @ Jan.13 2012 - [blackberry] - Feature #907: support blackberry playbook - [all platforms] - Bug #752: fix a bug that enable and disable touch more times in touch handler callback function may cause memory leak - Bug #911: fix a bug that TextureCache::addUIImage() cannot create texture when key is null - Bug #920: export export functions in CCAffineTransform with CC_DLL - Bug #922: make CCTexture2D::setPVRImagesHavePremultipliedAlpha() to be a static function - Bug #926: fix a crash caused by RTTI when running TouchesTest - Bug #936: fix a bug that touch menu item may crash when selector is null - Feature #892: use RTTI to simplify the codes - Feature #903: add touch index for CCTouch - Refactor #934: add 'isEqual' function for CCString, make CCObject::isEqual to a virtual function - Refactor #940: use new icons and new background pictures with new logo of cocos2d-x - [android] - Bug #923: fix a bug that CCTextureCache::addImageAsync() crashes when a game enters foreground from background - Bug #906: remove unneeded codes in CCImage_android.cpp - Bug #910: fix a bug that create-android-project.bat may erase exist folder with appointed name - Bug #884: fix a crash error caused by CocosDenshion on android simulator - Bug #921: fix a bug that accelerometer axes inverted in Motorola Xoom tablet - Bug #928: fix a bug that 16-bit texture is changed to 32-bit after application enter foreground - Bug #935: fix a bug that terminateProcessJNI() invoke wrong jni function - Bug #937: fix a compiling error on android x86 - Bug #941: fix a bug that volume of background music may not in [0, 1.0] - Feature #887: define GL_GLEXT_PROTOTYPES = 1 automatically when compile on ndk r7 - Feature #919: improve build_native.sh and create-android-project.sh - Refactor #924: make loading music resources thread safe - Document #837: Write a document describes how to use jni - Document #914: update document to fit android r5~r7 - [iOS] - Bug #917: implement CCFileUtils::getFileDataFromZip() - Feature #893: remove cached data when receiving memory warning on iOS - [bada] - Bug #918: fix a compiling error after renaming airplay to marmalade - Bug #927: fix a crash caused by invoking unloadEffect after invoking stopEffect - Bug #938: fix a bug that glGenFramebuffersOES isn't supported on wave m device - Bug #943: fix a bug that box2d can't be compiled successfully on bada sdk 1.2.1 - Refactor #904: Recreate bada 2.0 projects - [win32] - Bug #915: fix a bug that msvc template uses old version of .cpp files - [linux] - Bug #888: fix compiling error with eclipse - Bug #930: fix a crash caused by load jpg format files - [marmalade] - Refactor #908: merge marmalade to latest cocos2d-x source - -cocos2d-1.0.1-x-0.10.0 @ Dec.2 2011 - [bada] - Feature #223 integrate cocos2d-bada branch to master - Bug #852 fix a bug that CCSpriteBatchNode cannot be drawn correctly - [all platforms] - Feature #854 integrate pthread and write a test case on all platforms - Feature #465 implement CCTextureCache::addImageAsync() - Feature #850 upgrade box2d from 2.1.2 to last 2.2.1 - Feature #781 add functions for effects - Feature #760 add methods to get/set CCDirector::m_pNotificationNode - Bug #883 fix the crash of SpriteTest - Refactor #879 use CCAssert() instead of assert() - Document #882 Write a document describes some cautions about using pthread - [android] - Feature #838 support android x86 platform - Bug #758 fix a bug that custom TTF fonts causing low memory - Bug #848 fix a bug that accelerometer values are wrong if the content is scaled - Bug #885 fix a bug that SimpleAudioEngine::setEffectVolume() don't take effect immediately - Document #864 write a describe how to build on sdk 4.0 & ndk-r7 - Document #878 write a document describe how to build project for x86 android - Document #881 write a document describes building android ndk project with ndk-r7 - [linux] - Bug #780 fix build error on ubuntu 11.0 - Bug #776 fix a bug in the audio player - -cocos2d-1.0.1-x-0.9.2 @ Oct.20,2011 - [linux] - Feature #728 Linux port is born! http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_run_HelloWorld_and_tests_on_linux - [all platforms] - Feature #672 Implements copyWithZone() for CCShow & CCHide - Feature #676 add more languages into CCApplication::getCurrentLanguage() - Feature #678 add private constructor for CCArray - Feature #684 add test case for CCApplication::getCurrentLanguage() - Feature #685 add test case in LabelTest to display Chinese charactors - Bug #675 Fix memory leak in CCLayer when using accelerometer - Bug #686 CCTMXLayer::appendTileForGID() not setting Z index tag causes the first screen of tiles to be re-created - Bug #689 CCRect should assert the width and height is positive - Bug #698 CCSprite::init() is excited twice in all CCSprite's static methods - Bug #700 CC_SWAP32 marco has a typo with leads to error swap result - Bug #701 CCZHeader.version should be unsigned short - Bug #715 CCFadeOut causes a crash when applied to CCMenuItem and m_pSelectedImage is NULL - Bug #718 fix a typo in method CCMenu::alignItemsInRows - Bug #749 CCSpriteTest crashes at the test case SpriteNilTexture - Bug #750 CCTextureCache::textureForKey() can't find textures added by function addUIImage() - Refactor #677 Pass arguments by reference instead of pointer if possible - Refactor #703 Refactor Accelerometer. Because it only sends data to one delegate, so it needs only one setDelegate() - Document #692 Describe the usage of view orientation http://www.cocos2d-x.org/projects/cocos2d-x/wiki/About_device_orientation - [android] - Feature #670 Pause & resume effect playing when activity is paused & resumed - Feature #687 Implement preloadBackgroundMusic to android - Feature #688 Support reading resources not only from apk - Feature #726 use external storage on android - Feature #746 add a helper method to draw filled polygons - Bug #683 getPackagenameJNI() and getCurrentLanguageJNI() mustn't return invalid pointer - Bug #696 Some android devices may crash at CCRenderTexture::end(bool) - Bug #719 CocosDenshionTest crashes when start the test case on android - Bug #714 CCLabelTTF has different visual result between Android & Windows - Bug #727 Memory leak of NewStringUTF - Bug #736 Remove android:installLocation in AndroidManifest.xml - Bug #743 nativeInit is called with wrong screen size when running on device with software android buttons - Bug #744 CCUserDefault crashes in v0.9.1 - Bug #755 Multi-touch causes crash on sum sung devices - [ios] - Bug #660 CCLabelBMFont image error in retina display - Bug #693 CCLabelTTF can not break line by '\n' on iOS - Bug #716 subbing & adding volume of sound effects don't change volume little by little on iOS - Bug #738 Passing CCSize(width,0) to CCLabelTTF causes the label invisible - Bug #753 visual orientation is wrong on ios5 simulator - Bug #754 Missing png file for CCLabelAtlas cause crashes on iOS 4.3.3 & 5.0 - [win32] - Feature #731 add ability of simulating android back/menu key on win32 - Feature #735 add ability of simulating android enter/resume background on win32. Shift+F1=android Back, Shift+F2 =android Menu - Feature #745 export CCTime to all - Bug #747 Win32 templates should put all resources into "Resources" folder - Bug #748 build error in win32 release version - [wophone] - Bug #702 tests crash at the start on wophone devices - [lua] - Feature #704 Print error descriptions ad pop error code in CCLuaScriptModule::executeString & CCLuaScriptModule::executeScriptFile - Feature #707 Support 'require' for Lua on android - Feature #732 Add particle systems to Lua bindings - Feature #733 Use ant to generate a Lua project, refer to http://www.cocos2d-x.org/boards/11/topics/3957 - Feature #734 Use ant to generate LuaCocos2d.cpp - - -cocos2d-1.0.1-x-0.9.1 @ Aug.17,2011 - [all platforms] - Feature #347 Support custom TTF fonts - Feature #536 Support PVR Texture - Feature #645 update to cocos2d-iphone v1.0.1 - Feature #633 allow SimpleAudioEngine::playEffect repeatly - Feature #630 implement CCRenderTexture::saveBuffer method - Feature #613 Call executeCallFuncN instead of executeCallFunc in CCMenuItem::active() - Feature #620 add Texture2d test case - Feature #638 Add support for per ccz format - Feature #641 users can CCRenderTexture::saveBuffer to any path - Feature #643 swap Accelerometer input x/y according to the orientation - Feature #665 add test case for CCRenderTexture::saveBuffer - Bug #513 CCProgressTimer doesn't work with CCspriteFrameCache - Bug #609 Retain & Release CCObject in CCSet - Bug #628 CCMutableArray::arrayWithObjects should autorelease array object - Bug #629 pass eImgFmt to initWithImageData in initWithImageFile - Bug #636 CCTextureCache::textureForKey() can't find the right texture - Bug #639 m_PositionInPixels isn't correctly initialized - Bug #640 the image read from render texture is upseted - Bug #644 CCSpriteBatchNode::removeAllChildrenWithCleanup() not work as expected - Bug #680 CCtouchDispatcher::rearrangeHandlers() crash - Refactor #623 refactor Cocos2dJni.cpp - Refactor #652 refactor char* JniHelper::jstringtochar() - Document #622 comment CCUserDefault in doxygen format - Document #651 add CCFileUtils to oxygen api document - [lua] - Feature #679 bind Lua to CocosDenshion - Feature #647 add a method to set search path of Lua script - Feature #611 Add some methods in CCMenuItemLabel & CCMenuItemToggle for lua - Feature #612 Export CCNode::getContentSizeInPixels & setContentSizeInPixels to lua - Feature #653 add CCScheduler::unscheduleScriptFunc - Bug #615 CCLOG may crash in LuaEngineImpl - [android] - Feature #610 Remove the support of ndk-r4 crystax.net version - Bug #608 CCRenderTexture cannot show textures after sleep and wake-up - Bug #618 HelloWorld & Tests crash when X is clicked - Bug #619 CCFadeTo may crash on android - Bug #624 CCLabelTTF::setString("\n\n\n") crashes on android - Bug #625 test_image_rgba4444.pvr.gz can not packed into app - Bug #631 TextInputTest crash when input nothing - Bug #637 Create resources folder instead of resource in create-android-project.sh - Bug #648 CCRenderTexture::saveBuffer may crash on some devices like Moto Defy - Bug #655 CCLabelTTF doesn't draw all characters, it may lost the last char - Refactor #656 refactor CCFileUtils, make it support reading data from directory other than assets - [ios] - Feature #642 CCImage_ios.mm should be modified for saving image - Feature #658 xcode3 template should create AppDelegate.cpp/.h instead of ${PROJECT_NAME}AppDelegate.cpp/.h - Feature #661 fix TMXTiledMap for iPhone Retina mode - Bug #667 AppDelegate::applicationDidEnterBackground isn't invoked on iOS - Bug #668 CCLabelBMFont display 4 characters in a square per character block in retina mode - [win32] - Feature #620 change Lua library to static lib - Feature #632 Update visual studio template for Lua support - - -cocos2d-1.0.0-x-0.9.0 @ Jul.14,2011 - [all platforms] - Feature #584 sync with cocos2d-iphone v1.0.0 - Feature #601 use Chipmunk v5.3.5 - Feature #581 change return types of xxxAction::reverse() to its own type - Bug #522 CCSpriteFrameCache::addSpriteFramesWithFile(const char* pszPlist) crashed if the param have no '/' - Bug #522 CCTextureCache::removeTextureForKey(const char*) cache the image path incorrectly - Bug #573 CCLayerColor does not init its m_tColor, which will result to a random color - Bug #576 some CCMutableDictionary methods must return _KeyT instead of std::string - Bug #577 CCReverseTime may crash - Bug #578 Debian & LavaFlow of ParticleTest have not picture, the effect of ParticleFire is wrong - Bug #580 ShuffleTilesTest of EffectText may crash - [ios] - Bug #546 CCLabelTTF::labelWithString() works incorrectly when height = 0 - Bug #604 test.xcodeproject miss Summary & Info in xcode4 since v0.8.5 - [android] - Feature #547 deal with line wrap of CCLabelTTF::initWithString(...) - [win32] - Bug #659 ChipmunkTest Sensors crashes in a few seconds - Bug #583 SimpleAudioEngine::playBackgroundMusic(const char*, true) have no sound on win32 - Bug #605 export C methods in CCNS.h to dll interfaces - Bug #548 export CCConfiguration to dll interfaces - [marmalade/airplay] - Bug #600 incorrect memory allocation in marmalade port - Refactor #582 use libpng instead of CIwImage in CCImage_airplay.cpp - [wophone] - Bug #545 fix the wrong effect of ChipmunkTest - Bug #606 PageTransitionForward in TransitionsTest has wrong visual effect - - - -cocos2d-0.99.5-x-0.8.5 @ Jun.28,2011 - [all platforms] - Feature #577 Lua Support! We export all the cocos2d-x classes & methods to lua! - Please compile and run HelloLua, and read HelloLua/Resource/hello.Lua for more details. - And the Lua new project template/wizard is ready on xcode3, xcode4 and VisualStudio2008 & 2010 - Feature #398 Xcode4 templates! Run install-template-xcode.sh to do the magic - Feature #323 Internationalization support! Add CCApplication::getCurrentLanguage() method on all platforms - Feature #529 add static node() method to CCLayerColor & CCLayerGradient - Bug #534 don't raise compile error if ios project includes CCImage.cpp & CCFileUtils.cpp - Bug #429 Effect is wrong when the value of defaultAlphaPixelFormet=kCCTexture2DPixelFormat_A8 in CCTexture2D - Bug #491 Unsafe cycle in CCScheduler::unscheduleAllSelectors - Bug #502 Refactor the singleton mode of CCConfiguration - Bug #512,#525 fix warnings in /Wall flag - Bug #516 Undefined behavious in ccCArray.h (signed / unsigned conversion) - Bug #518 CCScheduler::unscheduleAllSelectors() uses tHashSelectorEntry in wrong way - Bug #521 the effect of PageTurn3D is curious - Bug #523 CCParticleSystemQuad::particleWithFile() can't work correctly - Bug #524 CCFileUtils::dictionaryWithContentsOfFile() can't parse special plist format - Bug #526 glScissior can't work correctly when use autoscale function - Bug #543 EffectTest renders x4 scale when use auto-scale on android/win32/wophone - Bug #544 some test cases of TransitionTest renders x4 scale when use auto-scale on android/win32/wophone - [android] - Bug #490 TextInputTest show words on soft keyboard detach instead of each key pressed - Bug #507 RenderTextureTest failed on some android devices - Bug #532 GLSurface has no response when tap screen frequently for a long time - Bug #542 SimpleAudioEngine::setBackgroundMusicVolume() not work when background music changed - Refactor #535 remove skia dependence when drawing strings, which cause bug #507 - [ios] - Feature #540 Add RootViewController into xcode3/xcode4 templates. Games can use ios rotation mechanism - [win32] - Feature #537 Update PVRFrame lib to version 2.8 for ATI graphic card new driver - [wophone] - Bug #539 games on wophone wva devices probably failed on reading resource from zip package - - - -cocos2d-0.99.5-x-0.8.4 @ May.26,2011 - [android] - Feature #496 SUPPORT ANDROID 3.0! We test it on both Motorola XOOM & Samsung Galaxy Tab 10.1 (Highlight!!!!!) - Bug #494 typo fixed, Cocos2dxActivity::setPackgeName() to setPackageName() - Bug #495 Memory leak of CCFileUtils::getWriteablePath() - Bug #497 soft keyboard stays shown on some devices while the project includes CCTextFieldTTF - Bug #501 projects creaed by android template have the same package name - Bug #510 Tests progress is killed at the power down phase - [all platforms] - Feature #503 upgrade chipmunk from 5.1 to 5.3.4, keep sync with cocos2d-iphone (Highlight!) - Feature #509 For integrting IME, we had to rotate UI to landscape by default - Bug #499 CCRGBAProtocol isn't inherited and implemented in CCMenuItemSprite - [ios] - Bug #493 the return value of CCFileUtils::getWriteablePath() is not end with '/' - Bug #508 Problem in running Tests in Retina resolution since 0.8.2 - [win32] - Bug #492 CCFileUtils::fullPathFromRelativeFile forget to consider the path separated by '\' - Feature #489 Use GetCurrentDirectory instead of GetModuleFileName in CCFileUtils_win32.cpp - - - -cocos2d-0.99.5-x-0.8.3 @ May.12,2011 - [all platforms] - Feature #317 wrap input box for game dev, CCTextFieldTTF. (Highlight!) - Feature #455 implement CCUserDefault for data persistence (Highlight!) - Feature #456 integrate libcurl for network access (Highlight!) - Feature #468 implement CCProfiler & CCProfilingTimer - Feature #450 can set default pixel format other than RGBA888 - Feature #449 Remove the sources for mac platform. We plan to focus on mobile platforms & reduce the complexity - Refactor #451 Remove the event dispatcher and refactor CCLayer & CCMenu & CCParticleSystemPoint. - Refactor #452 Refactor CCDirector CCGrid CCNode, reduce the complexity - Refactor #472 Refactor duplicated modules under cocos2dx/platform, reduce the complexity - Bug #341 CCTMXFiledMap crashed when a child is not the obj of CCTMXLayer - Bug #371 A layer can't registered as a StandardTouchDelegate when touch event is handling - Bug #428 Function addChild low efficiency - Bug #448 CCCallFuncO crashes - Bug #467 CCLayer:m_eTouchDelegateType = ccTouchDeletateAllBit all the time - Bug #471 invoke CCFileUtils::setResourcePath may cause loading texture for ParticleSystem failed - Bug #484 CCTextureAtlas::initWithTexture() may cause memory leak - Bug #486 transition test FlipX, FlipY, FlipAngular, ZoomFlipXxx flickers on ios simulator & device - [ios] - Bug #447 really exit application when "x" button is clicked - Bug #460 cocos2dx + box2d template cannot find libxml2.dylib - [android] - Feature #393 use full version of libxml2, with xmlXPath.. serial methods - Feature #477 Set compilation default ndk version to r5 - Bug #374 replace the method for EGL rendering context lost - Bug #453 Android Cocosdenshion can't replace background music - Bug #462 no applicationDidEnterBackground / applicationWillEnterBackground on Android - Bug #470 use GAME_ROOT or other words instead of HELLOWORLD_ROOT in anroid new projects - Bug #475 CCImage::initWithString return true even if the bitmap hasn't been initialized - [win32] - Feature #454 Modify the including path of Box2D genereated by win32 template - Bug #459 the project create by template for vs use the RuntimeLibrary MTd, different with other project - [wophone] - Feature #482 Modify the resource data path for the new WoPhone SDK - Feature #487 Implement the function CCFiltUtils::getWriteablePath() on wophone - Refactor #466 Refactor CCFileUtils for the new packing approach on wophone - Bug #481 After power down & up, backlight will turn off automaticlly if there's no operation - Bug #485 reduce the CPU occupation, modify the approach of FPS control on wophone - [airplay] - Feature #480 add template for airplay - - - -cocos2d-0.99.5-x-0.8.2 @ Apr.7,2011 - [all platforms] - 390 Feature Implement performance test - 411 Feature support .plist format outputed by the last version of Zwoptex - 415 Feature Make all xxxFromFile methods can accept relative path - 439 Feature all file reading must pass though CCFileUtils::getFileData - 441 Feature Initialize pointers in construction & detect them in destruction - 427 Refactor refactor CCTMXXMLParser with multi-platform CCSAXParser design - 434 Refactor refactor class CCFileUtils - 396 Refactor remove ccxScopedPtr & ccxScopedArray, use STL instead - 350 Bug TransitionFade flickers - 391 Bug CCSpriteFrameCache doesn't support .plist files which format isn't equal to 0 - 420 Bug CCSprite::spriteWithFile() returns a valid object when the image file isn't present - 440 Bug Can't show MessageBox when imageFromFile can't find the image - [ios] - 349 Bug deal with plist files in binary format - 435 Bug CocosDenshion crashes at foreground/background switching - 438 Bug MotionStreak Test crashes on device - [android] - 421 Feature Add a template & new project script for android - 443 Feature implement CCKeypadDelegate on android - 367 Bug Android.mk of HelloWorld and Tests depends on alphabet order - 422 Bug the 2nd point in multi-touch isn't located to the correct coordinate - 430 Bug replace glColor4ub with glColor4f to avoid "called unimplement OpenGL ES API" on some android devices - 431 Bug ParticleFlower on G3 can't show the particles correctly - [win32] - 417 Bug No touchEnd when the mouse move out from the window - 424 Bug open vs2010.sln says cannot open CCamera.cpp - [airplay] - 379 Feature integrate airplay sdk port - 442 feature implement CocosDenshion on airplay port - - - -cocos2d-0.99.5-x-0.8.1 @ Mar.21,2011 - [all platforms] - 400 Bug typo, rename CCamera.cpp to CCCamera - 403 Feature rename cocos2d::UIEvent to cocos2d::CCEvent, to avoid class name conflict on ios - 405 Bug CCConfiguration::checkForGLExtension(const string&) sometimes may crashes - 407 Bug replace "CCGL.h" with "CCGL.h" in CCCamera.cpp, for case-sensitive systems - 408 Bug memory leak in CCImage::_initWithPngData - 409 Feature rename cocos2d::NSArray to cocos2d::CCArray, to avoid the conflict on ios - 418 Feature add copyright of cocos2d-iphone original authors to each file - 423 Bug fix compilation warnings when COCOS2D_DEBUG == 2 - [ios] - 404 Bug HiResTest isnot prerfect on HVGA/Retina yet - 410 Bug xcode3 template, cannot find libxml from header searh paths in release build - 419 Bug test case TMXIsoVertexZ in TileMapTst has wrong effect on ios - [android] - 399 Bug HelloWorld crashes when the screen is touched - 405 Bug CocosDenshion test, BGM isn't paused after HOME key tapped - [win32] - 395 Bug make AppDelegate.cpp created by VS wizard portable without any modification - 401 Bug VisualStudio template for 2010 OutputDir errors - - - -cocos2d-0.99.5-x-0.8.0 @ Mar.15,2011 - [all platforms] - 316 Feature Resolution auto adjustment, auto scale HVGA resource to WVGA or any other resolutions - 336 Refactor refactor platform porting layer - 253 Bug xml parser sometimes crashes - 375 Feature Rename NS,CG,UI prefix classes/definitions to CC prefix, avoid the crash at ios dev - 332 Feature upgrade tests from 0.99.4 to 0.99.5 - [ios] - 363 Bug CCLabelTTF can't treat line breaks and wrapping correctly. - 351 Feature CCLabelTTF cannot automatic line break on iphone - 352 Bug ccRemoveHDSuffixFromFile & CCFileUtils::getDoubleResolutionImage isnot work - 392 Bug border of sprite debug draw isn't scaled if enableRetinaDisplay(true) - 385 Feature implement ccos2d::CCLog - 388 Feature update the template for iOS - [android] - 247 Feature support multitouch - 242 Feature support accelerometer on android - 353 Feature support jpg on android - 344 Feature add APP_ABI := armeabi armeabi-v7a to improve the performance on some devices - 356 Bug CCLabelTTF::initWithString crashed - [wophone] - 386 Bug resolve the compile conflict on wophone sdk - 383 Bug The approach which handle left soft-key clicked is not work - 377 Feature Replace the word "uphone" with "wophone" - 357 Bug CCLabelTTF doesn't support words contain line breaks. - 348 Bug CCLabelTTF blur if color = white and fontSize < 24 - [win32] - 373 Feature Disable PVRFrame window when cocos2d running - 355 Bug CCLabelTTF doesn't support line breaks and wrapping words - 300 Feature wizard for Visual C++ 2008 Express & VS2010 Express/Professional - - - -cocos2d-0.99.5-x-0.7.2 @ Jan.26,2011 - [all platforms] - - upgrade engine logic internal & interfaces to 0.99.5 - - the list of menu items in tests is showing how to scroll now - - lots of bugs fixed - [iphone] - - add new project templates for Xcode - - add the c++ wrapper for CocosDenshion::SimpleAudioEngine - - support UTF8 charactors in text renderring, such as CCLabelTTF, CCMenuItemFont - [android] - - add CocosDenshion::SimpleAudioEngine implement on android - - the engine can adjust the apk filename automatically - - the engine will not crash at surface recreate, especially at background-to-foreground switching - [wophone] - - switch the game to background, then press power key will not cause the background music play again - - remove the methods of using resouce map in cocos2d-wophone & SimpleAudioEngine. - Only zip resource is recommended and suppported. - - can auto find the installed path of your game, and load zip resource file from the current folder. - No absolute path in code any more. Do this to support installing games to micro-SD card - - - -cocos2d-0.99.4-x-0.7.1 @ Dec.20,2010 - [all platforms] - - add CCKeypadDelegate class, which enable CCLayer to respond "back" key in wophone & android - - Add namespace for CocosDenshion - - fix compile errors when enable CC_XXX_DEBUG_DRAW switchs in ccConfig.h - - fix memory leaks on each platform - - more details: http://www.cocos2d-x.org/versions/show/5 - [android] - - Run through all the test cases of cocos2d, support ndk r4,r5, sdk higher than 2.0. Tested on HTC G2,G3,G6,G7 - - HelloWorld integrate all platforms in one directory now - - WANRNING: this version isn't ready for android games porting yet. The CocosDenshion isn't ported to android, - and this version will crashes when screen orientation changes or the game gack to foreground - look more on this bug http://www.cocos2d-x.org/boards/10/topics/202 - [iphone] - - Add support of loading textureImageData from the ParticleDesign plist file - - Fix more then 3000 complie warnings - - You can try to use this version to develop your iOS game now. It's much more stable than the previous version - [wophone] - - Games can easily read resources from zip file now. This will drastically reduce the memory usage - - Add power management: pause the message loop when cocos2d-x game is switched to background or backlight down - - Multi-touch support - [win32] - - SimpleAudioEngine can play background musci with repeating now - - - -cocos2d-0.99.4-x-0.7.0 @ Nov.29,2010 -* cocos2d-iphone-cpp port ready! include accelerometer & multi-touch -* refactor the directory structure of HelloWorld & tests -* cocos2d-wophone supports accelerometer -* add cocos2d-x wizard for cocos2d-win32 & cocos2d-wophone for VisualStudio2008 -* jump out a message box when load texture failed (win32 & wophone) -* more details: http://www.cocos2d-x.org/versions/show/4 - -cocos2d-0.99.4-wophone-win32-stable-rc1 - http://www.cocos2d-x.org/versions/show/1 - http://www.cocos2d-x.org/versions/show/2 - http://www.cocos2d-x.org/versions/show/3 - - + [Refactor] #2373: C diff --git a/CMakeLists.txt b/CMakeLists.txt index 24910f8884..5f949dbb9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,7 @@ if(WINDOWS) ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32) set(PLATFORM_FOLDER win32) -elseif(MACOSX) +elseif(MACOSX OR APPLE) ADD_DEFINITIONS (-DCC_TARGET_OS_MAC) ADD_DEFINITIONS (-DUSE_FILE32API) set(PLATFORM_FOLDER mac) @@ -164,13 +164,13 @@ include_directories( ) -if(LINUX) +if(LINUX OR APPLE) find_package(GLFW3 REQUIRED) message( STATUS "GLFW3 dirs: ${GLFW3_INCLUDE_DIRS}") include_directories(${GLFW3_INCLUDE_DIRS}) -endif(LINUX) +endif(LINUX OR APPLE) if(NOT MINGW) @@ -214,7 +214,7 @@ if(NOT MINGW) endif() # build for 3rd party libraries -if(LINUX) +if(LINUX OR APPLE) add_subdirectory(external/Box2D) add_subdirectory(external/unzip) add_subdirectory(external/xxhash) diff --git a/build/android-build.py b/build/android-build.py index 3465d37d8c..15f708437e 100755 --- a/build/android-build.py +++ b/build/android-build.py @@ -204,9 +204,9 @@ def build_samples(target,ndk_build_param,android_platform,build_mode): exit(1) if build_mode is None: - build_mode = 'debug' - elif build_mode != 'release': - build_mode = 'debug' + build_mode = 'release' + elif build_mode != 'debug': + build_mode = 'release' app_android_root = '' diff --git a/build/cocos2d-wp8.vc2012.sln b/build/cocos2d-wp8.sln similarity index 52% rename from build/cocos2d-wp8.vc2012.sln rename to build/cocos2d-wp8.sln index 8a9fce10df..04ac85839f 100644 --- a/build/cocos2d-wp8.vc2012.sln +++ b/build/cocos2d-wp8.sln @@ -1,41 +1,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d_wp8.vcxproj", "{B5AF91B3-64EA-44E1-84B0-D759E93758FB}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.wp8\libSpine.vcxproj", "{7D4FC6EB-9497-4804-98F3-3EAEDC896154}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.wp8\libCocosStudio.vcxproj", "{51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.wp8\libCocosBuilder.vcxproj", "{20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.wp8\libExtensions.vcxproj", "{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Box2D", "..\external\Box2D\proj.wp8\Box2D.vcxproj", "{C55734A3-702C-4FA1-B950-32C8E169302F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos\storage\local-storage\proj.wp8\libLocalStorage.vcxproj", "{88982C27-5A7B-40A8-86E7-B3187B44B322}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDenshion", "..\cocos\audio\proj.wp8\CocosDenshion.vcxproj", "{DF125891-EEE9-4466-B903-F828FD272158}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-tests", "cpp-tests", "{671E147E-1DBD-41FC-99B3-2119CA828C8A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-tests", "..\tests\cpp-tests\proj.wp8-xaml\cpp-tests\cpp-tests.csproj", "{60D53713-1675-4466-81DC-D67A031C3D21}" @@ -45,11 +15,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-tests", "..\tests\cpp-t EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-testsComponent", "..\tests\cpp-tests\proj.wp8-xaml\cpp-testsComponent\cpp-testsComponent.vcxproj", "{86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos\network\proj.wp8\libNetwork.vcxproj", "{7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cpp-empty-test", "cpp-empty-test", "{2C306303-EB4F-4058-8CA0-1F28A4FECE39}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj-wp8-xaml\cpp-empty-test\cpp-empty-test.csproj", "{5921FE12-7EF3-4847-8453-42EF286DDBE7}" @@ -59,11 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpp-empty-test", "..\tests\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-testComponent", "..\tests\cpp-empty-test\proj-wp8-xaml\cpp-empty-testComponent\cpp-empty-testComponent.vcxproj", "{F5D665F8-AE19-4F3F-99A7-230A1E8305D2}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\ui\proj.wp8\libGUI.vcxproj", "{08FB23E4-1517-4EDC-B682-DA238CDAA83D}" - ProjectSection(ProjectDependencies) = postProject - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopyTemplateFiles", "..\cocos\platform\wp8-xaml\CopyTemplateFiles.vcxproj", "{271FEE84-9198-4C26-8567-4247C563B0B1}" ProjectSection(ProjectDependencies) = postProject {5921FE12-7EF3-4847-8453-42EF286DDBE7} = {5921FE12-7EF3-4847-8453-42EF286DDBE7} @@ -72,6 +32,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CopyTemplateFiles", "..\coc {F5D665F8-AE19-4F3F-99A7-230A1E8305D2} = {F5D665F8-AE19-4F3F-99A7-230A1E8305D2} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_wp8", "..\cocos\2d\libcocos2d_wp8.vcxproj", "{7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -88,26 +50,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.ActiveCfg = Debug|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.Build.0 = Debug|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x64.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Any CPU.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.ActiveCfg = Release|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.Build.0 = Release|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.Build.0 = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.Build.0 = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x64.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.Build.0 = Release|Win32 {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Any CPU.ActiveCfg = Debug|Win32 {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.ActiveCfg = Debug|ARM {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.Build.0 = Debug|ARM @@ -128,66 +70,6 @@ Global {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x64.ActiveCfg = Release|Win32 {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.ActiveCfg = Release|Win32 {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|ARM.ActiveCfg = Debug|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|ARM.Build.0 = Debug|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Win32.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Win32.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|x64.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|x86.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|x86.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Any CPU.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|ARM.ActiveCfg = Release|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|ARM.Build.0 = Release|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Mixed Platforms.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Win32.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Win32.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|x64.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|x86.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|x86.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|ARM.ActiveCfg = Debug|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|ARM.Build.0 = Debug|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Win32.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Win32.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|x64.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|x86.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|x86.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Any CPU.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|ARM.ActiveCfg = Release|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|ARM.Build.0 = Release|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Mixed Platforms.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Win32.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Win32.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|x64.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|x86.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|x86.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.ActiveCfg = Debug|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.Build.0 = Debug|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Win32.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Win32.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|x64.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|x86.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|x86.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Any CPU.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|ARM.ActiveCfg = Release|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|ARM.Build.0 = Release|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Mixed Platforms.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Win32.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Win32.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|x64.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|x86.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|x86.Build.0 = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|Any CPU.ActiveCfg = Debug|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|ARM.ActiveCfg = Debug|ARM {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|ARM.Build.0 = Debug|ARM @@ -208,46 +90,6 @@ Global {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x64.ActiveCfg = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.ActiveCfg = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.ActiveCfg = Debug|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.Build.0 = Debug|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Win32.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Win32.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|x64.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|x86.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|x86.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Any CPU.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|ARM.ActiveCfg = Release|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|ARM.Build.0 = Release|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Mixed Platforms.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Win32.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Win32.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|x64.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|x86.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|x86.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.ActiveCfg = Debug|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.Build.0 = Debug|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|x64.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Any CPU.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.ActiveCfg = Release|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.Build.0 = Release|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|x64.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.Build.0 = Release|Win32 {60D53713-1675-4466-81DC-D67A031C3D21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60D53713-1675-4466-81DC-D67A031C3D21}.Debug|Any CPU.Build.0 = Debug|Any CPU {60D53713-1675-4466-81DC-D67A031C3D21}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -300,26 +142,6 @@ Global {86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}.Release|x64.ActiveCfg = Release|Win32 {86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}.Release|x86.ActiveCfg = Release|Win32 {86B2C23C-3A6C-4C4E-AB0E-16A8CC1523E9}.Release|x86.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|ARM.ActiveCfg = Debug|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|ARM.Build.0 = Debug|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Win32.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|x64.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|x86.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|x86.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Any CPU.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|ARM.ActiveCfg = Release|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|ARM.Build.0 = Release|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Mixed Platforms.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Win32.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Win32.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|x64.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|x86.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|x86.Build.0 = Release|Win32 {5921FE12-7EF3-4847-8453-42EF286DDBE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5921FE12-7EF3-4847-8453-42EF286DDBE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {5921FE12-7EF3-4847-8453-42EF286DDBE7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -372,26 +194,6 @@ Global {F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x64.ActiveCfg = Release|Win32 {F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x86.ActiveCfg = Release|Win32 {F5D665F8-AE19-4F3F-99A7-230A1E8305D2}.Release|x86.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.ActiveCfg = Debug|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.Build.0 = Debug|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Win32.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Win32.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|x64.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|x86.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|x86.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Any CPU.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|ARM.ActiveCfg = Release|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|ARM.Build.0 = Release|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Mixed Platforms.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Win32.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Win32.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x64.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.Build.0 = Release|Win32 {271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|Any CPU.ActiveCfg = Debug|Win32 {271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.ActiveCfg = Debug|ARM {271FEE84-9198-4C26-8567-4247C563B0B1}.Debug|ARM.Build.0 = Debug|ARM @@ -412,6 +214,26 @@ Global {271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x64.ActiveCfg = Release|Win32 {271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.ActiveCfg = Release|Win32 {271FEE84-9198-4C26-8567-4247C563B0B1}.Release|x86.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|ARM.ActiveCfg = Debug|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|ARM.Build.0 = Debug|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Win32.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Win32.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|x64.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|x86.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|x86.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Any CPU.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|ARM.ActiveCfg = Release|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|ARM.Build.0 = Release|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Win32.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Win32.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|x64.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|x86.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 93107220a7..5c5fae4844 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -417,108 +417,6 @@ 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8C18C72017004AD434 /* TextFieldReader.h */; }; 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50FCEB8E18C72017004AD434 /* TextReader.cpp */; }; 15AE19BB19AAD39700C27E9E /* TextReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 50FCEB8F18C72017004AD434 /* TextReader.h */; }; - 15AE19BC19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */; }; - 15AE19BD19AAD3A700C27E9E /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795DA18628689005EC8E1 /* SkeletonBounds.h */; }; - 15AE19BE19AAD3A700C27E9E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D51862867D005EC8E1 /* Event.cpp */; }; - 15AE19BF19AAD3A700C27E9E /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D61862867D005EC8E1 /* Event.h */; }; - 15AE19C019AAD3A700C27E9E /* EventData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D71862867D005EC8E1 /* EventData.cpp */; }; - 15AE19C119AAD3A700C27E9E /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D81862867D005EC8E1 /* EventData.h */; }; - 15AE19C219AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */; }; - 15AE19C319AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D418628672005EC8E1 /* BoundingBoxAttachment.h */; }; - 15AE19C419AAD3A700C27E9E /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D7E180E26E600808F54 /* Animation.cpp */; }; - 15AE19C519AAD3A700C27E9E /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D7F180E26E600808F54 /* Animation.h */; }; - 15AE19C619AAD3A700C27E9E /* AnimationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D80180E26E600808F54 /* AnimationState.cpp */; }; - 15AE19C719AAD3A700C27E9E /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D81180E26E600808F54 /* AnimationState.h */; }; - 15AE19C819AAD3A700C27E9E /* AnimationStateData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D82180E26E600808F54 /* AnimationStateData.cpp */; }; - 15AE19C919AAD3A700C27E9E /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D83180E26E600808F54 /* AnimationStateData.h */; }; - 15AE19CA19AAD3A700C27E9E /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D84180E26E600808F54 /* Atlas.cpp */; }; - 15AE19CB19AAD3A700C27E9E /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D85180E26E600808F54 /* Atlas.h */; }; - 15AE19CC19AAD3A700C27E9E /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D86180E26E600808F54 /* AtlasAttachmentLoader.cpp */; }; - 15AE19CD19AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D87180E26E600808F54 /* AtlasAttachmentLoader.h */; }; - 15AE19CE19AAD3A700C27E9E /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D88180E26E600808F54 /* Attachment.cpp */; }; - 15AE19CF19AAD3A700C27E9E /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D89180E26E600808F54 /* Attachment.h */; }; - 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8A180E26E600808F54 /* AttachmentLoader.cpp */; }; - 15AE19D119AAD3A700C27E9E /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8B180E26E600808F54 /* AttachmentLoader.h */; }; - 15AE19D219AAD3A700C27E9E /* Bone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8C180E26E600808F54 /* Bone.cpp */; }; - 15AE19D319AAD3A700C27E9E /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8D180E26E600808F54 /* Bone.h */; }; - 15AE19D419AAD3A700C27E9E /* BoneData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8E180E26E600808F54 /* BoneData.cpp */; }; - 15AE19D519AAD3A700C27E9E /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8F180E26E600808F54 /* BoneData.h */; }; - 15AE19D619AAD3A700C27E9E /* CCSkeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D90180E26E600808F54 /* CCSkeleton.cpp */; }; - 15AE19D719AAD3A700C27E9E /* CCSkeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D91180E26E600808F54 /* CCSkeleton.h */; }; - 15AE19D819AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D92180E26E600808F54 /* CCSkeletonAnimation.cpp */; }; - 15AE19D919AAD3A700C27E9E /* CCSkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D93180E26E600808F54 /* CCSkeletonAnimation.h */; }; - 15AE19DA19AAD3A700C27E9E /* extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D94180E26E600808F54 /* extension.cpp */; }; - 15AE19DB19AAD3A700C27E9E /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D95180E26E600808F54 /* extension.h */; }; - 15AE19DC19AAD3A700C27E9E /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D96180E26E600808F54 /* Json.cpp */; }; - 15AE19DD19AAD3A700C27E9E /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D97180E26E600808F54 /* Json.h */; }; - 15AE19DE19AAD3A700C27E9E /* RegionAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D98180E26E600808F54 /* RegionAttachment.cpp */; }; - 15AE19DF19AAD3A700C27E9E /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D99180E26E600808F54 /* RegionAttachment.h */; }; - 15AE19E019AAD3A700C27E9E /* Skeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9A180E26E600808F54 /* Skeleton.cpp */; }; - 15AE19E119AAD3A700C27E9E /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9B180E26E600808F54 /* Skeleton.h */; }; - 15AE19E219AAD3A700C27E9E /* SkeletonData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9C180E26E600808F54 /* SkeletonData.cpp */; }; - 15AE19E319AAD3A700C27E9E /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9D180E26E600808F54 /* SkeletonData.h */; }; - 15AE19E419AAD3A700C27E9E /* SkeletonJson.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9E180E26E600808F54 /* SkeletonJson.cpp */; }; - 15AE19E519AAD3A700C27E9E /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9F180E26E600808F54 /* SkeletonJson.h */; }; - 15AE19E619AAD3A700C27E9E /* Skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA0180E26E600808F54 /* Skin.cpp */; }; - 15AE19E719AAD3A700C27E9E /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA1180E26E600808F54 /* Skin.h */; }; - 15AE19E819AAD3A700C27E9E /* Slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA2180E26E600808F54 /* Slot.cpp */; }; - 15AE19E919AAD3A700C27E9E /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA3180E26E600808F54 /* Slot.h */; }; - 15AE19EA19AAD3A700C27E9E /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA4180E26E600808F54 /* SlotData.cpp */; }; - 15AE19EB19AAD3A700C27E9E /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA5180E26E600808F54 /* SlotData.h */; }; - 15AE19EC19AAD3A700C27E9E /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA6180E26E600808F54 /* spine-cocos2dx.cpp */; }; - 15AE19ED19AAD3A700C27E9E /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA7180E26E600808F54 /* spine-cocos2dx.h */; }; - 15AE19EE19AAD3A700C27E9E /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA8180E26E600808F54 /* spine.h */; }; - 15AE19EF19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */; }; - 15AE19F019AAD3A700C27E9E /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795DA18628689005EC8E1 /* SkeletonBounds.h */; }; - 15AE19F119AAD3A700C27E9E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D51862867D005EC8E1 /* Event.cpp */; }; - 15AE19F219AAD3A700C27E9E /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D61862867D005EC8E1 /* Event.h */; }; - 15AE19F319AAD3A700C27E9E /* EventData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D71862867D005EC8E1 /* EventData.cpp */; }; - 15AE19F419AAD3A700C27E9E /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D81862867D005EC8E1 /* EventData.h */; }; - 15AE19F519AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */; }; - 15AE19F619AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC795D418628672005EC8E1 /* BoundingBoxAttachment.h */; }; - 15AE19F719AAD3A700C27E9E /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D7E180E26E600808F54 /* Animation.cpp */; }; - 15AE19F819AAD3A700C27E9E /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D7F180E26E600808F54 /* Animation.h */; }; - 15AE19F919AAD3A700C27E9E /* AnimationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D80180E26E600808F54 /* AnimationState.cpp */; }; - 15AE19FA19AAD3A700C27E9E /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D81180E26E600808F54 /* AnimationState.h */; }; - 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D82180E26E600808F54 /* AnimationStateData.cpp */; }; - 15AE19FC19AAD3A700C27E9E /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D83180E26E600808F54 /* AnimationStateData.h */; }; - 15AE19FD19AAD3A700C27E9E /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D84180E26E600808F54 /* Atlas.cpp */; }; - 15AE19FE19AAD3A700C27E9E /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D85180E26E600808F54 /* Atlas.h */; }; - 15AE19FF19AAD3A700C27E9E /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D86180E26E600808F54 /* AtlasAttachmentLoader.cpp */; }; - 15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D87180E26E600808F54 /* AtlasAttachmentLoader.h */; }; - 15AE1A0119AAD3A700C27E9E /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D88180E26E600808F54 /* Attachment.cpp */; }; - 15AE1A0219AAD3A700C27E9E /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D89180E26E600808F54 /* Attachment.h */; }; - 15AE1A0319AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8A180E26E600808F54 /* AttachmentLoader.cpp */; }; - 15AE1A0419AAD3A700C27E9E /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8B180E26E600808F54 /* AttachmentLoader.h */; }; - 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8C180E26E600808F54 /* Bone.cpp */; }; - 15AE1A0619AAD3A700C27E9E /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8D180E26E600808F54 /* Bone.h */; }; - 15AE1A0719AAD3A700C27E9E /* BoneData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D8E180E26E600808F54 /* BoneData.cpp */; }; - 15AE1A0819AAD3A700C27E9E /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D8F180E26E600808F54 /* BoneData.h */; }; - 15AE1A0919AAD3A700C27E9E /* CCSkeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D90180E26E600808F54 /* CCSkeleton.cpp */; }; - 15AE1A0A19AAD3A700C27E9E /* CCSkeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D91180E26E600808F54 /* CCSkeleton.h */; }; - 15AE1A0B19AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D92180E26E600808F54 /* CCSkeletonAnimation.cpp */; }; - 15AE1A0C19AAD3A700C27E9E /* CCSkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D93180E26E600808F54 /* CCSkeletonAnimation.h */; }; - 15AE1A0D19AAD3A700C27E9E /* extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D94180E26E600808F54 /* extension.cpp */; }; - 15AE1A0E19AAD3A700C27E9E /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D95180E26E600808F54 /* extension.h */; }; - 15AE1A0F19AAD3A700C27E9E /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D96180E26E600808F54 /* Json.cpp */; }; - 15AE1A1019AAD3A700C27E9E /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D97180E26E600808F54 /* Json.h */; }; - 15AE1A1119AAD3A700C27E9E /* RegionAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D98180E26E600808F54 /* RegionAttachment.cpp */; }; - 15AE1A1219AAD3A700C27E9E /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D99180E26E600808F54 /* RegionAttachment.h */; }; - 15AE1A1319AAD3A700C27E9E /* Skeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9A180E26E600808F54 /* Skeleton.cpp */; }; - 15AE1A1419AAD3A700C27E9E /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9B180E26E600808F54 /* Skeleton.h */; }; - 15AE1A1519AAD3A700C27E9E /* SkeletonData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9C180E26E600808F54 /* SkeletonData.cpp */; }; - 15AE1A1619AAD3A700C27E9E /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9D180E26E600808F54 /* SkeletonData.h */; }; - 15AE1A1719AAD3A700C27E9E /* SkeletonJson.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71D9E180E26E600808F54 /* SkeletonJson.cpp */; }; - 15AE1A1819AAD3A700C27E9E /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71D9F180E26E600808F54 /* SkeletonJson.h */; }; - 15AE1A1919AAD3A700C27E9E /* Skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA0180E26E600808F54 /* Skin.cpp */; }; - 15AE1A1A19AAD3A700C27E9E /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA1180E26E600808F54 /* Skin.h */; }; - 15AE1A1B19AAD3A700C27E9E /* Slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA2180E26E600808F54 /* Slot.cpp */; }; - 15AE1A1C19AAD3A700C27E9E /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA3180E26E600808F54 /* Slot.h */; }; - 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA4180E26E600808F54 /* SlotData.cpp */; }; - 15AE1A1E19AAD3A700C27E9E /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA5180E26E600808F54 /* SlotData.h */; }; - 15AE1A1F19AAD3A700C27E9E /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA6180E26E600808F54 /* spine-cocos2dx.cpp */; }; - 15AE1A2019AAD3A700C27E9E /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA7180E26E600808F54 /* spine-cocos2dx.h */; }; - 15AE1A2119AAD3A700C27E9E /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71DA8180E26E600808F54 /* spine.h */; }; 15AE1A2219AAD3D500C27E9E /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168B41807AF9C005B8026 /* Box2D.h */; }; 15AE1A2319AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168B61807AF9C005B8026 /* b2BroadPhase.cpp */; }; 15AE1A2419AAD3D500C27E9E /* b2BroadPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168B71807AF9C005B8026 /* b2BroadPhase.h */; }; @@ -898,6 +796,26 @@ 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; 15AE1C1919AAE30900C27E9E /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5387180E35AC000584C8 /* libwebsockets.a */; }; 15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5384180E35A3000584C8 /* libwebsockets.a */; }; + 15B3707819EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */; }; + 15B3707919EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */; }; + 15B3707A19EE414C00ABE682 /* AssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */; }; + 15B3707B19EE414C00ABE682 /* AssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */; }; + 15B3707C19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */; }; + 15B3707D19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */; }; + 15B3707E19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */; }; + 15B3707F19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */; }; + 15B3708019EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */; }; + 15B3708119EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */; }; + 15B3708219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */; }; + 15B3708319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */; }; + 15B3708419EE414C00ABE682 /* Downloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707419EE414C00ABE682 /* Downloader.cpp */; }; + 15B3708519EE414C00ABE682 /* Downloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707419EE414C00ABE682 /* Downloader.cpp */; }; + 15B3708619EE414C00ABE682 /* Downloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707519EE414C00ABE682 /* Downloader.h */; }; + 15B3708719EE414C00ABE682 /* Downloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707519EE414C00ABE682 /* Downloader.h */; }; + 15B3708819EE414C00ABE682 /* Manifest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707619EE414C00ABE682 /* Manifest.cpp */; }; + 15B3708919EE414C00ABE682 /* Manifest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3707619EE414C00ABE682 /* Manifest.cpp */; }; + 15B3708A19EE414C00ABE682 /* Manifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707719EE414C00ABE682 /* Manifest.h */; }; + 15B3708B19EE414C00ABE682 /* Manifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B3707719EE414C00ABE682 /* Manifest.h */; }; 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; }; 15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; }; 15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */; }; @@ -1882,6 +1800,128 @@ B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; }; B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; + B29A7DC719EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8A19EE1B7700872B35 /* SkeletonRenderer.cpp */; }; + B29A7DC819EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8A19EE1B7700872B35 /* SkeletonRenderer.cpp */; }; + B29A7DC919EE1B7700872B35 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8B19EE1B7700872B35 /* SlotData.c */; }; + B29A7DCA19EE1B7700872B35 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8B19EE1B7700872B35 /* SlotData.c */; }; + B29A7DCB19EE1B7700872B35 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8C19EE1B7700872B35 /* Skeleton.c */; }; + B29A7DCC19EE1B7700872B35 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8C19EE1B7700872B35 /* Skeleton.c */; }; + B29A7DCD19EE1B7700872B35 /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D8D19EE1B7700872B35 /* Slot.h */; }; + B29A7DCE19EE1B7700872B35 /* Slot.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D8D19EE1B7700872B35 /* Slot.h */; }; + B29A7DCF19EE1B7700872B35 /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D8E19EE1B7700872B35 /* RegionAttachment.h */; }; + B29A7DD019EE1B7700872B35 /* RegionAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D8E19EE1B7700872B35 /* RegionAttachment.h */; }; + B29A7DD119EE1B7700872B35 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8F19EE1B7700872B35 /* Skin.c */; }; + B29A7DD219EE1B7700872B35 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D8F19EE1B7700872B35 /* Skin.c */; }; + B29A7DD319EE1B7700872B35 /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9019EE1B7700872B35 /* Skin.h */; }; + B29A7DD419EE1B7700872B35 /* Skin.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9019EE1B7700872B35 /* Skin.h */; }; + B29A7DD519EE1B7700872B35 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9119EE1B7700872B35 /* RegionAttachment.c */; }; + B29A7DD619EE1B7700872B35 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9119EE1B7700872B35 /* RegionAttachment.c */; }; + B29A7DD719EE1B7700872B35 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9219EE1B7700872B35 /* SkeletonData.c */; }; + B29A7DD819EE1B7700872B35 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9219EE1B7700872B35 /* SkeletonData.c */; }; + B29A7DD919EE1B7700872B35 /* SkeletonRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9319EE1B7700872B35 /* SkeletonRenderer.h */; }; + B29A7DDA19EE1B7700872B35 /* SkeletonRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9319EE1B7700872B35 /* SkeletonRenderer.h */; }; + B29A7DDB19EE1B7700872B35 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9419EE1B7700872B35 /* Event.c */; }; + B29A7DDC19EE1B7700872B35 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9419EE1B7700872B35 /* Event.c */; }; + B29A7DDD19EE1B7700872B35 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9519EE1B7700872B35 /* BoneData.c */; }; + B29A7DDE19EE1B7700872B35 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9519EE1B7700872B35 /* BoneData.c */; }; + B29A7DDF19EE1B7700872B35 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9619EE1B7700872B35 /* IkConstraintData.c */; }; + B29A7DE019EE1B7700872B35 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9619EE1B7700872B35 /* IkConstraintData.c */; }; + B29A7DE119EE1B7700872B35 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9719EE1B7700872B35 /* MeshAttachment.c */; }; + B29A7DE219EE1B7700872B35 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9719EE1B7700872B35 /* MeshAttachment.c */; }; + B29A7DE319EE1B7700872B35 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9819EE1B7700872B35 /* SkeletonBounds.c */; }; + B29A7DE419EE1B7700872B35 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9819EE1B7700872B35 /* SkeletonBounds.c */; }; + B29A7DE519EE1B7700872B35 /* SkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9919EE1B7700872B35 /* SkeletonAnimation.h */; }; + B29A7DE619EE1B7700872B35 /* SkeletonAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9919EE1B7700872B35 /* SkeletonAnimation.h */; }; + B29A7DE719EE1B7700872B35 /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9A19EE1B7700872B35 /* spine.h */; }; + B29A7DE819EE1B7700872B35 /* spine.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9A19EE1B7700872B35 /* spine.h */; }; + B29A7DE919EE1B7700872B35 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9B19EE1B7700872B35 /* EventData.c */; }; + B29A7DEA19EE1B7700872B35 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9B19EE1B7700872B35 /* EventData.c */; }; + B29A7DEB19EE1B7700872B35 /* MeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9C19EE1B7700872B35 /* MeshAttachment.h */; }; + B29A7DEC19EE1B7700872B35 /* MeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9C19EE1B7700872B35 /* MeshAttachment.h */; }; + B29A7DED19EE1B7700872B35 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9D19EE1B7700872B35 /* IkConstraint.c */; }; + B29A7DEE19EE1B7700872B35 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9D19EE1B7700872B35 /* IkConstraint.c */; }; + B29A7DEF19EE1B7700872B35 /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9E19EE1B7700872B35 /* SkeletonBounds.h */; }; + B29A7DF019EE1B7700872B35 /* SkeletonBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7D9E19EE1B7700872B35 /* SkeletonBounds.h */; }; + B29A7DF119EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9F19EE1B7700872B35 /* AtlasAttachmentLoader.c */; }; + B29A7DF219EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7D9F19EE1B7700872B35 /* AtlasAttachmentLoader.c */; }; + B29A7DF319EE1B7700872B35 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA019EE1B7700872B35 /* AttachmentLoader.c */; }; + B29A7DF419EE1B7700872B35 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA019EE1B7700872B35 /* AttachmentLoader.c */; }; + B29A7DF519EE1B7700872B35 /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA119EE1B7700872B35 /* Skeleton.h */; }; + B29A7DF619EE1B7700872B35 /* Skeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA119EE1B7700872B35 /* Skeleton.h */; }; + B29A7DF719EE1B7700872B35 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA219EE1B7700872B35 /* Attachment.h */; }; + B29A7DF819EE1B7700872B35 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA219EE1B7700872B35 /* Attachment.h */; }; + B29A7DF919EE1B7700872B35 /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA319EE1B7700872B35 /* Json.h */; }; + B29A7DFA19EE1B7700872B35 /* Json.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA319EE1B7700872B35 /* Json.h */; }; + B29A7DFB19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA419EE1B7700872B35 /* spine-cocos2dx.cpp */; }; + B29A7DFC19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA419EE1B7700872B35 /* spine-cocos2dx.cpp */; }; + B29A7DFD19EE1B7700872B35 /* IkConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA519EE1B7700872B35 /* IkConstraintData.h */; }; + B29A7DFE19EE1B7700872B35 /* IkConstraintData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA519EE1B7700872B35 /* IkConstraintData.h */; }; + B29A7DFF19EE1B7700872B35 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA619EE1B7700872B35 /* Json.c */; }; + B29A7E0019EE1B7700872B35 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA619EE1B7700872B35 /* Json.c */; }; + B29A7E0119EE1B7700872B35 /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA719EE1B7700872B35 /* extension.h */; }; + B29A7E0219EE1B7700872B35 /* extension.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA719EE1B7700872B35 /* extension.h */; }; + B29A7E0319EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA819EE1B7700872B35 /* BoundingBoxAttachment.h */; }; + B29A7E0419EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DA819EE1B7700872B35 /* BoundingBoxAttachment.h */; }; + B29A7E0519EE1B7700872B35 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA919EE1B7700872B35 /* extension.c */; }; + B29A7E0619EE1B7700872B35 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DA919EE1B7700872B35 /* extension.c */; }; + B29A7E0719EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DAA19EE1B7700872B35 /* SkinnedMeshAttachment.c */; }; + B29A7E0819EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DAA19EE1B7700872B35 /* SkinnedMeshAttachment.c */; }; + B29A7E0919EE1B7700872B35 /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAB19EE1B7700872B35 /* AttachmentLoader.h */; }; + B29A7E0A19EE1B7700872B35 /* AttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAB19EE1B7700872B35 /* AttachmentLoader.h */; }; + B29A7E0B19EE1B7700872B35 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DAC19EE1B7700872B35 /* Atlas.c */; }; + B29A7E0C19EE1B7700872B35 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DAC19EE1B7700872B35 /* Atlas.c */; }; + B29A7E0D19EE1B7700872B35 /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAD19EE1B7700872B35 /* Bone.h */; }; + B29A7E0E19EE1B7700872B35 /* Bone.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAD19EE1B7700872B35 /* Bone.h */; }; + B29A7E0F19EE1B7700872B35 /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAE19EE1B7700872B35 /* SkeletonJson.h */; }; + B29A7E1019EE1B7700872B35 /* SkeletonJson.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAE19EE1B7700872B35 /* SkeletonJson.h */; }; + B29A7E1119EE1B7700872B35 /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAF19EE1B7700872B35 /* EventData.h */; }; + B29A7E1219EE1B7700872B35 /* EventData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DAF19EE1B7700872B35 /* EventData.h */; }; + B29A7E1319EE1B7700872B35 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB019EE1B7700872B35 /* Bone.c */; }; + B29A7E1419EE1B7700872B35 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB019EE1B7700872B35 /* Bone.c */; }; + B29A7E1519EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB119EE1B7700872B35 /* BoundingBoxAttachment.c */; }; + B29A7E1619EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB119EE1B7700872B35 /* BoundingBoxAttachment.c */; }; + B29A7E1719EE1B7700872B35 /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB219EE1B7700872B35 /* Atlas.h */; }; + B29A7E1819EE1B7700872B35 /* Atlas.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB219EE1B7700872B35 /* Atlas.h */; }; + B29A7E1919EE1B7700872B35 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB319EE1B7700872B35 /* Event.h */; }; + B29A7E1A19EE1B7700872B35 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB319EE1B7700872B35 /* Event.h */; }; + B29A7E1B19EE1B7700872B35 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB419EE1B7700872B35 /* SkeletonJson.c */; }; + B29A7E1C19EE1B7700872B35 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB419EE1B7700872B35 /* SkeletonJson.c */; }; + B29A7E1D19EE1B7700872B35 /* PolygonBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB519EE1B7700872B35 /* PolygonBatch.h */; }; + B29A7E1E19EE1B7700872B35 /* PolygonBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB519EE1B7700872B35 /* PolygonBatch.h */; }; + B29A7E1F19EE1B7700872B35 /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB619EE1B7700872B35 /* BoneData.h */; }; + B29A7E2019EE1B7700872B35 /* BoneData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB619EE1B7700872B35 /* BoneData.h */; }; + B29A7E2119EE1B7700872B35 /* PolygonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB719EE1B7700872B35 /* PolygonBatch.cpp */; }; + B29A7E2219EE1B7700872B35 /* PolygonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB719EE1B7700872B35 /* PolygonBatch.cpp */; }; + B29A7E2319EE1B7700872B35 /* IkConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB819EE1B7700872B35 /* IkConstraint.h */; }; + B29A7E2419EE1B7700872B35 /* IkConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DB819EE1B7700872B35 /* IkConstraint.h */; }; + B29A7E2519EE1B7700872B35 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB919EE1B7700872B35 /* Attachment.c */; }; + B29A7E2619EE1B7700872B35 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DB919EE1B7700872B35 /* Attachment.c */; }; + B29A7E2719EE1B7700872B35 /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBA19EE1B7700872B35 /* spine-cocos2dx.h */; }; + B29A7E2819EE1B7700872B35 /* spine-cocos2dx.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBA19EE1B7700872B35 /* spine-cocos2dx.h */; }; + B29A7E2919EE1B7700872B35 /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBB19EE1B7700872B35 /* SkeletonData.h */; }; + B29A7E2A19EE1B7700872B35 /* SkeletonData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBB19EE1B7700872B35 /* SkeletonData.h */; }; + B29A7E2B19EE1B7700872B35 /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBC19EE1B7700872B35 /* AtlasAttachmentLoader.h */; }; + B29A7E2C19EE1B7700872B35 /* AtlasAttachmentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBC19EE1B7700872B35 /* AtlasAttachmentLoader.h */; }; + B29A7E2D19EE1B7700872B35 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DBD19EE1B7700872B35 /* Slot.c */; }; + B29A7E2E19EE1B7700872B35 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DBD19EE1B7700872B35 /* Slot.c */; }; + B29A7E2F19EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DBE19EE1B7700872B35 /* SkeletonAnimation.cpp */; }; + B29A7E3019EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DBE19EE1B7700872B35 /* SkeletonAnimation.cpp */; }; + B29A7E3119EE1B7700872B35 /* SkinnedMeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBF19EE1B7700872B35 /* SkinnedMeshAttachment.h */; }; + B29A7E3219EE1B7700872B35 /* SkinnedMeshAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DBF19EE1B7700872B35 /* SkinnedMeshAttachment.h */; }; + B29A7E3319EE1B7700872B35 /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC019EE1B7700872B35 /* SlotData.h */; }; + B29A7E3419EE1B7700872B35 /* SlotData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC019EE1B7700872B35 /* SlotData.h */; }; + B29A7E3519EE1B7700872B35 /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC119EE1B7700872B35 /* AnimationStateData.h */; }; + B29A7E3619EE1B7700872B35 /* AnimationStateData.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC119EE1B7700872B35 /* AnimationStateData.h */; }; + B29A7E3719EE1B7700872B35 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC219EE1B7700872B35 /* AnimationStateData.c */; }; + B29A7E3819EE1B7700872B35 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC219EE1B7700872B35 /* AnimationStateData.c */; }; + B29A7E3919EE1B7700872B35 /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC319EE1B7700872B35 /* Animation.h */; }; + B29A7E3A19EE1B7700872B35 /* Animation.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC319EE1B7700872B35 /* Animation.h */; }; + B29A7E3B19EE1B7700872B35 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC419EE1B7700872B35 /* Animation.c */; }; + B29A7E3C19EE1B7700872B35 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC419EE1B7700872B35 /* Animation.c */; }; + B29A7E3D19EE1B7700872B35 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC519EE1B7700872B35 /* AnimationState.c */; }; + B29A7E3E19EE1B7700872B35 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = B29A7DC519EE1B7700872B35 /* AnimationState.c */; }; + B29A7E3F19EE1B7700872B35 /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC619EE1B7700872B35 /* AnimationState.h */; }; + B29A7E4019EE1B7700872B35 /* AnimationState.h in Headers */ = {isa = PBXBuildFile; fileRef = B29A7DC619EE1B7700872B35 /* AnimationState.h */; }; B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */; }; B37510711823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B37510451823AC7B00B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp */; }; B37510721823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B37510461823AC7B00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h */; }; @@ -1975,6 +2015,16 @@ 15AE180319AAD2F700C27E9E /* CCSprite3DMaterial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSprite3DMaterial.cpp; sourceTree = ""; }; 15AE180419AAD2F700C27E9E /* CCSprite3DMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSprite3DMaterial.h; sourceTree = ""; }; 15AE180519AAD2F700C27E9E /* cocos3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocos3d.h; sourceTree = ""; }; + 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsManagerEx.cpp; sourceTree = ""; }; + 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsManagerEx.h; sourceTree = ""; }; + 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEventAssetsManagerEx.cpp; sourceTree = ""; }; + 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEventAssetsManagerEx.h; sourceTree = ""; }; + 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEventListenerAssetsManagerEx.cpp; sourceTree = ""; }; + 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEventListenerAssetsManagerEx.h; sourceTree = ""; }; + 15B3707419EE414C00ABE682 /* Downloader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Downloader.cpp; sourceTree = ""; }; + 15B3707519EE414C00ABE682 /* Downloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Downloader.h; sourceTree = ""; }; + 15B3707619EE414C00ABE682 /* Manifest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Manifest.cpp; sourceTree = ""; }; + 15B3707719EE414C00ABE682 /* Manifest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Manifest.h; sourceTree = ""; }; 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCProtectedNode.cpp; sourceTree = ""; }; 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCProtectedNode.h; sourceTree = ""; }; 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = ""; }; @@ -2266,49 +2316,6 @@ 1AD71D2A180E26E600808F54 /* CCSpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteLoader.cpp; sourceTree = ""; }; 1AD71D2B180E26E600808F54 /* CCSpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteLoader.h; sourceTree = ""; }; 1AD71D2C180E26E600808F54 /* CocosBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosBuilder.h; sourceTree = ""; }; - 1AD71D7E180E26E600808F54 /* Animation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Animation.cpp; sourceTree = ""; }; - 1AD71D7F180E26E600808F54 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Animation.h; sourceTree = ""; }; - 1AD71D80180E26E600808F54 /* AnimationState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationState.cpp; sourceTree = ""; }; - 1AD71D81180E26E600808F54 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationState.h; sourceTree = ""; }; - 1AD71D82180E26E600808F54 /* AnimationStateData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationStateData.cpp; sourceTree = ""; }; - 1AD71D83180E26E600808F54 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationStateData.h; sourceTree = ""; }; - 1AD71D84180E26E600808F54 /* Atlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Atlas.cpp; sourceTree = ""; }; - 1AD71D85180E26E600808F54 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 1AD71D86180E26E600808F54 /* AtlasAttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtlasAttachmentLoader.cpp; sourceTree = ""; }; - 1AD71D87180E26E600808F54 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasAttachmentLoader.h; sourceTree = ""; }; - 1AD71D88180E26E600808F54 /* Attachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attachment.cpp; sourceTree = ""; }; - 1AD71D89180E26E600808F54 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attachment.h; sourceTree = ""; }; - 1AD71D8A180E26E600808F54 /* AttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttachmentLoader.cpp; sourceTree = ""; }; - 1AD71D8B180E26E600808F54 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentLoader.h; sourceTree = ""; }; - 1AD71D8C180E26E600808F54 /* Bone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Bone.cpp; sourceTree = ""; }; - 1AD71D8D180E26E600808F54 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bone.h; sourceTree = ""; }; - 1AD71D8E180E26E600808F54 /* BoneData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoneData.cpp; sourceTree = ""; }; - 1AD71D8F180E26E600808F54 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoneData.h; sourceTree = ""; }; - 1AD71D90180E26E600808F54 /* CCSkeleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCSkeleton.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 1AD71D91180E26E600808F54 /* CCSkeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkeleton.h; sourceTree = ""; }; - 1AD71D92180E26E600808F54 /* CCSkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSkeletonAnimation.cpp; sourceTree = ""; }; - 1AD71D93180E26E600808F54 /* CCSkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSkeletonAnimation.h; sourceTree = ""; }; - 1AD71D94180E26E600808F54 /* extension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = extension.cpp; sourceTree = ""; }; - 1AD71D95180E26E600808F54 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extension.h; sourceTree = ""; }; - 1AD71D96180E26E600808F54 /* Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Json.cpp; sourceTree = ""; }; - 1AD71D97180E26E600808F54 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Json.h; sourceTree = ""; }; - 1AD71D98180E26E600808F54 /* RegionAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegionAttachment.cpp; sourceTree = ""; }; - 1AD71D99180E26E600808F54 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegionAttachment.h; sourceTree = ""; }; - 1AD71D9A180E26E600808F54 /* Skeleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Skeleton.cpp; sourceTree = ""; }; - 1AD71D9B180E26E600808F54 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skeleton.h; sourceTree = ""; }; - 1AD71D9C180E26E600808F54 /* SkeletonData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonData.cpp; sourceTree = ""; }; - 1AD71D9D180E26E600808F54 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonData.h; sourceTree = ""; }; - 1AD71D9E180E26E600808F54 /* SkeletonJson.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonJson.cpp; sourceTree = ""; }; - 1AD71D9F180E26E600808F54 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonJson.h; sourceTree = ""; }; - 1AD71DA0180E26E600808F54 /* Skin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Skin.cpp; sourceTree = ""; }; - 1AD71DA1180E26E600808F54 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skin.h; sourceTree = ""; }; - 1AD71DA2180E26E600808F54 /* Slot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Slot.cpp; sourceTree = ""; }; - 1AD71DA3180E26E600808F54 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slot.h; sourceTree = ""; }; - 1AD71DA4180E26E600808F54 /* SlotData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlotData.cpp; sourceTree = ""; }; - 1AD71DA5180E26E600808F54 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotData.h; sourceTree = ""; }; - 1AD71DA6180E26E600808F54 /* spine-cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "spine-cocos2dx.cpp"; sourceTree = ""; }; - 1AD71DA7180E26E600808F54 /* spine-cocos2dx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "spine-cocos2dx.h"; sourceTree = ""; }; - 1AD71DA8180E26E600808F54 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spine.h; sourceTree = ""; }; 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsDebugNode.cpp; sourceTree = ""; }; 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; @@ -2382,14 +2389,6 @@ 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutManager.h; sourceTree = ""; }; 29E99D1C1957BA7000046604 /* CocoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoLoader.cpp; sourceTree = ""; }; 29E99D1D1957BA7000046604 /* CocoLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoLoader.h; sourceTree = ""; }; - 2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoundingBoxAttachment.cpp; sourceTree = ""; }; - 2AC795D418628672005EC8E1 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundingBoxAttachment.h; sourceTree = ""; }; - 2AC795D51862867D005EC8E1 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = ""; }; - 2AC795D61862867D005EC8E1 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; - 2AC795D71862867D005EC8E1 /* EventData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventData.cpp; sourceTree = ""; }; - 2AC795D81862867D005EC8E1 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventData.h; sourceTree = ""; }; - 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonBounds.cpp; sourceTree = ""; }; - 2AC795DA18628689005EC8E1 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBounds.h; sourceTree = ""; }; 373B910718787C0B00198F86 /* CCComBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCComBase.h; sourceTree = ""; }; 37936A341869B76800E974DD /* document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = document.h; sourceTree = ""; }; 37936A351869B76800E974DD /* filestream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filestream.h; sourceTree = ""; }; @@ -2936,6 +2935,67 @@ B29594B11926D5D9003EEF37 /* ccShader_3D_PositionTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionTex.vert; sourceTree = ""; }; B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshCommand.cpp; sourceTree = ""; }; B29594B31926D5EC003EEF37 /* CCMeshCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMeshCommand.h; sourceTree = ""; }; + B29A7D8A19EE1B7700872B35 /* SkeletonRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRenderer.cpp; sourceTree = ""; }; + B29A7D8B19EE1B7700872B35 /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SlotData.c; sourceTree = ""; }; + B29A7D8C19EE1B7700872B35 /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Skeleton.c; sourceTree = ""; }; + B29A7D8D19EE1B7700872B35 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slot.h; sourceTree = ""; }; + B29A7D8E19EE1B7700872B35 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegionAttachment.h; sourceTree = ""; }; + B29A7D8F19EE1B7700872B35 /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Skin.c; sourceTree = ""; }; + B29A7D9019EE1B7700872B35 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skin.h; sourceTree = ""; }; + B29A7D9119EE1B7700872B35 /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RegionAttachment.c; sourceTree = ""; }; + B29A7D9219EE1B7700872B35 /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonData.c; sourceTree = ""; }; + B29A7D9319EE1B7700872B35 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonRenderer.h; sourceTree = ""; }; + B29A7D9419EE1B7700872B35 /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Event.c; sourceTree = ""; }; + B29A7D9519EE1B7700872B35 /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BoneData.c; sourceTree = ""; }; + B29A7D9619EE1B7700872B35 /* IkConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IkConstraintData.c; sourceTree = ""; }; + B29A7D9719EE1B7700872B35 /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MeshAttachment.c; sourceTree = ""; }; + B29A7D9819EE1B7700872B35 /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonBounds.c; sourceTree = ""; }; + B29A7D9919EE1B7700872B35 /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonAnimation.h; sourceTree = ""; }; + B29A7D9A19EE1B7700872B35 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spine.h; sourceTree = ""; }; + B29A7D9B19EE1B7700872B35 /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = EventData.c; sourceTree = ""; }; + B29A7D9C19EE1B7700872B35 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeshAttachment.h; sourceTree = ""; }; + B29A7D9D19EE1B7700872B35 /* IkConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IkConstraint.c; sourceTree = ""; }; + B29A7D9E19EE1B7700872B35 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBounds.h; sourceTree = ""; }; + B29A7D9F19EE1B7700872B35 /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AtlasAttachmentLoader.c; sourceTree = ""; }; + B29A7DA019EE1B7700872B35 /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AttachmentLoader.c; sourceTree = ""; }; + B29A7DA119EE1B7700872B35 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skeleton.h; sourceTree = ""; }; + B29A7DA219EE1B7700872B35 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attachment.h; sourceTree = ""; }; + B29A7DA319EE1B7700872B35 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Json.h; sourceTree = ""; }; + B29A7DA419EE1B7700872B35 /* spine-cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "spine-cocos2dx.cpp"; sourceTree = ""; }; + B29A7DA519EE1B7700872B35 /* IkConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraintData.h; sourceTree = ""; }; + B29A7DA619EE1B7700872B35 /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Json.c; sourceTree = ""; }; + B29A7DA719EE1B7700872B35 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extension.h; sourceTree = ""; }; + B29A7DA819EE1B7700872B35 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundingBoxAttachment.h; sourceTree = ""; }; + B29A7DA919EE1B7700872B35 /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = extension.c; sourceTree = ""; }; + B29A7DAA19EE1B7700872B35 /* SkinnedMeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkinnedMeshAttachment.c; sourceTree = ""; }; + B29A7DAB19EE1B7700872B35 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentLoader.h; sourceTree = ""; }; + B29A7DAC19EE1B7700872B35 /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Atlas.c; sourceTree = ""; }; + B29A7DAD19EE1B7700872B35 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bone.h; sourceTree = ""; }; + B29A7DAE19EE1B7700872B35 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonJson.h; sourceTree = ""; }; + B29A7DAF19EE1B7700872B35 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventData.h; sourceTree = ""; }; + B29A7DB019EE1B7700872B35 /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Bone.c; sourceTree = ""; }; + B29A7DB119EE1B7700872B35 /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BoundingBoxAttachment.c; sourceTree = ""; }; + B29A7DB219EE1B7700872B35 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; + B29A7DB319EE1B7700872B35 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; + B29A7DB419EE1B7700872B35 /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SkeletonJson.c; sourceTree = ""; }; + B29A7DB519EE1B7700872B35 /* PolygonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolygonBatch.h; sourceTree = ""; }; + B29A7DB619EE1B7700872B35 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoneData.h; sourceTree = ""; }; + B29A7DB719EE1B7700872B35 /* PolygonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolygonBatch.cpp; sourceTree = ""; }; + B29A7DB819EE1B7700872B35 /* IkConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraint.h; sourceTree = ""; }; + B29A7DB919EE1B7700872B35 /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Attachment.c; sourceTree = ""; }; + B29A7DBA19EE1B7700872B35 /* spine-cocos2dx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "spine-cocos2dx.h"; sourceTree = ""; }; + B29A7DBB19EE1B7700872B35 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonData.h; sourceTree = ""; }; + B29A7DBC19EE1B7700872B35 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasAttachmentLoader.h; sourceTree = ""; }; + B29A7DBD19EE1B7700872B35 /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Slot.c; sourceTree = ""; }; + B29A7DBE19EE1B7700872B35 /* SkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonAnimation.cpp; sourceTree = ""; }; + B29A7DBF19EE1B7700872B35 /* SkinnedMeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkinnedMeshAttachment.h; sourceTree = ""; }; + B29A7DC019EE1B7700872B35 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotData.h; sourceTree = ""; }; + B29A7DC119EE1B7700872B35 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationStateData.h; sourceTree = ""; }; + B29A7DC219EE1B7700872B35 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AnimationStateData.c; sourceTree = ""; }; + B29A7DC319EE1B7700872B35 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Animation.h; sourceTree = ""; }; + B29A7DC419EE1B7700872B35 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Animation.c; sourceTree = ""; }; + B29A7DC519EE1B7700872B35 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AnimationState.c; sourceTree = ""; }; + B29A7DC619EE1B7700872B35 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationState.h; sourceTree = ""; }; B37510451823AC7B00B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsBodyInfo_chipmunk.cpp; sourceTree = ""; }; B37510461823AC7B00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsBodyInfo_chipmunk.h; sourceTree = ""; }; B37510471823AC7B00B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContactInfo_chipmunk.cpp; sourceTree = ""; }; @@ -3780,6 +3840,16 @@ 1AAF5350180E305F000584C8 /* assets-manager */ = { isa = PBXGroup; children = ( + 15B3706E19EE414C00ABE682 /* AssetsManagerEx.cpp */, + 15B3706F19EE414C00ABE682 /* AssetsManagerEx.h */, + 15B3707019EE414C00ABE682 /* CCEventAssetsManagerEx.cpp */, + 15B3707119EE414C00ABE682 /* CCEventAssetsManagerEx.h */, + 15B3707219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp */, + 15B3707319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h */, + 15B3707419EE414C00ABE682 /* Downloader.cpp */, + 15B3707519EE414C00ABE682 /* Downloader.h */, + 15B3707619EE414C00ABE682 /* Manifest.cpp */, + 15B3707719EE414C00ABE682 /* Manifest.h */, 1AAF5351180E3060000584C8 /* AssetsManager.cpp */, 1AAF5352180E3060000584C8 /* AssetsManager.h */, ); @@ -3963,57 +4033,67 @@ 1AD71D7C180E26E600808F54 /* spine */ = { isa = PBXGroup; children = ( - 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */, - 2AC795DA18628689005EC8E1 /* SkeletonBounds.h */, - 2AC795D51862867D005EC8E1 /* Event.cpp */, - 2AC795D61862867D005EC8E1 /* Event.h */, - 2AC795D71862867D005EC8E1 /* EventData.cpp */, - 2AC795D81862867D005EC8E1 /* EventData.h */, - 2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */, - 2AC795D418628672005EC8E1 /* BoundingBoxAttachment.h */, - 1AD71D7E180E26E600808F54 /* Animation.cpp */, - 1AD71D7F180E26E600808F54 /* Animation.h */, - 1AD71D80180E26E600808F54 /* AnimationState.cpp */, - 1AD71D81180E26E600808F54 /* AnimationState.h */, - 1AD71D82180E26E600808F54 /* AnimationStateData.cpp */, - 1AD71D83180E26E600808F54 /* AnimationStateData.h */, - 1AD71D84180E26E600808F54 /* Atlas.cpp */, - 1AD71D85180E26E600808F54 /* Atlas.h */, - 1AD71D86180E26E600808F54 /* AtlasAttachmentLoader.cpp */, - 1AD71D87180E26E600808F54 /* AtlasAttachmentLoader.h */, - 1AD71D88180E26E600808F54 /* Attachment.cpp */, - 1AD71D89180E26E600808F54 /* Attachment.h */, - 1AD71D8A180E26E600808F54 /* AttachmentLoader.cpp */, - 1AD71D8B180E26E600808F54 /* AttachmentLoader.h */, - 1AD71D8C180E26E600808F54 /* Bone.cpp */, - 1AD71D8D180E26E600808F54 /* Bone.h */, - 1AD71D8E180E26E600808F54 /* BoneData.cpp */, - 1AD71D8F180E26E600808F54 /* BoneData.h */, - 1AD71D90180E26E600808F54 /* CCSkeleton.cpp */, - 1AD71D91180E26E600808F54 /* CCSkeleton.h */, - 1AD71D92180E26E600808F54 /* CCSkeletonAnimation.cpp */, - 1AD71D93180E26E600808F54 /* CCSkeletonAnimation.h */, - 1AD71D94180E26E600808F54 /* extension.cpp */, - 1AD71D95180E26E600808F54 /* extension.h */, - 1AD71D96180E26E600808F54 /* Json.cpp */, - 1AD71D97180E26E600808F54 /* Json.h */, - 1AD71D98180E26E600808F54 /* RegionAttachment.cpp */, - 1AD71D99180E26E600808F54 /* RegionAttachment.h */, - 1AD71D9A180E26E600808F54 /* Skeleton.cpp */, - 1AD71D9B180E26E600808F54 /* Skeleton.h */, - 1AD71D9C180E26E600808F54 /* SkeletonData.cpp */, - 1AD71D9D180E26E600808F54 /* SkeletonData.h */, - 1AD71D9E180E26E600808F54 /* SkeletonJson.cpp */, - 1AD71D9F180E26E600808F54 /* SkeletonJson.h */, - 1AD71DA0180E26E600808F54 /* Skin.cpp */, - 1AD71DA1180E26E600808F54 /* Skin.h */, - 1AD71DA2180E26E600808F54 /* Slot.cpp */, - 1AD71DA3180E26E600808F54 /* Slot.h */, - 1AD71DA4180E26E600808F54 /* SlotData.cpp */, - 1AD71DA5180E26E600808F54 /* SlotData.h */, - 1AD71DA6180E26E600808F54 /* spine-cocos2dx.cpp */, - 1AD71DA7180E26E600808F54 /* spine-cocos2dx.h */, - 1AD71DA8180E26E600808F54 /* spine.h */, + B29A7D8A19EE1B7700872B35 /* SkeletonRenderer.cpp */, + B29A7D8B19EE1B7700872B35 /* SlotData.c */, + B29A7D8C19EE1B7700872B35 /* Skeleton.c */, + B29A7D8D19EE1B7700872B35 /* Slot.h */, + B29A7D8E19EE1B7700872B35 /* RegionAttachment.h */, + B29A7D8F19EE1B7700872B35 /* Skin.c */, + B29A7D9019EE1B7700872B35 /* Skin.h */, + B29A7D9119EE1B7700872B35 /* RegionAttachment.c */, + B29A7D9219EE1B7700872B35 /* SkeletonData.c */, + B29A7D9319EE1B7700872B35 /* SkeletonRenderer.h */, + B29A7D9419EE1B7700872B35 /* Event.c */, + B29A7D9519EE1B7700872B35 /* BoneData.c */, + B29A7D9619EE1B7700872B35 /* IkConstraintData.c */, + B29A7D9719EE1B7700872B35 /* MeshAttachment.c */, + B29A7D9819EE1B7700872B35 /* SkeletonBounds.c */, + B29A7D9919EE1B7700872B35 /* SkeletonAnimation.h */, + B29A7D9A19EE1B7700872B35 /* spine.h */, + B29A7D9B19EE1B7700872B35 /* EventData.c */, + B29A7D9C19EE1B7700872B35 /* MeshAttachment.h */, + B29A7D9D19EE1B7700872B35 /* IkConstraint.c */, + B29A7D9E19EE1B7700872B35 /* SkeletonBounds.h */, + B29A7D9F19EE1B7700872B35 /* AtlasAttachmentLoader.c */, + B29A7DA019EE1B7700872B35 /* AttachmentLoader.c */, + B29A7DA119EE1B7700872B35 /* Skeleton.h */, + B29A7DA219EE1B7700872B35 /* Attachment.h */, + B29A7DA319EE1B7700872B35 /* Json.h */, + B29A7DA419EE1B7700872B35 /* spine-cocos2dx.cpp */, + B29A7DA519EE1B7700872B35 /* IkConstraintData.h */, + B29A7DA619EE1B7700872B35 /* Json.c */, + B29A7DA719EE1B7700872B35 /* extension.h */, + B29A7DA819EE1B7700872B35 /* BoundingBoxAttachment.h */, + B29A7DA919EE1B7700872B35 /* extension.c */, + B29A7DAA19EE1B7700872B35 /* SkinnedMeshAttachment.c */, + B29A7DAB19EE1B7700872B35 /* AttachmentLoader.h */, + B29A7DAC19EE1B7700872B35 /* Atlas.c */, + B29A7DAD19EE1B7700872B35 /* Bone.h */, + B29A7DAE19EE1B7700872B35 /* SkeletonJson.h */, + B29A7DAF19EE1B7700872B35 /* EventData.h */, + B29A7DB019EE1B7700872B35 /* Bone.c */, + B29A7DB119EE1B7700872B35 /* BoundingBoxAttachment.c */, + B29A7DB219EE1B7700872B35 /* Atlas.h */, + B29A7DB319EE1B7700872B35 /* Event.h */, + B29A7DB419EE1B7700872B35 /* SkeletonJson.c */, + B29A7DB519EE1B7700872B35 /* PolygonBatch.h */, + B29A7DB619EE1B7700872B35 /* BoneData.h */, + B29A7DB719EE1B7700872B35 /* PolygonBatch.cpp */, + B29A7DB819EE1B7700872B35 /* IkConstraint.h */, + B29A7DB919EE1B7700872B35 /* Attachment.c */, + B29A7DBA19EE1B7700872B35 /* spine-cocos2dx.h */, + B29A7DBB19EE1B7700872B35 /* SkeletonData.h */, + B29A7DBC19EE1B7700872B35 /* AtlasAttachmentLoader.h */, + B29A7DBD19EE1B7700872B35 /* Slot.c */, + B29A7DBE19EE1B7700872B35 /* SkeletonAnimation.cpp */, + B29A7DBF19EE1B7700872B35 /* SkinnedMeshAttachment.h */, + B29A7DC019EE1B7700872B35 /* SlotData.h */, + B29A7DC119EE1B7700872B35 /* AnimationStateData.h */, + B29A7DC219EE1B7700872B35 /* AnimationStateData.c */, + B29A7DC319EE1B7700872B35 /* Animation.h */, + B29A7DC419EE1B7700872B35 /* Animation.c */, + B29A7DC519EE1B7700872B35 /* AnimationState.c */, + B29A7DC619EE1B7700872B35 /* AnimationState.h */, ); path = spine; sourceTree = ""; @@ -5050,8 +5130,10 @@ 5034CA39191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, 3EA1073119D7F37700CAB794 /* CCLight.h in Headers */, + B29A7E3F19EE1B7700872B35 /* AnimationState.h in Headers */, 50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */, 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */, + B29A7DFD19EE1B7700872B35 /* IkConstraintData.h in Headers */, 50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */, 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */, @@ -5063,10 +5145,12 @@ 3828C0A719EB8ACA002AB57B /* zero_copy_stream.h in Headers */, 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */, 5034CA3F191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, + B29A7DD319EE1B7700872B35 /* Skin.h in Headers */, 50ABBD461925AB0000A911A9 /* CCVertex.h in Headers */, 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */, 46A170E71807CECA005B8026 /* CCPhysicsBody.h in Headers */, 15AE1A5A19AAD40300C27E9E /* b2StackAllocator.h in Headers */, + B29A7E3119EE1B7700872B35 /* SkinnedMeshAttachment.h in Headers */, 15AE1B6F19AADA9900C27E9E /* GUIDefine.h in Headers */, 3828C0E519EB8ACA002AB57B /* type_traits.h in Headers */, 15AE1A8119AAD40300C27E9E /* b2FrictionJoint.h in Headers */, @@ -5075,7 +5159,6 @@ 15AE191E19AAD35000C27E9E /* CCTween.h in Headers */, 15AE184619AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, 50ABBD3E1925AB0000A911A9 /* CCGeometry.h in Headers */, - 15AE19CF19AAD3A700C27E9E /* Attachment.h in Headers */, 15AE1A7719AAD40300C27E9E /* b2EdgeAndPolygonContact.h in Headers */, 15AE18F719AAD35000C27E9E /* CCBatchNode.h in Headers */, 15AE181419AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, @@ -5088,20 +5171,21 @@ 46A170E91807CECA005B8026 /* CCPhysicsContact.h in Headers */, 15AE1A2219AAD3D500C27E9E /* Box2D.h in Headers */, 15AE191419AAD35000C27E9E /* CCSGUIReader.h in Headers */, + B29A7E0119EE1B7700872B35 /* extension.h in Headers */, 15AE196D19AAD35700C27E9E /* CCActionTimeline.h in Headers */, 15AE1A6D19AAD40300C27E9E /* b2ChainAndPolygonContact.h in Headers */, 3E2F27A719CFBFE400E7C490 /* AudioEngine.h in Headers */, 15AE183A19AAD2F700C27E9E /* CCRay.h in Headers */, - 15AE19E919AAD3A700C27E9E /* Slot.h in Headers */, B375107B1823AC9F00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */, 15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */, 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */, DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */, 50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */, - 15AE19EB19AAD3A700C27E9E /* SlotData.h in Headers */, B276EF631988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, + B29A7DE519EE1B7700872B35 /* SkeletonAnimation.h in Headers */, 50ABBE871925AB6F00A911A9 /* ccMacros.h in Headers */, + 15B3708A19EE414C00ABE682 /* Manifest.h in Headers */, 50ABBE731925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, 1A570063180BC5A10088DEC7 /* CCAction.h in Headers */, 1A570067180BC5A10088DEC7 /* CCActionCamera.h in Headers */, @@ -5154,8 +5238,10 @@ 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, + B29A7E1719EE1B7700872B35 /* Atlas.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, + B29A7E1119EE1B7700872B35 /* EventData.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, 50ABC0671926664800A911A9 /* CCPlatformDefine-mac.h in Headers */, 3828C0C319EB8ACA002AB57B /* atomicops_internals_mips_gcc.h in Headers */, @@ -5167,18 +5253,22 @@ B37510791823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */, 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, 15AE1A6019AAD40300C27E9E /* b2ContactManager.h in Headers */, + 15B3707A19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, + B29A7E2719EE1B7700872B35 /* spine-cocos2dx.h in Headers */, 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */, 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */, + B29A7E2B19EE1B7700872B35 /* AtlasAttachmentLoader.h in Headers */, 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h in Headers */, 15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */, 1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */, 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 3828C0A319EB8ACA002AB57B /* coded_stream_inl.h in Headers */, + B29A7E0F19EE1B7700872B35 /* SkeletonJson.h in Headers */, + B29A7E2919EE1B7700872B35 /* SkeletonData.h in Headers */, 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */, 15AE1A7119AAD40300C27E9E /* b2Contact.h in Headers */, 50ABBED11925AB6F00A911A9 /* TGAlib.h in Headers */, - 15AE19D319AAD3A700C27E9E /* Bone.h in Headers */, 1A57019F180BCB590088DEC7 /* CCFont.h in Headers */, DA8C62A419E52C6400000516 /* ioapi_mem.h in Headers */, 1A5701A3180BCB590088DEC7 /* CCFontAtlas.h in Headers */, @@ -5207,7 +5297,6 @@ 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */, 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */, 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */, - 15AE19D519AAD3A700C27E9E /* BoneData.h in Headers */, 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */, @@ -5224,7 +5313,9 @@ 1A5701E4180BCB8C0088DEC7 /* CCScene.h in Headers */, 15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */, 15AE198D19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, + B29A7E0919EE1B7700872B35 /* AttachmentLoader.h in Headers */, 1A01C68818F57BE800EFE3A6 /* CCBool.h in Headers */, + B29A7E3319EE1B7700872B35 /* SlotData.h in Headers */, 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */, 50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */, 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */, @@ -5236,10 +5327,10 @@ 1A5701E8180BCB8C0088DEC7 /* CCTransition.h in Headers */, 1A5701EC180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, - 15AE19DB19AAD3A700C27E9E /* extension.h in Headers */, 1A5701F0180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, 1A5701F9180BCBAD0088DEC7 /* CCMenu.h in Headers */, 50ABBD401925AB0000A911A9 /* CCMath.h in Headers */, + B29A7E1F19EE1B7700872B35 /* BoneData.h in Headers */, 15AE1A9319AAD40300C27E9E /* b2WheelJoint.h in Headers */, 15AE1A3119AAD3D500C27E9E /* b2ChainShape.h in Headers */, 1A5701FD180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, @@ -5254,13 +5345,13 @@ 1A57020A180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, 1A570212180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, 1A570216180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, - 15AE19D719AAD3A700C27E9E /* CCSkeleton.h in Headers */, 1A01C69618F57BE800EFE3A6 /* CCInteger.h in Headers */, 15AE1B6919AADA9900C27E9E /* UIDeprecated.h in Headers */, 1A570223180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, 15AE1A8319AAD40300C27E9E /* b2GearJoint.h in Headers */, 15AE1BD519AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, 15AE186919AAD31D00C27E9E /* CocosDenshion.h in Headers */, + B29A7DE719EE1B7700872B35 /* spine.h in Headers */, 3828C0D319EB8ACA002AB57B /* hash.h in Headers */, 50ABBD891925AB4100A911A9 /* CCCustomCommand.h in Headers */, 15AE1A8719AAD40300C27E9E /* b2MouseJoint.h in Headers */, @@ -5268,13 +5359,13 @@ 3828C0A119EB8ACA002AB57B /* coded_stream.h in Headers */, 15AE189719AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, 15AE189319AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, + B29A7DF919EE1B7700872B35 /* Json.h in Headers */, 15AE18EF19AAD35000C27E9E /* CCArmature.h in Headers */, 15AE19A719AAD39600C27E9E /* TextReader.h in Headers */, 1A570227180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, 1A57022B180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, 15AE190E19AAD35000C27E9E /* CCDisplayManager.h in Headers */, 15AE1A6719AAD40300C27E9E /* b2World.h in Headers */, - 15AE19D119AAD3A700C27E9E /* AttachmentLoader.h in Headers */, 3828C0B919EB8ACA002AB57B /* atomicops.h in Headers */, 15AE199B19AAD39600C27E9E /* PageViewReader.h in Headers */, 15AE1A6219AAD40300C27E9E /* b2Fixture.h in Headers */, @@ -5292,9 +5383,11 @@ 3828C0C519EB8ACA002AB57B /* atomicops_internals_pnacl.h in Headers */, 3828C0D519EB8ACA002AB57B /* map-util.h in Headers */, 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, + B29A7DF519EE1B7700872B35 /* Skeleton.h in Headers */, 3828C0D119EB8ACA002AB57B /* common.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, + B29A7DD919EE1B7700872B35 /* SkeletonRenderer.h in Headers */, 50CB247919D9C5A100687767 /* AudioEngine-inl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, 50ABBD561925AB0000A911A9 /* TransformUtils.h in Headers */, @@ -5302,7 +5395,6 @@ 50ABBD991925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, 5034CA3D191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */, - 15AE19E119AAD3A700C27E9E /* Skeleton.h in Headers */, 1A570280180BCC900088DEC7 /* CCSprite.h in Headers */, 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, 15AE1A9119AAD40300C27E9E /* b2WeldJoint.h in Headers */, @@ -5317,7 +5409,6 @@ 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */, 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */, 15AE184A19AAD30500C27E9E /* Export.h in Headers */, - 15AE19E719AAD3A700C27E9E /* Skin.h in Headers */, 15AE1BA019AADFDF00C27E9E /* UILayout.h in Headers */, 1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */, 50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */, @@ -5327,10 +5418,12 @@ 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */, 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */, 3828C09519EB8ACA002AB57B /* config.h in Headers */, + B29A7E1919EE1B7700872B35 /* Event.h in Headers */, 15AE18AA19AAD33D00C27E9E /* CocosBuilder.h in Headers */, 50ABC0071926664800A911A9 /* CCApplicationProtocol.h in Headers */, 15AE1A7919AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, 15AE199719AAD39600C27E9E /* ListViewReader.h in Headers */, + B29A7E1D19EE1B7700872B35 /* PolygonBatch.h in Headers */, 50ABBD4E1925AB0000A911A9 /* MathUtil.h in Headers */, 15AE1A7319AAD40300C27E9E /* b2ContactSolver.h in Headers */, 15AE1BC219AADFFB00C27E9E /* ExtensionMacros.h in Headers */, @@ -5340,12 +5433,10 @@ 15AE181819AAD2F700C27E9E /* CCAttachNode.h in Headers */, 1A12775B18DFCC540005F345 /* CCTweenFunction.h in Headers */, 1A5702CA180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, - 15AE19E519AAD3A700C27E9E /* SkeletonJson.h in Headers */, 3828C0B319EB8ACA002AB57B /* message_lite.h in Headers */, 15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */, 1A5702EC180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, 15AE18E019AAD35000C27E9E /* TriggerBase.h in Headers */, - 15AE19D919AAD3A700C27E9E /* CCSkeletonAnimation.h in Headers */, 15AE187D19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, 15AE181219AAD2F700C27E9E /* CCAnimation3D.h in Headers */, 1A5702F0180BCE750088DEC7 /* CCTMXLayer.h in Headers */, @@ -5357,6 +5448,7 @@ 1A5702F8180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */, 5034CA21191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 15AE1A2419AAD3D500C27E9E /* b2BroadPhase.h in Headers */, + B29A7E3919EE1B7700872B35 /* Animation.h in Headers */, 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */, @@ -5373,7 +5465,6 @@ 50ABBE4B1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, 1A57030E180BCF190088DEC7 /* CCComponent.h in Headers */, 1A570312180BCF190088DEC7 /* CCComponentContainer.h in Headers */, - 15AE19BD19AAD3A700C27E9E /* SkeletonBounds.h in Headers */, 15AE1B7119AADA9900C27E9E /* CocosGUI.h in Headers */, 15AE1A2D19AAD3D500C27E9E /* b2DynamicTree.h in Headers */, 3828C09D19EB8ACA002AB57B /* generated_message_util.h in Headers */, @@ -5387,7 +5478,6 @@ 15AE1A8B19AAD40300C27E9E /* b2PulleyJoint.h in Headers */, 38B8E2D119E65F4C002D7CE7 /* CSParseBinary.pb.h in Headers */, 15AE1A5119AAD40300C27E9E /* b2BlockAllocator.h in Headers */, - 15AE19C719AAD3A700C27E9E /* AnimationState.h in Headers */, 15AE199119AAD37200C27E9E /* ImageViewReader.h in Headers */, 15AE18FE19AAD35000C27E9E /* CCComAttribute.h in Headers */, 50ABBD621925AB0000A911A9 /* Vec4.h in Headers */, @@ -5398,8 +5488,6 @@ 15AE18F519AAD35000C27E9E /* CCArmatureDefine.h in Headers */, 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */, 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, - 15AE19C319AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */, - 15AE19C919AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */, 50ABBE331925AB6F00A911A9 /* CCConfiguration.h in Headers */, @@ -5410,9 +5498,12 @@ 50ABC01F1926664800A911A9 /* CCThread.h in Headers */, 1A57035A180BD0B00088DEC7 /* unzip.h in Headers */, 15AE188B19AAD33D00C27E9E /* CCControlLoader.h in Headers */, + B29A7DF719EE1B7700872B35 /* Attachment.h in Headers */, 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */, 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, + B29A7E0D19EE1B7700872B35 /* Bone.h in Headers */, 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, + B29A7DCD19EE1B7700872B35 /* Slot.h in Headers */, 3828C0BF19EB8ACA002AB57B /* atomicops_internals_atomicword_compat.h in Headers */, B37510741823AC9F00B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, @@ -5440,6 +5531,8 @@ 15AE1B9E19AADFDF00C27E9E /* UIVBox.h in Headers */, 15AE192319AAD35000C27E9E /* DictionaryHelper.h in Headers */, B257B4501989D5E800D9A687 /* CCPrimitive.h in Headers */, + B29A7DCF19EE1B7700872B35 /* RegionAttachment.h in Headers */, + 15B3707E19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */, 50ABBE6B1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, 50ABBDA51925AB4100A911A9 /* CCQuadCommand.h in Headers */, 15AE1BCF19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, @@ -5450,6 +5543,7 @@ 15AE1A8919AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, 50ABBD3A1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 15AE186C19AAD31D00C27E9E /* SimpleAudioEngine_objc.h in Headers */, + B29A7E2319EE1B7700872B35 /* IkConstraint.h in Headers */, 15AE1BB319AADFEF00C27E9E /* HttpRequest.h in Headers */, 3828C0C119EB8ACA002AB57B /* atomicops_internals_macosx.h in Headers */, 50ABBE571925AB6F00A911A9 /* CCEventFocus.h in Headers */, @@ -5474,6 +5568,8 @@ 3828C0DD19EB8ACA002AB57B /* stl_util.h in Headers */, 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */, + 15B3708219EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, + 15B3708619EE414C00ABE682 /* Downloader.h in Headers */, 5034CA41191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, @@ -5483,40 +5579,33 @@ 15AE1A3719AAD3D500C27E9E /* b2PolygonShape.h in Headers */, 15AE1B5419AADA9900C27E9E /* UIRichText.h in Headers */, 50ABBE3B1925AB6F00A911A9 /* CCData.h in Headers */, - 15AE19DF19AAD3A700C27E9E /* RegionAttachment.h in Headers */, 50ABBE3F1925AB6F00A911A9 /* CCDataVisitor.h in Headers */, 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */, 50ABBD9D1925AB4100A911A9 /* ccGLStateCache.h in Headers */, + B29A7E0319EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */, 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */, - 15AE19DD19AAD3A700C27E9E /* Json.h in Headers */, 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 3828C0D919EB8ACA002AB57B /* once.h in Headers */, 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, - 15AE19ED19AAD3A700C27E9E /* spine-cocos2dx.h in Headers */, 50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */, 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, 3828C09919EB8ACA002AB57B /* extension_set.h in Headers */, 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */, 3828C0BD19EB8ACA002AB57B /* atomicops_internals_arm_qnx.h in Headers */, - 15AE19CB19AAD3A700C27E9E /* Atlas.h in Headers */, 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, 1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, - 15AE19C519AAD3A700C27E9E /* Animation.h in Headers */, 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */, B37510721823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, 50ABBD5E1925AB0000A911A9 /* Vec3.h in Headers */, 15AE188919AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, - 15AE19EE19AAD3A700C27E9E /* spine.h in Headers */, 15AE189119AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, - 15AE19C119AAD3A700C27E9E /* EventData.h in Headers */, 50ABBE211925AB6F00A911A9 /* atitc.h in Headers */, 15AE19A519AAD39600C27E9E /* TextFieldReader.h in Headers */, B24AA98B195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */, - 15AE19E319AAD3A700C27E9E /* SkeletonData.h in Headers */, 50ABBE371925AB6F00A911A9 /* CCConsole.h in Headers */, 3828C0E719EB8ACA002AB57B /* wire_format_lite_inl.h in Headers */, 50ABC00B1926664800A911A9 /* CCDevice.h in Headers */, @@ -5528,8 +5617,9 @@ 50ABBDAB1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, 5034CA45191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, 50ABBEB11925AB6F00A911A9 /* CCUserDefault.h in Headers */, - 15AE19CD19AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */, + B29A7DEF19EE1B7700872B35 /* SkeletonBounds.h in Headers */, 50ABBEC71925AB6F00A911A9 /* etc1.h in Headers */, + B29A7E3519EE1B7700872B35 /* AnimationStateData.h in Headers */, 15AE1BC619AAE00000C27E9E /* AssetsManager.h in Headers */, 50ABBEA91925AB6F00A911A9 /* CCTouch.h in Headers */, 15AE1A5E19AAD40300C27E9E /* b2Body.h in Headers */, @@ -5548,8 +5638,8 @@ 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, 50ABC0091926664800A911A9 /* CCCommon.h in Headers */, - 15AE19BF19AAD3A700C27E9E /* Event.h in Headers */, 50ABBE531925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, + B29A7DEB19EE1B7700872B35 /* MeshAttachment.h in Headers */, 464AD6E7197EBB1400E502D8 /* pvr.h in Headers */, 3828C0AF19EB8ACA002AB57B /* zero_copy_stream_impl_lite.h in Headers */, ); @@ -5562,28 +5652,31 @@ 503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */, 15AE1A9A19AAD40300C27E9E /* b2Math.h in Headers */, 46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */, + B29A7E1A19EE1B7700872B35 /* Event.h in Headers */, 15AE1AC719AAD40300C27E9E /* b2GearJoint.h in Headers */, 50ABBDA21925AB4100A911A9 /* CCGroupCommand.h in Headers */, - 15AE1A1C19AAD3A700C27E9E /* Slot.h in Headers */, 15AE18C219AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */, 15AE181519AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, 503DD8EF1926736A00CD74DD /* CCPlatformDefine-ios.h in Headers */, 3828C0C019EB8ACA002AB57B /* atomicops_internals_atomicword_compat.h in Headers */, - 15AE19F219AAD3A700C27E9E /* Event.h in Headers */, 15AE196919AAD35100C27E9E /* CocoStudio.h in Headers */, 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, - 15AE1A0A19AAD3A700C27E9E /* CCSkeleton.h in Headers */, 5034CA38191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */, 15AE1B8119AADA9A00C27E9E /* UITextAtlas.h in Headers */, + B29A7E3A19EE1B7700872B35 /* Animation.h in Headers */, + 15B3708319EE414C00ABE682 /* CCEventListenerAssetsManagerEx.h in Headers */, 50ABBE7C1925AB6F00A911A9 /* CCEventMouse.h in Headers */, + B29A7E2C19EE1B7700872B35 /* AtlasAttachmentLoader.h in Headers */, 46A171011807CECB005B8026 /* CCPhysicsJoint.h in Headers */, + B29A7E3219EE1B7700872B35 /* SkinnedMeshAttachment.h in Headers */, 46A170FD1807CECB005B8026 /* CCPhysicsBody.h in Headers */, 50ABBE9C1925AB6F00A911A9 /* CCRef.h in Headers */, + B29A7E2819EE1B7700872B35 /* spine-cocos2dx.h in Headers */, 292DB16219B461CA00A80320 /* ExtensionDeprecated.h in Headers */, 50ABBD961925AB4100A911A9 /* CCGLProgramState.h in Headers */, 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */, @@ -5593,11 +5686,14 @@ 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */, 15AE1A4A19AAD3D500C27E9E /* b2CircleShape.h in Headers */, 50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */, + 15B3708719EE414C00ABE682 /* Downloader.h in Headers */, 15AE192619AAD35100C27E9E /* TriggerObj.h in Headers */, 50ABBE2E1925AB6F00A911A9 /* ccCArray.h in Headers */, 15AE1A0C19AAD3A700C27E9E /* CCSkeletonAnimation.h in Headers */, + 15B3707B19EE414C00ABE682 /* AssetsManagerEx.h in Headers */, 15AE1B9119AADA9A00C27E9E /* UIWidget.h in Headers */, 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */, + B29A7DFE19EE1B7700872B35 /* IkConstraintData.h in Headers */, 15AE1A4019AAD3D500C27E9E /* b2Collision.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, @@ -5613,7 +5709,6 @@ 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, - 15AE1A0E19AAD3A700C27E9E /* extension.h in Headers */, 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, 50ABBE401925AB6F00A911A9 /* CCDataVisitor.h in Headers */, 15AE19B719AAD39700C27E9E /* TextBMFontReader.h in Headers */, @@ -5626,8 +5721,8 @@ 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */, 3828C0B419EB8ACA002AB57B /* message_lite.h in Headers */, - 15AE1A1219AAD3A700C27E9E /* RegionAttachment.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, + B29A7E1E19EE1B7700872B35 /* PolygonBatch.h in Headers */, 3828C0BA19EB8ACA002AB57B /* atomicops.h in Headers */, 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, @@ -5648,6 +5743,8 @@ 1A570078180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */, 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */, + B29A7DD419EE1B7700872B35 /* Skin.h in Headers */, + B29A7E2419EE1B7700872B35 /* IkConstraint.h in Headers */, 1A01C68918F57BE800EFE3A6 /* CCBool.h in Headers */, 15AE184319AAD2F700C27E9E /* CCSprite3D.h in Headers */, 50CB247E19D9C5A100687767 /* AudioPlayer.h in Headers */, @@ -5655,7 +5752,6 @@ 1A57007C180BC5A10088DEC7 /* CCActionInstant.h in Headers */, 3E6176751960F89B00DE83F5 /* CCEventController.h in Headers */, 15AE18CD19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.h in Headers */, - 15AE1A0219AAD3A700C27E9E /* Attachment.h in Headers */, 3828C0D619EB8ACA002AB57B /* map-util.h in Headers */, 50ABBE781925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, B37510861823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */, @@ -5679,7 +5775,6 @@ 1A570094180BC5A10088DEC7 /* CCActionTween.h in Headers */, 1A57009B180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE184919AAD2F700C27E9E /* cocos3d.h in Headers */, - 15AE19F819AAD3A700C27E9E /* Animation.h in Headers */, 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */, 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */, 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, @@ -5687,10 +5782,12 @@ 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, 503DD8E41926736A00CD74DD /* CCDirectorCaller-ios.h in Headers */, 15AE198119AAD35700C27E9E /* CCTimelineMacro.h in Headers */, + B29A7E0219EE1B7700872B35 /* extension.h in Headers */, 15AE1B7719AADA9A00C27E9E /* UIPageView.h in Headers */, 50ABBD8A1925AB4100A911A9 /* CCCustomCommand.h in Headers */, 299754F7193EC95400A54AC3 /* ObjectFactory.h in Headers */, 50ABBE881925AB6F00A911A9 /* ccMacros.h in Headers */, + B29A7E4019EE1B7700872B35 /* AnimationState.h in Headers */, 50ABC0101926664800A911A9 /* CCFileUtils.h in Headers */, 15AE19A919AAD39700C27E9E /* LayoutReader.h in Headers */, 15AE1B7B19AADA9A00C27E9E /* UIScrollView.h in Headers */, @@ -5712,19 +5809,19 @@ 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, - 15AE1A0819AAD3A700C27E9E /* BoneData.h in Headers */, 3E2BDADE19C030ED0055CDCD /* AudioEngine.h in Headers */, 50ABBD9A1925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, 15AE181D19AAD2F700C27E9E /* CCBundle3D.h in Headers */, 15AE192519AAD35100C27E9E /* CocoLoader.h in Headers */, 15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */, + B29A7E0E19EE1B7700872B35 /* Bone.h in Headers */, B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */, B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, - 15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */, 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, 15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */, 50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */, 3EA3EDBF1991CDFA00645534 /* CCCamera.h in Headers */, + B29A7DD019EE1B7700872B35 /* RegionAttachment.h in Headers */, 15AE1AD319AAD40300C27E9E /* b2RopeJoint.h in Headers */, 50ABBFFE1926664800A911A9 /* CCFileUtils-apple.h in Headers */, 15AE1AAD19AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, @@ -5734,14 +5831,15 @@ 15AE1A4C19AAD3D500C27E9E /* b2EdgeShape.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, 15AE18D419AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, + B29A7DFA19EE1B7700872B35 /* Json.h in Headers */, 1A5701B8180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, - 15AE19F019AAD3A700C27E9E /* SkeletonBounds.h in Headers */, 15AE182719AAD2F700C27E9E /* CCMesh.h in Headers */, 15AE199319AAD37300C27E9E /* ImageViewReader.h in Headers */, 15AE1A4819AAD3D500C27E9E /* b2ChainShape.h in Headers */, 15AE18CB19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, 1A5701BC180BCB5A0088DEC7 /* CCLabel.h in Headers */, 1A5701C0180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, + B29A7E1819EE1B7700872B35 /* Atlas.h in Headers */, 50ABBE681925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */, 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, @@ -5755,6 +5853,7 @@ 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */, 3828C0B019EB8ACA002AB57B /* zero_copy_stream_impl_lite.h in Headers */, 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */, + B29A7E0419EE1B7700872B35 /* BoundingBoxAttachment.h in Headers */, 15AE1BBC19AADFF000C27E9E /* HttpResponse.h in Headers */, 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */, 50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */, @@ -5772,14 +5871,12 @@ 50643BE519BFCF1800EF68ED /* CCPlatformMacros.h in Headers */, 15AE1BFA19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, 15AE182F19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, - 15AE19F419AAD3A700C27E9E /* EventData.h in Headers */, 15AE1BAA19AADFDF00C27E9E /* UIVBox.h in Headers */, 15AE194E19AAD35100C27E9E /* CCDataReaderHelper.h in Headers */, 3828C0A419EB8ACA002AB57B /* coded_stream_inl.h in Headers */, 15AE1ADB19AAD41000C27E9E /* b2Rope.h in Headers */, 1A5701CE180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */, 15AE1AB119AAD40300C27E9E /* b2ChainAndPolygonContact.h in Headers */, - 15AE1A1E19AAD3A700C27E9E /* SlotData.h in Headers */, 1A5701E1180BCB8C0088DEC7 /* CCLayer.h in Headers */, 15AE1BEE19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, 3828C09619EB8ACA002AB57B /* config.h in Headers */, @@ -5788,9 +5885,11 @@ 15AE198F19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, 3828C0E419EB8ACA002AB57B /* template_util.h in Headers */, 50ABBED41925AB6F00A911A9 /* uthash.h in Headers */, + B29A7E0A19EE1B7700872B35 /* AttachmentLoader.h in Headers */, 1A5701ED180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, 1A5701F1180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, 3828C0E819EB8ACA002AB57B /* wire_format_lite_inl.h in Headers */, + B29A7DCE19EE1B7700872B35 /* Slot.h in Headers */, 15AE1A9C19AAD40300C27E9E /* b2Settings.h in Headers */, 1A5701FA180BCBAD0088DEC7 /* CCMenu.h in Headers */, 15AE18BA19AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, @@ -5799,17 +5898,18 @@ 1A570205180BCBD40088DEC7 /* CCClippingNode.h in Headers */, 15AE1B8919AADA9A00C27E9E /* UICheckBox.h in Headers */, 5034CA34191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, + B29A7DF819EE1B7700872B35 /* Attachment.h in Headers */, 15AE197C19AAD35700C27E9E /* CCFrame.h in Headers */, 15AE1AA219AAD40300C27E9E /* b2Body.h in Headers */, 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */, 50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */, 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, - 15AE1A0419AAD3A700C27E9E /* AttachmentLoader.h in Headers */, 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, 15AE1ABD19AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, 15AE1AA819AAD40300C27E9E /* b2Island.h in Headers */, + 15B3708B19EE414C00ABE682 /* Manifest.h in Headers */, 1A570213180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, B37510821823ACA100B3BA6A /* CCPhysicsJointInfo_chipmunk.h in Headers */, 1A570217180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, @@ -5819,6 +5919,7 @@ 1A570224180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */, 15AE1AC919AAD40300C27E9E /* b2Joint.h in Headers */, 15AE196819AAD35100C27E9E /* CCUtilMath.h in Headers */, + B29A7E2019EE1B7700872B35 /* BoneData.h in Headers */, 503DD8F61926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, 1A570228180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */, 1A57022C180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, @@ -5852,15 +5953,14 @@ 15AE193B19AAD35100C27E9E /* CCArmatureDataManager.h in Headers */, 1A570289180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, 15AE1B7F19AADA9A00C27E9E /* UIText.h in Headers */, + B29A7E3419EE1B7700872B35 /* SlotData.h in Headers */, 50ABBE701925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE18B619AAD33D00C27E9E /* CCBSequence.h in Headers */, 15AE1A9819AAD40300C27E9E /* b2GrowableStack.h in Headers */, 1A57028D180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, 1A570295180BCCAB0088DEC7 /* CCAnimation.h in Headers */, 50ABBDB81925AB4100A911A9 /* CCTexture2D.h in Headers */, - 15AE19F619AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */, 15AE1AAB19AAD40300C27E9E /* b2World.h in Headers */, - 15AE19FC19AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 50ABBE341925AB6F00A911A9 /* CCConfiguration.h in Headers */, 1A570299180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, @@ -5871,26 +5971,25 @@ 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 15AE1AC319AAD40300C27E9E /* b2DistanceJoint.h in Headers */, 50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, + B29A7E1219EE1B7700872B35 /* EventData.h in Headers */, 1A5702CB180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, 15AE195E19AAD35100C27E9E /* CCSkin.h in Headers */, 1A5702F1180BCE750088DEC7 /* CCTMXLayer.h in Headers */, 15AE18AE19AAD33D00C27E9E /* CCBFileLoader.h in Headers */, - 15AE19FE19AAD3A700C27E9E /* Atlas.h in Headers */, 15AE197819AAD35700C27E9E /* CCActionTimeline.h in Headers */, 15AE1AA019AAD40300C27E9E /* b2Timer.h in Headers */, 5034CA44191D591100CE6051 /* ccShader_Label.vert in Headers */, - 15AE1A1419AAD3A700C27E9E /* Skeleton.h in Headers */, 1A5702F5180BCE750088DEC7 /* CCTMXObjectGroup.h in Headers */, 3828C0B819EB8ACA002AB57B /* repeated_field.h in Headers */, 1A5702F9180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */, + 15B3707F19EE414C00ABE682 /* CCEventAssetsManagerEx.h in Headers */, 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */, 15AE1A4419AAD3D500C27E9E /* b2DynamicTree.h in Headers */, 1A5702FD180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, 15AE1AC519AAD40300C27E9E /* b2FrictionJoint.h in Headers */, 15AE1B8D19AADA9A00C27E9E /* UIScale9Sprite.h in Headers */, 15AE18AC19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, - 15AE1A1A19AAD3A700C27E9E /* Skin.h in Headers */, 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A570303180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE2A1925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, @@ -5902,18 +6001,17 @@ 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, B375107F1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, 3828C0D419EB8ACA002AB57B /* hash.h in Headers */, - 15AE1A2019AAD3A700C27E9E /* spine-cocos2dx.h in Headers */, 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */, 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */, + B29A7DE819EE1B7700872B35 /* spine.h in Headers */, 1A57034E180BD09B0088DEC7 /* tinyxml2.h in Headers */, 3828C0E619EB8ACA002AB57B /* type_traits.h in Headers */, 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, 15AE1A9E19AAD40300C27E9E /* b2StackAllocator.h in Headers */, 1A570357180BD0B00088DEC7 /* ioapi.h in Headers */, 3828C0C419EB8ACA002AB57B /* atomicops_internals_mips_gcc.h in Headers */, - 15AE1A1619AAD3A700C27E9E /* SkeletonData.h in Headers */, 50ABBD4B1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */, 1A01C69B18F57BE800EFE3A6 /* CCSet.h in Headers */, @@ -5946,6 +6044,7 @@ 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */, 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, + B29A7DE619EE1B7700872B35 /* SkeletonAnimation.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */, B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */, @@ -5968,6 +6067,7 @@ 15AE1B7D19AADA9A00C27E9E /* UISlider.h in Headers */, 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */, 15AE1B8319AADA9A00C27E9E /* UITextBMFont.h in Headers */, + B29A7E2A19EE1B7700872B35 /* SkeletonData.h in Headers */, 50ABBD8E1925AB4100A911A9 /* CCGLProgram.h in Headers */, 38B8E2D819E66581002D7CE7 /* CSLoader.h in Headers */, 50ABC0081926664800A911A9 /* CCApplicationProtocol.h in Headers */, @@ -5988,14 +6088,12 @@ 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */, 50ABBDBC1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, 15AE182319AAD2F700C27E9E /* CCBundleReader.h in Headers */, - 15AE1A1819AAD3A700C27E9E /* SkeletonJson.h in Headers */, 50ABBE541925AB6F00A911A9 /* CCEventDispatcher.h in Headers */, 1A12775A18DFCC4F0005F345 /* CCTweenFunction.h in Headers */, 15AE192819AAD35100C27E9E /* TriggerBase.h in Headers */, 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, 15AE1AD119AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */, - 15AE1A2119AAD3A700C27E9E /* spine.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, @@ -6004,9 +6102,8 @@ 15AE194C19AAD35100C27E9E /* CCComRender.h in Headers */, 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */, 50CB247619D9C5A100687767 /* AudioCache.h in Headers */, + B29A7DDA19EE1B7700872B35 /* SkeletonRenderer.h in Headers */, 15AE194119AAD35100C27E9E /* CCBone.h in Headers */, - 15AE19FA19AAD3A700C27E9E /* AnimationState.h in Headers */, - 15AE1A1019AAD3A700C27E9E /* Json.h in Headers */, 50ABBD471925AB0000A911A9 /* CCVertex.h in Headers */, 15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */, 15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */, @@ -6020,6 +6117,7 @@ 1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */, 5034CA36191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, B24AA98C195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, + B29A7DEC19EE1B7700872B35 /* MeshAttachment.h in Headers */, 50ABBEAE1925AB6F00A911A9 /* ccTypes.h in Headers */, 15AE185819AAD31200C27E9E /* CDAudioManager.h in Headers */, 15AE1BF819AAE01E00C27E9E /* CCControlStepper.h in Headers */, @@ -6033,11 +6131,11 @@ 50ABBDC01925AB4100A911A9 /* CCTextureCache.h in Headers */, 3EA1073219D7F37700CAB794 /* CCLight.h in Headers */, B276EF641988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, - 15AE1A0619AAD3A700C27E9E /* Bone.h in Headers */, ED9C6A9718599AD8000A5232 /* CCNodeGrid.h in Headers */, 50ABC0201926664800A911A9 /* CCThread.h in Headers */, 15AE1B8519AADA9A00C27E9E /* UITextField.h in Headers */, 1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */, + B29A7E1019EE1B7700872B35 /* SkeletonJson.h in Headers */, 15AE184B19AAD30500C27E9E /* Export.h in Headers */, 3828C0AC19EB8ACA002AB57B /* zero_copy_stream_impl.h in Headers */, 15AE196019AAD35100C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, @@ -6051,6 +6149,7 @@ 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, + B29A7E3619EE1B7700872B35 /* AnimationStateData.h in Headers */, 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */, 50ABBE581925AB6F00A911A9 /* CCEventFocus.h in Headers */, 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, @@ -6064,7 +6163,9 @@ 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */, B37510801823ACA100B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */, + B29A7DF619EE1B7700872B35 /* Skeleton.h in Headers */, 50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */, + B29A7DF019EE1B7700872B35 /* SkeletonBounds.h in Headers */, 15AE1BE919AAE01E00C27E9E /* CCControl.h in Headers */, 15AE193719AAD35100C27E9E /* CCArmature.h in Headers */, 15AE1BC319AADFFB00C27E9E /* cocos-ext.h in Headers */, @@ -6148,9 +6249,11 @@ files = ( 15AE1A9019AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 50ABBE2B1925AB6F00A911A9 /* ccCArray.cpp in Sources */, + B29A7E3B19EE1B7700872B35 /* Animation.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */, 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, + B29A7E0B19EE1B7700872B35 /* Atlas.c in Sources */, 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */, 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 3828C0B519EB8ACA002AB57B /* repeated_field.cc in Sources */, @@ -6162,7 +6265,6 @@ 1A01C6A418F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, 15AE1A5D19AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, - 15AE19D619AAD3A700C27E9E /* CCSkeleton.cpp in Sources */, 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */, 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */, 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */, @@ -6203,6 +6305,7 @@ 46A170E81807CECA005B8026 /* CCPhysicsContact.cpp in Sources */, 1A570061180BC5A10088DEC7 /* CCAction.cpp in Sources */, 15AE1BDC19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, + B29A7DE919EE1B7700872B35 /* EventData.c in Sources */, 50ABBEC51925AB6F00A911A9 /* etc1.cpp in Sources */, 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 15AE1B5B19AADA9900C27E9E /* UITextAtlas.cpp in Sources */, @@ -6210,13 +6313,13 @@ 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, - 15AE19E619AAD3A700C27E9E /* Skin.cpp in Sources */, 3828C0C719EB8ACA002AB57B /* atomicops_internals_x86_gcc.cc in Sources */, DA8C62A219E52C6400000516 /* ioapi_mem.cpp in Sources */, 1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, B257B44E1989D5E800D9A687 /* CCPrimitive.cpp in Sources */, 299CF1FB19A434BC00C378C1 /* ccRandom.cpp in Sources */, 15AE18E819AAD35000C27E9E /* CCActionManagerEx.cpp in Sources */, + B29A7DDB19EE1B7700872B35 /* Event.c in Sources */, 15AE191B19AAD35000C27E9E /* CCTransformHelp.cpp in Sources */, 15AE190319AAD35000C27E9E /* CCComRender.cpp in Sources */, 1A57006D180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, @@ -6233,12 +6336,11 @@ 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1A7019AAD40300C27E9E /* b2Contact.cpp in Sources */, - 15AE19CA19AAD3A700C27E9E /* Atlas.cpp in Sources */, 15AE18A619AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */, 15AE18F619AAD35000C27E9E /* CCBatchNode.cpp in Sources */, - 15AE19C019AAD3A700C27E9E /* EventData.cpp in Sources */, 15AE184419AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */, 50ABBE591925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, + B29A7DDF19EE1B7700872B35 /* IkConstraintData.c in Sources */, 1A57007D180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, 15AE189F19AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, 1A570081180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, @@ -6266,6 +6368,7 @@ 50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */, 3828C0CB19EB8ACA002AB57B /* atomicops_internals_x86_msvc.cc in Sources */, 38B8E2CF19E65F4C002D7CE7 /* CSParseBinary.pb.cc in Sources */, + B29A7E1319EE1B7700872B35 /* Bone.c in Sources */, 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, @@ -6273,11 +6376,11 @@ 15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */, 3828C0DF19EB8ACA002AB57B /* stringprintf.cc in Sources */, 1A57011B180BC90D0088DEC7 /* CCGrabber.cpp in Sources */, + B29A7E3719EE1B7700872B35 /* AnimationStateData.c in Sources */, 15AE182419AAD2F700C27E9E /* CCMesh.cpp in Sources */, 15AE190D19AAD35000C27E9E /* CCDisplayManager.cpp in Sources */, 3828C0B119EB8ACA002AB57B /* message_lite.cc in Sources */, 1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */, - 15AE19CE19AAD3A700C27E9E /* Attachment.cpp in Sources */, 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, 15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, @@ -6287,6 +6390,7 @@ 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, 50CB247B19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, + B29A7DFF19EE1B7700872B35 /* Json.c in Sources */, 15AE1A8619AAD40300C27E9E /* b2MouseJoint.cpp in Sources */, 1A5701A5180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, 3828C0A919EB8ACA002AB57B /* zero_copy_stream_impl.cc in Sources */, @@ -6296,11 +6400,11 @@ 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, 1A5701B1180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, 15AE181619AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, + B29A7DED19EE1B7700872B35 /* IkConstraint.c in Sources */, 1A5701B5180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */, 1A5701B9180BCB5A0088DEC7 /* CCLabel.cpp in Sources */, 1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */, - 15AE19DC19AAD3A700C27E9E /* Json.cpp in Sources */, 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 15AE1A8819AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, @@ -6310,7 +6414,6 @@ 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, 15AE1A8C19AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, 50ABBD4C1925AB0000A911A9 /* MathUtil.cpp in Sources */, - 15AE19D419AAD3A700C27E9E /* BoneData.cpp in Sources */, 15AE191719AAD35000C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, 1A087AE81860400400196EF5 /* edtaa3func.cpp in Sources */, B37510731823AC9F00B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp in Sources */, @@ -6322,30 +6425,31 @@ 50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */, + 15B3707C19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */, 1A5701E2180BCB8C0088DEC7 /* CCScene.cpp in Sources */, 15AE1B9919AADFDF00C27E9E /* UIHBox.cpp in Sources */, 15AE199C19AAD39600C27E9E /* ScrollViewReader.cpp in Sources */, - 15AE19DA19AAD3A700C27E9E /* extension.cpp in Sources */, - 15AE19C219AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */, + B29A7E0519EE1B7700872B35 /* extension.c in Sources */, 15AE187E19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 1A12775C18DFCC590005F345 /* CCTweenFunction.cpp in Sources */, 1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, - 15AE19D819AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, - 15AE19E819AAD3A700C27E9E /* Slot.cpp in Sources */, B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 15AE1A6A19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE19BE19AAD3A700C27E9E /* Event.cpp in Sources */, + 15B3708819EE414C00ABE682 /* Manifest.cpp in Sources */, 1A5701EA180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, 3828C0D719EB8ACA002AB57B /* once.cc in Sources */, 15AE186B19AAD31D00C27E9E /* SimpleAudioEngine.mm in Sources */, 50ABBDAD1925AB4100A911A9 /* CCRenderer.cpp in Sources */, 15AE199019AAD37200C27E9E /* ImageViewReader.cpp in Sources */, 1A5701EE180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, + B29A7DE119EE1B7700872B35 /* MeshAttachment.c in Sources */, 15AE18F419AAD35000C27E9E /* CCArmatureDefine.cpp in Sources */, 15AE186619AAD31D00C27E9E /* CDOpenALSupport.m in Sources */, 1A5701F7180BCBAD0088DEC7 /* CCMenu.cpp in Sources */, 1A1645B2191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */, + B29A7DD119EE1B7700872B35 /* Skin.c in Sources */, 1A5701FB180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, 1A570202180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, @@ -6353,6 +6457,7 @@ 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, 292DB14D19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, 50ABBDB51925AB4100A911A9 /* CCTexture2D.cpp in Sources */, + B29A7DD719EE1B7700872B35 /* SkeletonData.c in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, 15AE18F219AAD35000C27E9E /* CCArmatureDataManager.cpp in Sources */, @@ -6370,6 +6475,7 @@ 1A570282180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, 1A570286180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, + B29A7E2F19EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */, B60C5BD419AC68B10056FBDE /* CCBillBoard.cpp in Sources */, 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, @@ -6377,12 +6483,16 @@ 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */, 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, 15AE1A2319AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, + B29A7DF319EE1B7700872B35 /* AttachmentLoader.c in Sources */, 1A57028A180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 15AE18E619AAD35000C27E9E /* CCActionFrameEasing.cpp in Sources */, + B29A7DC919EE1B7700872B35 /* SlotData.c in Sources */, 15AE190F19AAD35000C27E9E /* CCInputDelegate.cpp in Sources */, 15AE181A19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, + 15B3708019EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */, 1A570292180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, 1A570296180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, + B29A7E1B19EE1B7700872B35 /* SkeletonJson.c in Sources */, 50ABBE351925AB6F00A911A9 /* CCConsole.cpp in Sources */, 15AE1BB119AADFEF00C27E9E /* HttpClient.cpp in Sources */, 50ABBEAF1925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, @@ -6391,18 +6501,18 @@ 15AE1A2E19AAD3D500C27E9E /* b2TimeOfImpact.cpp in Sources */, 50ABC0111926664800A911A9 /* CCGLView.cpp in Sources */, 50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, + B29A7DD519EE1B7700872B35 /* RegionAttachment.c in Sources */, 3828C09719EB8ACA002AB57B /* extension_set.cc in Sources */, + B29A7E2519EE1B7700872B35 /* Attachment.c in Sources */, 1A5702C8180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, - 15AE19C619AAD3A700C27E9E /* AnimationState.cpp in Sources */, 15AE1B5519AADA9900C27E9E /* UIScrollView.cpp in Sources */, 15AE191919AAD35000C27E9E /* CCSSceneReader.cpp in Sources */, - 15AE19EC19AAD3A700C27E9E /* spine-cocos2dx.cpp in Sources */, 50ABBE7D1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, 1A5702EA180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 50ABBD971925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */, 15AE182019AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, 15AE1AD819AAD41000C27E9E /* b2Rope.cpp in Sources */, - 15AE19C419AAD3A700C27E9E /* Animation.cpp in Sources */, + B29A7DC719EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */, 15AE1A7C19AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, 15AE1A2619AAD3D500C27E9E /* b2CollideEdge.cpp in Sources */, 1A5702EE180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, @@ -6419,7 +6529,6 @@ 1A5702F6180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 1A5702FA180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */, - 15AE19E219AAD3A700C27E9E /* SkeletonData.cpp in Sources */, 15AE1A7219AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBD5C1925AB0000A911A9 /* Vec3.cpp in Sources */, @@ -6429,36 +6538,37 @@ 15AE1A2719AAD3D500C27E9E /* b2CollidePolygon.cpp in Sources */, 15AE199A19AAD39600C27E9E /* PageViewReader.cpp in Sources */, 1A57030C180BCF190088DEC7 /* CCComponent.cpp in Sources */, - 15AE19CC19AAD3A700C27E9E /* AtlasAttachmentLoader.cpp in Sources */, 15AE1A5919AAD40300C27E9E /* b2StackAllocator.cpp in Sources */, + B29A7E3D19EE1B7700872B35 /* AnimationState.c in Sources */, 15AE192219AAD35000C27E9E /* DictionaryHelper.cpp in Sources */, 15AE196C19AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, + B29A7E0719EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */, 1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, 15AE190719AAD35000C27E9E /* CCDatas.cpp in Sources */, B37510711823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */, 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, 50ABBD3C1925AB0000A911A9 /* CCGeometry.cpp in Sources */, + B29A7DDD19EE1B7700872B35 /* BoneData.c in Sources */, 15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, + B29A7DFB19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */, 50ABC0011926664800A911A9 /* CCLock-apple.cpp in Sources */, 15AE1A8019AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, 50ABBD931925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, 15AE183419AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, 1A57034B180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, 1A570354180BD0B00088DEC7 /* ioapi.cpp in Sources */, + 15B3707819EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */, 15AE19E419AAD3A700C27E9E /* SkeletonJson.cpp in Sources */, 1A570358180BD0B00088DEC7 /* unzip.cpp in Sources */, - 15AE19D219AAD3A700C27E9E /* Bone.cpp in Sources */, 3828C0CF19EB8ACA002AB57B /* common.cc in Sources */, + B29A7DCB19EE1B7700872B35 /* Skeleton.c in Sources */, 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 50ABBEB31925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, - 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, - 15AE19DE19AAD3A700C27E9E /* RegionAttachment.cpp in Sources */, 50CB247719D9C5A100687767 /* AudioCache.mm in Sources */, - 15AE19C819AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, 15AE18FA19AAD35000C27E9E /* CCColliderDetector.cpp in Sources */, 3828C0E919EB8ACA002AB57B /* wire_format_lite.cc in Sources */, 50ABBEA71925AB6F00A911A9 /* CCTouch.cpp in Sources */, @@ -6490,6 +6600,7 @@ 15AE18F019AAD35000C27E9E /* CCArmatureAnimation.cpp in Sources */, 50ABBE511925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */, + 15B3708419EE414C00ABE682 /* Downloader.cpp in Sources */, 50ABC0631926664800A911A9 /* CCDevice-mac.mm in Sources */, 15AE1A2819AAD3D500C27E9E /* b2Collision.cpp in Sources */, 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, @@ -6499,6 +6610,7 @@ 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, + B29A7DF119EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */, 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */, 15AE1BD219AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */, 50ABBEA31925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, @@ -6509,6 +6621,7 @@ 15AE1A2A19AAD3D500C27E9E /* b2Distance.cpp in Sources */, 50ABBE6D1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */, + B29A7DE319EE1B7700872B35 /* SkeletonBounds.c in Sources */, 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, 50ABBD541925AB0000A911A9 /* TransformUtils.cpp in Sources */, DABC9FA919E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */, @@ -6516,7 +6629,6 @@ 15AE1A3619AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */, - 15AE19E019AAD3A700C27E9E /* Skeleton.cpp in Sources */, 50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */, 15AE1A3219AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, @@ -6529,7 +6641,6 @@ 50ABBE611925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, 50ABBD9F1925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, 15AE1A8E19AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, - 15AE19BC19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */, 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, 50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, @@ -6550,8 +6661,10 @@ 15AE1B5D19AADA9900C27E9E /* UITextBMFont.cpp in Sources */, 15AE1BB519AADFEF00C27E9E /* SocketIO.cpp in Sources */, 15AE1B6519AADA9900C27E9E /* UIImageView.cpp in Sources */, + B29A7E1519EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */, 15AE1A2519AAD3D500C27E9E /* b2CollideCircle.cpp in Sources */, 50ABBE5D1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, + B29A7E2D19EE1B7700872B35 /* Slot.c in Sources */, 15AE182819AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */, 15AE19A619AAD39600C27E9E /* TextReader.cpp in Sources */, 15AE198819AAD36A00C27E9E /* ButtonReader.cpp in Sources */, @@ -6559,12 +6672,12 @@ 15AE1A8419AAD40300C27E9E /* b2Joint.cpp in Sources */, 50ABBD601925AB0000A911A9 /* Vec4.cpp in Sources */, 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */, + B29A7E2119EE1B7700872B35 /* PolygonBatch.cpp in Sources */, 15AE1A9219AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, - 15AE19EA19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */, 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */, 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, @@ -6608,9 +6721,9 @@ 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, - 15AE1A0319AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, 50ABC01A1926664800A911A9 /* CCSAXParser.cpp in Sources */, + B29A7E1C19EE1B7700872B35 /* SkeletonJson.c in Sources */, B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */, 38B8E2E219E671D2002D7CE7 /* UILayoutComponent.cpp in Sources */, B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */, @@ -6627,20 +6740,22 @@ 50ABBE281925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, 15AE18D519AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, 15AE192919AAD35100C27E9E /* TriggerMng.cpp in Sources */, + B29A7E0C19EE1B7700872B35 /* Atlas.c in Sources */, 3828C0A619EB8ACA002AB57B /* zero_copy_stream.cc in Sources */, 15AE185E19AAD31200C27E9E /* CocosDenshion.m in Sources */, 46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */, - 15AE1A0719AAD3A700C27E9E /* BoneData.cpp in Sources */, 1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */, 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */, + 15B3708919EE414C00ABE682 /* Manifest.cpp in Sources */, 15AE1A9B19AAD40300C27E9E /* b2Settings.cpp in Sources */, 1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, 3828C0D019EB8ACA002AB57B /* common.cc in Sources */, 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, 3828C0A019EB8ACA002AB57B /* coded_stream.cc in Sources */, 15AE197B19AAD35700C27E9E /* CCFrame.cpp in Sources */, + B29A7E3E19EE1B7700872B35 /* AnimationState.c in Sources */, 15AE1ABE19AAD40300C27E9E /* b2PolygonContact.cpp in Sources */, 1A57006E180BC5A10088DEC7 /* CCActionEase.cpp in Sources */, 50ABBD8C1925AB4100A911A9 /* CCGLProgram.cpp in Sources */, @@ -6648,6 +6763,7 @@ 1A570072180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, 15AE1ABC19AAD40300C27E9E /* b2PolygonAndCircleContact.cpp in Sources */, 15AE1ADA19AAD41000C27E9E /* b2Rope.cpp in Sources */, + B29A7E1619EE1B7700872B35 /* BoundingBoxAttachment.c in Sources */, DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */, 15AE1BF119AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */, 15AE1B8419AADA9A00C27E9E /* UITextField.cpp in Sources */, @@ -6655,8 +6771,8 @@ 50ABBE621925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, 15AE1AB619AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */, + B29A7E0619EE1B7700872B35 /* extension.c in Sources */, 3E6176681960F89B00DE83F5 /* CCController-iOS.mm in Sources */, - 15AE19EF19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */, 15AE18B219AAD33D00C27E9E /* CCBReader.cpp in Sources */, 15AE193C19AAD35100C27E9E /* CCArmatureDefine.cpp in Sources */, B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, @@ -6666,6 +6782,7 @@ 50ABBE7E1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */, 3828C0AE19EB8ACA002AB57B /* zero_copy_stream_impl_lite.cc in Sources */, 15AE183119AAD2F700C27E9E /* CCOBB.cpp in Sources */, + B29A7DCA19EE1B7700872B35 /* SlotData.c in Sources */, 15AE18C519AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 15AE1BF719AAE01E00C27E9E /* CCControlStepper.cpp in Sources */, 15AE1A3C19AAD3D500C27E9E /* b2CollideCircle.cpp in Sources */, @@ -6680,12 +6797,13 @@ 15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */, 15AE181719AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, 15AE18B719AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, - 15AE1A1119AAD3A700C27E9E /* RegionAttachment.cpp in Sources */, + B29A7E3819EE1B7700872B35 /* AnimationStateData.c in Sources */, 3828C0E019EB8ACA002AB57B /* stringprintf.cc in Sources */, 15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, 50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, 3828C0AA19EB8ACA002AB57B /* zero_copy_stream_impl.cc in Sources */, 15AE1AD219AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, + B29A7DCC19EE1B7700872B35 /* Skeleton.c in Sources */, 15AE1A4919AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, 15AE184119AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, 50ABBE5A1925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, @@ -6696,11 +6814,10 @@ 15AE1B7E19AADA9A00C27E9E /* UIText.cpp in Sources */, 15AE1A3E19AAD3D500C27E9E /* b2CollidePolygon.cpp in Sources */, 15AE1AB219AAD40300C27E9E /* b2CircleContact.cpp in Sources */, - 15AE1A1919AAD3A700C27E9E /* Skin.cpp in Sources */, + B29A7E2619EE1B7700872B35 /* Attachment.c in Sources */, 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, 15AE1BB919AADFF000C27E9E /* HttpClient.cpp in Sources */, - 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */, @@ -6713,19 +6830,15 @@ 15AE192419AAD35100C27E9E /* CocoLoader.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */, - 15AE1A1B19AAD3A700C27E9E /* Slot.cpp in Sources */, 38B8E2D019E65F4C002D7CE7 /* CSParseBinary.pb.cc in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, - 15AE19F319AAD3A700C27E9E /* EventData.cpp in Sources */, 15AE1BF319AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, 1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, 1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, 15AE1AB819AAD40300C27E9E /* b2EdgeAndCircleContact.cpp in Sources */, - 15AE19FF19AAD3A700C27E9E /* AtlasAttachmentLoader.cpp in Sources */, 1A57008A180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, - 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, - 15AE1A0119AAD3A700C27E9E /* Attachment.cpp in Sources */, + B29A7DE419EE1B7700872B35 /* SkeletonBounds.c in Sources */, 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */, @@ -6742,15 +6855,18 @@ 1A57010F180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, 1A570113180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, 1A57011C180BC90D0088DEC7 /* CCGrabber.cpp in Sources */, + B29A7E0019EE1B7700872B35 /* Json.c in Sources */, 1A570120180BC90D0088DEC7 /* CCGrid.cpp in Sources */, 15AE181119AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A57019E180BCB590088DEC7 /* CCFont.cpp in Sources */, 15AE1ACC19AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */, + 15B3708119EE414C00ABE682 /* CCEventListenerAssetsManagerEx.cpp in Sources */, 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, + B29A7E3C19EE1B7700872B35 /* Animation.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */, @@ -6782,11 +6898,12 @@ 15AE194219AAD35100C27E9E /* CCColliderDetector.cpp in Sources */, 15AE1A9919AAD40300C27E9E /* b2Math.cpp in Sources */, 3828C0B619EB8ACA002AB57B /* repeated_field.cc in Sources */, - 15AE1A0B19AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, 15AE1AA519AAD40300C27E9E /* b2Fixture.cpp in Sources */, + B29A7DE219EE1B7700872B35 /* MeshAttachment.c in Sources */, 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */, 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, + B29A7DDE19EE1B7700872B35 /* BoneData.c in Sources */, B375107E1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp in Sources */, 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, @@ -6795,6 +6912,7 @@ 15AE1AD619AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, + B29A7DEA19EE1B7700872B35 /* EventData.c in Sources */, 50ABBDBE1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, 1A5701E3180BCB8C0088DEC7 /* CCScene.cpp in Sources */, 50ABBD611925AB0000A911A9 /* Vec4.cpp in Sources */, @@ -6803,9 +6921,12 @@ 50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, + 15B3707D19EE414C00ABE682 /* CCEventAssetsManagerEx.cpp in Sources */, 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, + B29A7E2E19EE1B7700872B35 /* Slot.c in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, + B29A7DF419EE1B7700872B35 /* AttachmentLoader.c in Sources */, 1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, 15AE1A9D19AAD40300C27E9E /* b2StackAllocator.cpp in Sources */, 1A5701EF180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, @@ -6823,14 +6944,13 @@ 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */, 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */, 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, - 15AE1A0F19AAD3A700C27E9E /* Json.cpp in Sources */, 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */, 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, 1A570215180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 1A570222180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, - 15AE19F119AAD3A700C27E9E /* Event.cpp in Sources */, 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */, + B29A7DC819EE1B7700872B35 /* SkeletonRenderer.cpp in Sources */, 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */, 1A570226180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, 15AE194919AAD35100C27E9E /* CCComController.cpp in Sources */, @@ -6844,22 +6964,22 @@ B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, 29394CF719B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, + B29A7DF219EE1B7700872B35 /* AtlasAttachmentLoader.c in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, - 15AE1A1319AAD3A700C27E9E /* Skeleton.cpp in Sources */, 50ABBD901925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */, 15AE197F19AAD35700C27E9E /* CCTimeLine.cpp in Sources */, + B29A7DD819EE1B7700872B35 /* SkeletonData.c in Sources */, 1A57027F180BCC900088DEC7 /* CCSprite.cpp in Sources */, 15AE194719AAD35100C27E9E /* CCComAudio.cpp in Sources */, - 15AE19F919AAD3A700C27E9E /* AnimationState.cpp in Sources */, 15AE192719AAD35100C27E9E /* TriggerBase.cpp in Sources */, 15AE1B8819AADA9A00C27E9E /* UICheckBox.cpp in Sources */, 15AE1A4B19AAD3D500C27E9E /* b2EdgeShape.cpp in Sources */, 15AE18B519AAD33D00C27E9E /* CCBSequence.cpp in Sources */, + B29A7DD619EE1B7700872B35 /* RegionAttachment.c in Sources */, 1A570283180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */, 1A570287180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, - 15AE1A0919AAD3A700C27E9E /* CCSkeleton.cpp in Sources */, 15AE193E19AAD35100C27E9E /* CCBatchNode.cpp in Sources */, 15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */, 1A57028B180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, @@ -6874,12 +6994,10 @@ 15AE1A9F19AAD40300C27E9E /* b2Timer.cpp in Sources */, 15AE1AD419AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, - 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */, - 15AE19F519AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */, 1A5702F3180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, 15AE1BAF19AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, 15AE182119AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, @@ -6887,17 +7005,19 @@ 15AE18D919AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, 50ABBECC1925AB6F00A911A9 /* s3tc.cpp in Sources */, 15AE1B7819AADA9A00C27E9E /* UIRichText.cpp in Sources */, + B29A7E3019EE1B7700872B35 /* SkeletonAnimation.cpp in Sources */, 15AE195D19AAD35100C27E9E /* CCSkin.cpp in Sources */, 1A5702F7180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 50ABBEC61925AB6F00A911A9 /* etc1.cpp in Sources */, 50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */, + B29A7DE019EE1B7700872B35 /* IkConstraintData.c in Sources */, + B29A7DFC19EE1B7700872B35 /* spine-cocos2dx.cpp in Sources */, 15AE1BA919AADFDF00C27E9E /* UIVBox.cpp in Sources */, 50ABBDAE1925AB4100A911A9 /* CCRenderer.cpp in Sources */, 50ABBDBA1925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 1A5702FB180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, 1A570301180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, 15AE1A4519AAD3D500C27E9E /* b2TimeOfImpact.cpp in Sources */, - 15AE1A1F19AAD3A700C27E9E /* spine-cocos2dx.cpp in Sources */, 1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */, 15AE1B8F19AADA9A00C27E9E /* UIDeprecated.cpp in Sources */, 464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */, @@ -6917,25 +7037,24 @@ 1A570359180BD0B00088DEC7 /* unzip.cpp in Sources */, 15AE18BB19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, 15AE19B819AAD39700C27E9E /* TextFieldReader.cpp in Sources */, - 15AE1A1519AAD3A700C27E9E /* SkeletonData.cpp in Sources */, 15AE195B19AAD35100C27E9E /* CCSGUIReader.cpp in Sources */, 50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, 15AE19B019AAD39700C27E9E /* ScrollViewReader.cpp in Sources */, 50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */, - 15AE1A1719AAD3A700C27E9E /* SkeletonJson.cpp in Sources */, 15AE182D19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, 50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, + B29A7DEE19EE1B7700872B35 /* IkConstraint.c in Sources */, 15AE1A9619AAD40300C27E9E /* b2Draw.cpp in Sources */, 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, + B29A7E0819EE1B7700872B35 /* SkinnedMeshAttachment.c in Sources */, 15AE183919AAD2F700C27E9E /* CCRay.cpp in Sources */, 15AE1B8219AADA9A00C27E9E /* UITextBMFont.cpp in Sources */, 50ABBE6A1925AB6F00A911A9 /* CCEventListenerFocus.cpp in Sources */, 50ABBE661925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, 503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */, - 15AE19FD19AAD3A700C27E9E /* Atlas.cpp in Sources */, 50ABBDB21925AB4100A911A9 /* ccShaders.cpp in Sources */, 50ABBD451925AB0000A911A9 /* CCVertex.cpp in Sources */, 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, @@ -6954,11 +7073,13 @@ 50ABBDA81925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */, 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, + B29A7DD219EE1B7700872B35 /* Skin.c in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 15AE1AC219AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, 3828C0B219EB8ACA002AB57B /* message_lite.cc in Sources */, 503DD8E71926736A00CD74DD /* CCEAGLView-ios.mm in Sources */, 3E2BDAEC19C0436F0055CDCD /* AudioEngine.cpp in Sources */, + 15B3707919EE414C00ABE682 /* AssetsManagerEx.cpp in Sources */, 50ABBDA41925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, @@ -6977,11 +7098,11 @@ 3EA1073019D7F37700CAB794 /* CCLight.cpp in Sources */, 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */, - 15AE1A0D19AAD3A700C27E9E /* extension.cpp in Sources */, 15AE180919AAD2F700C27E9E /* CCAABB.cpp in Sources */, 15AE1AA719AAD40300C27E9E /* b2Island.cpp in Sources */, 3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */, 50ABBE361925AB6F00A911A9 /* CCConsole.cpp in Sources */, + B29A7E1419EE1B7700872B35 /* Bone.c in Sources */, 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */, 15AE194519AAD35100C27E9E /* CCComAttribute.cpp in Sources */, 15AE18CC19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, @@ -7005,13 +7126,15 @@ 15AE183519AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, 50ABBED01925AB6F00A911A9 /* TGAlib.cpp in Sources */, 1A01C68518F57BE800EFE3A6 /* CCArray.cpp in Sources */, + B29A7E2219EE1B7700872B35 /* PolygonBatch.cpp in Sources */, 503DD8E31926736A00CD74DD /* CCDevice-ios.mm in Sources */, 15AE1AB419AAD40300C27E9E /* b2Contact.cpp in Sources */, - 15AE19F719AAD3A700C27E9E /* Animation.cpp in Sources */, + B29A7DDC19EE1B7700872B35 /* Event.c in Sources */, 50ABBEB41925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 1A1645B1191B726C008C7C7F /* ConvertUTF.c in Sources */, 50ABBE3A1925AB6F00A911A9 /* CCData.cpp in Sources */, 1A1645B3191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, + 15B3708519EE414C00ABE682 /* Downloader.cpp in Sources */, 3828C09C19EB8ACA002AB57B /* generated_message_util.cc in Sources */, 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, 15AE180D19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 93e6da9abb..1dc2263953 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -50,6 +50,11 @@ 15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; }; 15AECE25195D467D00907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; }; 15B0870D195AD52000D6F62B /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; }; + 15B3709319EE5D1000ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; }; + 15B3709419EE5D1000ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; }; + 15B3709819EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; }; + 15B3709919EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; }; + 15B3709A19EE5EED00ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; }; 15C64825165F3934007D4F18 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64824165F3934007D4F18 /* OpenGL.framework */; }; 15C64827165F394E007D4F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64826165F394E007D4F18 /* QuartzCore.framework */; }; 15C64829165F396B007D4F18 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64828165F396B007D4F18 /* OpenAL.framework */; }; @@ -767,6 +772,18 @@ 3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; }; 3EA0FB66191B933000B170C8 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; }; 3EA0FB72191C844400B170C8 /* UIVideoPlayerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB70191C844400B170C8 /* UIVideoPlayerTest.cpp */; }; + 527B1F3019EF9819000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F2E19EF9819000A1F82 /* Default-667h@2x.png */; }; + 527B1F3119EF9819000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F2F19EF9819000A1F82 /* Default-736h@3x.png */; }; + 527B1F3419EF9CF8000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3219EF9CF8000A1F82 /* Default-667h@2x.png */; }; + 527B1F3519EF9CF8000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3319EF9CF8000A1F82 /* Default-736h@3x.png */; }; + 527B1F3819EFABC9000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3619EFABC9000A1F82 /* Default-667h@2x.png */; }; + 527B1F3919EFABC9000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3719EFABC9000A1F82 /* Default-736h@3x.png */; }; + 527B1F3C19EFACBB000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3A19EFACBB000A1F82 /* Default-667h@2x.png */; }; + 527B1F3D19EFACBB000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3B19EFACBB000A1F82 /* Default-736h@3x.png */; }; + 527B1F4019EFAD44000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3E19EFAD44000A1F82 /* Default-667h@2x.png */; }; + 527B1F4119EFAD44000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F3F19EFAD44000A1F82 /* Default-736h@3x.png */; }; + 527B1F4419EFAE13000A1F82 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F4219EFAE13000A1F82 /* Default-667h@2x.png */; }; + 527B1F4519EFAE13000A1F82 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 527B1F4319EFAE13000A1F82 /* Default-736h@3x.png */; }; 59620E8F1921E5CF002021B6 /* Bug-Child.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59620E8D1921E5CF002021B6 /* Bug-Child.cpp */; }; 59620E901921E5CF002021B6 /* Bug-Child.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59620E8D1921E5CF002021B6 /* Bug-Child.cpp */; }; 5EBEECB01995247000429821 /* DrawNode3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EBEECAE1995247000429821 /* DrawNode3D.cpp */; }; @@ -998,6 +1015,9 @@ 15427B77198B843300DC375D /* lua_module_register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_module_register.h; sourceTree = ""; }; 15427B7B198B880100DC375D /* lua_cocos2dx_controller_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lua_cocos2dx_controller_manual.cpp; path = "../../../../cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp"; sourceTree = ""; }; 15427B7C198B880100DC375D /* lua_cocos2dx_controller_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = lua_cocos2dx_controller_manual.hpp; path = "../../../../cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.hpp"; sourceTree = ""; }; + 15B3709219EE5D1000ABE682 /* Manifests */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Manifests; path = "../tests/cpp-tests/Resources/Manifests"; sourceTree = ""; }; + 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AssetsManagerExTest.cpp; sourceTree = ""; }; + 15B3709719EE5DBA00ABE682 /* AssetsManagerExTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsManagerExTest.h; sourceTree = ""; }; 15C64822165F391E007D4F18 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 15C64824165F3934007D4F18 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/OpenGL.framework; sourceTree = DEVELOPER_DIR; }; 15C64826165F394E007D4F18 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; @@ -2601,12 +2621,12 @@ 1D6058910D05DD3D006BFB54 /* cpp-tests Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cpp-tests Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 1F33634D18E37E840074764D /* RefPtrTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefPtrTest.cpp; sourceTree = ""; }; 1F33634E18E37E840074764D /* RefPtrTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefPtrTest.h; sourceTree = ""; }; - 29080D1A191B574B0066F8DF /* UITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UITest.cpp; path = ../UITest.cpp; sourceTree = ""; }; - 29080D1B191B574B0066F8DF /* UITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UITest.h; path = ../UITest.h; sourceTree = ""; }; + 29080D1A191B574B0066F8DF /* UITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UITest.cpp; path = UITest/UITest.cpp; sourceTree = ""; }; + 29080D1B191B574B0066F8DF /* UITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UITest.h; path = UITest/UITest.h; sourceTree = ""; }; 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUIScene.cpp; sourceTree = ""; }; 29080D20191B595E0066F8DF /* CocosGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUIScene.h; sourceTree = ""; }; - 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoStudioGUITest.cpp; sourceTree = ""; }; - 29080D22191B595E0066F8DF /* CocoStudioGUITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoStudioGUITest.h; sourceTree = ""; }; + 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CocoStudioGUITest.cpp; path = UITest/CocoStudioGUITest/CocoStudioGUITest.cpp; sourceTree = ""; }; + 29080D22191B595E0066F8DF /* CocoStudioGUITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocoStudioGUITest.h; path = UITest/CocoStudioGUITest/CocoStudioGUITest.h; sourceTree = ""; }; 29080D23191B595E0066F8DF /* CustomGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomGUIScene.cpp; path = ../CustomGUIScene.cpp; sourceTree = ""; }; 29080D24191B595E0066F8DF /* CustomGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomGUIScene.h; path = ../CustomGUIScene.h; sourceTree = ""; }; 29080D27191B595E0066F8DF /* CustomImageTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageTest.cpp; sourceTree = ""; }; @@ -2754,6 +2774,18 @@ 3EA0FB70191C844400B170C8 /* UIVideoPlayerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVideoPlayerTest.cpp; sourceTree = ""; }; 3EA0FB71191C844400B170C8 /* UIVideoPlayerTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoPlayerTest.h; sourceTree = ""; }; 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = cocos2d_libs.xcodeproj; sourceTree = ""; }; + 527B1F2E19EF9819000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F2F19EF9819000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 527B1F3219EF9CF8000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F3319EF9CF8000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 527B1F3619EFABC9000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F3719EFABC9000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 527B1F3A19EFACBB000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F3B19EFACBB000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 527B1F3E19EFAD44000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F3F19EFAD44000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; + 527B1F4219EFAE13000A1F82 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 527B1F4319EFAE13000A1F82 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; 59620E8D1921E5CF002021B6 /* Bug-Child.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "Bug-Child.cpp"; sourceTree = ""; }; 59620E8E1921E5CF002021B6 /* Bug-Child.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bug-Child.h"; sourceTree = ""; }; 5EBEECAE1995247000429821 /* DrawNode3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DrawNode3D.cpp; path = Sprite3DTest/DrawNode3D.cpp; sourceTree = ""; }; @@ -2978,6 +3010,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 15B3709519EE5DBA00ABE682 /* AssetsManagerExTest */ = { + isa = PBXGroup; + children = ( + 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */, + 15B3709719EE5DBA00ABE682 /* AssetsManagerExTest.h */, + ); + path = AssetsManagerExTest; + sourceTree = ""; + }; 15CBA087196EE66D005877BB /* lua-game-controller-test */ = { isa = PBXGroup; children = ( @@ -5039,6 +5080,8 @@ 15CBA53D196EE671005877BB /* proj.ios */ = { isa = PBXGroup; children = ( + 527B1F3619EFABC9000A1F82 /* Default-667h@2x.png */, + 527B1F3719EFABC9000A1F82 /* Default-736h@3x.png */, 15CBA53E196EE671005877BB /* AppController.h */, 15CBA53F196EE671005877BB /* AppController.mm */, 15CBA540196EE671005877BB /* Default-568h@2x.png */, @@ -5131,6 +5174,8 @@ 1AC358C418CEC1CA00F37B72 /* proj.ios */ = { isa = PBXGroup; children = ( + 527B1F2E19EF9819000A1F82 /* Default-667h@2x.png */, + 527B1F2F19EF9819000A1F82 /* Default-736h@3x.png */, 1AC358C518CEC1CA00F37B72 /* AppController.h */, 1AC358C618CEC1CA00F37B72 /* AppController.mm */, 1AC358C718CEC1CA00F37B72 /* Default-568h@2x.png */, @@ -5540,6 +5585,7 @@ 1AC359B418CECF0B00F37B72 /* ExtensionsTest */ = { isa = PBXGroup; children = ( + 15B3709519EE5DBA00ABE682 /* AssetsManagerExTest */, 38FA2E70194AEBE100FF2BE4 /* CocoStudioActionTimelineTest */, 1AC359B518CECF0B00F37B72 /* CocosBuilderTest */, 1AC359DC18CECF0B00F37B72 /* CocoStudioArmatureTest */, @@ -6171,6 +6217,8 @@ 1AC35C6D18CECF1400F37B72 /* proj.ios */ = { isa = PBXGroup; children = ( + 527B1F3219EF9CF8000A1F82 /* Default-667h@2x.png */, + 527B1F3319EF9CF8000A1F82 /* Default-736h@3x.png */, 1AC35C6E18CECF1400F37B72 /* Classes */, 1AC35C7318CECF1400F37B72 /* Default-568h@2x.png */, 1AC35C7418CECF1400F37B72 /* Default.png */, @@ -6222,6 +6270,7 @@ 1AC35CA818CED83500F37B72 /* Resources */ = { isa = PBXGroup; children = ( + 15B3709219EE5D1000ABE682 /* Manifests */, 3E2BDB0019C5E5D40055CDCD /* background.wav */, 3E2BDAD119BEA3E20055CDCD /* audio */, 38FA2E75194AECF800FF2BE4 /* ActionTimeline */, @@ -6294,6 +6343,8 @@ 1AC35D3318CEDE9400F37B72 /* proj.ios */ = { isa = PBXGroup; children = ( + 527B1F3E19EFAD44000A1F82 /* Default-667h@2x.png */, + 527B1F3F19EFAD44000A1F82 /* Default-736h@3x.png */, 1AC35D3418CEDE9400F37B72 /* AppController.h */, 1AC35D3518CEDE9400F37B72 /* AppController.mm */, 1AC35D3618CEDE9400F37B72 /* Default-568h@2x.png */, @@ -6376,6 +6427,8 @@ 1AC35D8518CEE5D100F37B72 /* ios */ = { isa = PBXGroup; children = ( + 527B1F4219EFAE13000A1F82 /* Default-667h@2x.png */, + 527B1F4319EFAE13000A1F82 /* Default-736h@3x.png */, 1AC35D8618CEE5D100F37B72 /* AppController.h */, 1AC35D8718CEE5D100F37B72 /* AppController.mm */, 1AC35D8818CEE5D100F37B72 /* Default-568h@2x.png */, @@ -6428,14 +6481,6 @@ sourceTree = ""; }; 29080D17191B571F0066F8DF /* UITest */ = { - isa = PBXGroup; - children = ( - 29080D1E191B595E0066F8DF /* CocoStudioGUITest */, - ); - name = UITest; - sourceTree = ""; - }; - 29080D1E191B595E0066F8DF /* CocoStudioGUITest */ = { isa = PBXGroup; children = ( 29080D1A191B574B0066F8DF /* UITest.cpp */, @@ -6446,8 +6491,7 @@ 29FBBBFB196A9ECD00E65826 /* CocostudioParserTest */, 29080D25191B595E0066F8DF /* CustomTest */, ); - name = CocoStudioGUITest; - path = UITest/CocoStudioGUITest; + name = UITest; sourceTree = ""; }; 29080D25191B595E0066F8DF /* CustomTest */ = { @@ -6459,7 +6503,8 @@ 29080D26191B595E0066F8DF /* CustomImageTest */, 29080D29191B595E0066F8DF /* CustomParticleWidgetTest */, ); - path = CustomTest; + name = CustomTest; + path = UITest/CocoStudioGUITest/CustomTest; sourceTree = ""; }; 29080D26191B595E0066F8DF /* CustomImageTest */ = { @@ -6679,6 +6724,24 @@ name = UIWebViewTest; sourceTree = ""; }; + 29AAE28519F0BD02004F5A18 /* UIScale9SpriteTest */ = { + isa = PBXGroup; + children = ( + 295824571987415900F9746D /* UIScale9SpriteTest.cpp */, + 295824581987415900F9746D /* UIScale9SpriteTest.h */, + ); + name = UIScale9SpriteTest; + sourceTree = ""; + }; + 29AAE28619F0BD12004F5A18 /* UIEditBoxTest */ = { + isa = PBXGroup; + children = ( + 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */, + 292CF01319A1965E00E8E6A0 /* UIEditBoxTest.h */, + ); + name = UIEditBoxTest; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( @@ -6753,17 +6816,13 @@ 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */, 29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */, ); - path = CocostudioParserTest; + name = CocostudioParserTest; + path = UITest/CocoStudioGUITest/CocostudioParserTest; sourceTree = ""; }; 29FBBC00196A9F0D00E65826 /* UIAndEditorTests */ = { isa = PBXGroup; children = ( - 298D7F6C19AC31C000FF096D /* UIWebViewTest */, - 295824571987415900F9746D /* UIScale9SpriteTest.cpp */, - 295824581987415900F9746D /* UIScale9SpriteTest.h */, - 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */, - 292CF01319A1965E00E8E6A0 /* UIEditBoxTest.h */, 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, 29080D20191B595E0066F8DF /* CocosGUIScene.h */, 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */, @@ -6776,6 +6835,9 @@ 29080D67191B595E0066F8DF /* UISceneManager.h */, 29080D68191B595E0066F8DF /* UISceneManager_Editor.cpp */, 29080D69191B595E0066F8DF /* UISceneManager_Editor.h */, + 29AAE28619F0BD12004F5A18 /* UIEditBoxTest */, + 29AAE28519F0BD02004F5A18 /* UIScale9SpriteTest */, + 298D7F6C19AC31C000FF096D /* UIWebViewTest */, 29080D6A191B595E0066F8DF /* UIScrollViewTest */, 29080D6F191B595E0066F8DF /* UISliderTest */, 29080D74191B595E0066F8DF /* UITextAtlasTest */, @@ -6795,6 +6857,7 @@ 3EA0FB6F191C844400B170C8 /* UIVideoPlayerTest */, ); name = UIAndEditorTests; + path = UITest/CocoStudioGUITest; sourceTree = ""; }; 38FA2E70194AEBE100FF2BE4 /* CocoStudioActionTimelineTest */ = { @@ -6841,6 +6904,8 @@ 3E6176DC1960FA6300DE83F5 /* proj.ios */ = { isa = PBXGroup; children = ( + 527B1F3A19EFACBB000A1F82 /* Default-667h@2x.png */, + 527B1F3B19EFACBB000A1F82 /* Default-736h@3x.png */, 3E6176DD1960FA6300DE83F5 /* AppController.h */, 3E6176DE1960FA6300DE83F5 /* AppController.mm */, 3E6176DF1960FA6300DE83F5 /* Default-568h@2x.png */, @@ -7223,10 +7288,12 @@ buildActionMask = 2147483647; files = ( 15CBA9B3196EE824005877BB /* src in Resources */, + 527B1F3819EFABC9000A1F82 /* Default-667h@2x.png in Resources */, 15CBA9AF196EE80B005877BB /* fonts in Resources */, 15CBA9B0196EE80B005877BB /* ipad in Resources */, 15CBA9B1196EE80B005877BB /* ipadhd in Resources */, 15CBA9B2196EE80B005877BB /* iphone in Resources */, + 527B1F3919EFABC9000A1F82 /* Default-736h@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7270,6 +7337,7 @@ 1AC358E818CEC1CB00F37B72 /* Icon-76.png in Resources */, 1AC358E418CEC1CB00F37B72 /* Icon-40.png in Resources */, 1AC358E618CEC1CB00F37B72 /* Icon-58.png in Resources */, + 527B1F3019EF9819000A1F82 /* Default-667h@2x.png in Resources */, 1AC358DB18CEC1CB00F37B72 /* Default-568h@2x.png in Resources */, 1AC358DF18CEC1CB00F37B72 /* Icon-100.png in Resources */, 1AC358E218CEC1CB00F37B72 /* Icon-144.png in Resources */, @@ -7280,6 +7348,7 @@ 1AC358E318CEC1CB00F37B72 /* Icon-152.png in Resources */, 1AC358E518CEC1CB00F37B72 /* Icon-57.png in Resources */, 1AC358DC18CEC1CB00F37B72 /* Default.png in Resources */, + 527B1F3119EF9819000A1F82 /* Default-736h@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7289,6 +7358,7 @@ files = ( 1AC35D4A18CEDE9400F37B72 /* Icon-120.png in Resources */, 1AC35D4D18CEDE9400F37B72 /* Icon-57.png in Resources */, + 527B1F4019EFAD44000A1F82 /* Default-667h@2x.png in Resources */, 1AC35D4B18CEDE9400F37B72 /* Icon-144.png in Resources */, 1AC35D4618CEDE9400F37B72 /* Default-568h@2x.png in Resources */, 1AC35D4818CEDE9400F37B72 /* Default@2x.png in Resources */, @@ -7299,6 +7369,7 @@ 1AC35D2C18CEDE7200F37B72 /* src in Resources */, 1AC35D4C18CEDE9400F37B72 /* Icon-152.png in Resources */, 1AC35D4718CEDE9400F37B72 /* Default.png in Resources */, + 527B1F4119EFAD44000A1F82 /* Default-736h@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7349,6 +7420,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15B3709A19EE5EED00ABE682 /* Manifests in Resources */, 15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */, 15B0870D195AD52000D6F62B /* ActionTimeline in Resources */, 15E66FC8192D957100C20A52 /* Sprite3DTest in Resources */, @@ -7367,12 +7439,14 @@ 1AC35D9E18CEE5D100F37B72 /* Icon-144.png in Resources */, 1AC35DF818CEE65B00F37B72 /* pew-pew-lei.wav in Resources */, 1AC35D9918CEE5D100F37B72 /* Default-568h@2x.png in Resources */, + 527B1F4419EFAE13000A1F82 /* Default-667h@2x.png in Resources */, 1AC35D9B18CEE5D100F37B72 /* Default@2x.png in Resources */, 1AC35DCE18CEE65200F37B72 /* components in Resources */, 1AC35D7618CEE58500F37B72 /* src in Resources */, 1AC35DDC18CEE65200F37B72 /* zwoptex in Resources */, 1AC35DEC18CEE65B00F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */, 1AC35DED18CEE65B00F37B72 /* music.mid in Resources */, + 527B1F4519EFAE13000A1F82 /* Default-736h@3x.png in Resources */, 1AC35DD018CEE65200F37B72 /* extensions in Resources */, 1AC35DD318CEE65200F37B72 /* Images in Resources */, 1AC35DF018CEE65B00F37B72 /* effect2.ogg in Resources */, @@ -7407,6 +7481,7 @@ 1AC35CFA18CED84500F37B72 /* Misc in Resources */, 38FA2E76194AECF800FF2BE4 /* ActionTimeline in Resources */, 1AC35D0418CED84500F37B72 /* Shaders in Resources */, + 15B3709319EE5D1000ABE682 /* Manifests in Resources */, 3E2F27BA19CFF52300E7C490 /* audio in Resources */, 1AC35CD818CED84500F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */, B2507B6B192589AF00FA4972 /* Shaders3D in Resources */, @@ -7449,6 +7524,8 @@ 3E6177F71960FEFE00DE83F5 /* iphone in Resources */, 3E6178011960FF1800DE83F5 /* Icon-57.png in Resources */, 3E6177F51960FEFE00DE83F5 /* ipad in Resources */, + 527B1F3D19EFACBB000A1F82 /* Default-736h@3x.png in Resources */, + 527B1F3C19EFACBB000A1F82 /* Default-667h@2x.png in Resources */, 3E6177F81960FF1800DE83F5 /* Default-568h@2x.png in Resources */, 3E6177FA1960FF1800DE83F5 /* Default@2x.png in Resources */, 3E6177FB1960FF1800DE83F5 /* Icon-100.png in Resources */, @@ -7486,6 +7563,7 @@ 3E2BDAD219BEA3E20055CDCD /* audio in Resources */, C08689C318D370C90093E810 /* background.caf in Resources */, 1AC35C9518CECF1400F37B72 /* Icon-72.png in Resources */, + 15B3709419EE5D1000ABE682 /* Manifests in Resources */, 1AC35D0B18CED84500F37B72 /* zwoptex in Resources */, 1AC35CF518CED84500F37B72 /* Images in Resources */, 1AC35C9118CECF1400F37B72 /* Icon-40.png in Resources */, @@ -7507,6 +7585,8 @@ 38FA2E77194AECF800FF2BE4 /* ActionTimeline in Resources */, 1AC35C9718CECF1400F37B72 /* Icon-80.png in Resources */, 1AC35CEB18CED84500F37B72 /* fileLookup.plist in Resources */, + 527B1F3519EF9CF8000A1F82 /* Default-736h@3x.png in Resources */, + 527B1F3419EF9CF8000A1F82 /* Default-667h@2x.png in Resources */, 1AC35CFD18CED84500F37B72 /* music.mid in Resources */, 1AC35D0718CED84500F37B72 /* spine in Resources */, 1AC35C8D18CECF1400F37B72 /* Icon-120.png in Resources */, @@ -7859,6 +7939,7 @@ 1AC35C4B18CECF0C00F37B72 /* ShaderTest2.cpp in Sources */, 38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */, 1AC35C6518CECF0C00F37B72 /* UnitTest.cpp in Sources */, + 15B3709819EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */, 29080DC9191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */, 1AC35B3F18CECF0C00F37B72 /* Bug-458.cpp in Sources */, 3E2F27B919CFF4AF00E7C490 /* NewAudioEngineTest.cpp in Sources */, @@ -8003,6 +8084,7 @@ 1AC35B7C18CECF0C00F37B72 /* GameOverScene.cpp in Sources */, 1AC35BF418CECF0C00F37B72 /* ExtensionsTest.cpp in Sources */, 1AC35B3618CECF0C00F37B72 /* TestEntries.cpp in Sources */, + 15B3709919EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */, 1AC35B2E18CECF0C00F37B72 /* Box2dTest.cpp in Sources */, 29080DCA191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */, 1AC35C1218CECF0C00F37B72 /* LabelTestNew.cpp in Sources */, diff --git a/build/winrt/Cocos2dShaderCompiler/Assets/Logo.png b/build/winrt/Cocos2dShaderCompiler/Assets/Logo.png deleted file mode 100644 index e26771cb33..0000000000 Binary files a/build/winrt/Cocos2dShaderCompiler/Assets/Logo.png and /dev/null differ diff --git a/build/winrt/Cocos2dShaderCompiler/Assets/SmallLogo.png b/build/winrt/Cocos2dShaderCompiler/Assets/SmallLogo.png deleted file mode 100644 index 1eb0d9d528..0000000000 Binary files a/build/winrt/Cocos2dShaderCompiler/Assets/SmallLogo.png and /dev/null differ diff --git a/build/winrt/Cocos2dShaderCompiler/Assets/SplashScreen.png b/build/winrt/Cocos2dShaderCompiler/Assets/SplashScreen.png deleted file mode 100644 index c951e031bd..0000000000 Binary files a/build/winrt/Cocos2dShaderCompiler/Assets/SplashScreen.png and /dev/null differ diff --git a/build/winrt/Cocos2dShaderCompiler/Assets/StoreLogo.png b/build/winrt/Cocos2dShaderCompiler/Assets/StoreLogo.png deleted file mode 100644 index dcb672712c..0000000000 Binary files a/build/winrt/Cocos2dShaderCompiler/Assets/StoreLogo.png and /dev/null differ diff --git a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln b/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln deleted file mode 100644 index 19e9068b62..0000000000 --- a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cocos2dShaderCompiler", "Cocos2dShaderCompiler.vcxproj", "{4F6DEF20-AC4C-487F-85B8-5993519E3911}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\cocos\2d\cocos2d_winrt.vcxproj", "{2330EDF4-5596-4B53-8BA5-158DDDE713D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|ARM = Release|ARM - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.ActiveCfg = Debug|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.Build.0 = Debug|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.Deploy.0 = Debug|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.ActiveCfg = Debug|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.Build.0 = Debug|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.Deploy.0 = Debug|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.ActiveCfg = Debug|x64 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.Build.0 = Debug|x64 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.Deploy.0 = Debug|x64 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.ActiveCfg = Release|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.Build.0 = Release|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.Deploy.0 = Release|ARM - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.ActiveCfg = Release|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.Build.0 = Release|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.Deploy.0 = Release|Win32 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.ActiveCfg = Release|x64 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.Build.0 = Release|x64 - {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.Deploy.0 = Release|x64 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|ARM.ActiveCfg = Debug|ARM - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|ARM.Build.0 = Debug|ARM - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|Win32.Build.0 = Debug|Win32 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|x64.ActiveCfg = Debug|x64 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Debug|x64.Build.0 = Debug|x64 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|ARM.ActiveCfg = Release|ARM - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|ARM.Build.0 = Release|ARM - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|Win32.ActiveCfg = Release|Win32 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|Win32.Build.0 = Release|Win32 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|x64.ActiveCfg = Release|x64 - {2330EDF4-5596-4B53-8BA5-158DDDE713D9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj b/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj deleted file mode 100644 index 241f6f7220..0000000000 --- a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj +++ /dev/null @@ -1,259 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - Debug - ARM - - - Release - ARM - - - - {4f6def20-ac4c-487f-85b8-5993519e3911} - Cocos2dShaderCompiler - en-US - 12.0 - true - Windows Store - 8.1 - - - - Application - true - v120 - - - Application - true - v120 - - - Application - true - v120 - - - Application - false - true - v120 - - - Application - false - true - v120 - - - Application - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cocos2dShaderCompiler_TemporaryKey.pfx - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;_DEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;NDEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store;$(VCInstallDir)\lib - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;_DEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;NDEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;_DEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 - - - pch.h - $(IntDir)pch.pch - $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) - /bigobj %(AdditionalOptions) - 4453;28204;4996; - WINRT;CC_USE_PHYSICS=0;NDEBUG;%(PreprocessorDefinitions) - NotUsing - - - - - - - - - - - App.xaml - - - DirectXPage.xaml - - - - - - App.xaml - - - DirectXPage.xaml - - - - - - Designer - - - true - true - - - true - true - - - - - - Designer - - - Designer - - - - - {2330edf4-5596-4b53-8ba5-158ddde713d9} - - - - - - - - - \ No newline at end of file diff --git a/build/winrt/Cocos2dShaderCompiler/App.xaml b/build/wp8/Cocos2dShaderCompiler/App.xaml similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/App.xaml rename to build/wp8/Cocos2dShaderCompiler/App.xaml diff --git a/build/winrt/Cocos2dShaderCompiler/App.xaml.cpp b/build/wp8/Cocos2dShaderCompiler/App.xaml.cpp similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/App.xaml.cpp rename to build/wp8/Cocos2dShaderCompiler/App.xaml.cpp diff --git a/build/winrt/Cocos2dShaderCompiler/App.xaml.h b/build/wp8/Cocos2dShaderCompiler/App.xaml.h similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/App.xaml.h rename to build/wp8/Cocos2dShaderCompiler/App.xaml.h diff --git a/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln new file mode 100644 index 0000000000..481fbd3963 --- /dev/null +++ b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln @@ -0,0 +1,98 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cocos2dShaderCompiler", "Cocos2dShaderCompiler.vcxproj", "{4F6DEF20-AC4C-487F-85B8-5993519E3911}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d", "libcocos2d", "{29321038-F308-421E-B8CA-140BB23D3C6D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Shared", "..\..\..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems", "{5D6F020F-7E72-4494-90A0-2DF11D235DF9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{ECA7A2AA-8501-4177-8360-322A569B6C3E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Box2D", "Box2D", "{7CA66464-6A5E-493B-82EF-DBD84F91766F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libSpine", "libSpine", "{8F8A69D6-BD64-4BAD-AE20-2D07E7BD57BA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d.Shared", "..\..\..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems", "{4A3C6BA8-C227-498B-AA21-40BDA27B461F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d.Windows", "..\..\..\external\Box2D\proj.win8.1-universal\libbox2d.Windows\libbox2d.Windows.vcxproj", "{3B26A12D-3A44-47EA-82D2-282660FC844D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine.Shared", "..\..\..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems", "{ADAFD00D-A0D6-46EF-9F0B-EA2880BFE1DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine.Windows", "..\..\..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Windows\libSpine.Windows.vcxproj", "{F3550FE0-C795-44F6-8FEB-093EB68143AE}" +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + ..\..\..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\..\..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 + ..\..\..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 + ..\..\..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{3b26a12d-3a44-47ea-82d2-282660fc844d}*SharedItemsImports = 4 + ..\..\..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{f3550fe0-c795-44f6-8feb-093eb68143ae}*SharedItemsImports = 4 + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|ARM = Release|ARM + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.ActiveCfg = Debug|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.Build.0 = Debug|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|ARM.Deploy.0 = Debug|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.ActiveCfg = Debug|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.Build.0 = Debug|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|Win32.Deploy.0 = Debug|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.ActiveCfg = Debug|x64 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.Build.0 = Debug|x64 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Debug|x64.Deploy.0 = Debug|x64 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.ActiveCfg = Release|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.Build.0 = Release|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|ARM.Deploy.0 = Release|ARM + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.ActiveCfg = Release|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.Build.0 = Release|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|Win32.Deploy.0 = Release|Win32 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.ActiveCfg = Release|x64 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.Build.0 = Release|x64 + {4F6DEF20-AC4C-487F-85B8-5993519E3911}.Release|x64.Deploy.0 = Release|x64 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|ARM.ActiveCfg = Debug|ARM + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|ARM.Build.0 = Debug|ARM + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|Win32.Build.0 = Debug|Win32 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|x64.ActiveCfg = Debug|x64 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Debug|x64.Build.0 = Debug|x64 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|ARM.ActiveCfg = Release|ARM + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|ARM.Build.0 = Release|ARM + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|Win32.ActiveCfg = Release|Win32 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|Win32.Build.0 = Release|Win32 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|x64.ActiveCfg = Release|x64 + {3B26A12D-3A44-47EA-82D2-282660FC844D}.Release|x64.Build.0 = Release|x64 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|ARM.ActiveCfg = Debug|ARM + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|ARM.Build.0 = Debug|ARM + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|Win32.Build.0 = Debug|Win32 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|x64.ActiveCfg = Debug|x64 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Debug|x64.Build.0 = Debug|x64 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|ARM.ActiveCfg = Release|ARM + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|ARM.Build.0 = Release|ARM + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|Win32.ActiveCfg = Release|Win32 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|Win32.Build.0 = Release|Win32 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|x64.ActiveCfg = Release|x64 + {F3550FE0-C795-44F6-8FEB-093EB68143AE}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {5D6F020F-7E72-4494-90A0-2DF11D235DF9} = {29321038-F308-421E-B8CA-140BB23D3C6D} + {7CA66464-6A5E-493B-82EF-DBD84F91766F} = {ECA7A2AA-8501-4177-8360-322A569B6C3E} + {8F8A69D6-BD64-4BAD-AE20-2D07E7BD57BA} = {ECA7A2AA-8501-4177-8360-322A569B6C3E} + {4A3C6BA8-C227-498B-AA21-40BDA27B461F} = {7CA66464-6A5E-493B-82EF-DBD84F91766F} + {3B26A12D-3A44-47EA-82D2-282660FC844D} = {7CA66464-6A5E-493B-82EF-DBD84F91766F} + {ADAFD00D-A0D6-46EF-9F0B-EA2880BFE1DE} = {8F8A69D6-BD64-4BAD-AE20-2D07E7BD57BA} + {F3550FE0-C795-44F6-8FEB-093EB68143AE} = {8F8A69D6-BD64-4BAD-AE20-2D07E7BD57BA} + EndGlobalSection +EndGlobal diff --git a/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj new file mode 100644 index 0000000000..8d18b52516 --- /dev/null +++ b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj @@ -0,0 +1,641 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM + + + Release + ARM + + + + {4f6def20-ac4c-487f-85b8-5993519e3911} + Cocos2dShaderCompiler + en-US + 12.0 + true + Windows Store + 8.1 + + + + Application + true + v120 + + + Application + true + v120 + + + Application + true + v120 + + + Application + false + true + v120 + + + Application + false + true + v120 + + + Application + false + true + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cocos2dShaderCompiler_TemporaryKey.pfx + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store;$(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + d2d1.lib;d3d11.lib;dwrite.lib;dxguid.lib;dxgi.lib;ole32.lib;windowscodecs.lib;libGLESv2.lib;libEGL.lib;zlib.lib;%(AdditionalDependencies) + $(ProjectDir)..\..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\..\external\winrt-specific\angle\prebuilt\$(Platform);%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.xaml + + + DirectXPage.xaml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + + + + + + + + + false + false + false + false + false + false + + + App.xaml + + + DirectXPage.xaml + + + + + + Designer + + + + + + + Designer + + + Designer + + + + + + + + + \ No newline at end of file diff --git a/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters new file mode 100644 index 0000000000..e428ea0402 --- /dev/null +++ b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters @@ -0,0 +1,1173 @@ + + + + + 5a7dfab3-eb13-41b4-a863-3136f23cdca2 + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {fa658c36-371d-4ebc-9363-0fc5634a68b0} + + + {baf5d4e6-b9ed-4dd6-82f9-eeb0f9f27c6d} + + + {1a9522f4-2248-4d5e-9f27-aa8f434b02c6} + + + {1f833f8d-6c08-4b5f-aeae-87b0fd414f3c} + + + {28e237bc-5de4-4afc-b8bf-0543ce767a5e} + + + {cf7e2c01-1ee8-4740-9dbc-f4623dc85a23} + + + {4dc6e8b1-25b2-4e5d-b83a-ea0b47fe88bd} + + + {ab492f52-b0fc-4055-8eb3-e5aff7734ced} + + + {115c74d1-3108-476d-a3e5-5089c8027d73} + + + {664900af-2f27-4622-886e-05cee5cbd0bc} + + + {6190d648-787d-49a2-89da-abaa820c0ef0} + + + {78d5964f-0893-428d-b4bb-93636e6d8744} + + + {bc3d9640-e48b-4e53-8725-38d900c9a019} + + + {e33e50a3-b742-4f4f-ae01-b233f27764c2} + + + + + + + + + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\platform + + + libcoco2d + + + libcoco2d\external\unzip + + + libcoco2d\external\unzip + + + libcoco2d\external\ConvertUTF + + + libcoco2d\external\ConvertUTF + + + libcoco2d\external\edtaa + + + libcoco2d\external\tinyxml2 + + + libcoco2d\external\xxhash + + + libcoco2d\platform + + + libcoco2d\platform + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\external\unzip + + + + + + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\base + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\2d + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\math + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\renderer + + + libcoco2d\platform + + + libcoco2d\external\unzip + + + libcoco2d\external\unzip + + + libcoco2d\external\ConvertUTF + + + libcoco2d\external\edtaa + + + libcoco2d\external\tinyxml2 + + + libcoco2d\external\xxhash + + + libcoco2d\platform + + + libcoco2d\platform + + + libcoco2d\platform\winrt + + + libcoco2d\platform\winrt + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\deprecated + + + libcoco2d\platform\winrt + + + libcoco2d\external\unzip + + + + + + + + + + + libcoco2d\math + + + + + + \ No newline at end of file diff --git a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx b/build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx rename to build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx diff --git a/build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml b/build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml rename to build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml diff --git a/build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.cpp b/build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.cpp similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.cpp rename to build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.cpp diff --git a/build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.h b/build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.h similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.h rename to build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.h diff --git a/build/winrt/Cocos2dShaderCompiler/Package.appxmanifest b/build/wp8/Cocos2dShaderCompiler/Package.appxmanifest similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/Package.appxmanifest rename to build/wp8/Cocos2dShaderCompiler/Package.appxmanifest diff --git a/build/winrt/Cocos2dShaderCompiler/ShaderCompiler.cpp b/build/wp8/Cocos2dShaderCompiler/ShaderCompiler.cpp similarity index 94% rename from build/winrt/Cocos2dShaderCompiler/ShaderCompiler.cpp rename to build/wp8/Cocos2dShaderCompiler/ShaderCompiler.cpp index cb0a8359ab..d8c1d9a538 100644 --- a/build/winrt/Cocos2dShaderCompiler/ShaderCompiler.cpp +++ b/build/wp8/Cocos2dShaderCompiler/ShaderCompiler.cpp @@ -51,21 +51,6 @@ ShaderCompiler::~ShaderCompiler() } -bool ShaderCompiler::applicationDidFinishLaunching() -{ - return true; -} - -void ShaderCompiler::applicationDidEnterBackground() -{ - -} - -void ShaderCompiler::applicationWillEnterForeground() -{ - - -} bool ShaderCompiler::Compile(Windows::UI::Xaml::Controls::TextBlock^ resultText) @@ -79,7 +64,9 @@ bool ShaderCompiler::Compile(Windows::UI::Xaml::Controls::TextBlock^ resultText) return false; } - Director::getInstance()->setAnimationInterval(1.0 / 60.0); + auto director = cocos2d::Director::getInstance(); + + //Director::getInstance()->setAnimationInterval(1.0 / 60.0); CCShaderCache::getInstance()->loadDefaultShaders(); CCPrecompiledShaders::getInstance()->savePrecompiledShaders(); resultText->Text = "Complete"; diff --git a/build/winrt/Cocos2dShaderCompiler/ShaderCompiler.h b/build/wp8/Cocos2dShaderCompiler/ShaderCompiler.h similarity index 88% rename from build/winrt/Cocos2dShaderCompiler/ShaderCompiler.h rename to build/wp8/Cocos2dShaderCompiler/ShaderCompiler.h index 46fd036fa5..c26cc5ee7a 100644 --- a/build/winrt/Cocos2dShaderCompiler/ShaderCompiler.h +++ b/build/wp8/Cocos2dShaderCompiler/ShaderCompiler.h @@ -24,11 +24,10 @@ THE SOFTWARE. ****************************************************************************/ #pragma once -#include "cocos2d.h" #include "CCGL.h" -class ShaderCompiler : private cocos2d::Application +class ShaderCompiler { public: @@ -40,9 +39,6 @@ private: Windows::UI::Xaml::Controls::TextBlock^ m_resultText; - virtual bool applicationDidFinishLaunching(); - virtual void applicationDidEnterBackground(); - virtual void applicationWillEnterForeground(); void InitializeCocos2d(); diff --git a/build/winrt/Cocos2dShaderCompiler/pch.cpp b/build/wp8/Cocos2dShaderCompiler/pch.cpp similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/pch.cpp rename to build/wp8/Cocos2dShaderCompiler/pch.cpp diff --git a/build/winrt/Cocos2dShaderCompiler/pch.h b/build/wp8/Cocos2dShaderCompiler/pch.h similarity index 100% rename from build/winrt/Cocos2dShaderCompiler/pch.h rename to build/wp8/Cocos2dShaderCompiler/pch.h diff --git a/build/wp8/wp8_precompiled_shaders.txt b/build/wp8/wp8_precompiled_shaders.txt new file mode 100644 index 0000000000..ca3deaf2c0 --- /dev/null +++ b/build/wp8/wp8_precompiled_shaders.txt @@ -0,0 +1,7 @@ +How to compile precompiled shaders for Windows Phone 8.0 (WP8) + +1. Open the VS project Cocos2dShaderCompiler\Cocos2dShaderCompiler.sln +2. Build and run the project +3. Click the Compile button +4. Select the file cocos\platform\wp8\shaders\precompiledshaders.h in the file dialog box +5. Program will precompile all of the cached cocos2d-x shaders. \ No newline at end of file diff --git a/cmake/BuildHelpers.CMakeLists.txt b/cmake/BuildHelpers.CMakeLists.txt index 1ebcb2fc6e..1ad543c6d5 100644 --- a/cmake/BuildHelpers.CMakeLists.txt +++ b/cmake/BuildHelpers.CMakeLists.txt @@ -44,6 +44,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SYSTEM_STRING "IOS") else() set(MACOSX TRUE) + set(APPLE TRUE) set(SYSTEM_STRING "Mac OSX") endif() endif() diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index 7d9141edc6..b484e34b16 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -32,7 +32,6 @@ THE SOFTWARE. #include "deprecated/CCString.h" #include -#include using namespace std; diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index e758fe0d70..b451526062 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1100,6 +1100,7 @@ void Node::removeAllChildren() this->removeAllChildrenWithCleanup(true); } +#if CC_USE_PHYSICS void Node::removeFromPhysicsWorld() { if (_physicsBody != nullptr) @@ -1112,6 +1113,7 @@ void Node::removeFromPhysicsWorld() child->removeFromPhysicsWorld(); } } +#endif void Node::removeAllChildrenWithCleanup(bool cleanup) { diff --git a/cocos/2d/CMakeLists.txt b/cocos/2d/CMakeLists.txt index bfbd6a8447..b9fdb4de4b 100644 --- a/cocos/2d/CMakeLists.txt +++ b/cocos/2d/CMakeLists.txt @@ -1,5 +1,5 @@ include_directories( - ../external/ConvertUTF + ../external/ConvertUTF, . ) set(COCOS_2D_SRC diff --git a/cocos/2d/cocos2d_winrt.props b/cocos/2d/cocos2d_winrt.props deleted file mode 100644 index edd7aab524..0000000000 --- a/cocos/2d/cocos2d_winrt.props +++ /dev/null @@ -1,27 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\ - - - - - _VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - true - true - false - OldStyle - 4056;4996;4244; - - - /IGNORE:4264 %(AdditionalOptions) - - - - - $(EngineRoot) - true - - - \ No newline at end of file diff --git a/cocos/2d/cocos2d_winrt.vcxproj b/cocos/2d/cocos2d_winrt.vcxproj deleted file mode 100644 index 00d7f67216..0000000000 --- a/cocos/2d/cocos2d_winrt.vcxproj +++ /dev/null @@ -1,759 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {2330EDF4-5596-4B53-8BA5-158DDDE713D9} - Win32Proj - libcocos2d - cocos2d-x.win32 - en-US - 12.0 - true - Windows Store - 8.1 - - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt\$(Configuration)\ - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;_DEBUG;_LIB;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - -Zm110 %(AdditionalOptions) - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;libchipmunk.lib;%(AdditionalDependencies) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;NDEBUG;_LIB;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\chipmunk\prebuilt\wp8\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;libchipmunk.lib;%(AdditionalDependencies) - - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;_DEBUG;_LIB;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;%(AdditionalDependencies) - - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;NDEBUG;_LIB;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;%(AdditionalDependencies) - - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;_DEBUG;_LIB;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;%(AdditionalDependencies) - - - - - Use - true - true - $(EngineRoot)external;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\winrt;$(EngineRoot)external\jpeg\include\winrt;$(EngineRoot)external\tiff\include\winrt;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\winrt;$(EngineRoot)external\winrt-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WINRT;NDEBUG;_LIB;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - 4267;4251;4244;4996;%(DisableSpecificWarnings) - pch.h - - - Console - false - false - - - /IGNORE:4264 %(AdditionalOptions) - $(ProjectDir)..\..\external\winrt-specific\zlib\prebuilt\$(Platform);$(ProjectDir)..\..\external\png\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\jpeg\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\tiff\prebuilt\winrt\$(Platform);$(ProjectDir)..\..\external\freetype2\prebuilt\winrt\$(Platform);%(AdditionalLibraryDirectories) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;%(AdditionalDependencies) - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - true - true - true - true - true - true - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - true - true - true - true - true - true - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/2d/cocos2d_winrt.vcxproj.filters b/cocos/2d/cocos2d_winrt.vcxproj.filters deleted file mode 100644 index f486f2c14a..0000000000 --- a/cocos/2d/cocos2d_winrt.vcxproj.filters +++ /dev/null @@ -1,1356 +0,0 @@ - - - - - {926fc31c-8742-4984-9940-c972dd02fc8a} - - - {66fe0560-cca4-4b0c-a192-44aca8ad82af} - - - {d3c53fc9-8678-4801-9a24-a619be0e761e} - - - {929b5dfc-73f5-4094-9036-051078571248} - - - {c883205c-736d-46a1-8626-8307d7c1967b} - - - {ff74d35d-9d65-44b8-8569-36197c006c41} - - - {8e9c8baf-8264-4016-bc90-ed547dfb524d} - - - {6063a842-a931-44fe-aea7-605af02302a4} - - - {ebd488cd-3f7b-4d28-adfc-e70980a65199} - - - {b31e69bf-1430-4938-81a4-b88019ba6f70} - - - {364e5ee6-3dee-4d24-baee-a59dd3519e8b} - - - {7532fb96-9b65-44e6-a165-b78eb67e14e2} - - - {bb9fdcc1-d324-4e79-9d10-8698b0ea583d} - - - {7ca64aa2-f350-4bc9-a046-d24c4df4f0ad} - - - {261eb0ec-d921-49ec-8ccd-f528d5a91abd} - - - {bb14c2af-576d-4274-a21e-c518397fa0cf} - - - {4626742b-b8a8-4626-ac6c-17be46e1c3c1} - - - - - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform - - - platform - - - platform - - - platform - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 3d - - - 3d - - - 3d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - external\ConvertUTF - - - external\ConvertUTF - - - external\edtaa - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\xxhash - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics - - - physics - - - physics - - - physics - - - physics - - - platform - - - platform\winrt - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - - - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 3d - - - 3d - - - 3d - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - external\ConvertUTF - - - external\edtaa - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\xxhash - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics - - - physics - - - physics - - - physics - - - physics - - - platform - - - platform\winrt - - - base - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - platform - - - platform - - - platform - - - platform - - - platform - - - renderer - - - base - - - - - base - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - \ No newline at end of file diff --git a/cocos/2d/cocos2d_winrt_headers.props b/cocos/2d/cocos2d_winrt_headers.props deleted file mode 100644 index fd510616e4..0000000000 --- a/cocos/2d/cocos2d_winrt_headers.props +++ /dev/null @@ -1,19 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\ - - - - - $(EngineRoot)cocos;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\xxhash;$(EngineRoot)\external\winrt-specific;$(GeneratedFilesDir);$(EngineRoot)external\ConvertUTF; - - - - - $(EngineRoot) - true - - - \ No newline at end of file diff --git a/cocos/2d/cocos2d_wp8.vcxproj.filters b/cocos/2d/cocos2d_wp8.vcxproj.filters deleted file mode 100644 index b670c0eeb1..0000000000 --- a/cocos/2d/cocos2d_wp8.vcxproj.filters +++ /dev/null @@ -1,1583 +0,0 @@ - - - - - {926fc31c-8742-4984-9940-c972dd02fc8a} - - - {08593631-5bf5-46aa-9436-62595c4f7bf6} - - - {aeadfa95-9c89-4212-98ae-89ad57db596a} - - - {cba0f362-878c-438b-ad0f-43d287516357} - - - {d7ac4e48-57dd-4b9e-95de-2a973b22b1ce} - - - {14e6de7a-f7ef-4249-9141-abf17033d9c2} - - - {5598fb0c-c012-45b6-8e43-447e7891b61d} - - - {f3673af7-9bbd-463b-a3a9-a081e67248d8} - - - {fbaf3e74-09dc-4f89-9d5a-0e7ccabbfbff} - - - {41c1aef6-86c9-42e3-b68c-6da3107ff587} - - - {a03a9ca0-013a-4082-bb45-43f024ff0f4e} - - - {0e7c99cb-0b41-4120-9773-49c31345d829} - - - {729473cd-a9e2-4133-b78e-37a6c3687550} - - - {54949861-d861-4eea-89bf-0498ef3c338c} - - - {64846670-6658-45f9-84cf-29e013870c37} - - - {026f880b-7918-49f8-8f0d-00f7593ce326} - - - {a36c6808-a8d6-43f4-bfb0-e08ee2747a21} - - - {fdee8fd3-05f9-46a1-aa15-6ceb16358145} - - - {85e8e428-d95d-4ca2-9765-c27ce7571bc4} - - - {f57aa1db-2f62-429c-bdf2-c772da13b9fe} - - - {f8d8f14c-cf4b-41a4-8948-6abdb29edcad} - - - - - physics - - - physics - - - physics - - - physics - - - physics - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - external\xxhash - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - - external\ConvertUTF - - - external\ConvertUTF - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\edtaa - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - platform - - - platform - - - platform - - - platform - - - platform\wp8 - - - platform\wp8 - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - base - - - 3d - - - 3d - - - 3d - - - renderer - - - - base - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 2d - - - 2d - - - platform - - - 2d - - - base - - - 3d - - - 3d - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - 3d - - - 3d - - - 3d - - - renderer - - - 3d - - - platform\wp8 - - - 3d - - - base - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - - - physics - - - physics - - - physics - - - physics - - - physics - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - physics\chipmunk - - - external\xxhash - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - deprecated - - - external\ConvertUTF - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - 2d - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - renderer - - - external\tinyxml2 - - - external\unzip - - - external\unzip - - - external\unzip - - - external\edtaa - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - base - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\wp8 - - - platform\wp8 - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - platform\winrt - - - base - - - base - - - 3d - - - 3d - - - 3d - - - renderer - - - - base - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 3d - - - 2d - - - 2d - - - platform - - - 2d - - - base - - - 3d - - - 3d - - - base - - - renderer - - - renderer - - - renderer - - - renderer - - - base - - - 3d - - - 3d - - - 3d - - - renderer - - - 3d - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\wp8 - - - 3d - - - base - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\io - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite\stubs - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - external\protobuf-lite - - - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - renderer\shaders - - - \ No newline at end of file diff --git a/cocos/2d/cocos2d_wp8_headers.props b/cocos/2d/cocos2d_wp8_headers.props deleted file mode 100644 index b5f55539b7..0000000000 --- a/cocos/2d/cocos2d_wp8_headers.props +++ /dev/null @@ -1,28 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\ - - - - - $(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\curl\include\wp8;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\wp8-specific\zlib\include;$(GeneratedFilesDir) - _VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - true - false - OldStyle - 4056;4996; - - - /IGNORE:4264 %(AdditionalOptions) - - - - - $(EngineRoot) - true - - - \ No newline at end of file diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index d787f79719..a3eba12da0 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -161,6 +161,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OpenalSoft\prebuilt\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\MP3Decoder\prebuilt\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\OggDecoder\prebuilt\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*" "$(OutDir)" @@ -184,6 +185,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + @@ -458,7 +464,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* - @@ -530,6 +535,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + @@ -878,7 +888,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* - diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 90ff9ccc53..0d904b439f 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -1180,8 +1180,20 @@ ui\UIWidgets\EditBox - - ui\UIWidgets + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager ui\UIWidgets @@ -2381,8 +2393,20 @@ ui\UIWidgets\EditBox - - ui\UIWidgets + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager ui\UIWidgets diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln new file mode 100644 index 0000000000..643e0e020e --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln @@ -0,0 +1,60 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d_8_1", "libcocos2d_8_1", "{CA9DBD4B-603D-494E-802A-1C36E3EA3F07}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Shared", "libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems", "{5D6F020F-7E72-4494-90A0-2DF11D235DF9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Windows", "libcocos2d_8_1\libcocos2d_8_1.Windows\libcocos2d_8_1.Windows.vcxproj", "{9335005F-678E-4E8E-9B84-50037216AEC8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.WindowsPhone", "libcocos2d_8_1\libcocos2d_8_1.WindowsPhone\libcocos2d_8_1.WindowsPhone.vcxproj", "{22F3B9DF-1209-4574-8331-003966F562BF}" +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 + libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 + libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{22f3b9df-1209-4574-8331-003966f562bf}*SharedItemsImports = 4 + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|ARM = Release|ARM + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|ARM.ActiveCfg = Debug|ARM + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|ARM.Build.0 = Debug|ARM + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|Win32.ActiveCfg = Debug|Win32 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|Win32.Build.0 = Debug|Win32 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|x64.ActiveCfg = Debug|x64 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Debug|x64.Build.0 = Debug|x64 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|ARM.ActiveCfg = Release|ARM + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|ARM.Build.0 = Release|ARM + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|Win32.ActiveCfg = Release|Win32 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|Win32.Build.0 = Release|Win32 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|x64.ActiveCfg = Release|x64 + {9335005F-678E-4E8E-9B84-50037216AEC8}.Release|x64.Build.0 = Release|x64 + {22F3B9DF-1209-4574-8331-003966F562BF}.Debug|ARM.ActiveCfg = Debug|ARM + {22F3B9DF-1209-4574-8331-003966F562BF}.Debug|ARM.Build.0 = Debug|ARM + {22F3B9DF-1209-4574-8331-003966F562BF}.Debug|Win32.ActiveCfg = Debug|Win32 + {22F3B9DF-1209-4574-8331-003966F562BF}.Debug|Win32.Build.0 = Debug|Win32 + {22F3B9DF-1209-4574-8331-003966F562BF}.Debug|x64.ActiveCfg = Debug|Win32 + {22F3B9DF-1209-4574-8331-003966F562BF}.Release|ARM.ActiveCfg = Release|ARM + {22F3B9DF-1209-4574-8331-003966F562BF}.Release|ARM.Build.0 = Release|ARM + {22F3B9DF-1209-4574-8331-003966F562BF}.Release|Win32.ActiveCfg = Release|Win32 + {22F3B9DF-1209-4574-8331-003966F562BF}.Release|Win32.Build.0 = Release|Win32 + {22F3B9DF-1209-4574-8331-003966F562BF}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {5D6F020F-7E72-4494-90A0-2DF11D235DF9} = {CA9DBD4B-603D-494E-802A-1C36E3EA3F07} + {9335005F-678E-4E8E-9B84-50037216AEC8} = {CA9DBD4B-603D-494E-802A-1C36E3EA3F07} + {22F3B9DF-1209-4574-8331-003966F562BF} = {CA9DBD4B-603D-494E-802A-1C36E3EA3F07} + EndGlobalSection +EndGlobal diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems new file mode 100644 index 0000000000..4be2a11b3a --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems @@ -0,0 +1,874 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {5d6f020f-7e72-4494-90a0-2df11d235df9} + libcocos2d_8_1 + libcocos2d_8_1.Shared + 248F659F-DAC5-46E8-AC09-60EC9FC95053 + + + + %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + CompileAsCpp + + + + + + + + + + + + + + + + + + + NotUsing + + + + + NotUsing + + + + + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + CompileAsCpp + + + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters new file mode 100644 index 0000000000..b0806073d1 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters @@ -0,0 +1,2690 @@ + + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics + + + physics + + + physics + + + physics + + + physics + + + cocostudio + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\physics + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\json\rapidjson\internal + + + cocostudio\json\rapidjson\internal + + + cocostudio\json\rapidjson\internal + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + extension\AssetsManager + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + extension + + + extension + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocosdenshion\Header Files + + + cocosdenshion\Header Files + + + cocosdenshion\Header Files + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocostudio\reader + + + cocostudio\reader + + + ui\UIWidgets + + + base + + + platform\winrt + + + platform\winrt + + + platform + + + platform\winrt + + + external\unzip + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\TimelineAction + + + cocostudio + + + ui\Layouts + + + 2d + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + external\ConvertUTF + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics + + + physics + + + physics + + + physics + + + physics + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\physics + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + extension\AssetsManager + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\physics_nodes + + + extension\physics_nodes + + + network\Source Files + + + network\Source Files + + + network\Source Files + + + platform + + + platform + + + platform + + + platform + + + platform + + + + cocostudio\json + + + cocostudio\json + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocostudio\reader + + + cocostudio\reader + + + ui\UIWidgets + + + base + + + platform\winrt + + + platform + + + platform\winrt + + + external\unzip + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\TimelineAction + + + cocostudio + + + ui\Layouts + + + 2d + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + + + {5dce13cf-2a33-4a9d-bea1-1cf6228f6323} + + + {d1405feb-dfdf-4ddf-9513-6b22179dcd07} + + + {47ffb3d6-a40e-475a-8018-eb9b04ece90a} + + + {6b35b27f-9d44-4f64-a602-28da1d6eb831} + + + {faf0ec2a-d245-4aa1-aade-91c36141ae81} + + + {042742fb-0fcf-4bef-aa7e-ede8b84febae} + + + {cd078356-9cc6-46c2-8d39-dc702c994139} + + + {99e5454f-55e7-4a86-bf56-823dc80f02cd} + + + {650a2fa5-095e-4d93-86d6-5b38663c2dcf} + + + {862c9f7f-fb24-4ab3-9713-76eed9341c50} + + + {6341b1da-4cfa-4ce5-a824-9f4ae73fb26c} + + + {7cf18e6c-00a8-4938-8f37-f899df2d4a78} + + + {9355ad31-9678-4680-8d7d-21864e11663a} + + + {93a234af-ace5-4391-ba94-906f9d8b1ac8} + + + {90707a94-17e0-4a22-9871-ea02fa83b1d3} + + + {1aa91433-3e54-4b8d-adff-7f7ecae29867} + + + {d0b36fd3-ca94-4b7d-828b-0cbf964bd9e9} + + + {5367d407-978c-4535-aa47-65a659dcc490} + + + {3ab7ab3b-98c2-428e-8715-df40a5f8deca} + + + {becaa915-a665-4657-8aae-722c99ae368b} + + + {0b41a5be-2392-4079-b980-14c701c7e349} + + + {c2fddcbf-b255-4fb6-8f55-9ca85bd3809b} + + + {9a5d5bc4-80f9-42aa-8865-c79711dfa7d6} + + + {97dd34cb-0d69-4ecd-bbf6-976cdf236d60} + + + {7345e280-b8a5-4d89-a27c-60cf351952d2} + + + {e31070b5-5b5f-47d4-b5c5-72220fe506de} + + + {26df0f77-db9e-4895-b648-118e42b24728} + + + {506718ba-bcdf-4078-9c11-781089c8d9f5} + + + {45d1e3fe-f2de-457b-bc91-0d60cbc50d8f} + + + {c7545a66-40fe-43af-ac7b-cce94a5bde56} + + + {90a35e19-a318-4dd8-96e0-42112c4de943} + + + {d2f2d731-a0fc-4fca-916a-ce87b5fb5cab} + + + {7d85e693-c5fb-4408-abe0-f9ff7df0e384} + + + {a9af9e6f-0fd3-4461-9b3a-2de2417624eb} + + + {43ca9fc2-569b-4753-9150-ac5bfc6f543e} + + + {7dfddab5-351a-48e7-9cd4-1df5268badfd} + + + {7225fe7b-80b7-40a8-a674-435183a8c45a} + + + {cc361288-af78-4806-939c-538c560996f0} + + + {c88afb13-dccb-4ff6-be05-fd91f19d9202} + + + {49a50e7b-bf26-480e-a4e6-25b19fc4a312} + + + {6559bb9c-34ce-4702-a0c7-cb3e93a22caf} + + + {37576c88-e687-4089-a758-6ef970087d3d} + + + {dd2338c9-660d-4131-aaf6-3c3cc30dfbe8} + + + {16ad21b8-70cc-4ab6-8ec6-e84417a685e7} + + + {1647ffda-45c0-401d-a050-0217bc5c3b91} + + + {99d20297-341e-4d4f-ac32-bf0f957bb08e} + + + {0f1c084d-aee7-4f97-a65f-a40a0b28ff16} + + + {5c9190b3-70ea-4189-b42a-442399baf629} + + + {c81f1e50-d504-432b-9e38-92d015c88f8f} + + + {f2018778-20b3-439e-9127-4080d18448db} + + + {ffc571d4-dca4-4cf0-b62c-f35b5f26f204} + + + {c03ed815-ce08-4801-bdd6-1869ff3c014e} + + + {48ae1ce9-b81f-479f-b59c-b10e344699d8} + + + {1a7fb736-f3df-4683-b892-b181bc26fb0d} + + + {ef54a6b1-dfbe-4808-86a2-8ba0664b15ad} + + + {4f239b1b-f1ca-472c-acb9-d84fbb0aeb9d} + + + {39f7141f-d8ce-4780-b9ee-c0c8e5410dc8} + + + {b8bf48f3-8e10-4010-ae69-367715f2755a} + + + {03cfe246-9a82-45ed-8a0f-f5e7baa91e0d} + + + {9a84f2c8-f6bb-4c38-9669-b1c6e45ef658} + + + {b24283d8-3e1c-4fbe-b632-fef2cef51d87} + + + {161033d2-1f07-477f-a694-c664c942f102} + + + {840515bd-a764-47a1-b1d1-ad4d9fdbde91} + + + {1d8b1ab3-9e58-4b9d-a5d4-91ac54f29a44} + + + {09977165-cfcf-4101-9b00-6a3dc5397aaf} + + + {f8d3d5c4-e469-4980-bf28-aa7f6dac53a1} + + + {354b91cc-c6f7-4a7e-bd72-737916af7e23} + + + {5f37f118-5902-4683-9243-fcc77bdbf3e1} + + + {f51f496d-43b3-4c80-b01d-8db1ff82ba87} + + + {897038a8-2cd2-4c8b-adac-5d716757ebb8} + + + {768b728a-70a8-4dd0-b04d-c8d7f70e7677} + + + {6d403f90-95d9-4ebf-9f53-5e79db30f68c} + + + {5f6acaf0-cbff-42f8-bdf2-21b43efa5680} + + + {b16255cc-6a35-4ee4-b77b-46a781b40d9b} + + + + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/targetver.h b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj new file mode 100644 index 0000000000..0e7305cae5 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj @@ -0,0 +1,254 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + {3b26a12d-3a44-47ea-82d2-282660fc844d} + + + {f3550fe0-c795-44f6-8feb-093eb68143ae} + + + + {9335005f-678e-4e8e-9b84-50037216aec8} + en-US + 12.0 + true + Windows Store + 8.1 + CodeSharingDll + + + + DynamicLibrary + true + v120 + + + DynamicLibrary + true + v120 + + + DynamicLibrary + true + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + true + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + false + false + libcocos2d_v3.3_Windows_8.1 + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj.filters b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj.filters new file mode 100644 index 0000000000..a7761ab018 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj.filters @@ -0,0 +1,5 @@ + + + + + diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj new file mode 100644 index 0000000000..a082a15791 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Release + ARM + + + Release + Win32 + + + + + {22f798d8-bfff-4754-996f-a5395343d5ec} + + + {cc1da216-a80d-4be4-b309-acb6af313aff} + + + + {22f3b9df-1209-4574-8331-003966f562bf} + libcocos2d_8_1 + en-US + 12.0 + true + Windows Phone + 8.1 + CodeSharingDll + + + + DynamicLibrary + true + v120_wp81 + + + DynamicLibrary + true + v120_wp81 + + + DynamicLibrary + false + true + v120_wp81 + + + DynamicLibrary + false + true + v120_wp81 + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + libcocos2d_v3.3_WindowsPhone_8.1 + + + false + false + libcocos2d_v3.3_WindowsPhone_8.1 + + + false + false + libcocos2d_v3.3_WindowsPhone_8.1 + + + false + false + libcocos2d_v3.3_WindowsPhone_8.1 + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + Use + true + /Zm200 %(AdditionalOptions) + pch.h + $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + + + Console + false + false + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + ..\..\..\cocos2d.def + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj.filters b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj.filters new file mode 100644 index 0000000000..a7761ab018 --- /dev/null +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj.filters @@ -0,0 +1,5 @@ + + + + + diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/libcocos2d_wp8.vcxproj similarity index 54% rename from cocos/2d/cocos2d_wp8.vcxproj rename to cocos/2d/libcocos2d_wp8.vcxproj index 2e40199da9..e3bdf159a3 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/libcocos2d_wp8.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -19,445 +19,195 @@ - {B5AF91B3-64EA-44E1-84B0-D759E93758FB} - cocos2d-x.win32 + {7c5dbc42-27f6-4978-aabc-02ba77e2a7f0} + libcocos2d_wp8 en-US 11.0 - libcocos2d - StaticLibrary + DynamicLibrary true v110_wp80 + false - StaticLibrary + DynamicLibrary true v110_wp80 + false - StaticLibrary + DynamicLibrary false true v110_wp80 + false - StaticLibrary + DynamicLibrary false true v110_wp80 + false - - + - - + - - + - - + false + + libcocos2d_v3.3_WindowsPhone_8.0 + false + + + libcocos2d_v3.3_WindowsPhone_8.0 + false + + + libcocos2d_v3.3_WindowsPhone_8.0 + + + libcocos2d_v3.3_WindowsPhone_8.0 + - %(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) Use pch.h + true $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_LIB;_DEBUG;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) + $(EngineRoot)external\jpeg\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\tiff\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\png\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm256 %(AdditionalOptions) pch.h - /Zm200 %(AdditionalOptions) Console false - ole32.lib; - d3d11.lib;xaudio2.lib;libEGL_phone.lib;libGLESv2_phone.lib;freetype.lib;libpng.lib;libjpeg.lib;libtiff.lib;zlib.lib;%(AdditionalDependencies) - ..\..\external\wp8-specific\angle\prebuilt\$(Platform);..\..\external\wp8-specific\zlib\prebuilt\$(Platform);..\..\external\png\prebuilt\wp8\$(Platform);..\..\external\jpeg\prebuilt\wp8\$(Platform);..\..\external\tiff\prebuilt\wp8\$(Platform);..\..\external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - - - /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies) + false + true + ole32.lib $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - + cocos2d.def + - _LIB;NDEBUG;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h + true $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_LIB;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) + $(EngineRoot)external\jpeg\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\tiff\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\png\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm256 %(AdditionalOptions) pch.h - /Zm200 %(AdditionalOptions) Console false - ole32.lib; - d3d11.lib;xaudio2.lib;libEGL_phone.lib;libGLESv2_phone.lib;freetype.lib;libpng.lib;libjpeg.lib;libtiff.lib;zlib.lib;%(AdditionalDependencies) - ..\..\external\wp8-specific\angle\prebuilt\$(Platform);..\..\external\wp8-specific\zlib\prebuilt\$(Platform);..\..\external\png\prebuilt\wp8\$(Platform);..\..\external\jpeg\prebuilt\wp8\$(Platform);..\..\external\tiff\prebuilt\wp8\$(Platform);..\..\external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - - - /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies) + false + true + ole32.lib $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - + cocos2d.def + - _LIB;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) Use pch.h + true $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_LIB;_DEBUG;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) + $(EngineRoot)external\jpeg\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\tiff\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\png\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm256 %(AdditionalOptions) pch.h - /Zm200 %(AdditionalOptions) - CompileAsCpp Console false - ole32.lib; - d3d11.lib;xaudio2.lib;libEGL_phone.lib;libGLESv2_phone.lib;freetype.lib;libpng.lib;libjpeg.lib;libtiff.lib;zlib.lib;%(AdditionalDependencies) - ..\..\external\wp8-specific\angle\prebuilt\$(Platform);..\..\external\wp8-specific\zlib\prebuilt\$(Platform);..\..\external\png\prebuilt\wp8\$(Platform);..\..\external\jpeg\prebuilt\wp8\$(Platform);..\..\external\tiff\prebuilt\wp8\$(Platform);..\..\external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - - - /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies) + false + true + ole32.lib $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - + cocos2d.def + - _LIB;NDEBUG;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h + true $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\curl\include\wp8;$(EngineRoot)external\curl\include\wp8\curl;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_LIB;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) + $(EngineRoot)external\jpeg\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\tiff\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\png\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm256 %(AdditionalOptions) pch.h - /Zm200 %(AdditionalOptions) - CompileAsCpp Console false - ole32.lib; - d3d11.lib;xaudio2.lib;libEGL_phone.lib;libGLESv2_phone.lib;freetype.lib;libpng.lib;libjpeg.lib;libtiff.lib;zlib.lib;%(AdditionalDependencies) - ..\..\external\wp8-specific\angle\prebuilt\$(Platform);..\..\external\wp8-specific\zlib\prebuilt\$(Platform);..\..\external\png\prebuilt\wp8\$(Platform);..\..\external\jpeg\prebuilt\wp8\$(Platform);..\..\external\tiff\prebuilt\wp8\$(Platform);..\..\external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - - - /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies) + false + true + ole32.lib $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) - + cocos2d.def + - - true - - - true - false - - - - - - - - - true - true - true - true - NotUsing - NotUsing - NotUsing - NotUsing - CompileAsCpp - CompileAsCpp - - - - - - - - - - - - - - - - - - - - - - false - - - NotUsing - CompileAsCpp - - - false - false - NotUsing - CompileAsCpp - - - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - - - - - - - - - NotUsing - NotUsing - NotUsing - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + @@ -466,6 +216,14 @@ + + + + + + + + @@ -478,10 +236,9 @@ - - + @@ -502,6 +259,10 @@ + + + + @@ -569,6 +330,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -581,6 +427,11 @@ + + + + + @@ -611,7 +462,7 @@ - + @@ -620,11 +471,11 @@ + - @@ -647,6 +498,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -664,6 +543,7 @@ + @@ -714,6 +594,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + NotUsing + NotUsing + NotUsing + NotUsing + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + false + + @@ -745,4 +1092,16 @@ + + + {c55734a3-702c-4fa1-b950-32c8e169302f} + + + {7d4fc6eb-9497-4804-98f3-3eaedc896154} + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_wp8.vcxproj.filters b/cocos/2d/libcocos2d_wp8.vcxproj.filters new file mode 100644 index 0000000000..9cf444227e --- /dev/null +++ b/cocos/2d/libcocos2d_wp8.vcxproj.filters @@ -0,0 +1,2655 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {7781bbd0-663f-497c-9d8b-8cbc7ea93999} + + + {72b2d0ea-8d6f-43a4-bc2f-5c11cdb95c5b} + + + {3a28d334-186f-401c-aadd-70b4e023db1e} + + + {03cc06c3-283f-46fb-9680-b5a84dfa57df} + + + {e8aa6119-28b7-4df6-ba01-9db968b1f002} + + + {d9999c21-df9a-4885-bda7-d267cdfbde01} + + + {ef4bc857-41ca-412e-89a0-b02cb401fdc7} + + + {35781717-7235-4f1f-9ae7-716e64ccc6b9} + + + {c7536592-2bd8-4a92-bcd0-8f8e21551eaa} + + + {9f40f0d1-83d9-42ce-a185-5f5756c90597} + + + {6c1981b2-d955-4fe6-b81d-3bc84eed0590} + + + {a7501f5e-4fef-4f37-a646-ffe633008d9b} + + + {12ce37e2-709d-416e-a592-1c60b33fd6ce} + + + {1850cae0-9e70-47af-87d5-c90f8343c06a} + + + {81ef00d8-d5b6-4aac-9670-fe4af22ecbe7} + + + {a2fd6c36-9078-45e7-bc11-c235357f565e} + + + {c52c9563-bc10-4b77-8bcc-0e061628fae7} + + + {1be811ab-a9b0-44f7-9a37-b7ef7f1ef24a} + + + {794d19d1-2992-497a-a770-081932fa9242} + + + {287bc50b-c080-40b5-b885-88ac1f1a617b} + + + {d6936bb0-d231-4ede-a33e-1de5c388fca0} + + + {e657ad42-e62c-4bb5-98bd-42deeb214458} + + + {e78ebf14-f840-478a-985a-26f33c8a7a7f} + + + {d6ade174-8a80-4a3b-805d-31b33f3bb12e} + + + {2da83f5a-eb55-4d14-831a-8a321ae76905} + + + {412bbcff-4dc5-4c37-a6d9-0216d6b87418} + + + {67dc1c20-1409-453b-8b1a-a22bd5af6176} + + + {4b45f82d-a5e2-4cfc-9b56-3dad70693c4a} + + + {954e3ba3-1bc6-4a7a-abe6-ca4a1e177099} + + + {f3fb753f-e47b-4af3-a59d-4e65fddd73fc} + + + {b5456a67-16de-41ea-844f-46ef481ecad9} + + + {15cef3b1-e1b4-40ad-b4bb-4f918396ccce} + + + {ab9c0e6c-fe51-42c6-89df-7962bf2cfeec} + + + {c26e58bf-de47-4895-bd07-4aa32ef93867} + + + {67812e0f-147f-4015-af72-6c878a9c4a06} + + + {b04a6ae6-7d66-4b83-88ed-1eea239c31d6} + + + {911eab6e-b192-4a3e-a80a-e7254477ac4b} + + + {45ec1342-efb4-480a-96e6-56d9167ddf2e} + + + {7c1387e5-341a-476c-a2af-f4629e7445b4} + + + {8610c729-6bfa-43f2-b954-1c8ad06b0b4f} + + + {1c203621-0357-429a-aae0-766c816b1bfd} + + + {60c2b17d-ed4d-44d9-b369-3421563e4369} + + + {89da718e-f2fa-4437-83e8-40755f6fc3a2} + + + {20e787a6-57c3-4122-88ad-d803c892e7f4} + + + {472edbc0-fbb6-41a4-8759-40c11a78b47c} + + + {77da5935-5a02-4f2b-82fa-d76be5533241} + + + {38b491dc-2676-4d85-a50c-da867dc22ba8} + + + {ae1c235a-fe3f-49b1-98d5-907391591301} + + + {b443b5e0-2fd5-439b-a9e6-ca4ad2520553} + + + {39217b15-d4cb-44b5-8636-47f6c8026a13} + + + {e48826ef-5e90-4d47-8829-06cf2f32d759} + + + {e8a7d029-142d-4e6e-a606-9b86b1539627} + + + {ead17956-8c02-427d-8558-0d4abcae53c7} + + + {a63a9a3e-bfe9-4ebd-82eb-d08ee689c2af} + + + {0a92e110-3c5e-4714-9616-a6f4c611d054} + + + {d8be569c-cf20-477a-8d2c-f177ecbb3098} + + + {3ef51a10-298c-43ff-99b0-04a7d9a16ad9} + + + {5c1d3bda-e73f-4267-b97d-9431edf0cb9b} + + + {e1d04fd8-3aaf-4744-b63c-ef284cea01e8} + + + {a9c25e42-8568-4b34-95c6-842d1c84cff1} + + + {b8343db5-7783-4ebe-934a-13d079f35c04} + + + {2cdbd301-d589-4a7b-bee5-f1e61359285b} + + + {9917270a-302d-4203-875b-abacc7d8313d} + + + {0e7cd115-2c97-4059-8ee0-6e0915eab1d2} + + + {14f51ffa-f405-4785-9eed-e6d059ab6886} + + + {02cd79b1-fdf9-459a-884d-cd584784f20c} + + + {ae5cf6f4-8676-4f48-a4c6-74fefd9f502a} + + + {a9981839-03f2-4d16-8170-db722dc0777f} + + + {f3a0416f-0c3a-44c2-a9f3-e59fab18e37f} + + + {398440fd-bc31-41ce-8ac1-03e943d0c761} + + + {e3dc7161-12e0-4d3b-b364-00de56fe3755} + + + {f68c00d5-e79f-4b3b-b352-20808e2b4f39} + + + {0037c6b3-aa22-4e63-9048-42ca6c88c9fb} + + + {4efe3422-d5e4-4dd9-8c5e-51a2333f554b} + + + {38e945e9-f3d8-44e5-8ef9-54ff95ab6f1e} + + + {2002113e-f002-4ce3-ad7e-3e8609c691d0} + + + {b7fdf4e2-b3be-4b7a-b586-ddab39fb05b7} + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + external\tinyxml2 + + + external\unzip + + + external\unzip + + + external\edtaa + + + external\ConvertUTF + + + external\ConvertUTF + + + external\xxhash + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + physics + + + physics + + + physics + + + physics + + + physics + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\wp8 + + + platform\wp8 + + + platform\wp8 + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosbuilder\Source Files + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader + + + cocostudio\reader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\json + + + cocostudio\json + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\physics_nodes + + + extension\physics_nodes + + + storage\Source Files + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + network\Source Files + + + network\Source Files + + + network\Source Files + + + + extension\AssetsManager + + + external\unzip + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\TimelineAction + + + cocostudio + + + ui\Layouts + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + 2d + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + external\tinyxml2 + + + external\unzip + + + external\unzip + + + external\edtaa + + + external\ConvertUTF + + + external\xxhash + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + physics + + + physics + + + physics + + + physics + + + physics + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + physics\chipmunk + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\wp8 + + + platform\wp8 + + + platform\wp8 + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + platform\renderer + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosbuilder\Header Files + + + cocosdenshion\Source Files + + + cocosdenshion\Source Files + + + cocosdenshion\Header Files + + + cocosdenshion\Header Files + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader + + + cocostudio\reader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson + + + cocostudio\json\rapidjson\internal + + + cocostudio\json\rapidjson\internal + + + cocostudio\json\rapidjson\internal + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCControlExtension + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + extension + + + storage\Header Files + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + network\Header Files + + + + extension\AssetsManager + + + external\unzip + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\io + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\json\protobuf-lite\src\google\protobuf\stubs + + + cocostudio\TimelineAction + + + ui\Layouts + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + extension\AssetsManager + + + 2d + + + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + platform\renderer\shaders + + + \ No newline at end of file diff --git a/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props new file mode 100644 index 0000000000..cd169e5074 --- /dev/null +++ b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props @@ -0,0 +1,32 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories); + + + WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + true + true + false + OldStyle + 4056;4996;4244;4251; + + + libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;libchipmunk.lib;zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype250.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\tiff\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\jpeg\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);%(AdditionalLibraryDirectories); + /IGNORE:4264 %(AdditionalOptions) + + + + + $(EngineRoot) + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props new file mode 100644 index 0000000000..56a1e35697 --- /dev/null +++ b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props @@ -0,0 +1,33 @@ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\ + $(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\ + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_platform.props b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_platform.props new file mode 100644 index 0000000000..761976bf4e --- /dev/null +++ b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_platform.props @@ -0,0 +1,7 @@ + + + + + winrt_8.1 + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt.props b/cocos/2d/winrt_props/cocos2d_winrt.props new file mode 100644 index 0000000000..eb5ffb6d54 --- /dev/null +++ b/cocos/2d/winrt_props/cocos2d_winrt.props @@ -0,0 +1,32 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\ + + + + + $(EngineRoot)external\winrt-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories); + + + WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + true + true + false + OldStyle + 4056;4996;4244;4251; + + + libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;libchipmunk.lib;zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype250.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) + $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\tiff\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\jpeg\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);%(AdditionalLibraryDirectories); + /IGNORE:4264 %(AdditionalOptions) + + + + + $(EngineRoot) + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_app.props b/cocos/2d/winrt_props/cocos2d_winrt_app.props new file mode 100644 index 0000000000..d0685779c1 --- /dev/null +++ b/cocos/2d/winrt_props/cocos2d_winrt_app.props @@ -0,0 +1,15 @@ + + + + + $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform)\ + + + + true + + + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_platform.props b/cocos/2d/winrt_props/cocos2d_winrt_platform.props new file mode 100644 index 0000000000..761976bf4e --- /dev/null +++ b/cocos/2d/winrt_props/cocos2d_winrt_platform.props @@ -0,0 +1,7 @@ + + + + + winrt_8.1 + + \ No newline at end of file diff --git a/cocos/2d/wp8_props/cocos2d_wp8.props b/cocos/2d/wp8_props/cocos2d_wp8.props new file mode 100644 index 0000000000..50cf1f6912 --- /dev/null +++ b/cocos/2d/wp8_props/cocos2d_wp8.props @@ -0,0 +1,35 @@ + + + + + wp8 + + + $(MSBuildThisFileDirectory)..\..\..\ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories); + + + WP8;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + true + true + false + OldStyle + 4056;4996;4244;4251; + + + libGLESv2_phone.lib;libEGL_phone.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;libchipmunk.lib;zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;sqlite3.lib;d3d11.lib;dxgi.lib;dxguid.lib;xaudio2.lib;mfplat.lib;%(AdditionalDependencies) + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform);$(EngineRoot)cocos\platform\wp8;$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\tiff\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\jpeg\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);%(AdditionalLibraryDirectories); + /IGNORE:4264 %(AdditionalOptions) + + + + + $(EngineRoot) + true + + + \ No newline at end of file diff --git a/cocos/2d/wp8_props/cocos2d_wp8_app.props b/cocos/2d/wp8_props/cocos2d_wp8_app.props new file mode 100644 index 0000000000..c15d2cff90 --- /dev/null +++ b/cocos/2d/wp8_props/cocos2d_wp8_app.props @@ -0,0 +1,34 @@ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\ + $(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + \ No newline at end of file diff --git a/cocos/2d/wp8_props/cocos2d_wp8_component.props b/cocos/2d/wp8_props/cocos2d_wp8_component.props new file mode 100644 index 0000000000..b492f78d87 --- /dev/null +++ b/cocos/2d/wp8_props/cocos2d_wp8_component.props @@ -0,0 +1,9 @@ + + + + + + _WINRT_DLL;%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/cocos/2d/wp_8.1_props/cocos2d_wp_8.1_platform.props b/cocos/2d/wp_8.1_props/cocos2d_wp_8.1_platform.props new file mode 100644 index 0000000000..6200885a8b --- /dev/null +++ b/cocos/2d/wp_8.1_props/cocos2d_wp_8.1_platform.props @@ -0,0 +1,7 @@ + + + + + wp_8.1 + + \ No newline at end of file diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk index c0ce7c55f3..9710c56be0 100644 --- a/cocos/3d/Android.mk +++ b/cocos/3d/Android.mk @@ -25,9 +25,7 @@ CCSprite3D.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../../external \ - $(LOCAL_PATH)/../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static diff --git a/cocos/3d/CCBillBoard.cpp b/cocos/3d/CCBillBoard.cpp index c39bff5364..f3aaa846b8 100644 --- a/cocos/3d/CCBillBoard.cpp +++ b/cocos/3d/CCBillBoard.cpp @@ -101,13 +101,17 @@ void BillBoard::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) auto camera = Camera::getVisitingCamera(); const Mat4& camWorldMat = camera->getNodeToWorldTransform(); - if (memcmp(_camWorldMat.m, camWorldMat.m, sizeof(float) * 16) != 0 || memcmp(_transform.m, transform.m, sizeof(float) * 16) != 0 || _modeDirty) + if (memcmp(_camWorldMat.m, camWorldMat.m, sizeof(float) * 16) != 0 || memcmp(_mvTransform.m, transform.m, sizeof(float) * 16) != 0 || _modeDirty) { + Vec3 anchorPoint(_anchorPointInPoints.x , _anchorPointInPoints.y , 0.0f); + Mat4 localToWorld = transform; + localToWorld.translate(anchorPoint); + Vec3 camDir; switch (_mode) { case Mode::VIEW_POINT_ORIENTED: - camDir = Vec3(transform.m[12] - camWorldMat.m[12], transform.m[13] - camWorldMat.m[13], transform.m[14] - camWorldMat.m[14]); + camDir = Vec3(localToWorld.m[12] - camWorldMat.m[12], localToWorld.m[13] - camWorldMat.m[13], localToWorld.m[14] - camWorldMat.m[14]); break; case Mode::VIEW_PLANE_ORIENTED: camWorldMat.transformVector(Vec3(0.0f, 0.0f, -1.0f), &camDir); @@ -130,18 +134,22 @@ void BillBoard::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) Vec3::cross(camDir, y, &x); x.normalize(); Vec3::cross(x, camDir, &y); - float xlen = sqrtf(transform.m[0] * transform.m[0] + transform.m[1] * transform.m[1] + transform.m[2] * transform.m[2]); - float ylen = sqrtf(transform.m[4] * transform.m[4] + transform.m[5] * transform.m[5] + transform.m[6] * transform.m[6]); - float zlen = sqrtf(transform.m[8] * transform.m[8] + transform.m[9] * transform.m[9] + transform.m[10] * transform.m[10]); + y.normalize(); + + float xlen = sqrtf(localToWorld.m[0] * localToWorld.m[0] + localToWorld.m[1] * localToWorld.m[1] + localToWorld.m[2] * localToWorld.m[2]); + float ylen = sqrtf(localToWorld.m[4] * localToWorld.m[4] + localToWorld.m[5] * localToWorld.m[5] + localToWorld.m[6] * localToWorld.m[6]); + float zlen = sqrtf(localToWorld.m[8] * localToWorld.m[8] + localToWorld.m[9] * localToWorld.m[9] + localToWorld.m[10] * localToWorld.m[10]); _billboardTransform.m[0] = x.x * xlen; _billboardTransform.m[1] = x.y * xlen; _billboardTransform.m[2] = x.z * xlen; _billboardTransform.m[4] = y.x * ylen; _billboardTransform.m[5] = y.y * ylen; _billboardTransform.m[6] = y.z * ylen; _billboardTransform.m[8] = -camDir.x * zlen; _billboardTransform.m[9] = -camDir.y * zlen; _billboardTransform.m[10] = -camDir.z * zlen; - _billboardTransform.m[12] = transform.m[12]; _billboardTransform.m[13] = transform.m[13]; _billboardTransform.m[14] = transform.m[14]; + _billboardTransform.m[12] = localToWorld.m[12]; _billboardTransform.m[13] = localToWorld.m[13]; _billboardTransform.m[14] = localToWorld.m[14]; + + _billboardTransform.translate(-anchorPoint); const Mat4 &viewMat = camWorldMat.getInversed(); - _zDepthInView = -(viewMat.m[2] * transform.m[12] + viewMat.m[6] * transform.m[13] + viewMat.m[10] * transform.m[14] + viewMat.m[14]); - _transform = transform; + _zDepthInView = -(viewMat.m[2] * _billboardTransform.m[12] + viewMat.m[6] * _billboardTransform.m[13] + viewMat.m[10] * _billboardTransform.m[14] + viewMat.m[14]); + _mvTransform = transform; _camWorldMat = camWorldMat; } diff --git a/cocos/3d/CCBillBoard.h b/cocos/3d/CCBillBoard.h index bd3e1cba7f..ffdff41ec8 100644 --- a/cocos/3d/CCBillBoard.h +++ b/cocos/3d/CCBillBoard.h @@ -99,7 +99,7 @@ CC_CONSTRUCTOR_ACCESS: protected: Mat4 _camWorldMat; - Mat4 _transform; + Mat4 _mvTransform; Mat4 _billboardTransform; float _zDepthInView; diff --git a/cocos/Android.mk b/cocos/Android.mk index 3b27a5af3a..79950b1e77 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -190,13 +190,15 @@ physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/. \ + $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/platform \ $(LOCAL_PATH)/base \ + $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ $(LOCAL_PATH)/../external/unzip \ $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ $(LOCAL_PATH)/../external/xxhash \ - $(LOCAL_PATH)/../external/nslog + $(LOCAL_PATH)/../external/nslog LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/. \ @@ -244,12 +246,11 @@ LOCAL_MODULE := cocos2dx_static LOCAL_MODULE_FILENAME := libcocos2d LOCAL_STATIC_LIBRARIES := cocostudio_static -LOCAL_STATIC_LIBRARIES += audioengine_static -LOCAL_STATIC_LIBRARIES += cocos3d_static LOCAL_STATIC_LIBRARIES += cocosbuilder_static +LOCAL_STATIC_LIBRARIES += cocos3d_static LOCAL_STATIC_LIBRARIES += spine_static LOCAL_STATIC_LIBRARIES += cocos_network_static -LOCAL_STATIC_LIBRARIES += box2d_static +LOCAL_STATIC_LIBRARIES += audioengine_static include $(BUILD_STATIC_LIBRARY) #============================================================== @@ -272,5 +273,3 @@ $(call import-module,Box2D) $(call import-module,curl/prebuilt/android) $(call import-module,websockets/prebuilt/android) $(call import-module,protobuf-lite) - - diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index a2988999ae..e792575153 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -25,6 +25,8 @@ # this CMakeLists is to generate libcocos2d.a +cmake_minimum_required(VERSION 2.8) + if(WINDOWS) ADD_DEFINITIONS(-DUNICODE -D_UNICODE) endif() @@ -74,6 +76,25 @@ set(COCOS_SRC cocos2d.cpp ${COCOS_EXTENSIONS_SRC} ) +if(MACOSX OR APPLE) + include(FindFreetype REQUIRED) + + if(NOT FREETYPE_FOUND) + if(IOS) + FIND_LIBRARY(FREETYPE_LIBRARIES NAMES libfreetype PATHS "../external/freetype2/prebuilt/ios" DOC "Freetype includes") + find_path(FREETYPE_INCLUDE_DIRS ft2build.h "../external/freetype2/include/ios" "../external/freetype2/include/ios/freetype" DOC "Freetype includes") + + elseif() + FIND_LIBRARY(FREETYPE_LIBRARIES NAMES libfreetype PATHS "../external/freetype2/prebuilt/mac" DOC "Freetype includes") + find_path(FREETYPE_INCLUDE_DIRS ft2build.h "../external/freetype2/include/mac" "../external/freetype2/include/mac/freetype" DOC "Freetype includes") + endif(IOS) + endif(NOT FREETYPE_FOUND) + + find_package(Freetype REQUIRED) + include_directories(${FREETYPE_INCLUDE_DIRS}) + +endif() + if(MINGW) find_package(Freetype REQUIRED) find_package(WebP REQUIRED) @@ -126,8 +147,7 @@ elseif(WINDOWS) elseif(LINUX) set(PLATFORM_SPECIFIC_LIBS jpeg webp tiff freetype curl websockets fontconfig png pthread glfw GLEW GL X11 rt z protobuf ${FMOD_LIB}) -elseif(MACOSX) - +elseif(MACOSX OR APPLE) INCLUDE_DIRECTORIES ( /System/Library/Frameworks ) FIND_LIBRARY(COCOA_LIBRARY Cocoa) @@ -141,7 +161,7 @@ elseif(MACOSX) set(PLATFORM_SPECIFIC_LIBS z jpeg png webp tiff curl glfw3 - websockets + websockets freetype ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${OPENAL_LIBRARY} diff --git a/cocos/audio/proj.wp8/CocosDenshion.vcxproj.filters b/cocos/audio/proj.wp8/CocosDenshion.vcxproj.filters deleted file mode 100644 index cbc9b5dc4e..0000000000 --- a/cocos/audio/proj.wp8/CocosDenshion.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Header Files - - - Header Files - - - Source Files - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/cocos/audio/proj.wp8/CocosDenshion.vcxproj.user b/cocos/audio/proj.wp8/CocosDenshion.vcxproj.user deleted file mode 100644 index 17f726ed50..0000000000 --- a/cocos/audio/proj.wp8/CocosDenshion.vcxproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/cocos/audio/winrt/Audio.cpp b/cocos/audio/winrt/Audio.cpp index 76b3e10bcf..feaf711a18 100644 --- a/cocos/audio/winrt/Audio.cpp +++ b/cocos/audio/winrt/Audio.cpp @@ -1,47 +1,30 @@ -//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -//// PARTICULAR PURPOSE. -//// -//// Copyright (c) Microsoft Corporation. All rights reserved +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ -#include "pch.h" #include "Audio.h" #include "MediaStreamer.h" +//#include "CCCommon.h" -static std::wstring CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len/* = -1*/) -{ - std::wstring ret; - do - { - if (! pszUtf8Str) break; - // get UTF8 string length - if (-1 == len) - { - len = strlen(pszUtf8Str); - } - if (len <= 0) break; - - // get UTF16 string length - int wLen = MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, 0, 0); - if (0 == wLen || 0xFFFD == wLen) break; - - // convert string - wchar_t * pwszStr = new wchar_t[wLen + 1]; - if (! pwszStr) break; - pwszStr[wLen] = 0; - MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, pwszStr, wLen + 1); - ret = pwszStr; - if(pwszStr) { delete[] (pwszStr);}; - } while (0); - return ret; -} - -static inline void ThrowIfFailed(HRESULT hr) +inline void ThrowIfFailed(HRESULT hr) { if (FAILED(hr)) { - // Set a breakpoint on this line to catch DirectX API errors + // Set a breakpoint on this line to catch DX API errors. throw Platform::Exception::CreateException(hr); } } @@ -55,14 +38,14 @@ void AudioEngineCallbacks::Initialize(Audio *audio) // to be closed down and restarted. The error code is given in error. void _stdcall AudioEngineCallbacks::OnCriticalError(HRESULT Error) { + UNUSED_PARAM(Error); m_audio->SetEngineExperiencedCriticalError(); }; Audio::Audio() : m_backgroundID(0), - m_soundEffctVolume(1.0), + m_soundEffctVolume(1.0f), m_backgroundMusicVolume(1.0f) - { } @@ -220,8 +203,10 @@ void Audio::StopBackgroundMusic(bool bReleaseData) StopSoundEffect(m_backgroundID); - if (bReleaseData) + if (bReleaseData){ UnloadSoundEffect(m_backgroundID); + RemoveFromList(m_backgroundID); + } } void Audio::PauseBackgroundMusic() @@ -328,9 +313,6 @@ void Audio::PlaySoundEffect(unsigned int sound) m_soundEffects[sound].m_soundEffectSourceVoice->SubmitSourceBuffer(&m_soundEffects[sound].m_audioBuffer) ); - XAUDIO2_BUFFER buf = {0}; - XAUDIO2_VOICE_STATE state = {0}; - if (m_engineExperiencedCriticalError) { // If there's an error, then we'll recreate the engine on the next render pass return; @@ -426,7 +408,8 @@ void Audio::PauseAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - PauseSoundEffect(iter->first); + if (iter->first != m_backgroundID) + PauseSoundEffect(iter->first); } } @@ -439,11 +422,12 @@ void Audio::ResumeAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - ResumeSoundEffect(iter->first); + if (iter->first != m_backgroundID) + ResumeSoundEffect(iter->first); } } -void Audio::StopAllSoundEffects() +void Audio::StopAllSoundEffects(bool bReleaseData) { if (m_engineExperiencedCriticalError) { return; @@ -452,8 +436,27 @@ void Audio::StopAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - StopSoundEffect(iter->first); + if (iter->first != m_backgroundID){ + StopSoundEffect(iter->first); + if (bReleaseData) + { + UnloadSoundEffect(iter->first); + } + } } + if (bReleaseData) + { + for (iter = m_soundEffects.begin(); iter != m_soundEffects.end();) + { + if (iter->first != m_backgroundID){ + m_soundEffects.erase(iter++); + } + else + { + iter++; + } + } + } } bool Audio::IsSoundEffectStarted(unsigned int sound) @@ -464,39 +467,66 @@ bool Audio::IsSoundEffectStarted(unsigned int sound) return m_soundEffects[sound].m_soundEffectStarted; } +std::wstring CCUtf8ToUnicode(const char * pszUtf8Str) +{ + std::wstring ret; + do + { + if (! pszUtf8Str) break; + size_t len = strlen(pszUtf8Str); + if (len <= 0) break; + ++len; + wchar_t * pwszStr = new wchar_t[len]; + if (! pwszStr) break; + pwszStr[len - 1] = 0; + MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, pwszStr, len); + ret = pwszStr; + + if(pwszStr) { + delete[] (pwszStr); + (pwszStr) = 0; + } + + + } while (0); + return ret; +} + +std::string CCUnicodeToUtf8(const wchar_t* pwszStr) +{ + std::string ret; + do + { + if(! pwszStr) break; + size_t len = wcslen(pwszStr); + if (len <= 0) break; + + char * pszUtf8Str = new char[len*3 + 1]; + WideCharToMultiByte(CP_UTF8, 0, pwszStr, len+1, pszUtf8Str, len*3 + 1, 0, 0); + ret = pszUtf8Str; + + if(pszUtf8Str) { + delete[] (pszUtf8Str); + (pszUtf8Str) = 0; + } + }while(0); + + return ret; +} + void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) { - if (m_engineExperiencedCriticalError) { return; } int sound = Hash(pszFilePath); - if (m_soundEffects.end() != m_soundEffects.find(sound)) - { - return; - } - MediaStreamer mediaStreamer; - mediaStreamer.Initialize(CCUtf8ToUnicode(pszFilePath, -1).c_str()); + mediaStreamer.Initialize(CCUtf8ToUnicode(pszFilePath).c_str()); m_soundEffects[sound].m_soundID = sound; uint32 bufferLength = mediaStreamer.GetMaxStreamLengthInBytes(); - - if (m_soundEffects.find(sound) != m_soundEffects.end()) - { - if (m_soundEffects[sound].m_soundEffectBufferData) - { - delete[] m_soundEffects[sound].m_soundEffectBufferData; - m_soundEffects[sound].m_soundEffectBufferData = NULL; - } - } - else - { - m_soundEffects[sound].m_soundEffectBufferData = NULL; - } - m_soundEffects[sound].m_soundEffectBufferData = new byte[bufferLength]; mediaStreamer.ReadAll(m_soundEffects[sound].m_soundEffectBufferData, bufferLength, &m_soundEffects[sound].m_soundEffectBufferLength); @@ -549,6 +579,8 @@ void Audio::UnloadSoundEffect(const char* pszFilePath) int sound = Hash(pszFilePath); UnloadSoundEffect(sound); + + RemoveFromList(sound); } void Audio::UnloadSoundEffect(unsigned int sound) @@ -562,15 +594,18 @@ void Audio::UnloadSoundEffect(unsigned int sound) m_soundEffects[sound].m_soundEffectSourceVoice->DestroyVoice(); - if (m_soundEffects[sound].m_soundEffectBufferData) - { - delete[] m_soundEffects[sound].m_soundEffectBufferData; - m_soundEffects[sound].m_soundEffectBufferData = NULL; - } + if(m_soundEffects[sound].m_soundEffectBufferData) + delete [] m_soundEffects[sound].m_soundEffectBufferData; + m_soundEffects[sound].m_soundEffectBufferData = nullptr; m_soundEffects[sound].m_soundEffectSourceVoice = nullptr; - m_soundEffects[sound].m_soundEffectStarted = false;// - ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); + m_soundEffects[sound].m_soundEffectStarted = false; + ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); +} +void Audio::RemoveFromList( unsigned int sound ) +{ m_soundEffects.erase(sound); } + + diff --git a/cocos/audio/winrt/Audio.h b/cocos/audio/winrt/Audio.h index ae58dc7402..a00b9a2ef7 100644 --- a/cocos/audio/winrt/Audio.h +++ b/cocos/audio/winrt/Audio.h @@ -5,14 +5,25 @@ //// //// Copyright (c) Microsoft Corporation. All rights reserved +// For licensing information relating to this distribution please see Third Party Notices file. + #pragma once -#include "pch.h" +#include +#include +#include +#include +#include + +#define XAUDIO2_HELPER_FUNCTIONS 1 +#include #include static const int STREAMING_BUFFER_SIZE = 65536; static const int MAX_BUFFER_COUNT = 3; +#define UNUSED_PARAM(unusedparam) (void)unusedparam + struct SoundEffectData { unsigned int m_soundID; @@ -85,10 +96,11 @@ private: StreamingVoiceContext m_voiceContext; typedef std::map EffectList; - EffectList m_soundEffects; + typedef std::pair Effect; + EffectList m_soundEffects; - unsigned int m_backgroundID; - std::string m_backgroundFile; + unsigned int m_backgroundID; + std::string m_backgroundFile; bool m_backgroundLoop; float m_soundEffctVolume; @@ -144,9 +156,12 @@ public: void PauseAllSoundEffects(); void ResumeAllSoundEffects(); - void StopAllSoundEffects(); + void StopAllSoundEffects(bool bReleaseData); void PreloadSoundEffect(const char* pszFilePath, bool isMusic = false); void UnloadSoundEffect(const char* pszFilePath); void UnloadSoundEffect(unsigned int sound); + +private: + void RemoveFromList(unsigned int sound); }; diff --git a/cocos/audio/winrt/MediaStreamer.cpp b/cocos/audio/winrt/MediaStreamer.cpp index f6f985bf5b..fc6287cd04 100644 --- a/cocos/audio/winrt/MediaStreamer.cpp +++ b/cocos/audio/winrt/MediaStreamer.cpp @@ -1,49 +1,126 @@ -//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -//// PARTICULAR PURPOSE. -//// -//// Copyright (c) Microsoft Corporation. All rights reserved +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ -#include "pch.h" #include "MediaStreamer.h" -using namespace Windows::ApplicationModel; +#include +#include +#include -static inline void ThrowIfFailed(HRESULT hr) +#include +#include + +using namespace Microsoft::WRL; +using namespace Windows::Storage; +using namespace Windows::Storage::FileProperties; +using namespace Windows::Storage::Streams; +using namespace Windows::Foundation; +using namespace Windows::ApplicationModel; +using namespace Concurrency; + +#ifndef MAKEFOURCC + #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((uint32)(byte)(ch0) | ((uint32)(byte)(ch1) << 8) | \ + ((uint32)(byte)(ch2) << 16) | ((uint32)(byte)(ch3) << 24 )) +#endif /* defined(MAKEFOURCC) */ + +inline void ThrowIfFailed(HRESULT hr) { if (FAILED(hr)) { - // Set a breakpoint on this line to catch DirectX API errors + // Set a breakpoint on this line to catch DX API errors. throw Platform::Exception::CreateException(hr); } } - -MediaStreamer::MediaStreamer() +MediaStreamer::MediaStreamer() : + m_offset(0) { - m_reader = nullptr; - m_audioType = nullptr; ZeroMemory(&m_waveFormat, sizeof(m_waveFormat)); - - m_installedLocation = Package::Current->InstalledLocation; - m_installedLocationPath = Platform::String::Concat(m_installedLocation->Path, "\\Assets\\Resources\\"); + m_location = Package::Current->InstalledLocation; + m_locationPath = Platform::String::Concat(m_location->Path, "\\Assets\\Resources\\"); } MediaStreamer::~MediaStreamer() { } +Platform::Array^ MediaStreamer::ReadData( + _In_ Platform::String^ filename + ) +{ + CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0}; + extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); + extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + extendedParams.dwFileFlags = FILE_FLAG_SEQUENTIAL_SCAN; + extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; + extendedParams.lpSecurityAttributes = nullptr; + extendedParams.hTemplateFile = nullptr; + + Wrappers::FileHandle file( + CreateFile2( + filename->Data(), + GENERIC_READ, + FILE_SHARE_READ, + OPEN_EXISTING, + &extendedParams + ) + ); + if (file.Get()==INVALID_HANDLE_VALUE) + { + throw ref new Platform::FailureException(); + } + + FILE_STANDARD_INFO fileInfo = {0}; + if (!GetFileInformationByHandleEx( + file.Get(), + FileStandardInfo, + &fileInfo, + sizeof(fileInfo) + )) + { + throw ref new Platform::FailureException(); + } + + if (fileInfo.EndOfFile.HighPart != 0) + { + throw ref new Platform::OutOfMemoryException(); + } + + Platform::Array^ fileData = ref new Platform::Array(fileInfo.EndOfFile.LowPart); + + if (!ReadFile( + file.Get(), + fileData->Data, + fileData->Length, + nullptr, + nullptr + ) ) + { + throw ref new Platform::FailureException(); + } + + return fileData; +} void MediaStreamer::Initialize(__in const WCHAR* url) { - Microsoft::WRL::ComPtr outputMediaType; - Microsoft::WRL::ComPtr mediaType; - - ThrowIfFailed( - MFStartup(MF_VERSION) - ); - WCHAR filePath[MAX_PATH] = {0}; + WCHAR filePath[MAX_PATH] = {0}; if ((wcslen(url) > 1 && url[1] == ':')) { // path start with "x:", is absolute path @@ -53,163 +130,92 @@ void MediaStreamer::Initialize(__in const WCHAR* url) && (L'/' == url[0] || L'\\' == url[0])) { // path start with '/' or '\', is absolute path without driver name - wcscat_s(filePath, m_installedLocationPath->Data()); + wcscat_s(filePath, m_locationPath->Data()); // remove '/' or '\\' wcscat_s(filePath, (const WCHAR*)url[1]); }else { - wcscat_s(filePath, m_installedLocationPath->Data()); + wcscat_s(filePath, m_locationPath->Data()); wcscat_s(filePath, url); } - ThrowIfFailed( - MFCreateSourceReaderFromURL(filePath, nullptr, &m_reader) - ); - // Set the decoded output format as PCM - // XAudio2 on Windows can process PCM and ADPCM-encoded buffers. - // When using MF, this sample always decodes into PCM. + Platform::Array^ data = ReadData(ref new Platform::String(filePath)); + UINT32 length = data->Length; + const byte * dataPtr = data->Data; + UINT32 offset = 0; - ThrowIfFailed( - MFCreateMediaType(&mediaType) - ); + DWORD riffDataSize = 0; - ThrowIfFailed( - mediaType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Audio) - ); + auto ReadChunk = [&length, &offset, &dataPtr, &riffDataSize](DWORD fourcc, DWORD& outChunkSize, DWORD& outChunkPos) -> HRESULT + { + while (true) + { + if (offset + sizeof(DWORD) * 2 >= length) + { + return E_FAIL; + } - ThrowIfFailed( - mediaType->SetGUID(MF_MT_SUBTYPE, MFAudioFormat_PCM) - ); + // Read two DWORDs. + DWORD chunkType = *reinterpret_cast(&dataPtr[offset]); + DWORD chunkSize = *reinterpret_cast(&dataPtr[offset + sizeof(DWORD)]); + offset += sizeof(DWORD) * 2; - ThrowIfFailed( - m_reader->SetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, mediaType.Get()) - ); + if (chunkType == MAKEFOURCC('R', 'I', 'F', 'F')) + { + riffDataSize = chunkSize; + chunkSize = sizeof(DWORD); + outChunkSize = sizeof(DWORD); + outChunkPos = offset; + } + else + { + outChunkSize = chunkSize; + outChunkPos = offset; + } - // Get the complete WAVEFORMAT from the Media Type - ThrowIfFailed( - m_reader->GetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, &outputMediaType) - ); + offset += chunkSize; - uint32 formatSize = 0; - WAVEFORMATEX* waveFormat; - ThrowIfFailed( - MFCreateWaveFormatExFromMFMediaType(outputMediaType.Get(), &waveFormat, &formatSize) - ); - CopyMemory(&m_waveFormat, waveFormat, sizeof(m_waveFormat)); - CoTaskMemFree(waveFormat); + if (chunkType == fourcc) + { + return S_OK; + } + } + }; - // Get the total length of the stream in bytes - PROPVARIANT var; - ThrowIfFailed( - m_reader->GetPresentationAttribute(MF_SOURCE_READER_MEDIASOURCE, MF_PD_DURATION, &var) - ); - LONGLONG duration = var.uhVal.QuadPart; - double durationInSeconds = (duration / static_cast(10000000)); // duration is in 100ns units, convert to seconds - m_maxStreamLengthInBytes = static_cast(durationInSeconds * m_waveFormat.nAvgBytesPerSec); + // Locate riff chunk, check the file type. + DWORD chunkSize = 0; + DWORD chunkPos = 0; - // Round up the buffer size to the nearest four bytes - m_maxStreamLengthInBytes = (m_maxStreamLengthInBytes + 3) / 4 * 4; -} + ThrowIfFailed(ReadChunk(MAKEFOURCC('R', 'I', 'F', 'F'), chunkSize, chunkPos)); + if (*reinterpret_cast(&dataPtr[chunkPos]) != MAKEFOURCC('W', 'A', 'V', 'E')) ThrowIfFailed(E_FAIL); -bool MediaStreamer::GetNextBuffer(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength) -{ - Microsoft::WRL::ComPtr sample; - Microsoft::WRL::ComPtr mediaBuffer; - BYTE *audioData = nullptr; - DWORD sampleBufferLength = 0; - DWORD flags = 0; + // Locate 'fmt ' chunk, copy to WAVEFORMATEXTENSIBLE. + ThrowIfFailed(ReadChunk(MAKEFOURCC('f', 'm', 't', ' '), chunkSize, chunkPos)); + ThrowIfFailed((chunkSize <= sizeof(m_waveFormat)) ? S_OK : E_FAIL); + CopyMemory(&m_waveFormat, &dataPtr[chunkPos], chunkSize); - *bufferLength = 0; + // Locate the 'data' chunk and copy its contents to a buffer. + ThrowIfFailed(ReadChunk(MAKEFOURCC('d', 'a', 't', 'a'), chunkSize, chunkPos)); + m_data.resize(chunkSize); + CopyMemory(m_data.data(), &dataPtr[chunkPos], chunkSize); - if (m_reader == nullptr) - { - return false; - } - - ThrowIfFailed( - m_reader->ReadSample(MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, nullptr, &flags, nullptr, &sample) - ); - - if (sample == nullptr) - { - if (flags & MF_SOURCE_READERF_ENDOFSTREAM) - { - return true; - } - else - { - return false; - } - } - - ThrowIfFailed( - sample->ConvertToContiguousBuffer(&mediaBuffer) - ); - - ThrowIfFailed( - mediaBuffer->Lock(&audioData, nullptr, &sampleBufferLength) - ); - - // If buffer isn't large enough, dump sample - if (sampleBufferLength <= maxBufferSize) - { - CopyMemory(buffer, audioData, sampleBufferLength); - *bufferLength = sampleBufferLength; - } - else - { -#if defined(COCOS2D_DEBUG) - OutputDebugString(L"Sample buffer dumped"); -#endif - } - - if (flags & MF_SOURCE_READERF_ENDOFSTREAM) - { - return true; - } - else - { - return false; - } + m_offset = 0; } void MediaStreamer::ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength) { - uint32 valuesWritten = 0; - uint32 sampleBufferLength = 0; + UINT32 toCopy = m_data.size() - m_offset; + if (toCopy > maxBufferSize) toCopy = maxBufferSize; - if (m_reader == nullptr) - { - return; - } + CopyMemory(buffer, m_data.data(), toCopy); + *bufferLength = toCopy; - *bufferLength = 0; - // If buffer isn't large enough, return - if (maxBufferSize < m_maxStreamLengthInBytes) - { - return; - } - - while (!GetNextBuffer(buffer + valuesWritten, maxBufferSize - valuesWritten, &sampleBufferLength)) - { - valuesWritten += sampleBufferLength; - } - - *bufferLength = valuesWritten + sampleBufferLength; + m_offset += toCopy; + if (m_offset > m_data.size()) m_offset = m_data.size(); } void MediaStreamer::Restart() { - if (m_reader == nullptr) - { - return; - } - - PROPVARIANT var = {0}; - var.vt = VT_I8; - - ThrowIfFailed( - m_reader->SetCurrentPosition(GUID_NULL, var) - ); + m_offset = 0; } diff --git a/cocos/audio/winrt/MediaStreamer.h b/cocos/audio/winrt/MediaStreamer.h index cafbfe0993..e72ac5974a 100644 --- a/cocos/audio/winrt/MediaStreamer.h +++ b/cocos/audio/winrt/MediaStreamer.h @@ -1,28 +1,46 @@ -//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -//// PARTICULAR PURPOSE. -//// -//// Copyright (c) Microsoft Corporation. All rights reserved +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ #pragma once -#include "pch.h" -class MediaStreamer +#include +#include +#include + +ref class MediaStreamer { private: - WAVEFORMATEX m_waveFormat; - uint32 m_maxStreamLengthInBytes; - Windows::Storage::StorageFolder^ m_installedLocation; - Platform::String^ m_installedLocationPath; + WAVEFORMATEX m_waveFormat; + uint32 m_maxStreamLengthInBytes; + std::vector m_data; + UINT32 m_offset; + Platform::Array^ ReadData( + _In_ Platform::String^ filename + ); +internal: + Windows::Storage::StorageFolder^ m_location; + Platform::String^ m_locationPath; public: - Microsoft::WRL::ComPtr m_reader; - Microsoft::WRL::ComPtr m_audioType; + virtual ~MediaStreamer(); -public: +internal: MediaStreamer(); - ~MediaStreamer(); WAVEFORMATEX& GetOutputWaveFormatEx() { @@ -31,11 +49,10 @@ public: UINT32 GetMaxStreamLengthInBytes() { - return m_maxStreamLengthInBytes; + return m_data.size(); } void Initialize(_In_ const WCHAR* url); - bool GetNextBuffer(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength); void ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength); void Restart(); }; diff --git a/cocos/audio/winrt/SimpleAudioEngine.cpp b/cocos/audio/winrt/SimpleAudioEngine.cpp index 510cd6434c..6a9b17354b 100644 --- a/cocos/audio/winrt/SimpleAudioEngine.cpp +++ b/cocos/audio/winrt/SimpleAudioEngine.cpp @@ -1,52 +1,51 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ -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. -****************************************************************************/ #include "SimpleAudioEngine.h" #include "Audio.h" #include - //#include "CCCommon.h" using namespace std; namespace CocosDenshion { - - Audio* s_audioController = NULL; -// a flag that if the s_audioController should be re-initialiezed -// see also in SimpleAudioEngine::end() in this file -bool s_bAudioControllerNeedReInitialize = true; +bool s_initialized = false; + +SimpleAudioEngine* SimpleAudioEngine::getInstance() +{ + static SimpleAudioEngine s_SharedEngine; + return &s_SharedEngine; +} + static Audio* sharedAudioController() { - if ((! s_audioController) || s_bAudioControllerNeedReInitialize) + if (! s_audioController || !s_initialized) { - s_audioController = new Audio; + if(s_audioController == NULL) + { + s_audioController = new Audio; + } s_audioController->Initialize(); s_audioController->CreateResources(); - s_bAudioControllerNeedReInitialize = false; + s_initialized = true; } return s_audioController; @@ -60,29 +59,16 @@ SimpleAudioEngine::~SimpleAudioEngine() { } -SimpleAudioEngine* SimpleAudioEngine::sharedEngine() -{ - static SimpleAudioEngine s_SharedEngine; - return &s_SharedEngine; -} void SimpleAudioEngine::end() { sharedAudioController()->StopBackgroundMusic(true); - sharedAudioController()->StopAllSoundEffects(); + sharedAudioController()->StopAllSoundEffects(true); sharedAudioController()->ReleaseResources(); - //set here to tell the s_bAudioControllerNeedReInitialize should be re-initialized - s_bAudioControllerNeedReInitialize = true; + s_initialized = false; } -#if 0 -void SimpleAudioEngine::render() -{ - sharedAudioController()->Render(); -} -#endif - ////////////////////////////////////////////////////////////////////////// // BackgroundMusic @@ -132,11 +118,11 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying() // effect function ////////////////////////////////////////////////////////////////////////// -unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop) +unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain) { unsigned int sound; sharedAudioController()->PlaySoundEffect(pszFilePath, bLoop, sound); - + // TODO: need to support playEffect parameters return sound; } @@ -172,12 +158,12 @@ void SimpleAudioEngine::resumeAllEffects() void SimpleAudioEngine::stopAllEffects() { - sharedAudioController()->StopAllSoundEffects(); + sharedAudioController()->StopAllSoundEffects(false); } void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) { - + UNUSED_PARAM(pszFilePath); } void SimpleAudioEngine::unloadEffect(const char* pszFilePath) diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 827217ed0f..782446ad8f 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -40,7 +40,7 @@ #include #include #define bzero(a, b) memset(a, 0, b); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "inet_ntop_winrt.h" #include "CCWinRTUtils.h" #endif @@ -111,8 +111,6 @@ static bool isFloat( std::string myString ) { return iss.eof() && !iss.fail(); } -#if CC_TARGET_PLATFORM != CC_PLATFORM_WINRT - // helper free functions // dprintf() is not defined in Android @@ -183,7 +181,6 @@ static void printFileUtils(int fd) } sendPrompt(fd); } -#endif #if defined(__MINGW32__) @@ -231,9 +228,7 @@ static void _log(const char *format, va_list args) fflush(stdout); #endif -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) Director::getInstance()->getConsole()->log(buf); -#endif } @@ -254,8 +249,6 @@ void log(const char * format, ...) va_end(args); } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) - // // Console code // @@ -328,7 +321,7 @@ bool Console::listenOnTCP(int port) hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ? hints.ai_socktype = SOCK_STREAM; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WSADATA wsaData; n = WSAStartup(MAKEWORD(2, 2),&wsaData); @@ -354,7 +347,7 @@ bool Console::listenOnTCP(int port) break; /* success */ /* bind error, close and try next one */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(listenfd); #else close(listenfd); @@ -441,7 +434,7 @@ void Console::commandExit(int fd, const std::string &args) { FD_CLR(fd, &_read_set); _fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end()); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(fd); #else close(fd); @@ -1074,7 +1067,7 @@ void Console::loop() //receive a SIGPIPE, which will cause linux system shutdown the sending process. //Add this ioctl code to check if the socket has been closed by peer. -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) u_long n = 0; ioctlsocket(fd, FIONREAD, &n); #else @@ -1119,14 +1112,14 @@ void Console::loop() // clean up: ignore stdin, stdout and stderr for(const auto &fd: _fds ) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(fd); #else close(fd); #endif } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(_listenfd); WSACleanup(); #else @@ -1135,7 +1128,6 @@ void Console::loop() _running = false; } -#endif /* #if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) */ NS_CC_END diff --git a/cocos/base/CCConsole.h b/cocos/base/CCConsole.h index 7e05a4bf29..f8fa0b2b03 100644 --- a/cocos/base/CCConsole.h +++ b/cocos/base/CCConsole.h @@ -72,7 +72,6 @@ void CC_DLL log(const char * format, ...) CC_FORMAT_PRINTF(1, 2); ``` */ -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) class CC_DLL Console : public Ref { @@ -148,7 +147,6 @@ private: CC_DISALLOW_COPY_AND_ASSIGN(Console); }; -#endif /* #if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) */ NS_CC_END #endif /* defined(__CCCONSOLE_H__) */ diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index d4a90c6080..a531f632c9 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -1276,8 +1276,10 @@ void DisplayLinkDirector::startAnimation() _invalid = false; +#ifndef WP8_SHADER_COMPILER Application::getInstance()->setAnimationInterval(_animationInterval); - +#endif + // fix issue #3509, skip one fps to avoid incorrect time calculation. setNextDeltaTimeZero(true); } diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index d786885574..d84464a994 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -59,9 +59,7 @@ class TextureCache; class Renderer; class Camera; -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) class Console; -#endif /** @brief Class that creates and handles the main Window and manages how @@ -391,9 +389,7 @@ public: /** Returns the Console @since v3.0 */ -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) Console* getConsole() const { return _console; } -#endif /* Gets delta time since last tick to main loop */ float getDeltaTime() const; @@ -503,10 +499,8 @@ protected: /* Renderer for the Director */ Renderer *_renderer; -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) /* Console for the director */ Console *_console; -#endif // GLView will recreate stats labels to fit visible rect friend class GLView; diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index e6031747d4..680c9a2cc0 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -1,5 +1,5 @@ -if(MACOSX) +if(MACOSX OR APPLE) set(COCOS_BASE_SPECIFIC_SRC base/CCUserDefault-apple.mm) endif() diff --git a/cocos/cocos2d.cpp b/cocos/cocos2d.cpp index fb3b3f4077..111bb4bde6 100644 --- a/cocos/cocos2d.cpp +++ b/cocos/cocos2d.cpp @@ -31,7 +31,7 @@ NS_CC_BEGIN CC_DLL const char* cocos2dVersion() { - return "cocos2d-x 3.3beta0"; + return "cocos2d-x 3.3rc0"; } NS_CC_END diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 0bc497855e..acf8bdcc3c 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -224,10 +224,9 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "platform/winrt/CCApplication.h" - #include "platform/winrt/CCGLViewImpl.h" + #include "platform/winrt/CCGLViewImpl-winrt.h" #include "platform/winrt/CCGL.h" #include "platform/winrt/CCStdC.h" - #include "platform/winrt/CCPrecompiledShaders.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk index eaafab037f..a93f8cf5aa 100644 --- a/cocos/editor-support/cocosbuilder/Android.mk +++ b/cocos/editor-support/cocosbuilder/Android.mk @@ -28,17 +28,12 @@ CCScale9SpriteLoader.cpp \ CCScrollViewLoader.cpp \ CCSpriteLoader.cpp -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../.. +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \ -$(LOCAL_PATH) \ -$(LOCAL_PATH)/../../.. \ -$(LOCAL_PATH)/../../ \ -$(LOCAL_PATH)/../../platform/android \ -$(LOCAL_PATH)/../../editor-support +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../../2d \ + LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) - diff --git a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj b/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj deleted file mode 100644 index aa05847ade..0000000000 --- a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj +++ /dev/null @@ -1,225 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2} - libCocosBuilder - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.filters b/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.filters deleted file mode 100644 index 04df7aa8c6..0000000000 --- a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.filters +++ /dev/null @@ -1,170 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.user b/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.user deleted file mode 100644 index 17f726ed50..0000000000 --- a/cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/cocos/editor-support/cocosbuilder/proj.wp8/pch.h b/cocos/editor-support/cocosbuilder/proj.wp8/pch.h deleted file mode 100644 index 4c3b8cde28..0000000000 --- a/cocos/editor-support/cocosbuilder/proj.wp8/pch.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp index 79d6759484..feb015a36a 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp @@ -210,6 +210,7 @@ void foreachNodeDescendant(Node* parent, tCallBack callback) void ActionTimeline::startWithTarget(Node *target) { Action::startWithTarget(target); + this->setTag(target->getTag()); foreachNodeDescendant(target, [this, target](Node* child) diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 668779d5d9..d83ddce808 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -219,14 +219,11 @@ ActionTimeline* ActionTimelineCache::loadAnimationActionWithFileFromProtocolBuff return action; std::string path = fileName; - // int pos = path.find_last_of('/'); - // _protocolBuffersPath = path.substr(0, pos + 1); std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName.c_str()); Data content = FileUtils::getInstance()->getDataFromFile(fullPath); protocolbuffers::CSParseBinary gpbwp; - // protocolbuffers::GUIProtocolBuffersProtobuf gpbwp; - if (!gpbwp.ParseFromArray(content.getBytes(), content.getSize())) + if (!gpbwp.ParseFromArray(content.getBytes(), (int)content.getSize())) { return NULL; } @@ -839,9 +836,6 @@ ActionTimeline* ActionTimelineCache::loadActionTimelineFromXML(const tinyxml2::X action->addTimeline(timeline); } - // protocolbuffers::TimeLine* timeLine = nodeAction->add_timelines(); - // convertTimelineProtocolBuffers(timeLine, timelineElement); - timelineElement = timelineElement->NextSiblingElement(); } @@ -1142,7 +1136,7 @@ Frame* ActionTimelineCache::loadColorFrameFromXML(const tinyxml2::XMLElement *fr const tinyxml2::XMLElement* child = frameElement->FirstChildElement(); while (child) { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { std::string name = attribute->Name(); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp index 549d85f08a..a505eb3f4b 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp @@ -697,23 +697,14 @@ Node* CSLoader::createNodeFromProtocolBuffers(const std::string &filename) Node* CSLoader::nodeFromProtocolBuffersFile(const std::string &fileName) { std::string path = fileName; - int pos = path.find_last_of('/'); - // _protocolBuffersPath = path.substr(0, pos + 1); std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName.c_str()); Data content = FileUtils::getInstance()->getDataFromFile(fullPath); protocolbuffers::CSParseBinary gpbwp; - // protocolbuffers::GUIProtocolBuffersProtobuf gpbwp; - if (!gpbwp.ParseFromArray(content.getBytes(), content.getSize())) + if (!gpbwp.ParseFromArray(content.getBytes(), (int)content.getSize())) { return NULL; } - /* - CCLog("dataScale = %d", gpbwp.datascale()); - CCLog("designHeight = %d", gpbwp.designheight()); - CCLog("designWidth = %d", gpbwp.designwidth()); - CCLog("version = %s", gpbwp.version().c_str()); - */ // decode plist int textureSize = gpbwp.textures_size(); @@ -1157,8 +1148,6 @@ void CSLoader::setPropsForProjectNodeFromProtocolBuffers(cocos2d::Node *node, const protocolbuffers::ProjectNodeOptions &projectNodeOptions, const protocolbuffers::WidgetOptions &nodeOptions) { - const protocolbuffers::ProjectNodeOptions& options = projectNodeOptions; - setPropsForNodeFromProtocolBuffers(node, nodeOptions); } @@ -1282,27 +1271,6 @@ Node* CSLoader::nodeFromXMLFile(const std::string &fileName) rootType = "NodeObjectData"; } // - - // - // while (attribute) - // { - // std::string name = attribute->Name(); - // std::string value = attribute->Value(); - // CCLOG("attribute name = %s, value = %s", name, value); - // if (name == "") - // { - // serializeEnabled = true; - // rootType = (strcmp("", value) == 0) ? "Node" : value; - // } - // - // if (serializeEnabled) - // { - // break; - // } - // - // attribute = attribute->Next(); - // } - // } if (createEnabled) @@ -1390,7 +1358,7 @@ Node* CSLoader::nodeFromXML(const tinyxml2::XMLElement *objectData, const std::s while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -1568,7 +1536,7 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl const tinyxml2::XMLAttribute* attribute = nodeObjectData->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Name") @@ -1587,21 +1555,13 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl { node->setRotationSkewY(atof(value.c_str())); } - else if (name == "Rotation") - { -// node->setRotation(atoi(value.c_str())); - } else if (name == "ZOrder") { node->setZOrder(atoi(value.c_str())); } - else if (name == "Visible") - { - node->setVisible((value == "True") ? true : false); - } else if (name == "VisibleForFrame") { -// node->setVisible((value == "True") ? true : false); + node->setVisible((value == "True") ? true : false); } else if (name == "Alpha") { @@ -1618,18 +1578,18 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl const tinyxml2::XMLElement* child = nodeObjectData->FirstChildElement(); while (child) { - std::string name = child->Name(); + name = child->Name(); if (name == "Children") { break; } else if (name == "Position") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -1646,11 +1606,11 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl } else if (name == "Scale") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -1667,14 +1627,14 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl } else if (name == "AnchorPoint") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); float anchorX = 0.0f; float anchorY = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -1693,12 +1653,12 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int opacity = 255, red = 255, green = 255, blue = 255; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "A") @@ -1726,12 +1686,12 @@ void CSLoader::setPropsForNodeFromXML(cocos2d::Node *node, const tinyxml2::XMLEl } else if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); float width = 0.0f, height = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -1797,13 +1757,13 @@ void CSLoader::setPropsForSpriteFromXML(cocos2d::Node *node, const tinyxml2::XML if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -1872,7 +1832,7 @@ Node* CSLoader::createParticleFromXML(const tinyxml2::XMLElement *particleObject while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -1936,7 +1896,7 @@ Node* CSLoader::createTMXTiledMapFromXML(const tinyxml2::XMLElement *tmxTiledMap while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -2042,13 +2002,13 @@ void CSLoader::setPropsForComAudioFromXML(cocos2d::Component *component, const t if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk index aa13963325..d31578183a 100644 --- a/cocos/editor-support/cocostudio/Android.mk +++ b/cocos/editor-support/cocostudio/Android.mk @@ -63,26 +63,15 @@ ActionTimeline/CSLoader.cpp \ CSParseBinary.pb.cc -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../../external +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/../../../external \ -$(LOCAL_PATH)/../../../external/protobuf-lite/src/google/protobuf \ -$(LOCAL_PATH)/../../../external/protobuf-lite/src \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/WidgetReader \ -$(LOCAL_PATH)/../../platform/android \ -$(LOCAL_PATH)/../../../external/tinyxml2 \ +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/WidgetReader LOCAL_CFLAGS += -fexceptions LOCAL_STATIC_LIBRARIES := cocos_ui_static LOCAL_STATIC_LIBRARIES += cocosdenshion_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static -LOCAL_STATIC_LIBRARIES += cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_protobuf-lite_static include $(BUILD_STATIC_LIBRARY) - diff --git a/cocos/editor-support/cocostudio/CCSSceneReader.cpp b/cocos/editor-support/cocostudio/CCSSceneReader.cpp index cd788eedd8..52a9e50e5e 100644 --- a/cocos/editor-support/cocostudio/CCSSceneReader.cpp +++ b/cocos/editor-support/cocostudio/CCSSceneReader.cpp @@ -78,8 +78,6 @@ cocos2d::Node* SceneReader::createNodeWithSceneFile(const std::string &fileName, } else if(file_extension == ".CSB") { - ssize_t size = 0; - unsigned char *pBytes = nullptr; do { std::string binaryFilePath = CCFileUtils::getInstance()->fullPathForFilename(fileName); auto fileData = FileUtils::getInstance()->getDataFromFile(binaryFilePath); diff --git a/cocos/editor-support/cocostudio/CocosStudioExport.h b/cocos/editor-support/cocostudio/CocosStudioExport.h index ed5d79d622..062566fb64 100644 --- a/cocos/editor-support/cocostudio/CocosStudioExport.h +++ b/cocos/editor-support/cocostudio/CocosStudioExport.h @@ -1,7 +1,7 @@ #ifndef __CCCOCOSSTUDIO_H__ #define __CCCOCOSSTUDIO_H__ -#if defined(WIN32) && defined(_WINDOWS) +#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8) #ifdef __MINGW32__ #include #endif diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp index 9d1fd3a57f..a0d3ef8a69 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp @@ -75,7 +75,6 @@ namespace cocostudio for (int i = 0; i < cocoNode->GetChildNum(); ++i) { std::string key = stChildArray[i].GetName(cocoLoader); std::string value = stChildArray[i].GetValue(cocoLoader); -// CCLOG("Button: key = %s, value = %d", key.c_str(), i); //read all basic properties of widget CC_BASIC_PROPERTY_BINARY_READER @@ -422,11 +421,11 @@ namespace cocostudio if (name == "Size" && scale9Enabled) { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -443,10 +442,10 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -467,10 +466,10 @@ namespace cocostudio } else if (name == "TextColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -491,13 +490,13 @@ namespace cocostudio } else if (name == "DisabledFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -537,13 +536,13 @@ namespace cocostudio } else if (name == "PressedFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -583,13 +582,13 @@ namespace cocostudio } else if (name == "NormalFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -629,13 +628,13 @@ namespace cocostudio } else if (name == "FontResource") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp index 947f0a3aa1..58c1e2a781 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp @@ -212,7 +212,7 @@ namespace cocostudio std::string frontCrossDisabledFileName = this->getResourcePath(frontCrossDisabledDic.path(), (Widget::TextureResType)frontCrossDisabledType); checkBox->loadTextureFrontCrossDisabled(frontCrossDisabledFileName, (Widget::TextureResType)frontCrossDisabledType); - checkBox->setSelectedState(options.selectedstate()); + checkBox->setSelected(options.selectedstate()); bool displaystate = true; if(options.has_displaystate()) @@ -244,7 +244,7 @@ namespace cocostudio if (name == "CheckedState") { - checkBox->setSelectedState((value == "True") ? true : false); + checkBox->setSelected((value == "True") ? true : false); } else if (name == "DisplayState") { @@ -266,13 +266,13 @@ namespace cocostudio if (name == "NormalBackFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -312,13 +312,13 @@ namespace cocostudio } else if (name == "PressedBackFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -358,13 +358,13 @@ namespace cocostudio } else if (name == "NodeNormalFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -404,13 +404,13 @@ namespace cocostudio } else if (name == "DisableBackFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -450,13 +450,13 @@ namespace cocostudio } else if (name == "NodeDisableFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp index 95f45e38c1..b02961a27f 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp @@ -199,14 +199,6 @@ namespace cocostudio // other commonly protperties WidgetReader::setColorPropsFromProtocolBuffers(widget, nodeTree); - - bool flipX = options.flippedx(); - bool flipY = options.flippedy(); - - if(flipX != false) - imageView->setFlippedX(flipX); - if(flipY != false) - imageView->setFlippedY(flipY); } void ImageViewReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -269,11 +261,11 @@ namespace cocostudio if (name == "Size" && scale9Enabled) { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -290,13 +282,13 @@ namespace cocostudio } else if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp index c77813ebe3..7f3ab5d083 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp @@ -449,22 +449,20 @@ namespace cocostudio int opacity = widgetOptions.has_alpha() ? widgetOptions.alpha() : 255; panel->setOpacity(opacity); -// int bgimgcr = widgetOptions.has_colorr() ? widgetOptions.colorr() : 255; -// int bgimgcg = widgetOptions.has_colorg() ? widgetOptions.colorg() : 255; -// int bgimgcb = widgetOptions.has_colorb() ? widgetOptions.colorb() : 255; -// panel->setBackGroundImageColor(Color3B(bgimgcr, bgimgcg, bgimgcb)); -// -// int bgimgopacity = widgetOptions.has_opacity() ? widgetOptions.opacity() : 255; -// panel->setBackGroundImageOpacity(bgimgopacity); - // other commonly protperties setAnchorPointForWidget(widget, nodeTree); bool flipX = widgetOptions.flipx(); bool flipY = widgetOptions.flipy(); - widget->setFlippedX(flipX); - widget->setFlippedY(flipY); + if (flipX) + { + widget->setFlippedX(flipX); + } + if (flipY) + { + widget->setFlippedY(flipY); + } } void LayoutReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -547,11 +545,11 @@ namespace cocostudio if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -568,11 +566,11 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -596,11 +594,11 @@ namespace cocostudio } else if (name == "SingleColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -621,11 +619,11 @@ namespace cocostudio } else if (name == "EndColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -646,10 +644,10 @@ namespace cocostudio } else if (name == "FirstColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -670,10 +668,10 @@ namespace cocostudio } else if (name == "ColorVector") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -690,11 +688,11 @@ namespace cocostudio } else if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -768,7 +766,5 @@ namespace cocostudio } } -// panel->setBackGroundImageColor(Color3B(bgimg_red, bgimg_green, bgimg_blue)); -// panel->setBackGroundImageOpacity(bgimg_opacity); } } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp index ec3d3a8d7f..4f727e425a 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp @@ -171,15 +171,6 @@ namespace cocostudio int opacity = widgetOptions.has_alpha() ? widgetOptions.alpha() : 255; listView->setOpacity(opacity); -// int bgimgcr = widgetOptions.has_colorr() ? widgetOptions.colorr() : 255; -// int bgimgcg = widgetOptions.has_colorg() ? widgetOptions.colorg() : 255; -// int bgimgcb = widgetOptions.has_colorb() ? widgetOptions.colorb() : 255; -// listView->setBackGroundImageColor(Color3B(bgimgcr, bgimgcg, bgimgcb)); -// -// int bgimgopacity = widgetOptions.has_opacity() ? widgetOptions.opacity() : 255; -// listView->setBackGroundImageOpacity(bgimgopacity); - - @@ -204,8 +195,14 @@ namespace cocostudio bool flipX = widgetOptions.flipx(); bool flipY = widgetOptions.flipy(); - widget->setFlippedX(flipX); - widget->setFlippedY(flipY); + if (flipX) + { + widget->setFlippedX(flipX); + } + if (flipY) + { + widget->setFlippedY(flipY); + } } void ListViewReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -282,11 +279,11 @@ namespace cocostudio { listView->setDirection(ScrollView::Direction::VERTICAL); - const tinyxml2::XMLAttribute* attribute = objectData->FirstAttribute(); + attribute = objectData->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); - std::string value = attribute->Value(); + name = attribute->Name(); + value = attribute->Value(); if (name == "HorizontalType") { @@ -311,11 +308,11 @@ namespace cocostudio { listView->setDirection(ScrollView::Direction::HORIZONTAL); - const tinyxml2::XMLAttribute* attribute = objectData->FirstAttribute(); + attribute = objectData->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); - std::string value = attribute->Value(); + name = attribute->Name(); + value = attribute->Value(); if (name == "VerticalType") { @@ -357,12 +354,12 @@ namespace cocostudio if (name == "InnerNodeSize") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); - float width = 0.0f, height = 0.0f; + attribute = child->FirstAttribute(); + width = 0.0f; height = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Width") @@ -381,11 +378,11 @@ namespace cocostudio } else if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -402,11 +399,11 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -430,10 +427,10 @@ namespace cocostudio } else if (name == "SingleColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -454,10 +451,10 @@ namespace cocostudio } else if (name == "EndColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -478,10 +475,10 @@ namespace cocostudio } else if (name == "FirstColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -502,10 +499,10 @@ namespace cocostudio } else if (name == "ColorVector") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -522,11 +519,11 @@ namespace cocostudio } else if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -600,8 +597,6 @@ namespace cocostudio } } -// listView->setBackGroundImageColor(Color3B(bgimg_red, bgimg_green, bgimg_blue)); -// listView->setBackGroundImageOpacity(bgimg_opacity); } } diff --git a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp index d31ff50bb5..82489d8ec5 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp @@ -203,7 +203,6 @@ namespace cocostudio bool scale9Enabled = false; float cx = 0.0f, cy = 0.0f, cw = 0.0f, ch = 0.0f; - float swf = 0.0f, shf = 0.0f; int direction = 0; int percent = 0; @@ -264,13 +263,13 @@ namespace cocostudio if (name == "ImageFileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp index 9e9970bfd6..bf620219d4 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp @@ -143,22 +143,20 @@ namespace cocostudio int opacity = widgetOptions.has_alpha() ? widgetOptions.alpha() : 255; pageView->setOpacity(opacity); -// int bgimgcr = widgetOptions.has_colorr() ? widgetOptions.colorr() : 255; -// int bgimgcg = widgetOptions.has_colorg() ? widgetOptions.colorg() : 255; -// int bgimgcb = widgetOptions.has_colorb() ? widgetOptions.colorb() : 255; -// pageView->setBackGroundImageColor(Color3B(bgimgcr, bgimgcg, bgimgcb)); -// -// int bgimgopacity = widgetOptions.has_opacity() ? widgetOptions.opacity() : 255; -// pageView->setBackGroundImageOpacity(bgimgopacity); - // other commonly protperties setAnchorPointForWidget(widget, nodeTree); bool flipX = widgetOptions.flipx(); bool flipY = widgetOptions.flipy(); - widget->setFlippedX(flipX); - widget->setFlippedY(flipY); + if (flipX) + { + widget->setFlippedX(flipX); + } + if (flipY) + { + widget->setFlippedY(flipY); + } } void PageViewReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -241,11 +239,11 @@ namespace cocostudio if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -262,11 +260,11 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -290,10 +288,10 @@ namespace cocostudio } else if (name == "SingleColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -314,10 +312,10 @@ namespace cocostudio } else if (name == "EndColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -338,10 +336,10 @@ namespace cocostudio } else if (name == "FirstColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -362,10 +360,10 @@ namespace cocostudio } else if (name == "ColorVector") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -382,11 +380,11 @@ namespace cocostudio } else if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -458,10 +456,7 @@ namespace cocostudio pageView->setBackGroundImageCapInsets(Rect(cx, cy, cw, ch)); pageView->setContentSize(Size(width, height)); } - } - -// pageView->setBackGroundImageColor(Color3B(bgimg_red, bgimg_green, bgimg_blue)); -// pageView->setBackGroundImageOpacity(bgimg_opacity); + } } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp index 565db8dd9f..32f2638daa 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp @@ -186,15 +186,6 @@ namespace cocostudio int opacity = widgetOptions.has_alpha() ? widgetOptions.alpha() : 255; scrollView->setOpacity(opacity); -// int bgimgcr = widgetOptions.has_colorr() ? widgetOptions.colorr() : 255; -// int bgimgcg = widgetOptions.has_colorg() ? widgetOptions.colorg() : 255; -// int bgimgcb = widgetOptions.has_colorb() ? widgetOptions.colorb() : 255; -// scrollView->setBackGroundImageColor(Color3B(bgimgcr, bgimgcg, bgimgcb)); -// -// int bgimgopacity = widgetOptions.has_opacity() ? widgetOptions.opacity() : 255; -// scrollView->setBackGroundImageOpacity(bgimgopacity); - - float innerWidth = options.has_innerwidth() ? options.innerwidth() : 200; @@ -210,8 +201,14 @@ namespace cocostudio bool flipX = widgetOptions.flipx(); bool flipY = widgetOptions.flipy(); - widget->setFlippedX(flipX); - widget->setFlippedY(flipY); + if (flipX) + { + widget->setFlippedX(flipX); + } + if (flipY) + { + widget->setFlippedY(flipY); + } } void ScrollViewReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -315,12 +312,12 @@ namespace cocostudio if (name == "InnerNodeSize") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); - float width = 0.0f, height = 0.0f; + attribute = child->FirstAttribute(); + width = 0.0f; height = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Width") @@ -339,11 +336,11 @@ namespace cocostudio } else if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -360,11 +357,11 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -388,10 +385,10 @@ namespace cocostudio } else if (name == "SingleColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -412,10 +409,10 @@ namespace cocostudio } else if (name == "EndColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -436,10 +433,10 @@ namespace cocostudio } else if (name == "FirstColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "R") @@ -460,10 +457,10 @@ namespace cocostudio } else if (name == "ColorVector") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -480,11 +477,11 @@ namespace cocostudio } else if (name == "FileData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -560,8 +557,6 @@ namespace cocostudio scrollView->setDirection((ScrollView::Direction)direction); -// scrollView->setBackGroundImageColor(Color3B(bgimg_red, bgimg_green, bgimg_blue)); -// scrollView->setBackGroundImageOpacity(bgimg_opacity); } } diff --git a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp index 28d1022d95..26ab11485c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp @@ -353,13 +353,13 @@ namespace cocostudio if (name == "BackGroundData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -399,13 +399,13 @@ namespace cocostudio } else if (name == "BallNormalData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -445,13 +445,13 @@ namespace cocostudio } else if (name == "BallPressedData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -491,13 +491,13 @@ namespace cocostudio } else if (name == "BallDisabledData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") @@ -537,13 +537,13 @@ namespace cocostudio } else if (name == "ProgressBarData") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp index 5cda19e785..3bf7b446e4 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp @@ -142,11 +142,7 @@ namespace cocostudio TextAtlas* labelAtlas = static_cast(widget); const protocolbuffers::TextAtlasOptions& options = nodeTree.textatlasoptions(); - // bool sv = DICTOOL->checkObjectExist_json(options, P_StringValue); - // bool cmf = DICTOOL->checkObjectExist_json(options, P_CharMapFile); - // bool iw = DICTOOL->checkObjectExist_json(options, P_ItemWidth); - // bool ih = DICTOOL->checkObjectExist_json(options, P_ItemHeight); - // bool scm = DICTOOL->checkObjectExist_json(options, P_StartCharMap); + const protocolbuffers::ResourceData& cmftDic = options.charmapfiledata(); int cmfType = cmftDic.resourcetype(); @@ -234,11 +230,11 @@ namespace cocostudio if (name == "LabelAtlasFileImage_CNB") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp index 9de5d5fe75..81c5a2a4f8 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp @@ -184,13 +184,13 @@ namespace cocostudio if (name == "LabelBMFontFile_CNB") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp index 88796ebecb..85115bf89d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp @@ -165,7 +165,7 @@ namespace cocostudio textField->setPlaceHolder(placeholder); } std::string text = options.has_text() ? options.text() : "Text Field"; - textField->setText(text); + textField->setString(text); int fontSize = options.has_fontsize() ? options.fontsize() : 20; textField->setFontSize(fontSize); @@ -174,19 +174,7 @@ namespace cocostudio std::string fontName = options.has_fontname() ? options.fontname() : "微软雅黑"; textField->setFontName(fontName); - // bool tsw = options.has_touchsizewidth(); - // bool tsh = options.has_touchsizeheight(); - // if (tsw && tsh) - // { - // textField->setTouchSize(Size(options.touchsizewidth(), options.touchsizeheight())); - // } - - // float dw = DICTOOL->getFloatValue_json(options, "width"); - // float dh = DICTOOL->getFloatValue_json(options, "height"); - // if (dw > 0.0f || dh > 0.0f) - // { - // //textField->setSize(Size(dw, dh)); - // } + bool maxLengthEnable = options.maxlengthenable(); textField->setMaxLengthEnabled(maxLengthEnable); @@ -244,7 +232,7 @@ namespace cocostudio } else if (name == "LabelText") { - textField->setText(value); + textField->setString(value); } else if (name == "FontSize") { @@ -273,16 +261,6 @@ namespace cocostudio else if (name == "IsCustomSize") { isCustomSize = ((value == "True") ? true : false); -// if (value == "Custom") -// { -// float areaWidth = 0.0f; -// objectData->QueryFloatAttribute("Width", &areaWidth); -// -// float areaHeight = 0.0f; -// objectData->QueryFloatAttribute("Height", &areaHeight); -// -// textField->setTextAreaSize(Size(areaWidth, areaHeight)); -// } } else if (name == "Alpha") { @@ -300,11 +278,11 @@ namespace cocostudio if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -321,13 +299,13 @@ namespace cocostudio } else if (name == "FontResource") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp index 46bc56c54f..2e2fa468d0 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp @@ -297,12 +297,12 @@ namespace cocostudio if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); float width = 0.0f, height = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -322,13 +322,13 @@ namespace cocostudio } else if (name == "FontResource") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int resourceType = 0; std::string path = "", plistFile = ""; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "Path") diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp index f489217b4a..00b8dce09f 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp @@ -364,6 +364,7 @@ namespace cocostudio widget->setCascadeColorEnabled(true); widget->setCascadeOpacityEnabled(true); + widget->setAnchorPoint(Vec2::ZERO); widget->setUnifySizeEnabled(true); @@ -403,9 +404,6 @@ namespace cocostudio widget->setScaleY(options.has_scaley() ? options.scaley() : 1.0); - - -// widget->setRotation(options.has_rotation() ? options.rotation() : 0.0); widget->setRotationSkewX(options.has_rotationskewx() ? options.rotationskewx() : 0.0); @@ -490,8 +488,14 @@ namespace cocostudio bool flipX = options.flipx(); bool flipY = options.flipy(); - widget->setFlippedX(flipX); - widget->setFlippedY(flipY); + if (flipX) + { + widget->setFlippedX(flipX); + } + if (flipY) + { + widget->setFlippedY(flipY); + } } void WidgetReader::setPropsFromXML(cocos2d::ui::Widget *widget, const tinyxml2::XMLElement *objectData) @@ -530,21 +534,13 @@ namespace cocostudio { widget->setRotationSkewY(atof(value.c_str())); } - else if (name == "Rotation") - { -// widget->setRotation(atoi(value.c_str())); - } else if (name == "ZOrder") { widget->setLocalZOrder(atoi(value.c_str())); } - else if (name == "Visible") - { - widget->setVisible((value == "True") ? true : false); - } else if (name == "VisibleForFrame") { -// widget->setVisible((value == "True") ? true : false); + widget->setVisible((value == "True") ? true : false); } else if (name == "Alpha") { @@ -584,11 +580,11 @@ namespace cocostudio } else if (name == "Position") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") @@ -605,11 +601,11 @@ namespace cocostudio } else if (name == "Scale") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -626,12 +622,12 @@ namespace cocostudio } else if (name == "AnchorPoint") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); float anchor_x = 0.0f, anchor_y = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "ScaleX") @@ -650,12 +646,12 @@ namespace cocostudio } else if (name == "CColor") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); int red = 255, green = 255, blue = 255; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "A") @@ -682,12 +678,12 @@ namespace cocostudio } else if (name == "Size") { - const tinyxml2::XMLAttribute* attribute = child->FirstAttribute(); + attribute = child->FirstAttribute(); float width = 0.0f, height = 0.0f; while (attribute) { - std::string name = attribute->Name(); + name = attribute->Name(); std::string value = attribute->Value(); if (name == "X") diff --git a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj b/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj deleted file mode 100644 index bbceb192f9..0000000000 --- a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj +++ /dev/null @@ -1,302 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E} - libCocosStudio - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - /Zm200 %(AdditionalOptions) - pch.h - true - OldStyle - true - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\protobuf-lite\win32;$(EngineRoot)external\protobuf-lite\src;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\protocolBuf\win32;$(EngineRoot)external\protocolBuf\src;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\protocolBuf\win32;$(EngineRoot)external\protocolBuf\src;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - /Zm200 %(AdditionalOptions) - pch.h - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.filters b/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.filters deleted file mode 100644 index e9d25e2379..0000000000 --- a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.filters +++ /dev/null @@ -1,464 +0,0 @@ - - - - - {d793b86c-0905-4c9b-b6bc-161e351c9eb2} - - - {855f2366-3429-4f77-a080-a41a39c99270} - - - {1a8c6b14-fb28-4485-8417-9b6838fbc4ef} - - - {42f1ce3f-46ab-4a16-a96e-9eb076c873f7} - - - {f8271f80-1663-4425-91c8-7365ec3af017} - - - {48f28446-ffe4-4aa1-a34c-8968c3367ae6} - - - {ad9b4fd1-dc17-4704-9c60-7709eb916f13} - - - {55c682b3-7a48-4fab-ad5a-eb979f3c305e} - - - {c6464479-e0ab-4afc-96fc-1ffc73e40232} - - - {023e3440-1259-4981-ba54-24390d1df447} - - - {f1f20817-9232-4967-a4dd-77550e84e39b} - - - {5149f922-cf29-4a4b-b604-f15c6e8856b0} - - - {59eee6d9-bbfd-4193-be1d-6c18fc38f896} - - - {e30e7bb0-8b73-431a-8461-2c388dfc68cc} - - - {96dd2db1-898a-4598-8001-72601e5665c3} - - - {04e763fc-669f-4440-b3da-2714bb653c75} - - - {053ab44f-ac1f-43ed-8d18-3642f3f57df1} - - - {f1888260-467c-446c-a866-882d67815bb3} - - - {193f7228-6f8c-40ae-916d-811ebb25fa5e} - - - {2413c186-a78b-484d-899d-0c000ca685d7} - - - {d6e0aa43-c62f-4b05-87b0-6b2a6bd00de4} - - - {15bcf867-facd-4e74-a1fe-375b5126d97c} - - - {1d49f0ff-ed53-4181-ace7-6cd2e77cfc76} - - - {a795a46f-a9d7-44c0-9818-edb59b2f0794} - - - {38d21f2e-d189-47e8-b244-6a07dcc0a692} - - - {315e19a3-2ad5-4ffa-93cd-e5ce9812ab76} - - - {695e45cf-2af5-4bdb-84a2-f0e9f3d77f11} - - - {5f5a98dd-657c-4a9b-8862-c11555ad1293} - - - - - components - - - components - - - components - - - components - - - components - - - json - - - reader - - - reader - - - armature\animation - - - armature\animation - - - armature\animation - - - armature\datas - - - armature\display - - - armature\display - - - armature\display - - - armature\display - - - armature\display - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\physics - - - armature - - - armature - - - action - - - action - - - action - - - action - - - action - - - trigger - - - trigger - - - trigger - - - reader\WidgetReader - - - reader\WidgetReader\ButtonReader - - - reader\WidgetReader\CheckBoxReader - - - reader\WidgetReader\ImageViewReader - - - reader\WidgetReader\LayoutReader - - - reader\WidgetReader\ListViewReader - - - reader\WidgetReader\LoadingBarReader - - - reader\WidgetReader\TextReader - - - reader\WidgetReader\TextFieldReader - - - reader\WidgetReader\TextBMFontReader - - - reader\WidgetReader\TextAtlasReader - - - reader\WidgetReader\SliderReader - - - reader\WidgetReader\ScrollViewReader - - - reader\WidgetReader\PageViewReader - - - - TimelineAction - - - TimelineAction - - - TimelineAction - - - TimelineAction - - - json - - - json - - - TimelineAction - - - - - components - - - components - - - components - - - components - - - components - - - json - - - reader - - - reader - - - armature\animation - - - armature\animation - - - armature\animation - - - armature\datas - - - armature\display - - - armature\display - - - armature\display - - - armature\display - - - armature\display - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\utils - - - armature\physics - - - armature - - - armature - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson - - - json\rapidjson\internal - - - json\rapidjson\internal - - - json\rapidjson\internal - - - action - - - action - - - action - - - action - - - action - - - trigger - - - trigger - - - trigger - - - components - - - reader\WidgetReader - - - reader\WidgetReader - - - reader\WidgetReader\ButtonReader - - - reader\WidgetReader\CheckBoxReader - - - reader\WidgetReader\ImageViewReader - - - reader\WidgetReader\LayoutReader - - - reader\WidgetReader\ListViewReader - - - reader\WidgetReader\LoadingBarReader - - - reader\WidgetReader\TextReader - - - reader\WidgetReader\TextFieldReader - - - reader\WidgetReader\TextBMFontReader - - - reader\WidgetReader\TextAtlasReader - - - reader\WidgetReader\SliderReader - - - reader\WidgetReader\ScrollViewReader - - - reader\WidgetReader\PageViewReader - - - - TimelineAction - - - TimelineAction - - - TimelineAction - - - TimelineAction - - - TimelineAction - - - json - - - json - - - TimelineAction - - - \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.user b/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.user deleted file mode 100644 index 17f726ed50..0000000000 --- a/cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/proj.wp8/pch.h b/cocos/editor-support/cocostudio/proj.wp8/pch.h deleted file mode 100644 index 4c3b8cde28..0000000000 --- a/cocos/editor-support/cocostudio/proj.wp8/pch.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" diff --git a/cocos/editor-support/spine/Android.mk b/cocos/editor-support/spine/Android.mk index 118f45c52e..cfc8769eb4 100644 --- a/cocos/editor-support/spine/Android.mk +++ b/cocos/editor-support/spine/Android.mk @@ -5,37 +5,40 @@ LOCAL_MODULE := spine_static LOCAL_MODULE_FILENAME := libspine -LOCAL_SRC_FILES := Animation.cpp \ -AnimationState.cpp \ -AnimationStateData.cpp \ -Atlas.cpp \ -AtlasAttachmentLoader.cpp \ -Attachment.cpp \ -AttachmentLoader.cpp \ -Bone.cpp \ -BoneData.cpp \ -CCSkeleton.cpp \ -CCSkeletonAnimation.cpp \ -Json.cpp \ -RegionAttachment.cpp \ -Skeleton.cpp \ -SkeletonData.cpp \ -SkeletonJson.cpp \ -Skin.cpp \ -Slot.cpp \ -SlotData.cpp \ -BoundingBoxAttachment.cpp \ -Event.cpp \ -EventData.cpp \ -SkeletonBounds.cpp \ -extension.cpp \ +LOCAL_SRC_FILES := Animation.c \ +AnimationState.c \ +AnimationStateData.c \ +Atlas.c \ +AtlasAttachmentLoader.c \ +Attachment.c \ +AttachmentLoader.c \ +Bone.c \ +BoneData.c \ +BoundingBoxAttachment.c \ +Event.c \ +EventData.c \ +extension.c \ +IkConstraint.c \ +IkConstraintData.c \ +Json.c \ +MeshAttachment.c \ +PolygonBatch.cpp \ +RegionAttachment.c \ +Skeleton.c \ +SkeletonAnimation.cpp \ +SkeletonBounds.c \ +SkeletonData.c \ +SkeletonJson.c \ +SkeletonRenderer.cpp \ +Skin.c \ +SkinnedMeshAttachment.c \ +Slot.c \ +SlotData.c \ spine-cocos2dx.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static diff --git a/cocos/editor-support/spine/Animation.c b/cocos/editor-support/spine/Animation.c new file mode 100644 index 0000000000..e4f261eedf --- /dev/null +++ b/cocos/editor-support/spine/Animation.c @@ -0,0 +1,791 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include +#include + +spAnimation* spAnimation_create (const char* name, int timelinesCount) { + spAnimation* self = NEW(spAnimation); + MALLOC_STR(self->name, name); + self->timelinesCount = timelinesCount; + self->timelines = MALLOC(spTimeline*, timelinesCount); + return self; +} + +void spAnimation_dispose (spAnimation* self) { + int i; + for (i = 0; i < self->timelinesCount; ++i) + spTimeline_dispose(self->timelines[i]); + FREE(self->timelines); + FREE(self->name); + FREE(self); +} + +void spAnimation_apply (const spAnimation* self, spSkeleton* skeleton, float lastTime, float time, int loop, spEvent** events, + int* eventsCount) { + int i, n = self->timelinesCount; + + if (loop && self->duration) { + time = FMOD(time, self->duration); + lastTime = FMOD(lastTime, self->duration); + } + + for (i = 0; i < n; ++i) + spTimeline_apply(self->timelines[i], skeleton, lastTime, time, events, eventsCount, 1); +} + +void spAnimation_mix (const spAnimation* self, spSkeleton* skeleton, float lastTime, float time, int loop, spEvent** events, + int* eventsCount, float alpha) { + int i, n = self->timelinesCount; + + if (loop && self->duration) { + time = FMOD(time, self->duration); + lastTime = FMOD(lastTime, self->duration); + } + + for (i = 0; i < n; ++i) + spTimeline_apply(self->timelines[i], skeleton, lastTime, time, events, eventsCount, alpha); +} + +/**/ + +typedef struct _spTimelineVtable { + void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha); + void (*dispose) (spTimeline* self); +} _spTimelineVtable; + +void _spTimeline_init (spTimeline* self, spTimelineType type, /**/ +void (*dispose) (spTimeline* self), /**/ + void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha)) { + CONST_CAST(spTimelineType, self->type) = type; + CONST_CAST(_spTimelineVtable*, self->vtable) = NEW(_spTimelineVtable); + VTABLE(spTimeline, self)->dispose = dispose; + VTABLE(spTimeline, self)->apply = apply; +} + +void _spTimeline_deinit (spTimeline* self) { + FREE(self->vtable); +} + +void spTimeline_dispose (spTimeline* self) { + VTABLE(spTimeline, self)->dispose(self); +} + +void spTimeline_apply (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + VTABLE(spTimeline, self)->apply(self, skeleton, lastTime, time, firedEvents, eventsCount, alpha); +} + +/**/ + +static const float CURVE_LINEAR = 0, CURVE_STEPPED = 1, CURVE_BEZIER = 2; +static const int BEZIER_SEGMENTS = 10, BEZIER_SIZE = 10 * 2 - 1; + +void _spCurveTimeline_init (spCurveTimeline* self, spTimelineType type, int framesCount, /**/ +void (*dispose) (spTimeline* self), /**/ + void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha)) { + _spTimeline_init(SUPER(self), type, dispose, apply); + self->curves = CALLOC(float, (framesCount - 1) * BEZIER_SIZE); +} + +void _spCurveTimeline_deinit (spCurveTimeline* self) { + _spTimeline_deinit(SUPER(self)); + FREE(self->curves); +} + +void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex) { + self->curves[frameIndex * BEZIER_SIZE] = CURVE_LINEAR; +} + +void spCurveTimeline_setStepped (spCurveTimeline* self, int frameIndex) { + self->curves[frameIndex * BEZIER_SIZE] = CURVE_STEPPED; +} + +void spCurveTimeline_setCurve (spCurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2) { + float subdiv1 = 1.0f / BEZIER_SEGMENTS, subdiv2 = subdiv1 * subdiv1, subdiv3 = subdiv2 * subdiv1; + float pre1 = 3 * subdiv1, pre2 = 3 * subdiv2, pre4 = 6 * subdiv2, pre5 = 6 * subdiv3; + float tmp1x = -cx1 * 2 + cx2, tmp1y = -cy1 * 2 + cy2, tmp2x = (cx1 - cx2) * 3 + 1, tmp2y = (cy1 - cy2) * 3 + 1; + float dfx = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv3, dfy = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv3; + float ddfx = tmp1x * pre4 + tmp2x * pre5, ddfy = tmp1y * pre4 + tmp2y * pre5; + float dddfx = tmp2x * pre5, dddfy = tmp2y * pre5; + float x = dfx, y = dfy; + + int i = frameIndex * BEZIER_SIZE, n = i + BEZIER_SIZE - 1; + self->curves[i++] = CURVE_BEZIER; + + for (; i < n; i += 2) { + self->curves[i] = x; + self->curves[i + 1] = y; + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + x += dfx; + y += dfy; + } +} + +float spCurveTimeline_getCurvePercent (const spCurveTimeline* self, int frameIndex, float percent) { + float x, y; + int i = frameIndex * BEZIER_SIZE, start, n; + float type = self->curves[i]; + if (type == CURVE_LINEAR) return percent; + if (type == CURVE_STEPPED) return 0; + i++; + x = 0; + for (start = i, n = i + BEZIER_SIZE - 1; i < n; i += 2) { + x = self->curves[i]; + if (x >= percent) { + float prevX, prevY; + if (i == start) { + prevX = 0; + prevY = 0; + } else { + prevX = self->curves[i - 2]; + prevY = self->curves[i - 1]; + } + return prevY + (self->curves[i + 1] - prevY) * (percent - prevX) / (x - prevX); + } + } + y = self->curves[i - 1]; + return y + (1 - y) * (percent - x) / (1 - x); /* Last point is 1,1. */ +} + +/* @param target After the first and before the last entry. */ +static int binarySearch (float *values, int valuesLength, float target, int step) { + int low = 0, current; + int high = valuesLength / step - 2; + if (high == 0) return step; + current = high >> 1; + while (1) { + if (values[(current + 1) * step] <= target) + low = current + 1; + else + high = current; + if (low == high) return (low + 1) * step; + current = (low + high) >> 1; + } + return 0; +} + +/* @param target After the first and before the last entry. */ +static int binarySearch1 (float *values, int valuesLength, float target) { + int low = 0, current; + int high = valuesLength - 2; + if (high == 0) return 1; + current = high >> 1; + while (1) { + if (values[(current + 1)] <= target) + low = current + 1; + else + high = current; + if (low == high) return low + 1; + current = (low + high) >> 1; + } + return 0; +} + +/*static int linearSearch (float *values, int valuesLength, float target, int step) { + int i, last = valuesLength - step; + for (i = 0; i <= last; i += step) { + if (values[i] <= target) continue; + return i; + } + return -1; + }*/ + +/**/ + +void _spBaseTimeline_dispose (spTimeline* timeline) { + struct spBaseTimeline* self = SUB_CAST(struct spBaseTimeline, timeline); + _spCurveTimeline_deinit(SUPER(self)); + FREE(self->frames); + FREE(self); +} + +/* Many timelines have structure identical to struct spBaseTimeline and extend spCurveTimeline. **/ +struct spBaseTimeline* _spBaseTimeline_create (int framesCount, spTimelineType type, int frameSize, /**/ + void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha)) { + struct spBaseTimeline* self = NEW(struct spBaseTimeline); + _spCurveTimeline_init(SUPER(self), type, framesCount, _spBaseTimeline_dispose, apply); + + CONST_CAST(int, self->framesCount) = framesCount * frameSize; + CONST_CAST(float*, self->frames) = CALLOC(float, self->framesCount); + + return self; +} + +/**/ + +static const int ROTATE_PREV_FRAME_TIME = -2; +static const int ROTATE_FRAME_VALUE = 1; + +void _spRotateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + spBone *bone; + int frameIndex; + float prevFrameValue, frameTime, percent, amount; + + spRotateTimeline* self = SUB_CAST(spRotateTimeline, timeline); + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + bone = skeleton->bones[self->boneIndex]; + + if (time >= self->frames[self->framesCount - 2]) { /* Time is after last frame. */ + float amount = bone->data->rotation + self->frames[self->framesCount - 1] - bone->rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone->rotation += amount * alpha; + return; + } + + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch(self->frames, self->framesCount, time, 2); + prevFrameValue = self->frames[frameIndex - 1]; + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex + ROTATE_PREV_FRAME_TIME] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), (frameIndex >> 1) - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + amount = self->frames[frameIndex + ROTATE_FRAME_VALUE] - prevFrameValue; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone->data->rotation + (prevFrameValue + amount * percent) - bone->rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone->rotation += amount * alpha; +} + +spRotateTimeline* spRotateTimeline_create (int framesCount) { + return _spBaseTimeline_create(framesCount, SP_TIMELINE_ROTATE, 2, _spRotateTimeline_apply); +} + +void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle) { + frameIndex *= 2; + self->frames[frameIndex] = time; + self->frames[frameIndex + 1] = angle; +} + +/**/ + +static const int TRANSLATE_PREV_FRAME_TIME = -3; +static const int TRANSLATE_FRAME_X = 1; +static const int TRANSLATE_FRAME_Y = 2; + +void _spTranslateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, + spEvent** firedEvents, int* eventsCount, float alpha) { + spBone *bone; + int frameIndex; + float prevFrameX, prevFrameY, frameTime, percent; + + spTranslateTimeline* self = SUB_CAST(spTranslateTimeline, timeline); + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + bone = skeleton->bones[self->boneIndex]; + + if (time >= self->frames[self->framesCount - 3]) { /* Time is after last frame. */ + bone->x += (bone->data->x + self->frames[self->framesCount - 2] - bone->x) * alpha; + bone->y += (bone->data->y + self->frames[self->framesCount - 1] - bone->y) * alpha; + return; + } + + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch(self->frames, self->framesCount, time, 3); + prevFrameX = self->frames[frameIndex - 2]; + prevFrameY = self->frames[frameIndex - 1]; + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex + TRANSLATE_PREV_FRAME_TIME] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + bone->x += (bone->data->x + prevFrameX + (self->frames[frameIndex + TRANSLATE_FRAME_X] - prevFrameX) * percent - bone->x) + * alpha; + bone->y += (bone->data->y + prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent - bone->y) + * alpha; +} + +spTranslateTimeline* spTranslateTimeline_create (int framesCount) { + return _spBaseTimeline_create(framesCount, SP_TIMELINE_TRANSLATE, 3, _spTranslateTimeline_apply); +} + +void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y) { + frameIndex *= 3; + self->frames[frameIndex] = time; + self->frames[frameIndex + 1] = x; + self->frames[frameIndex + 2] = y; +} + +/**/ + +void _spScaleTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + spBone *bone; + int frameIndex; + float prevFrameX, prevFrameY, frameTime, percent; + + spScaleTimeline* self = SUB_CAST(spScaleTimeline, timeline); + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + bone = skeleton->bones[self->boneIndex]; + if (time >= self->frames[self->framesCount - 3]) { /* Time is after last frame. */ + bone->scaleX += (bone->data->scaleX * self->frames[self->framesCount - 2] - bone->scaleX) * alpha; + bone->scaleY += (bone->data->scaleY * self->frames[self->framesCount - 1] - bone->scaleY) * alpha; + return; + } + + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch(self->frames, self->framesCount, time, 3); + prevFrameX = self->frames[frameIndex - 2]; + prevFrameY = self->frames[frameIndex - 1]; + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex + TRANSLATE_PREV_FRAME_TIME] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + bone->scaleX += (bone->data->scaleX * (prevFrameX + (self->frames[frameIndex + TRANSLATE_FRAME_X] - prevFrameX) * percent) + - bone->scaleX) * alpha; + bone->scaleY += (bone->data->scaleY * (prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent) + - bone->scaleY) * alpha; +} + +spScaleTimeline* spScaleTimeline_create (int framesCount) { + return _spBaseTimeline_create(framesCount, SP_TIMELINE_SCALE, 3, _spScaleTimeline_apply); +} + +void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y) { + spTranslateTimeline_setFrame(self, frameIndex, time, x, y); +} + +/**/ + +static const int COLOR_PREV_FRAME_TIME = -5; +static const int COLOR_FRAME_R = 1; +static const int COLOR_FRAME_G = 2; +static const int COLOR_FRAME_B = 3; +static const int COLOR_FRAME_A = 4; + +void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + spSlot *slot; + int frameIndex; + float prevFrameR, prevFrameG, prevFrameB, prevFrameA, percent, frameTime; + float r, g, b, a; + spColorTimeline* self = (spColorTimeline*)timeline; + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + if (time >= self->frames[self->framesCount - 5]) { + /* Time is after last frame. */ + int i = self->framesCount - 1; + r = self->frames[i - 3]; + g = self->frames[i - 2]; + b = self->frames[i - 1]; + a = self->frames[i]; + } else { + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch(self->frames, self->framesCount, time, 5); + prevFrameR = self->frames[frameIndex - 4]; + prevFrameG = self->frames[frameIndex - 3]; + prevFrameB = self->frames[frameIndex - 2]; + prevFrameA = self->frames[frameIndex - 1]; + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex + COLOR_PREV_FRAME_TIME] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 5 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + r = prevFrameR + (self->frames[frameIndex + COLOR_FRAME_R] - prevFrameR) * percent; + g = prevFrameG + (self->frames[frameIndex + COLOR_FRAME_G] - prevFrameG) * percent; + b = prevFrameB + (self->frames[frameIndex + COLOR_FRAME_B] - prevFrameB) * percent; + a = prevFrameA + (self->frames[frameIndex + COLOR_FRAME_A] - prevFrameA) * percent; + } + slot = skeleton->slots[self->slotIndex]; + if (alpha < 1) { + slot->r += (r - slot->r) * alpha; + slot->g += (g - slot->g) * alpha; + slot->b += (b - slot->b) * alpha; + slot->a += (a - slot->a) * alpha; + } else { + slot->r = r; + slot->g = g; + slot->b = b; + slot->a = a; + } +} + +spColorTimeline* spColorTimeline_create (int framesCount) { + return (spColorTimeline*)_spBaseTimeline_create(framesCount, SP_TIMELINE_COLOR, 5, _spColorTimeline_apply); +} + +void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a) { + frameIndex *= 5; + self->frames[frameIndex] = time; + self->frames[frameIndex + 1] = r; + self->frames[frameIndex + 2] = g; + self->frames[frameIndex + 3] = b; + self->frames[frameIndex + 4] = a; +} + +/**/ + +void _spAttachmentTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, + spEvent** firedEvents, int* eventsCount, float alpha) { + int frameIndex; + const char* attachmentName; + spAttachmentTimeline* self = (spAttachmentTimeline*)timeline; + + if (time < self->frames[0]) { + if (lastTime > time) _spAttachmentTimeline_apply(timeline, skeleton, lastTime, (float)INT_MAX, 0, 0, 0); + return; + } else if (lastTime > time) /**/ + lastTime = -1; + + frameIndex = time >= self->frames[self->framesCount - 1] ? + self->framesCount - 1 : binarySearch1(self->frames, self->framesCount, time) - 1; + if (self->frames[frameIndex] < lastTime) return; + + attachmentName = self->attachmentNames[frameIndex]; + spSlot_setAttachment(skeleton->slots[self->slotIndex], + attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0); +} + +void _spAttachmentTimeline_dispose (spTimeline* timeline) { + spAttachmentTimeline* self = SUB_CAST(spAttachmentTimeline, timeline); + int i; + + _spTimeline_deinit(timeline); + + for (i = 0; i < self->framesCount; ++i) + FREE(self->attachmentNames[i]); + FREE(self->attachmentNames); + FREE(self->frames); + FREE(self); +} + +spAttachmentTimeline* spAttachmentTimeline_create (int framesCount) { + spAttachmentTimeline* self = NEW(spAttachmentTimeline); + _spTimeline_init(SUPER(self), SP_TIMELINE_ATTACHMENT, _spAttachmentTimeline_dispose, _spAttachmentTimeline_apply); + + CONST_CAST(int, self->framesCount) = framesCount; + CONST_CAST(float*, self->frames) = CALLOC(float, framesCount); + CONST_CAST(char**, self->attachmentNames) = CALLOC(char*, framesCount); + + return self; +} + +void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName) { + self->frames[frameIndex] = time; + + FREE(self->attachmentNames[frameIndex]); + if (attachmentName) + MALLOC_STR(self->attachmentNames[frameIndex], attachmentName); + else + self->attachmentNames[frameIndex] = 0; +} + +/**/ + +/** Fires events for frames > lastTime and <= time. */ +void _spEventTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + spEventTimeline* self = (spEventTimeline*)timeline; + int frameIndex; + if (!firedEvents) return; + + if (lastTime > time) { /* Fire events after last time for looped animations. */ + _spEventTimeline_apply(timeline, skeleton, lastTime, (float)INT_MAX, firedEvents, eventsCount, alpha); + lastTime = -1; + } else if (lastTime >= self->frames[self->framesCount - 1]) /* Last time is after last frame. */ + return; + if (time < self->frames[0]) return; /* Time is before first frame. */ + + if (lastTime < self->frames[0]) + frameIndex = 0; + else { + float frame; + frameIndex = binarySearch1(self->frames, self->framesCount, lastTime); + frame = self->frames[frameIndex]; + while (frameIndex > 0) { /* Fire multiple events with the same frame. */ + if (self->frames[frameIndex - 1] != frame) break; + frameIndex--; + } + } + for (; frameIndex < self->framesCount && time >= self->frames[frameIndex]; ++frameIndex) { + firedEvents[*eventsCount] = self->events[frameIndex]; + (*eventsCount)++; + } +} + +void _spEventTimeline_dispose (spTimeline* timeline) { + spEventTimeline* self = SUB_CAST(spEventTimeline, timeline); + int i; + + _spTimeline_deinit(timeline); + + for (i = 0; i < self->framesCount; ++i) + spEvent_dispose(self->events[i]); + FREE(self->events); + FREE(self->frames); + FREE(self); +} + +spEventTimeline* spEventTimeline_create (int framesCount) { + spEventTimeline* self = NEW(spEventTimeline); + _spTimeline_init(SUPER(self), SP_TIMELINE_EVENT, _spEventTimeline_dispose, _spEventTimeline_apply); + + CONST_CAST(int, self->framesCount) = framesCount; + CONST_CAST(float*, self->frames) = CALLOC(float, framesCount); + CONST_CAST(spEvent**, self->events) = CALLOC(spEvent*, framesCount); + + return self; +} + +void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, float time, spEvent* event) { + self->frames[frameIndex] = time; + + FREE(self->events[frameIndex]); + self->events[frameIndex] = event; +} + +/**/ + +void _spDrawOrderTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, + spEvent** firedEvents, int* eventsCount, float alpha) { + int i; + int frameIndex; + const int* drawOrderToSetupIndex; + spDrawOrderTimeline* self = (spDrawOrderTimeline*)timeline; + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + if (time >= self->frames[self->framesCount - 1]) /* Time is after last frame. */ + frameIndex = self->framesCount - 1; + else + frameIndex = binarySearch1(self->frames, self->framesCount, time) - 1; + + drawOrderToSetupIndex = self->drawOrders[frameIndex]; + if (!drawOrderToSetupIndex) + memcpy(skeleton->drawOrder, skeleton->slots, self->slotsCount * sizeof(int)); + else { + for (i = 0; i < self->slotsCount; ++i) + skeleton->drawOrder[i] = skeleton->slots[drawOrderToSetupIndex[i]]; + } +} + +void _spDrawOrderTimeline_dispose (spTimeline* timeline) { + spDrawOrderTimeline* self = SUB_CAST(spDrawOrderTimeline, timeline); + int i; + + _spTimeline_deinit(timeline); + + for (i = 0; i < self->framesCount; ++i) + FREE(self->drawOrders[i]); + FREE(self->drawOrders); + FREE(self->frames); + FREE(self); +} + +spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount) { + spDrawOrderTimeline* self = NEW(spDrawOrderTimeline); + _spTimeline_init(SUPER(self), SP_TIMELINE_DRAWORDER, _spDrawOrderTimeline_dispose, _spDrawOrderTimeline_apply); + + CONST_CAST(int, self->framesCount) = framesCount; + CONST_CAST(float*, self->frames) = CALLOC(float, framesCount); + CONST_CAST(int**, self->drawOrders) = CALLOC(int*, framesCount); + CONST_CAST(int, self->slotsCount) = slotsCount; + + return self; +} + +void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder) { + self->frames[frameIndex] = time; + + FREE(self->drawOrders[frameIndex]); + if (!drawOrder) + self->drawOrders[frameIndex] = 0; + else { + self->drawOrders[frameIndex] = MALLOC(int, self->slotsCount); + memcpy(CONST_CAST(int*, self->drawOrders[frameIndex]), drawOrder, self->slotsCount * sizeof(int)); + } +} + +/**/ + +void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, + int* eventsCount, float alpha) { + int frameIndex, i; + float percent, frameTime; + const float* prevVertices; + const float* nextVertices; + spFFDTimeline* self = (spFFDTimeline*)timeline; + + spSlot *slot = skeleton->slots[self->slotIndex]; + if (slot->attachment != self->attachment) return; + + if (time < self->frames[0]) { + slot->attachmentVerticesCount = 0; + return; /* Time is before first frame. */ + } + + if (slot->attachmentVerticesCount != self->frameVerticesCount) alpha = 1; // Don't mix from uninitialized slot vertices. + if (slot->attachmentVerticesCount < self->frameVerticesCount) { + if (slot->attachmentVerticesCapacity < self->frameVerticesCount) { + FREE(slot->attachmentVertices); + slot->attachmentVertices = MALLOC(float, self->frameVerticesCount); + slot->attachmentVerticesCapacity = self->frameVerticesCount; + } + } + slot->attachmentVerticesCount = self->frameVerticesCount; + + if (time >= self->frames[self->framesCount - 1]) { + /* Time is after last frame. */ + const float* lastVertices = self->frameVertices[self->framesCount - 1]; + if (alpha < 1) { + for (i = 0; i < self->frameVerticesCount; ++i) + slot->attachmentVertices[i] += (lastVertices[i] - slot->attachmentVertices[i]) * alpha; + } else + memcpy(slot->attachmentVertices, lastVertices, self->frameVerticesCount * sizeof(float)); + return; + } + + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch1(self->frames, self->framesCount, time); + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex - 1] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + prevVertices = self->frameVertices[frameIndex - 1]; + nextVertices = self->frameVertices[frameIndex]; + + if (alpha < 1) { + for (i = 0; i < self->frameVerticesCount; ++i) { + float prev = prevVertices[i]; + slot->attachmentVertices[i] += (prev + (nextVertices[i] - prev) * percent - slot->attachmentVertices[i]) * alpha; + } + } else { + for (i = 0; i < self->frameVerticesCount; ++i) { + float prev = prevVertices[i]; + slot->attachmentVertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } +} + +void _spFFDTimeline_dispose (spTimeline* timeline) { + spFFDTimeline* self = SUB_CAST(spFFDTimeline, timeline); + int i; + + _spCurveTimeline_deinit(SUPER(self)); + + for (i = 0; i < self->framesCount; ++i) + FREE(self->frameVertices[i]); + FREE(self->frameVertices); + FREE(self->frames); + FREE(self); +} + +spFFDTimeline* spFFDTimeline_create (int framesCount, int frameVerticesCount) { + spFFDTimeline* self = NEW(spFFDTimeline); + _spCurveTimeline_init(SUPER(self), SP_TIMELINE_FFD, framesCount, _spFFDTimeline_dispose, _spFFDTimeline_apply); + CONST_CAST(int, self->framesCount) = framesCount; + CONST_CAST(float*, self->frames) = CALLOC(float, self->framesCount); + CONST_CAST(float**, self->frameVertices) = CALLOC(float*, framesCount); + CONST_CAST(int, self->frameVerticesCount) = frameVerticesCount; + return self; +} + +void spFFDTimeline_setFrame (spFFDTimeline* self, int frameIndex, float time, float* vertices) { + self->frames[frameIndex] = time; + + FREE(self->frameVertices[frameIndex]); + if (!vertices) + self->frameVertices[frameIndex] = 0; + else { + self->frameVertices[frameIndex] = MALLOC(float, self->frameVerticesCount); + memcpy(CONST_CAST(float*, self->frameVertices[frameIndex]), vertices, self->frameVerticesCount * sizeof(float)); + } +} + + +/**/ + +static const int IKCONSTRAINT_PREV_FRAME_TIME = -3; +static const int IKCONSTRAINT_PREV_FRAME_MIX = -2; +static const int IKCONSTRAINT_PREV_FRAME_BEND_DIRECTION = -1; +static const int IKCONSTRAINT_FRAME_MIX = 1; + +void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, + spEvent** firedEvents, int* eventsCount, float alpha) { + int frameIndex; + float prevFrameMix, frameTime, percent, mix; + spIkConstraint* ikConstraint; + spIkConstraintTimeline* self = (spIkConstraintTimeline*)timeline; + + if (time < self->frames[0]) return; /* Time is before first frame. */ + + ikConstraint = skeleton->ikConstraints[self->ikConstraintIndex]; + + if (time >= self->frames[self->framesCount - 3]) { /* Time is after last frame. */ + ikConstraint->mix += (self->frames[self->framesCount - 2] - ikConstraint->mix) * alpha; + ikConstraint->bendDirection = (int)self->frames[self->framesCount - 1]; + return; + } + + /* Interpolate between the previous frame and the current frame. */ + frameIndex = binarySearch(self->frames, self->framesCount, time, 3); + prevFrameMix = self->frames[frameIndex + IKCONSTRAINT_PREV_FRAME_MIX]; + frameTime = self->frames[frameIndex]; + percent = 1 - (time - frameTime) / (self->frames[frameIndex + IKCONSTRAINT_PREV_FRAME_TIME] - frameTime); + percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + mix = prevFrameMix + (self->frames[frameIndex + IKCONSTRAINT_FRAME_MIX] - prevFrameMix) * percent; + ikConstraint->mix += (mix - ikConstraint->mix) * alpha; + ikConstraint->bendDirection = (int)self->frames[frameIndex + IKCONSTRAINT_PREV_FRAME_BEND_DIRECTION]; +} + +spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount) { + return (spIkConstraintTimeline*)_spBaseTimeline_create(framesCount, SP_TIMELINE_IKCONSTRAINT, 3, _spIkConstraintTimeline_apply); +} + +void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection) { + frameIndex *= 3; + self->frames[frameIndex] = time; + self->frames[frameIndex + 1] = mix; + self->frames[frameIndex + 2] = (float)bendDirection; +} diff --git a/cocos/editor-support/spine/Animation.cpp b/cocos/editor-support/spine/Animation.cpp deleted file mode 100644 index cb8daf14f8..0000000000 --- a/cocos/editor-support/spine/Animation.cpp +++ /dev/null @@ -1,639 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -spAnimation* spAnimation_create (const char* name, int timelineCount) { - spAnimation* self = NEW(spAnimation); - MALLOC_STR(self->name, name); - self->timelineCount = timelineCount; - self->timelines = MALLOC(spTimeline*, timelineCount); - return self; -} - -void spAnimation_dispose (spAnimation* self) { - int i; - for (i = 0; i < self->timelineCount; ++i) - spTimeline_dispose(self->timelines[i]); - FREE(self->timelines); - FREE(self->name); - FREE(self); -} - -void spAnimation_apply (const spAnimation* self, spSkeleton* skeleton, float lastTime, float time, int loop, spEvent** events, - int* eventCount) { - int i, n = self->timelineCount; - - if (loop && self->duration) { - time = FMOD(time, self->duration); - lastTime = FMOD(lastTime, self->duration); - } - - for (i = 0; i < n; ++i) - spTimeline_apply(self->timelines[i], skeleton, lastTime, time, events, eventCount, 1); -} - -void spAnimation_mix (const spAnimation* self, spSkeleton* skeleton, float lastTime, float time, int loop, spEvent** events, - int* eventCount, float alpha) { - int i, n = self->timelineCount; - - if (loop && self->duration) { - time = FMOD(time, self->duration); - lastTime = FMOD(lastTime, self->duration); - } - - for (i = 0; i < n; ++i) - spTimeline_apply(self->timelines[i], skeleton, lastTime, time, events, eventCount, alpha); -} - -/**/ - -typedef struct _spTimelineVtable { - void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha); - void (*dispose) (spTimeline* self); -} _spTimelineVtable; - -void _spTimeline_init (spTimeline* self, spTimelineType type, /**/ -void (*dispose) (spTimeline* self), /**/ - void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha)) { - CONST_CAST(spTimelineType, self->type) = type; - CONST_CAST(_spTimelineVtable*, self->vtable) = NEW(_spTimelineVtable); - VTABLE(spTimeline, self)->dispose = dispose; - VTABLE(spTimeline, self)->apply = apply; -} - -void _spTimeline_deinit (spTimeline* self) { - FREE(self->vtable); -} - -void spTimeline_dispose (spTimeline* self) { - VTABLE(spTimeline, self)->dispose(self); -} - -void spTimeline_apply (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha) { - VTABLE(spTimeline, self)->apply(self, skeleton, lastTime, time, firedEvents, eventCount, alpha); -} - -/**/ - -static const float CURVE_LINEAR = 0; -static const float CURVE_STEPPED = -1; -static const int CURVE_SEGMENTS = 10; - -void _spCurveTimeline_init (spCurveTimeline* self, spTimelineType type, int frameCount, /**/ -void (*dispose) (spTimeline* self), /**/ - void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha)) { - _spTimeline_init(SUPER(self), type, dispose, apply); - self->curves = CALLOC(float, (frameCount - 1) * 6); -} - -void _spCurveTimeline_deinit (spCurveTimeline* self) { - _spTimeline_deinit(SUPER(self)); - FREE(self->curves); -} - -void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex) { - self->curves[frameIndex * 6] = CURVE_LINEAR; -} - -void spCurveTimeline_setStepped (spCurveTimeline* self, int frameIndex) { - self->curves[frameIndex * 6] = CURVE_STEPPED; -} - -void spCurveTimeline_setCurve (spCurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2) { - float subdiv_step = 1.0f / CURVE_SEGMENTS; - float subdiv_step2 = subdiv_step * subdiv_step; - float subdiv_step3 = subdiv_step2 * subdiv_step; - float pre1 = 3 * subdiv_step; - float pre2 = 3 * subdiv_step2; - float pre4 = 6 * subdiv_step2; - float pre5 = 6 * subdiv_step3; - float tmp1x = -cx1 * 2 + cx2; - float tmp1y = -cy1 * 2 + cy2; - float tmp2x = (cx1 - cx2) * 3 + 1; - float tmp2y = (cy1 - cy2) * 3 + 1; - int i = frameIndex * 6; - self->curves[i] = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3; - self->curves[i + 1] = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3; - self->curves[i + 2] = tmp1x * pre4 + tmp2x * pre5; - self->curves[i + 3] = tmp1y * pre4 + tmp2y * pre5; - self->curves[i + 4] = tmp2x * pre5; - self->curves[i + 5] = tmp2y * pre5; -} - -float spCurveTimeline_getCurvePercent (const spCurveTimeline* self, int frameIndex, float percent) { - float dfy; - float ddfx; - float ddfy; - float dddfx; - float dddfy; - float x, y; - int i; - int curveIndex = frameIndex * 6; - float dfx = self->curves[curveIndex]; - if (dfx == CURVE_LINEAR) return percent; - if (dfx == CURVE_STEPPED) return 0; - dfy = self->curves[curveIndex + 1]; - ddfx = self->curves[curveIndex + 2]; - ddfy = self->curves[curveIndex + 3]; - dddfx = self->curves[curveIndex + 4]; - dddfy = self->curves[curveIndex + 5]; - x = dfx, y = dfy; - i = CURVE_SEGMENTS - 2; - while (1) { - if (x >= percent) { - float lastX = x - dfx; - float lastY = y - dfy; - return lastY + (y - lastY) * (percent - lastX) / (x - lastX); - } - if (i == 0) break; - i--; - dfx += ddfx; - dfy += ddfy; - ddfx += dddfx; - ddfy += dddfy; - x += dfx; - y += dfy; - } - return y + (1 - y) * (percent - x) / (1 - x); /* Last point is 1,1. */ -} - -/* @param target After the first and before the last entry. */ -static int binarySearch (float *values, int valuesLength, float target, int step) { - int low = 0, current; - int high = valuesLength / step - 2; - if (high == 0) return step; - current = high >> 1; - while (1) { - if (values[(current + 1) * step] <= target) - low = current + 1; - else - high = current; - if (low == high) return (low + 1) * step; - current = (low + high) >> 1; - } - return 0; -} - -/*static int linearSearch (float *values, int valuesLength, float target, int step) { - int i, last = valuesLength - step; - for (i = 0; i <= last; i += step) { - if (values[i] <= target) continue; - return i; - } - return -1; - }*/ - -/**/ - -void _spBaseTimeline_dispose (spTimeline* timeline) { - struct spBaseTimeline* self = SUB_CAST(struct spBaseTimeline, timeline); - _spCurveTimeline_deinit(SUPER(self)); - FREE(self->frames); - FREE(self); -} - -/* Many timelines have structure identical to struct spBaseTimeline and extend spCurveTimeline. **/ -struct spBaseTimeline* _spBaseTimeline_create (int frameCount, spTimelineType type, int frameSize, /**/ - void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha)) { - struct spBaseTimeline* self = NEW(struct spBaseTimeline); - _spCurveTimeline_init(SUPER(self), type, frameCount, _spBaseTimeline_dispose, apply); - - CONST_CAST(int, self->framesLength) = frameCount * frameSize; - CONST_CAST(float*, self->frames) = CALLOC(float, self->framesLength); - - return self; -} - -/**/ - -static const int ROTATE_LAST_FRAME_TIME = -2; -static const int ROTATE_FRAME_VALUE = 1; - -void _spRotateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha) { - spBone *bone; - int frameIndex; - float lastFrameValue, frameTime, percent, amount; - - spRotateTimeline* self = SUB_CAST(spRotateTimeline, timeline); - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - bone = skeleton->bones[self->boneIndex]; - - if (time >= self->frames[self->framesLength - 2]) { /* Time is after last frame. */ - amount = bone->data->rotation + self->frames[self->framesLength - 1] - bone->rotation; - while (amount > 180) - amount -= 360; - while (amount < -180) - amount += 360; - bone->rotation += amount * alpha; - return; - } - - /* Interpolate between the last frame and the current frame. */ - frameIndex = binarySearch(self->frames, self->framesLength, time, 2); - lastFrameValue = self->frames[frameIndex - 1]; - frameTime = self->frames[frameIndex]; - percent = 1 - (time - frameTime) / (self->frames[frameIndex + ROTATE_LAST_FRAME_TIME] - frameTime); - percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 2 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); - - amount = self->frames[frameIndex + ROTATE_FRAME_VALUE] - lastFrameValue; - while (amount > 180) - amount -= 360; - while (amount < -180) - amount += 360; - amount = bone->data->rotation + (lastFrameValue + amount * percent) - bone->rotation; - while (amount > 180) - amount -= 360; - while (amount < -180) - amount += 360; - bone->rotation += amount * alpha; -} - -spRotateTimeline* spRotateTimeline_create (int frameCount) { - return _spBaseTimeline_create(frameCount, TIMELINE_ROTATE, 2, _spRotateTimeline_apply); -} - -void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle) { - frameIndex *= 2; - self->frames[frameIndex] = time; - self->frames[frameIndex + 1] = angle; -} - -/**/ - -static const int TRANSLATE_LAST_FRAME_TIME = -3; -static const int TRANSLATE_FRAME_X = 1; -static const int TRANSLATE_FRAME_Y = 2; - -void _spTranslateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, - spEvent** firedEvents, int* eventCount, float alpha) { - spBone *bone; - int frameIndex; - float lastFrameX, lastFrameY, frameTime, percent; - - spTranslateTimeline* self = SUB_CAST(spTranslateTimeline, timeline); - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - bone = skeleton->bones[self->boneIndex]; - - if (time >= self->frames[self->framesLength - 3]) { /* Time is after last frame. */ - bone->x += (bone->data->x + self->frames[self->framesLength - 2] - bone->x) * alpha; - bone->y += (bone->data->y + self->frames[self->framesLength - 1] - bone->y) * alpha; - return; - } - - /* Interpolate between the last frame and the current frame. */ - frameIndex = binarySearch(self->frames, self->framesLength, time, 3); - lastFrameX = self->frames[frameIndex - 2]; - lastFrameY = self->frames[frameIndex - 1]; - frameTime = self->frames[frameIndex]; - percent = 1 - (time - frameTime) / (self->frames[frameIndex + TRANSLATE_LAST_FRAME_TIME] - frameTime); - percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); - - bone->x += (bone->data->x + lastFrameX + (self->frames[frameIndex + TRANSLATE_FRAME_X] - lastFrameX) * percent - bone->x) - * alpha; - bone->y += (bone->data->y + lastFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - lastFrameY) * percent - bone->y) - * alpha; -} - -spTranslateTimeline* spTranslateTimeline_create (int frameCount) { - return _spBaseTimeline_create(frameCount, TIMELINE_TRANLATE, 3, _spTranslateTimeline_apply); -} - -void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y) { - frameIndex *= 3; - self->frames[frameIndex] = time; - self->frames[frameIndex + 1] = x; - self->frames[frameIndex + 2] = y; -} - -/**/ - -void _spScaleTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha) { - spBone *bone; - int frameIndex; - float lastFrameX, lastFrameY, frameTime, percent; - - spScaleTimeline* self = SUB_CAST(spScaleTimeline, timeline); - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - bone = skeleton->bones[self->boneIndex]; - if (time >= self->frames[self->framesLength - 3]) { /* Time is after last frame. */ - bone->scaleX += (bone->data->scaleX - 1 + self->frames[self->framesLength - 2] - bone->scaleX) * alpha; - bone->scaleY += (bone->data->scaleY - 1 + self->frames[self->framesLength - 1] - bone->scaleY) * alpha; - return; - } - - /* Interpolate between the last frame and the current frame. */ - frameIndex = binarySearch(self->frames, self->framesLength, time, 3); - lastFrameX = self->frames[frameIndex - 2]; - lastFrameY = self->frames[frameIndex - 1]; - frameTime = self->frames[frameIndex]; - percent = 1 - (time - frameTime) / (self->frames[frameIndex + TRANSLATE_LAST_FRAME_TIME] - frameTime); - percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); - - bone->scaleX += (bone->data->scaleX - 1 + lastFrameX + (self->frames[frameIndex + TRANSLATE_FRAME_X] - lastFrameX) * percent - - bone->scaleX) * alpha; - bone->scaleY += (bone->data->scaleY - 1 + lastFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - lastFrameY) * percent - - bone->scaleY) * alpha; -} - -spScaleTimeline* spScaleTimeline_create (int frameCount) { - return _spBaseTimeline_create(frameCount, TIMELINE_SCALE, 3, _spScaleTimeline_apply); -} - -void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y) { - spTranslateTimeline_setFrame(self, frameIndex, time, x, y); -} - -/**/ - -static const int COLOR_LAST_FRAME_TIME = -5; -static const int COLOR_FRAME_R = 1; -static const int COLOR_FRAME_G = 2; -static const int COLOR_FRAME_B = 3; -static const int COLOR_FRAME_A = 4; - -void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha) { - spSlot *slot; - int frameIndex; - float lastFrameR, lastFrameG, lastFrameB, lastFrameA, percent, frameTime; - float r, g, b, a; - spColorTimeline* self = (spColorTimeline*)timeline; - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - slot = skeleton->slots[self->slotIndex]; - - if (time >= self->frames[self->framesLength - 5]) { /* Time is after last frame. */ - int i = self->framesLength - 1; - slot->r = self->frames[i - 3]; - slot->g = self->frames[i - 2]; - slot->b = self->frames[i - 1]; - slot->a = self->frames[i]; - return; - } - - /* Interpolate between the last frame and the current frame. */ - frameIndex = binarySearch(self->frames, self->framesLength, time, 5); - lastFrameR = self->frames[frameIndex - 4]; - lastFrameG = self->frames[frameIndex - 3]; - lastFrameB = self->frames[frameIndex - 2]; - lastFrameA = self->frames[frameIndex - 1]; - frameTime = self->frames[frameIndex]; - percent = 1 - (time - frameTime) / (self->frames[frameIndex + COLOR_LAST_FRAME_TIME] - frameTime); - percent = spCurveTimeline_getCurvePercent(SUPER(self), frameIndex / 5 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); - - r = lastFrameR + (self->frames[frameIndex + COLOR_FRAME_R] - lastFrameR) * percent; - g = lastFrameG + (self->frames[frameIndex + COLOR_FRAME_G] - lastFrameG) * percent; - b = lastFrameB + (self->frames[frameIndex + COLOR_FRAME_B] - lastFrameB) * percent; - a = lastFrameA + (self->frames[frameIndex + COLOR_FRAME_A] - lastFrameA) * percent; - if (alpha < 1) { - slot->r += (r - slot->r) * alpha; - slot->g += (g - slot->g) * alpha; - slot->b += (b - slot->b) * alpha; - slot->a += (a - slot->a) * alpha; - } else { - slot->r = r; - slot->g = g; - slot->b = b; - slot->a = a; - } -} - -spColorTimeline* spColorTimeline_create (int frameCount) { - return (spColorTimeline*)_spBaseTimeline_create(frameCount, TIMELINE_COLOR, 5, _spColorTimeline_apply); -} - -void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a) { - frameIndex *= 5; - self->frames[frameIndex] = time; - self->frames[frameIndex + 1] = r; - self->frames[frameIndex + 2] = g; - self->frames[frameIndex + 3] = b; - self->frames[frameIndex + 4] = a; -} - -/**/ - -void _spAttachmentTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, - spEvent** firedEvents, int* eventCount, float alpha) { - int frameIndex; - const char* attachmentName; - spAttachmentTimeline* self = (spAttachmentTimeline*)timeline; - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - if (time >= self->frames[self->framesLength - 1]) /* Time is after last frame. */ - frameIndex = self->framesLength - 1; - else - frameIndex = binarySearch(self->frames, self->framesLength, time, 1) - 1; - - attachmentName = self->attachmentNames[frameIndex]; - spSlot_setAttachment(skeleton->slots[self->slotIndex], - attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0); -} - -void _spAttachmentTimeline_dispose (spTimeline* timeline) { - spAttachmentTimeline* self = SUB_CAST(spAttachmentTimeline, timeline); - int i; - - _spTimeline_deinit(timeline); - - for (i = 0; i < self->framesLength; ++i) - FREE(self->attachmentNames[i]); - FREE(self->attachmentNames); - FREE(self->frames); - FREE(self); -} - -spAttachmentTimeline* spAttachmentTimeline_create (int frameCount) { - spAttachmentTimeline* self = NEW(spAttachmentTimeline); - _spTimeline_init(SUPER(self), TIMELINE_ATTACHMENT, _spAttachmentTimeline_dispose, _spAttachmentTimeline_apply); - - CONST_CAST(int, self->framesLength) = frameCount; - CONST_CAST(float*, self->frames) = CALLOC(float, frameCount); - CONST_CAST(char**, self->attachmentNames) = CALLOC(char*, frameCount); - - return self; -} - -void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName) { - self->frames[frameIndex] = time; - - FREE(self->attachmentNames[frameIndex]); - if (attachmentName) - MALLOC_STR(self->attachmentNames[frameIndex], attachmentName); - else - self->attachmentNames[frameIndex] = 0; -} - -/**/ - -/** Fires events for frames > lastTime and <= time. */ -void _spEventTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha) { - spEventTimeline* self = (spEventTimeline*)timeline; - int frameIndex; - if (!firedEvents) return; - - if (lastTime > time) { /* Fire events after last time for looped animations. */ - _spEventTimeline_apply(timeline, skeleton, lastTime, (float)INT_MAX, firedEvents, eventCount, alpha); - lastTime = -1; - } else if (lastTime >= self->frames[self->framesLength - 1]) /* Last time is after last frame. */ - return; - if (time < self->frames[0]) return; /* Time is before first frame. */ - - if (lastTime < self->frames[0]) - frameIndex = 0; - else { - float frame; - frameIndex = binarySearch(self->frames, self->framesLength, lastTime, 1); - frame = self->frames[frameIndex]; - while (frameIndex > 0) { /* Fire multiple events with the same frame. */ - if (self->frames[frameIndex - 1] != frame) break; - frameIndex--; - } - } - for (; frameIndex < self->framesLength && time >= self->frames[frameIndex]; frameIndex++) { - firedEvents[*eventCount] = self->events[frameIndex]; - (*eventCount)++; - } -} - -void _spEventTimeline_dispose (spTimeline* timeline) { - spEventTimeline* self = SUB_CAST(spEventTimeline, timeline); - int i; - - _spTimeline_deinit(timeline); - - for (i = 0; i < self->framesLength; ++i) - spEvent_dispose(self->events[i]); - FREE(self->events); - FREE(self->frames); - FREE(self); -} - -spEventTimeline* spEventTimeline_create (int frameCount) { - spEventTimeline* self = NEW(spEventTimeline); - _spTimeline_init(SUPER(self), TIMELINE_EVENT, _spEventTimeline_dispose, _spEventTimeline_apply); - - CONST_CAST(int, self->framesLength) = frameCount; - CONST_CAST(float*, self->frames) = CALLOC(float, frameCount); - CONST_CAST(spEvent**, self->events) = CALLOC(spEvent*, frameCount); - - return self; -} - -void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, float time, spEvent* event) { - self->frames[frameIndex] = time; - - FREE(self->events[frameIndex]); - self->events[frameIndex] = event; -} - -/**/ - -void _spDrawOrderTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, - spEvent** firedEvents, int* eventCount, float alpha) { - int i; - int frameIndex; - const int* drawOrderToSetupIndex; - spDrawOrderTimeline* self = (spDrawOrderTimeline*)timeline; - - if (time < self->frames[0]) return; /* Time is before first frame. */ - - if (time >= self->frames[self->framesLength - 1]) /* Time is after last frame. */ - frameIndex = self->framesLength - 1; - else - frameIndex = binarySearch(self->frames, self->framesLength, time, 1) - 1; - - drawOrderToSetupIndex = self->drawOrders[frameIndex]; - if (!drawOrderToSetupIndex) - memcpy(skeleton->drawOrder, skeleton->slots, self->slotCount * sizeof(int)); - else { - for (i = 0; i < self->slotCount; i++) - skeleton->drawOrder[i] = skeleton->slots[drawOrderToSetupIndex[i]]; - } -} - -void _spDrawOrderTimeline_dispose (spTimeline* timeline) { - spDrawOrderTimeline* self = SUB_CAST(spDrawOrderTimeline, timeline); - int i; - - _spTimeline_deinit(timeline); - - for (i = 0; i < self->framesLength; ++i) - FREE(self->drawOrders[i]); - FREE(self->drawOrders); - FREE(self->frames); - FREE(self); -} - -spDrawOrderTimeline* spDrawOrderTimeline_create (int frameCount, int slotCount) { - spDrawOrderTimeline* self = NEW(spDrawOrderTimeline); - _spTimeline_init(SUPER(self), TIMELINE_DRAWORDER, _spDrawOrderTimeline_dispose, _spDrawOrderTimeline_apply); - - CONST_CAST(int, self->framesLength) = frameCount; - CONST_CAST(float*, self->frames) = CALLOC(float, frameCount); - CONST_CAST(int**, self->drawOrders) = CALLOC(int*, frameCount); - CONST_CAST(int, self->slotCount) = slotCount; - - return self; -} - -void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder) { - self->frames[frameIndex] = time; - - FREE(self->drawOrders[frameIndex]); - if (!drawOrder) - self->drawOrders[frameIndex] = 0; - else { - self->drawOrders[frameIndex] = MALLOC(int, self->slotCount); - memcpy(CONST_CAST(int*, self->drawOrders[frameIndex]), drawOrder, self->slotCount * sizeof(int)); - } -} diff --git a/cocos/editor-support/spine/Animation.h b/cocos/editor-support/spine/Animation.h index f6e8f76c57..576fcefe9a 100644 --- a/cocos/editor-support/spine/Animation.h +++ b/cocos/editor-support/spine/Animation.h @@ -1,40 +1,38 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ANIMATION_H_ #define SPINE_ANIMATION_H_ #include +#include #ifdef __cplusplus extern "C" { @@ -47,25 +45,25 @@ typedef struct { const char* const name; float duration; - int timelineCount; + int timelinesCount; spTimeline** timelines; } spAnimation; -spAnimation* spAnimation_create (const char* name, int timelineCount); +spAnimation* spAnimation_create (const char* name, int timelinesCount); void spAnimation_dispose (spAnimation* self); /** Poses the skeleton at the specified time for this animation. * @param lastTime The last time the animation was applied. * @param events Any triggered events are added. */ void spAnimation_apply (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop, - spEvent** events, int* eventCount); + spEvent** events, int* eventsCount); /** Poses the skeleton at the specified time for this animation mixed with the current pose. * @param lastTime The last time the animation was applied. * @param events Any triggered events are added. * @param alpha The amount of this animation that affects the current pose. */ void spAnimation_mix (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop, - spEvent** events, int* eventCount, float alpha); + spEvent** events, int* eventsCount, float alpha); #ifdef SPINE_SHORT_NAMES typedef spAnimation Animation; @@ -78,7 +76,15 @@ typedef spAnimation Animation; /**/ typedef enum { - TIMELINE_SCALE, TIMELINE_ROTATE, TIMELINE_TRANLATE, TIMELINE_COLOR, TIMELINE_ATTACHMENT, TIMELINE_EVENT, TIMELINE_DRAWORDER + SP_TIMELINE_SCALE, + SP_TIMELINE_ROTATE, + SP_TIMELINE_TRANSLATE, + SP_TIMELINE_COLOR, + SP_TIMELINE_ATTACHMENT, + SP_TIMELINE_EVENT, + SP_TIMELINE_DRAWORDER, + SP_TIMELINE_FFD, + SP_TIMELINE_IKCONSTRAINT } spTimelineType; struct spTimeline { @@ -89,10 +95,17 @@ struct spTimeline { void spTimeline_dispose (spTimeline* self); void spTimeline_apply (const spTimeline* self, struct spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha); + int* eventsCount, float alpha); #ifdef SPINE_SHORT_NAMES typedef spTimeline Timeline; +#define TIMELINE_SCALE SP_TIMELINE_SCALE +#define TIMELINE_ROTATE SP_TIMELINE_ROTATE +#define TIMELINE_TRANSLATE SP_TIMELINE_TRANSLATE +#define TIMELINE_COLOR SP_TIMELINE_COLOR +#define TIMELINE_ATTACHMENT SP_TIMELINE_ATTACHMENT +#define TIMELINE_EVENT SP_TIMELINE_EVENT +#define TIMELINE_DRAWORDER SP_TIMELINE_DRAWORDER #define Timeline_dispose(...) spTimeline_dispose(__VA_ARGS__) #define Timeline_apply(...) spTimeline_apply(__VA_ARGS__) #endif @@ -101,7 +114,7 @@ typedef spTimeline Timeline; typedef struct { spTimeline super; - float* curves; /* dfx, dfy, ddfx, ddfy, dddfx, dddfy, ... */ + float* curves; /* type, x, y, ... */ } spCurveTimeline; void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex); @@ -125,12 +138,12 @@ typedef spCurveTimeline CurveTimeline; typedef struct spBaseTimeline { spCurveTimeline super; - int const framesLength; + int const framesCount; float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */ int boneIndex; } spRotateTimeline; -spRotateTimeline* spRotateTimeline_create (int frameCount); +spRotateTimeline* spRotateTimeline_create (int framesCount); void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle); @@ -144,7 +157,7 @@ typedef spRotateTimeline RotateTimeline; typedef struct spBaseTimeline spTranslateTimeline; -spTranslateTimeline* spTranslateTimeline_create (int frameCount); +spTranslateTimeline* spTranslateTimeline_create (int framesCount); void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y); @@ -158,7 +171,7 @@ typedef spTranslateTimeline TranslateTimeline; typedef struct spBaseTimeline spScaleTimeline; -spScaleTimeline* spScaleTimeline_create (int frameCount); +spScaleTimeline* spScaleTimeline_create (int framesCount); void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y); @@ -172,12 +185,12 @@ typedef spScaleTimeline ScaleTimeline; typedef struct { spCurveTimeline super; - int const framesLength; + int const framesCount; float* const frames; /* time, r, g, b, a, ... */ int slotIndex; } spColorTimeline; -spColorTimeline* spColorTimeline_create (int frameCount); +spColorTimeline* spColorTimeline_create (int framesCount); void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a); @@ -191,13 +204,13 @@ typedef spColorTimeline ColorTimeline; typedef struct { spTimeline super; - int const framesLength; + int const framesCount; float* const frames; /* time, ... */ int slotIndex; const char** const attachmentNames; } spAttachmentTimeline; -spAttachmentTimeline* spAttachmentTimeline_create (int frameCount); +spAttachmentTimeline* spAttachmentTimeline_create (int framesCount); /* @param attachmentName May be 0. */ void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName); @@ -212,12 +225,12 @@ typedef spAttachmentTimeline AttachmentTimeline; typedef struct { spTimeline super; - int const framesLength; + int const framesCount; float* const frames; /* time, ... */ spEvent** const events; } spEventTimeline; -spEventTimeline* spEventTimeline_create (int frameCount); +spEventTimeline* spEventTimeline_create (int framesCount); void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, float time, spEvent* event); @@ -231,13 +244,13 @@ typedef spEventTimeline EventTimeline; typedef struct { spTimeline super; - int const framesLength; + int const framesCount; float* const frames; /* time, ... */ const int** const drawOrders; - int const slotCount; + int const slotsCount; } spDrawOrderTimeline; -spDrawOrderTimeline* spDrawOrderTimeline_create (int frameCount, int slotCount); +spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount); void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder); @@ -247,6 +260,50 @@ typedef spDrawOrderTimeline DrawOrderTimeline; #define DrawOrderTimeline_setFrame(...) spDrawOrderTimeline_setFrame(__VA_ARGS__) #endif +/**/ + +typedef struct { + spCurveTimeline super; + int const framesCount; + float* const frames; /* time, ... */ + int const frameVerticesCount; + const float** const frameVertices; + int slotIndex; + spAttachment* attachment; +} spFFDTimeline; + +spFFDTimeline* spFFDTimeline_create (int framesCount, int frameVerticesCount); + +void spFFDTimeline_setFrame (spFFDTimeline* self, int frameIndex, float time, float* vertices); + +#ifdef SPINE_SHORT_NAMES +typedef spFFDTimeline FFDTimeline; +#define FFDTimeline_create(...) spFFDTimeline_create(__VA_ARGS__) +#define FFDTimeline_setFrame(...) spFFDTimeline_setFrame(__VA_ARGS__) +#endif + +/**/ + +typedef struct { + spCurveTimeline super; + int const framesCount; + float* const frames; /* time, mix, bendDirection, ... */ + int ikConstraintIndex; +} spIkConstraintTimeline; + +spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount); + +/* @param attachmentName May be 0. */ +void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection); + +#ifdef SPINE_SHORT_NAMES +typedef spIkConstraintTimeline IkConstraintTimeline; +#define IkConstraintTimeline_create(...) spIkConstraintTimeline_create(__VA_ARGS__) +#define IkConstraintTimeline_setFrame(...) spIkConstraintTimeline_setFrame(__VA_ARGS__) +#endif + +/**/ + #ifdef __cplusplus } #endif diff --git a/cocos/editor-support/spine/AnimationState.c b/cocos/editor-support/spine/AnimationState.c new file mode 100644 index 0000000000..419c4594fc --- /dev/null +++ b/cocos/editor-support/spine/AnimationState.c @@ -0,0 +1,322 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +spTrackEntry* _spTrackEntry_create (spAnimationState* state) { + spTrackEntry* self = NEW(spTrackEntry); + CONST_CAST(spAnimationState*, self->state) = state; + self->timeScale = 1; + self->lastTime = -1; + self->mix = 1; + return self; +} + +void _spTrackEntry_dispose (spTrackEntry* self) { + if (self->previous) SUB_CAST(_spAnimationState, self->state)->disposeTrackEntry(self->previous); + FREE(self); +} + +/**/ + +spTrackEntry* _spAnimationState_createTrackEntry (spAnimationState* self) { + return _spTrackEntry_create(self); +} + +void _spAnimationState_disposeTrackEntry (spTrackEntry* entry) { + _spTrackEntry_dispose(entry); +} + +spAnimationState* spAnimationState_create (spAnimationStateData* data) { + _spAnimationState* internal = NEW(_spAnimationState); + spAnimationState* self = SUPER(internal); + internal->events = MALLOC(spEvent*, 64); + self->timeScale = 1; + CONST_CAST(spAnimationStateData*, self->data) = data; + internal->createTrackEntry = _spAnimationState_createTrackEntry; + internal->disposeTrackEntry = _spAnimationState_disposeTrackEntry; + return self; +} + +void _spAnimationState_disposeAllEntries (spAnimationState* self, spTrackEntry* entry) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + while (entry) { + spTrackEntry* next = entry->next; + internal->disposeTrackEntry(entry); + entry = next; + } +} + +void spAnimationState_dispose (spAnimationState* self) { + int i; + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + FREE(internal->events); + for (i = 0; i < self->tracksCount; ++i) + _spAnimationState_disposeAllEntries(self, self->tracks[i]); + FREE(self->tracks); + FREE(self); +} + +void _spAnimationState_setCurrent (spAnimationState* self, int index, spTrackEntry* entry); + +void spAnimationState_update (spAnimationState* self, float delta) { + int i; + float previousDelta; + delta *= self->timeScale; + for (i = 0; i < self->tracksCount; ++i) { + spTrackEntry* current = self->tracks[i]; + if (!current) continue; + + current->time += delta * current->timeScale; + if (current->previous) { + previousDelta = delta * current->previous->timeScale; + current->previous->time += previousDelta; + current->mixTime += previousDelta; + } + + if (current->next) { + current->next->time = current->lastTime - current->next->delay; + if (current->next->time >= 0) _spAnimationState_setCurrent(self, i, current->next); + } else { + /* End non-looping animation when it reaches its end time and there is no next entry. */ + if (!current->loop && current->lastTime >= current->endTime) spAnimationState_clearTrack(self, i); + } + } +} + +void spAnimationState_apply (spAnimationState* self, spSkeleton* skeleton) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + + int i, ii; + int eventsCount; + int entryChanged; + float time; + spTrackEntry* previous; + for (i = 0; i < self->tracksCount; ++i) { + spTrackEntry* current = self->tracks[i]; + if (!current) continue; + + eventsCount = 0; + + time = current->time; + if (!current->loop && time > current->endTime) time = current->endTime; + + previous = current->previous; + if (!previous) { + if (current->mix == 1) { + spAnimation_apply(current->animation, skeleton, current->lastTime, time, + current->loop, internal->events, &eventsCount); + } else { + spAnimation_mix(current->animation, skeleton, current->lastTime, time, + current->loop, internal->events, &eventsCount, current->mix); + } + } else { + float alpha = current->mixTime / current->mixDuration * current->mix; + + float previousTime = previous->time; + if (!previous->loop && previousTime > previous->endTime) previousTime = previous->endTime; + spAnimation_apply(previous->animation, skeleton, previousTime, previousTime, previous->loop, 0, 0); + + if (alpha >= 1) { + alpha = 1; + internal->disposeTrackEntry(current->previous); + current->previous = 0; + } + spAnimation_mix(current->animation, skeleton, current->lastTime, time, + current->loop, internal->events, &eventsCount, alpha); + } + + entryChanged = 0; + for (ii = 0; ii < eventsCount; ++ii) { + spEvent* event = internal->events[ii]; + if (current->listener) { + current->listener(self, i, SP_ANIMATION_EVENT, event, 0); + if (self->tracks[i] != current) { + entryChanged = 1; + break; + } + } + if (self->listener) { + self->listener(self, i, SP_ANIMATION_EVENT, event, 0); + if (self->tracks[i] != current) { + entryChanged = 1; + break; + } + } + } + if (entryChanged) continue; + + /* Check if completed the animation or a loop iteration. */ + if (current->loop ? (FMOD(current->lastTime, current->endTime) > FMOD(time, current->endTime)) + : (current->lastTime < current->endTime && time >= current->endTime)) { + int count = (int)(time / current->endTime); + if (current->listener) { + current->listener(self, i, SP_ANIMATION_COMPLETE, 0, count); + if (self->tracks[i] != current) continue; + } + if (self->listener) { + self->listener(self, i, SP_ANIMATION_COMPLETE, 0, count); + if (self->tracks[i] != current) continue; + } + } + + current->lastTime = current->time; + } +} + +void spAnimationState_clearTracks (spAnimationState* self) { + int i; + for (i = 0; i < self->tracksCount; ++i) + spAnimationState_clearTrack(self, i); + self->tracksCount = 0; +} + +void spAnimationState_clearTrack (spAnimationState* self, int trackIndex) { + spTrackEntry* current; + if (trackIndex >= self->tracksCount) return; + current = self->tracks[trackIndex]; + if (!current) return; + + if (current->listener) current->listener(self, trackIndex, SP_ANIMATION_END, 0, 0); + if (self->listener) self->listener(self, trackIndex, SP_ANIMATION_END, 0, 0); + + self->tracks[trackIndex] = 0; + + _spAnimationState_disposeAllEntries(self, current); +} + +spTrackEntry* _spAnimationState_expandToIndex (spAnimationState* self, int index) { + spTrackEntry** newTracks; + if (index < self->tracksCount) return self->tracks[index]; + newTracks = CALLOC(spTrackEntry*, index + 1); + memcpy(newTracks, self->tracks, self->tracksCount * sizeof(spTrackEntry*)); + FREE(self->tracks); + self->tracks = newTracks; + self->tracksCount = index + 1; + return 0; +} + +void _spAnimationState_setCurrent (spAnimationState* self, int index, spTrackEntry* entry) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + + spTrackEntry* current = _spAnimationState_expandToIndex(self, index); + if (current) { + spTrackEntry* previous = current->previous; + current->previous = 0; + + if (current->listener) current->listener(self, index, SP_ANIMATION_END, 0, 0); + if (self->listener) self->listener(self, index, SP_ANIMATION_END, 0, 0); + + entry->mixDuration = spAnimationStateData_getMix(self->data, current->animation, entry->animation); + if (entry->mixDuration > 0) { + entry->mixTime = 0; + /* If a mix is in progress, mix from the closest animation. */ + if (previous && current->mixTime / current->mixDuration < 0.5f) { + entry->previous = previous; + previous = current; + } else + entry->previous = current; + } else + internal->disposeTrackEntry(current); + + if (previous) internal->disposeTrackEntry(previous); + } + + self->tracks[index] = entry; + + if (entry->listener) { + entry->listener(self, index, SP_ANIMATION_START, 0, 0); + if (self->tracks[index] != entry) return; + } + if (self->listener) self->listener(self, index, SP_ANIMATION_START, 0, 0); +} + +spTrackEntry* spAnimationState_setAnimationByName (spAnimationState* self, int trackIndex, const char* animationName, + int/*bool*/loop) { + spAnimation* animation = spSkeletonData_findAnimation(self->data->skeletonData, animationName); + return spAnimationState_setAnimation(self, trackIndex, animation, loop); +} + +spTrackEntry* spAnimationState_setAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + + spTrackEntry* entry; + spTrackEntry* current = _spAnimationState_expandToIndex(self, trackIndex); + if (current) _spAnimationState_disposeAllEntries(self, current->next); + + entry = internal->createTrackEntry(self); + entry->animation = animation; + entry->loop = loop; + entry->endTime = animation->duration; + _spAnimationState_setCurrent(self, trackIndex, entry); + return entry; +} + +spTrackEntry* spAnimationState_addAnimationByName (spAnimationState* self, int trackIndex, const char* animationName, + int/*bool*/loop, float delay) { + spAnimation* animation = spSkeletonData_findAnimation(self->data->skeletonData, animationName); + return spAnimationState_addAnimation(self, trackIndex, animation, loop, delay); +} + +spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop, + float delay) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + spTrackEntry* last; + + spTrackEntry* entry = internal->createTrackEntry(self); + entry->animation = animation; + entry->loop = loop; + entry->endTime = animation->duration; + + last = _spAnimationState_expandToIndex(self, trackIndex); + if (last) { + while (last->next) + last = last->next; + last->next = entry; + } else + self->tracks[trackIndex] = entry; + + if (delay <= 0) { + if (last) + delay += last->endTime - spAnimationStateData_getMix(self->data, last->animation, animation); + else + delay = 0; + } + entry->delay = delay; + + return entry; +} + +spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackIndex) { + if (trackIndex >= self->tracksCount) return 0; + return self->tracks[trackIndex]; +} diff --git a/cocos/editor-support/spine/AnimationState.cpp b/cocos/editor-support/spine/AnimationState.cpp deleted file mode 100644 index 2e30fd871d..0000000000 --- a/cocos/editor-support/spine/AnimationState.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -spTrackEntry* _spTrackEntry_create () { - spTrackEntry* entry = NEW(spTrackEntry); - entry->timeScale = 1; - entry->lastTime = -1; - return entry; -} - -void _spTrackEntry_dispose (spTrackEntry* entry) { - FREE(entry); -} - -void _spTrackEntry_disposeAll (spTrackEntry* entry) { - while (entry) { - spTrackEntry* next = entry->next; - _spTrackEntry_dispose(entry); - entry = next; - } -} - -/**/ - -typedef struct { - spAnimationState super; - spEvent** events; -} _spAnimationState; - -void _spAnimationState_setCurrent (spAnimationState* self, int index, spTrackEntry* entry); - -spAnimationState* spAnimationState_create (spAnimationStateData* data) { - _spAnimationState* internal = NEW(_spAnimationState); - spAnimationState* self = SUPER(internal); - internal->events = MALLOC(spEvent*, 64); - self->timeScale = 1; - CONST_CAST(spAnimationStateData*, self->data) = data; - return self; -} - -void spAnimationState_dispose (spAnimationState* self) { - int i; - _spAnimationState* internal = SUB_CAST(_spAnimationState, self); - FREE(internal->events); - for (i = 0; i < self->trackCount; i++) - _spTrackEntry_disposeAll(self->tracks[i]); - FREE(self->tracks); - FREE(self); -} - -void spAnimationState_update (spAnimationState* self, float delta) { - int i; - float trackDelta; - delta *= self->timeScale; - for (i = 0; i < self->trackCount; i++) { - spTrackEntry* current = self->tracks[i]; - if (!current) continue; - - trackDelta = delta * current->timeScale; - current->time += trackDelta; - if (current->previous) { - current->previous->time += trackDelta; - current->mixTime += trackDelta; - } - - if (current->next) { - if (current->lastTime >= current->next->delay) _spAnimationState_setCurrent(self, i, current->next); - } else { - /* End non-looping animation when it reaches its end time and there is no next entry. */ - if (!current->loop && current->lastTime >= current->endTime) spAnimationState_clearTrack(self, i); - } - } -} - -void spAnimationState_apply (spAnimationState* self, spSkeleton* skeleton) { - _spAnimationState* internal = SUB_CAST(_spAnimationState, self); - - int i, ii; - int eventCount; - float time; - spTrackEntry* previous; - for (i = 0; i < self->trackCount; i++) { - spTrackEntry* current = self->tracks[i]; - if (!current) continue; - - eventCount = 0; - - time = current->time; - if (!current->loop && time > current->endTime) time = current->endTime; - - previous = current->previous; - if (!previous) { - spAnimation_apply(current->animation, skeleton, current->lastTime, time, current->loop, internal->events, &eventCount); - } else { - float alpha = current->mixTime / current->mixDuration; - - float previousTime = previous->time; - if (!previous->loop && previousTime > previous->endTime) previousTime = previous->endTime; - spAnimation_apply(previous->animation, skeleton, previousTime, previousTime, previous->loop, 0, 0); - - if (alpha >= 1) { - alpha = 1; - _spTrackEntry_dispose(current->previous); - current->previous = 0; - } - spAnimation_mix(current->animation, skeleton, current->lastTime, time, current->loop, internal->events, &eventCount, - alpha); - } - - for (ii = 0; ii < eventCount; ii++) { - spEvent* event = internal->events[ii]; - if (current->listener) current->listener(self, i, ANIMATION_EVENT, event, 0); - if (self->listener) self->listener(self, i, ANIMATION_EVENT, event, 0); - } - - /* Check if completed the animation or a loop iteration. */ - if (current->loop ? (FMOD(current->lastTime, current->endTime) > FMOD(time, current->endTime)) // - : (current->lastTime < current->endTime && time >= current->endTime)) { - int count = (int)(time / current->endTime); - if (current->listener) current->listener(self, i, ANIMATION_COMPLETE, 0, count); - if (self->listener) self->listener(self, i, ANIMATION_COMPLETE, 0, count); - if (i >= self->trackCount || self->tracks[i] != current) continue; - } - - if (i >= self->trackCount || self->tracks[i] != current) continue; - current->lastTime = current->time; - } -} - -void spAnimationState_clearTracks (spAnimationState* self) { - int i; - for (i = 0; i < self->trackCount; i++) - spAnimationState_clearTrack(self, i); - self->trackCount = 0; -} - -void spAnimationState_clearTrack (spAnimationState* self, int trackIndex) { - spTrackEntry* current; - if (trackIndex >= self->trackCount) return; - current = self->tracks[trackIndex]; - if (!current) return; - - if (current->listener) current->listener(self, trackIndex, ANIMATION_END, 0, 0); - if (self->listener) self->listener(self, trackIndex, ANIMATION_END, 0, 0); - - self->tracks[trackIndex] = 0; - if (current->previous) _spTrackEntry_dispose(current->previous); - _spTrackEntry_disposeAll(current); -} - -spTrackEntry* _spAnimationState_expandToIndex (spAnimationState* self, int index) { - spTrackEntry** newTracks; - if (index < self->trackCount) return self->tracks[index]; - newTracks = CALLOC(spTrackEntry*, index + 1); - memcpy(newTracks, self->tracks, self->trackCount * sizeof(spTrackEntry*)); - FREE(self->tracks); - self->tracks = newTracks; - self->trackCount = index + 1; - return 0; -} - -void _spAnimationState_setCurrent (spAnimationState* self, int index, spTrackEntry* entry) { - spTrackEntry* current = _spAnimationState_expandToIndex(self, index); - if (current) { - if (current->previous) { - _spTrackEntry_dispose(current->previous); - current->previous = 0; - } - - if (current->listener) current->listener(self, index, ANIMATION_END, 0, 0); - if (self->listener) self->listener(self, index, ANIMATION_END, 0, 0); - - entry->mixDuration = spAnimationStateData_getMix(self->data, current->animation, entry->animation); - if (entry->mixDuration > 0) { - entry->mixTime = 0; - entry->previous = current; - } else - _spTrackEntry_dispose(current); - } - - self->tracks[index] = entry; - - if (entry->listener) current->listener(self, index, ANIMATION_START, 0, 0); - if (self->listener) self->listener(self, index, ANIMATION_START, 0, 0); -} - -spTrackEntry* spAnimationState_setAnimationByName (spAnimationState* self, int trackIndex, const char* animationName, - int/*bool*/loop) { - spAnimation* animation = spSkeletonData_findAnimation(self->data->skeletonData, animationName); - return spAnimationState_setAnimation(self, trackIndex, animation, loop); -} - -spTrackEntry* spAnimationState_setAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop) { - spTrackEntry* entry; - spTrackEntry* current = _spAnimationState_expandToIndex(self, trackIndex); - if (current) _spTrackEntry_disposeAll(current->next); - - entry = _spTrackEntry_create(); - entry->animation = animation; - entry->loop = loop; - entry->endTime = animation->duration; - _spAnimationState_setCurrent(self, trackIndex, entry); - return entry; -} - -spTrackEntry* spAnimationState_addAnimationByName (spAnimationState* self, int trackIndex, const char* animationName, - int/*bool*/loop, float delay) { - spAnimation* animation = spSkeletonData_findAnimation(self->data->skeletonData, animationName); - return spAnimationState_addAnimation(self, trackIndex, animation, loop, delay); -} - -spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop, - float delay) { - spTrackEntry* last; - - spTrackEntry* entry = _spTrackEntry_create(); - entry->animation = animation; - entry->loop = loop; - entry->endTime = animation->duration; - - last = _spAnimationState_expandToIndex(self, trackIndex); - if (last) { - while (last->next) - last = last->next; - last->next = entry; - } else - self->tracks[trackIndex] = entry; - - if (delay <= 0) { - if (last) - delay += last->endTime - spAnimationStateData_getMix(self->data, last->animation, animation); - else - delay = 0; - } - entry->delay = delay; - - return entry; -} - -spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackIndex) { - if (trackIndex >= self->trackCount) return 0; - return self->tracks[trackIndex]; -} diff --git a/cocos/editor-support/spine/AnimationState.h b/cocos/editor-support/spine/AnimationState.h index 990dbe75e7..7952bc80b1 100644 --- a/cocos/editor-support/spine/AnimationState.h +++ b/cocos/editor-support/spine/AnimationState.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ANIMATIONSTATE_H_ @@ -43,7 +40,7 @@ extern "C" { #endif typedef enum { - ANIMATION_START, ANIMATION_END, ANIMATION_COMPLETE, ANIMATION_EVENT + SP_ANIMATION_START, SP_ANIMATION_END, SP_ANIMATION_COMPLETE, SP_ANIMATION_EVENT } spEventType; typedef struct spAnimationState spAnimationState; @@ -53,23 +50,27 @@ typedef void (*spAnimationStateListener) (spAnimationState* state, int trackInde typedef struct spTrackEntry spTrackEntry; struct spTrackEntry { + spAnimationState* const state; spTrackEntry* next; spTrackEntry* previous; spAnimation* animation; int/*bool*/loop; float delay, time, lastTime, endTime, timeScale; spAnimationStateListener listener; - float mixTime, mixDuration; + float mixTime, mixDuration, mix; + + void* rendererObject; }; struct spAnimationState { spAnimationStateData* const data; float timeScale; spAnimationStateListener listener; - void* context; - int trackCount; + int tracksCount; spTrackEntry** tracks; + + void* rendererObject; }; /* @param data May be 0 for no mixing. */ @@ -98,6 +99,10 @@ spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackInde #ifdef SPINE_SHORT_NAMES typedef spEventType EventType; +#define ANIMATION_START SP_ANIMATION_START +#define ANIMATION_END SP_ANIMATION_END +#define ANIMATION_COMPLETE SP_ANIMATION_COMPLETE +#define ANIMATION_EVENT SP_ANIMATION_EVENT typedef spAnimationStateListener AnimationStateListener; typedef spTrackEntry TrackEntry; typedef spAnimationState AnimationState; diff --git a/cocos/editor-support/spine/AnimationStateData.cpp b/cocos/editor-support/spine/AnimationStateData.c similarity index 67% rename from cocos/editor-support/spine/AnimationStateData.cpp rename to cocos/editor-support/spine/AnimationStateData.c index d479dbf5f5..0a5fbf4ca7 100644 --- a/cocos/editor-support/spine/AnimationStateData.cpp +++ b/cocos/editor-support/spine/AnimationStateData.c @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #include diff --git a/cocos/editor-support/spine/AnimationStateData.h b/cocos/editor-support/spine/AnimationStateData.h index aed1754299..ba1c386620 100644 --- a/cocos/editor-support/spine/AnimationStateData.h +++ b/cocos/editor-support/spine/AnimationStateData.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ANIMATIONSTATEDATA_H_ diff --git a/cocos/editor-support/spine/Atlas.cpp b/cocos/editor-support/spine/Atlas.c similarity index 71% rename from cocos/editor-support/spine/Atlas.cpp rename to cocos/editor-support/spine/Atlas.c index 8addbc11d5..f202c5dacc 100644 --- a/cocos/editor-support/spine/Atlas.cpp +++ b/cocos/editor-support/spine/Atlas.c @@ -1,42 +1,40 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #include #include #include -spAtlasPage* spAtlasPage_create (const char* name) { +spAtlasPage* spAtlasPage_create (spAtlas* atlas, const char* name) { spAtlasPage* self = NEW(spAtlasPage); + CONST_CAST(spAtlas*, self->atlas) = atlas; MALLOC_STR(self->name, name); return self; } @@ -50,7 +48,7 @@ void spAtlasPage_dispose (spAtlasPage* self) { /**/ spAtlasRegion* spAtlasRegion_create () { - return NEW(spAtlasRegion) ; + return NEW(spAtlasRegion); } void spAtlasRegion_dispose (spAtlasRegion* self) { @@ -119,7 +117,7 @@ static int readValue (const char* end, Str* str) { return 1; } -/* Returns the number of tuple values read (2, 4, or 0 for failure). */ +/* Returns the number of tuple values read (1, 2, 4, or 0 for failure). */ static int readTuple (const char* end, Str tuple[]) { int i; Str str; @@ -128,10 +126,7 @@ static int readTuple (const char* end, Str tuple[]) { for (i = 0; i < 3; ++i) { tuple[i].begin = str.begin; - if (!beginPast(&str, ',')) { - if (i == 0) return 0; - break; - } + if (!beginPast(&str, ',')) break; tuple[i].end = str.begin - 2; trim(&tuple[i]); } @@ -142,7 +137,7 @@ static int readTuple (const char* end, Str tuple[]) { } static char* mallocString (Str* str) { - long length = str->end - str->begin; + int length = (int)(str->end - str->begin); char* string = MALLOC(char, length + 1); memcpy(string, str->begin, length); string[length] = '\0'; @@ -150,7 +145,7 @@ static char* mallocString (Str* str) { } static int indexOf (const char** array, int count, Str* str) { - long length = str->end - str->begin; + int length = (int)(str->end - str->begin); int i; for (i = count - 1; i >= 0; i--) if (strncmp(array[i], str->begin, length) == 0) return i; @@ -162,7 +157,7 @@ static int equals (Str* str, const char* other) { } static int toInt (Str* str) { - return static_cast(strtol(str->begin, (char**)&str->end, 10)); + return (int)strtol(str->begin, (char**)&str->end, 10); } static spAtlas* abortAtlas (spAtlas* self) { @@ -174,19 +169,23 @@ static const char* formatNames[] = {"Alpha", "Intensity", "LuminanceAlpha", "RGB static const char* textureFilterNames[] = {"Nearest", "Linear", "MipMap", "MipMapNearestNearest", "MipMapLinearNearest", "MipMapNearestLinear", "MipMapLinearLinear"}; -spAtlas* spAtlas_readAtlas (const char* begin, int length, const char* dir) { +spAtlas* spAtlas_create (const char* begin, int length, const char* dir, void* rendererObject) { + spAtlas* self; + int count; const char* end = begin + length; - size_t dirLength = strlen(dir); + int dirLength = (int)strlen(dir); int needsSlash = dirLength > 0 && dir[dirLength - 1] != '/' && dir[dirLength - 1] != '\\'; - spAtlas* self = NEW(spAtlas); - spAtlasPage *page = 0; spAtlasPage *lastPage = 0; spAtlasRegion *lastRegion = 0; Str str; Str tuple[4]; + + self = NEW(spAtlas); + self->rendererObject = rendererObject; + readLine(begin, 0, 0); while (readLine(0, end, &str)) { if (str.end - str.begin == 0) { @@ -198,7 +197,7 @@ spAtlas* spAtlas_readAtlas (const char* begin, int length, const char* dir) { if (needsSlash) path[dirLength] = '/'; strcpy(path + dirLength + needsSlash, name); - page = spAtlasPage_create(name); + page = spAtlasPage_create(self, name); FREE(name); if (lastPage) lastPage->next = page; @@ -206,8 +205,15 @@ spAtlas* spAtlas_readAtlas (const char* begin, int length, const char* dir) { self->pages = page; lastPage = page; - if (!readValue(end, &str)) return abortAtlas(self); - page->format = (spAtlasFormat)indexOf(formatNames, 7, &str); + switch (readTuple(end, tuple)) { + case 0: + return abortAtlas(self); + case 2: /* size is only optional for an atlas packed with an old TexturePacker. */ + page->width = toInt(tuple); + page->height = toInt(tuple + 1); + if (!readTuple(end, tuple)) return abortAtlas(self); + } + page->format = (spAtlasFormat)indexOf(formatNames, 7, tuple); if (!readTuple(end, tuple)) return abortAtlas(self); page->minFilter = (spAtlasFilter)indexOf(textureFilterNames, 7, tuple); @@ -215,8 +221,8 @@ spAtlas* spAtlas_readAtlas (const char* begin, int length, const char* dir) { if (!readValue(end, &str)) return abortAtlas(self); if (!equals(&str, "none")) { - page->uWrap = *str.begin == 'x' ? ATLAS_REPEAT : (*str.begin == 'y' ? ATLAS_CLAMPTOEDGE : ATLAS_REPEAT); - page->vWrap = *str.begin == 'x' ? ATLAS_CLAMPTOEDGE : (*str.begin == 'y' ? ATLAS_REPEAT : ATLAS_REPEAT); + page->uWrap = *str.begin == 'x' ? SP_ATLAS_REPEAT : (*str.begin == 'y' ? SP_ATLAS_CLAMPTOEDGE : SP_ATLAS_REPEAT); + page->vWrap = *str.begin == 'x' ? SP_ATLAS_CLAMPTOEDGE : (*str.begin == 'y' ? SP_ATLAS_REPEAT : SP_ATLAS_REPEAT); } _spAtlasPage_createTexture(page, path); @@ -288,8 +294,8 @@ spAtlas* spAtlas_readAtlas (const char* begin, int length, const char* dir) { return self; } -spAtlas* spAtlas_readAtlasFile (const char* path) { - long dirLength; +spAtlas* spAtlas_createFromFile (const char* path, void* rendererObject) { + int dirLength; char *dir; int length; const char* data; @@ -301,13 +307,13 @@ spAtlas* spAtlas_readAtlasFile (const char* path) { const char* lastBackwardSlash = strrchr(path, '\\'); const char* lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash; if (lastSlash == path) lastSlash++; /* Never drop starting slash. */ - dirLength = lastSlash ? lastSlash - path : 0; + dirLength = (int)(lastSlash ? lastSlash - path : 0); dir = MALLOC(char, dirLength + 1); memcpy(dir, path, dirLength); dir[dirLength] = '\0'; data = _spUtil_readFile(path, &length); - if (data) atlas = spAtlas_readAtlas(data, length, dir); + if (data) atlas = spAtlas_create(data, length, dir, rendererObject); FREE(data); FREE(dir); diff --git a/cocos/editor-support/spine/Atlas.h b/cocos/editor-support/spine/Atlas.h index 77da6d147e..60e3ab7c6c 100644 --- a/cocos/editor-support/spine/Atlas.h +++ b/cocos/editor-support/spine/Atlas.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ATLAS_H_ @@ -38,26 +35,35 @@ extern "C" { #endif +typedef struct spAtlas spAtlas; + typedef enum { - ATLAS_ALPHA, ATLAS_INTENSITY, ATLAS_LUMINANCE_ALPHA, ATLAS_RGB565, ATLAS_RGBA4444, ATLAS_RGB888, ATLAS_RGBA8888 + SP_ATLAS_ALPHA, + SP_ATLAS_INTENSITY, + SP_ATLAS_LUMINANCE_ALPHA, + SP_ATLAS_RGB565, + SP_ATLAS_RGBA4444, + SP_ATLAS_RGB888, + SP_ATLAS_RGBA8888 } spAtlasFormat; typedef enum { - ATLAS_NEAREST, - ATLAS_LINEAR, - ATLAS_MIPMAP, - ATLAS_MIPMAP_NEAREST_NEAREST, - ATLAS_MIPMAP_LINEAR_NEAREST, - ATLAS_MIPMAP_NEAREST_LINEAR, - ATLAS_MIPMAP_LINEAR_LINEAR + SP_ATLAS_NEAREST, + SP_ATLAS_LINEAR, + SP_ATLAS_MIPMAP, + SP_ATLAS_MIPMAP_NEAREST_NEAREST, + SP_ATLAS_MIPMAP_LINEAR_NEAREST, + SP_ATLAS_MIPMAP_NEAREST_LINEAR, + SP_ATLAS_MIPMAP_LINEAR_LINEAR } spAtlasFilter; typedef enum { - ATLAS_MIRROREDREPEAT, ATLAS_CLAMPTOEDGE, ATLAS_REPEAT + SP_ATLAS_MIRROREDREPEAT, SP_ATLAS_CLAMPTOEDGE, SP_ATLAS_REPEAT } spAtlasWrap; typedef struct spAtlasPage spAtlasPage; struct spAtlasPage { + const spAtlas* atlas; const char* name; spAtlasFormat format; spAtlasFilter minFilter, magFilter; @@ -69,13 +75,30 @@ struct spAtlasPage { spAtlasPage* next; }; -spAtlasPage* spAtlasPage_create (const char* name); +spAtlasPage* spAtlasPage_create (spAtlas* atlas, const char* name); void spAtlasPage_dispose (spAtlasPage* self); #ifdef SPINE_SHORT_NAMES typedef spAtlasFormat AtlasFormat; +#define ATLAS_ALPHA SP_ATLAS_ALPHA +#define ATLAS_INTENSITY SP_ATLAS_INTENSITY +#define ATLAS_LUMINANCE_ALPHA SP_ATLAS_LUMINANCE_ALPHA +#define ATLAS_RGB565 SP_ATLAS_RGB565 +#define ATLAS_RGBA4444 SP_ATLAS_RGBA4444 +#define ATLAS_RGB888 SP_ATLAS_RGB888 +#define ATLAS_RGBA8888 SP_ATLAS_RGBA8888 typedef spAtlasFilter AtlasFilter; +#define ATLAS_NEAREST SP_ATLAS_NEAREST +#define ATLAS_LINEAR SP_ATLAS_LINEAR +#define ATLAS_MIPMAP SP_ATLAS_MIPMAP +#define ATLAS_MIPMAP_NEAREST_NEAREST SP_ATLAS_MIPMAP_NEAREST_NEAREST +#define ATLAS_MIPMAP_LINEAR_NEAREST SP_ATLAS_MIPMAP_LINEAR_NEAREST +#define ATLAS_MIPMAP_NEAREST_LINEAR SP_ATLAS_MIPMAP_NEAREST_LINEAR +#define ATLAS_MIPMAP_LINEAR_LINEAR SP_ATLAS_MIPMAP_LINEAR_LINEAR typedef spAtlasWrap AtlasWrap; +#define ATLAS_MIRROREDREPEAT SP_ATLAS_MIRROREDREPEAT +#define ATLAS_CLAMPTOEDGE SP_ATLAS_CLAMPTOEDGE +#define ATLAS_REPEAT SP_ATLAS_REPEAT typedef spAtlasPage AtlasPage; #define AtlasPage_create(...) spAtlasPage_create(__VA_ARGS__) #define AtlasPage_dispose(...) spAtlasPage_dispose(__VA_ARGS__) @@ -112,15 +135,17 @@ typedef spAtlasRegion AtlasRegion; /**/ -typedef struct { +struct spAtlas { spAtlasPage* pages; spAtlasRegion* regions; -} spAtlas; + + void* rendererObject; +}; /* Image files referenced in the atlas file will be prefixed with dir. */ -spAtlas* spAtlas_readAtlas (const char* data, int length, const char* dir); +spAtlas* spAtlas_create (const char* data, int length, const char* dir, void* rendererObject); /* Image files referenced in the atlas file will be prefixed with the directory containing the atlas file. */ -spAtlas* spAtlas_readAtlasFile (const char* path); +spAtlas* spAtlas_createFromFile (const char* path, void* rendererObject); void spAtlas_dispose (spAtlas* atlas); /* Returns 0 if the region was not found. */ @@ -128,8 +153,8 @@ spAtlasRegion* spAtlas_findRegion (const spAtlas* self, const char* name); #ifdef SPINE_SHORT_NAMES typedef spAtlas Atlas; -#define Atlas_readAtlas(...) spAtlas_readAtlas(__VA_ARGS__) -#define Atlas_readAtlasFile(...) spAtlas_readAtlasFile(__VA_ARGS__) +#define Atlas_create(...) spAtlas_create(__VA_ARGS__) +#define Atlas_createFromFile(...) spAtlas_createFromFile(__VA_ARGS__) #define Atlas_dispose(...) spAtlas_dispose(__VA_ARGS__) #define Atlas_findRegion(...) spAtlas_findRegion(__VA_ARGS__) #endif diff --git a/cocos/editor-support/spine/AtlasAttachmentLoader.c b/cocos/editor-support/spine/AtlasAttachmentLoader.c new file mode 100644 index 0000000000..0867cd23ed --- /dev/null +++ b/cocos/editor-support/spine/AtlasAttachmentLoader.c @@ -0,0 +1,113 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spAttachment* _spAtlasAttachmentLoader_newAttachment (spAttachmentLoader* loader, spSkin* skin, spAttachmentType type, + const char* name, const char* path) { + spAtlasAttachmentLoader* self = SUB_CAST(spAtlasAttachmentLoader, loader); + switch (type) { + case SP_ATTACHMENT_REGION: { + spRegionAttachment* attachment; + spAtlasRegion* region = spAtlas_findRegion(self->atlas, path); + if (!region) { + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + attachment = spRegionAttachment_create(name); + attachment->rendererObject = region; + spRegionAttachment_setUVs(attachment, region->u, region->v, region->u2, region->v2, region->rotate); + attachment->regionOffsetX = region->offsetX; + attachment->regionOffsetY = region->offsetY; + attachment->regionWidth = region->width; + attachment->regionHeight = region->height; + attachment->regionOriginalWidth = region->originalWidth; + attachment->regionOriginalHeight = region->originalHeight; + return SUPER(attachment); + } + case SP_ATTACHMENT_MESH: { + spMeshAttachment* attachment; + spAtlasRegion* region = spAtlas_findRegion(self->atlas, path); + if (!region) { + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + attachment = spMeshAttachment_create(name); + attachment->rendererObject = region; + attachment->regionU = region->u; + attachment->regionV = region->v; + attachment->regionU2 = region->u2; + attachment->regionV2 = region->v2; + attachment->regionRotate = region->rotate; + attachment->regionOffsetX = region->offsetX; + attachment->regionOffsetY = region->offsetY; + attachment->regionWidth = region->width; + attachment->regionHeight = region->height; + attachment->regionOriginalWidth = region->originalWidth; + attachment->regionOriginalHeight = region->originalHeight; + return SUPER(attachment); + } + case SP_ATTACHMENT_SKINNED_MESH: { + spSkinnedMeshAttachment* attachment; + spAtlasRegion* region = spAtlas_findRegion(self->atlas, path); + if (!region) { + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + attachment = spSkinnedMeshAttachment_create(name); + attachment->rendererObject = region; + attachment->regionU = region->u; + attachment->regionV = region->v; + attachment->regionU2 = region->u2; + attachment->regionV2 = region->v2; + attachment->regionRotate = region->rotate; + attachment->regionOffsetX = region->offsetX; + attachment->regionOffsetY = region->offsetY; + attachment->regionWidth = region->width; + attachment->regionHeight = region->height; + attachment->regionOriginalWidth = region->originalWidth; + attachment->regionOriginalHeight = region->originalHeight; + return SUPER(attachment); + } + case SP_ATTACHMENT_BOUNDING_BOX: + return SUPER(spBoundingBoxAttachment_create(name)); + default: + _spAttachmentLoader_setUnknownTypeError(loader, type); + return 0; + } +} + +spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas) { + spAtlasAttachmentLoader* self = NEW(spAtlasAttachmentLoader); + _spAttachmentLoader_init(SUPER(self), _spAttachmentLoader_deinit, _spAtlasAttachmentLoader_newAttachment); + self->atlas = atlas; + return self; +} diff --git a/cocos/editor-support/spine/AtlasAttachmentLoader.cpp b/cocos/editor-support/spine/AtlasAttachmentLoader.cpp deleted file mode 100644 index 23b9171a85..0000000000 --- a/cocos/editor-support/spine/AtlasAttachmentLoader.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -spAttachment* _spAtlasAttachmentLoader_newAttachment (spAttachmentLoader* loader, spSkin* skin, spAttachmentType type, - const char* name) { - spAtlasAttachmentLoader* self = SUB_CAST(spAtlasAttachmentLoader, loader); - switch (type) { - case ATTACHMENT_REGION: { - spRegionAttachment* attachment; - spAtlasRegion* region = spAtlas_findRegion(self->atlas, name); - if (!region) { - _spAttachmentLoader_setError(loader, "Region not found: ", name); - return 0; - } - attachment = spRegionAttachment_create(name); - attachment->rendererObject = region; - spRegionAttachment_setUVs(attachment, region->u, region->v, region->u2, region->v2, region->rotate); - attachment->regionOffsetX = region->offsetX; - attachment->regionOffsetY = region->offsetY; - attachment->regionWidth = region->width; - attachment->regionHeight = region->height; - attachment->regionOriginalWidth = region->originalWidth; - attachment->regionOriginalHeight = region->originalHeight; - return SUPER(attachment); - } - case ATTACHMENT_BOUNDING_BOX: - return SUPER(spBoundingBoxAttachment_create(name)); - default: - _spAttachmentLoader_setUnknownTypeError(loader, type); - return 0; - } -} - -spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas) { - spAtlasAttachmentLoader* self = NEW(spAtlasAttachmentLoader); - _spAttachmentLoader_init(SUPER(self), _spAttachmentLoader_deinit, _spAtlasAttachmentLoader_newAttachment); - self->atlas = atlas; - return self; -} diff --git a/cocos/editor-support/spine/AtlasAttachmentLoader.h b/cocos/editor-support/spine/AtlasAttachmentLoader.h index 09303f567e..bd36afb335 100644 --- a/cocos/editor-support/spine/AtlasAttachmentLoader.h +++ b/cocos/editor-support/spine/AtlasAttachmentLoader.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ATLASATTACHMENTLOADER_H_ diff --git a/cocos/editor-support/spine/Attachment.c b/cocos/editor-support/spine/Attachment.c new file mode 100644 index 0000000000..3918837f00 --- /dev/null +++ b/cocos/editor-support/spine/Attachment.c @@ -0,0 +1,56 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +typedef struct _spAttachmentVtable { + void (*dispose) (spAttachment* self); +} _spAttachmentVtable; + +void _spAttachment_init (spAttachment* self, const char* name, spAttachmentType type, /**/ + void (*dispose) (spAttachment* self)) { + + CONST_CAST(_spAttachmentVtable*, self->vtable) = NEW(_spAttachmentVtable); + VTABLE(spAttachment, self) ->dispose = dispose; + + MALLOC_STR(self->name, name); + CONST_CAST(spAttachmentType, self->type) = type; +} + +void _spAttachment_deinit (spAttachment* self) { + FREE(self->vtable); + FREE(self->name); +} + +void spAttachment_dispose (spAttachment* self) { + VTABLE(spAttachment, self) ->dispose(self); +} diff --git a/cocos/editor-support/spine/Attachment.cpp b/cocos/editor-support/spine/Attachment.cpp deleted file mode 100644 index b5ce849875..0000000000 --- a/cocos/editor-support/spine/Attachment.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -typedef struct _spAttachmentVtable { - void (*dispose) (spAttachment* self); -} _spAttachmentVtable; - -void _spAttachment_init (spAttachment* self, const char* name, spAttachmentType type, /**/ - void (*dispose) (spAttachment* self)) { - - CONST_CAST(_spAttachmentVtable*, self->vtable) = NEW(_spAttachmentVtable); - VTABLE(spAttachment, self) ->dispose = dispose; - - MALLOC_STR(self->name, name); - self->type = type; -} - -void _spAttachment_deinit (spAttachment* self) { - FREE(self->vtable); - FREE(self->name); -} - -void spAttachment_dispose (spAttachment* self) { - VTABLE(spAttachment, self) ->dispose(self); -} diff --git a/cocos/editor-support/spine/Attachment.h b/cocos/editor-support/spine/Attachment.h index 8ef9d64bb4..9b516b04f9 100644 --- a/cocos/editor-support/spine/Attachment.h +++ b/cocos/editor-support/spine/Attachment.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ATTACHMENT_H_ @@ -41,13 +38,13 @@ extern "C" { struct spSlot; typedef enum { - ATTACHMENT_REGION, ATTACHMENT_REGION_SEQUENCE, ATTACHMENT_BOUNDING_BOX + SP_ATTACHMENT_REGION, SP_ATTACHMENT_BOUNDING_BOX, SP_ATTACHMENT_MESH, SP_ATTACHMENT_SKINNED_MESH } spAttachmentType; typedef struct spAttachment spAttachment; struct spAttachment { const char* const name; - spAttachmentType type; + const spAttachmentType type; const void* const vtable; }; @@ -56,6 +53,10 @@ void spAttachment_dispose (spAttachment* self); #ifdef SPINE_SHORT_NAMES typedef spAttachmentType AttachmentType; +#define ATTACHMENT_REGION SP_ATTACHMENT_REGION +#define ATTACHMENT_BOUNDING_BOX SP_ATTACHMENT_BOUNDING_BOX +#define ATTACHMENT_MESH SP_ATTACHMENT_MESH +#define ATTACHMENT_SKINNED_MESH SP_ATTACHMENT_SKINNED_MESH typedef spAttachment Attachment; #define Attachment_dispose(...) spAttachment_dispose(__VA_ARGS__) #endif diff --git a/cocos/editor-support/spine/AttachmentLoader.c b/cocos/editor-support/spine/AttachmentLoader.c new file mode 100644 index 0000000000..ab0c04c366 --- /dev/null +++ b/cocos/editor-support/spine/AttachmentLoader.c @@ -0,0 +1,81 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +typedef struct _spAttachmentLoaderVtable { + spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name, + const char* path); + void (*dispose) (spAttachmentLoader* self); +} _spAttachmentLoaderVtable; + +void _spAttachmentLoader_init (spAttachmentLoader* self, /**/ +void (*dispose) (spAttachmentLoader* self), /**/ + spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name, + const char* path)) { + CONST_CAST(_spAttachmentLoaderVtable*, self->vtable) = NEW(_spAttachmentLoaderVtable); + VTABLE(spAttachmentLoader, self)->dispose = dispose; + VTABLE(spAttachmentLoader, self)->newAttachment = newAttachment; +} + +void _spAttachmentLoader_deinit (spAttachmentLoader* self) { + FREE(self->vtable); + FREE(self->error1); + FREE(self->error2); +} + +void spAttachmentLoader_dispose (spAttachmentLoader* self) { + VTABLE(spAttachmentLoader, self)->dispose(self); + FREE(self); +} + +spAttachment* spAttachmentLoader_newAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name, + const char* path) { + FREE(self->error1); + FREE(self->error2); + self->error1 = 0; + self->error2 = 0; + return VTABLE(spAttachmentLoader, self)->newAttachment(self, skin, type, name, path); +} + +void _spAttachmentLoader_setError (spAttachmentLoader* self, const char* error1, const char* error2) { + FREE(self->error1); + FREE(self->error2); + MALLOC_STR(self->error1, error1); + MALLOC_STR(self->error2, error2); +} + +void _spAttachmentLoader_setUnknownTypeError (spAttachmentLoader* self, spAttachmentType type) { + char buffer[16]; + sprintf(buffer, "%d", type); + _spAttachmentLoader_setError(self, "Unknown attachment type: ", buffer); +} diff --git a/cocos/editor-support/spine/AttachmentLoader.cpp b/cocos/editor-support/spine/AttachmentLoader.cpp deleted file mode 100644 index 18fad267c5..0000000000 --- a/cocos/editor-support/spine/AttachmentLoader.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -typedef struct _spAttachmentLoaderVtable { - spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name); - void (*dispose) (spAttachmentLoader* self); -} _spAttachmentLoaderVtable; - -void _spAttachmentLoader_init (spAttachmentLoader* self, /**/ -void (*dispose) (spAttachmentLoader* self), /**/ -spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name)) { - CONST_CAST(_spAttachmentLoaderVtable*, self->vtable) = NEW(_spAttachmentLoaderVtable); - VTABLE(spAttachmentLoader, self)->dispose = dispose; - VTABLE(spAttachmentLoader, self)->newAttachment = newAttachment; -} - -void _spAttachmentLoader_deinit (spAttachmentLoader* self) { - FREE(self->vtable); - FREE(self->error1); - FREE(self->error2); -} - -void spAttachmentLoader_dispose (spAttachmentLoader* self) { - VTABLE(spAttachmentLoader, self)->dispose(self); - FREE(self); -} - -spAttachment* spAttachmentLoader_newAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name) { - FREE(self->error1); - FREE(self->error2); - self->error1 = 0; - self->error2 = 0; - return VTABLE(spAttachmentLoader, self)->newAttachment(self, skin, type, name); -} - -void _spAttachmentLoader_setError (spAttachmentLoader* self, const char* error1, const char* error2) { - FREE(self->error1); - FREE(self->error2); - MALLOC_STR(self->error1, error1); - MALLOC_STR(self->error2, error2); -} - -void _spAttachmentLoader_setUnknownTypeError (spAttachmentLoader* self, spAttachmentType type) { - char buffer[16]; - sprintf(buffer, "%d", type); - _spAttachmentLoader_setError(self, "Unknown attachment type: ", buffer); -} diff --git a/cocos/editor-support/spine/AttachmentLoader.h b/cocos/editor-support/spine/AttachmentLoader.h index fdea26df79..4088e0c47a 100644 --- a/cocos/editor-support/spine/AttachmentLoader.h +++ b/cocos/editor-support/spine/AttachmentLoader.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_ATTACHMENTLOADER_H_ @@ -59,7 +56,8 @@ struct spAttachmentLoader { void spAttachmentLoader_dispose (spAttachmentLoader* self); /* Returns 0 to not load an attachment. If 0 is returned and spAttachmentLoader.error1 is set, an error occurred. */ -spAttachment* spAttachmentLoader_newAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name); +spAttachment* spAttachmentLoader_newAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name, + const char* path); #ifdef SPINE_SHORT_NAMES typedef spAttachmentLoader AttachmentLoader; diff --git a/cocos/editor-support/spine/Bone.c b/cocos/editor-support/spine/Bone.c new file mode 100644 index 0000000000..0e91facc5a --- /dev/null +++ b/cocos/editor-support/spine/Bone.c @@ -0,0 +1,118 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +static int yDown; + +void spBone_setYDown (int value) { + yDown = value; +} + +spBone* spBone_create (spBoneData* data, spSkeleton* skeleton, spBone* parent) { + spBone* self = NEW(spBone); + CONST_CAST(spBoneData*, self->data) = data; + CONST_CAST(spSkeleton*, self->skeleton) = skeleton; + CONST_CAST(spBone*, self->parent) = parent; + spBone_setToSetupPose(self); + return self; +} + +void spBone_dispose (spBone* self) { + FREE(self); +} + +void spBone_updateWorldTransform (spBone* self) { + float radians, cosine, sine; + if (self->parent) { + CONST_CAST(float, self->worldX) = self->x * self->parent->m00 + self->y * self->parent->m01 + self->parent->worldX; + CONST_CAST(float, self->worldY) = self->x * self->parent->m10 + self->y * self->parent->m11 + self->parent->worldY; + if (self->data->inheritScale) { + CONST_CAST(float, self->worldScaleX) = self->parent->worldScaleX * self->scaleX; + CONST_CAST(float, self->worldScaleY) = self->parent->worldScaleY * self->scaleY; + } else { + CONST_CAST(float, self->worldScaleX) = self->scaleX; + CONST_CAST(float, self->worldScaleY) = self->scaleY; + } + CONST_CAST(float, self->worldRotation) = + self->data->inheritRotation ? self->parent->worldRotation + self->rotationIK : self->rotationIK; + } else { + CONST_CAST(float, self->worldX) = self->skeleton->flipX ? -self->x : self->x; + CONST_CAST(float, self->worldY) = self->skeleton->flipY != yDown ? -self->y : self->y; + CONST_CAST(float, self->worldScaleX) = self->scaleX; + CONST_CAST(float, self->worldScaleY) = self->scaleY; + CONST_CAST(float, self->worldRotation) = self->rotationIK; + } + radians = self->worldRotation * DEG_RAD; + cosine = COS(radians); + sine = SIN(radians); + if (self->skeleton->flipX) { + CONST_CAST(float, self->m00) = -cosine * self->worldScaleX; + CONST_CAST(float, self->m01) = sine * self->worldScaleY; + } else { + CONST_CAST(float, self->m00) = cosine * self->worldScaleX; + CONST_CAST(float, self->m01) = -sine * self->worldScaleY; + } + if (self->skeleton->flipY != yDown) { + CONST_CAST(float, self->m10) = -sine * self->worldScaleX; + CONST_CAST(float, self->m11) = -cosine * self->worldScaleY; + } else { + CONST_CAST(float, self->m10) = sine * self->worldScaleX; + CONST_CAST(float, self->m11) = cosine * self->worldScaleY; + } +} + +void spBone_setToSetupPose (spBone* self) { + self->x = self->data->x; + self->y = self->data->y; + self->rotation = self->data->rotation; + self->rotationIK = self->rotation; + self->scaleX = self->data->scaleX; + self->scaleY = self->data->scaleY; +} + +void spBone_worldToLocal (spBone* self, float worldX, float worldY, float* localX, float* localY) { + float invDet; + float dx = worldX - self->worldX, dy = worldY - self->worldY; + float m00 = self->m00, m11 = self->m11; + if (self->skeleton->flipX != (self->skeleton->flipY != yDown)) { + m00 *= -1; + m11 *= -1; + } + invDet = 1 / (m00 * m11 - self->m01 * self->m10); + *localX = (dx * m00 * invDet - dy * self->m01 * invDet); + *localY = (dy * m11 * invDet - dx * self->m10 * invDet); +} + +void spBone_localToWorld (spBone* self, float localX, float localY, float* worldX, float* worldY) { + *worldX = localX * self->m00 + localY * self->m01 + self->worldX; + *worldY = localX * self->m10 + localY * self->m11 + self->worldY; +} diff --git a/cocos/editor-support/spine/Bone.cpp b/cocos/editor-support/spine/Bone.cpp deleted file mode 100644 index 61eda10881..0000000000 --- a/cocos/editor-support/spine/Bone.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -static int yDown; - -void spBone_setYDown (int value) { - yDown = value; -} - -spBone* spBone_create (spBoneData* data, spBone* parent) { - spBone* self = NEW(spBone); - CONST_CAST(spBoneData*, self->data) = data; - CONST_CAST(spBone*, self->parent) = parent; - spBone_setToSetupPose(self); - return self; -} - -void spBone_dispose (spBone* self) { - FREE(self); -} - -void spBone_setToSetupPose (spBone* self) { - self->x = self->data->x; - self->y = self->data->y; - self->rotation = self->data->rotation; - self->scaleX = self->data->scaleX; - self->scaleY = self->data->scaleY; -} - -void spBone_updateWorldTransform (spBone* self, int flipX, int flipY) { - float radians, cosine, sine; - if (self->parent) { - CONST_CAST(float, self->worldX) = self->x * self->parent->m00 + self->y * self->parent->m01 + self->parent->worldX; - CONST_CAST(float, self->worldY) = self->x * self->parent->m10 + self->y * self->parent->m11 + self->parent->worldY; - if (self->data->inheritScale) { - CONST_CAST(float, self->worldScaleX) = self->parent->worldScaleX * self->scaleX; - CONST_CAST(float, self->worldScaleY) = self->parent->worldScaleY * self->scaleY; - } else { - CONST_CAST(float, self->worldScaleX) = self->scaleX; - CONST_CAST(float, self->worldScaleY) = self->scaleY; - } - CONST_CAST(float, self->worldRotation) = - self->data->inheritRotation ? self->parent->worldRotation + self->rotation : self->rotation; - } else { - CONST_CAST(float, self->worldX) = flipX ? -self->x : self->x; - CONST_CAST(float, self->worldY) = (flipY && flipY != yDown) ? -self->y : self->y; - CONST_CAST(float, self->worldScaleX) = self->scaleX; - CONST_CAST(float, self->worldScaleY) = self->scaleY; - CONST_CAST(float, self->worldRotation) = self->rotation; - } - radians = (float)(self->worldRotation * 3.1415926535897932385 / 180); -#ifdef __STDC_VERSION__ - cosine = cosf(radians); - sine = sinf(radians); -#else - cosine = (float)cos(radians); - sine = (float)sin(radians); -#endif - CONST_CAST(float, self->m00) = cosine * self->worldScaleX; - CONST_CAST(float, self->m10) = sine * self->worldScaleX; - CONST_CAST(float, self->m01) = -sine * self->worldScaleY; - CONST_CAST(float, self->m11) = cosine * self->worldScaleY; - if (flipX) { - CONST_CAST(float, self->m00) = -self->m00; - CONST_CAST(float, self->m01) = -self->m01; - } - if (flipY != yDown) { - CONST_CAST(float, self->m10) = -self->m10; - CONST_CAST(float, self->m11) = -self->m11; - } -} diff --git a/cocos/editor-support/spine/Bone.h b/cocos/editor-support/spine/Bone.h index 844eeebd8d..5e8b1f7bff 100644 --- a/cocos/editor-support/spine/Bone.h +++ b/cocos/editor-support/spine/Bone.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_BONE_H_ @@ -40,12 +37,15 @@ extern "C" { #endif +struct spSkeleton; + typedef struct spBone spBone; struct spBone { spBoneData* const data; + struct spSkeleton* const skeleton; spBone* const parent; float x, y; - float rotation; + float rotation, rotationIK; float scaleX, scaleY; float const m00, m01, worldX; /* a b x */ @@ -57,12 +57,15 @@ struct spBone { void spBone_setYDown (int/*bool*/yDown); /* @param parent May be 0. */ -spBone* spBone_create (spBoneData* data, spBone* parent); +spBone* spBone_create (spBoneData* data, struct spSkeleton* skeleton, spBone* parent); void spBone_dispose (spBone* self); void spBone_setToSetupPose (spBone* self); -void spBone_updateWorldTransform (spBone* self, int/*bool*/flipX, int/*bool*/flipY); +void spBone_updateWorldTransform (spBone* self); + +void spBone_worldToLocal (spBone* self, float worldX, float worldY, float* localX, float* localY); +void spBone_localToWorld (spBone* self, float localX, float localY, float* worldX, float* worldY); #ifdef SPINE_SHORT_NAMES typedef spBone Bone; @@ -71,6 +74,8 @@ typedef spBone Bone; #define Bone_dispose(...) spBone_dispose(__VA_ARGS__) #define Bone_setToSetupPose(...) spBone_setToSetupPose(__VA_ARGS__) #define Bone_updateWorldTransform(...) spBone_updateWorldTransform(__VA_ARGS__) +#define Bone_worldToLocal(...) spBone_worldToLocal(__VA_ARGS__) +#define Bone_localToWorld(...) spBone_localToWorld(__VA_ARGS__) #endif #ifdef __cplusplus diff --git a/cocos/editor-support/spine/BoneData.c b/cocos/editor-support/spine/BoneData.c new file mode 100644 index 0000000000..00a0a88e4f --- /dev/null +++ b/cocos/editor-support/spine/BoneData.c @@ -0,0 +1,48 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spBoneData* spBoneData_create (const char* name, spBoneData* parent) { + spBoneData* self = NEW(spBoneData); + MALLOC_STR(self->name, name); + CONST_CAST(spBoneData*, self->parent) = parent; + self->scaleX = 1; + self->scaleY = 1; + self->inheritScale = 1; + self->inheritRotation = 1; + return self; +} + +void spBoneData_dispose (spBoneData* self) { + FREE(self->name); + FREE(self); +} diff --git a/cocos/editor-support/spine/BoneData.cpp b/cocos/editor-support/spine/BoneData.cpp deleted file mode 100644 index 8a17348d06..0000000000 --- a/cocos/editor-support/spine/BoneData.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -spBoneData* spBoneData_create (const char* name, spBoneData* parent) { - spBoneData* self = NEW(spBoneData); - MALLOC_STR(self->name, name); - CONST_CAST(spBoneData*, self->parent) = parent; - self->scaleX = 1; - self->scaleY = 1; - self->inheritScale = 1; - self->inheritRotation = 1; - return self; -} - -void spBoneData_dispose (spBoneData* self) { - FREE(self->name); - FREE(self); -} diff --git a/cocos/editor-support/spine/BoneData.h b/cocos/editor-support/spine/BoneData.h index 1af8b56c47..77cb90937b 100644 --- a/cocos/editor-support/spine/BoneData.h +++ b/cocos/editor-support/spine/BoneData.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_BONEDATA_H_ diff --git a/cocos/editor-support/spine/BoundingBoxAttachment.c b/cocos/editor-support/spine/BoundingBoxAttachment.c new file mode 100644 index 0000000000..6df38ed32b --- /dev/null +++ b/cocos/editor-support/spine/BoundingBoxAttachment.c @@ -0,0 +1,60 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +void _spBoundingBoxAttachment_dispose (spAttachment* attachment) { + spBoundingBoxAttachment* self = SUB_CAST(spBoundingBoxAttachment, attachment); + + _spAttachment_deinit(attachment); + + FREE(self->vertices); + FREE(self); +} + +spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name) { + spBoundingBoxAttachment* self = NEW(spBoundingBoxAttachment); + _spAttachment_init(SUPER(self), name, SP_ATTACHMENT_BOUNDING_BOX, _spBoundingBoxAttachment_dispose); + return self; +} + +void spBoundingBoxAttachment_computeWorldVertices (spBoundingBoxAttachment* self, spBone* bone, float* worldVertices) { + int i; + float px, py; + float* vertices = self->vertices; + float x = bone->skeleton->x + bone->worldX, y = bone->skeleton->y + bone->worldY; + for (i = 0; i < self->verticesCount; i += 2) { + px = vertices[i]; + py = vertices[i + 1]; + worldVertices[i] = px * bone->m00 + py * bone->m01 + x; + worldVertices[i + 1] = px * bone->m10 + py * bone->m11 + y; + } +} diff --git a/cocos/editor-support/spine/BoundingBoxAttachment.cpp b/cocos/editor-support/spine/BoundingBoxAttachment.cpp deleted file mode 100644 index f0f47f5935..0000000000 --- a/cocos/editor-support/spine/BoundingBoxAttachment.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -void _spBoundingBoxAttachment_dispose (spAttachment* attachment) { - spBoundingBoxAttachment* self = SUB_CAST(spBoundingBoxAttachment, attachment); - - _spAttachment_deinit(attachment); - - FREE(self->vertices); - FREE(self); -} - -spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name) { - spBoundingBoxAttachment* self = NEW(spBoundingBoxAttachment); - _spAttachment_init(SUPER(self), name, ATTACHMENT_BOUNDING_BOX, _spBoundingBoxAttachment_dispose); - return self; -} - -void spBoundingBoxAttachment_computeWorldVertices (spBoundingBoxAttachment* self, float x, float y, spBone* bone, float* worldVertices) { - int i; - float px, py; - float* vertices = self->vertices; - - x += bone->worldX; - y += bone->worldY; - for (i = 0; i < self->verticesCount; i += 2) { - px = vertices[i]; - py = vertices[i + 1]; - worldVertices[i] = px * bone->m00 + py * bone->m01 + x; - worldVertices[i + 1] = px * bone->m10 + py * bone->m11 + y; - } -} diff --git a/cocos/editor-support/spine/BoundingBoxAttachment.h b/cocos/editor-support/spine/BoundingBoxAttachment.h index 606089389b..e67db6c77a 100644 --- a/cocos/editor-support/spine/BoundingBoxAttachment.h +++ b/cocos/editor-support/spine/BoundingBoxAttachment.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_BOUNDINGBOXATTACHMENT_H_ @@ -50,7 +47,7 @@ struct spBoundingBoxAttachment { }; spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name); -void spBoundingBoxAttachment_computeWorldVertices (spBoundingBoxAttachment* self, float x, float y, spBone* bone, float* vertices); +void spBoundingBoxAttachment_computeWorldVertices (spBoundingBoxAttachment* self, spBone* bone, float* vertices); #ifdef SPINE_SHORT_NAMES typedef spBoundingBoxAttachment BoundingBoxAttachment; diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp deleted file mode 100644 index 8a83795284..0000000000 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -USING_NS_CC; -using std::min; -using std::max; - -namespace spine { - -Skeleton* Skeleton::createWithData (spSkeletonData* skeletonData, bool isOwnsSkeletonData) { - Skeleton* node = new (std::nothrow) Skeleton(skeletonData, isOwnsSkeletonData); - node->autorelease(); - return node; -} - -Skeleton* Skeleton::createWithFile (const char* skeletonDataFile, spAtlas* atlas, float scale) { - Skeleton* node = new (std::nothrow) Skeleton(skeletonDataFile, atlas, scale); - node->autorelease(); - return node; -} - -Skeleton* Skeleton::createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale) { - Skeleton* node = new (std::nothrow) Skeleton(skeletonDataFile, atlasFile, scale); - node->autorelease(); - return node; -} - -void Skeleton::initialize () { - atlas = 0; - debugSlots = false; - debugBones = false; - timeScale = 1; - - blendFunc.src = BlendFunc::ALPHA_PREMULTIPLIED.src; - blendFunc.dst = BlendFunc::ALPHA_PREMULTIPLIED.dst; - - setOpacityModifyRGB(true); - - setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); -} - -void Skeleton::setSkeletonData (spSkeletonData *skeletonData, bool isOwnsSkeletonData) { - skeleton = spSkeleton_create(skeletonData); - rootBone = skeleton->bones[0]; - this->ownsSkeletonData = isOwnsSkeletonData; -} - -Skeleton::Skeleton () { - initialize(); -} - -Skeleton::Skeleton (spSkeletonData *skeletonData, bool isOwnsSkeletonData) { - initialize(); - - setSkeletonData(skeletonData, isOwnsSkeletonData); -} - -Skeleton::Skeleton (const char* skeletonDataFile, spAtlas* aAtlas, float scale) { - initialize(); - - spSkeletonJson* json = spSkeletonJson_create(aAtlas); - json->scale = scale == 0 ? (1 / Director::getInstance()->getContentScaleFactor()) : scale; - spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile); - CCAssert(skeletonData, json->error ? json->error : "Error reading skeleton data."); - spSkeletonJson_dispose(json); - - setSkeletonData(skeletonData, true); -} - -Skeleton::Skeleton (const char* skeletonDataFile, const char* atlasFile, float scale) { - initialize(); - - atlas = spAtlas_readAtlasFile(atlasFile); - CCAssert(atlas, "Error reading atlas file."); - - spSkeletonJson* json = spSkeletonJson_create(atlas); - json->scale = scale == 0 ? (1 / Director::getInstance()->getContentScaleFactor()) : scale; - spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile); - CCAssert(skeletonData, json->error ? json->error : "Error reading skeleton data file."); - spSkeletonJson_dispose(json); - - setSkeletonData(skeletonData, true); -} - -Skeleton::~Skeleton () { - if (ownsSkeletonData) spSkeletonData_dispose(skeleton->data); - if (atlas) spAtlas_dispose(atlas); - spSkeleton_dispose(skeleton); -} - -void Skeleton::update (float deltaTime) { - spSkeleton_update(skeleton, deltaTime * timeScale); -} - -void Skeleton::draw(cocos2d::Renderer *renderer, const Mat4 &transform, uint32_t flags) -{ - - _customCommand.init(_globalZOrder); - _customCommand.func = CC_CALLBACK_0(Skeleton::onDraw, this, transform, flags); - renderer->addCommand(&_customCommand); -} - -void Skeleton::onDraw(const Mat4 &transform, uint32_t flags) -{ - getGLProgram()->use(); - getGLProgram()->setUniformsForBuiltins(transform); - - GL::blendFunc(blendFunc.src, blendFunc.dst); - Color3B color = getColor(); - skeleton->r = color.r / (float)255; - skeleton->g = color.g / (float)255; - skeleton->b = color.b / (float)255; - skeleton->a = getOpacity() / (float)255; - if (premultipliedAlpha) { - skeleton->r *= skeleton->a; - skeleton->g *= skeleton->a; - skeleton->b *= skeleton->a; - } - - int additive = 0; - TextureAtlas* textureAtlas = 0; - V3F_C4B_T2F_Quad quad; - quad.tl.vertices.z = 0; - quad.tr.vertices.z = 0; - quad.bl.vertices.z = 0; - quad.br.vertices.z = 0; - for (int i = 0, n = skeleton->slotCount; i < n; i++) { - spSlot* slot = skeleton->drawOrder[i]; - if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; - spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; - TextureAtlas* regionTextureAtlas = getTextureAtlas(attachment); - - if (slot->data->additiveBlending != additive) { - if (textureAtlas) { - textureAtlas->drawQuads(); - textureAtlas->removeAllQuads(); - } - additive = !additive; - GL::blendFunc(blendFunc.src, additive ? GL_ONE : blendFunc.dst); - } else if (regionTextureAtlas != textureAtlas && textureAtlas) { - textureAtlas->drawQuads(); - textureAtlas->removeAllQuads(); - } - textureAtlas = regionTextureAtlas; - setFittedBlendingFunc(textureAtlas); - - ssize_t quadCount = textureAtlas->getTotalQuads(); - if (textureAtlas->getCapacity() == quadCount) { - textureAtlas->drawQuads(); - textureAtlas->removeAllQuads(); - if (!textureAtlas->resizeCapacity(textureAtlas->getCapacity() * 2)) return; - } - - spRegionAttachment_updateQuad(attachment, slot, &quad, premultipliedAlpha); - textureAtlas->updateQuad(&quad, quadCount); - } - if (textureAtlas) { - textureAtlas->drawQuads(); - textureAtlas->removeAllQuads(); - } - - if(debugBones || debugSlots) { - Director* director = Director::getInstance(); - CCASSERT(nullptr != director, "Director is null when seting matrix stack"); - director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, transform); - - if (debugSlots) { - // Slots. - DrawPrimitives::setDrawColor4B(0, 0, 255, 255); - glLineWidth(1); - Vec2 points[4]; - V3F_C4B_T2F_Quad tmpQuad; - for (int i = 0, n = skeleton->slotCount; i < n; i++) { - spSlot* slot = skeleton->drawOrder[i]; - if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; - spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; - spRegionAttachment_updateQuad(attachment, slot, &tmpQuad); - points[0] = Vec2(tmpQuad.bl.vertices.x, tmpQuad.bl.vertices.y); - points[1] = Vec2(tmpQuad.br.vertices.x, tmpQuad.br.vertices.y); - points[2] = Vec2(tmpQuad.tr.vertices.x, tmpQuad.tr.vertices.y); - points[3] = Vec2(tmpQuad.tl.vertices.x, tmpQuad.tl.vertices.y); - DrawPrimitives::drawPoly(points, 4, true); - } - } - if (debugBones) { - // Bone lengths. - glLineWidth(2); - DrawPrimitives::setDrawColor4B(255, 0, 0, 255); - for (int i = 0, n = skeleton->boneCount; i < n; i++) { - spBone *bone = skeleton->bones[i]; - float x = bone->data->length * bone->m00 + bone->worldX; - float y = bone->data->length * bone->m10 + bone->worldY; - DrawPrimitives::drawLine(Vec2(bone->worldX, bone->worldY), Vec2(x, y)); - } - // Bone origins. - DrawPrimitives::setPointSize(4); - DrawPrimitives::setDrawColor4B(0, 0, 255, 255); // Root bone is blue. - for (int i = 0, n = skeleton->boneCount; i < n; i++) { - spBone *bone = skeleton->bones[i]; - DrawPrimitives::drawPoint(Vec2(bone->worldX, bone->worldY)); - if (i == 0) DrawPrimitives::setDrawColor4B(0, 255, 0, 255); - } - } - - director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - } -} - -TextureAtlas* Skeleton::getTextureAtlas (spRegionAttachment* regionAttachment) const { - return (TextureAtlas*)((spAtlasRegion*)regionAttachment->rendererObject)->page->rendererObject; -} - -Rect Skeleton::getBoundingBox () const { - float minX = FLT_MAX, minY = FLT_MAX, maxX = FLT_MIN, maxY = FLT_MIN; - float scaleX = getScaleX(); - float scaleY = getScaleY(); - float vertices[8]; - for (int i = 0; i < skeleton->slotCount; ++i) { - spSlot* slot = skeleton->slots[i]; - if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; - spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; - spRegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); - minX = min(minX, vertices[VERTEX_X1] * scaleX); - minY = min(minY, vertices[VERTEX_Y1] * scaleY); - maxX = max(maxX, vertices[VERTEX_X1] * scaleX); - maxY = max(maxY, vertices[VERTEX_Y1] * scaleY); - minX = min(minX, vertices[VERTEX_X4] * scaleX); - minY = min(minY, vertices[VERTEX_Y4] * scaleY); - maxX = max(maxX, vertices[VERTEX_X4] * scaleX); - maxY = max(maxY, vertices[VERTEX_Y4] * scaleY); - minX = min(minX, vertices[VERTEX_X2] * scaleX); - minY = min(minY, vertices[VERTEX_Y2] * scaleY); - maxX = max(maxX, vertices[VERTEX_X2] * scaleX); - maxY = max(maxY, vertices[VERTEX_Y2] * scaleY); - minX = min(minX, vertices[VERTEX_X3] * scaleX); - minY = min(minY, vertices[VERTEX_Y3] * scaleY); - maxX = max(maxX, vertices[VERTEX_X3] * scaleX); - maxY = max(maxY, vertices[VERTEX_Y3] * scaleY); - } - Vec2 position = getPosition(); - return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY); -} - -void Skeleton::onEnter() { -#if CC_ENABLE_SCRIPT_BINDING - if (_scriptType == kScriptTypeJavascript) - { - if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnter)) - return; - } -#endif - - Node::onEnter(); - scheduleUpdate(); -} - -void Skeleton::onExit() { - Node::onExit(); - unscheduleUpdate(); -} - -// --- Convenience methods for Skeleton_* functions. - -void Skeleton::updateWorldTransform () { - spSkeleton_updateWorldTransform(skeleton); -} - -void Skeleton::setToSetupPose () { - spSkeleton_setToSetupPose(skeleton); -} -void Skeleton::setBonesToSetupPose () { - spSkeleton_setBonesToSetupPose(skeleton); -} -void Skeleton::setSlotsToSetupPose () { - spSkeleton_setSlotsToSetupPose(skeleton); -} - -spBone* Skeleton::findBone (const char* boneName) const { - return spSkeleton_findBone(skeleton, boneName); -} - -spSlot* Skeleton::findSlot (const char* slotName) const { - return spSkeleton_findSlot(skeleton, slotName); -} - -bool Skeleton::setSkin (const char* skinName) { - return spSkeleton_setSkinByName(skeleton, skinName) ? true : false; -} - -spAttachment* Skeleton::getAttachment (const char* slotName, const char* attachmentName) const { - return spSkeleton_getAttachmentForSlotName(skeleton, slotName, attachmentName); -} -bool Skeleton::setAttachment (const char* slotName, const char* attachmentName) { - return spSkeleton_setAttachment(skeleton, slotName, attachmentName) ? true : false; -} - -// --- CCBlendProtocol - -const cocos2d::BlendFunc& Skeleton::getBlendFunc () const { - return blendFunc; -} - -void Skeleton::setBlendFunc (const cocos2d::BlendFunc& aBlendFunc) { - this->blendFunc = aBlendFunc; -} - -void Skeleton::setFittedBlendingFunc(cocos2d::TextureAtlas * nextRenderedTexture) -{ - if(nextRenderedTexture->getTexture() && nextRenderedTexture->getTexture()->hasPremultipliedAlpha()) - { - GL::blendFunc(BlendFunc::ALPHA_PREMULTIPLIED.src, BlendFunc::ALPHA_PREMULTIPLIED.dst); - } - else - { - GL::blendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED.src, BlendFunc::ALPHA_NON_PREMULTIPLIED.dst); - } -} - -} diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h deleted file mode 100644 index fa468e9880..0000000000 --- a/cocos/editor-support/spine/CCSkeleton.h +++ /dev/null @@ -1,119 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_CCSKELETON_H_ -#define SPINE_CCSKELETON_H_ - -#include - -#include "2d/CCNode.h" -#include "base/CCProtocols.h" -#include "renderer/CCTextureAtlas.h" -#include "renderer/CCCustomCommand.h" - -namespace spine { - -/** -Draws a skeleton. -*/ -class Skeleton: public cocos2d::Node, public cocos2d::BlendProtocol { -public: - spSkeleton* skeleton; - spBone* rootBone; - float timeScale; - bool debugSlots; - bool debugBones; - bool premultipliedAlpha; - cocos2d::BlendFunc blendFunc; - - static Skeleton* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false); - static Skeleton* createWithFile (const char* skeletonDataFile, spAtlas* atlas, float scale = 0); - static Skeleton* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 0); - - Skeleton (spSkeletonData* skeletonData, bool ownsSkeletonData = false); - Skeleton (const char* skeletonDataFile, spAtlas* atlas, float scale = 0); - Skeleton (const char* skeletonDataFile, const char* atlasFile, float scale = 0); - - virtual ~Skeleton (); - - virtual void update (float deltaTime) override; - virtual void draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) override; - void onDraw(const cocos2d::Mat4 &transform, uint32_t flags); - void onEnter() override; - void onExit() override; - virtual cocos2d::Rect getBoundingBox () const override; - - // --- Convenience methods for common Skeleton_* functions. - void updateWorldTransform (); - - void setToSetupPose (); - void setBonesToSetupPose (); - void setSlotsToSetupPose (); - - /* Returns 0 if the bone was not found. */ - spBone* findBone (const char* boneName) const; - /* Returns 0 if the slot was not found. */ - spSlot* findSlot (const char* slotName) const; - - /* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are - * attached if the corresponding attachment from the old skin was attached. Returns false if the skin was not found. - * @param skin May be 0.*/ - bool setSkin (const char* skinName); - - /* Returns 0 if the slot or attachment was not found. */ - spAttachment* getAttachment (const char* slotName, const char* attachmentName) const; - /* Returns false if the slot or attachment was not found. */ - bool setAttachment (const char* slotName, const char* attachmentName); - - // --- CCBlendProtocol - virtual const cocos2d::BlendFunc& getBlendFunc() const override; - virtual void setBlendFunc(const cocos2d::BlendFunc& func) override; - -protected: - Skeleton (); - void setSkeletonData (spSkeletonData* skeletonData, bool ownsSkeletonData); - virtual cocos2d::TextureAtlas* getTextureAtlas (spRegionAttachment* regionAttachment) const; - -private: - bool ownsSkeletonData; - spAtlas* atlas; - void initialize (); - // Util function that setting blend-function by nextRenderedTexture's premultiplied flag - void setFittedBlendingFunc(cocos2d::TextureAtlas * nextRenderedTexture); - - cocos2d::CustomCommand _customCommand; -}; - -} - -#endif /* SPINE_CCSKELETON_H_ */ diff --git a/cocos/editor-support/spine/CCSkeletonAnimation.cpp b/cocos/editor-support/spine/CCSkeletonAnimation.cpp deleted file mode 100644 index e3f5b170fa..0000000000 --- a/cocos/editor-support/spine/CCSkeletonAnimation.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -USING_NS_CC; -using std::min; -using std::max; -using std::vector; - -namespace spine { - -static void callback (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount) { - ((SkeletonAnimation*)state->context)->onAnimationStateEvent(trackIndex, type, event, loopCount); -} - -SkeletonAnimation* SkeletonAnimation::createWithData (spSkeletonData* skeletonData) { - SkeletonAnimation* node = new (std::nothrow) SkeletonAnimation(skeletonData); - node->autorelease(); - return node; -} - -SkeletonAnimation* SkeletonAnimation::createWithFile (const char* skeletonDataFile, spAtlas* atlas, float scale) { - SkeletonAnimation* node = new (std::nothrow) SkeletonAnimation(skeletonDataFile, atlas, scale); - node->autorelease(); - return node; -} - -SkeletonAnimation* SkeletonAnimation::createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale) { - SkeletonAnimation* node = new (std::nothrow) SkeletonAnimation(skeletonDataFile, atlasFile, scale); - node->autorelease(); - return node; -} - -void SkeletonAnimation::initialize () { - listenerInstance = 0; - listenerMethod = 0; - - ownsAnimationStateData = true; - state = spAnimationState_create(spAnimationStateData_create(skeleton->data)); - state->context = this; - state->listener = callback; -} - -SkeletonAnimation::SkeletonAnimation (spSkeletonData *skeletonData) - : Skeleton(skeletonData) { - initialize(); -} - -SkeletonAnimation::SkeletonAnimation (const char* skeletonDataFile, spAtlas* atlas, float scale) - : Skeleton(skeletonDataFile, atlas, scale) { - initialize(); -} - -SkeletonAnimation::SkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale) - : Skeleton(skeletonDataFile, atlasFile, scale) { - initialize(); -} - -SkeletonAnimation::~SkeletonAnimation () { - if (ownsAnimationStateData) spAnimationStateData_dispose(state->data); - spAnimationState_dispose(state); -} - -void SkeletonAnimation::update (float deltaTime) { - super::update(deltaTime); - - deltaTime *= timeScale; - spAnimationState_update(state, deltaTime); - spAnimationState_apply(state, skeleton); - spSkeleton_updateWorldTransform(skeleton); -} - -void SkeletonAnimation::setAnimationStateData (spAnimationStateData* stateData) { - CCAssert(stateData, "stateData cannot be null."); - - if (ownsAnimationStateData) spAnimationStateData_dispose(state->data); - spAnimationState_dispose(state); - - ownsAnimationStateData = false; - state = spAnimationState_create(stateData); - state->context = this; - state->listener = callback; -} - -void SkeletonAnimation::setMix (const char* fromAnimation, const char* toAnimation, float duration) { - spAnimationStateData_setMixByName(state->data, fromAnimation, toAnimation, duration); -} - -void SkeletonAnimation::setAnimationListener (Ref* instance, SEL_AnimationStateEvent method) { - listenerInstance = instance; - listenerMethod = method; -} - -spTrackEntry* SkeletonAnimation::setAnimation (int trackIndex, const char* name, bool loop) { - spAnimation* animation = spSkeletonData_findAnimation(skeleton->data, name); - if (!animation) { - log("Spine: Animation not found: %s", name); - return 0; - } - return spAnimationState_setAnimation(state, trackIndex, animation, loop); -} - -spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const char* name, bool loop, float delay) { - spAnimation* animation = spSkeletonData_findAnimation(skeleton->data, name); - if (!animation) { - log("Spine: Animation not found: %s", name); - return 0; - } - return spAnimationState_addAnimation(state, trackIndex, animation, loop, delay); -} - -spTrackEntry* SkeletonAnimation::getCurrent (int trackIndex) { - return spAnimationState_getCurrent(state, trackIndex); -} - -void SkeletonAnimation::clearTracks () { - spAnimationState_clearTracks(state); -} - -void SkeletonAnimation::clearTrack (int trackIndex) { - spAnimationState_clearTrack(state, trackIndex); -} - -void SkeletonAnimation::onAnimationStateEvent (int trackIndex, spEventType type, spEvent* event, int loopCount) { - if (listenerInstance) (listenerInstance->*listenerMethod)(this, trackIndex, type, event, loopCount); -} - -} diff --git a/cocos/editor-support/spine/CCSkeletonAnimation.h b/cocos/editor-support/spine/CCSkeletonAnimation.h deleted file mode 100644 index 295cd74095..0000000000 --- a/cocos/editor-support/spine/CCSkeletonAnimation.h +++ /dev/null @@ -1,90 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#ifndef SPINE_CCSKELETONANIMATION_H_ -#define SPINE_CCSKELETONANIMATION_H_ - -#include -#include - -namespace spine { - -class SkeletonAnimation; -typedef void (cocos2d::Ref::*SEL_AnimationStateEvent)(spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); -#define animationStateEvent_selector(_SELECTOR) (SEL_AnimationStateEvent)(&_SELECTOR) - -/** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be - * played later. */ -class SkeletonAnimation: public Skeleton { -public: - spAnimationState* state; - - static SkeletonAnimation* createWithData (spSkeletonData* skeletonData); - static SkeletonAnimation* createWithFile (const char* skeletonDataFile, spAtlas* atlas, float scale = 0); - static SkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 0); - - SkeletonAnimation (spSkeletonData* skeletonData); - SkeletonAnimation (const char* skeletonDataFile, spAtlas* atlas, float scale = 0); - SkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale = 0); - - virtual ~SkeletonAnimation (); - - virtual void update (float deltaTime); - - void setAnimationStateData (spAnimationStateData* stateData); - void setMix (const char* fromAnimation, const char* toAnimation, float duration); - - void setAnimationListener (cocos2d::Ref* instance, SEL_AnimationStateEvent method); - spTrackEntry* setAnimation (int trackIndex, const char* name, bool loop); - spTrackEntry* addAnimation (int trackIndex, const char* name, bool loop, float delay = 0); - spTrackEntry* getCurrent (int trackIndex = 0); - void clearTracks (); - void clearTrack (int trackIndex = 0); - - virtual void onAnimationStateEvent (int trackIndex, spEventType type, spEvent* event, int loopCount); - -protected: - SkeletonAnimation (); - -private: - typedef Skeleton super; - cocos2d::Ref* listenerInstance; - SEL_AnimationStateEvent listenerMethod; - bool ownsAnimationStateData; - - void initialize (); -}; - -} - -#endif /* SPINE_CCSKELETONANIMATION_H_ */ diff --git a/cocos/editor-support/spine/CMakeLists.txt b/cocos/editor-support/spine/CMakeLists.txt index 2e9c3b75dd..956d6836b4 100644 --- a/cocos/editor-support/spine/CMakeLists.txt +++ b/cocos/editor-support/spine/CMakeLists.txt @@ -1,32 +1,36 @@ set(COCOS_SPINE_SRC - editor-support/spine/Animation.cpp - editor-support/spine/AnimationState.cpp - editor-support/spine/AnimationStateData.cpp - editor-support/spine/Atlas.cpp - editor-support/spine/AtlasAttachmentLoader.cpp - editor-support/spine/Attachment.cpp - editor-support/spine/AttachmentLoader.cpp - editor-support/spine/Bone.cpp - editor-support/spine/BoneData.cpp - editor-support/spine/BoundingBoxAttachment.cpp - editor-support/spine/CCSkeleton.cpp - editor-support/spine/CCSkeletonAnimation.cpp - editor-support/spine/Event.cpp - editor-support/spine/EventData.cpp - editor-support/spine/Json.cpp - editor-support/spine/RegionAttachment.cpp - editor-support/spine/Skeleton.cpp - editor-support/spine/SkeletonBounds.cpp - editor-support/spine/SkeletonData.cpp - editor-support/spine/SkeletonJson.cpp - editor-support/spine/Skin.cpp - editor-support/spine/Slot.cpp - editor-support/spine/SlotData.cpp - editor-support/spine/extension.cpp + editor-support/spine/Animation.c + editor-support/spine/AnimationState.c + editor-support/spine/AnimationStateData.c + editor-support/spine/Atlas.c + editor-support/spine/AtlasAttachmentLoader.c + editor-support/spine/Attachment.c + editor-support/spine/AttachmentLoader.c + editor-support/spine/Bone.c + editor-support/spine/BoneData.c + editor-support/spine/BoundingBoxAttachment.c + editor-support/spine/Event.c + editor-support/spine/EventData.c + editor-support/spine/extension.c + editor-support/spine/IkConstraint.c + editor-support/spine/IkConstraintData.c + editor-support/spine/Json.c + editor-support/spine/MeshAttachment.c + editor-support/spine/PolygonBatch.cpp + editor-support/spine/RegionAttachment.c + editor-support/spine/Skeleton.c + editor-support/spine/SkeletonAnimation.cpp + editor-support/spine/SkeletonBounds.c + editor-support/spine/SkeletonData.c + editor-support/spine/SkeletonJson.c + editor-support/spine/SkeletonRenderer.cpp + editor-support/spine/Skin.c + editor-support/spine/SkinnedMeshAttachment.c + editor-support/spine/Slot.c + editor-support/spine/SlotData.c editor-support/spine/spine-cocos2dx.cpp - ) include_directories( editor-support ) diff --git a/cocos/editor-support/spine/Event.c b/cocos/editor-support/spine/Event.c new file mode 100644 index 0000000000..bff59b8669 --- /dev/null +++ b/cocos/editor-support/spine/Event.c @@ -0,0 +1,43 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spEvent* spEvent_create (spEventData* data) { + spEvent* self = NEW(spEvent); + CONST_CAST(spEventData*, self->data) = data; + return self; +} + +void spEvent_dispose (spEvent* self) { + FREE(self->stringValue); + FREE(self); +} diff --git a/cocos/editor-support/spine/Event.cpp b/cocos/editor-support/spine/Event.cpp deleted file mode 100644 index 0f77b6506c..0000000000 --- a/cocos/editor-support/spine/Event.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -spEvent* spEvent_create (spEventData* data) { - spEvent* self = NEW(spEvent); - CONST_CAST(spEventData*, self->data) = data; - return self; -} - -void spEvent_dispose (spEvent* self) { - FREE(self->stringValue); - FREE(self); -} diff --git a/cocos/editor-support/spine/Event.h b/cocos/editor-support/spine/Event.h index 147457fe4f..dabdd24a0c 100644 --- a/cocos/editor-support/spine/Event.h +++ b/cocos/editor-support/spine/Event.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_EVENT_H_ diff --git a/cocos/editor-support/spine/EventData.c b/cocos/editor-support/spine/EventData.c new file mode 100644 index 0000000000..0567a95b9f --- /dev/null +++ b/cocos/editor-support/spine/EventData.c @@ -0,0 +1,44 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spEventData* spEventData_create (const char* name) { + spEventData* self = NEW(spEventData); + MALLOC_STR(self->name, name); + return self; +} + +void spEventData_dispose (spEventData* self) { + FREE(self->stringValue); + FREE(self->name); + FREE(self); +} diff --git a/cocos/editor-support/spine/EventData.cpp b/cocos/editor-support/spine/EventData.cpp deleted file mode 100644 index 85d3044107..0000000000 --- a/cocos/editor-support/spine/EventData.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -spEventData* spEventData_create (const char* name) { - spEventData* self = NEW(spEventData); - MALLOC_STR(self->name, name); - return self; -} - -void spEventData_dispose (spEventData* self) { - FREE(self->stringValue); - FREE(self->name); - FREE(self); -} diff --git a/cocos/editor-support/spine/EventData.h b/cocos/editor-support/spine/EventData.h index 3672de7b46..bbbb65462e 100644 --- a/cocos/editor-support/spine/EventData.h +++ b/cocos/editor-support/spine/EventData.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_EVENTDATA_H_ diff --git a/cocos/editor-support/spine/IkConstraint.c b/cocos/editor-support/spine/IkConstraint.c new file mode 100644 index 0000000000..d23ada807b --- /dev/null +++ b/cocos/editor-support/spine/IkConstraint.c @@ -0,0 +1,133 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const spSkeleton* skeleton) { + int i; + + spIkConstraint* self = NEW(spIkConstraint); + CONST_CAST(spIkConstraintData*, self->data) = data; + self->bendDirection = data->bendDirection; + self->mix = data->mix; + + self->bonesCount = self->data->bonesCount; + self->bones = MALLOC(spBone*, self->bonesCount); + for (i = 0; i < self->bonesCount; ++i) + self->bones[i] = spSkeleton_findBone(skeleton, self->data->bones[i]->name); + self->target = spSkeleton_findBone(skeleton, self->data->target->name); + + return self; +} + +void spIkConstraint_dispose (spIkConstraint* self) { + FREE(self->bones); + FREE(self); +} + +void spIkConstraint_apply (spIkConstraint* self) { + switch (self->bonesCount) { + case 1: + spIkConstraint_apply1(self->bones[0], self->target->worldX, self->target->worldY, self->mix); + break; + case 2: + spIkConstraint_apply2(self->bones[0], self->bones[1], self->target->worldX, self->target->worldY, self->bendDirection, + self->mix); + break; + } +} + +void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha) { + float parentRotation = (!bone->data->inheritRotation || !bone->parent) ? 0 : bone->parent->worldRotation; + float rotation = bone->rotation; + float rotationIK = ATAN2(targetY - bone->worldY, targetX - bone->worldX) * RAD_DEG - parentRotation; + bone->rotationIK = rotation + (rotationIK - rotation) * alpha; +} + +void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, float alpha) { + float positionX, positionY, childX, childY, offset, len1, len2, cosDenom, cos, childAngle, adjacent, opposite, parentAngle, rotation; + spBone* parentParent; + float childRotation = child->rotation, parentRotation = parent->rotation; + if (alpha == 0) { + child->rotationIK = childRotation; + parent->rotationIK = parentRotation; + return; + } + parentParent = parent->parent; + if (parentParent) { + spBone_worldToLocal(parentParent, targetX, targetY, &positionX, &positionY); + targetX = (positionX - parent->x) * parentParent->worldScaleX; + targetY = (positionY - parent->y) * parentParent->worldScaleY; + } else { + targetX -= parent->x; + targetY -= parent->y; + } + if (child->parent == parent) { + positionX = child->x; + positionY = child->y; + } else { + spBone_localToWorld(child->parent, child->x, child->y, &positionX, &positionY); + spBone_worldToLocal(parent, positionX, positionY, &positionX, &positionY); + } + childX = positionX * parent->worldScaleX; + childY = positionY * parent->worldScaleY; + offset = ATAN2(childY, childX); + len1 = SQRT(childX * childX + childY * childY); + len2 = child->data->length * child->worldScaleX; + /* Based on code by Ryan Juckett with permission: Copyright (c) 2008-2009 Ryan Juckett, http://www.ryanjuckett.com/ */ + cosDenom = 2 * len1 * len2; + if (cosDenom < 0.0001f) { + child->rotationIK = childRotation + (ATAN2(targetY, targetX) * RAD_DEG - parentRotation - childRotation) * alpha; + return; + } + cos = (targetX * targetX + targetY * targetY - len1 * len1 - len2 * len2) / cosDenom; + if (cos < -1) + cos = -1; + else if (cos > 1) /**/ + cos = 1; + childAngle = ACOS(cos) * bendDirection; + adjacent = len1 + len2 * cos; + opposite = len2 * SIN(childAngle); + parentAngle = ATAN2(targetY * adjacent - targetX * opposite, targetX * adjacent + targetY * opposite); + rotation = (parentAngle - offset) * RAD_DEG - parentRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) /**/ + rotation += 360; + parent->rotationIK = parentRotation + rotation * alpha; + rotation = (childAngle + offset) * RAD_DEG - childRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) /**/ + rotation += 360; + child->rotationIK = childRotation + (rotation + parent->worldRotation - child->parent->worldRotation) * alpha; +} diff --git a/cocos/editor-support/spine/IkConstraint.h b/cocos/editor-support/spine/IkConstraint.h new file mode 100644 index 0000000000..b5cd89b599 --- /dev/null +++ b/cocos/editor-support/spine/IkConstraint.h @@ -0,0 +1,73 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_IKCONSTRAINT_H_ +#define SPINE_IKCONSTRAINT_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct spSkeleton; + +typedef struct spIkConstraint spIkConstraint; +struct spIkConstraint { + spIkConstraintData* const data; + + int bonesCount; + spBone** bones; + + spBone* target; + int bendDirection; + float mix; +}; + +spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const struct spSkeleton* skeleton); +void spIkConstraint_dispose (spIkConstraint* self); + +void spIkConstraint_apply (spIkConstraint* self); + +void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha); +void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, float alpha); + +#ifdef SPINE_SHORT_NAMES +typedef spIkConstraint IkConstraint; +#define IkConstraint_create(...) spIkConstraint_create(__VA_ARGS__) +#define IkConstraint_dispose(...) spIkConstraint_dispose(__VA_ARGS__) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* SPINE_IKCONSTRAINT_H_ */ diff --git a/cocos/editor-support/spine/IkConstraintData.c b/cocos/editor-support/spine/IkConstraintData.c new file mode 100644 index 0000000000..f25b6eb30b --- /dev/null +++ b/cocos/editor-support/spine/IkConstraintData.c @@ -0,0 +1,46 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spIkConstraintData* spIkConstraintData_create (const char* name) { + spIkConstraintData* self = NEW(spIkConstraintData); + MALLOC_STR(self->name, name); + self->bendDirection = 1; + self->mix = 1; + return self; +} + +void spIkConstraintData_dispose (spIkConstraintData* self) { + FREE(self->name); + FREE(self->bones); + FREE(self); +} diff --git a/cocos/editor-support/spine/IkConstraintData.h b/cocos/editor-support/spine/IkConstraintData.h new file mode 100644 index 0000000000..7cacd369dc --- /dev/null +++ b/cocos/editor-support/spine/IkConstraintData.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_IKCONSTRAINTDATA_H_ +#define SPINE_IKCONSTRAINTDATA_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct spIkConstraintData spIkConstraintData; +struct spIkConstraintData { + const char* const name; + + int bonesCount; + spBoneData** bones; + + spBoneData* target; + int bendDirection; + float mix; +}; + +spIkConstraintData* spIkConstraintData_create (const char* name); +void spIkConstraintData_dispose (spIkConstraintData* self); + +#ifdef SPINE_SHORT_NAMES +typedef spIkConstraintData IkConstraintData; +#define IkConstraintData_create(...) spIkConstraintData_create(__VA_ARGS__) +#define IkConstraintData_dispose(...) spIkConstraintData_dispose(__VA_ARGS__) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* SPINE_IKCONSTRAINTDATA_H_ */ diff --git a/cocos/editor-support/spine/Json.cpp b/cocos/editor-support/spine/Json.c similarity index 65% rename from cocos/editor-support/spine/Json.cpp rename to cocos/editor-support/spine/Json.c index 941d807d66..6225ff00cc 100644 --- a/cocos/editor-support/spine/Json.cpp +++ b/cocos/editor-support/spine/Json.c @@ -1,5 +1,6 @@ /* - Copyright (c) 2009 Dave Gamble + Copyright (c) 2009, Dave Gamble + Copyright (c) 2013, Esoteric Software Permission is hereby granted, dispose of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,11 +24,28 @@ /* Json */ /* JSON parser in C. */ +#ifndef _DEFAULT_SOURCE +/* Bring strings.h definitions into string.h, where appropriate */ +#define _DEFAULT_SOURCE +#endif + +#ifndef _BSD_SOURCE +/* Bring strings.h definitions into string.h, where appropriate */ +#define _BSD_SOURCE +#endif + #include "Json.h" #include #include +#include /* strtod (C89), strtof (C99) */ +#include /* strcasecmp (4.4BSD - compatibility), _stricmp (_WIN32) */ #include +#ifndef SPINE_JSON_DEBUG +/* Define this to do extra NULL and expected-character checking */ +#define SPINE_JSON_DEBUG 0 +#endif + static const char* ep; const char* Json_getError (void) { @@ -35,11 +53,23 @@ const char* Json_getError (void) { } static int Json_strcasecmp (const char* s1, const char* s2) { - if (!s1) return (s1 == s2) ? 0 : 1; - if (!s2) return 1; - for (; tolower(*s1) == tolower(*s2); ++s1, ++s2) - if (*s1 == 0) return 0; - return tolower(*(const unsigned char*)s1) - tolower(*(const unsigned char*)s2); + /* TODO we may be able to elide these NULL checks if we can prove + * the graph and input (only callsite is Json_getItem) should not have NULLs + */ + if (s1 && s2) { +#if defined(_WIN32) + return _stricmp(s1, s2); +#else + return strcasecmp( s1, s2 ); +#endif + } else { + if (s1 < s2) + return -1; /* s1 is null, s2 is not */ + else if (s1 == s2) + return 0; /* both are null */ + else + return 1; /* s2 is nul s1 is not */ + } } /* Internal constructor. */ @@ -62,37 +92,34 @@ void Json_dispose (Json *c) { /* Parse the input text to generate a number, and populate the result into item. */ static const char* parse_number (Json *item, const char* num) { - float n = 0, sign = 1, scale = 0; - int subscale = 0, signsubscale = 1; + char * endptr; + float n; - /* Could use sscanf for this? */ - if (*num == '-') sign = -1, num++; /* Has sign? */ - if (*num == '0') num++; /* is zero */ - if (*num >= '1' && *num <= '9') do - n = (n * 10.0f) + (*num++ - '0'); - while (*num >= '0' && *num <= '9'); /* Number? */ - if (*num == '.' && num[1] >= '0' && num[1] <= '9') { - num++; - do - n = (n * 10.0f) + (*num++ - '0'), scale--; - while (*num >= '0' && *num <= '9'); - } /* Fractional part? */ - if (*num == 'e' || *num == 'E') /* Exponent? */ - { - num++; - if (*num == '+') - num++; - else if (*num == '-') signsubscale = -1, num++; /* With sign? */ - while (*num >= '0' && *num <= '9') - subscale = (subscale * 10) + (*num++ - '0'); /* Number? */ + /* Using strtod and strtof is slightly more permissive than RFC4627, + * accepting for example hex-encoded floating point, but either + * is often leagues faster than any manual implementation. + * + * We also already know that this starts with [-0-9] from parse_value. + */ +#if __STDC_VERSION__ >= 199901L + n = strtof(num, &endptr); +#else + n = (float)strtod( num, &endptr ); +#endif + /* ignore errno's ERANGE, which returns +/-HUGE_VAL */ + /* n is 0 on any other error */ + + if (endptr != num) { + /* Parse success, number found. */ + item->valueFloat = n; + item->valueInt = (int)n; + item->type = Json_Number; + return endptr; + } else { + /* Parse failure, ep is set. */ + ep = num; + return 0; } - - n = sign * n * (float)pow(10.0f, (scale + subscale * signsubscale)); /* number = +/- number.fraction * 10^+/- exponent */ - - item->valueFloat = n; - item->valueInt = (int)n; - item->type = Json_Number; - return num; } /* Parse the input text into an unescaped cstring, and populate item. */ @@ -103,7 +130,7 @@ static const char* parse_string (Json *item, const char* str) { char* out; int len = 0; unsigned uc, uc2; - if (*str != '\"') { + if (*str != '\"') { /* TODO: don't need this check when called from parse_value, but do need from parse_object */ ep = str; return 0; } /* not a string! */ @@ -111,7 +138,7 @@ static const char* parse_string (Json *item, const char* str) { while (*ptr != '\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++; /* Skip escaped quotes. */ - out = (char*)malloc(len + 1); /* This is how long we need for the string, roughly. */ + out = MALLOC(char, len + 1); /* The length needed for the string, roughly. */ if (!out) return 0; ptr = str + 1; @@ -143,6 +170,7 @@ static const char* parse_string (Json *item, const char* str) { if ((uc >= 0xDC00 && uc <= 0xDFFF) || uc == 0) break; /* check for invalid. */ + /* TODO provide an option to ignore surrogates, use unicode replacement character? */ if (uc >= 0xD800 && uc <= 0xDBFF) /* UTF16 surrogate pairs. */ { if (ptr[1] != '\\' || ptr[2] != 'u') break; /* missing second-half of surrogate. */ @@ -164,12 +192,15 @@ static const char* parse_string (Json *item, const char* str) { case 4: *--ptr2 = ((uc | 0x80) & 0xBF); uc >>= 6; + /* fallthrough */ case 3: *--ptr2 = ((uc | 0x80) & 0xBF); uc >>= 6; + /* fallthrough */ case 2: *--ptr2 = ((uc | 0x80) & 0xBF); uc >>= 6; + /* fallthrough */ case 1: *--ptr2 = (uc | firstByteMark[len]); } @@ -183,7 +214,7 @@ static const char* parse_string (Json *item, const char* str) { } } *ptr2 = 0; - if (*ptr == '\"') ptr++; + if (*ptr == '\"') ptr++; /* TODO error handling if not \" or \0 ? */ item->valueString = out; item->type = Json_String; return ptr; @@ -196,20 +227,22 @@ static const char* parse_object (Json *item, const char* value); /* Utility to jump whitespace and cr/lf */ static const char* skip (const char* in) { - while (in && *in && (unsigned char)*in <= 32) + if (!in) return 0; /* must propagate NULL since it's often called in skip(f(...)) form */ + while (*in && (unsigned char)*in <= 32) in++; return in; } /* Parse an object - create a new root, and populate. */ Json *Json_create (const char* value) { - const char* end = 0; - Json *c = Json_new(); + Json *c; ep = 0; + if (!value) return 0; /* only place we check for NULL other than skip() */ + c = Json_new(); if (!c) return 0; /* memory fail */ - end = parse_value(c, skip(value)); - if (!end) { + value = parse_value(c, skip(value)); + if (!value) { Json_dispose(c); return 0; } /* parse failure. ep is set. */ @@ -219,31 +252,56 @@ Json *Json_create (const char* value) { /* Parser core - when encountering text, process appropriately. */ static const char* parse_value (Json *item, const char* value) { + /* Referenced by Json_create(), parse_array(), and parse_object(). */ + /* Always called with the result of skip(). */ +#if SPINE_JSON_DEBUG /* Checked at entry to graph, Json_create, and after every parse_ call. */ if (!value) return 0; /* Fail on null. */ - if (!strncmp(value, "null", 4)) { - item->type = Json_NULL; - return value + 4; +#endif + + switch (*value) { + case 'n': { + if (!strncmp(value + 1, "ull", 3)) { + item->type = Json_NULL; + return value + 4; + } + break; } - if (!strncmp(value, "false", 5)) { - item->type = Json_False; - return value + 5; + case 'f': { + if (!strncmp(value + 1, "alse", 4)) { + item->type = Json_False; + /* calloc prevents us needing item->type = Json_False or valueInt = 0 here */ + return value + 5; + } + break; } - if (!strncmp(value, "true", 4)) { - item->type = Json_True; - item->valueInt = 1; - return value + 4; + case 't': { + if (!strncmp(value + 1, "rue", 3)) { + item->type = Json_True; + item->valueInt = 1; + return value + 4; + } + break; } - if (*value == '\"') { + case '\"': return parse_string(item, value); - } - if (*value == '-' || (*value >= '0' && *value <= '9')) { - return parse_number(item, value); - } - if (*value == '[') { + case '[': return parse_array(item, value); - } - if (*value == '{') { + case '{': return parse_object(item, value); + case '-': /* fallthrough */ + case '0': /* fallthrough */ + case '1': /* fallthrough */ + case '2': /* fallthrough */ + case '3': /* fallthrough */ + case '4': /* fallthrough */ + case '5': /* fallthrough */ + case '6': /* fallthrough */ + case '7': /* fallthrough */ + case '8': /* fallthrough */ + case '9': + return parse_number(item, value); + default: + break; } ep = value; @@ -253,10 +311,13 @@ static const char* parse_value (Json *item, const char* value) { /* Build an array from input text. */ static const char* parse_array (Json *item, const char* value) { Json *child; + +#if SPINE_JSON_DEBUG /* unnecessary, only callsite (parse_value) verifies this */ if (*value != '[') { ep = value; return 0; } /* not an array! */ +#endif item->type = Json_Array; value = skip(value + 1); @@ -269,13 +330,15 @@ static const char* parse_array (Json *item, const char* value) { item->size = 1; while (*value == ',') { - Json *new_item; - if (!(new_item = Json_new())) return 0; /* memory fail */ + Json *new_item = Json_new(); + if (!new_item) return 0; /* memory fail */ child->next = new_item; +#if SPINE_JSON_HAVE_PREV new_item->prev = child; +#endif child = new_item; value = skip(parse_value(child, skip(value + 1))); - if (!value) return 0; /* memory fail */ + if (!value) return 0; /* parse fail */ item->size++; } @@ -287,10 +350,13 @@ static const char* parse_array (Json *item, const char* value) { /* Build an object from the text. */ static const char* parse_object (Json *item, const char* value) { Json *child; + +#if SPINE_JSON_DEBUG /* unnecessary, only callsite (parse_value) verifies this */ if (*value != '{') { ep = value; return 0; } /* not an object! */ +#endif item->type = Json_Object; value = skip(value + 1); @@ -311,10 +377,12 @@ static const char* parse_object (Json *item, const char* value) { item->size = 1; while (*value == ',') { - Json *new_item; - if (!(new_item = Json_new())) return 0; /* memory fail */ + Json *new_item = Json_new(); + if (!new_item) return 0; /* memory fail */ child->next = new_item; +#if SPINE_JSON_HAVE_PREV new_item->prev = child; +#endif child = new_item; value = skip(parse_string(child, skip(value + 1))); if (!value) return 0; diff --git a/cocos/editor-support/spine/Json.h b/cocos/editor-support/spine/Json.h index bc11a81ac0..078a5a7158 100644 --- a/cocos/editor-support/spine/Json.h +++ b/cocos/editor-support/spine/Json.h @@ -38,10 +38,17 @@ extern "C" { #define Json_Array 5 #define Json_Object 6 +#ifndef SPINE_JSON_HAVE_PREV +/* Spine doesn't use the "prev" link in the Json sibling lists. */ +#define SPINE_JSON_HAVE_PREV 0 +#endif + /* The Json structure: */ typedef struct Json { struct Json* next; +#if SPINE_JSON_HAVE_PREV struct Json* prev; /* next/prev allow you to walk array/object chains. Alternatively, use getSize/getItem */ +#endif struct Json* child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ int type; /* The type of the item, as above. */ diff --git a/cocos/editor-support/spine/MeshAttachment.c b/cocos/editor-support/spine/MeshAttachment.c new file mode 100644 index 0000000000..0ca41fbc06 --- /dev/null +++ b/cocos/editor-support/spine/MeshAttachment.c @@ -0,0 +1,85 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +void _spMeshAttachment_dispose (spAttachment* attachment) { + spMeshAttachment* self = SUB_CAST(spMeshAttachment, attachment); + _spAttachment_deinit(attachment); + FREE(self->path); + FREE(self->vertices); + FREE(self->regionUVs); + FREE(self->uvs); + FREE(self->triangles); + FREE(self->edges); + FREE(self); +} + +spMeshAttachment* spMeshAttachment_create (const char* name) { + spMeshAttachment* self = NEW(spMeshAttachment); + self->r = 1; + self->g = 1; + self->b = 1; + self->a = 1; + _spAttachment_init(SUPER(self), name, SP_ATTACHMENT_MESH, _spMeshAttachment_dispose); + return self; +} + +void spMeshAttachment_updateUVs (spMeshAttachment* self) { + int i; + float width = self->regionU2 - self->regionU, height = self->regionV2 - self->regionV; + FREE(self->uvs); + self->uvs = MALLOC(float, self->verticesCount); + if (self->regionRotate) { + for (i = 0; i < self->verticesCount; i += 2) { + self->uvs[i] = self->regionU + self->regionUVs[i + 1] * width; + self->uvs[i + 1] = self->regionV + height - self->regionUVs[i] * height; + } + } else { + for (i = 0; i < self->verticesCount; i += 2) { + self->uvs[i] = self->regionU + self->regionUVs[i] * width; + self->uvs[i + 1] = self->regionV + self->regionUVs[i + 1] * height; + } + } +} + +void spMeshAttachment_computeWorldVertices (spMeshAttachment* self, spSlot* slot, float* worldVertices) { + int i; + float* vertices = self->vertices; + const spBone* bone = slot->bone; + float x = bone->skeleton->x + bone->worldX, y = bone->skeleton->y + bone->worldY; + if (slot->attachmentVerticesCount == self->verticesCount) vertices = slot->attachmentVertices; + for (i = 0; i < self->verticesCount; i += 2) { + const float vx = vertices[i], vy = vertices[i + 1]; + worldVertices[i] = vx * bone->m00 + vy * bone->m01 + x; + worldVertices[i + 1] = vx * bone->m10 + vy * bone->m11 + y; + } +} diff --git a/cocos/editor-support/spine/MeshAttachment.h b/cocos/editor-support/spine/MeshAttachment.h new file mode 100644 index 0000000000..5948d84ae5 --- /dev/null +++ b/cocos/editor-support/spine/MeshAttachment.h @@ -0,0 +1,87 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_MESHATTACHMENT_H_ +#define SPINE_MESHATTACHMENT_H_ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct spMeshAttachment spMeshAttachment; +struct spMeshAttachment { + spAttachment super; + const char* path; + + int verticesCount; + float* vertices; + int hullLength; + + float* regionUVs; + float* uvs; + + int trianglesCount; + int* triangles; + + float r, g, b, a; + + void* rendererObject; + int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ + int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */ + int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */ + float regionU, regionV, regionU2, regionV2; + int/*bool*/regionRotate; + + /* Nonessential. */ + int edgesCount; + int* edges; + float width, height; +}; + +spMeshAttachment* spMeshAttachment_create (const char* name); +void spMeshAttachment_updateUVs (spMeshAttachment* self); +void spMeshAttachment_computeWorldVertices (spMeshAttachment* self, spSlot* slot, float* worldVertices); + +#ifdef SPINE_SHORT_NAMES +typedef spMeshAttachment MeshAttachment; +#define MeshAttachment_create(...) spMeshAttachment_create(__VA_ARGS__) +#define MeshAttachment_updateUVs(...) spMeshAttachment_updateUVs(__VA_ARGS__) +#define MeshAttachment_computeWorldVertices(...) spMeshAttachment_computeWorldVertices(__VA_ARGS__) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* SPINE_MESHATTACHMENT_H_ */ diff --git a/cocos/editor-support/spine/PolygonBatch.cpp b/cocos/editor-support/spine/PolygonBatch.cpp new file mode 100644 index 0000000000..26e35a77d4 --- /dev/null +++ b/cocos/editor-support/spine/PolygonBatch.cpp @@ -0,0 +1,115 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +USING_NS_CC; + +namespace spine { + +PolygonBatch* PolygonBatch::createWithCapacity (ssize_t capacity) { + PolygonBatch* batch = new PolygonBatch(); + batch->initWithCapacity(capacity); + batch->autorelease(); + return batch; +} + +PolygonBatch::PolygonBatch () : + _capacity(0), + _vertices(nullptr), _verticesCount(0), + _triangles(nullptr), _trianglesCount(0), + _texture(nullptr) +{} + +bool PolygonBatch::initWithCapacity (ssize_t capacity) { + // 32767 is max index, so 32767 / 3 - (32767 / 3 % 3) = 10920. + CCASSERT(capacity <= 10920, "capacity cannot be > 10920"); + CCASSERT(capacity >= 0, "capacity cannot be < 0"); + _capacity = capacity; + _vertices = MALLOC(V2F_C4B_T2F, capacity); + _triangles = MALLOC(GLushort, capacity * 3); + return true; +} + +PolygonBatch::~PolygonBatch () { + FREE(_vertices); + FREE(_triangles); +} + +void PolygonBatch::add (const Texture2D* addTexture, + const float* addVertices, const float* uvs, int addVerticesCount, + const int* addTriangles, int addTrianglesCount, + Color4B* color) { + + if ( + addTexture != _texture + || _verticesCount + (addVerticesCount >> 1) > _capacity + || _trianglesCount + addTrianglesCount > _capacity * 3) { + this->flush(); + _texture = addTexture; + } + + for (int i = 0; i < addTrianglesCount; ++i, ++_trianglesCount) + _triangles[_trianglesCount] = addTriangles[i] + _verticesCount; + + for (int i = 0; i < addVerticesCount; i += 2, ++_verticesCount) { + V2F_C4B_T2F* vertex = _vertices + _verticesCount; + vertex->vertices.x = addVertices[i]; + vertex->vertices.y = addVertices[i + 1]; + vertex->colors = *color; + vertex->texCoords.u = uvs[i]; + vertex->texCoords.v = uvs[i + 1]; + } +} + +void PolygonBatch::flush () { + if (!_verticesCount) return; + + GL::bindTexture2D(_texture->getName()); + GL::bindVAO(0); + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), &_vertices[0].vertices); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), &_vertices[0].colors); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORDS, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), &_vertices[0].texCoords); + + glDrawElements(GL_TRIANGLES, _trianglesCount, GL_UNSIGNED_SHORT, _triangles); + + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _verticesCount); + + _verticesCount = 0; + _trianglesCount = 0; + + CHECK_GL_ERROR_DEBUG(); +} + +} diff --git a/cocos/editor-support/spine/PolygonBatch.h b/cocos/editor-support/spine/PolygonBatch.h new file mode 100644 index 0000000000..78bd22f236 --- /dev/null +++ b/cocos/editor-support/spine/PolygonBatch.h @@ -0,0 +1,63 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_POLYGONBATCH_H_ +#define SPINE_POLYGONBATCH_H_ + +#include "cocos2d.h" + +namespace spine { + +class PolygonBatch : public cocos2d::Ref { +public: + static PolygonBatch* createWithCapacity (ssize_t capacity); + + void add (const cocos2d::Texture2D* texture, + const float* vertices, const float* uvs, int verticesCount, + const int* triangles, int trianglesCount, + cocos2d::Color4B* color); + void flush (); + +protected: + PolygonBatch(); + virtual ~PolygonBatch(); + bool initWithCapacity (ssize_t capacity); + + ssize_t _capacity; + cocos2d::V2F_C4B_T2F* _vertices; + int _verticesCount; + GLushort* _triangles; + int _trianglesCount; + const cocos2d::Texture2D* _texture; +}; + +} + +#endif // SPINE_POLYGONBATCH_H_ diff --git a/cocos/editor-support/spine/RegionAttachment.c b/cocos/editor-support/spine/RegionAttachment.c new file mode 100644 index 0000000000..6b1030518a --- /dev/null +++ b/cocos/editor-support/spine/RegionAttachment.c @@ -0,0 +1,113 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +void _spRegionAttachment_dispose (spAttachment* attachment) { + spRegionAttachment* self = SUB_CAST(spRegionAttachment, attachment); + _spAttachment_deinit(attachment); + FREE(self->path); + FREE(self); +} + +spRegionAttachment* spRegionAttachment_create (const char* name) { + spRegionAttachment* self = NEW(spRegionAttachment); + self->scaleX = 1; + self->scaleY = 1; + self->r = 1; + self->g = 1; + self->b = 1; + self->a = 1; + _spAttachment_init(SUPER(self), name, SP_ATTACHMENT_REGION, _spRegionAttachment_dispose); + return self; +} + +void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate) { + if (rotate) { + self->uvs[SP_VERTEX_X2] = u; + self->uvs[SP_VERTEX_Y2] = v2; + self->uvs[SP_VERTEX_X3] = u; + self->uvs[SP_VERTEX_Y3] = v; + self->uvs[SP_VERTEX_X4] = u2; + self->uvs[SP_VERTEX_Y4] = v; + self->uvs[SP_VERTEX_X1] = u2; + self->uvs[SP_VERTEX_Y1] = v2; + } else { + self->uvs[SP_VERTEX_X1] = u; + self->uvs[SP_VERTEX_Y1] = v2; + self->uvs[SP_VERTEX_X2] = u; + self->uvs[SP_VERTEX_Y2] = v; + self->uvs[SP_VERTEX_X3] = u2; + self->uvs[SP_VERTEX_Y3] = v; + self->uvs[SP_VERTEX_X4] = u2; + self->uvs[SP_VERTEX_Y4] = v2; + } +} + +void spRegionAttachment_updateOffset (spRegionAttachment* self) { + float regionScaleX = self->width / self->regionOriginalWidth * self->scaleX; + float regionScaleY = self->height / self->regionOriginalHeight * self->scaleY; + float localX = -self->width / 2 * self->scaleX + self->regionOffsetX * regionScaleX; + float localY = -self->height / 2 * self->scaleY + self->regionOffsetY * regionScaleY; + float localX2 = localX + self->regionWidth * regionScaleX; + float localY2 = localY + self->regionHeight * regionScaleY; + float radians = self->rotation * DEG_RAD; + float cosine = COS(radians), sine = SIN(radians); + float localXCos = localX * cosine + self->x; + float localXSin = localX * sine; + float localYCos = localY * cosine + self->y; + float localYSin = localY * sine; + float localX2Cos = localX2 * cosine + self->x; + float localX2Sin = localX2 * sine; + float localY2Cos = localY2 * cosine + self->y; + float localY2Sin = localY2 * sine; + self->offset[SP_VERTEX_X1] = localXCos - localYSin; + self->offset[SP_VERTEX_Y1] = localYCos + localXSin; + self->offset[SP_VERTEX_X2] = localXCos - localY2Sin; + self->offset[SP_VERTEX_Y2] = localY2Cos + localXSin; + self->offset[SP_VERTEX_X3] = localX2Cos - localY2Sin; + self->offset[SP_VERTEX_Y3] = localY2Cos + localX2Sin; + self->offset[SP_VERTEX_X4] = localX2Cos - localYSin; + self->offset[SP_VERTEX_Y4] = localYCos + localX2Sin; +} + +void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, spBone* bone, float* vertices) { + const float* offset = self->offset; + float x = bone->skeleton->x + bone->worldX, y = bone->skeleton->y + bone->worldY; + vertices[SP_VERTEX_X1] = offset[SP_VERTEX_X1] * bone->m00 + offset[SP_VERTEX_Y1] * bone->m01 + x; + vertices[SP_VERTEX_Y1] = offset[SP_VERTEX_X1] * bone->m10 + offset[SP_VERTEX_Y1] * bone->m11 + y; + vertices[SP_VERTEX_X2] = offset[SP_VERTEX_X2] * bone->m00 + offset[SP_VERTEX_Y2] * bone->m01 + x; + vertices[SP_VERTEX_Y2] = offset[SP_VERTEX_X2] * bone->m10 + offset[SP_VERTEX_Y2] * bone->m11 + y; + vertices[SP_VERTEX_X3] = offset[SP_VERTEX_X3] * bone->m00 + offset[SP_VERTEX_Y3] * bone->m01 + x; + vertices[SP_VERTEX_Y3] = offset[SP_VERTEX_X3] * bone->m10 + offset[SP_VERTEX_Y3] * bone->m11 + y; + vertices[SP_VERTEX_X4] = offset[SP_VERTEX_X4] * bone->m00 + offset[SP_VERTEX_Y4] * bone->m01 + x; + vertices[SP_VERTEX_Y4] = offset[SP_VERTEX_X4] * bone->m10 + offset[SP_VERTEX_Y4] * bone->m11 + y; +} diff --git a/cocos/editor-support/spine/RegionAttachment.cpp b/cocos/editor-support/spine/RegionAttachment.cpp deleted file mode 100644 index d3b283f2f6..0000000000 --- a/cocos/editor-support/spine/RegionAttachment.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -void _spRegionAttachment_dispose (spAttachment* attachment) { - spRegionAttachment* self = SUB_CAST(spRegionAttachment, attachment); - - _spAttachment_deinit(attachment); - - FREE(self); -} - -spRegionAttachment* spRegionAttachment_create (const char* name) { - spRegionAttachment* self = NEW(spRegionAttachment); - self->scaleX = 1; - self->scaleY = 1; - _spAttachment_init(SUPER(self), name, ATTACHMENT_REGION, _spRegionAttachment_dispose); - return self; -} - -void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate) { - if (rotate) { - self->uvs[VERTEX_X2] = u; - self->uvs[VERTEX_Y2] = v2; - self->uvs[VERTEX_X3] = u; - self->uvs[VERTEX_Y3] = v; - self->uvs[VERTEX_X4] = u2; - self->uvs[VERTEX_Y4] = v; - self->uvs[VERTEX_X1] = u2; - self->uvs[VERTEX_Y1] = v2; - } else { - self->uvs[VERTEX_X1] = u; - self->uvs[VERTEX_Y1] = v2; - self->uvs[VERTEX_X2] = u; - self->uvs[VERTEX_Y2] = v; - self->uvs[VERTEX_X3] = u2; - self->uvs[VERTEX_Y3] = v; - self->uvs[VERTEX_X4] = u2; - self->uvs[VERTEX_Y4] = v2; - } -} - -void spRegionAttachment_updateOffset (spRegionAttachment* self) { - float regionScaleX = self->width / self->regionOriginalWidth * self->scaleX; - float regionScaleY = self->height / self->regionOriginalHeight * self->scaleY; - float localX = -self->width / 2 * self->scaleX + self->regionOffsetX * regionScaleX; - float localY = -self->height / 2 * self->scaleY + self->regionOffsetY * regionScaleY; - float localX2 = localX + self->regionWidth * regionScaleX; - float localY2 = localY + self->regionHeight * regionScaleY; - float radians = (float)(self->rotation * 3.1415926535897932385 / 180); -#ifdef __STDC_VERSION__ - float cosine = cosf(radians); - float sine = sinf(radians); -#else - float cosine = (float)cos(radians); - float sine = (float)sin(radians); -#endif - float localXCos = localX * cosine + self->x; - float localXSin = localX * sine; - float localYCos = localY * cosine + self->y; - float localYSin = localY * sine; - float localX2Cos = localX2 * cosine + self->x; - float localX2Sin = localX2 * sine; - float localY2Cos = localY2 * cosine + self->y; - float localY2Sin = localY2 * sine; - self->offset[VERTEX_X1] = localXCos - localYSin; - self->offset[VERTEX_Y1] = localYCos + localXSin; - self->offset[VERTEX_X2] = localXCos - localY2Sin; - self->offset[VERTEX_Y2] = localY2Cos + localXSin; - self->offset[VERTEX_X3] = localX2Cos - localY2Sin; - self->offset[VERTEX_Y3] = localY2Cos + localX2Sin; - self->offset[VERTEX_X4] = localX2Cos - localYSin; - self->offset[VERTEX_Y4] = localYCos + localX2Sin; -} - -void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, float x, float y, spBone* bone, float* vertices) { - float* offset = self->offset; - x += bone->worldX; - y += bone->worldY; - vertices[VERTEX_X1] = offset[VERTEX_X1] * bone->m00 + offset[VERTEX_Y1] * bone->m01 + x; - vertices[VERTEX_Y1] = offset[VERTEX_X1] * bone->m10 + offset[VERTEX_Y1] * bone->m11 + y; - vertices[VERTEX_X2] = offset[VERTEX_X2] * bone->m00 + offset[VERTEX_Y2] * bone->m01 + x; - vertices[VERTEX_Y2] = offset[VERTEX_X2] * bone->m10 + offset[VERTEX_Y2] * bone->m11 + y; - vertices[VERTEX_X3] = offset[VERTEX_X3] * bone->m00 + offset[VERTEX_Y3] * bone->m01 + x; - vertices[VERTEX_Y3] = offset[VERTEX_X3] * bone->m10 + offset[VERTEX_Y3] * bone->m11 + y; - vertices[VERTEX_X4] = offset[VERTEX_X4] * bone->m00 + offset[VERTEX_Y4] * bone->m01 + x; - vertices[VERTEX_Y4] = offset[VERTEX_X4] * bone->m10 + offset[VERTEX_Y4] * bone->m11 + y; -} diff --git a/cocos/editor-support/spine/RegionAttachment.h b/cocos/editor-support/spine/RegionAttachment.h index 6f1e96b3de..22def94862 100644 --- a/cocos/editor-support/spine/RegionAttachment.h +++ b/cocos/editor-support/spine/RegionAttachment.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_REGIONATTACHMENT_H_ @@ -43,13 +40,15 @@ extern "C" { #endif typedef enum { - VERTEX_X1 = 0, VERTEX_Y1, VERTEX_X2, VERTEX_Y2, VERTEX_X3, VERTEX_Y3, VERTEX_X4, VERTEX_Y4 + SP_VERTEX_X1 = 0, SP_VERTEX_Y1, SP_VERTEX_X2, SP_VERTEX_Y2, SP_VERTEX_X3, SP_VERTEX_Y3, SP_VERTEX_X4, SP_VERTEX_Y4 } spVertexIndex; typedef struct spRegionAttachment spRegionAttachment; struct spRegionAttachment { spAttachment super; + const char* path; float x, y, scaleX, scaleY, rotation, width, height; + float r, g, b, a; void* rendererObject; int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ @@ -63,10 +62,18 @@ struct spRegionAttachment { spRegionAttachment* spRegionAttachment_create (const char* name); void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate); void spRegionAttachment_updateOffset (spRegionAttachment* self); -void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, float x, float y, spBone* bone, float* vertices); +void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, spBone* bone, float* vertices); #ifdef SPINE_SHORT_NAMES typedef spVertexIndex VertexIndex; +#define VERTEX_X1 SP_VERTEX_X1 +#define VERTEX_Y1 SP_VERTEX_Y1 +#define VERTEX_X2 SP_VERTEX_X2 +#define VERTEX_Y2 SP_VERTEX_Y2 +#define VERTEX_X3 SP_VERTEX_X3 +#define VERTEX_Y3 SP_VERTEX_Y3 +#define VERTEX_X4 SP_VERTEX_X4 +#define VERTEX_Y4 SP_VERTEX_Y4 typedef spRegionAttachment RegionAttachment; #define RegionAttachment_create(...) spRegionAttachment_create(__VA_ARGS__) #define RegionAttachment_setUVs(...) spRegionAttachment_setUVs(__VA_ARGS__) diff --git a/cocos/editor-support/spine/Skeleton.c b/cocos/editor-support/spine/Skeleton.c new file mode 100644 index 0000000000..d8835db72f --- /dev/null +++ b/cocos/editor-support/spine/Skeleton.c @@ -0,0 +1,341 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +typedef struct { + spSkeleton super; + + int boneCacheCount; + int* boneCacheCounts; + spBone*** boneCache; +} _spSkeleton; + +spSkeleton* spSkeleton_create (spSkeletonData* data) { + int i, ii; + + _spSkeleton* internal = NEW(_spSkeleton); + spSkeleton* self = SUPER(internal); + CONST_CAST(spSkeletonData*, self->data) = data; + + self->bonesCount = self->data->bonesCount; + self->bones = MALLOC(spBone*, self->bonesCount); + + for (i = 0; i < self->bonesCount; ++i) { + spBoneData* boneData = self->data->bones[i]; + spBone* parent = 0; + if (boneData->parent) { + /* Find parent bone. */ + for (ii = 0; ii < self->bonesCount; ++ii) { + if (data->bones[ii] == boneData->parent) { + parent = self->bones[ii]; + break; + } + } + } + self->bones[i] = spBone_create(boneData, self, parent); + } + CONST_CAST(spBone*, self->root) = self->bones[0]; + + self->slotsCount = data->slotsCount; + self->slots = MALLOC(spSlot*, self->slotsCount); + for (i = 0; i < self->slotsCount; ++i) { + spSlotData *slotData = data->slots[i]; + + /* Find bone for the slotData's boneData. */ + spBone* bone = 0; + for (ii = 0; ii < self->bonesCount; ++ii) { + if (data->bones[ii] == slotData->boneData) { + bone = self->bones[ii]; + break; + } + } + self->slots[i] = spSlot_create(slotData, bone); + } + + self->drawOrder = MALLOC(spSlot*, self->slotsCount); + memcpy(self->drawOrder, self->slots, sizeof(spSlot*) * self->slotsCount); + + self->r = 1; + self->g = 1; + self->b = 1; + self->a = 1; + + self->ikConstraintsCount = data->ikConstraintsCount; + self->ikConstraints = MALLOC(spIkConstraint*, self->ikConstraintsCount); + for (i = 0; i < self->data->ikConstraintsCount; ++i) + self->ikConstraints[i] = spIkConstraint_create(self->data->ikConstraints[i], self); + + spSkeleton_updateCache(self); + + return self; +} + +void spSkeleton_dispose (spSkeleton* self) { + int i; + _spSkeleton* internal = SUB_CAST(_spSkeleton, self); + + for (i = 0; i < internal->boneCacheCount; ++i) + FREE(internal->boneCache[i]); + FREE(internal->boneCache); + FREE(internal->boneCacheCounts); + + for (i = 0; i < self->bonesCount; ++i) + spBone_dispose(self->bones[i]); + FREE(self->bones); + + for (i = 0; i < self->slotsCount; ++i) + spSlot_dispose(self->slots[i]); + FREE(self->slots); + + for (i = 0; i < self->ikConstraintsCount; ++i) + spIkConstraint_dispose(self->ikConstraints[i]); + FREE(self->ikConstraints); + + FREE(self->drawOrder); + FREE(self); +} + +void spSkeleton_updateCache (const spSkeleton* self) { + int i, ii; + _spSkeleton* internal = SUB_CAST(_spSkeleton, self); + + for (i = 0; i < internal->boneCacheCount; ++i) + FREE(internal->boneCache[i]); + FREE(internal->boneCache); + FREE(internal->boneCacheCounts); + + internal->boneCacheCount = self->ikConstraintsCount + 1; + internal->boneCache = MALLOC(spBone**, internal->boneCacheCount); + internal->boneCacheCounts = CALLOC(int, internal->boneCacheCount); + + /* Compute array sizes. */ + for (i = 0; i < self->bonesCount; ++i) { + spBone* current = self->bones[i]; + do { + for (ii = 0; ii < self->ikConstraintsCount; ++ii) { + spIkConstraint* ikConstraint = self->ikConstraints[ii]; + spBone* parent = ikConstraint->bones[0]; + spBone* child = ikConstraint->bones[ikConstraint->bonesCount - 1]; + while (1) { + if (current == child) { + internal->boneCacheCounts[ii]++; + internal->boneCacheCounts[ii + 1]++; + goto outer1; + } + if (child == parent) break; + child = child->parent; + } + } + current = current->parent; + } while (current); + internal->boneCacheCounts[0]++; + outer1: {} + } + + for (i = 0; i < internal->boneCacheCount; ++i) + internal->boneCache[i] = MALLOC(spBone*, internal->boneCacheCounts[i]); + memset(internal->boneCacheCounts, 0, internal->boneCacheCount * sizeof(int)); + + /* Populate arrays. */ + for (i = 0; i < self->bonesCount; ++i) { + spBone* bone = self->bones[i]; + spBone* current = bone; + do { + for (ii = 0; ii < self->ikConstraintsCount; ++ii) { + spIkConstraint* ikConstraint = self->ikConstraints[ii]; + spBone* parent = ikConstraint->bones[0]; + spBone* child = ikConstraint->bones[ikConstraint->bonesCount - 1]; + while (1) { + if (current == child) { + internal->boneCache[ii][internal->boneCacheCounts[ii]++] = bone; + internal->boneCache[ii + 1][internal->boneCacheCounts[ii + 1]++] = bone; + goto outer2; + } + if (child == parent) break; + child = child->parent; + } + } + current = current->parent; + } while (current); + internal->boneCache[0][internal->boneCacheCounts[0]++] = bone; + outer2: {} + } +} + +void spSkeleton_updateWorldTransform (const spSkeleton* self) { + int i, ii, nn, last; + _spSkeleton* internal = SUB_CAST(_spSkeleton, self); + + for (i = 0; i < self->bonesCount; ++i) + self->bones[i]->rotationIK = self->bones[i]->rotation; + + i = 0; + last = internal->boneCacheCount - 1; + while (1) { + for (ii = 0, nn = internal->boneCacheCounts[i]; ii < nn; ++ii) + spBone_updateWorldTransform(internal->boneCache[i][ii]); + if (i == last) break; + spIkConstraint_apply(self->ikConstraints[i]); + i++; + } +} + +void spSkeleton_setToSetupPose (const spSkeleton* self) { + spSkeleton_setBonesToSetupPose(self); + spSkeleton_setSlotsToSetupPose(self); +} + +void spSkeleton_setBonesToSetupPose (const spSkeleton* self) { + int i; + for (i = 0; i < self->bonesCount; ++i) + spBone_setToSetupPose(self->bones[i]); + + for (i = 0; i < self->ikConstraintsCount; ++i) { + spIkConstraint* ikConstraint = self->ikConstraints[i]; + ikConstraint->bendDirection = ikConstraint->data->bendDirection; + ikConstraint->mix = ikConstraint->data->mix; + } +} + +void spSkeleton_setSlotsToSetupPose (const spSkeleton* self) { + int i; + memcpy(self->drawOrder, self->slots, self->slotsCount * sizeof(spSlot*)); + for (i = 0; i < self->slotsCount; ++i) + spSlot_setToSetupPose(self->slots[i]); +} + +spBone* spSkeleton_findBone (const spSkeleton* self, const char* boneName) { + int i; + for (i = 0; i < self->bonesCount; ++i) + if (strcmp(self->data->bones[i]->name, boneName) == 0) return self->bones[i]; + return 0; +} + +int spSkeleton_findBoneIndex (const spSkeleton* self, const char* boneName) { + int i; + for (i = 0; i < self->bonesCount; ++i) + if (strcmp(self->data->bones[i]->name, boneName) == 0) return i; + return -1; +} + +spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName) { + int i; + for (i = 0; i < self->slotsCount; ++i) + if (strcmp(self->data->slots[i]->name, slotName) == 0) return self->slots[i]; + return 0; +} + +int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName) { + int i; + for (i = 0; i < self->slotsCount; ++i) + if (strcmp(self->data->slots[i]->name, slotName) == 0) return i; + return -1; +} + +int spSkeleton_setSkinByName (spSkeleton* self, const char* skinName) { + spSkin *skin; + if (!skinName) { + spSkeleton_setSkin(self, 0); + return 1; + } + skin = spSkeletonData_findSkin(self->data, skinName); + if (!skin) return 0; + spSkeleton_setSkin(self, skin); + return 1; +} + +void spSkeleton_setSkin (spSkeleton* self, spSkin* newSkin) { + if (newSkin) { + if (self->skin) + spSkin_attachAll(newSkin, self, self->skin); + else { + /* No previous skin, attach setup pose attachments. */ + int i; + for (i = 0; i < self->slotsCount; ++i) { + spSlot* slot = self->slots[i]; + if (slot->data->attachmentName) { + spAttachment* attachment = spSkin_getAttachment(newSkin, i, slot->data->attachmentName); + if (attachment) spSlot_setAttachment(slot, attachment); + } + } + } + } + CONST_CAST(spSkin*, self->skin) = newSkin; +} + +spAttachment* spSkeleton_getAttachmentForSlotName (const spSkeleton* self, const char* slotName, const char* attachmentName) { + int slotIndex = spSkeletonData_findSlotIndex(self->data, slotName); + return spSkeleton_getAttachmentForSlotIndex(self, slotIndex, attachmentName); +} + +spAttachment* spSkeleton_getAttachmentForSlotIndex (const spSkeleton* self, int slotIndex, const char* attachmentName) { + if (slotIndex == -1) return 0; + if (self->skin) { + spAttachment *attachment = spSkin_getAttachment(self->skin, slotIndex, attachmentName); + if (attachment) return attachment; + } + if (self->data->defaultSkin) { + spAttachment *attachment = spSkin_getAttachment(self->data->defaultSkin, slotIndex, attachmentName); + if (attachment) return attachment; + } + return 0; +} + +int spSkeleton_setAttachment (spSkeleton* self, const char* slotName, const char* attachmentName) { + int i; + for (i = 0; i < self->slotsCount; ++i) { + spSlot *slot = self->slots[i]; + if (strcmp(slot->data->name, slotName) == 0) { + if (!attachmentName) + spSlot_setAttachment(slot, 0); + else { + spAttachment* attachment = spSkeleton_getAttachmentForSlotIndex(self, i, attachmentName); + if (!attachment) return 0; + spSlot_setAttachment(slot, attachment); + } + return 1; + } + } + return 0; +} + +spIkConstraint* spSkeleton_findIkConstraint (const spSkeleton* self, const char* ikConstraintName) { + int i; + for (i = 0; i < self->ikConstraintsCount; ++i) + if (strcmp(self->ikConstraints[i]->data->name, ikConstraintName) == 0) return self->ikConstraints[i]; + return 0; +} + +void spSkeleton_update (spSkeleton* self, float deltaTime) { + self->time += deltaTime; +} diff --git a/cocos/editor-support/spine/Skeleton.cpp b/cocos/editor-support/spine/Skeleton.cpp deleted file mode 100644 index 9c6ea30758..0000000000 --- a/cocos/editor-support/spine/Skeleton.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -spSkeleton* spSkeleton_create (spSkeletonData* data) { - int i, ii; - - spSkeleton* self = NEW(spSkeleton); - CONST_CAST(spSkeletonData*, self->data) = data; - - self->boneCount = self->data->boneCount; - self->bones = MALLOC(spBone*, self->boneCount); - - for (i = 0; i < self->boneCount; ++i) { - spBoneData* boneData = self->data->bones[i]; - spBone* parent = 0; - if (boneData->parent) { - /* Find parent bone. */ - for (ii = 0; ii < self->boneCount; ++ii) { - if (data->bones[ii] == boneData->parent) { - parent = self->bones[ii]; - break; - } - } - } - self->bones[i] = spBone_create(boneData, parent); - } - CONST_CAST(spBone*, self->root) = self->bones[0]; - - self->slotCount = data->slotCount; - self->slots = MALLOC(spSlot*, self->slotCount); - for (i = 0; i < self->slotCount; ++i) { - spSlotData *slotData = data->slots[i]; - - /* Find bone for the slotData's boneData. */ - spBone* bone = 0; - for (ii = 0; ii < self->boneCount; ++ii) { - if (data->bones[ii] == slotData->boneData) { - bone = self->bones[ii]; - break; - } - } - self->slots[i] = spSlot_create(slotData, self, bone); - } - - self->drawOrder = MALLOC(spSlot*, self->slotCount); - memcpy(self->drawOrder, self->slots, sizeof(spSlot*) * self->slotCount); - - self->r = 1; - self->g = 1; - self->b = 1; - self->a = 1; - - return self; -} - -void spSkeleton_dispose (spSkeleton* self) { - int i; - for (i = 0; i < self->boneCount; ++i) - spBone_dispose(self->bones[i]); - FREE(self->bones); - - for (i = 0; i < self->slotCount; ++i) - spSlot_dispose(self->slots[i]); - FREE(self->slots); - - FREE(self->drawOrder); - FREE(self); -} - -void spSkeleton_updateWorldTransform (const spSkeleton* self) { - int i; - for (i = 0; i < self->boneCount; ++i) - spBone_updateWorldTransform(self->bones[i], self->flipX, self->flipY); -} - -void spSkeleton_setToSetupPose (const spSkeleton* self) { - spSkeleton_setBonesToSetupPose(self); - spSkeleton_setSlotsToSetupPose(self); -} - -void spSkeleton_setBonesToSetupPose (const spSkeleton* self) { - int i; - for (i = 0; i < self->boneCount; ++i) - spBone_setToSetupPose(self->bones[i]); -} - -void spSkeleton_setSlotsToSetupPose (const spSkeleton* self) { - int i; - memcpy(self->drawOrder, self->slots, self->slotCount * sizeof(int)); - for (i = 0; i < self->slotCount; ++i) - spSlot_setToSetupPose(self->slots[i]); -} - -spBone* spSkeleton_findBone (const spSkeleton* self, const char* boneName) { - int i; - for (i = 0; i < self->boneCount; ++i) - if (strcmp(self->data->bones[i]->name, boneName) == 0) return self->bones[i]; - return 0; -} - -int spSkeleton_findBoneIndex (const spSkeleton* self, const char* boneName) { - int i; - for (i = 0; i < self->boneCount; ++i) - if (strcmp(self->data->bones[i]->name, boneName) == 0) return i; - return -1; -} - -spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName) { - int i; - for (i = 0; i < self->slotCount; ++i) - if (strcmp(self->data->slots[i]->name, slotName) == 0) return self->slots[i]; - return 0; -} - -int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName) { - int i; - for (i = 0; i < self->slotCount; ++i) - if (strcmp(self->data->slots[i]->name, slotName) == 0) return i; - return -1; -} - -int spSkeleton_setSkinByName (spSkeleton* self, const char* skinName) { - spSkin *skin; - if (!skinName) { - spSkeleton_setSkin(self, 0); - return 1; - } - skin = spSkeletonData_findSkin(self->data, skinName); - if (!skin) return 0; - spSkeleton_setSkin(self, skin); - return 1; -} - -void spSkeleton_setSkin (spSkeleton* self, spSkin* newSkin) { - if (self->skin && newSkin) spSkin_attachAll(newSkin, self, self->skin); - CONST_CAST(spSkin*, self->skin) = newSkin; -} - -spAttachment* spSkeleton_getAttachmentForSlotName (const spSkeleton* self, const char* slotName, const char* attachmentName) { - int slotIndex = spSkeletonData_findSlotIndex(self->data, slotName); - return spSkeleton_getAttachmentForSlotIndex(self, slotIndex, attachmentName); -} - -spAttachment* spSkeleton_getAttachmentForSlotIndex (const spSkeleton* self, int slotIndex, const char* attachmentName) { - if (slotIndex == -1) return 0; - if (self->skin) { - spAttachment *attachment = spSkin_getAttachment(self->skin, slotIndex, attachmentName); - if (attachment) return attachment; - } - if (self->data->defaultSkin) { - spAttachment *attachment = spSkin_getAttachment(self->data->defaultSkin, slotIndex, attachmentName); - if (attachment) return attachment; - } - return 0; -} - -int spSkeleton_setAttachment (spSkeleton* self, const char* slotName, const char* attachmentName) { - int i; - for (i = 0; i < self->slotCount; ++i) { - spSlot *slot = self->slots[i]; - if (strcmp(slot->data->name, slotName) == 0) { - if (!attachmentName) - spSlot_setAttachment(slot, 0); - else { - spAttachment* attachment = spSkeleton_getAttachmentForSlotIndex(self, i, attachmentName); - if (!attachment) return 0; - spSlot_setAttachment(slot, attachment); - } - return 1; - } - } - return 0; -} - -void spSkeleton_update (spSkeleton* self, float deltaTime) { - self->time += deltaTime; -} diff --git a/cocos/editor-support/spine/Skeleton.h b/cocos/editor-support/spine/Skeleton.h index 070d4b0fe2..34517c8ffb 100644 --- a/cocos/editor-support/spine/Skeleton.h +++ b/cocos/editor-support/spine/Skeleton.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SKELETON_H_ @@ -37,6 +34,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -46,14 +44,17 @@ typedef struct spSkeleton spSkeleton; struct spSkeleton { spSkeletonData* const data; - int boneCount; + int bonesCount; spBone** bones; spBone* const root; - int slotCount; + int slotsCount; spSlot** slots; spSlot** drawOrder; + int ikConstraintsCount; + spIkConstraint** ikConstraints; + spSkin* const skin; float r, g, b, a; float time; @@ -64,6 +65,8 @@ struct spSkeleton { spSkeleton* spSkeleton_create (spSkeletonData* data); void spSkeleton_dispose (spSkeleton* self); +/* Caches information about bones and IK constraints. Must be called if bones or IK constraints are added or removed. */ +void spSkeleton_updateCache (const spSkeleton* self); void spSkeleton_updateWorldTransform (const spSkeleton* self); void spSkeleton_setToSetupPose (const spSkeleton* self); @@ -95,6 +98,9 @@ spAttachment* spSkeleton_getAttachmentForSlotIndex (const spSkeleton* self, int /* Returns 0 if the slot or attachment was not found. */ int spSkeleton_setAttachment (spSkeleton* self, const char* slotName, const char* attachmentName); +/* Returns 0 if the IK constraint was not found. */ +spIkConstraint* spSkeleton_findIkConstraint (const spSkeleton* self, const char* ikConstraintName); + void spSkeleton_update (spSkeleton* self, float deltaTime); #ifdef SPINE_SHORT_NAMES diff --git a/cocos/editor-support/spine/SkeletonAnimation.cpp b/cocos/editor-support/spine/SkeletonAnimation.cpp new file mode 100644 index 0000000000..48ce80d67e --- /dev/null +++ b/cocos/editor-support/spine/SkeletonAnimation.cpp @@ -0,0 +1,249 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include +#include + +USING_NS_CC; +using std::min; +using std::max; +using std::vector; + +namespace spine { + +void animationCallback (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount) { + ((SkeletonAnimation*)state->rendererObject)->onAnimationStateEvent(trackIndex, type, event, loopCount); +} + +void trackEntryCallback (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount) { + ((SkeletonAnimation*)state->rendererObject)->onTrackEntryEvent(trackIndex, type, event, loopCount); +} + +typedef struct _TrackEntryListeners { + StartListener startListener; + EndListener endListener; + CompleteListener completeListener; + EventListener eventListener; +} _TrackEntryListeners; + +static _TrackEntryListeners* getListeners (spTrackEntry* entry) { + if (!entry->rendererObject) { + entry->rendererObject = NEW(spine::_TrackEntryListeners); + entry->listener = trackEntryCallback; + } + return (_TrackEntryListeners*)entry->rendererObject; +} + +void disposeTrackEntry (spTrackEntry* entry) { + if (entry->rendererObject) FREE(entry->rendererObject); + _spTrackEntry_dispose(entry); +} + +// + +SkeletonAnimation* SkeletonAnimation::createWithData (spSkeletonData* skeletonData) { + SkeletonAnimation* node = new SkeletonAnimation(skeletonData); + node->autorelease(); + return node; +} + +SkeletonAnimation* SkeletonAnimation::createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { + SkeletonAnimation* node = new SkeletonAnimation(skeletonDataFile, atlas, scale); + node->autorelease(); + return node; +} + +SkeletonAnimation* SkeletonAnimation::createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) { + SkeletonAnimation* node = new SkeletonAnimation(skeletonDataFile, atlasFile, scale); + node->autorelease(); + return node; +} + +void SkeletonAnimation::initialize () { + _ownsAnimationStateData = true; + _state = spAnimationState_create(spAnimationStateData_create(_skeleton->data)); + _state->rendererObject = this; + _state->listener = animationCallback; + + _spAnimationState* stateInternal = (_spAnimationState*)_state; + stateInternal->disposeTrackEntry = disposeTrackEntry; +} + +SkeletonAnimation::SkeletonAnimation (spSkeletonData *skeletonData) + : SkeletonRenderer(skeletonData) { + initialize(); +} + +SkeletonAnimation::SkeletonAnimation (const std::string& skeletonDataFile, spAtlas* atlas, float scale) + : SkeletonRenderer(skeletonDataFile, atlas, scale) { + initialize(); +} + +SkeletonAnimation::SkeletonAnimation (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) + : SkeletonRenderer(skeletonDataFile, atlasFile, scale) { + initialize(); +} + +SkeletonAnimation::~SkeletonAnimation () { + if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data); + spAnimationState_dispose(_state); +} + +void SkeletonAnimation::update (float deltaTime) { + super::update(deltaTime); + + deltaTime *= _timeScale; + spAnimationState_update(_state, deltaTime); + spAnimationState_apply(_state, _skeleton); + spSkeleton_updateWorldTransform(_skeleton); +} + +void SkeletonAnimation::setAnimationStateData (spAnimationStateData* stateData) { + CCASSERT(stateData, "stateData cannot be null."); + + if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data); + spAnimationState_dispose(_state); + + _ownsAnimationStateData = false; + _state = spAnimationState_create(stateData); + _state->rendererObject = this; + _state->listener = animationCallback; +} + +void SkeletonAnimation::setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration) { + spAnimationStateData_setMixByName(_state->data, fromAnimation.c_str(), toAnimation.c_str(), duration); +} + +spTrackEntry* SkeletonAnimation::setAnimation (int trackIndex, const std::string& name, bool loop) { + spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, name.c_str()); + if (!animation) { + log("Spine: Animation not found: %s", name.c_str()); + return 0; + } + return spAnimationState_setAnimation(_state, trackIndex, animation, loop); +} + +spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string& name, bool loop, float delay) { + spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, name.c_str()); + if (!animation) { + log("Spine: Animation not found: %s", name.c_str()); + return 0; + } + return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay); +} + +spTrackEntry* SkeletonAnimation::getCurrent (int trackIndex) { + return spAnimationState_getCurrent(_state, trackIndex); +} + +void SkeletonAnimation::clearTracks () { + spAnimationState_clearTracks(_state); +} + +void SkeletonAnimation::clearTrack (int trackIndex) { + spAnimationState_clearTrack(_state, trackIndex); +} + +void SkeletonAnimation::onAnimationStateEvent (int trackIndex, spEventType type, spEvent* event, int loopCount) { + switch (type) { + case SP_ANIMATION_START: + if (_startListener) _startListener(trackIndex); + break; + case SP_ANIMATION_END: + if (_endListener) _endListener(trackIndex); + break; + case SP_ANIMATION_COMPLETE: + if (_completeListener) _completeListener(trackIndex, loopCount); + break; + case SP_ANIMATION_EVENT: + if (_eventListener) _eventListener(trackIndex, event); + break; + } +} + +void SkeletonAnimation::onTrackEntryEvent (int trackIndex, spEventType type, spEvent* event, int loopCount) { + spTrackEntry* entry = spAnimationState_getCurrent(_state, trackIndex); + if (!entry->rendererObject) return; + _TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->rendererObject; + switch (type) { + case SP_ANIMATION_START: + if (listeners->startListener) listeners->startListener(trackIndex); + break; + case SP_ANIMATION_END: + if (listeners->endListener) listeners->endListener(trackIndex); + break; + case SP_ANIMATION_COMPLETE: + if (listeners->completeListener) listeners->completeListener(trackIndex, loopCount); + break; + case SP_ANIMATION_EVENT: + if (listeners->eventListener) listeners->eventListener(trackIndex, event); + break; + } +} + +void SkeletonAnimation::setStartListener (const StartListener& listener) { + _startListener = listener; +} + +void SkeletonAnimation::setEndListener (const EndListener& listener) { + _endListener = listener; +} + +void SkeletonAnimation::setCompleteListener (const CompleteListener& listener) { + _completeListener = listener; +} + +void SkeletonAnimation::setEventListener (const EventListener& listener) { + _eventListener = listener; +} + +void SkeletonAnimation::setTrackStartListener (spTrackEntry* entry, const StartListener& listener) { + getListeners(entry)->startListener = listener; +} + +void SkeletonAnimation::setTrackEndListener (spTrackEntry* entry, const EndListener& listener) { + getListeners(entry)->endListener = listener; +} + +void SkeletonAnimation::setTrackCompleteListener (spTrackEntry* entry, const CompleteListener& listener) { + getListeners(entry)->completeListener = listener; +} + +void SkeletonAnimation::setTrackEventListener (spTrackEntry* entry, const EventListener& listener) { + getListeners(entry)->eventListener = listener; +} + +spAnimationState* SkeletonAnimation::getState() const { + return _state; +} + +} diff --git a/cocos/editor-support/spine/SkeletonAnimation.h b/cocos/editor-support/spine/SkeletonAnimation.h new file mode 100644 index 0000000000..b9a37e0d17 --- /dev/null +++ b/cocos/editor-support/spine/SkeletonAnimation.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_SKELETONANIMATION_H_ +#define SPINE_SKELETONANIMATION_H_ + +#include +#include +#include "cocos2d.h" + +namespace spine { + +typedef std::function StartListener; +typedef std::function EndListener; +typedef std::function CompleteListener; +typedef std::function EventListener; + +/** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be + * played later. */ +class SkeletonAnimation: public SkeletonRenderer { +public: + static SkeletonAnimation* createWithData (spSkeletonData* skeletonData); + static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); + static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); + + virtual void update (float deltaTime); + + void setAnimationStateData (spAnimationStateData* stateData); + void setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration); + + spTrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop); + spTrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0); + spTrackEntry* getCurrent (int trackIndex = 0); + void clearTracks (); + void clearTrack (int trackIndex = 0); + + void setStartListener (const StartListener& listener); + void setEndListener (const EndListener& listener); + void setCompleteListener (const CompleteListener& listener); + void setEventListener (const EventListener& listener); + + void setTrackStartListener (spTrackEntry* entry, const StartListener& listener); + void setTrackEndListener (spTrackEntry* entry, const EndListener& listener); + void setTrackCompleteListener (spTrackEntry* entry, const CompleteListener& listener); + void setTrackEventListener (spTrackEntry* entry, const EventListener& listener); + + virtual void onAnimationStateEvent (int trackIndex, spEventType type, spEvent* event, int loopCount); + virtual void onTrackEntryEvent (int trackIndex, spEventType type, spEvent* event, int loopCount); + + spAnimationState* getState() const; + +protected: + SkeletonAnimation (); + SkeletonAnimation (spSkeletonData* skeletonData); + SkeletonAnimation (const std::string&skeletonDataFile, spAtlas* atlas, float scale = 1); + SkeletonAnimation (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); + virtual ~SkeletonAnimation (); + void initialize (); + + spAnimationState* _state; + + bool _ownsAnimationStateData; + + StartListener _startListener; + EndListener _endListener; + CompleteListener _completeListener; + EventListener _eventListener; + +private: + typedef SkeletonRenderer super; +}; + +} + +#endif /* SPINE_SKELETONANIMATION_H_ */ diff --git a/cocos/editor-support/spine/SkeletonBounds.cpp b/cocos/editor-support/spine/SkeletonBounds.c similarity index 73% rename from cocos/editor-support/spine/SkeletonBounds.cpp rename to cocos/editor-support/spine/SkeletonBounds.c index 054639fbdf..16c35faccc 100644 --- a/cocos/editor-support/spine/SkeletonBounds.cpp +++ b/cocos/editor-support/spine/SkeletonBounds.c @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #include @@ -108,18 +105,18 @@ void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/ int i; _spSkeletonBounds* internal = SUB_CAST(_spSkeletonBounds, self); - if (internal->capacity < skeleton->slotCount) { + if (internal->capacity < skeleton->slotsCount) { spPolygon** newPolygons; FREE(self->boundingBoxes); - self->boundingBoxes = MALLOC(spBoundingBoxAttachment*, skeleton->slotCount); + self->boundingBoxes = MALLOC(spBoundingBoxAttachment*, skeleton->slotsCount); - newPolygons = CALLOC(spPolygon*, skeleton->slotCount); + newPolygons = CALLOC(spPolygon*, skeleton->slotsCount); memcpy(newPolygons, self->polygons, internal->capacity); FREE(self->polygons); self->polygons = newPolygons; - internal->capacity = skeleton->slotCount; + internal->capacity = skeleton->slotsCount; } self->minX = (float)INT_MAX; @@ -128,13 +125,13 @@ void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/ self->maxY = (float)INT_MIN; self->count = 0; - for (i = 0; i < skeleton->slotCount; ++i) { + for (i = 0; i < skeleton->slotsCount; ++i) { spPolygon* polygon; spBoundingBoxAttachment* boundingBox; spSlot* slot = skeleton->slots[i]; spAttachment* attachment = slot->attachment; - if (!attachment || attachment->type != ATTACHMENT_BOUNDING_BOX) continue; + if (!attachment || attachment->type != SP_ATTACHMENT_BOUNDING_BOX) continue; boundingBox = (spBoundingBoxAttachment*)attachment; self->boundingBoxes[self->count] = boundingBox; @@ -144,7 +141,7 @@ void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/ self->polygons[self->count] = polygon = spPolygon_create(boundingBox->verticesCount); } polygon->count = boundingBox->verticesCount; - spBoundingBoxAttachment_computeWorldVertices(boundingBox, skeleton->x, skeleton->y, slot->bone, polygon->vertices); + spBoundingBoxAttachment_computeWorldVertices(boundingBox, slot->bone, polygon->vertices); if (updateAabb) { int ii = 0; @@ -158,7 +155,7 @@ void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/ } } - ++self->count; + self->count++; } } diff --git a/cocos/editor-support/spine/SkeletonBounds.h b/cocos/editor-support/spine/SkeletonBounds.h index 500bd861af..9767dacf42 100644 --- a/cocos/editor-support/spine/SkeletonBounds.h +++ b/cocos/editor-support/spine/SkeletonBounds.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SKELETONBOUNDS_H_ diff --git a/cocos/editor-support/spine/SkeletonData.c b/cocos/editor-support/spine/SkeletonData.c new file mode 100644 index 0000000000..d586415b77 --- /dev/null +++ b/cocos/editor-support/spine/SkeletonData.c @@ -0,0 +1,122 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +spSkeletonData* spSkeletonData_create () { + return NEW(spSkeletonData); +} + +void spSkeletonData_dispose (spSkeletonData* self) { + int i; + for (i = 0; i < self->bonesCount; ++i) + spBoneData_dispose(self->bones[i]); + FREE(self->bones); + + for (i = 0; i < self->slotsCount; ++i) + spSlotData_dispose(self->slots[i]); + FREE(self->slots); + + for (i = 0; i < self->skinsCount; ++i) + spSkin_dispose(self->skins[i]); + FREE(self->skins); + + for (i = 0; i < self->eventsCount; ++i) + spEventData_dispose(self->events[i]); + FREE(self->events); + + for (i = 0; i < self->animationsCount; ++i) + spAnimation_dispose(self->animations[i]); + FREE(self->animations); + + for (i = 0; i < self->ikConstraintsCount; ++i) + spIkConstraintData_dispose(self->ikConstraints[i]); + FREE(self->ikConstraints); + + FREE(self); +} + +spBoneData* spSkeletonData_findBone (const spSkeletonData* self, const char* boneName) { + int i; + for (i = 0; i < self->bonesCount; ++i) + if (strcmp(self->bones[i]->name, boneName) == 0) return self->bones[i]; + return 0; +} + +int spSkeletonData_findBoneIndex (const spSkeletonData* self, const char* boneName) { + int i; + for (i = 0; i < self->bonesCount; ++i) + if (strcmp(self->bones[i]->name, boneName) == 0) return i; + return -1; +} + +spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName) { + int i; + for (i = 0; i < self->slotsCount; ++i) + if (strcmp(self->slots[i]->name, slotName) == 0) return self->slots[i]; + return 0; +} + +int spSkeletonData_findSlotIndex (const spSkeletonData* self, const char* slotName) { + int i; + for (i = 0; i < self->slotsCount; ++i) + if (strcmp(self->slots[i]->name, slotName) == 0) return i; + return -1; +} + +spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName) { + int i; + for (i = 0; i < self->skinsCount; ++i) + if (strcmp(self->skins[i]->name, skinName) == 0) return self->skins[i]; + return 0; +} + +spEventData* spSkeletonData_findEvent (const spSkeletonData* self, const char* eventName) { + int i; + for (i = 0; i < self->eventsCount; ++i) + if (strcmp(self->events[i]->name, eventName) == 0) return self->events[i]; + return 0; +} + +spAnimation* spSkeletonData_findAnimation (const spSkeletonData* self, const char* animationName) { + int i; + for (i = 0; i < self->animationsCount; ++i) + if (strcmp(self->animations[i]->name, animationName) == 0) return self->animations[i]; + return 0; +} + +spIkConstraintData* spSkeletonData_findIkConstraint (const spSkeletonData* self, const char* ikConstraintName) { + int i; + for (i = 0; i < self->ikConstraintsCount; ++i) + if (strcmp(self->ikConstraints[i]->name, ikConstraintName) == 0) return self->ikConstraints[i]; + return 0; +} diff --git a/cocos/editor-support/spine/SkeletonData.cpp b/cocos/editor-support/spine/SkeletonData.cpp deleted file mode 100644 index 184e1ced31..0000000000 --- a/cocos/editor-support/spine/SkeletonData.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -spSkeletonData* spSkeletonData_create () { - return NEW(spSkeletonData); -} - -void spSkeletonData_dispose (spSkeletonData* self) { - int i; - for (i = 0; i < self->boneCount; ++i) - spBoneData_dispose(self->bones[i]); - FREE(self->bones); - - for (i = 0; i < self->slotCount; ++i) - spSlotData_dispose(self->slots[i]); - FREE(self->slots); - - for (i = 0; i < self->skinCount; ++i) - spSkin_dispose(self->skins[i]); - FREE(self->skins); - - for (i = 0; i < self->animationCount; ++i) - spAnimation_dispose(self->animations[i]); - FREE(self->animations); - - for (i = 0; i < self->eventCount; ++i) - spEventData_dispose(self->events[i]); - FREE(self->events); - - FREE(self); -} - -spBoneData* spSkeletonData_findBone (const spSkeletonData* self, const char* boneName) { - int i; - for (i = 0; i < self->boneCount; ++i) - if (strcmp(self->bones[i]->name, boneName) == 0) return self->bones[i]; - return 0; -} - -int spSkeletonData_findBoneIndex (const spSkeletonData* self, const char* boneName) { - int i; - for (i = 0; i < self->boneCount; ++i) - if (strcmp(self->bones[i]->name, boneName) == 0) return i; - return -1; -} - -spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName) { - int i; - for (i = 0; i < self->slotCount; ++i) - if (strcmp(self->slots[i]->name, slotName) == 0) return self->slots[i]; - return 0; -} - -int spSkeletonData_findSlotIndex (const spSkeletonData* self, const char* slotName) { - int i; - for (i = 0; i < self->slotCount; ++i) - if (strcmp(self->slots[i]->name, slotName) == 0) return i; - return -1; -} - -spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName) { - int i; - for (i = 0; i < self->skinCount; ++i) - if (strcmp(self->skins[i]->name, skinName) == 0) return self->skins[i]; - return 0; -} - -spEventData* spSkeletonData_findEvent (const spSkeletonData* self, const char* eventName) { - int i; - for (i = 0; i < self->eventCount; ++i) - if (strcmp(self->events[i]->name, eventName) == 0) return self->events[i]; - return 0; -} - -spAnimation* spSkeletonData_findAnimation (const spSkeletonData* self, const char* animationName) { - int i; - for (i = 0; i < self->animationCount; ++i) - if (strcmp(self->animations[i]->name, animationName) == 0) return self->animations[i]; - return 0; -} diff --git a/cocos/editor-support/spine/SkeletonData.h b/cocos/editor-support/spine/SkeletonData.h index c23879efb4..1c9822fe46 100644 --- a/cocos/editor-support/spine/SkeletonData.h +++ b/cocos/editor-support/spine/SkeletonData.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SKELETONDATA_H_ @@ -39,27 +36,35 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { #endif typedef struct { - int boneCount; + const char* version; + const char* hash; + float width, height; + + int bonesCount; spBoneData** bones; - int slotCount; + int slotsCount; spSlotData** slots; - int skinCount; + int skinsCount; spSkin** skins; spSkin* defaultSkin; - int eventCount; + int eventsCount; spEventData** events; - int animationCount; + int animationsCount; spAnimation** animations; + + int ikConstraintsCount; + spIkConstraintData** ikConstraints; } spSkeletonData; spSkeletonData* spSkeletonData_create (); @@ -77,6 +82,8 @@ spEventData* spSkeletonData_findEvent (const spSkeletonData* self, const char* e spAnimation* spSkeletonData_findAnimation (const spSkeletonData* self, const char* animationName); +spIkConstraintData* spSkeletonData_findIkConstraint (const spSkeletonData* self, const char* ikConstraintName); + #ifdef SPINE_SHORT_NAMES typedef spSkeletonData SkeletonData; #define SkeletonData_create(...) spSkeletonData_create(__VA_ARGS__) diff --git a/cocos/editor-support/spine/SkeletonJson.c b/cocos/editor-support/spine/SkeletonJson.c new file mode 100644 index 0000000000..4fd5615cd6 --- /dev/null +++ b/cocos/editor-support/spine/SkeletonJson.c @@ -0,0 +1,770 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include "Json.h" +#include +#include + +typedef struct { + spSkeletonJson super; + int ownsLoader; +} _spSkeletonJson; + +spSkeletonJson* spSkeletonJson_createWithLoader (spAttachmentLoader* attachmentLoader) { + spSkeletonJson* self = SUPER(NEW(_spSkeletonJson)); + self->scale = 1; + self->attachmentLoader = attachmentLoader; + return self; +} + +spSkeletonJson* spSkeletonJson_create (spAtlas* atlas) { + spAtlasAttachmentLoader* attachmentLoader = spAtlasAttachmentLoader_create(atlas); + spSkeletonJson* self = spSkeletonJson_createWithLoader(SUPER(attachmentLoader)); + SUB_CAST(_spSkeletonJson, self)->ownsLoader = 1; + return self; +} + +void spSkeletonJson_dispose (spSkeletonJson* self) { + if (SUB_CAST(_spSkeletonJson, self)->ownsLoader) spAttachmentLoader_dispose(self->attachmentLoader); + FREE(self->error); + FREE(self); +} + +void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* value1, const char* value2) { + char message[256]; + int length; + FREE(self->error); + strcpy(message, value1); + length = (int)strlen(value1); + if (value2) strncat(message + length, value2, 256 - length); + MALLOC_STR(self->error, message); + if (root) Json_dispose(root); +} + +static float toColor (const char* value, int index) { + char digits[3]; + char *error; + int color; + + if (strlen(value) != 8) return -1; + value += index * 2; + + digits[0] = *value; + digits[1] = *(value + 1); + digits[2] = '\0'; + color = (int)strtoul(digits, &error, 16); + if (*error != 0) return -1; + return color / (float)255; +} + +static void readCurve (spCurveTimeline* timeline, int frameIndex, Json* frame) { + Json* curve = Json_getItem(frame, "curve"); + if (!curve) return; + if (curve->type == Json_String && strcmp(curve->valueString, "stepped") == 0) + spCurveTimeline_setStepped(timeline, frameIndex); + else if (curve->type == Json_Array) { + Json* child0 = curve->child; + Json* child1 = child0->next; + Json* child2 = child1->next; + Json* child3 = child2->next; + spCurveTimeline_setCurve(timeline, frameIndex, child0->valueFloat, child1->valueFloat, child2->valueFloat, + child3->valueFloat); + } +} + +static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* root, spSkeletonData *skeletonData) { + int i; + spAnimation* animation; + Json* frame; + float duration; + + Json* bones = Json_getItem(root, "bones"); + Json* slots = Json_getItem(root, "slots"); + Json* ik = Json_getItem(root, "ik"); + Json* ffd = Json_getItem(root, "ffd"); + Json* drawOrder = Json_getItem(root, "draworder"); + Json* events = Json_getItem(root, "events"); + Json *boneMap, *slotMap, *ikMap, *ffdMap; + + int timelinesCount = 0; + for (boneMap = bones ? bones->child : 0; boneMap; boneMap = boneMap->next) + timelinesCount += boneMap->size; + for (slotMap = slots ? slots->child : 0; slotMap; slotMap = slotMap->next) + timelinesCount += slotMap->size; + timelinesCount += ik ? ik->size : 0; + for (ffdMap = ffd ? ffd->child : 0; ffdMap; ffdMap = ffdMap->next) + for (slotMap = ffdMap->child; slotMap; slotMap = slotMap->next) + timelinesCount += slotMap->size; + if (events) ++timelinesCount; + if (drawOrder) ++timelinesCount; + + animation = spAnimation_create(root->name, timelinesCount); + animation->timelinesCount = 0; + skeletonData->animations[skeletonData->animationsCount++] = animation; + + /* Slot timelines. */ + for (slotMap = slots ? slots->child : 0; slotMap; slotMap = slotMap->next) { + Json *timelineArray; + + int slotIndex = spSkeletonData_findSlotIndex(skeletonData, slotMap->name); + if (slotIndex == -1) { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, root, "Slot not found: ", slotMap->name); + return 0; + } + + for (timelineArray = slotMap->child; timelineArray; timelineArray = timelineArray->next) { + if (strcmp(timelineArray->name, "color") == 0) { + spColorTimeline *timeline = spColorTimeline_create(timelineArray->size); + timeline->slotIndex = slotIndex; + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { + const char* s = Json_getString(frame, "color", 0); + spColorTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), toColor(s, 0), toColor(s, 1), toColor(s, 2), + toColor(s, 3)); + readCurve(SUPER(timeline), i, frame); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size * 5 - 5]; + if (duration > animation->duration) animation->duration = duration; + + } else if (strcmp(timelineArray->name, "attachment") == 0) { + spAttachmentTimeline *timeline = spAttachmentTimeline_create(timelineArray->size); + timeline->slotIndex = slotIndex; + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { + Json* name = Json_getItem(frame, "name"); + spAttachmentTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), + name->type == Json_NULL ? 0 : name->valueString); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size - 1]; + if (duration > animation->duration) animation->duration = duration; + + } else { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, 0, "Invalid timeline type for a slot: ", timelineArray->name); + return 0; + } + } + } + + /* Bone timelines. */ + for (boneMap = bones ? bones->child : 0; boneMap; boneMap = boneMap->next) { + Json *timelineArray; + + int boneIndex = spSkeletonData_findBoneIndex(skeletonData, boneMap->name); + if (boneIndex == -1) { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, root, "Bone not found: ", boneMap->name); + return 0; + } + + for (timelineArray = boneMap->child; timelineArray; timelineArray = timelineArray->next) { + if (strcmp(timelineArray->name, "rotate") == 0) { + spRotateTimeline *timeline = spRotateTimeline_create(timelineArray->size); + timeline->boneIndex = boneIndex; + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { + spRotateTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getFloat(frame, "angle", 0)); + readCurve(SUPER(timeline), i, frame); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size * 2 - 2]; + if (duration > animation->duration) animation->duration = duration; + + } else { + int isScale = strcmp(timelineArray->name, "scale") == 0; + if (isScale || strcmp(timelineArray->name, "translate") == 0) { + float scale = isScale ? 1 : self->scale; + spTranslateTimeline *timeline = + isScale ? spScaleTimeline_create(timelineArray->size) : spTranslateTimeline_create(timelineArray->size); + timeline->boneIndex = boneIndex; + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { + spTranslateTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getFloat(frame, "x", 0) * scale, + Json_getFloat(frame, "y", 0) * scale); + readCurve(SUPER(timeline), i, frame); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size * 3 - 3]; + if (duration > animation->duration) animation->duration = duration; + } else { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, 0, "Invalid timeline type for a bone: ", timelineArray->name); + return 0; + } + } + } + } + + /* IK timelines. */ + for (ikMap = ik ? ik->child : 0; ikMap; ikMap = ikMap->next) { + spIkConstraintData* ikConstraint = spSkeletonData_findIkConstraint(skeletonData, ikMap->name); + spIkConstraintTimeline* timeline = spIkConstraintTimeline_create(ikMap->size); + for (i = 0; i < skeletonData->ikConstraintsCount; ++i) { + if (ikConstraint == skeletonData->ikConstraints[i]) { + timeline->ikConstraintIndex = i; + break; + } + } + for (frame = ikMap->child, i = 0; frame; frame = frame->next, ++i) { + spIkConstraintTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getFloat(frame, "mix", 0), + Json_getInt(frame, "bendPositive", 1) ? 1 : -1); + readCurve(SUPER(timeline), i, frame); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[ikMap->size * 3 - 3]; + if (duration > animation->duration) animation->duration = duration; + } + + /* FFD timelines. */ + for (ffdMap = ffd ? ffd->child : 0; ffdMap; ffdMap = ffdMap->next) { + spSkin* skin = spSkeletonData_findSkin(skeletonData, ffdMap->name); + for (slotMap = ffdMap->child; slotMap; slotMap = slotMap->next) { + int slotIndex = spSkeletonData_findSlotIndex(skeletonData, slotMap->name); + Json* timelineArray; + for (timelineArray = slotMap->child; timelineArray; timelineArray = timelineArray->next) { + Json* frame; + int verticesCount = 0; + float* tempVertices; + spFFDTimeline *timeline; + + spAttachment* attachment = spSkin_getAttachment(skin, slotIndex, timelineArray->name); + if (!attachment) { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, 0, "Attachment not found: ", timelineArray->name); + return 0; + } + if (attachment->type == SP_ATTACHMENT_MESH) + verticesCount = SUB_CAST(spMeshAttachment, attachment)->verticesCount; + else if (attachment->type == SP_ATTACHMENT_SKINNED_MESH) + verticesCount = SUB_CAST(spSkinnedMeshAttachment, attachment)->weightsCount / 3 * 2; + + timeline = spFFDTimeline_create(timelineArray->size, verticesCount); + timeline->slotIndex = slotIndex; + timeline->attachment = attachment; + + tempVertices = MALLOC(float, verticesCount); + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { + Json* vertices = Json_getItem(frame, "vertices"); + float* frameVertices; + if (!vertices) { + if (attachment->type == SP_ATTACHMENT_MESH) + frameVertices = SUB_CAST(spMeshAttachment, attachment)->vertices; + else { + frameVertices = tempVertices; + memset(frameVertices, 0, sizeof(float) * verticesCount); + } + } else { + int v, start = Json_getInt(frame, "offset", 0); + Json* vertex; + frameVertices = tempVertices; + memset(frameVertices, 0, sizeof(float) * start); + if (self->scale == 1) { + for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) + frameVertices[v] = vertex->valueFloat; + } else { + for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) + frameVertices[v] = vertex->valueFloat * self->scale; + } + memset(frameVertices + v, 0, sizeof(float) * (verticesCount - v)); + if (attachment->type == SP_ATTACHMENT_MESH) { + float* meshVertices = SUB_CAST(spMeshAttachment, attachment)->vertices; + for (v = 0; v < verticesCount; ++v) + frameVertices[v] += meshVertices[v]; + } + } + spFFDTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), frameVertices); + readCurve(SUPER(timeline), i, frame); + } + FREE(tempVertices); + + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size - 1]; + if (duration > animation->duration) animation->duration = duration; + } + } + } + + /* Draw order timeline. */ + if (drawOrder) { + spDrawOrderTimeline* timeline = spDrawOrderTimeline_create(drawOrder->size, skeletonData->slotsCount); + for (frame = drawOrder->child, i = 0; frame; frame = frame->next, ++i) { + int ii; + int* drawOrder = 0; + Json* offsets = Json_getItem(frame, "offsets"); + if (offsets) { + Json* offsetMap; + int* unchanged = MALLOC(int, skeletonData->slotsCount - offsets->size); + int originalIndex = 0, unchangedIndex = 0; + + drawOrder = MALLOC(int, skeletonData->slotsCount); + for (ii = skeletonData->slotsCount - 1; ii >= 0; --ii) + drawOrder[ii] = -1; + + for (offsetMap = offsets->child; offsetMap; offsetMap = offsetMap->next) { + int slotIndex = spSkeletonData_findSlotIndex(skeletonData, Json_getString(offsetMap, "slot", 0)); + if (slotIndex == -1) { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, 0, "Slot not found: ", Json_getString(offsetMap, "slot", 0)); + return 0; + } + /* Collect unchanged items. */ + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + /* Set changed items. */ + drawOrder[originalIndex + Json_getInt(offsetMap, "offset", 0)] = originalIndex; + originalIndex++; + } + /* Collect remaining unchanged items. */ + while (originalIndex < skeletonData->slotsCount) + unchanged[unchangedIndex++] = originalIndex++; + /* Fill in unchanged items. */ + for (ii = skeletonData->slotsCount - 1; ii >= 0; ii--) + if (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex]; + FREE(unchanged); + } + spDrawOrderTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), drawOrder); + FREE(drawOrder); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[drawOrder->size - 1]; + if (duration > animation->duration) animation->duration = duration; + } + + /* Event timeline. */ + if (events) { + Json* frame; + + spEventTimeline* timeline = spEventTimeline_create(events->size); + for (frame = events->child, i = 0; frame; frame = frame->next, ++i) { + spEvent* event; + const char* stringValue; + spEventData* eventData = spSkeletonData_findEvent(skeletonData, Json_getString(frame, "name", 0)); + if (!eventData) { + spAnimation_dispose(animation); + _spSkeletonJson_setError(self, 0, "Event not found: ", Json_getString(frame, "name", 0)); + return 0; + } + event = spEvent_create(eventData); + event->intValue = Json_getInt(frame, "int", eventData->intValue); + event->floatValue = Json_getFloat(frame, "float", eventData->floatValue); + stringValue = Json_getString(frame, "string", eventData->stringValue); + if (stringValue) MALLOC_STR(event->stringValue, stringValue); + spEventTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), event); + } + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[events->size - 1]; + if (duration > animation->duration) animation->duration = duration; + } + + return animation; +} + +spSkeletonData* spSkeletonJson_readSkeletonDataFile (spSkeletonJson* self, const char* path) { + int length; + spSkeletonData* skeletonData; + const char* json = _spUtil_readFile(path, &length); + if (!json) { + _spSkeletonJson_setError(self, 0, "Unable to read skeleton file: ", path); + return 0; + } + skeletonData = spSkeletonJson_readSkeletonData(self, json); + FREE(json); + return skeletonData; +} + +spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const char* json) { + int i, ii; + spSkeletonData* skeletonData; + Json *root, *skeleton, *bones, *boneMap, *ik, *slots, *skins, *animations, *events; + + FREE(self->error); + CONST_CAST(char*, self->error) = 0; + + root = Json_create(json); + if (!root) { + _spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError()); + return 0; + } + + skeletonData = spSkeletonData_create(); + + skeleton = Json_getItem(root, "skeleton"); + if (skeleton) { + skeletonData->hash = Json_getString(skeleton, "hash", 0); + skeletonData->version = Json_getString(skeleton, "spine", 0); + skeletonData->width = Json_getFloat(skeleton, "width", 0); + skeletonData->height = Json_getFloat(skeleton, "height", 0); + } + + /* Bones. */ + bones = Json_getItem(root, "bones"); + skeletonData->bones = MALLOC(spBoneData*, bones->size); + for (boneMap = bones->child, i = 0; boneMap; boneMap = boneMap->next, ++i) { + spBoneData* boneData; + + spBoneData* parent = 0; + const char* parentName = Json_getString(boneMap, "parent", 0); + if (parentName) { + parent = spSkeletonData_findBone(skeletonData, parentName); + if (!parent) { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, "Parent bone not found: ", parentName); + return 0; + } + } + + boneData = spBoneData_create(Json_getString(boneMap, "name", 0), parent); + boneData->length = Json_getFloat(boneMap, "length", 0) * self->scale; + boneData->x = Json_getFloat(boneMap, "x", 0) * self->scale; + boneData->y = Json_getFloat(boneMap, "y", 0) * self->scale; + boneData->rotation = Json_getFloat(boneMap, "rotation", 0); + boneData->scaleX = Json_getFloat(boneMap, "scaleX", 1); + boneData->scaleY = Json_getFloat(boneMap, "scaleY", 1); + boneData->inheritScale = Json_getInt(boneMap, "inheritScale", 1); + boneData->inheritRotation = Json_getInt(boneMap, "inheritRotation", 1); + + skeletonData->bones[i] = boneData; + skeletonData->bonesCount++; + } + + /* IK constraints. */ + ik = Json_getItem(root, "ik"); + if (ik) { + Json *ikMap; + skeletonData->ikConstraintsCount = ik->size; + skeletonData->ikConstraints = MALLOC(spIkConstraintData*, ik->size); + for (ikMap = ik->child, i = 0; ikMap; ikMap = ikMap->next, ++i) { + const char* targetName; + + spIkConstraintData* ikConstraintData = spIkConstraintData_create(Json_getString(ikMap, "name", 0)); + boneMap = Json_getItem(ikMap, "bones"); + ikConstraintData->bonesCount = boneMap->size; + ikConstraintData->bones = MALLOC(spBoneData*, boneMap->size); + for (boneMap = boneMap->child, ii = 0; boneMap; boneMap = boneMap->next, ++ii) { + ikConstraintData->bones[ii] = spSkeletonData_findBone(skeletonData, boneMap->valueString); + if (!ikConstraintData->bones[ii]) { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, "IK bone not found: ", boneMap->valueString); + return 0; + } + } + + targetName = Json_getString(ikMap, "target", 0); + ikConstraintData->target = spSkeletonData_findBone(skeletonData, targetName); + if (!ikConstraintData->target) { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, "Target bone not found: ", boneMap->name); + return 0; + } + + ikConstraintData->bendDirection = Json_getInt(ikMap, "bendPositive", 1) ? 1 : -1; + ikConstraintData->mix = Json_getFloat(ikMap, "mix", 1); + + skeletonData->ikConstraints[i] = ikConstraintData; + } + } + + /* Slots. */ + slots = Json_getItem(root, "slots"); + if (slots) { + Json *slotMap; + skeletonData->slotsCount = slots->size; + skeletonData->slots = MALLOC(spSlotData*, slots->size); + for (slotMap = slots->child, i = 0; slotMap; slotMap = slotMap->next, ++i) { + spSlotData* slotData; + const char* color; + Json *attachmentItem; + + const char* boneName = Json_getString(slotMap, "bone", 0); + spBoneData* boneData = spSkeletonData_findBone(skeletonData, boneName); + if (!boneData) { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, "Slot bone not found: ", boneName); + return 0; + } + + slotData = spSlotData_create(Json_getString(slotMap, "name", 0), boneData); + + color = Json_getString(slotMap, "color", 0); + if (color) { + slotData->r = toColor(color, 0); + slotData->g = toColor(color, 1); + slotData->b = toColor(color, 2); + slotData->a = toColor(color, 3); + } + + attachmentItem = Json_getItem(slotMap, "attachment"); + if (attachmentItem) spSlotData_setAttachmentName(slotData, attachmentItem->valueString); + + slotData->additiveBlending = Json_getInt(slotMap, "additive", 0); + + skeletonData->slots[i] = slotData; + } + } + + /* Skins. */ + skins = Json_getItem(root, "skins"); + if (skins) { + Json *slotMap; + skeletonData->skinsCount = skins->size; + skeletonData->skins = MALLOC(spSkin*, skins->size); + for (slotMap = skins->child, i = 0; slotMap; slotMap = slotMap->next, ++i) { + Json *attachmentsMap; + spSkin *skin = spSkin_create(slotMap->name); + + skeletonData->skins[i] = skin; + if (strcmp(slotMap->name, "default") == 0) skeletonData->defaultSkin = skin; + + for (attachmentsMap = slotMap->child; attachmentsMap; attachmentsMap = attachmentsMap->next) { + int slotIndex = spSkeletonData_findSlotIndex(skeletonData, attachmentsMap->name); + Json *attachmentMap; + + for (attachmentMap = attachmentsMap->child; attachmentMap; attachmentMap = attachmentMap->next) { + spAttachment* attachment; + const char* skinAttachmentName = attachmentMap->name; + const char* attachmentName = Json_getString(attachmentMap, "name", skinAttachmentName); + const char* path = Json_getString(attachmentMap, "path", attachmentName); + const char* color; + int i; + Json* entry; + + const char* typeString = Json_getString(attachmentMap, "type", "region"); + spAttachmentType type; + if (strcmp(typeString, "region") == 0) + type = SP_ATTACHMENT_REGION; + else if (strcmp(typeString, "mesh") == 0) + type = SP_ATTACHMENT_MESH; + else if (strcmp(typeString, "skinnedmesh") == 0) + type = SP_ATTACHMENT_SKINNED_MESH; + else if (strcmp(typeString, "boundingbox") == 0) + type = SP_ATTACHMENT_BOUNDING_BOX; + else { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, "Unknown attachment type: ", typeString); + return 0; + } + + attachment = spAttachmentLoader_newAttachment(self->attachmentLoader, skin, type, attachmentName, path); + if (!attachment) { + if (self->attachmentLoader->error1) { + spSkeletonData_dispose(skeletonData); + _spSkeletonJson_setError(self, root, self->attachmentLoader->error1, self->attachmentLoader->error2); + return 0; + } + continue; + } + + switch (attachment->type) { + case SP_ATTACHMENT_REGION: { + spRegionAttachment* region = SUB_CAST(spRegionAttachment, attachment); + if (path) MALLOC_STR(region->path, path); + region->x = Json_getFloat(attachmentMap, "x", 0) * self->scale; + region->y = Json_getFloat(attachmentMap, "y", 0) * self->scale; + region->scaleX = Json_getFloat(attachmentMap, "scaleX", 1); + region->scaleY = Json_getFloat(attachmentMap, "scaleY", 1); + region->rotation = Json_getFloat(attachmentMap, "rotation", 0); + region->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; + region->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; + + color = Json_getString(attachmentMap, "color", 0); + if (color) { + region->r = toColor(color, 0); + region->g = toColor(color, 1); + region->b = toColor(color, 2); + region->a = toColor(color, 3); + } + + spRegionAttachment_updateOffset(region); + break; + } + case SP_ATTACHMENT_MESH: { + spMeshAttachment* mesh = SUB_CAST(spMeshAttachment, attachment); + + MALLOC_STR(mesh->path, path); + + entry = Json_getItem(attachmentMap, "vertices"); + mesh->verticesCount = entry->size; + mesh->vertices = MALLOC(float, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->vertices[i] = entry->valueFloat * self->scale; + + entry = Json_getItem(attachmentMap, "triangles"); + mesh->trianglesCount = entry->size; + mesh->triangles = MALLOC(int, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->triangles[i] = entry->valueInt; + + entry = Json_getItem(attachmentMap, "uvs"); + mesh->regionUVs = MALLOC(float, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->regionUVs[i] = entry->valueFloat; + + spMeshAttachment_updateUVs(mesh); + + color = Json_getString(attachmentMap, "color", 0); + if (color) { + mesh->r = toColor(color, 0); + mesh->g = toColor(color, 1); + mesh->b = toColor(color, 2); + mesh->a = toColor(color, 3); + } + + mesh->hullLength = Json_getInt(attachmentMap, "hull", 0); + + entry = Json_getItem(attachmentMap, "edges"); + if (entry) { + mesh->edgesCount = entry->size; + mesh->edges = MALLOC(int, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->edges[i] = entry->valueInt; + } + + mesh->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; + mesh->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; + break; + } + case SP_ATTACHMENT_SKINNED_MESH: { + spSkinnedMeshAttachment* mesh = SUB_CAST(spSkinnedMeshAttachment, attachment); + int verticesCount, b, w, nn; + float* vertices; + + MALLOC_STR(mesh->path, path); + + entry = Json_getItem(attachmentMap, "uvs"); + mesh->uvsCount = entry->size; + mesh->regionUVs = MALLOC(float, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->regionUVs[i] = entry->valueFloat; + + entry = Json_getItem(attachmentMap, "vertices"); + verticesCount = entry->size; + vertices = MALLOC(float, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + vertices[i] = entry->valueFloat; + + for (i = 0; i < verticesCount;) { + int bonesCount = (int)vertices[i]; + mesh->bonesCount += bonesCount + 1; + mesh->weightsCount += bonesCount * 3; + i += 1 + bonesCount * 4; + } + mesh->bones = MALLOC(int, mesh->bonesCount); + mesh->weights = MALLOC(float, mesh->weightsCount); + + for (i = 0, b = 0, w = 0; i < verticesCount;) { + int bonesCount = (int)vertices[i++]; + mesh->bones[b++] = bonesCount; + for (nn = i + bonesCount * 4; i < nn; i += 4, ++b, w += 3) { + mesh->bones[b] = (int)vertices[i]; + mesh->weights[w] = vertices[i + 1] * self->scale; + mesh->weights[w + 1] = vertices[i + 2] * self->scale; + mesh->weights[w + 2] = vertices[i + 3]; + } + } + + FREE(vertices); + + entry = Json_getItem(attachmentMap, "triangles"); + mesh->trianglesCount = entry->size; + mesh->triangles = MALLOC(int, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->triangles[i] = entry->valueInt; + + spSkinnedMeshAttachment_updateUVs(mesh); + + color = Json_getString(attachmentMap, "color", 0); + if (color) { + mesh->r = toColor(color, 0); + mesh->g = toColor(color, 1); + mesh->b = toColor(color, 2); + mesh->a = toColor(color, 3); + } + + mesh->hullLength = Json_getInt(attachmentMap, "hull", 0); + + entry = Json_getItem(attachmentMap, "edges"); + if (entry) { + mesh->edgesCount = entry->size; + mesh->edges = MALLOC(int, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + mesh->edges[i] = entry->valueInt; + } + + mesh->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; + mesh->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; + break; + } + case SP_ATTACHMENT_BOUNDING_BOX: { + spBoundingBoxAttachment* box = SUB_CAST(spBoundingBoxAttachment, attachment); + entry = Json_getItem(attachmentMap, "vertices"); + box->verticesCount = entry->size; + box->vertices = MALLOC(float, entry->size); + for (entry = entry->child, i = 0; entry; entry = entry->next, ++i) + box->vertices[i] = entry->valueFloat * self->scale; + break; + } + } + + spSkin_addAttachment(skin, slotIndex, skinAttachmentName, attachment); + } + } + } + } + + /* Events. */ + events = Json_getItem(root, "events"); + if (events) { + Json *eventMap; + const char* stringValue; + skeletonData->eventsCount = events->size; + skeletonData->events = MALLOC(spEventData*, events->size); + for (eventMap = events->child, i = 0; eventMap; eventMap = eventMap->next, ++i) { + spEventData* eventData = spEventData_create(eventMap->name); + eventData->intValue = Json_getInt(eventMap, "int", 0); + eventData->floatValue = Json_getFloat(eventMap, "float", 0); + stringValue = Json_getString(eventMap, "string", 0); + if (stringValue) MALLOC_STR(eventData->stringValue, stringValue); + skeletonData->events[i] = eventData; + } + } + + /* Animations. */ + animations = Json_getItem(root, "animations"); + if (animations) { + Json *animationMap; + skeletonData->animations = MALLOC(spAnimation*, animations->size); + for (animationMap = animations->child; animationMap; animationMap = animationMap->next) + _spSkeletonJson_readAnimation(self, animationMap, skeletonData); + } + + Json_dispose(root); + return skeletonData; +} diff --git a/cocos/editor-support/spine/SkeletonJson.cpp b/cocos/editor-support/spine/SkeletonJson.cpp deleted file mode 100644 index ddcdd538eb..0000000000 --- a/cocos/editor-support/spine/SkeletonJson.cpp +++ /dev/null @@ -1,504 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include "Json.h" -#include -#include -#include - -typedef struct { - spSkeletonJson super; - int ownsLoader; -} _spSkeletonJson; - -spSkeletonJson* spSkeletonJson_createWithLoader (spAttachmentLoader* attachmentLoader) { - spSkeletonJson* self = SUPER(NEW(_spSkeletonJson)); - self->scale = 1; - self->attachmentLoader = attachmentLoader; - return self; -} - -spSkeletonJson* spSkeletonJson_create (spAtlas* atlas) { - spAtlasAttachmentLoader* attachmentLoader = spAtlasAttachmentLoader_create(atlas); - spSkeletonJson* self = spSkeletonJson_createWithLoader(SUPER(attachmentLoader)); - SUB_CAST(_spSkeletonJson, self)->ownsLoader = 1; - return self; -} - -void spSkeletonJson_dispose (spSkeletonJson* self) { - if (SUB_CAST(_spSkeletonJson, self)->ownsLoader) spAttachmentLoader_dispose(self->attachmentLoader); - FREE(self->error); - FREE(self); -} - -void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* value1, const char* value2) { - char message[256]; - size_t length = 0; - FREE(self->error); - strcpy(message, value1); - length = strlen(value1); - if (value2) strncat(message + length, value2, 256 - length); - MALLOC_STR(self->error, message); - if (root) Json_dispose(root); -} - -static float toColor (const char* value, int index) { - char digits[3]; - char *error; - - if (strlen(value) != 8) return -1; - value += index * 2; - - digits[0] = *value; - digits[1] = *(value + 1); - digits[2] = '\0'; - auto color = strtoul(digits, &error, 16); - if (*error != 0) return -1; - return color / (float)255; -} - -static void readCurve (spCurveTimeline* timeline, int frameIndex, Json* frame) { - Json* curve = Json_getItem(frame, "curve"); - if (!curve) return; - if (curve->type == Json_String && strcmp(curve->valueString, "stepped") == 0) - spCurveTimeline_setStepped(timeline, frameIndex); - else if (curve->type == Json_Array) { - Json* child0 = curve->child; - Json* child1 = child0->next; - Json* child2 = child1->next; - Json* child3 = child2->next; - spCurveTimeline_setCurve(timeline, frameIndex, child0->valueFloat, child1->valueFloat, child2->valueFloat, - child3->valueFloat); - } -} - -static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* root, spSkeletonData *skeletonData) { - int i; - spAnimation* animation; - - Json* bones = Json_getItem(root, "bones"); - Json* slots = Json_getItem(root, "slots"); - Json* drawOrder = Json_getItem(root, "draworder"); - Json* events = Json_getItem(root, "events"); - Json *boneMap, *slotMap; - - int timelineCount = 0; - for (boneMap = bones ? bones->child : 0; boneMap; boneMap = boneMap->next) - timelineCount += boneMap->size; - for (slotMap = slots ? slots->child : 0; slotMap; slotMap = slotMap->next) - timelineCount += slotMap->size; - if (events) ++timelineCount; - if (drawOrder) ++timelineCount; - - animation = spAnimation_create(root->name, timelineCount); - animation->timelineCount = 0; - skeletonData->animations[skeletonData->animationCount] = animation; - ++skeletonData->animationCount; - - for (boneMap = bones ? bones->child : 0; boneMap; boneMap = boneMap->next) { - Json *timelineArray; - - int boneIndex = spSkeletonData_findBoneIndex(skeletonData, boneMap->name); - if (boneIndex == -1) { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, root, "spBone not found: ", boneMap->name); - return 0; - } - - for (timelineArray = boneMap->child; timelineArray; timelineArray = timelineArray->next) { - Json* frame; - float duration; - - if (strcmp(timelineArray->name, "rotate") == 0) { - spRotateTimeline *timeline = spRotateTimeline_create(timelineArray->size); - timeline->boneIndex = boneIndex; - for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { - spRotateTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getFloat(frame, "angle", 0)); - readCurve(SUPER(timeline), i, frame); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[timelineArray->size * 2 - 2]; - if (duration > animation->duration) animation->duration = duration; - - } else { - int isScale = strcmp(timelineArray->name, "scale") == 0; - if (isScale || strcmp(timelineArray->name, "translate") == 0) { - float scale = isScale ? 1 : self->scale; - spTranslateTimeline *timeline = - isScale ? spScaleTimeline_create(timelineArray->size) : spTranslateTimeline_create(timelineArray->size); - timeline->boneIndex = boneIndex; - for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { - spTranslateTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getFloat(frame, "x", 0) * scale, - Json_getFloat(frame, "y", 0) * scale); - readCurve(SUPER(timeline), i, frame); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[timelineArray->size * 3 - 3]; - if (duration > animation->duration) animation->duration = duration; - } else { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, 0, "Invalid timeline type for a bone: ", timelineArray->name); - return 0; - } - } - } - } - - for (slotMap = slots ? slots->child : 0; slotMap; slotMap = slotMap->next) { - Json *timelineArray; - - int slotIndex = spSkeletonData_findSlotIndex(skeletonData, slotMap->name); - if (slotIndex == -1) { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, root, "Slot not found: ", slotMap->name); - return 0; - } - - for (timelineArray = slotMap->child; timelineArray; timelineArray = timelineArray->next) { - Json* frame; - float duration; - - if (strcmp(timelineArray->name, "color") == 0) { - spColorTimeline *timeline = spColorTimeline_create(timelineArray->size); - timeline->slotIndex = slotIndex; - for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { - const char* s = Json_getString(frame, "color", 0); - spColorTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), toColor(s, 0), toColor(s, 1), toColor(s, 2), - toColor(s, 3)); - readCurve(SUPER(timeline), i, frame); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[timelineArray->size * 5 - 5]; - if (duration > animation->duration) animation->duration = duration; - - } else if (strcmp(timelineArray->name, "attachment") == 0) { - spAttachmentTimeline *timeline = spAttachmentTimeline_create(timelineArray->size); - timeline->slotIndex = slotIndex; - for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) { - Json* name = Json_getItem(frame, "name"); - spAttachmentTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), - name->type == Json_NULL ? 0 : name->valueString); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[timelineArray->size - 1]; - if (duration > animation->duration) animation->duration = duration; - - } else { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, 0, "Invalid timeline type for a slot: ", timelineArray->name); - return 0; - } - } - } - - if (events) { - Json* frame; - float duration; - - spEventTimeline* timeline = spEventTimeline_create(events->size); - for (frame = events->child, i = 0; frame; frame = frame->next, ++i) { - spEvent* event; - const char* stringValue; - spEventData* eventData = spSkeletonData_findEvent(skeletonData, Json_getString(frame, "name", 0)); - if (!eventData) { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, 0, "Event not found: ", Json_getString(frame, "name", 0)); - return 0; - } - event = spEvent_create(eventData); - event->intValue = Json_getInt(frame, "int", eventData->intValue); - event->floatValue = Json_getFloat(frame, "float", eventData->floatValue); - stringValue = Json_getString(frame, "string", eventData->stringValue); - if (stringValue) MALLOC_STR(event->stringValue, stringValue); - spEventTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), event); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[events->size - 1]; - if (duration > animation->duration) animation->duration = duration; - } - - if (drawOrder) { - Json* frame; - float duration; - - spDrawOrderTimeline* timeline = spDrawOrderTimeline_create(drawOrder->size, skeletonData->slotCount); - for (frame = drawOrder->child, i = 0; frame; frame = frame->next, ++i) { - int ii; - int* drawOrderArray = 0; - Json* offsets = Json_getItem(frame, "offsets"); - if (offsets) { - Json* offsetMap; - int* unchanged = MALLOC(int, skeletonData->slotCount - offsets->size); - int originalIndex = 0, unchangedIndex = 0; - - drawOrderArray = MALLOC(int, skeletonData->slotCount); - for (ii = skeletonData->slotCount - 1; ii >= 0; --ii) - drawOrderArray[ii] = -1; - - for (offsetMap = offsets->child; offsetMap; offsetMap = offsetMap->next) { - int slotIndex = spSkeletonData_findSlotIndex(skeletonData, Json_getString(offsetMap, "slot", 0)); - if (slotIndex == -1) { - spAnimation_dispose(animation); - _spSkeletonJson_setError(self, 0, "Slot not found: ", Json_getString(offsetMap, "slot", 0)); - return 0; - } - /* Collect unchanged items. */ - while (originalIndex != slotIndex) - unchanged[unchangedIndex++] = originalIndex++; - /* Set changed items. */ - drawOrderArray[originalIndex + Json_getInt(offsetMap, "offset", 0)] = originalIndex; - ++originalIndex; - } - /* Collect remaining unchanged items. */ - while (originalIndex < skeletonData->slotCount) - unchanged[unchangedIndex++] = originalIndex++; - /* Fill in unchanged items. */ - for (ii = skeletonData->slotCount - 1; ii >= 0; ii--) - if (drawOrderArray[ii] == -1) drawOrderArray[ii] = unchanged[--unchangedIndex]; - FREE(unchanged); - } - spDrawOrderTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), drawOrderArray); - FREE(drawOrderArray); - } - animation->timelines[animation->timelineCount++] = (spTimeline*)timeline; - duration = timeline->frames[drawOrder->size - 1]; - if (duration > animation->duration) animation->duration = duration; - } - - return animation; -} - -spSkeletonData* spSkeletonJson_readSkeletonDataFile (spSkeletonJson* self, const char* path) { - int length; - spSkeletonData* skeletonData; - const char* json = _spUtil_readFile(path, &length); - if (!json) { - _spSkeletonJson_setError(self, 0, "Unable to read skeleton file: ", path); - return 0; - } - skeletonData = spSkeletonJson_readSkeletonData(self, json); - FREE(json); - return skeletonData; -} - -spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const char* json) { - int i; - spSkeletonData* skeletonData; - Json *root, *bones, *boneMap, *slots, *skins, *animations, *events; - - FREE(self->error); - CONST_CAST(char*, self->error) = 0; - - root = Json_create(json); - if (!root) { - _spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError()); - return 0; - } - - skeletonData = spSkeletonData_create(); - - bones = Json_getItem(root, "bones"); - skeletonData->bones = MALLOC(spBoneData*, bones->size); - for (boneMap = bones->child, i = 0; boneMap; boneMap = boneMap->next, ++i) { - spBoneData* boneData; - - spBoneData* parent = 0; - const char* parentName = Json_getString(boneMap, "parent", 0); - if (parentName) { - parent = spSkeletonData_findBone(skeletonData, parentName); - if (!parent) { - spSkeletonData_dispose(skeletonData); - _spSkeletonJson_setError(self, root, "Parent bone not found: ", parentName); - return 0; - } - } - - boneData = spBoneData_create(Json_getString(boneMap, "name", 0), parent); - boneData->length = Json_getFloat(boneMap, "length", 0) * self->scale; - boneData->x = Json_getFloat(boneMap, "x", 0) * self->scale; - boneData->y = Json_getFloat(boneMap, "y", 0) * self->scale; - boneData->rotation = Json_getFloat(boneMap, "rotation", 0); - boneData->scaleX = Json_getFloat(boneMap, "scaleX", 1); - boneData->scaleY = Json_getFloat(boneMap, "scaleY", 1); - boneData->inheritScale = Json_getInt(boneMap, "inheritScale", 1); - boneData->inheritRotation = Json_getInt(boneMap, "inheritRotation", 1); - - skeletonData->bones[i] = boneData; - ++skeletonData->boneCount; - } - - slots = Json_getItem(root, "slots"); - if (slots) { - Json *slotMap; - skeletonData->slots = MALLOC(spSlotData*, slots->size); - for (slotMap = slots->child, i = 0; slotMap; slotMap = slotMap->next, ++i) { - spSlotData* slotData; - const char* color; - Json *attachmentItem; - - const char* boneName = Json_getString(slotMap, "bone", 0); - spBoneData* boneData = spSkeletonData_findBone(skeletonData, boneName); - if (!boneData) { - spSkeletonData_dispose(skeletonData); - _spSkeletonJson_setError(self, root, "spSlot bone not found: ", boneName); - return 0; - } - - slotData = spSlotData_create(Json_getString(slotMap, "name", 0), boneData); - - color = Json_getString(slotMap, "color", 0); - if (color) { - slotData->r = toColor(color, 0); - slotData->g = toColor(color, 1); - slotData->b = toColor(color, 2); - slotData->a = toColor(color, 3); - } - - attachmentItem = Json_getItem(slotMap, "attachment"); - if (attachmentItem) spSlotData_setAttachmentName(slotData, attachmentItem->valueString); - - slotData->additiveBlending = Json_getInt(slotMap, "additive", 0); - - skeletonData->slots[i] = slotData; - ++skeletonData->slotCount; - } - } - - skins = Json_getItem(root, "skins"); - if (skins) { - Json *slotMap; - skeletonData->skins = MALLOC(spSkin*, skins->size); - for (slotMap = skins->child, i = 0; slotMap; slotMap = slotMap->next, ++i) { - Json *attachmentsMap; - spSkin *skin = spSkin_create(slotMap->name); - - skeletonData->skins[i] = skin; - ++skeletonData->skinCount; - if (strcmp(slotMap->name, "default") == 0) skeletonData->defaultSkin = skin; - - for (attachmentsMap = slotMap->child; attachmentsMap; attachmentsMap = attachmentsMap->next) { - int slotIndex = spSkeletonData_findSlotIndex(skeletonData, attachmentsMap->name); - Json *attachmentMap; - - for (attachmentMap = attachmentsMap->child; attachmentMap; attachmentMap = attachmentMap->next) { - spAttachment* attachment; - const char* skinAttachmentName = attachmentMap->name; - const char* attachmentName = Json_getString(attachmentMap, "name", skinAttachmentName); - - const char* typeString = Json_getString(attachmentMap, "type", "region"); - spAttachmentType type; - if (strcmp(typeString, "region") == 0) - type = ATTACHMENT_REGION; - else if (strcmp(typeString, "boundingbox") == 0) - type = ATTACHMENT_BOUNDING_BOX; - else if (strcmp(typeString, "regionsequence") == 0) - type = ATTACHMENT_REGION_SEQUENCE; - else { - spSkeletonData_dispose(skeletonData); - _spSkeletonJson_setError(self, root, "Unknown attachment type: ", typeString); - return 0; - } - - attachment = spAttachmentLoader_newAttachment(self->attachmentLoader, skin, type, attachmentName); - if (!attachment) { - if (self->attachmentLoader->error1) { - spSkeletonData_dispose(skeletonData); - _spSkeletonJson_setError(self, root, self->attachmentLoader->error1, self->attachmentLoader->error2); - return 0; - } - continue; - } - - switch (attachment->type) { - case ATTACHMENT_REGION: - case ATTACHMENT_REGION_SEQUENCE: { - spRegionAttachment* regionAttachment = (spRegionAttachment*)attachment; - regionAttachment->x = Json_getFloat(attachmentMap, "x", 0) * self->scale; - regionAttachment->y = Json_getFloat(attachmentMap, "y", 0) * self->scale; - regionAttachment->scaleX = Json_getFloat(attachmentMap, "scaleX", 1); - regionAttachment->scaleY = Json_getFloat(attachmentMap, "scaleY", 1); - regionAttachment->rotation = Json_getFloat(attachmentMap, "rotation", 0); - regionAttachment->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; - regionAttachment->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; - spRegionAttachment_updateOffset(regionAttachment); - break; - } - case ATTACHMENT_BOUNDING_BOX: { - spBoundingBoxAttachment* box = (spBoundingBoxAttachment*)attachment; - Json* verticesArray = Json_getItem(attachmentMap, "vertices"); - Json* vertex; - int j = 0; - box->verticesCount = verticesArray->size; - box->vertices = MALLOC(float, verticesArray->size); - for (vertex = verticesArray->child, j = 0; vertex; vertex = vertex->next, ++j) - box->vertices[j] = vertex->valueFloat * self->scale; - break; - } - } - - spSkin_addAttachment(skin, slotIndex, skinAttachmentName, attachment); - } - } - } - } - - /* Events. */ - events = Json_getItem(root, "events"); - if (events) { - Json *eventMap; - const char* stringValue; - skeletonData->events = MALLOC(spEventData*, events->size); - for (eventMap = events->child; eventMap; eventMap = eventMap->next) { - spEventData* eventData = spEventData_create(eventMap->name); - eventData->intValue = Json_getInt(eventMap, "int", 0); - eventData->floatValue = Json_getFloat(eventMap, "float", 0); - stringValue = Json_getString(eventMap, "string", 0); - if (stringValue) MALLOC_STR(eventData->stringValue, stringValue); - skeletonData->events[skeletonData->eventCount++] = eventData; - } - } - - /* Animations. */ - animations = Json_getItem(root, "animations"); - if (animations) { - Json *animationMap; - skeletonData->animations = MALLOC(spAnimation*, animations->size); - for (animationMap = animations->child; animationMap; animationMap = animationMap->next) - _spSkeletonJson_readAnimation(self, animationMap, skeletonData); - } - - Json_dispose(root); - return skeletonData; -} diff --git a/cocos/editor-support/spine/SkeletonJson.h b/cocos/editor-support/spine/SkeletonJson.h index 672f8d72a4..ba2bef5227 100644 --- a/cocos/editor-support/spine/SkeletonJson.h +++ b/cocos/editor-support/spine/SkeletonJson.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SKELETONJSON_H_ diff --git a/cocos/editor-support/spine/SkeletonRenderer.cpp b/cocos/editor-support/spine/SkeletonRenderer.cpp new file mode 100644 index 0000000000..5a062086dc --- /dev/null +++ b/cocos/editor-support/spine/SkeletonRenderer.cpp @@ -0,0 +1,391 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include +#include +#include + +USING_NS_CC; +using std::min; +using std::max; + +namespace spine { + +static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; + +SkeletonRenderer* SkeletonRenderer::createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) { + SkeletonRenderer* node = new SkeletonRenderer(skeletonData, ownsSkeletonData); + node->autorelease(); + return node; +} + +SkeletonRenderer* SkeletonRenderer::createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { + SkeletonRenderer* node = new SkeletonRenderer(skeletonDataFile, atlas, scale); + node->autorelease(); + return node; +} + +SkeletonRenderer* SkeletonRenderer::createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) { + SkeletonRenderer* node = new SkeletonRenderer(skeletonDataFile, atlasFile, scale); + node->autorelease(); + return node; +} + +void SkeletonRenderer::initialize () { + _atlas = 0; + _debugSlots = false; + _debugBones = false; + _timeScale = 1; + + _worldVertices = MALLOC(float, 1000); // Max number of vertices per mesh. + + _batch = PolygonBatch::createWithCapacity(2000); // Max number of vertices and triangles per batch. + _batch->retain(); + + _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; + setOpacityModifyRGB(true); + + setGLProgram(ShaderCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); + scheduleUpdate(); +} + +void SkeletonRenderer::setSkeletonData (spSkeletonData *skeletonData, bool ownsSkeletonData) { + _skeleton = spSkeleton_create(skeletonData); + _ownsSkeletonData = ownsSkeletonData; +} + +SkeletonRenderer::SkeletonRenderer () { + initialize(); +} + +SkeletonRenderer::SkeletonRenderer (spSkeletonData *skeletonData, bool ownsSkeletonData) { + initialize(); + + setSkeletonData(skeletonData, ownsSkeletonData); +} + +SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { + initialize(); + + spSkeletonJson* json = spSkeletonJson_create(atlas); + json->scale = scale; + spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile.c_str()); + CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data."); + spSkeletonJson_dispose(json); + + setSkeletonData(skeletonData, true); +} + +SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) { + initialize(); + + _atlas = spAtlas_createFromFile(atlasFile.c_str(), 0); + CCASSERT(_atlas, "Error reading atlas file."); + + spSkeletonJson* json = spSkeletonJson_create(_atlas); + json->scale = scale; + spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile.c_str()); + CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data file."); + spSkeletonJson_dispose(json); + + setSkeletonData(skeletonData, true); +} + +SkeletonRenderer::~SkeletonRenderer () { + if (_ownsSkeletonData) spSkeletonData_dispose(_skeleton->data); + if (_atlas) spAtlas_dispose(_atlas); + spSkeleton_dispose(_skeleton); + _batch->release(); + FREE(_worldVertices); +} + +void SkeletonRenderer::update (float deltaTime) { + spSkeleton_update(_skeleton, deltaTime * _timeScale); +} + +void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t transformFlags) { + _drawCommand.init(_globalZOrder); + _drawCommand.func = CC_CALLBACK_0(SkeletonRenderer::drawSkeleton, this, transform, transformFlags); + renderer->addCommand(&_drawCommand); +} + +void SkeletonRenderer::drawSkeleton (const Mat4 &transform, uint32_t transformFlags) { + getGLProgramState()->apply(transform); + + Color3B nodeColor = getColor(); + _skeleton->r = nodeColor.r / (float)255; + _skeleton->g = nodeColor.g / (float)255; + _skeleton->b = nodeColor.b / (float)255; + _skeleton->a = getDisplayedOpacity() / (float)255; + + int additive = -1; + Color4B color; + const float* uvs = nullptr; + int verticesCount = 0; + const int* triangles = nullptr; + int trianglesCount = 0; + float r = 0, g = 0, b = 0, a = 0; + for (int i = 0, n = _skeleton->slotsCount; i < n; i++) { + spSlot* slot = _skeleton->drawOrder[i]; + if (!slot->attachment) continue; + Texture2D *texture = nullptr; + switch (slot->attachment->type) { + case SP_ATTACHMENT_REGION: { + spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; + spRegionAttachment_computeWorldVertices(attachment, slot->bone, _worldVertices); + texture = getTexture(attachment); + uvs = attachment->uvs; + verticesCount = 8; + triangles = quadTriangles; + trianglesCount = 6; + r = attachment->r; + g = attachment->g; + b = attachment->b; + a = attachment->a; + break; + } + case SP_ATTACHMENT_MESH: { + spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment; + spMeshAttachment_computeWorldVertices(attachment, slot, _worldVertices); + texture = getTexture(attachment); + uvs = attachment->uvs; + verticesCount = attachment->verticesCount; + triangles = attachment->triangles; + trianglesCount = attachment->trianglesCount; + r = attachment->r; + g = attachment->g; + b = attachment->b; + a = attachment->a; + break; + } + case SP_ATTACHMENT_SKINNED_MESH: { + spSkinnedMeshAttachment* attachment = (spSkinnedMeshAttachment*)slot->attachment; + spSkinnedMeshAttachment_computeWorldVertices(attachment, slot, _worldVertices); + texture = getTexture(attachment); + uvs = attachment->uvs; + verticesCount = attachment->uvsCount; + triangles = attachment->triangles; + trianglesCount = attachment->trianglesCount; + r = attachment->r; + g = attachment->g; + b = attachment->b; + a = attachment->a; + break; + } + default: ; + } + if (texture) { + if (slot->data->additiveBlending != additive) { + _batch->flush(); + GL::blendFunc(_blendFunc.src, slot->data->additiveBlending ? GL_ONE : _blendFunc.dst); + additive = slot->data->additiveBlending; + } + color.a = _skeleton->a * slot->a * a * 255; + float multiplier = _premultipliedAlpha ? color.a : 255; + color.r = _skeleton->r * slot->r * r * multiplier; + color.g = _skeleton->g * slot->g * g * multiplier; + color.b = _skeleton->b * slot->b * b * multiplier; + _batch->add(texture, _worldVertices, uvs, verticesCount, triangles, trianglesCount, &color); + } + } + _batch->flush(); + + if (_debugSlots || _debugBones) { + Director* director = Director::getInstance(); + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, transform); + + if (_debugSlots) { + // Slots. + DrawPrimitives::setDrawColor4B(0, 0, 255, 255); + glLineWidth(1); + Vec2 points[4]; + V3F_C4B_T2F_Quad quad; + for (int i = 0, n = _skeleton->slotsCount; i < n; i++) { + spSlot* slot = _skeleton->drawOrder[i]; + if (!slot->attachment || slot->attachment->type != SP_ATTACHMENT_REGION) continue; + spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; + spRegionAttachment_computeWorldVertices(attachment, slot->bone, _worldVertices); + points[0] = Vec2(_worldVertices[0], _worldVertices[1]); + points[1] = Vec2(_worldVertices[2], _worldVertices[3]); + points[2] = Vec2(_worldVertices[4], _worldVertices[5]); + points[3] = Vec2(_worldVertices[6], _worldVertices[7]); + DrawPrimitives::drawPoly(points, 4, true); + } + } + if (_debugBones) { + // Bone lengths. + glLineWidth(2); + DrawPrimitives::setDrawColor4B(255, 0, 0, 255); + for (int i = 0, n = _skeleton->bonesCount; i < n; i++) { + spBone *bone = _skeleton->bones[i]; + float x = bone->data->length * bone->m00 + bone->worldX; + float y = bone->data->length * bone->m10 + bone->worldY; + DrawPrimitives::drawLine(Vec2(bone->worldX, bone->worldY), Vec2(x, y)); + } + // Bone origins. + DrawPrimitives::setPointSize(4); + DrawPrimitives::setDrawColor4B(0, 0, 255, 255); // Root bone is blue. + for (int i = 0, n = _skeleton->bonesCount; i < n; i++) { + spBone *bone = _skeleton->bones[i]; + DrawPrimitives::drawPoint(Vec2(bone->worldX, bone->worldY)); + if (i == 0) DrawPrimitives::setDrawColor4B(0, 255, 0, 255); + } + } + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + } +} + +Texture2D* SkeletonRenderer::getTexture (spRegionAttachment* attachment) const { + return (Texture2D*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject; +} + +Texture2D* SkeletonRenderer::getTexture (spMeshAttachment* attachment) const { + return (Texture2D*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject; +} + +Texture2D* SkeletonRenderer::getTexture (spSkinnedMeshAttachment* attachment) const { + return (Texture2D*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject; +} + +Rect SkeletonRenderer::getBoundingBox () const { + float minX = FLT_MAX, minY = FLT_MAX, maxX = FLT_MIN, maxY = FLT_MIN; + float scaleX = getScaleX(), scaleY = getScaleY(); + for (int i = 0; i < _skeleton->slotsCount; ++i) { + spSlot* slot = _skeleton->slots[i]; + if (!slot->attachment) continue; + int verticesCount; + if (slot->attachment->type == SP_ATTACHMENT_REGION) { + spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; + spRegionAttachment_computeWorldVertices(attachment, slot->bone, _worldVertices); + verticesCount = 8; + } else if (slot->attachment->type == SP_ATTACHMENT_MESH) { + spMeshAttachment* mesh = (spMeshAttachment*)slot->attachment; + spMeshAttachment_computeWorldVertices(mesh, slot, _worldVertices); + verticesCount = mesh->verticesCount; + } else if (slot->attachment->type == SP_ATTACHMENT_SKINNED_MESH) { + spSkinnedMeshAttachment* mesh = (spSkinnedMeshAttachment*)slot->attachment; + spSkinnedMeshAttachment_computeWorldVertices(mesh, slot, _worldVertices); + verticesCount = mesh->uvsCount; + } else + continue; + for (int ii = 0; ii < verticesCount; ii += 2) { + float x = _worldVertices[ii] * scaleX, y = _worldVertices[ii + 1] * scaleY; + minX = min(minX, x); + minY = min(minY, y); + maxX = max(maxX, x); + maxY = max(maxY, y); + } + } + Vec2 position = getPosition(); + return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY); +} + +// --- Convenience methods for Skeleton_* functions. + +void SkeletonRenderer::updateWorldTransform () { + spSkeleton_updateWorldTransform(_skeleton); +} + +void SkeletonRenderer::setToSetupPose () { + spSkeleton_setToSetupPose(_skeleton); +} +void SkeletonRenderer::setBonesToSetupPose () { + spSkeleton_setBonesToSetupPose(_skeleton); +} +void SkeletonRenderer::setSlotsToSetupPose () { + spSkeleton_setSlotsToSetupPose(_skeleton); +} + +spBone* SkeletonRenderer::findBone (const std::string& boneName) const { + return spSkeleton_findBone(_skeleton, boneName.c_str()); +} + +spSlot* SkeletonRenderer::findSlot (const std::string& slotName) const { + return spSkeleton_findSlot(_skeleton, slotName.c_str()); +} + +bool SkeletonRenderer::setSkin (const std::string& skinName) { + return spSkeleton_setSkinByName(_skeleton, skinName.c_str()) ? true : false; +} + +spAttachment* SkeletonRenderer::getAttachment (const std::string& slotName, const std::string& attachmentName) const { + return spSkeleton_getAttachmentForSlotName(_skeleton, slotName.c_str(), attachmentName.c_str()); +} +bool SkeletonRenderer::setAttachment (const std::string& slotName, const std::string& attachmentName) { + return spSkeleton_setAttachment(_skeleton, slotName.c_str(), attachmentName.c_str()) ? true : false; +} + +spSkeleton* SkeletonRenderer::getSkeleton () { + return _skeleton; +} + +void SkeletonRenderer::setTimeScale (float scale) { + _timeScale = scale; +} +float SkeletonRenderer::getTimeScale () const { + return _timeScale; +} + +void SkeletonRenderer::setDebugSlotsEnabled (bool enabled) { + _debugSlots = enabled; +} +bool SkeletonRenderer::getDebugSlotsEnabled () const { + return _debugSlots; +} + +void SkeletonRenderer::setDebugBonesEnabled (bool enabled) { + _debugBones = enabled; +} +bool SkeletonRenderer::getDebugBonesEnabled () const { + return _debugBones; +} + +// --- CCBlendProtocol + +const BlendFunc& SkeletonRenderer::getBlendFunc () const { + return _blendFunc; +} + +void SkeletonRenderer::setBlendFunc (const BlendFunc &blendFunc) { + _blendFunc = blendFunc; +} + +void SkeletonRenderer::setOpacityModifyRGB (bool value) { + _premultipliedAlpha = value; +} + +bool SkeletonRenderer::isOpacityModifyRGB () const { + return _premultipliedAlpha; +} + +} diff --git a/cocos/editor-support/spine/SkeletonRenderer.h b/cocos/editor-support/spine/SkeletonRenderer.h new file mode 100644 index 0000000000..13ea00f871 --- /dev/null +++ b/cocos/editor-support/spine/SkeletonRenderer.h @@ -0,0 +1,120 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_SKELETONRENDERER_H_ +#define SPINE_SKELETONRENDERER_H_ + +#include +#include "cocos2d.h" + +namespace spine { + +class PolygonBatch; + +/** Draws a skeleton. */ +class SkeletonRenderer: public cocos2d::Node, public cocos2d::BlendProtocol { +public: + static SkeletonRenderer* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false); + static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); + static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); + + virtual void update (float deltaTime) override; + virtual void draw (cocos2d::Renderer* renderer, const cocos2d::Mat4& transform, uint32_t transformFlags) override; + virtual void drawSkeleton (const cocos2d::Mat4& transform, uint32_t transformFlags); + virtual cocos2d::Rect getBoundingBox () const override; + + spSkeleton* getSkeleton(); + + void setTimeScale(float scale); + float getTimeScale() const; + + void setDebugSlotsEnabled(bool enabled); + bool getDebugSlotsEnabled() const; + + void setDebugBonesEnabled(bool enabled); + bool getDebugBonesEnabled() const; + + // --- Convenience methods for common Skeleton_* functions. + void updateWorldTransform (); + + void setToSetupPose (); + void setBonesToSetupPose (); + void setSlotsToSetupPose (); + + /* Returns 0 if the bone was not found. */ + spBone* findBone (const std::string& boneName) const; + /* Returns 0 if the slot was not found. */ + spSlot* findSlot (const std::string& slotName) const; + + /* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are + * attached if the corresponding attachment from the old skin was attached. Returns false if the skin was not found. + * @param skin May be 0.*/ + bool setSkin (const std::string& skinName); + + /* Returns 0 if the slot or attachment was not found. */ + spAttachment* getAttachment (const std::string& slotName, const std::string& attachmentName) const; + /* Returns false if the slot or attachment was not found. */ + bool setAttachment (const std::string& slotName, const std::string& attachmentName); + + // --- BlendProtocol + virtual void setBlendFunc (const cocos2d::BlendFunc& blendFunc); + virtual const cocos2d::BlendFunc& getBlendFunc () const; + virtual void setOpacityModifyRGB (bool value); + virtual bool isOpacityModifyRGB () const; + +protected: + SkeletonRenderer (); + SkeletonRenderer (spSkeletonData* skeletonData, bool ownsSkeletonData = false); + SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); + SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); + virtual ~SkeletonRenderer (); + void initialize (); + + void setSkeletonData (spSkeletonData* skeletonData, bool ownsSkeletonData); + virtual cocos2d::Texture2D* getTexture (spRegionAttachment* attachment) const; + virtual cocos2d::Texture2D* getTexture (spMeshAttachment* attachment) const; + virtual cocos2d::Texture2D* getTexture (spSkinnedMeshAttachment* attachment) const; + + bool _ownsSkeletonData; + spAtlas* _atlas; + cocos2d::CustomCommand _drawCommand; + cocos2d::BlendFunc _blendFunc; + PolygonBatch* _batch; + float* _worldVertices; + bool _premultipliedAlpha; + spSkeleton* _skeleton; + float _timeScale; + bool _debugSlots; + bool _debugBones; +}; + +} + +#endif /* SPINE_SKELETONRENDERER_H_ */ diff --git a/cocos/editor-support/spine/Skin.cpp b/cocos/editor-support/spine/Skin.c similarity index 60% rename from cocos/editor-support/spine/Skin.cpp rename to cocos/editor-support/spine/Skin.c index 0812888271..d2f2e27e30 100644 --- a/cocos/editor-support/spine/Skin.cpp +++ b/cocos/editor-support/spine/Skin.c @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #include diff --git a/cocos/editor-support/spine/Skin.h b/cocos/editor-support/spine/Skin.h index da40803409..22d56fe9cc 100644 --- a/cocos/editor-support/spine/Skin.h +++ b/cocos/editor-support/spine/Skin.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SKIN_H_ diff --git a/cocos/editor-support/spine/SkinnedMeshAttachment.c b/cocos/editor-support/spine/SkinnedMeshAttachment.c new file mode 100644 index 0000000000..1697d7948e --- /dev/null +++ b/cocos/editor-support/spine/SkinnedMeshAttachment.c @@ -0,0 +1,109 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +void _spSkinnedMeshAttachment_dispose (spAttachment* attachment) { + spSkinnedMeshAttachment* self = SUB_CAST(spSkinnedMeshAttachment, attachment); + _spAttachment_deinit(attachment); + FREE(self->path); + FREE(self->bones); + FREE(self->weights); + FREE(self->regionUVs); + FREE(self->uvs); + FREE(self->triangles); + FREE(self->edges); + FREE(self); +} + +spSkinnedMeshAttachment* spSkinnedMeshAttachment_create (const char* name) { + spSkinnedMeshAttachment* self = NEW(spSkinnedMeshAttachment); + self->r = 1; + self->g = 1; + self->b = 1; + self->a = 1; + _spAttachment_init(SUPER(self), name, SP_ATTACHMENT_SKINNED_MESH, _spSkinnedMeshAttachment_dispose); + return self; +} + +void spSkinnedMeshAttachment_updateUVs (spSkinnedMeshAttachment* self) { + int i; + float width = self->regionU2 - self->regionU, height = self->regionV2 - self->regionV; + FREE(self->uvs); + self->uvs = MALLOC(float, self->uvsCount); + if (self->regionRotate) { + for (i = 0; i < self->uvsCount; i += 2) { + self->uvs[i] = self->regionU + self->regionUVs[i + 1] * width; + self->uvs[i + 1] = self->regionV + height - self->regionUVs[i] * height; + } + } else { + for (i = 0; i < self->uvsCount; i += 2) { + self->uvs[i] = self->regionU + self->regionUVs[i] * width; + self->uvs[i + 1] = self->regionV + self->regionUVs[i + 1] * height; + } + } +} + +void spSkinnedMeshAttachment_computeWorldVertices (spSkinnedMeshAttachment* self, spSlot* slot, float* worldVertices) { + int w = 0, v = 0, b = 0, f = 0; + float x = slot->bone->skeleton->x, y = slot->bone->skeleton->y; + spBone** skeletonBones = slot->bone->skeleton->bones; + if (slot->attachmentVerticesCount == 0) { + for (; v < self->bonesCount; w += 2) { + float wx = 0, wy = 0; + const int nn = self->bones[v] + v; + v++; + for (; v <= nn; v++, b += 3) { + const spBone* bone = skeletonBones[self->bones[v]]; + const float vx = self->weights[b], vy = self->weights[b + 1], weight = self->weights[b + 2]; + wx += (vx * bone->m00 + vy * bone->m01 + bone->worldX) * weight; + wy += (vx * bone->m10 + vy * bone->m11 + bone->worldY) * weight; + } + worldVertices[w] = wx + x; + worldVertices[w + 1] = wy + y; + } + } else { + const float* ffd = slot->attachmentVertices; + for (; v < self->bonesCount; w += 2) { + float wx = 0, wy = 0; + const int nn = self->bones[v] + v; + v++; + for (; v <= nn; v++, b += 3, f += 2) { + const spBone* bone = skeletonBones[self->bones[v]]; + const float vx = self->weights[b] + ffd[f], vy = self->weights[b + 1] + ffd[f + 1], weight = self->weights[b + 2]; + wx += (vx * bone->m00 + vy * bone->m01 + bone->worldX) * weight; + wy += (vx * bone->m10 + vy * bone->m11 + bone->worldY) * weight; + } + worldVertices[w] = wx + x; + worldVertices[w + 1] = wy + y; + } + } +} diff --git a/cocos/editor-support/spine/SkinnedMeshAttachment.h b/cocos/editor-support/spine/SkinnedMeshAttachment.h new file mode 100644 index 0000000000..9d60565e65 --- /dev/null +++ b/cocos/editor-support/spine/SkinnedMeshAttachment.h @@ -0,0 +1,90 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_SKINNEDMESHATTACHMENT_H_ +#define SPINE_SKINNEDMESHATTACHMENT_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct spSkinnedMeshAttachment spSkinnedMeshAttachment; +struct spSkinnedMeshAttachment { + spAttachment super; + const char* path; + + int bonesCount; + int* bones; + + int weightsCount; + float* weights; + + int trianglesCount; + int* triangles; + + int uvsCount; + float* regionUVs; + float* uvs; + int hullLength; + + float r, g, b, a; + + void* rendererObject; + int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ + int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */ + int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */ + float regionU, regionV, regionU2, regionV2; + int/*bool*/regionRotate; + + /* Nonessential. */ + int edgesCount; + int* edges; + float width, height; +}; + +spSkinnedMeshAttachment* spSkinnedMeshAttachment_create (const char* name); +void spSkinnedMeshAttachment_updateUVs (spSkinnedMeshAttachment* self); +void spSkinnedMeshAttachment_computeWorldVertices (spSkinnedMeshAttachment* self, spSlot* slot, float* worldVertices); + +#ifdef SPINE_SHORT_NAMES +typedef spSkinnedMeshAttachment SkinnedMeshAttachment; +#define SkinnedMeshAttachment_create(...) spSkinnedMeshAttachment_create(__VA_ARGS__) +#define SkinnedMeshAttachment_updateUVs(...) spSkinnedMeshAttachment_updateUVs(__VA_ARGS__) +#define SkinnedMeshAttachment_computeWorldVertices(...) spSkinnedMeshAttachment_computeWorldVertices(__VA_ARGS__) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* SPINE_SKINNEDMESHATTACHMENT_H_ */ diff --git a/cocos/editor-support/spine/Slot.c b/cocos/editor-support/spine/Slot.c new file mode 100644 index 0000000000..8e4fcbf659 --- /dev/null +++ b/cocos/editor-support/spine/Slot.c @@ -0,0 +1,85 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +typedef struct { + spSlot super; + float attachmentTime; +} _spSlot; + +spSlot* spSlot_create (spSlotData* data, spBone* bone) { + spSlot* self = SUPER(NEW(_spSlot)); + CONST_CAST(spSlotData*, self->data) = data; + CONST_CAST(spBone*, self->bone) = bone; + spSlot_setToSetupPose(self); + return self; +} + +void spSlot_dispose (spSlot* self) { + FREE(self->attachmentVertices); + FREE(self); +} + +void spSlot_setAttachment (spSlot* self, spAttachment* attachment) { + CONST_CAST(spAttachment*, self->attachment) = attachment; + SUB_CAST(_spSlot, self)->attachmentTime = self->bone->skeleton->time; + self->attachmentVerticesCount = 0; +} + +void spSlot_setAttachmentTime (spSlot* self, float time) { + SUB_CAST(_spSlot, self)->attachmentTime = self->bone->skeleton->time - time; +} + +float spSlot_getAttachmentTime (const spSlot* self) { + return self->bone->skeleton->time - SUB_CAST(_spSlot, self) ->attachmentTime; +} + +void spSlot_setToSetupPose (spSlot* self) { + spAttachment* attachment = 0; + + self->r = self->data->r; + self->g = self->data->g; + self->b = self->data->b; + self->a = self->data->a; + + if (self->data->attachmentName) { + /* Find slot index. */ + int i; + for (i = 0; i < self->bone->skeleton->data->slotsCount; ++i) { + if (self->data == self->bone->skeleton->data->slots[i]) { + attachment = spSkeleton_getAttachmentForSlotIndex(self->bone->skeleton, i, self->data->attachmentName); + break; + } + } + } + spSlot_setAttachment(self, attachment); +} diff --git a/cocos/editor-support/spine/Slot.cpp b/cocos/editor-support/spine/Slot.cpp deleted file mode 100644 index 3dd5724464..0000000000 --- a/cocos/editor-support/spine/Slot.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include -#include - -typedef struct { - spSlot super; - float attachmentTime; -} _spSlot; - -spSlot* spSlot_create (spSlotData* data, spSkeleton* skeleton, spBone* bone) { - spSlot* self = SUPER(NEW(_spSlot)); - CONST_CAST(spSlotData*, self->data) = data; - CONST_CAST(spSkeleton*, self->skeleton) = skeleton; - CONST_CAST(spBone*, self->bone) = bone; - spSlot_setToSetupPose(self); - return self; -} - -void spSlot_dispose (spSlot* self) { - FREE(self); -} - -void spSlot_setAttachment (spSlot* self, spAttachment* attachment) { - CONST_CAST(spAttachment*, self->attachment) = attachment; - SUB_CAST(_spSlot, self) ->attachmentTime = self->skeleton->time; -} - -void spSlot_setAttachmentTime (spSlot* self, float time) { - SUB_CAST(_spSlot, self) ->attachmentTime = self->skeleton->time - time; -} - -float spSlot_getAttachmentTime (const spSlot* self) { - return self->skeleton->time - SUB_CAST(_spSlot, self) ->attachmentTime; -} - -void spSlot_setToSetupPose (spSlot* self) { - spAttachment* attachment = 0; - self->r = self->data->r; - self->g = self->data->g; - self->b = self->data->b; - self->a = self->data->a; - - if (self->data->attachmentName) { - /* Find slot index. */ - int i; - for (i = 0; i < self->skeleton->data->slotCount; ++i) { - if (self->data == self->skeleton->data->slots[i]) { - attachment = spSkeleton_getAttachmentForSlotIndex(self->skeleton, i, self->data->attachmentName); - break; - } - } - } - spSlot_setAttachment(self, attachment); -} diff --git a/cocos/editor-support/spine/Slot.h b/cocos/editor-support/spine/Slot.h index 9f7094db1b..9e5c66da4e 100644 --- a/cocos/editor-support/spine/Slot.h +++ b/cocos/editor-support/spine/Slot.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SLOT_H_ @@ -42,17 +39,18 @@ extern "C" { #endif -struct spSkeleton; - typedef struct spSlot { spSlotData* const data; - struct spSkeleton* const skeleton; spBone* const bone; float r, g, b, a; spAttachment* const attachment; + + int attachmentVerticesCapacity; + int attachmentVerticesCount; + float* attachmentVertices; } spSlot; -spSlot* spSlot_create (spSlotData* data, struct spSkeleton* skeleton, spBone* bone); +spSlot* spSlot_create (spSlotData* data, spBone* bone); void spSlot_dispose (spSlot* self); /* @param attachment May be 0 to clear the attachment for the slot. */ diff --git a/cocos/editor-support/spine/SlotData.c b/cocos/editor-support/spine/SlotData.c new file mode 100644 index 0000000000..a6ee840390 --- /dev/null +++ b/cocos/editor-support/spine/SlotData.c @@ -0,0 +1,57 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +spSlotData* spSlotData_create (const char* name, spBoneData* boneData) { + spSlotData* self = NEW(spSlotData); + MALLOC_STR(self->name, name); + CONST_CAST(spBoneData*, self->boneData) = boneData; + self->r = 1; + self->g = 1; + self->b = 1; + self->a = 1; + return self; +} + +void spSlotData_dispose (spSlotData* self) { + FREE(self->name); + FREE(self->attachmentName); + FREE(self); +} + +void spSlotData_setAttachmentName (spSlotData* self, const char* attachmentName) { + FREE(self->attachmentName); + if (attachmentName) + MALLOC_STR(self->attachmentName, attachmentName); + else + CONST_CAST(char*, self->attachmentName) = 0; +} diff --git a/cocos/editor-support/spine/SlotData.cpp b/cocos/editor-support/spine/SlotData.cpp deleted file mode 100644 index 15d7a4ab0e..0000000000 --- a/cocos/editor-support/spine/SlotData.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -spSlotData* spSlotData_create (const char* name, spBoneData* boneData) { - spSlotData* self = NEW(spSlotData); - MALLOC_STR(self->name, name); - CONST_CAST(spBoneData*, self->boneData) = boneData; - self->r = 1; - self->g = 1; - self->b = 1; - self->a = 1; - return self; -} - -void spSlotData_dispose (spSlotData* self) { - FREE(self->name); - FREE(self->attachmentName); - FREE(self); -} - -void spSlotData_setAttachmentName (spSlotData* self, const char* attachmentName) { - FREE(self->attachmentName); - if (attachmentName) - MALLOC_STR(self->attachmentName, attachmentName); - else - CONST_CAST(char*, self->attachmentName) = 0; -} diff --git a/cocos/editor-support/spine/SlotData.h b/cocos/editor-support/spine/SlotData.h index 7f00bfed39..f471326384 100644 --- a/cocos/editor-support/spine/SlotData.h +++ b/cocos/editor-support/spine/SlotData.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SLOTDATA_H_ @@ -43,7 +40,7 @@ extern "C" { typedef struct { const char* const name; const spBoneData* const boneData; - const char* const attachmentName; + const char* attachmentName; float r, g, b, a; int/*bool*/additiveBlending; } spSlotData; diff --git a/cocos/editor-support/spine/extension.c b/cocos/editor-support/spine/extension.c new file mode 100644 index 0000000000..f45bb2d268 --- /dev/null +++ b/cocos/editor-support/spine/extension.c @@ -0,0 +1,78 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include + +static void* (*mallocFunc) (size_t size) = malloc; +static void* (*debugMallocFunc) (size_t size, const char* file, int line) = NULL; +static void (*freeFunc) (void* ptr) = free; + +void* _malloc (size_t size, const char* file, int line) { + if(debugMallocFunc) + return debugMallocFunc(size, file, line); + + return mallocFunc(size); +} +void* _calloc (size_t num, size_t size, const char* file, int line) { + void* ptr = _malloc(num * size, file, line); + if (ptr) memset(ptr, 0, num * size); + return ptr; +} +void _free (void* ptr) { + freeFunc(ptr); +} + +void _setDebugMalloc(void* (*malloc) (size_t size, const char* file, int line)) { + debugMallocFunc = malloc; +} + +void _setMalloc (void* (*malloc) (size_t size)) { + mallocFunc = malloc; +} +void _setFree (void (*free) (void* ptr)) { + freeFunc = free; +} + +char* _readFile (const char* path, int* length) { + char *data; + FILE *file = fopen(path, "rb"); + if (!file) return 0; + + fseek(file, 0, SEEK_END); + *length = (int)ftell(file); + fseek(file, 0, SEEK_SET); + + data = MALLOC(char, *length); + fread(data, 1, *length, file); + fclose(file); + + return data; +} diff --git a/cocos/editor-support/spine/extension.cpp b/cocos/editor-support/spine/extension.cpp deleted file mode 100644 index 2a5ca375e1..0000000000 --- a/cocos/editor-support/spine/extension.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -static void* (*mallocFunc) (size_t size) = malloc; -static void (*freeFunc) (void* ptr) = free; - -void* _malloc (size_t size) { - return mallocFunc(size); -} -void* _calloc (size_t num, size_t size) { - void* ptr = mallocFunc(num * size); - if (ptr) memset(ptr, 0, num * size); - return ptr; -} -void _free (void* ptr) { - freeFunc(ptr); -} - -void _setMalloc (void* (*malloc) (size_t size)) { - mallocFunc = malloc; -} -void _setFree (void (*free) (void* ptr)) { - freeFunc = free; -} - -char* _readFile (const char* path, int* length) { - char *data; - FILE *file = fopen(path, "rb"); - if (!file) return 0; - - fseek(file, 0, SEEK_END); - *length = (int)ftell(file); - fseek(file, 0, SEEK_SET); - - data = MALLOC(char, *length); - fread(data, 1, *length, file); - fclose(file); - - return data; -} diff --git a/cocos/editor-support/spine/extension.h b/cocos/editor-support/spine/extension.h index 193c22fda4..281d632123 100644 --- a/cocos/editor-support/spine/extension.h +++ b/cocos/editor-support/spine/extension.h @@ -32,8 +32,8 @@ #define SPINE_EXTENSION_H_ /* All allocation uses these. */ -#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) -#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(COUNT, sizeof(TYPE))) +#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__)) +#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__)) #define NEW(TYPE) CALLOC(TYPE,1) /* Gets the direct super class. Type safe. */ @@ -55,23 +55,40 @@ #define FREE(VALUE) _free((void*)VALUE) /* Allocates a new char[], assigns it to TO, and copies FROM to it. Can be used on const types. */ -#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) +#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM) + +#define PI 3.1415926535897932385f +#define DEG_RAD (PI / 180) +#define RAD_DEG (180 / PI) #ifdef __STDC_VERSION__ #define FMOD(A,B) fmodf(A, B) +#define ATAN2(A,B) atan2f(A, B) +#define SIN(A) sinf(A) +#define COS(A) cosf(A) +#define SQRT(A) sqrtf(A) +#define ACOS(A) acosf(A) #else #define FMOD(A,B) (float)fmod(A, B) +#define ATAN2(A,B) (float)atan2(A, B) +#define COS(A) (float)cos(A) +#define SIN(A) (float)sin(A) +#define SQRT(A) (float)sqrt(A) +#define ACOS(A) (float)acos(A) #endif #include #include #include #include -#include -#include #include #include #include +#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { @@ -95,20 +112,35 @@ char* _spUtil_readFile (const char* path, int* length); * Internal API available for extension: */ -void* _malloc (size_t size); -void* _calloc (size_t num, size_t size); +void* _malloc (size_t size, const char* file, int line); +void* _calloc (size_t num, size_t size, const char* file, int line); void _free (void* ptr); void _setMalloc (void* (*_malloc) (size_t size)); +void _setDebugMalloc (void* (*_malloc) (size_t size, const char* file, int line)); void _setFree (void (*_free) (void* ptr)); char* _readFile (const char* path, int* length); /**/ +typedef struct { + spAnimationState super; + spEvent** events; + + spTrackEntry* (*createTrackEntry) (spAnimationState* self); + void (*disposeTrackEntry) (spTrackEntry* entry); +} _spAnimationState; + +spTrackEntry* _spTrackEntry_create (spAnimationState* self); +void _spTrackEntry_dispose (spTrackEntry* self); + +/**/ + void _spAttachmentLoader_init (spAttachmentLoader* self, /**/ void (*dispose) (spAttachmentLoader* self), /**/ -spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name)); + spAttachment* (*newAttachment) (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name, + const char* path)); void _spAttachmentLoader_deinit (spAttachmentLoader* self); void _spAttachmentLoader_setError (spAttachmentLoader* self, const char* error1, const char* error2); void _spAttachmentLoader_setUnknownTypeError (spAttachmentLoader* self, spAttachmentType type); @@ -136,7 +168,7 @@ void _spAttachment_deinit (spAttachment* self); void _spTimeline_init (spTimeline* self, spTimelineType type, /**/ void (*dispose) (spTimeline* self), /**/ void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha)); + int* eventsCount, float alpha)); void _spTimeline_deinit (spTimeline* self); #ifdef SPINE_SHORT_NAMES @@ -146,10 +178,10 @@ void _spTimeline_deinit (spTimeline* self); /**/ -void _spCurveTimeline_init (spCurveTimeline* self, spTimelineType type, int frameCount, /**/ +void _spCurveTimeline_init (spCurveTimeline* self, spTimelineType type, int framesCount, /**/ void (*dispose) (spTimeline* self), /**/ void (*apply) (const spTimeline* self, spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents, - int* eventCount, float alpha)); + int* eventsCount, float alpha)); void _spCurveTimeline_deinit (spCurveTimeline* self); #ifdef SPINE_SHORT_NAMES diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj old mode 100644 new mode 100755 index 2f033657b8..fe1ae21064 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj +++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj @@ -21,48 +21,58 @@ - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters old mode 100644 new mode 100755 index a6f105d4bc..a39c62298a --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters +++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters @@ -11,15 +11,6 @@ - - Header Files - - - Header Files - - - Header Files - Header Files @@ -56,115 +47,154 @@ Header Files - - Header Files - - - Header Files - Header Files + + Header Files + + + Header Files + Header Files + + Header Files + + + Header Files + Header Files Header Files - + Header Files Header Files + + Header Files + Header Files + + Header Files + Header Files + + Header Files + Header Files + + Header Files + + + Header Files + + + Header Files + - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + Source Files Source Files - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems new file mode 100644 index 0000000000..9a1fd46146 --- /dev/null +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems @@ -0,0 +1,139 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {adafd00d-a0d6-46ef-9f0b-ea2880bfe1de} + libSpine + libSpine.Shared + 248F659F-DAC5-46E8-AC09-60EC9FC95053 + + + + %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + false + + + false + + + + false + + + false + + + false + + + + false + + + false + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems.filters b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems.filters new file mode 100644 index 0000000000..06321d9f79 --- /dev/null +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems.filters @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj new file mode 100644 index 0000000000..dad17f335d --- /dev/null +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + {f3550fe0-c795-44f6-8feb-093eb68143ae} + libSpine + en-US + 12.0 + true + Windows Store + 8.1 + CodeSharingStaticLibrary + + + + StaticLibrary + true + v120 + + + StaticLibrary + true + v120 + + + StaticLibrary + true + v120 + + + StaticLibrary + false + true + v120 + + + StaticLibrary + false + true + v120 + + + StaticLibrary + false + true + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + + NotUsing + true + true + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + true + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj.filters b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj.filters new file mode 100644 index 0000000000..a7761ab018 --- /dev/null +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj.filters @@ -0,0 +1,5 @@ + + + + + diff --git a/cocos/audio/proj.wp8/CocosDenshion.vcxproj b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj similarity index 50% rename from cocos/audio/proj.wp8/CocosDenshion.vcxproj rename to cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj index 65cc59fcec..29792e4c2d 100644 --- a/cocos/audio/proj.wp8/CocosDenshion.vcxproj +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj @@ -1,89 +1,103 @@  - + - - Debug - Win32 - Debug ARM - - Release + + Debug Win32 Release ARM + + Release + Win32 + - {DF125891-EEE9-4466-B903-F828FD272158} - CocosDenshion.win32 + {cc1da216-a80d-4be4-b309-acb6af313aff} + libSpine en-US - 11.0 + 12.0 + true + Windows Phone + 8.1 + CodeSharingStaticLibrary StaticLibrary true - v110_wp80 + v120_wp81 StaticLibrary true - v110_wp80 + v120_wp81 StaticLibrary false true - v110_wp80 + v120_wp81 StaticLibrary false true - v110_wp80 + v120_wp81 - - - + - - - - - - + + + - - + + + + + + + + - - + + + - + + false + + + false + + + false + + false - _LIB;%(PreprocessorDefinitions) NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 + true + true + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) Console false + false /IGNORE:4264 %(AdditionalOptions) @@ -91,80 +105,56 @@ - _LIB;NDEBUG;%(PreprocessorDefinitions) NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 + true + true + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) Console false + false /IGNORE:4264 %(AdditionalOptions) - + - _LIB;%(PreprocessorDefinitions) NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 + true + true + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) Console false + false /IGNORE:4264 %(AdditionalOptions) - + - _LIB;NDEBUG;%(PreprocessorDefinitions) NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 + true + true + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) Console false + false /IGNORE:4264 %(AdditionalOptions) - - - true - - - true - false - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj.filters b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj.filters new file mode 100644 index 0000000000..a7761ab018 --- /dev/null +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj.filters @@ -0,0 +1,5 @@ + + + + + diff --git a/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj b/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj index 25bdccc1b9..d0693d06dc 100644 --- a/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj +++ b/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj @@ -52,20 +52,16 @@ - - + - - + - - + - - + @@ -74,13 +70,14 @@ _LIB;%(PreprocessorDefinitions) - Use + NotUsing pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) + WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) - pch.h + + /Zm200 %(AdditionalOptions) @@ -94,12 +91,13 @@ _LIB;NDEBUG;%(PreprocessorDefinitions) - Use + NotUsing pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - pch.h + WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + /Zm200 %(AdditionalOptions) @@ -113,13 +111,14 @@ _LIB;%(PreprocessorDefinitions) - Use + NotUsing pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) + WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) - pch.h + + /Zm200 %(AdditionalOptions) @@ -133,12 +132,13 @@ _LIB;NDEBUG;%(PreprocessorDefinitions) - Use + NotUsing pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - pch.h + WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + /Zm200 %(AdditionalOptions) @@ -158,10 +158,6 @@ false - - - - @@ -173,55 +169,192 @@ - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create + + false + false + false + false + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + + false + false + false + false + + + false + false + false + false + + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + false + false + false + false + + + + + + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters b/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters index b1f53f5b14..90ccad4969 100644 --- a/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters +++ b/cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters @@ -11,15 +11,6 @@ - - Header Files - - - Header Files - - - Header Files - Header Files @@ -56,121 +47,154 @@ Header Files - - Header Files - - - Header Files - Header Files + + Header Files + + + Header Files + Header Files + + Header Files + + + Header Files + Header Files Header Files - + Header Files Header Files + + Header Files + Header Files + + Header Files + Header Files + + Header Files + Header Files - + + Header Files + + + Header Files + + Header Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + Source Files Source Files - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.wp8/pch.cpp b/cocos/editor-support/spine/proj.wp8/pch.cpp deleted file mode 100644 index bcb5590be1..0000000000 --- a/cocos/editor-support/spine/proj.wp8/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/cocos/editor-support/spine/proj.wp8/pch.h b/cocos/editor-support/spine/proj.wp8/pch.h deleted file mode 100644 index 4c3b8cde28..0000000000 --- a/cocos/editor-support/spine/proj.wp8/pch.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" diff --git a/cocos/editor-support/spine/spine-cocos2dx.cpp b/cocos/editor-support/spine/spine-cocos2dx.cpp index 486e244ac0..5ab0c1d71c 100644 --- a/cocos/editor-support/spine/spine-cocos2dx.cpp +++ b/cocos/editor-support/spine/spine-cocos2dx.cpp @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #include @@ -37,88 +34,22 @@ USING_NS_CC; void _spAtlasPage_createTexture (spAtlasPage* self, const char* path) { - Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(path); - TextureAtlas* textureAtlas = TextureAtlas::createWithTexture(texture, 4); - textureAtlas->retain(); - self->rendererObject = textureAtlas; - // Using getContentSize to make it supports the strategy of loading resources in cocos2d-x. - self->width = texture->getPixelsWide(); - self->height = texture->getPixelsHigh(); -// self->width = texture->getContentSize().width; -// self->height = texture->getContentSize().height; + Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(path); + texture->retain(); + self->rendererObject = texture; + self->width = texture->getPixelsWide(); + self->height = texture->getPixelsHigh(); } void _spAtlasPage_disposeTexture (spAtlasPage* self) { - ((TextureAtlas*)self->rendererObject)->release(); + ((Texture2D*)self->rendererObject)->release(); } -char* _spUtil_readFile (const char* path, int* length) -{ - char* ret = nullptr; - int size = 0; - Data data = FileUtils::getInstance()->getDataFromFile(path); - - if (!data.isNull()) - { - size = static_cast(data.getSize()); - *length = size; - // Allocates one more byte for string terminal, it will be safe when parsing JSON file in Spine runtime. - ret = (char*)malloc(size + 1); - ret[size] = '\0'; - memcpy(ret, data.getBytes(), size); - } - - return ret; -} - -/**/ - -void spRegionAttachment_updateQuad (spRegionAttachment* self, spSlot* slot, V3F_C4B_T2F_Quad* quad, bool premultipliedAlpha) { - float vertices[8]; - spRegionAttachment_computeWorldVertices(self, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); - - GLubyte r = slot->skeleton->r * slot->r * 255; - GLubyte g = slot->skeleton->g * slot->g * 255; - GLubyte b = slot->skeleton->b * slot->b * 255; - float normalizedAlpha = slot->skeleton->a * slot->a; - if (premultipliedAlpha) { - r *= normalizedAlpha; - g *= normalizedAlpha; - b *= normalizedAlpha; - } - GLubyte a = normalizedAlpha * 255; - quad->bl.colors.r = r; - quad->bl.colors.g = g; - quad->bl.colors.b = b; - quad->bl.colors.a = a; - quad->tl.colors.r = r; - quad->tl.colors.g = g; - quad->tl.colors.b = b; - quad->tl.colors.a = a; - quad->tr.colors.r = r; - quad->tr.colors.g = g; - quad->tr.colors.b = b; - quad->tr.colors.a = a; - quad->br.colors.r = r; - quad->br.colors.g = g; - quad->br.colors.b = b; - quad->br.colors.a = a; - - quad->bl.vertices.x = vertices[VERTEX_X1]; - quad->bl.vertices.y = vertices[VERTEX_Y1]; - quad->tl.vertices.x = vertices[VERTEX_X2]; - quad->tl.vertices.y = vertices[VERTEX_Y2]; - quad->tr.vertices.x = vertices[VERTEX_X3]; - quad->tr.vertices.y = vertices[VERTEX_Y3]; - quad->br.vertices.x = vertices[VERTEX_X4]; - quad->br.vertices.y = vertices[VERTEX_Y4]; - - quad->bl.texCoords.u = self->uvs[VERTEX_X1]; - quad->bl.texCoords.v = self->uvs[VERTEX_Y1]; - quad->tl.texCoords.u = self->uvs[VERTEX_X2]; - quad->tl.texCoords.v = self->uvs[VERTEX_Y2]; - quad->tr.texCoords.u = self->uvs[VERTEX_X3]; - quad->tr.texCoords.v = self->uvs[VERTEX_Y3]; - quad->br.texCoords.u = self->uvs[VERTEX_X4]; - quad->br.texCoords.v = self->uvs[VERTEX_Y4]; +char* _spUtil_readFile (const char* path, int* length) { + Data data = FileUtils::getInstance()->getDataFromFile( + FileUtils::getInstance()->fullPathForFilename(path).c_str()); + *length = data.getSize(); + char* bytes = MALLOC(char, *length); + memcpy(bytes, data.getBytes(), *length); + return bytes; } diff --git a/cocos/editor-support/spine/spine-cocos2dx.h b/cocos/editor-support/spine/spine-cocos2dx.h index 51d6f689ac..3409012f31 100644 --- a/cocos/editor-support/spine/spine-cocos2dx.h +++ b/cocos/editor-support/spine/spine-cocos2dx.h @@ -1,44 +1,39 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_COCOS2DX_H_ #define SPINE_COCOS2DX_H_ -#include "cocos2d.h" #include -#include -#include - -void spRegionAttachment_updateQuad (spRegionAttachment* self, spSlot* slot, cocos2d::V3F_C4B_T2F_Quad* quad, bool premultiplied = false); +#include "cocos2d.h" +#include +#include #endif /* SPINE_COCOS2DX_H_ */ diff --git a/cocos/editor-support/spine/spine.h b/cocos/editor-support/spine/spine.h index 2ec61481cc..54f42419d7 100644 --- a/cocos/editor-support/spine/spine.h +++ b/cocos/editor-support/spine/spine.h @@ -1,34 +1,31 @@ /****************************************************************************** - * Spine Runtime Software License - Version 1.1 + * Spine Runtimes Software License + * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), you + * may not (a) modify, translate, adapt or otherwise create derivative works, + * improvements of the Software or develop new applications using the Software + * or (b) remove, delete, alter or obscure any trademarks or any copyright, + * trademark, patent or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef SPINE_SPINE_H_ @@ -44,6 +41,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/cocos/network/Android.mk b/cocos/network/Android.mk index e056ad41c5..0e5fa5254f 100644 --- a/cocos/network/Android.mk +++ b/cocos/network/Android.mk @@ -9,14 +9,10 @@ LOCAL_SRC_FILES := HttpClient.cpp \ SocketIO.cpp \ WebSocket.cpp +LOCAL_EXPORT_C_INCLUDES := -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../platform/android \ -$(LOCAL_PATH)/../../external/curl/include/android \ -$(LOCAL_PATH)/../../external/websockets/include/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../external/curl/include/android \ + $(LOCAL_PATH)/../../external/websockets/include/android LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static diff --git a/cocos/network/proj.wp8/libNetwork.vcxproj b/cocos/network/proj.wp8/libNetwork.vcxproj deleted file mode 100644 index 5f3328d874..0000000000 --- a/cocos/network/proj.wp8/libNetwork.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E} - network.win32 - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\wp8;$(EngineRoot)external\curl\include\wp8;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_CRT_SECURE_NO_WARNINGS;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) - 4251 - false - - - Console - false - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\wp8;$(EngineRoot)external\curl\include\wp8;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 - false - - - Console - false - - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\wp8;$(EngineRoot)external\curl\include\wp8;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_CRT_SECURE_NO_WARNINGS;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) - 4251 - false - - - Console - false - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\wp8;$(EngineRoot)external\curl\include\wp8;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_CRT_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4251 - false - - - Console - false - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/network/proj.wp8/libNetwork.vcxproj.filters b/cocos/network/proj.wp8/libNetwork.vcxproj.filters deleted file mode 100644 index f3ad86ae8c..0000000000 --- a/cocos/network/proj.wp8/libNetwork.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index 49e0a9d9be..e137e32df8 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -37,6 +37,10 @@ THE SOFTWARE. #include "unzip.h" #include +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#include +#endif + #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) #include #endif @@ -1232,35 +1236,35 @@ bool FileUtils::removeFile(const std::string &path) bool FileUtils::renameFile(const std::string &path, const std::string &oldname, const std::string &name) { CCASSERT(!path.empty(), "Invalid path"); + std::string oldPath = path + oldname; + std::string newPath = path + name; // Rename a file #if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) - std::string oldPath = path + oldname; - std::string newPath = path + name; - if (rename(oldPath.c_str(), newPath.c_str()) != 0) + int errorCode = rename(oldPath.c_str(), newPath.c_str()); + + if (0 != errorCode) { - CCLOGERROR("Fail to rename file %s to %s !", oldPath.c_str(), newPath.c_str()); + CCLOGERROR("Fail to rename file %s to %s !Error code is %d", oldPath.c_str(), newPath.c_str(), errorCode); return false; } return true; #else - std::string command = "cmd /c ren "; - std::string win32path = path; - int len = win32path.length(); - for (int i = 0; i < len; ++i) - { - if (win32path[i] == '/') - { - win32path[i] = '\\'; - } - } - // Path may include space. - command += win32path + oldname + " " + name; - - if (WinExec(command.c_str(), SW_HIDE) > 31) - return true; - else - return false; + std::regex pat("\/"); + std::string _old = std::regex_replace(oldPath, pat, "\\"); + std::string _new = std::regex_replace(newPath, pat, "\\"); + + if(FileUtils::getInstance()->isFileExist(_new)) + { + DeleteFileA(_new.c_str()); + } + + MoveFileA(_old.c_str(), _new.c_str()); + + if(0 == GetLastError()) + return true; + else + return false; #endif } diff --git a/cocos/platform/CCPlatformConfig.h b/cocos/platform/CCPlatformConfig.h index c3545df2da..dee092326c 100644 --- a/cocos/platform/CCPlatformConfig.h +++ b/cocos/platform/CCPlatformConfig.h @@ -57,7 +57,7 @@ THE SOFTWARE. #define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN // mac -#if defined(CC_TARGET_OS_MAC) +#if defined(CC_TARGET_OS_MAC) || defined(__APPLE__) #undef CC_TARGET_PLATFORM #define CC_TARGET_PLATFORM CC_PLATFORM_MAC #endif @@ -81,7 +81,7 @@ THE SOFTWARE. #endif // linux -#if defined(LINUX) +#if defined(LINUX) && !defined(__APPLE__) #undef CC_TARGET_PLATFORM #define CC_TARGET_PLATFORM CC_PLATFORM_LINUX #endif diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h index 0422c24c21..4a581ddb8a 100644 --- a/cocos/platform/CCPlatformDefine.h +++ b/cocos/platform/CCPlatformDefine.h @@ -37,7 +37,7 @@ THE SOFTWARE. #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCPlatformDefine-win32.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCPlatformDefine.h" +#include "platform/winrt/CCPlatformDefine-winrt.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCPlatformDefine-linux.h" #endif diff --git a/cocos/platform/CMakeLists.txt b/cocos/platform/CMakeLists.txt index f9ff5a3c3d..c9d4cb9a89 100644 --- a/cocos/platform/CMakeLists.txt +++ b/cocos/platform/CMakeLists.txt @@ -10,7 +10,7 @@ set(COCOS_PLATFORM_SPECIFIC_SRC platform/desktop/CCGLViewImpl-desktop.cpp ) -elseif(MACOSX) +elseif(MACOSX OR APPLE) set(COCOS_PLATFORM_SPECIFIC_SRC platform/mac/CCApplication-mac.mm diff --git a/cocos/platform/android/Android.mk b/cocos/platform/android/Android.mk index 415449727e..123e4fb7e8 100644 --- a/cocos/platform/android/Android.mk +++ b/cocos/platform/android/Android.mk @@ -35,4 +35,8 @@ LOCAL_EXPORT_LDLIBS := -lGLESv1_CM \ -lz \ -landroid +LOCAL_CPPFLAGS := -Wno-extern-c-compat + +LOCAL_EXPORT_CPPFLAGS := -Wno-extern-c-compat + include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/platform/android/CCFileUtils-android.cpp b/cocos/platform/android/CCFileUtils-android.cpp index aec74df4c4..a196626c9c 100644 --- a/cocos/platform/android/CCFileUtils-android.cpp +++ b/cocos/platform/android/CCFileUtils-android.cpp @@ -208,7 +208,7 @@ Data FileUtilsAndroid::getData(const std::string& filename, bool forString) } else { relativePath += fullPath; } - LOGD("relative path = %s", relativePath.c_str()); + CCLOGINFO("relative path = %s", relativePath.c_str()); if (nullptr == FileUtilsAndroid::assetmanager) { LOGD("... FileUtilsAndroid::assetmanager is nullptr"); diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index 009e1a06b9..caa182f877 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#include "platform/winrt/CCGLViewImpl.h" +#include "platform/winrt/CCGLViewImpl-winrt.h" #else #include "platform/wp8/CCGLViewImpl-wp8.h" #endif diff --git a/cocos/platform/winrt/CCDevice.cpp b/cocos/platform/winrt/CCDevice.cpp index 253d838fd0..2fd9823ef6 100644 --- a/cocos/platform/winrt/CCDevice.cpp +++ b/cocos/platform/winrt/CCDevice.cpp @@ -122,8 +122,11 @@ void Device::setAccelerometerEnabled(bool isEnabled) break; } #endif + +#ifndef WP8_SHADER_COMPILER std::shared_ptr event(new AccelerometerEvent(acc)); cocos2d::GLViewImpl::sharedOpenGLView()->QueueEvent(event); +#endif }); } } diff --git a/cocos/platform/winrt/CCGL.h b/cocos/platform/winrt/CCGL.h index 91f91495d5..2b39255fed 100644 --- a/cocos/platform/winrt/CCGL.h +++ b/cocos/platform/winrt/CCGL.h @@ -26,6 +26,25 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ +#define GL_BGRA GL_BGRA_EXT +#define glClearDepth glClearDepthf +#define GL_WRITE_ONLY GL_WRITE_ONLY_OES + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && !defined(WP8_SHADER_COMPILER) +#include "EGL/egl.h" +#include "EGL/eglext.h" +#include "EGL/eglplatform.h" +#include "GLES2/gl2.h" +#include "GLES2/gl2ext.h" +#include "GLES3/gl3.h" +#include "GLES3/gl3ext.h" + +#define glMapBuffer glMapBufferOES + +#else #include "CCGL_Angle.h" +#endif + + #endif // __CCGL_H__ diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.cpp b/cocos/platform/winrt/CCGLViewImpl-winrt.cpp new file mode 100644 index 0000000000..d5ecc8e138 --- /dev/null +++ b/cocos/platform/winrt/CCGLViewImpl-winrt.cpp @@ -0,0 +1,552 @@ +/**************************************************************************** +Copyright (c) 2013 cocos2d-x.org +Copyright (c) Microsoft Open Technologies, Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#include "CCGLViewImpl-winrt.h" +#include "deprecated/CCSet.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" +#include "base/CCTouch.h" +#include "base/CCIMEDispatcher.h" +#include "CCApplication.h" +#include "CCWinRTUtils.h" +#include "deprecated/CCNotificationCenter.h" + +using namespace Platform; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::Graphics::Display; +using namespace Windows::UI::Input; +using namespace Windows::UI::Core; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::System; +using namespace Windows::UI::ViewManagement; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Core; +using namespace Windows::ApplicationModel::Activation; +using namespace Platform; +using namespace Microsoft::WRL; +using namespace PhoneDirect3DXamlAppComponent; + + +NS_CC_BEGIN + +static GLViewImpl* s_pEglView = NULL; + +GLViewImpl* GLViewImpl::create(const std::string& viewName) +{ + auto ret = new GLViewImpl; + if(ret && ret->initWithFullScreen(viewName)) + { + ret->autorelease(); + return ret; + } + + return nullptr; +} + + +GLViewImpl::GLViewImpl() + : _frameZoomFactor(1.0f) + , _supportTouch(true) + , _isRetina(false) + , m_lastPointValid(false) + , m_running(false) + , m_initialized(false) + , m_windowClosed(false) + , m_windowVisible(true) + , m_width(0) + , m_height(0) + , m_delegate(nullptr) + , m_messageBoxDelegate(nullptr) + , m_orientation(DisplayOrientations::Landscape) +{ + s_pEglView = this; + _viewName = "cocos2dx"; +} + +GLViewImpl::~GLViewImpl() +{ + CC_ASSERT(this == s_pEglView); + s_pEglView = NULL; + + // TODO: cleanup +} + +bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor) +{ + setViewName(viewName); + setFrameSize(rect.size.width, rect.size.height); + setFrameZoomFactor(frameZoomFactor); + return true; +} + +bool GLViewImpl::initWithFullScreen(const std::string& viewName) +{ + return initWithRect(viewName, Rect(0, 0, m_width, m_height), 1.0f); +} + + +bool GLViewImpl::Create(float width, float height, DisplayOrientations orientation) +{ + m_orientation = orientation; + UpdateForWindowSizeChange(width, height); + return true; +} + + + +void GLViewImpl::setIMEKeyboardState(bool bOpen) +{ + std::string str; + setIMEKeyboardState(bOpen, str); +} + +void GLViewImpl::setIMEKeyboardState(bool bOpen, std::string str) +{ + if(m_delegate) + { + if(bOpen) + { + m_delegate->Invoke(Cocos2dEvent::ShowKeyboard, stringToPlatformString(str)); + } + else + { + m_delegate->Invoke(Cocos2dEvent::HideKeyboard, stringToPlatformString(str)); + } + } +} + +Platform::String^ GLViewImpl::stringToPlatformString(std::string strSrc) +{ + // to wide char + int strLen = MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, NULL, 0); + wchar_t* wstr = new wchar_t[strLen + 1]; + memset(wstr, 0, strLen + 1); + MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, wstr, strLen); + Platform::String^ strDst = ref new Platform::String(wstr); + delete[] wstr; + return strDst; +} + +void GLViewImpl::swapBuffers() +{ + //eglSwapBuffers(m_eglDisplay, m_eglSurface); +} + + +bool GLViewImpl::isOpenGLReady() +{ + return true; + // TODO: need to revisit this + //return (m_eglDisplay && m_orientation != DisplayOrientations::None); +} + +void GLViewImpl::end() +{ + m_windowClosed = true; +} + + +void GLViewImpl::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) +{ +} + +void GLViewImpl::OnResuming(Platform::Object^ sender, Platform::Object^ args) +{ +} + +// user pressed the Back Key on the phone +void GLViewImpl::OnBackKeyPress() +{ + std::string str; + if(m_delegate) + { + m_delegate->Invoke(Cocos2dEvent::TerminateApp, stringToPlatformString(str)); + } +} + +void GLViewImpl::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args) +{ + OnPointerPressed(args); +} + +void GLViewImpl::OnPointerPressed(PointerEventArgs^ args) +{ + int id = args->CurrentPoint->PointerId; + Vec2 pt = GetPoint(args); + handleTouchesBegin(1, &id, &pt.x, &pt.y); +} + + +void GLViewImpl::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ args) +{ + float direction = (float)args->CurrentPoint->Properties->MouseWheelDelta; + int id = 0; + Vec2 p(0.0f,0.0f); + handleTouchesBegin(1, &id, &p.x, &p.y); + p.y += direction; + handleTouchesMove(1, &id, &p.x, &p.y); + handleTouchesEnd(1, &id, &p.x, &p.y); +} + +void GLViewImpl::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) +{ + m_windowVisible = args->Visible; +} + +void GLViewImpl::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) +{ + m_windowClosed = true; +} + +void GLViewImpl::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args) +{ + OnPointerMoved(args); +} + +void GLViewImpl::OnPointerMoved( PointerEventArgs^ args) +{ + auto currentPoint = args->CurrentPoint; + if (currentPoint->IsInContact) + { + if (m_lastPointValid) + { + int id = args->CurrentPoint->PointerId; + Vec2 p = GetPoint(args); + handleTouchesMove(1, &id, &p.x, &p.y); + } + m_lastPoint = currentPoint->Position; + m_lastPointValid = true; + } + else + { + m_lastPointValid = false; + } +} + +void GLViewImpl::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args) +{ + OnPointerReleased(args); +} + +void GLViewImpl::OnPointerReleased(PointerEventArgs^ args) +{ + int id = args->CurrentPoint->PointerId; + Vec2 pt = GetPoint(args); + handleTouchesEnd(1, &id, &pt.x, &pt.y); +} + + + +void GLViewImpl::resize(int width, int height) +{ + +} + +void GLViewImpl::setFrameZoomFactor(float fZoomFactor) +{ + _frameZoomFactor = fZoomFactor; + Director::getInstance()->setProjection(Director::getInstance()->getProjection()); + //resize(m_obScreenSize.width * fZoomFactor, m_obScreenSize.height * fZoomFactor); +} + +float GLViewImpl::getFrameZoomFactor() +{ + return _frameZoomFactor; +} + +void GLViewImpl::centerWindow() +{ + // not implemented in WinRT. Window is always full screen +} + +GLViewImpl* GLViewImpl::sharedOpenGLView() +{ + return s_pEglView; +} + +int GLViewImpl::Run() +{ + // XAML version does not have a run loop + m_running = true; + return 0; +}; + +void GLViewImpl::Render() +{ + OnRendering(); +} + +void GLViewImpl::OnRendering() +{ + if(m_running && m_initialized) + { + Director::getInstance()->mainLoop(); + } +} + + + +bool GLViewImpl::ShowMessageBox(Platform::String^ title, Platform::String^ message) +{ + if(m_messageBoxDelegate) + { + m_messageBoxDelegate->Invoke(title, message); + return true; + } + return false; +} + +bool GLViewImpl::OpenXamlEditBox(Platform::String^ strPlaceHolder, Platform::String^ strText, int maxLength, int inputMode, int inputFlag, Windows::Foundation::EventHandler^ receiveHandler) +{ + if(m_editBoxDelegate) + { + m_editBoxDelegate->Invoke(strPlaceHolder, strText, maxLength, inputMode, inputFlag, receiveHandler); + return true; + } + return false; +} + + + +// called by orientation change from WP8 XAML +void GLViewImpl::UpdateOrientation(DisplayOrientations orientation) +{ + if(m_orientation != orientation) + { + m_orientation = orientation; + UpdateWindowSize(); + } +} + +// called by size change from WP8 XAML +void GLViewImpl::UpdateForWindowSizeChange(float width, float height) +{ + m_width = width; + m_height = height; + UpdateWindowSize(); +} + +#if 0 +win32 version + +void GLViewEventHandler::OnGLFWWindowSizeFunCallback(GLFWwindow *windows, int width, int height) +{ + auto view = Director::getInstance()->getOpenGLView(); + if(view && view->getResolutionPolicy() != ResolutionPolicy::UNKNOWN) + { + Size resSize=view->getDesignResolutionSize(); + ResolutionPolicy resPolicy=view->getResolutionPolicy(); + view->setFrameSize(width, height); + view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy); + Director::getInstance()->setViewport(); + } +} +#endif + +void GLViewImpl::UpdateWindowSize() +{ + float width, height; + + if(m_orientation == DisplayOrientations::Landscape || m_orientation == DisplayOrientations::LandscapeFlipped) + { + width = m_height; + height = m_width; + } + else + { + width = m_width; + height = m_height; + } + + UpdateOrientationMatrix(); + + //CCSize designSize = getDesignResolutionSize(); + if(!m_initialized) + { + m_initialized = true; + GLView::setFrameSize(width, height); + } + + auto view = Director::getInstance()->getOpenGLView(); + if(view && view->getResolutionPolicy() != ResolutionPolicy::UNKNOWN) + { + Size resSize=view->getDesignResolutionSize(); + ResolutionPolicy resPolicy=view->getResolutionPolicy(); + view->setFrameSize(width, height); + view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy); + Director::getInstance()->setViewport(); + Director::sharedDirector()->setProjection(Director::sharedDirector()->getProjection()); + } +} + +const Mat4& GLViewImpl::getOrientationMatrix() const +{ + return m_orientationMatrix; +}; + + +void GLViewImpl::UpdateOrientationMatrix() +{ + kmMat4Identity(&m_orientationMatrix); + kmMat4Identity(&m_reverseOrientationMatrix); + switch(m_orientation) + { + case Windows::Graphics::Display::DisplayOrientations::PortraitFlipped: + kmMat4RotationZ(&m_orientationMatrix, static_cast(M_PI)); + kmMat4RotationZ(&m_reverseOrientationMatrix, static_cast(-M_PI)); + break; + + case Windows::Graphics::Display::DisplayOrientations::Landscape: + kmMat4RotationZ(&m_orientationMatrix, static_cast(-M_PI_2)); + kmMat4RotationZ(&m_reverseOrientationMatrix, static_cast(M_PI_2)); + break; + + case Windows::Graphics::Display::DisplayOrientations::LandscapeFlipped: + kmMat4RotationZ(&m_orientationMatrix, static_cast(M_PI_2)); + kmMat4RotationZ(&m_reverseOrientationMatrix, static_cast(-M_PI_2)); + break; + + default: + break; + } +} + +cocos2d::Vec2 GLViewImpl::TransformToOrientation(Windows::Foundation::Point p) +{ + cocos2d::Vec2 returnValue; + + float x = p.X; + float y = p.Y; + + switch (m_orientation) + { + case DisplayOrientations::Portrait: + default: + returnValue = Vec2(x, y); + break; + case DisplayOrientations::Landscape: + returnValue = Vec2(y, m_width - x); + break; + case DisplayOrientations::PortraitFlipped: + returnValue = Vec2(m_width - x, m_height - y); + break; + case DisplayOrientations::LandscapeFlipped: + returnValue = Vec2(m_height - y, x); + break; + } + + float zoomFactor = GLViewImpl::sharedOpenGLView()->getFrameZoomFactor(); + if(zoomFactor > 0.0f) { + returnValue.x /= zoomFactor; + returnValue.y /= zoomFactor; + } + + // CCLOG("%.2f %.2f : %.2f %.2f", p.X, p.Y,returnValue.x, returnValue.y); + + return returnValue; +} + +Vec2 GLViewImpl::GetPoint(PointerEventArgs^ args) { + + return TransformToOrientation(args->CurrentPoint->Position); + +} + + +void GLViewImpl::setViewPortInPoints(float x , float y , float w , float h) +{ + switch(m_orientation) + { + case DisplayOrientations::Landscape: + case DisplayOrientations::LandscapeFlipped: + glViewport((GLint)(y * _scaleY + _viewPortRect.origin.y), + (GLint)(x * _scaleX + _viewPortRect.origin.x), + (GLsizei)(h * _scaleY), + (GLsizei)(w * _scaleX)); + break; + + default: + glViewport((GLint)(x * _scaleX + _viewPortRect.origin.x), + (GLint)(y * _scaleY + _viewPortRect.origin.y), + (GLsizei)(w * _scaleX), + (GLsizei)(h * _scaleY)); + } +} + +void GLViewImpl::setScissorInPoints(float x , float y , float w , float h) +{ + switch(m_orientation) + { + case DisplayOrientations::Landscape: + case DisplayOrientations::LandscapeFlipped: + glScissor((GLint)(y * _scaleX + _viewPortRect.origin.y), + (GLint)((_viewPortRect.size.width - ((x + w) * _scaleX)) + _viewPortRect.origin.x), + (GLsizei)(h * _scaleY), + (GLsizei)(w * _scaleX)); + break; + + default: + glScissor((GLint)(x * _scaleX + _viewPortRect.origin.x), + (GLint)(y * _scaleY + _viewPortRect.origin.y), + (GLsizei)(w * _scaleX), + (GLsizei)(h * _scaleY)); + } +} + +void GLViewImpl::QueueBackKeyPress() +{ + std::lock_guard guard(mMutex); + std::shared_ptr e(new BackButtonEvent()); + mInputEvents.push(e); +} + +void GLViewImpl::QueuePointerEvent(PointerEventType type, PointerEventArgs^ args) +{ + std::lock_guard guard(mMutex); + std::shared_ptr e(new PointerEvent(type, args)); + mInputEvents.push(e); +} + +void GLViewImpl::QueueEvent(std::shared_ptr& event) +{ + std::lock_guard guard(mMutex); + mInputEvents.push(event); +} + +void GLViewImpl::ProcessEvents() +{ + std::lock_guard guard(mMutex); + + while (!mInputEvents.empty()) + { + InputEvent* e = mInputEvents.front().get(); + e->execute(); + mInputEvents.pop(); + } +} + +NS_CC_END diff --git a/cocos/platform/winrt/CCGLViewImpl-winrt.h b/cocos/platform/winrt/CCGLViewImpl-winrt.h new file mode 100644 index 0000000000..e30672fb2a --- /dev/null +++ b/cocos/platform/winrt/CCGLViewImpl-winrt.h @@ -0,0 +1,183 @@ +/**************************************************************************** +Copyright (c) 2010 cocos2d-x.org +Copyright (c) Microsoft Open Technologies, Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#ifndef __CC_EGLVIEWIMPL_WINRT_H__ +#define __CC_EGLVIEWIMPL_WINRT_H__ + +#include "CCStdC.h" +#include "platform/CCCommon.h" +#include "platform/CCGLView.h" +#include "InputEvent.h" + + +#include + +#include +#include +#include +#include + +#include +#include + + +NS_CC_BEGIN + +class GLViewImpl; + + +class CC_DLL GLViewImpl : public GLView +{ +public: + static GLViewImpl* create(const std::string& viewName); + + /* override functions */ + virtual bool isOpenGLReady(); + virtual void end(); + virtual void swapBuffers(); + virtual void setViewPortInPoints(float x , float y , float w , float h); + virtual void setScissorInPoints(float x , float y , float w , float h); + const Mat4& getOrientationMatrix() const; + const Mat4& getReverseOrientationMatrix () const {return m_reverseOrientationMatrix;}; + + Windows::Graphics::Display::DisplayOrientations getDeviceOrientation() {return m_orientation;}; + Size getRenerTargetSize() const { return Size(m_width, m_height); } + + virtual void setIMEKeyboardState(bool bOpen); + virtual void setIMEKeyboardState(bool bOpen, std::string str); + Platform::String^ stringToPlatformString(std::string strSrc); + void ShowKeyboard(Windows::Foundation::Rect r); + void HideKeyboard(Windows::Foundation::Rect r); + + // WP8 XAML app + virtual bool Create(float width, float height, Windows::Graphics::Display::DisplayOrientations orientation); + + void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args); + void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args); + void OnPointerReleased(Windows::UI::Core::PointerEventArgs^ args); + void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerMoved(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); + void OnResuming(Platform::Object^ sender, Platform::Object^ args); + void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args); + void OnBackKeyPress(); + + void QueueBackKeyPress(); + void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); + void GLViewImpl::QueueEvent(std::shared_ptr& event); + + void SetXamlEventDelegate(PhoneDirect3DXamlAppComponent::Cocos2dEventDelegate^ delegate) { m_delegate = delegate; }; + void SetXamlMessageBoxDelegate(PhoneDirect3DXamlAppComponent::Cocos2dMessageBoxDelegate^ delegate) { m_messageBoxDelegate = delegate; }; + void SetXamlEditBoxDelegate(PhoneDirect3DXamlAppComponent::Cocos2dEditBoxDelegate^ delegate) { m_editBoxDelegate = delegate; }; + + bool ShowMessageBox(Platform::String^ title, Platform::String^ message); + bool OpenXamlEditBox(Platform::String^ strPlaceHolder, Platform::String^ strText, int maxLength, int inputMode, int inputFlag, Windows::Foundation::EventHandler^ receiveHandler); + + int Run(); + void Render(); + + void resize(int width, int height); + + float getFrameZoomFactor(); + void centerWindow(); + + void UpdateOrientation(Windows::Graphics::Display::DisplayOrientations orientation); + void UpdateForWindowSizeChange(float width, float height); + + // static function + /** + @brief get the shared main open gl window + */ + static GLViewImpl* sharedOpenGLView(); + + void ProcessEvents(); + void AddPointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); + + + +protected: + GLViewImpl(); + virtual ~GLViewImpl(); + + bool initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor); + bool initWithFullScreen(const std::string& viewName); + + /* + * Set zoom factor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop. + */ + void setFrameZoomFactor(float zoomFactor); + + inline bool isRetina() { return _isRetina; }; + + float _frameZoomFactor; + bool _supportTouch; + bool _isRetina; + + +private: + CC_DISALLOW_COPY_AND_ASSIGN(GLViewImpl); + + void OnRendering(); + void UpdateWindowSize(); + void UpdateOrientationMatrix(); + + cocos2d::Vec2 TransformToOrientation(Windows::Foundation::Point point); + cocos2d::Vec2 GetPoint(Windows::UI::Core::PointerEventArgs^ args); + + Windows::Foundation::Rect m_windowBounds; + Windows::Foundation::EventRegistrationToken m_eventToken; + Windows::Foundation::Point m_lastPoint; + + float m_width; + float m_height; + + Windows::Graphics::Display::DisplayOrientations m_orientation; + Windows::Foundation::Rect m_keyboardRect; + + bool m_lastPointValid; + bool m_windowClosed; + bool m_windowVisible; + Mat4 m_orientationMatrix; + Mat4 m_reverseOrientationMatrix; + + + bool m_running; + bool m_initialized; + + PhoneDirect3DXamlAppComponent::Cocos2dEventDelegate^ m_delegate; + PhoneDirect3DXamlAppComponent::Cocos2dMessageBoxDelegate^ m_messageBoxDelegate; + PhoneDirect3DXamlAppComponent::Cocos2dEditBoxDelegate^ m_editBoxDelegate; + + std::queue> mInputEvents; + std::mutex mMutex; + +}; + +NS_CC_END + +#endif // end of __CC_EGLVIEWIMPL_WINRT_H__ diff --git a/cocos/platform/winrt/CCGL_Angle.h b/cocos/platform/winrt/CCGL_Angle.h index 888eaeb930..04c8e88cd4 100644 --- a/cocos/platform/winrt/CCGL_Angle.h +++ b/cocos/platform/winrt/CCGL_Angle.h @@ -37,16 +37,13 @@ THE SOFTWARE. #include "GLES2/gl2ext.h" #include "winrtangle.h" #include "esUtil.h" -#include "ccMacros.h" +#include "base/ccMacros.h" #define GL_WRITE_ONLY_OES 0x88B9 #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD -#define GL_BGRA GL_BGRA_EXT - -#define glClearDepth glClearDepthf inline void glGenVertexArrays(GLsizei n, GLuint *arrays) @@ -77,6 +74,5 @@ inline GLboolean glUnmapBuffer(GLenum targets) } #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES -#define GL_WRITE_ONLY GL_WRITE_ONLY_OES #endif // __CCGL_ANGLE_H__ diff --git a/cocos/platform/winrt/CCPlatformDefine-winrt.h b/cocos/platform/winrt/CCPlatformDefine-winrt.h new file mode 100644 index 0000000000..81bf7cfd55 --- /dev/null +++ b/cocos/platform/winrt/CCPlatformDefine-winrt.h @@ -0,0 +1,50 @@ +/**************************************************************************** +Copyright (c) 2010-2013 cocos2d-x.org +Copyright (c) Microsoft Open Technologies, Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +#ifndef __CCPLATFORMDEFINE_H__ +#define __CCPLATFORMDEFINE_H__ + +#if defined(CC_STATIC) +#define CC_DLL +#else +#if defined(_USRDLL) +#define CC_DLL __declspec(dllexport) +#else /* use a DLL library */ +#define CC_DLL __declspec(dllimport) +#endif +#endif + + + +#include + +#if CC_DISABLE_ASSERT > 0 +#define CC_ASSERT(cond) +#else +#define CC_ASSERT(cond) assert(cond) +#endif +#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam + + +#endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/winrt/CCStdC.h b/cocos/platform/winrt/CCStdC.h index f86549779b..ebb6375854 100644 --- a/cocos/platform/winrt/CCStdC.h +++ b/cocos/platform/winrt/CCStdC.h @@ -83,17 +83,6 @@ typedef SSIZE_T ssize_t; #include -// Structure timeval has define in winsock.h, include windows.h for it. -#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#define _WINSOCKAPI_ -#include -#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif - -#include - #ifdef WINRT_NO_WINSOCK #undef timeval struct timeval @@ -101,8 +90,15 @@ struct timeval long tv_sec; // seconds long tv_usec; // microSeconds }; -#endif // WINRT_NO_WINSOCK -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#else +// Structure timeval has define in winsock.h, include windows.h for it. +#define _WINSOCKAPI_ +#include +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif +#endif struct timezone { diff --git a/cocos/platform/winrt/CCWinRTUtils.cpp b/cocos/platform/winrt/CCWinRTUtils.cpp index c025fbb9ef..c4fb52b0b9 100644 --- a/cocos/platform/winrt/CCWinRTUtils.cpp +++ b/cocos/platform/winrt/CCWinRTUtils.cpp @@ -101,6 +101,7 @@ Platform::String^ PlatformStringFromString(const std::string& s) return ref new Platform::String(ws.data(), ws.length()); } +#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 // Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. float ConvertDipsToPixels(float dips) { @@ -112,9 +113,12 @@ float getScaledDPIValue(float v) { auto dipFactor = DisplayProperties::LogicalDpi / 96.0f; return v * dipFactor; } +#endif + void CC_DLL CCLogIPAddresses() { +#ifndef WP8_SHADER_COMPILER auto hostnames = NetworkInformation::GetHostNames(); int length = hostnames->Size; @@ -127,6 +131,7 @@ void CC_DLL CCLogIPAddresses() CCLog("IP Address: %s:", s.c_str()); } } +#endif } std::string CC_DLL getDeviceIPAddresses() diff --git a/cocos/platform/winrt/CCWinRTUtils.h b/cocos/platform/winrt/CCWinRTUtils.h index 75b4225bda..7d06c9d04f 100644 --- a/cocos/platform/winrt/CCWinRTUtils.h +++ b/cocos/platform/winrt/CCWinRTUtils.h @@ -43,9 +43,11 @@ std::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr); std::string PlatformStringToString(Platform::String^ s); Platform::String^ PlatformStringFromString(const std::string& s); +#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 // Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. float ConvertDipsToPixels(float dips); float getScaledDPIValue(float v); +#endif Concurrency::task^> ReadDataAsync(Platform::String^ path); diff --git a/cocos/platform/winrt/InputEvent.cpp b/cocos/platform/winrt/InputEvent.cpp index 2389dbd28d..1c647538a0 100644 --- a/cocos/platform/winrt/InputEvent.cpp +++ b/cocos/platform/winrt/InputEvent.cpp @@ -24,7 +24,13 @@ THE SOFTWARE. ****************************************************************************/ #include "InputEvent.h" -#include "CCGLViewImpl.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#include "CCGLViewImpl-wp8.h" +#else +#include "CCGLViewImpl-winrt.h" +#endif + #include "base/CCEventAcceleration.h" NS_CC_BEGIN diff --git a/cocos/platform/winrt/InputEvent.h b/cocos/platform/winrt/InputEvent.h index f8cbcdf664..ed22daf21f 100644 --- a/cocos/platform/winrt/InputEvent.h +++ b/cocos/platform/winrt/InputEvent.h @@ -48,7 +48,7 @@ enum PointerEventType PointerReleased, }; -class InputEvent +class CC_DLL InputEvent { public: InputEvent() {}; @@ -57,7 +57,7 @@ public: }; -class AccelerometerEvent : public InputEvent +class CC_DLL AccelerometerEvent : public InputEvent { public: AccelerometerEvent(const cocos2d::Acceleration& event); @@ -67,7 +67,7 @@ private: cocos2d::Acceleration m_event; }; -class PointerEvent : public InputEvent +class CC_DLL PointerEvent : public InputEvent { public: PointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); @@ -79,7 +79,7 @@ private: Platform::Agile m_args; }; -class KeyboardEvent : public InputEvent +class CC_DLL KeyboardEvent : public InputEvent { public: @@ -92,14 +92,14 @@ private: Platform::Agile m_text; }; -class BackButtonEvent : public InputEvent +class CC_DLL BackButtonEvent : public InputEvent { public: BackButtonEvent(); virtual void execute(); }; -class CustomInputEvent : public InputEvent +class CC_DLL CustomInputEvent : public InputEvent { public: CustomInputEvent(const std::function&); diff --git a/cocos/platform/winrt/pch.h b/cocos/platform/winrt/pch.h index 5e0bbb907c..5dbe96eb9f 100644 --- a/cocos/platform/winrt/pch.h +++ b/cocos/platform/winrt/pch.h @@ -1,3 +1,11 @@ #pragma once +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include #include "cocos2d.h" +#include "cocos-ext.h" \ No newline at end of file diff --git a/cocos/platform/winrt/targetver.h b/cocos/platform/winrt/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/cocos/platform/winrt/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/cocos/platform/wp8-xaml/cpp/Cocos2dRenderer.cpp b/cocos/platform/wp8-xaml/cpp/Cocos2dRenderer.cpp index 608cc6f828..d0d5a5f61c 100644 --- a/cocos/platform/wp8-xaml/cpp/Cocos2dRenderer.cpp +++ b/cocos/platform/wp8-xaml/cpp/Cocos2dRenderer.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "Cocos2dRenderer.h" #include "cocos2d.h" #include "CCApplication.h" -#include "CCGLViewImpl.h" +#include "CCGLViewImpl-wp8.h" #include "AppDelegate.h" #include @@ -56,11 +56,11 @@ void Cocos2dRenderer::CreateGLResources() GLViewImpl* glview = GLViewImpl::create("Test Cpp"); glview->Create(m_eglDisplay, m_eglContext, m_eglSurface, m_renderTargetSize.Width, m_renderTargetSize.Height,m_orientation); director->setOpenGLView(glview); - CCApplication::getInstance()->run(); glview->SetXamlEventDelegate(m_delegate); glview->SetXamlMessageBoxDelegate(m_messageBoxDelegate); glview->SetXamlEditBoxDelegate(m_editBoxDelegate); - } + CCApplication::getInstance()->run(); + } else { cocos2d::GL::invalidateStateCache(); @@ -71,7 +71,7 @@ void Cocos2dRenderer::CreateGLResources() director->getEventDispatcher()->dispatchEvent(&recreatedEvent); cocos2d::Application::getInstance()->applicationWillEnterForeground(); director->setGLDefaultValues(); - } + } m_loadingComplete = true; } diff --git a/cocos/platform/wp8/CCGLViewImpl-wp8.cpp b/cocos/platform/wp8/CCGLViewImpl-wp8.cpp index 8eaa3f7314..1f4ef9d887 100644 --- a/cocos/platform/wp8/CCGLViewImpl-wp8.cpp +++ b/cocos/platform/wp8/CCGLViewImpl-wp8.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCGLViewImpl.h" +#include "CCGLViewImpl-wp8.h" #include "deprecated/CCSet.h" #include "base/ccMacros.h" #include "base/CCDirector.h" diff --git a/cocos/platform/wp8/pch.cpp b/cocos/platform/wp8/pch.cpp deleted file mode 100644 index bcb5590be1..0000000000 --- a/cocos/platform/wp8/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/cocos/platform/wp8/pch.h b/cocos/platform/wp8/pch.h deleted file mode 100644 index 5e0bbb907c..0000000000 --- a/cocos/platform/wp8/pch.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "cocos2d.h" diff --git a/cocos/platform/wp8/shaders/precompiledshaders.h b/cocos/platform/wp8/shaders/precompiledshaders.h index 51da7437e0..27483e863c 100644 --- a/cocos/platform/wp8/shaders/precompiledshaders.h +++ b/cocos/platform/wp8/shaders/precompiledshaders.h @@ -86,7 +86,7 @@ const unsigned char s_133478C5A874C1E6F59B418CE6C7C39F1AE0F873[] = { 120, 116, 117, 114, 101, 48, 0, 0, 0, 0, 1, 0, 0, 0, 248, 3, 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 11, 95, 74, 206, 145, 124, 32, 219, 67, 19, @@ -456,7 +456,7 @@ const unsigned char s_13E33F532157A58EC77EDE3B3112560A89D272B2[] = { 116, 114, 105, 120, 0, 0, 0, 0, 0, 0, 0, 0, 204, 2, 0, 0, 164, 4, 0, 0, 0, 0, 0, 0, -194, 137, 0, 0, 0, 0, 0, 0, +107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 127, 145, 81, 72, 216, 190, 16, 61, 245, 231, 235, 249, @@ -800,7 +800,7 @@ const unsigned char s_1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE[] = { 116, 67, 111, 108, 111, 114, 0, 0, 0, 0, 3, 0, 0, 0, 208, 7, 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 65, 106, 69, 173, 111, 248, 97, 165, 186, 90, @@ -1215,6 +1215,1135 @@ const unsigned char s_1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE[] = { 111, 110, 0, 171, 171, 171, }; +const unsigned char s_2CF9793879165058483EFB4AD6FA9746ECD7DD2A[] = { + +166, 147, 0, 0, 142, 9, 2, 1, + 0, 128, 0, 0, 82, 139, 0, 0, + 10, 0, 0, 0, 97, 95, 112, 111, +115, 105, 116, 105, 111, 110, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 255, 255, 255, 255, 80, 139, + 0, 0, 10, 0, 0, 0, 97, 95, +116, 101, 120, 67, 111, 111, 114, 100, + 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 81, 139, 0, 0, 8, 0, 0, 0, + 97, 95, 110, 111, 114, 109, 97, 108, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 17, 0, 0, 0, 92, 139, 0, + 0, 242, 141, 0, 0, 11, 0, 0, + 0, 67, 67, 95, 77, 86, 77, 97, +116, 114, 105, 120, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 4, 0, 0, 0, 91, 139, 0, 0, +242, 141, 0, 0, 15, 0, 0, 0, + 67, 67, 95, 78, 111, 114, 109, 97, +108, 77, 97, 116, 114, 105, 120, 0, + 0, 0, 0, 255, 255, 255, 255, 4, + 0, 0, 0, 3, 0, 0, 0, 92, +139, 0, 0, 242, 141, 0, 0, 10, + 0, 0, 0, 67, 67, 95, 80, 77, + 97, 116, 114, 105, 120, 0, 0, 0, + 0, 255, 255, 255, 255, 7, 0, 0, + 0, 4, 0, 0, 0, 81, 139, 0, + 0, 242, 141, 0, 0, 26, 0, 0, + 0, 117, 95, 80, 111, 105, 110, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 80, 111, 115, 105, 116, +105, 111, 110, 1, 0, 0, 0, 255, +255, 255, 255, 11, 0, 0, 0, 1, + 0, 0, 0, 81, 139, 0, 0, 242, +141, 0, 0, 25, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 80, 111, 115, 105, 116, 105, 111, 110, + 1, 0, 0, 0, 255, 255, 255, 255, + 12, 0, 0, 0, 1, 0, 0, 0, + 94, 139, 0, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 67, 67, 95, 84, +101, 120, 116, 117, 114, 101, 48, 0, + 0, 0, 0, 0, 0, 0, 0, 255, +255, 255, 255, 1, 0, 0, 0, 81, +139, 0, 0, 241, 141, 0, 0, 25, + 0, 0, 0, 117, 95, 65, 109, 98, +105, 101, 110, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 67, +111, 108, 111, 114, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 1, 0, 0, 0, 81, 139, 0, 0, +241, 141, 0, 0, 21, 0, 0, 0, +117, 95, 68, 105, 114, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 1, 0, 0, + 0, 1, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 81, 139, 0, + 0, 241, 141, 0, 0, 25, 0, 0, + 0, 117, 95, 68, 105, 114, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 68, 105, 114, 101, 99, 116, 105, +111, 110, 1, 0, 0, 0, 2, 0, + 0, 0, 255, 255, 255, 255, 1, 0, + 0, 0, 81, 139, 0, 0, 241, 141, + 0, 0, 23, 0, 0, 0, 117, 95, + 80, 111, 105, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 1, 0, 0, + 0, 3, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 6, 20, 0, + 0, 241, 141, 0, 0, 30, 0, 0, + 0, 117, 95, 80, 111, 105, 110, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 82, 97, 110, 103, 101, + 73, 110, 118, 101, 114, 115, 101, 1, + 0, 0, 0, 4, 0, 0, 0, 255, +255, 255, 255, 1, 0, 0, 0, 81, +139, 0, 0, 241, 141, 0, 0, 22, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 67, 111, 108, 111, +114, 1, 0, 0, 0, 5, 0, 0, + 0, 255, 255, 255, 255, 1, 0, 0, + 0, 81, 139, 0, 0, 241, 141, 0, + 0, 26, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 68, 105, +114, 101, 99, 116, 105, 111, 110, 1, + 0, 0, 0, 6, 0, 0, 0, 255, +255, 255, 255, 1, 0, 0, 0, 6, + 20, 0, 0, 241, 141, 0, 0, 30, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 73, 110, 110, 101, +114, 65, 110, 103, 108, 101, 67, 111, +115, 1, 0, 0, 0, 7, 0, 0, + 0, 255, 255, 255, 255, 1, 0, 0, + 0, 6, 20, 0, 0, 241, 141, 0, + 0, 30, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 79, 117, +116, 101, 114, 65, 110, 103, 108, 101, + 67, 111, 115, 1, 0, 0, 0, 8, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 6, 20, 0, 0, 241, +141, 0, 0, 29, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 82, 97, 110, 103, 101, 73, 110, 118, +101, 114, 115, 101, 1, 0, 0, 0, + 9, 0, 0, 0, 255, 255, 255, 255, + 1, 0, 0, 0, 82, 139, 0, 0, +241, 141, 0, 0, 7, 0, 0, 0, +117, 95, 99, 111, 108, 111, 114, 0, + 0, 0, 0, 10, 0, 0, 0, 255, +255, 255, 255, 1, 0, 0, 0, 17, + 0, 0, 0, 11, 0, 0, 0, 67, + 67, 95, 77, 86, 77, 97, 116, 114, +105, 120, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, 67, 67, + 95, 78, 111, 114, 109, 97, 108, 77, + 97, 116, 114, 105, 120, 0, 0, 0, + 0, 1, 0, 0, 0, 10, 0, 0, + 0, 67, 67, 95, 80, 77, 97, 116, +114, 105, 120, 0, 0, 0, 0, 2, + 0, 0, 0, 26, 0, 0, 0, 117, + 95, 80, 111, 105, 110, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 80, 111, 115, 105, 116, 105, 111, +110, 0, 0, 0, 0, 3, 0, 0, + 0, 25, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 80, 111, +115, 105, 116, 105, 111, 110, 0, 0, + 0, 0, 4, 0, 0, 0, 11, 0, + 0, 0, 67, 67, 95, 84, 101, 120, +116, 117, 114, 101, 48, 0, 0, 0, + 0, 5, 0, 0, 0, 25, 0, 0, + 0, 117, 95, 65, 109, 98, 105, 101, +110, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 67, 111, 108, +111, 114, 0, 0, 0, 0, 6, 0, + 0, 0, 21, 0, 0, 0, 117, 95, + 68, 105, 114, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 67, 111, +108, 111, 114, 0, 0, 0, 0, 7, + 0, 0, 0, 25, 0, 0, 0, 117, + 95, 68, 105, 114, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 68, +105, 114, 101, 99, 116, 105, 111, 110, + 0, 0, 0, 0, 8, 0, 0, 0, + 23, 0, 0, 0, 117, 95, 80, 111, +105, 110, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 67, 111, +108, 111, 114, 0, 0, 0, 0, 9, + 0, 0, 0, 30, 0, 0, 0, 117, + 95, 80, 111, 105, 110, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 82, 97, 110, 103, 101, 73, 110, +118, 101, 114, 115, 101, 0, 0, 0, + 0, 10, 0, 0, 0, 22, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, + 0, 0, 0, 11, 0, 0, 0, 26, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 68, 105, 114, 101, + 99, 116, 105, 111, 110, 0, 0, 0, + 0, 12, 0, 0, 0, 30, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 73, 110, 110, 101, 114, 65, +110, 103, 108, 101, 67, 111, 115, 0, + 0, 0, 0, 13, 0, 0, 0, 30, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 79, 117, 116, 101, +114, 65, 110, 103, 108, 101, 67, 111, +115, 0, 0, 0, 0, 14, 0, 0, + 0, 29, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 82, 97, +110, 103, 101, 73, 110, 118, 101, 114, +115, 101, 0, 0, 0, 0, 15, 0, + 0, 0, 7, 0, 0, 0, 117, 95, + 99, 111, 108, 111, 114, 0, 0, 0, + 0, 16, 0, 0, 0, 236, 16, 0, + 0, 124, 10, 0, 0, 0, 0, 0, + 0, 107, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 68, 88, 66, 67, 39, 224, 169, +185, 116, 156, 41, 157, 187, 9, 222, +142, 94, 217, 160, 100, 1, 0, 0, + 0, 236, 16, 0, 0, 6, 0, 0, + 0, 56, 0, 0, 0, 140, 3, 0, + 0, 144, 11, 0, 0, 12, 12, 0, + 0, 244, 15, 0, 0, 112, 16, 0, + 0, 65, 111, 110, 57, 76, 3, 0, + 0, 76, 3, 0, 0, 0, 2, 255, +255, 24, 3, 0, 0, 52, 0, 0, + 0, 1, 0, 40, 0, 0, 0, 52, + 0, 0, 0, 52, 0, 1, 0, 36, + 0, 0, 0, 52, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 255, +255, 81, 0, 0, 5, 11, 0, 15, +160, 0, 0, 0, 0, 0, 0, 128, + 63, 0, 0, 0, 192, 0, 0, 64, + 64, 31, 0, 0, 2, 0, 0, 0, +128, 0, 0, 7, 176, 31, 0, 0, + 2, 0, 0, 0, 128, 1, 0, 7, +176, 31, 0, 0, 2, 0, 0, 0, +128, 2, 0, 7, 176, 31, 0, 0, + 2, 0, 0, 0, 128, 3, 0, 3, +176, 31, 0, 0, 2, 0, 0, 0, +144, 0, 8, 15, 160, 5, 0, 0, + 3, 0, 0, 7, 128, 1, 0, 228, +176, 4, 0, 0, 160, 8, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 228, +128, 0, 0, 228, 128, 2, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 0, +129, 11, 0, 85, 160, 11, 0, 0, + 3, 1, 0, 8, 128, 0, 0, 0, +128, 11, 0, 0, 160, 2, 0, 0, + 3, 0, 0, 7, 128, 2, 0, 228, +160, 2, 0, 228, 160, 36, 0, 0, + 2, 1, 0, 7, 128, 0, 0, 228, +128, 36, 0, 0, 2, 0, 0, 7, +128, 0, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 228, +128, 1, 0, 228, 129, 5, 0, 0, + 3, 1, 0, 7, 128, 0, 0, 255, +128, 1, 0, 228, 160, 88, 0, 0, + 4, 1, 0, 7, 128, 0, 0, 255, +128, 1, 0, 228, 128, 11, 0, 0, +160, 2, 0, 0, 3, 1, 0, 7, +128, 1, 0, 228, 128, 0, 0, 228, +160, 36, 0, 0, 2, 2, 0, 7, +128, 1, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 228, +128, 2, 0, 228, 128, 5, 0, 0, + 3, 2, 0, 7, 128, 0, 0, 255, +128, 3, 0, 228, 160, 88, 0, 0, + 4, 2, 0, 7, 128, 0, 0, 255, +128, 2, 0, 228, 128, 11, 0, 0, +160, 4, 0, 0, 4, 1, 0, 7, +128, 2, 0, 228, 128, 1, 0, 255, +128, 1, 0, 228, 128, 2, 0, 0, + 3, 2, 0, 7, 128, 6, 0, 228, +160, 6, 0, 228, 160, 36, 0, 0, + 2, 3, 0, 7, 128, 2, 0, 228, +128, 36, 0, 0, 2, 2, 0, 7, +128, 2, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 3, 0, 228, +128, 2, 0, 228, 129, 8, 0, 0, + 3, 1, 0, 8, 128, 0, 0, 228, +128, 2, 0, 228, 128, 2, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 255, +128, 8, 0, 0, 161, 1, 0, 0, + 2, 2, 0, 1, 128, 8, 0, 0, +160, 2, 0, 0, 3, 0, 0, 2, +128, 2, 0, 0, 129, 7, 0, 0, +160, 6, 0, 0, 2, 0, 0, 2, +128, 0, 0, 85, 128, 5, 0, 0, + 3, 0, 0, 17, 128, 0, 0, 85, +128, 0, 0, 0, 128, 4, 0, 0, + 4, 0, 0, 2, 128, 0, 0, 0, +128, 11, 0, 170, 160, 11, 0, 255, +160, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 0, +128, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 85, +128, 5, 0, 0, 3, 0, 0, 14, +128, 2, 0, 144, 176, 9, 0, 0, +160, 8, 0, 0, 3, 0, 0, 2, +128, 0, 0, 249, 128, 0, 0, 249, +128, 2, 0, 0, 3, 0, 0, 2, +128, 0, 0, 85, 129, 11, 0, 85, +160, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 85, +128, 88, 0, 0, 4, 0, 0, 1, +128, 0, 0, 85, 128, 0, 0, 0, +128, 11, 0, 0, 160, 5, 0, 0, + 3, 0, 0, 14, 128, 1, 0, 255, +128, 5, 0, 144, 160, 88, 0, 0, + 4, 0, 0, 14, 128, 1, 0, 255, +128, 0, 0, 228, 128, 11, 0, 0, +160, 4, 0, 0, 4, 0, 0, 7, +128, 0, 0, 249, 128, 0, 0, 0, +128, 1, 0, 228, 128, 66, 0, 0, + 3, 1, 0, 15, 128, 3, 0, 228, +176, 0, 8, 228, 160, 5, 0, 0, + 3, 1, 0, 15, 128, 1, 0, 228, +128, 10, 0, 228, 160, 1, 0, 0, + 2, 0, 0, 8, 128, 11, 0, 85, +160, 5, 0, 0, 3, 0, 0, 15, +128, 0, 0, 228, 128, 1, 0, 228, +128, 1, 0, 0, 2, 0, 8, 15, +128, 0, 0, 228, 128, 1, 0, 0, + 2, 1, 8, 15, 128, 0, 0, 228, +128, 1, 0, 0, 2, 2, 8, 15, +128, 0, 0, 228, 128, 1, 0, 0, + 2, 3, 8, 15, 128, 0, 0, 228, +128, 255, 255, 0, 0, 83, 72, 68, + 82, 252, 7, 0, 0, 64, 0, 0, + 0, 255, 1, 0, 0, 89, 0, 0, + 4, 70, 142, 32, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 90, 0, 0, + 3, 0, 96, 16, 0, 0, 0, 0, + 0, 88, 24, 0, 4, 0, 112, 16, + 0, 0, 0, 0, 0, 85, 85, 0, + 0, 98, 16, 0, 3, 114, 16, 16, + 0, 0, 0, 0, 0, 98, 16, 0, + 3, 114, 16, 16, 0, 1, 0, 0, + 0, 98, 16, 0, 3, 114, 16, 16, + 0, 2, 0, 0, 0, 98, 16, 0, + 3, 50, 16, 16, 0, 3, 0, 0, + 0, 101, 0, 0, 3, 242, 32, 16, + 0, 0, 0, 0, 0, 101, 0, 0, + 3, 242, 32, 16, 0, 1, 0, 0, + 0, 101, 0, 0, 3, 242, 32, 16, + 0, 2, 0, 0, 0, 101, 0, 0, + 3, 242, 32, 16, 0, 3, 0, 0, + 0, 104, 0, 0, 2, 4, 0, 0, + 0, 16, 0, 0, 7, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 68, 0, 0, + 5, 18, 0, 16, 0, 0, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 0, 0, 0, 0, 6, 0, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 2, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 68, 0, 0, + 5, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 1, 0, 0, 0, 246, 15, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 8, 130, 0, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 128, 65, 0, 0, + 0, 1, 0, 0, 0, 52, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 6, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 18, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 10, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 10, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 246, 15, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 30, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 56, 0, 0, 8, 114, 0, 16, + 0, 2, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 6, 128, 32, + 0, 0, 0, 0, 0, 4, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 0, 0, 0, + 8, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 128, 63, 52, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 68, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 2, 0, 0, 0, 246, 15, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 52, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 56, 0, 0, + 8, 114, 0, 16, 0, 2, 0, 0, + 0, 246, 15, 16, 0, 1, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 54, 0, 0, + 5, 114, 0, 16, 0, 3, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 130, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 58, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 9, 114, 0, 16, + 0, 3, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 246, 15, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 3, 0, 0, 0, 30, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 22, 0, 0, 1, 56, 0, 0, + 8, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 6, 128, 32, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 0, 0, 0, 8, 130, 0, 16, + 0, 0, 0, 0, 0, 58, 0, 16, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 128, + 63, 52, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 58, 0, 16, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 16, 0, 0, + 7, 18, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 68, 0, 0, 5, 18, 0, 16, + 0, 1, 0, 0, 0, 10, 0, 16, + 0, 1, 0, 0, 0, 56, 0, 0, + 7, 114, 0, 16, 0, 1, 0, 0, + 0, 6, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 0, 0, 0, 9, 114, 0, 16, + 0, 2, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 68, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 56, 0, 0, + 7, 114, 0, 16, 0, 2, 0, 0, + 0, 246, 15, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 16, 0, 0, 8, 130, 0, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 70, 2, 16, +128, 65, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 10, 18, 0, 16, + 0, 2, 0, 0, 0, 10, 128, 32, + 0, 0, 0, 0, 0, 7, 0, 0, + 0, 10, 128, 32, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 9, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 10, 128, 32, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 14, 0, 0, + 10, 18, 0, 16, 0, 2, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 128, + 63, 0, 0, 128, 63, 0, 0, 128, + 63, 0, 0, 128, 63, 10, 0, 16, + 0, 2, 0, 0, 0, 56, 32, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 10, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 9, 18, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 192, 1, 64, 0, + 0, 0, 0, 64, 64, 56, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 56, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 10, 0, 16, + 0, 2, 0, 0, 0, 56, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 16, 0, 0, 7, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 52, 0, 0, + 7, 18, 0, 16, 0, 0, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 8, 114, 0, 16, + 0, 0, 0, 0, 0, 6, 0, 16, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 5, 0, 0, + 0, 54, 0, 0, 5, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 3, 0, 0, 0, 54, 0, 0, + 5, 18, 0, 16, 0, 2, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 1, 33, 0, 0, + 7, 34, 0, 16, 0, 2, 0, 0, + 0, 10, 0, 16, 0, 2, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 3, 0, 4, 3, 26, 0, 16, + 0, 2, 0, 0, 0, 50, 0, 0, + 9, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 246, 15, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 30, 0, 0, 7, 18, 0, 16, + 0, 2, 0, 0, 0, 10, 0, 16, + 0, 2, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 69, 0, 0, 9, 242, 0, 16, + 0, 0, 0, 0, 0, 70, 16, 16, + 0, 3, 0, 0, 0, 70, 126, 16, + 0, 0, 0, 0, 0, 0, 96, 16, + 0, 0, 0, 0, 0, 56, 0, 0, + 8, 242, 0, 16, 0, 0, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 54, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 128, + 63, 56, 0, 0, 7, 242, 0, 16, + 0, 0, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 70, 14, 16, + 0, 1, 0, 0, 0, 54, 0, 0, + 5, 242, 32, 16, 0, 0, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 242, 32, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 54, 0, 0, + 5, 242, 32, 16, 0, 2, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 242, 32, 16, + 0, 3, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 62, 0, 0, + 1, 83, 84, 65, 84, 116, 0, 0, + 0, 75, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 47, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 82, 68, 69, + 70, 224, 3, 0, 0, 1, 0, 0, + 0, 176, 0, 0, 0, 3, 0, 0, + 0, 28, 0, 0, 0, 0, 4, 255, +255, 0, 65, 0, 0, 172, 3, 0, + 0, 124, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, + 0, 145, 0, 0, 0, 2, 0, 0, + 0, 5, 0, 0, 0, 4, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 1, 0, 0, 0, 13, 0, 0, + 0, 166, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 115, 97, 109, 112, 108, 101, 114, + 95, 95, 67, 67, 95, 84, 101, 120, +116, 117, 114, 101, 48, 0, 116, 101, +120, 116, 117, 114, 101, 95, 95, 67, + 67, 95, 84, 101, 120, 116, 117, 114, +101, 48, 0, 36, 71, 108, 111, 98, + 97, 108, 115, 0, 171, 166, 0, 0, + 0, 11, 0, 0, 0, 200, 0, 0, + 0, 176, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 208, 1, 0, + 0, 0, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 236, 1, 0, + 0, 0, 0, 0, 0, 252, 1, 0, + 0, 16, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 20, 2, 0, + 0, 0, 0, 0, 0, 36, 2, 0, + 0, 32, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 64, 2, 0, + 0, 0, 0, 0, 0, 80, 2, 0, + 0, 48, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 108, 2, 0, + 0, 0, 0, 0, 0, 124, 2, 0, + 0, 64, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 156, 2, 0, + 0, 0, 0, 0, 0, 172, 2, 0, + 0, 80, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 196, 2, 0, + 0, 0, 0, 0, 0, 212, 2, 0, + 0, 96, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 240, 2, 0, + 0, 0, 0, 0, 0, 0, 3, 0, + 0, 112, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 32, 3, 0, + 0, 0, 0, 0, 0, 48, 3, 0, + 0, 128, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 80, 3, 0, + 0, 0, 0, 0, 0, 96, 3, 0, + 0, 144, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 128, 3, 0, + 0, 0, 0, 0, 0, 144, 3, 0, + 0, 160, 0, 0, 0, 16, 0, 0, + 0, 2, 0, 0, 0, 156, 3, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 65, 109, 98, 105, 101, 110, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 68, 105, 114, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 68, 105, 114, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 68, 105, 114, 101, 99, 116, +105, 111, 110, 0, 171, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 80, 111, 105, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 171, 171, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 82, 97, 110, 103, +101, 73, 110, 118, 101, 114, 115, 101, + 0, 0, 0, 3, 0, 1, 0, 1, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 83, 112, 111, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 67, 111, 108, 111, 114, + 0, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 83, 112, 111, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 68, 105, 114, 101, 99, +116, 105, 111, 110, 0, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 73, +110, 110, 101, 114, 65, 110, 103, 108, +101, 67, 111, 115, 0, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 79, +117, 116, 101, 114, 65, 110, 103, 108, +101, 67, 111, 115, 0, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 82, + 97, 110, 103, 101, 73, 110, 118, 101, +114, 115, 101, 0, 171, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 99, 111, 108, 111, 114, 0, 171, 171, +171, 1, 0, 3, 0, 1, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 77, 105, 99, 114, 111, 115, 111, +102, 116, 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, 97, 100, +101, 114, 32, 67, 111, 109, 112, 105, +108, 101, 114, 32, 54, 46, 51, 46, + 57, 54, 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 171, 73, 83, 71, + 78, 116, 0, 0, 0, 4, 0, 0, + 0, 8, 0, 0, 0, 104, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 2, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, + 0, 3, 3, 0, 0, 84, 69, 88, + 67, 79, 79, 82, 68, 0, 171, 171, +171, 79, 83, 71, 78, 116, 0, 0, + 0, 4, 0, 0, 0, 8, 0, 0, + 0, 104, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 1, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 2, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 15, 0, 0, + 0, 83, 86, 95, 84, 97, 114, 103, +101, 116, 0, 171, 171, 68, 88, 66, + 67, 106, 130, 90, 239, 10, 84, 211, + 59, 203, 2, 21, 174, 163, 154, 53, +193, 1, 0, 0, 0, 124, 10, 0, + 0, 6, 0, 0, 0, 56, 0, 0, + 0, 224, 2, 0, 0, 64, 7, 0, + 0, 188, 7, 0, 0, 120, 9, 0, + 0, 220, 9, 0, 0, 65, 111, 110, + 57, 160, 2, 0, 0, 160, 2, 0, + 0, 0, 2, 254, 255, 108, 2, 0, + 0, 52, 0, 0, 0, 1, 0, 36, + 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 36, 0, 1, 0, 48, + 0, 0, 0, 0, 0, 13, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 254, 255, 81, 0, 0, + 5, 0, 0, 15, 160, 0, 0, 125, + 67, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 81, 0, 0, + 5, 14, 0, 15, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 128, + 63, 0, 0, 0, 63, 81, 0, 0, + 5, 15, 0, 15, 160, 0, 0, 128, + 63, 0, 0, 128, 191, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 5, 0, 0, 15, 240, 253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 0, 0, + 2, 5, 0, 0, 128, 0, 0, 15, +144, 31, 0, 0, 2, 5, 0, 1, +128, 1, 0, 15, 144, 31, 0, 0, + 2, 5, 0, 2, 128, 2, 0, 15, +144, 9, 0, 0, 3, 0, 0, 1, +128, 1, 0, 228, 160, 1, 0, 228, +144, 9, 0, 0, 3, 0, 0, 2, +128, 2, 0, 228, 160, 1, 0, 228, +144, 9, 0, 0, 3, 0, 0, 4, +128, 3, 0, 228, 160, 1, 0, 228, +144, 9, 0, 0, 3, 0, 0, 8, +128, 4, 0, 228, 160, 1, 0, 228, +144, 2, 0, 0, 3, 1, 0, 7, +128, 0, 0, 228, 129, 12, 0, 228, +160, 1, 0, 0, 2, 2, 0, 7, +128, 14, 0, 85, 160, 1, 0, 0, + 2, 1, 0, 8, 128, 14, 0, 85, +160, 38, 0, 0, 1, 0, 0, 228, +240, 45, 0, 3, 2, 1, 0, 255, +128, 14, 0, 170, 160, 2, 0, 0, + 3, 1, 0, 8, 128, 1, 0, 255, +128, 14, 0, 170, 160, 1, 0, 0, + 2, 2, 0, 7, 128, 1, 0, 228, +128, 39, 0, 0, 0, 1, 0, 0, + 2, 1, 0, 7, 224, 2, 0, 228, +128, 2, 0, 0, 3, 1, 0, 7, +128, 0, 0, 228, 129, 13, 0, 228, +160, 1, 0, 0, 2, 2, 0, 7, +128, 14, 0, 85, 160, 1, 0, 0, + 2, 1, 0, 8, 128, 14, 0, 85, +160, 38, 0, 0, 1, 0, 0, 228, +240, 45, 0, 3, 2, 1, 0, 255, +128, 14, 0, 170, 160, 2, 0, 0, + 3, 1, 0, 8, 128, 1, 0, 255, +128, 14, 0, 170, 160, 1, 0, 0, + 2, 2, 0, 7, 128, 1, 0, 228, +128, 39, 0, 0, 0, 1, 0, 0, + 2, 2, 0, 7, 224, 2, 0, 228, +128, 8, 0, 0, 3, 0, 0, 1, +224, 5, 0, 228, 160, 0, 0, 228, +144, 8, 0, 0, 3, 0, 0, 2, +224, 6, 0, 228, 160, 0, 0, 228, +144, 8, 0, 0, 3, 0, 0, 4, +224, 7, 0, 228, 160, 0, 0, 228, +144, 9, 0, 0, 3, 1, 0, 1, +128, 8, 0, 228, 160, 0, 0, 228, +128, 9, 0, 0, 3, 1, 0, 4, +128, 9, 0, 228, 160, 0, 0, 228, +128, 9, 0, 0, 3, 1, 0, 8, +128, 10, 0, 228, 160, 0, 0, 228, +128, 9, 0, 0, 3, 0, 0, 1, +128, 11, 0, 228, 160, 0, 0, 228, +128, 1, 0, 0, 2, 1, 0, 2, +128, 1, 0, 170, 129, 2, 0, 0, + 3, 0, 0, 2, 128, 0, 0, 0, +128, 1, 0, 255, 128, 5, 0, 0, + 3, 0, 0, 4, 192, 0, 0, 85, +128, 14, 0, 255, 160, 4, 0, 0, + 4, 0, 0, 3, 192, 0, 0, 0, +128, 0, 0, 228, 160, 1, 0, 228, +128, 4, 0, 0, 4, 3, 0, 3, +224, 2, 0, 228, 144, 15, 0, 228, +160, 15, 0, 226, 160, 1, 0, 0, + 2, 0, 0, 8, 192, 0, 0, 0, +128, 255, 255, 0, 0, 83, 72, 68, + 82, 88, 4, 0, 0, 64, 0, 1, + 0, 22, 1, 0, 0, 89, 0, 0, + 4, 70, 142, 32, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 95, 0, 0, + 3, 114, 16, 16, 0, 0, 0, 0, + 0, 95, 0, 0, 3, 242, 16, 16, + 0, 1, 0, 0, 0, 95, 0, 0, + 3, 50, 16, 16, 0, 2, 0, 0, + 0, 101, 0, 0, 3, 114, 32, 16, + 0, 0, 0, 0, 0, 101, 0, 0, + 3, 114, 32, 16, 0, 1, 0, 0, + 0, 101, 0, 0, 3, 114, 32, 16, + 0, 2, 0, 0, 0, 101, 0, 0, + 3, 50, 32, 16, 0, 3, 0, 0, + 0, 103, 0, 0, 4, 242, 32, 16, + 0, 4, 0, 0, 0, 1, 0, 0, + 0, 104, 0, 0, 2, 3, 0, 0, + 0, 105, 0, 0, 4, 0, 0, 0, + 0, 1, 0, 0, 0, 4, 0, 0, + 0, 105, 0, 0, 4, 1, 0, 0, + 0, 1, 0, 0, 0, 4, 0, 0, + 0, 54, 0, 0, 9, 114, 48, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 54, 0, 0, + 9, 114, 48, 32, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 2, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 8, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 70, 30, 16, 0, 1, 0, 0, + 0, 17, 0, 0, 8, 34, 0, 16, + 0, 0, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 70, 30, 16, 0, 1, 0, 0, + 0, 17, 0, 0, 8, 66, 0, 16, + 0, 0, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 2, 0, 0, + 0, 70, 30, 16, 0, 1, 0, 0, + 0, 17, 0, 0, 8, 130, 0, 16, + 0, 0, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 70, 30, 16, 0, 1, 0, 0, + 0, 0, 0, 0, 9, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 2, 16, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 54, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 1, 33, 0, 0, + 7, 18, 0, 16, 0, 2, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 3, 0, 4, 3, 10, 0, 16, + 0, 2, 0, 0, 0, 54, 0, 0, + 6, 114, 48, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 30, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 22, 0, 0, 1, 0, 0, 0, + 9, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 12, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 18, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 10, 0, 16, 0, 2, 0, 0, + 0, 54, 0, 0, 6, 114, 48, 32, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 30, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 16, 0, 0, 8, 18, 32, 16, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 4, 0, 0, + 0, 70, 18, 16, 0, 0, 0, 0, + 0, 16, 0, 0, 8, 34, 32, 16, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 5, 0, 0, + 0, 70, 18, 16, 0, 0, 0, 0, + 0, 16, 0, 0, 8, 66, 32, 16, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 70, 18, 16, 0, 0, 0, 0, + 0, 17, 0, 0, 8, 18, 32, 16, + 0, 4, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 7, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 17, 0, 0, 8, 18, 0, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 17, 0, 0, 8, 34, 0, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 9, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 17, 0, 0, 8, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 142, 32, + 0, 0, 0, 0, 0, 10, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 6, 34, 32, 16, + 0, 4, 0, 0, 0, 10, 0, 16, +128, 65, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 7, 34, 0, 16, + 0, 0, 0, 0, 0, 10, 0, 16, + 0, 0, 0, 0, 0, 26, 0, 16, + 0, 1, 0, 0, 0, 56, 0, 0, + 7, 66, 32, 16, 0, 4, 0, 0, + 0, 26, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 63, 54, 0, 0, 6, 114, 32, 16, + 0, 1, 0, 0, 0, 70, 50, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 6, 114, 32, 16, + 0, 2, 0, 0, 0, 70, 50, 32, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 130, 32, 16, + 0, 4, 0, 0, 0, 10, 0, 16, + 0, 0, 0, 0, 0, 50, 0, 0, + 15, 50, 32, 16, 0, 3, 0, 0, + 0, 70, 16, 16, 0, 2, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 128, + 63, 0, 0, 128, 191, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 128, + 63, 0, 0, 0, 0, 0, 0, 0, + 0, 62, 0, 0, 1, 83, 84, 65, + 84, 116, 0, 0, 0, 37, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 17, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 82, 68, 69, 70, 180, 1, 0, + 0, 1, 0, 0, 0, 72, 0, 0, + 0, 1, 0, 0, 0, 28, 0, 0, + 0, 0, 4, 254, 255, 0, 65, 0, + 0, 128, 1, 0, 0, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 36, 71, 108, +111, 98, 97, 108, 115, 0, 171, 171, +171, 60, 0, 0, 0, 5, 0, 0, + 0, 96, 0, 0, 0, 208, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 216, 0, 0, 0, 0, 0, 0, + 0, 64, 0, 0, 0, 2, 0, 0, + 0, 232, 0, 0, 0, 0, 0, 0, + 0, 248, 0, 0, 0, 64, 0, 0, + 0, 44, 0, 0, 0, 2, 0, 0, + 0, 12, 1, 0, 0, 0, 0, 0, + 0, 28, 1, 0, 0, 112, 0, 0, + 0, 64, 0, 0, 0, 2, 0, 0, + 0, 232, 0, 0, 0, 0, 0, 0, + 0, 40, 1, 0, 0, 176, 0, 0, + 0, 12, 0, 0, 0, 2, 0, 0, + 0, 68, 1, 0, 0, 0, 0, 0, + 0, 84, 1, 0, 0, 192, 0, 0, + 0, 12, 0, 0, 0, 2, 0, 0, + 0, 112, 1, 0, 0, 0, 0, 0, + 0, 95, 67, 67, 95, 77, 86, 77, + 97, 116, 114, 105, 120, 0, 171, 171, +171, 3, 0, 3, 0, 4, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 95, 67, 67, 95, 78, 111, 114, +109, 97, 108, 77, 97, 116, 114, 105, +120, 0, 171, 171, 171, 3, 0, 3, + 0, 3, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 95, 67, 67, + 95, 80, 77, 97, 116, 114, 105, 120, + 0, 95, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 80, 111, 115, 105, +116, 105, 111, 110, 0, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 80, +111, 115, 105, 116, 105, 111, 110, 0, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 77, 105, 99, 114, 111, 115, 111, +102, 116, 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, 97, 100, +101, 114, 32, 67, 111, 109, 112, 105, +108, 101, 114, 32, 54, 46, 51, 46, + 57, 54, 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 171, 73, 83, 71, + 78, 92, 0, 0, 0, 3, 0, 0, + 0, 8, 0, 0, 0, 80, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 0, 0, 80, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 15, 15, 0, 0, 80, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 2, 0, 0, + 0, 3, 3, 0, 0, 84, 69, 88, + 67, 79, 79, 82, 68, 0, 171, 171, +171, 79, 83, 71, 78, 152, 0, 0, + 0, 5, 0, 0, 0, 8, 0, 0, + 0, 128, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 1, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 2, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 3, 12, 0, + 0, 137, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 15, 0, 0, + 0, 84, 69, 88, 67, 79, 79, 82, + 68, 0, 83, 86, 95, 80, 111, 115, +105, 116, 105, 111, 110, 0, 171, 171, +171, +}; + const unsigned char s_53938AB67AD93ABA0DDB87F3C9889304284E011E[] = { 166, 147, 0, 0, 142, 9, 2, 1, @@ -1301,7 +2430,7 @@ const unsigned char s_53938AB67AD93ABA0DDB87F3C9889304284E011E[] = { 120, 116, 117, 114, 101, 48, 0, 0, 0, 0, 1, 0, 0, 0, 24, 4, 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 200, 5, 103, 205, 248, 30, 69, 65, 32, 117, @@ -1675,7 +2804,7 @@ const unsigned char s_67837675F2BB48C0E926316F505FC1538228E0FA[] = { 86, 80, 77, 97, 116, 114, 105, 120, 0, 0, 0, 0, 0, 0, 0, 0, 16, 4, 0, 0, 48, 5, 0, 0, - 0, 0, 0, 0, 194, 137, 0, 0, + 0, 0, 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 79, 226, 72, 124, 94, 252, 37, 157, @@ -2070,7 +3199,7 @@ const unsigned char s_78250E25D1929D4A842050738140787BE42541C6[] = { 108, 112, 104, 97, 95, 118, 97, 108, 117, 101, 0, 0, 0, 0, 2, 0, 0, 0, 36, 5, 0, 0, 4, 5, - 0, 0, 0, 0, 0, 0, 194, 137, + 0, 0, 0, 0, 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 100, 113, 175, 29, 164, 71, @@ -2485,7 +3614,7 @@ const unsigned char s_7B67DD242152D35ACC079265FAD9D03DC98182DE[] = { 67, 95, 84, 101, 120, 116, 117, 114, 101, 48, 0, 0, 0, 0, 1, 0, 0, 0, 248, 3, 0, 0, 0, 5, - 0, 0, 0, 0, 0, 0, 194, 137, + 0, 0, 0, 0, 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 11, 95, 74, 206, 145, 124, @@ -2869,7 +3998,7 @@ const unsigned char s_7CE5EE84ACB6110F7FA29152ECE3344CB6D6620D[] = { 99, 111, 108, 111, 114, 0, 0, 0, 0, 2, 0, 0, 0, 96, 4, 0, 0, 192, 4, 0, 0, 0, 0, 0, - 0, 194, 137, 0, 0, 0, 0, 0, + 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 157, 116, 105, 89, 118, 135, 249, 239, 42, 226, 184, @@ -3250,7 +4379,7 @@ const unsigned char s_7E1EEF397305D0BC2DCDBA4F2DAFBCBA1534E45C[] = { 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 1, 0, 0, 0, 52, 3, 0, 0, 40, 4, 0, 0, 0, - 0, 0, 0, 194, 137, 0, 0, 0, + 0, 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 153, 8, 62, 201, 202, 170, 111, 182, 149, @@ -3584,7 +4713,7 @@ const unsigned char s_847DBFDDA6EC09C57E4ED43012AE2FB5CAC7D8D5[] = { 111, 108, 111, 114, 0, 0, 0, 0, 2, 0, 0, 0, 240, 4, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, -194, 137, 0, 0, 0, 0, 0, 0, +107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 134, 66, 128, 226, 107, 172, 247, 161, 241, 207, 89, 240, @@ -4001,7 +5130,7 @@ const unsigned char s_92BE325B516F887D2C928EDE20ADF428DB01C038[] = { 95, 118, 97, 108, 117, 101, 0, 0, 0, 0, 2, 0, 0, 0, 36, 5, 0, 0, 0, 5, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 100, 113, 175, 29, 164, 71, 177, 78, 120, 99, @@ -4330,6 +5459,1070 @@ const unsigned char s_92BE325B516F887D2C928EDE20ADF428DB01C038[] = { 111, 110, 0, 171, 171, 171, }; +const unsigned char s_93D31E1668075AE4941C53441D7A9D0DE8F76331[] = { + +166, 147, 0, 0, 142, 9, 2, 1, + 0, 128, 0, 0, 82, 139, 0, 0, + 10, 0, 0, 0, 97, 95, 112, 111, +115, 105, 116, 105, 111, 110, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 255, 255, 255, 255, 80, 139, + 0, 0, 10, 0, 0, 0, 97, 95, +116, 101, 120, 67, 111, 111, 114, 100, + 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 81, 139, 0, 0, 8, 0, 0, 0, + 97, 95, 110, 111, 114, 109, 97, 108, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 92, 139, 0, + 0, 242, 141, 0, 0, 11, 0, 0, + 0, 67, 67, 95, 77, 86, 77, 97, +116, 114, 105, 120, 0, 0, 0, 0, +255, 255, 255, 255, 0, 0, 0, 0, + 4, 0, 0, 0, 91, 139, 0, 0, +242, 141, 0, 0, 15, 0, 0, 0, + 67, 67, 95, 78, 111, 114, 109, 97, +108, 77, 97, 116, 114, 105, 120, 0, + 0, 0, 0, 255, 255, 255, 255, 4, + 0, 0, 0, 3, 0, 0, 0, 92, +139, 0, 0, 242, 141, 0, 0, 10, + 0, 0, 0, 67, 67, 95, 80, 77, + 97, 116, 114, 105, 120, 0, 0, 0, + 0, 255, 255, 255, 255, 7, 0, 0, + 0, 4, 0, 0, 0, 81, 139, 0, + 0, 242, 141, 0, 0, 26, 0, 0, + 0, 117, 95, 80, 111, 105, 110, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 80, 111, 115, 105, 116, +105, 111, 110, 1, 0, 0, 0, 255, +255, 255, 255, 11, 0, 0, 0, 1, + 0, 0, 0, 81, 139, 0, 0, 242, +141, 0, 0, 25, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 80, 111, 115, 105, 116, 105, 111, 110, + 1, 0, 0, 0, 255, 255, 255, 255, + 12, 0, 0, 0, 1, 0, 0, 0, + 81, 139, 0, 0, 241, 141, 0, 0, + 25, 0, 0, 0, 117, 95, 65, 109, + 98, 105, 101, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 81, 139, 0, + 0, 241, 141, 0, 0, 21, 0, 0, + 0, 117, 95, 68, 105, 114, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 67, 111, 108, 111, 114, 1, 0, + 0, 0, 1, 0, 0, 0, 255, 255, +255, 255, 1, 0, 0, 0, 81, 139, + 0, 0, 241, 141, 0, 0, 25, 0, + 0, 0, 117, 95, 68, 105, 114, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 68, 105, 114, 101, 99, 116, +105, 111, 110, 1, 0, 0, 0, 2, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 81, 139, 0, 0, 241, +141, 0, 0, 23, 0, 0, 0, 117, + 95, 80, 111, 105, 110, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 67, 111, 108, 111, 114, 1, 0, + 0, 0, 3, 0, 0, 0, 255, 255, +255, 255, 1, 0, 0, 0, 6, 20, + 0, 0, 241, 141, 0, 0, 30, 0, + 0, 0, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 82, 97, 110, 103, +101, 73, 110, 118, 101, 114, 115, 101, + 1, 0, 0, 0, 4, 0, 0, 0, +255, 255, 255, 255, 1, 0, 0, 0, + 81, 139, 0, 0, 241, 141, 0, 0, + 22, 0, 0, 0, 117, 95, 83, 112, +111, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 67, 111, 108, +111, 114, 1, 0, 0, 0, 5, 0, + 0, 0, 255, 255, 255, 255, 1, 0, + 0, 0, 81, 139, 0, 0, 241, 141, + 0, 0, 26, 0, 0, 0, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 68, +105, 114, 101, 99, 116, 105, 111, 110, + 1, 0, 0, 0, 6, 0, 0, 0, +255, 255, 255, 255, 1, 0, 0, 0, + 6, 20, 0, 0, 241, 141, 0, 0, + 30, 0, 0, 0, 117, 95, 83, 112, +111, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 73, 110, 110, +101, 114, 65, 110, 103, 108, 101, 67, +111, 115, 1, 0, 0, 0, 7, 0, + 0, 0, 255, 255, 255, 255, 1, 0, + 0, 0, 6, 20, 0, 0, 241, 141, + 0, 0, 30, 0, 0, 0, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 79, +117, 116, 101, 114, 65, 110, 103, 108, +101, 67, 111, 115, 1, 0, 0, 0, + 8, 0, 0, 0, 255, 255, 255, 255, + 1, 0, 0, 0, 6, 20, 0, 0, +241, 141, 0, 0, 29, 0, 0, 0, +117, 95, 83, 112, 111, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 82, 97, 110, 103, 101, 73, 110, +118, 101, 114, 115, 101, 1, 0, 0, + 0, 9, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 82, 139, 0, + 0, 241, 141, 0, 0, 7, 0, 0, + 0, 117, 95, 99, 111, 108, 111, 114, + 0, 0, 0, 0, 10, 0, 0, 0, +255, 255, 255, 255, 1, 0, 0, 0, + 16, 0, 0, 0, 11, 0, 0, 0, + 67, 67, 95, 77, 86, 77, 97, 116, +114, 105, 120, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 67, + 67, 95, 78, 111, 114, 109, 97, 108, + 77, 97, 116, 114, 105, 120, 0, 0, + 0, 0, 1, 0, 0, 0, 10, 0, + 0, 0, 67, 67, 95, 80, 77, 97, +116, 114, 105, 120, 0, 0, 0, 0, + 2, 0, 0, 0, 26, 0, 0, 0, +117, 95, 80, 111, 105, 110, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 80, 111, 115, 105, 116, 105, +111, 110, 0, 0, 0, 0, 3, 0, + 0, 0, 25, 0, 0, 0, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 80, +111, 115, 105, 116, 105, 111, 110, 0, + 0, 0, 0, 4, 0, 0, 0, 25, + 0, 0, 0, 117, 95, 65, 109, 98, +105, 101, 110, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 67, +111, 108, 111, 114, 0, 0, 0, 0, + 5, 0, 0, 0, 21, 0, 0, 0, +117, 95, 68, 105, 114, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 0, 0, + 0, 6, 0, 0, 0, 25, 0, 0, + 0, 117, 95, 68, 105, 114, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 68, 105, 114, 101, 99, 116, 105, +111, 110, 0, 0, 0, 0, 7, 0, + 0, 0, 23, 0, 0, 0, 117, 95, + 80, 111, 105, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 0, 0, + 0, 8, 0, 0, 0, 30, 0, 0, + 0, 117, 95, 80, 111, 105, 110, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 82, 97, 110, 103, 101, + 73, 110, 118, 101, 114, 115, 101, 0, + 0, 0, 0, 9, 0, 0, 0, 22, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 67, 111, 108, 111, +114, 0, 0, 0, 0, 10, 0, 0, + 0, 26, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 68, 105, +114, 101, 99, 116, 105, 111, 110, 0, + 0, 0, 0, 11, 0, 0, 0, 30, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 73, 110, 110, 101, +114, 65, 110, 103, 108, 101, 67, 111, +115, 0, 0, 0, 0, 12, 0, 0, + 0, 30, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 79, 117, +116, 101, 114, 65, 110, 103, 108, 101, + 67, 111, 115, 0, 0, 0, 0, 13, + 0, 0, 0, 29, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 82, 97, 110, 103, 101, 73, 110, 118, +101, 114, 115, 101, 0, 0, 0, 0, + 14, 0, 0, 0, 7, 0, 0, 0, +117, 95, 99, 111, 108, 111, 114, 0, + 0, 0, 0, 15, 0, 0, 0, 200, + 15, 0, 0, 216, 9, 0, 0, 0, + 0, 0, 0, 107, 155, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 88, 66, 67, 136, +158, 207, 210, 174, 144, 71, 116, 248, +243, 16, 127, 98, 212, 174, 233, 1, + 0, 0, 0, 200, 15, 0, 0, 6, + 0, 0, 0, 56, 0, 0, 0, 80, + 3, 0, 0, 236, 10, 0, 0, 104, + 11, 0, 0, 232, 14, 0, 0, 76, + 15, 0, 0, 65, 111, 110, 57, 16, + 3, 0, 0, 16, 3, 0, 0, 0, + 2, 255, 255, 224, 2, 0, 0, 48, + 0, 0, 0, 1, 0, 36, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 0, + 0, 36, 0, 0, 0, 48, 0, 0, + 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 255, 255, 81, + 0, 0, 5, 11, 0, 15, 160, 0, + 0, 0, 0, 0, 0, 128, 63, 0, + 0, 0, 192, 0, 0, 64, 64, 31, + 0, 0, 2, 0, 0, 0, 128, 0, + 0, 7, 176, 31, 0, 0, 2, 0, + 0, 0, 128, 1, 0, 7, 176, 31, + 0, 0, 2, 0, 0, 0, 128, 2, + 0, 7, 176, 5, 0, 0, 3, 0, + 0, 7, 128, 1, 0, 228, 176, 4, + 0, 0, 160, 8, 0, 0, 3, 0, + 0, 1, 128, 0, 0, 228, 128, 0, + 0, 228, 128, 2, 0, 0, 3, 0, + 0, 1, 128, 0, 0, 0, 129, 11, + 0, 85, 160, 11, 0, 0, 3, 1, + 0, 8, 128, 0, 0, 0, 128, 11, + 0, 0, 160, 2, 0, 0, 3, 0, + 0, 7, 128, 2, 0, 228, 160, 2, + 0, 228, 160, 36, 0, 0, 2, 1, + 0, 7, 128, 0, 0, 228, 128, 36, + 0, 0, 2, 0, 0, 7, 128, 0, + 0, 228, 176, 8, 0, 0, 3, 0, + 0, 8, 128, 0, 0, 228, 128, 1, + 0, 228, 129, 5, 0, 0, 3, 1, + 0, 7, 128, 0, 0, 255, 128, 1, + 0, 228, 160, 88, 0, 0, 4, 1, + 0, 7, 128, 0, 0, 255, 128, 1, + 0, 228, 128, 11, 0, 0, 160, 2, + 0, 0, 3, 1, 0, 7, 128, 1, + 0, 228, 128, 0, 0, 228, 160, 36, + 0, 0, 2, 2, 0, 7, 128, 1, + 0, 228, 176, 8, 0, 0, 3, 0, + 0, 8, 128, 0, 0, 228, 128, 2, + 0, 228, 128, 5, 0, 0, 3, 2, + 0, 7, 128, 0, 0, 255, 128, 3, + 0, 228, 160, 88, 0, 0, 4, 2, + 0, 7, 128, 0, 0, 255, 128, 2, + 0, 228, 128, 11, 0, 0, 160, 4, + 0, 0, 4, 1, 0, 7, 128, 2, + 0, 228, 128, 1, 0, 255, 128, 1, + 0, 228, 128, 2, 0, 0, 3, 2, + 0, 7, 128, 6, 0, 228, 160, 6, + 0, 228, 160, 36, 0, 0, 2, 3, + 0, 7, 128, 2, 0, 228, 128, 36, + 0, 0, 2, 2, 0, 7, 128, 2, + 0, 228, 176, 8, 0, 0, 3, 0, + 0, 8, 128, 3, 0, 228, 128, 2, + 0, 228, 129, 8, 0, 0, 3, 1, + 0, 8, 128, 0, 0, 228, 128, 2, + 0, 228, 128, 2, 0, 0, 3, 0, + 0, 1, 128, 0, 0, 255, 128, 8, + 0, 0, 161, 1, 0, 0, 2, 2, + 0, 1, 128, 8, 0, 0, 160, 2, + 0, 0, 3, 0, 0, 2, 128, 2, + 0, 0, 129, 7, 0, 0, 160, 6, + 0, 0, 2, 0, 0, 2, 128, 0, + 0, 85, 128, 5, 0, 0, 3, 0, + 0, 17, 128, 0, 0, 85, 128, 0, + 0, 0, 128, 4, 0, 0, 4, 0, + 0, 2, 128, 0, 0, 0, 128, 11, + 0, 170, 160, 11, 0, 255, 160, 5, + 0, 0, 3, 0, 0, 1, 128, 0, + 0, 0, 128, 0, 0, 0, 128, 5, + 0, 0, 3, 0, 0, 1, 128, 0, + 0, 0, 128, 0, 0, 85, 128, 5, + 0, 0, 3, 0, 0, 14, 128, 2, + 0, 144, 176, 9, 0, 0, 160, 8, + 0, 0, 3, 0, 0, 2, 128, 0, + 0, 249, 128, 0, 0, 249, 128, 2, + 0, 0, 3, 0, 0, 2, 128, 0, + 0, 85, 129, 11, 0, 85, 160, 5, + 0, 0, 3, 0, 0, 1, 128, 0, + 0, 0, 128, 0, 0, 85, 128, 88, + 0, 0, 4, 0, 0, 1, 128, 0, + 0, 85, 128, 0, 0, 0, 128, 11, + 0, 0, 160, 5, 0, 0, 3, 0, + 0, 14, 128, 1, 0, 255, 128, 5, + 0, 144, 160, 88, 0, 0, 4, 0, + 0, 14, 128, 1, 0, 255, 128, 0, + 0, 228, 128, 11, 0, 0, 160, 4, + 0, 0, 4, 0, 0, 7, 128, 0, + 0, 249, 128, 0, 0, 0, 128, 1, + 0, 228, 128, 1, 0, 0, 2, 0, + 0, 8, 128, 11, 0, 85, 160, 5, + 0, 0, 3, 0, 0, 15, 128, 0, + 0, 228, 128, 10, 0, 228, 160, 1, + 0, 0, 2, 0, 8, 15, 128, 0, + 0, 228, 128, 1, 0, 0, 2, 1, + 8, 15, 128, 0, 0, 228, 128, 1, + 0, 0, 2, 2, 8, 15, 128, 0, + 0, 228, 128, 1, 0, 0, 2, 3, + 8, 15, 128, 0, 0, 228, 128, 255, +255, 0, 0, 83, 72, 68, 82, 148, + 7, 0, 0, 64, 0, 0, 0, 229, + 1, 0, 0, 89, 0, 0, 4, 70, +142, 32, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 98, 16, 0, 3, 114, + 16, 16, 0, 0, 0, 0, 0, 98, + 16, 0, 3, 114, 16, 16, 0, 1, + 0, 0, 0, 98, 16, 0, 3, 114, + 16, 16, 0, 2, 0, 0, 0, 101, + 0, 0, 3, 242, 32, 16, 0, 0, + 0, 0, 0, 101, 0, 0, 3, 242, + 32, 16, 0, 1, 0, 0, 0, 101, + 0, 0, 3, 242, 32, 16, 0, 2, + 0, 0, 0, 101, 0, 0, 3, 242, + 32, 16, 0, 3, 0, 0, 0, 104, + 0, 0, 2, 4, 0, 0, 0, 16, + 0, 0, 7, 18, 0, 16, 0, 0, + 0, 0, 0, 70, 18, 16, 0, 0, + 0, 0, 0, 70, 18, 16, 0, 0, + 0, 0, 0, 68, 0, 0, 5, 18, + 0, 16, 0, 0, 0, 0, 0, 10, + 0, 16, 0, 0, 0, 0, 0, 56, + 0, 0, 7, 114, 0, 16, 0, 0, + 0, 0, 0, 6, 0, 16, 0, 0, + 0, 0, 0, 70, 18, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 114, + 0, 16, 0, 1, 0, 0, 0, 70, +130, 32, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 16, + 0, 0, 7, 130, 0, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 1, + 0, 0, 0, 70, 2, 16, 0, 1, + 0, 0, 0, 68, 0, 0, 5, 130, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 0, 0, 0, 0, 0, 56, + 0, 0, 7, 114, 0, 16, 0, 1, + 0, 0, 0, 246, 15, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 1, + 0, 0, 0, 16, 0, 0, 8, 130, + 0, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 128, 65, 0, 0, 0, 1, + 0, 0, 0, 52, 0, 0, 7, 130, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 0, 0, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 6, 114, 0, 16, 0, 1, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 5, 130, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 1, 33, + 0, 0, 7, 18, 0, 16, 0, 2, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 3, 0, 4, 3, 10, + 0, 16, 0, 2, 0, 0, 0, 50, + 0, 0, 10, 114, 0, 16, 0, 1, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 246, + 15, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 30, + 0, 0, 7, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 22, 0, 0, 1, 56, + 0, 0, 8, 114, 0, 16, 0, 2, + 0, 0, 0, 70, 18, 16, 0, 1, + 0, 0, 0, 6, 128, 32, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 16, + 0, 0, 7, 130, 0, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 2, + 0, 0, 0, 70, 2, 16, 0, 2, + 0, 0, 0, 0, 0, 0, 8, 130, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 128, 65, 0, 0, 0, 0, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 128, 63, 52, 0, 0, 7, 130, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 0, 0, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 7, 130, 0, 16, 0, 1, + 0, 0, 0, 70, 18, 16, 0, 1, + 0, 0, 0, 70, 18, 16, 0, 1, + 0, 0, 0, 68, 0, 0, 5, 130, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 56, + 0, 0, 7, 114, 0, 16, 0, 2, + 0, 0, 0, 246, 15, 16, 0, 1, + 0, 0, 0, 70, 18, 16, 0, 1, + 0, 0, 0, 16, 0, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 2, 0, 0, 0, 52, + 0, 0, 7, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 0, 56, 0, 0, 8, 114, + 0, 16, 0, 2, 0, 0, 0, 246, + 15, 16, 0, 1, 0, 0, 0, 70, +130, 32, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 54, 0, 0, 5, 114, + 0, 16, 0, 3, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 54, + 0, 0, 5, 130, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 1, 33, + 0, 0, 7, 130, 0, 16, 0, 2, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 3, 0, 4, 3, 58, + 0, 16, 0, 2, 0, 0, 0, 50, + 0, 0, 9, 114, 0, 16, 0, 3, + 0, 0, 0, 70, 2, 16, 0, 2, + 0, 0, 0, 246, 15, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 3, + 0, 0, 0, 30, 0, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 1, + 64, 0, 0, 1, 0, 0, 0, 22, + 0, 0, 1, 56, 0, 0, 8, 114, + 0, 16, 0, 1, 0, 0, 0, 70, + 18, 16, 0, 2, 0, 0, 0, 6, +128, 32, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 16, 0, 0, 7, 130, + 0, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 0, + 0, 0, 8, 130, 0, 16, 0, 0, + 0, 0, 0, 58, 0, 16, 128, 65, + 0, 0, 0, 0, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 128, 63, 52, + 0, 0, 7, 130, 0, 16, 0, 0, + 0, 0, 0, 58, 0, 16, 0, 0, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 7, 18, + 0, 16, 0, 1, 0, 0, 0, 70, + 18, 16, 0, 2, 0, 0, 0, 70, + 18, 16, 0, 2, 0, 0, 0, 68, + 0, 0, 5, 18, 0, 16, 0, 1, + 0, 0, 0, 10, 0, 16, 0, 1, + 0, 0, 0, 56, 0, 0, 7, 114, + 0, 16, 0, 1, 0, 0, 0, 6, + 0, 16, 0, 1, 0, 0, 0, 70, + 18, 16, 0, 2, 0, 0, 0, 0, + 0, 0, 9, 114, 0, 16, 0, 2, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 70, +130, 32, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 16, 0, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 0, 2, 0, 0, 0, 70, + 2, 16, 0, 2, 0, 0, 0, 68, + 0, 0, 5, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 56, 0, 0, 7, 114, + 0, 16, 0, 2, 0, 0, 0, 246, + 15, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 0, 2, 0, 0, 0, 16, + 0, 0, 8, 130, 0, 16, 0, 1, + 0, 0, 0, 70, 2, 16, 0, 2, + 0, 0, 0, 70, 2, 16, 128, 65, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 10, 18, 0, 16, 0, 2, + 0, 0, 0, 10, 128, 32, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 10, +128, 32, 128, 65, 0, 0, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 0, + 0, 0, 9, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 10, 128, 32, 128, 65, + 0, 0, 0, 0, 0, 0, 0, 8, + 0, 0, 0, 14, 0, 0, 10, 18, + 0, 16, 0, 2, 0, 0, 0, 2, + 64, 0, 0, 0, 0, 128, 63, 0, + 0, 128, 63, 0, 0, 128, 63, 0, + 0, 128, 63, 10, 0, 16, 0, 2, + 0, 0, 0, 56, 32, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 10, + 0, 16, 0, 2, 0, 0, 0, 50, + 0, 0, 9, 18, 0, 16, 0, 2, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 192, 1, 64, 0, 0, 0, + 0, 64, 64, 56, 0, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 56, + 0, 0, 7, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 10, 0, 16, 0, 2, + 0, 0, 0, 56, 0, 0, 7, 130, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 0, 0, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 16, + 0, 0, 7, 18, 0, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 1, + 0, 0, 0, 52, 0, 0, 7, 18, + 0, 16, 0, 0, 0, 0, 0, 10, + 0, 16, 0, 0, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 0, 56, + 0, 0, 8, 114, 0, 16, 0, 0, + 0, 0, 0, 6, 0, 16, 0, 0, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 54, + 0, 0, 5, 114, 0, 16, 0, 1, + 0, 0, 0, 70, 2, 16, 0, 3, + 0, 0, 0, 54, 0, 0, 5, 18, + 0, 16, 0, 2, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 1, 33, 0, 0, 7, 34, + 0, 16, 0, 2, 0, 0, 0, 10, + 0, 16, 0, 2, 0, 0, 0, 1, + 64, 0, 0, 1, 0, 0, 0, 3, + 0, 4, 3, 26, 0, 16, 0, 2, + 0, 0, 0, 50, 0, 0, 9, 114, + 0, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 0, 0, 0, 0, 0, 246, + 15, 16, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 30, + 0, 0, 7, 18, 0, 16, 0, 2, + 0, 0, 0, 10, 0, 16, 0, 2, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 22, 0, 0, 1, 54, + 0, 0, 5, 130, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 128, 63, 56, 0, 0, 8, 242, + 0, 16, 0, 0, 0, 0, 0, 70, + 14, 16, 0, 1, 0, 0, 0, 70, +142, 32, 0, 0, 0, 0, 0, 10, + 0, 0, 0, 54, 0, 0, 5, 242, + 32, 16, 0, 0, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 54, + 0, 0, 5, 242, 32, 16, 0, 1, + 0, 0, 0, 70, 14, 16, 0, 0, + 0, 0, 0, 54, 0, 0, 5, 242, + 32, 16, 0, 2, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 54, + 0, 0, 5, 242, 32, 16, 0, 3, + 0, 0, 0, 70, 14, 16, 0, 0, + 0, 0, 0, 62, 0, 0, 1, 83, + 84, 65, 84, 116, 0, 0, 0, 73, + 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 46, + 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 82, 68, 69, 70, 120, + 3, 0, 0, 1, 0, 0, 0, 72, + 0, 0, 0, 1, 0, 0, 0, 28, + 0, 0, 0, 0, 4, 255, 255, 0, + 65, 0, 0, 68, 3, 0, 0, 60, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 36, + 71, 108, 111, 98, 97, 108, 115, 0, +171, 171, 171, 60, 0, 0, 0, 11, + 0, 0, 0, 96, 0, 0, 0, 176, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 104, 1, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 132, 1, 0, 0, 0, + 0, 0, 0, 148, 1, 0, 0, 16, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 172, 1, 0, 0, 0, + 0, 0, 0, 188, 1, 0, 0, 32, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 216, 1, 0, 0, 0, + 0, 0, 0, 232, 1, 0, 0, 48, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 4, 2, 0, 0, 0, + 0, 0, 0, 20, 2, 0, 0, 64, + 0, 0, 0, 4, 0, 0, 0, 2, + 0, 0, 0, 52, 2, 0, 0, 0, + 0, 0, 0, 68, 2, 0, 0, 80, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 92, 2, 0, 0, 0, + 0, 0, 0, 108, 2, 0, 0, 96, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 136, 2, 0, 0, 0, + 0, 0, 0, 152, 2, 0, 0, 112, + 0, 0, 0, 4, 0, 0, 0, 2, + 0, 0, 0, 184, 2, 0, 0, 0, + 0, 0, 0, 200, 2, 0, 0, 128, + 0, 0, 0, 4, 0, 0, 0, 2, + 0, 0, 0, 232, 2, 0, 0, 0, + 0, 0, 0, 248, 2, 0, 0, 144, + 0, 0, 0, 4, 0, 0, 0, 2, + 0, 0, 0, 24, 3, 0, 0, 0, + 0, 0, 0, 40, 3, 0, 0, 160, + 0, 0, 0, 16, 0, 0, 0, 2, + 0, 0, 0, 52, 3, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 65, 109, + 98, 105, 101, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 171, 1, + 0, 3, 0, 1, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 68, 105, 114, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 171, 1, + 0, 3, 0, 1, 0, 3, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 68, 105, 114, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 68, 105, 114, 101, 99, 116, 105, 111, +110, 0, 171, 1, 0, 3, 0, 1, + 0, 3, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 80, 111, +105, 110, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 67, 111, +108, 111, 114, 0, 171, 171, 171, 1, + 0, 3, 0, 1, 0, 3, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 80, 111, 105, 110, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 82, 97, 110, 103, 101, 73, +110, 118, 101, 114, 115, 101, 0, 0, + 0, 3, 0, 1, 0, 1, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 83, 112, 111, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 67, 111, 108, 111, 114, 0, 1, + 0, 3, 0, 1, 0, 3, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 83, 112, 111, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 68, 105, 114, 101, 99, 116, 105, +111, 110, 0, 1, 0, 3, 0, 1, + 0, 3, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 83, 112, +111, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 73, 110, 110, +101, 114, 65, 110, 103, 108, 101, 67, +111, 115, 0, 0, 0, 3, 0, 1, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 83, 112, +111, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 79, 117, 116, +101, 114, 65, 110, 103, 108, 101, 67, +111, 115, 0, 0, 0, 3, 0, 1, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 83, 112, +111, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 82, 97, 110, +103, 101, 73, 110, 118, 101, 114, 115, +101, 0, 171, 0, 0, 3, 0, 1, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 95, 117, 95, 99, 111, +108, 111, 114, 0, 171, 171, 171, 1, + 0, 3, 0, 1, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 77, +105, 99, 114, 111, 115, 111, 102, 116, + 32, 40, 82, 41, 32, 72, 76, 83, + 76, 32, 83, 104, 97, 100, 101, 114, + 32, 67, 111, 109, 112, 105, 108, 101, +114, 32, 54, 46, 51, 46, 57, 54, + 48, 48, 46, 49, 54, 51, 56, 52, + 0, 171, 171, 73, 83, 71, 78, 92, + 0, 0, 0, 3, 0, 0, 0, 8, + 0, 0, 0, 80, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 7, + 7, 0, 0, 80, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 1, 0, 0, 0, 7, + 7, 0, 0, 80, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 2, 0, 0, 0, 7, + 7, 0, 0, 84, 69, 88, 67, 79, + 79, 82, 68, 0, 171, 171, 171, 79, + 83, 71, 78, 116, 0, 0, 0, 4, + 0, 0, 0, 8, 0, 0, 0, 104, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 104, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 1, + 0, 0, 0, 15, 0, 0, 0, 104, + 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 2, + 0, 0, 0, 15, 0, 0, 0, 104, + 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 3, + 0, 0, 0, 15, 0, 0, 0, 83, + 86, 95, 84, 97, 114, 103, 101, 116, + 0, 171, 171, 68, 88, 66, 67, 9, +253, 39, 252, 253, 184, 163, 130, 180, + 90, 250, 242, 115, 30, 39, 35, 1, + 0, 0, 0, 216, 9, 0, 0, 6, + 0, 0, 0, 56, 0, 0, 0, 168, + 2, 0, 0, 180, 6, 0, 0, 48, + 7, 0, 0, 236, 8, 0, 0, 80, + 9, 0, 0, 65, 111, 110, 57, 104, + 2, 0, 0, 104, 2, 0, 0, 0, + 2, 254, 255, 52, 2, 0, 0, 52, + 0, 0, 0, 1, 0, 36, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 0, + 0, 36, 0, 1, 0, 48, 0, 0, + 0, 0, 0, 13, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 2, 254, 255, 81, 0, 0, 5, 0, + 0, 15, 160, 0, 0, 125, 67, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 81, 0, 0, 5, 14, + 0, 15, 160, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 128, 63, 0, + 0, 0, 63, 48, 0, 0, 5, 0, + 0, 15, 240, 253, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 31, 0, 0, 2, 5, + 0, 0, 128, 0, 0, 15, 144, 31, + 0, 0, 2, 5, 0, 1, 128, 1, + 0, 15, 144, 9, 0, 0, 3, 0, + 0, 1, 128, 1, 0, 228, 160, 1, + 0, 228, 144, 9, 0, 0, 3, 0, + 0, 2, 128, 2, 0, 228, 160, 1, + 0, 228, 144, 9, 0, 0, 3, 0, + 0, 4, 128, 3, 0, 228, 160, 1, + 0, 228, 144, 9, 0, 0, 3, 0, + 0, 8, 128, 4, 0, 228, 160, 1, + 0, 228, 144, 2, 0, 0, 3, 1, + 0, 7, 128, 0, 0, 228, 129, 12, + 0, 228, 160, 1, 0, 0, 2, 2, + 0, 7, 128, 14, 0, 85, 160, 1, + 0, 0, 2, 1, 0, 8, 128, 14, + 0, 85, 160, 38, 0, 0, 1, 0, + 0, 228, 240, 45, 0, 3, 2, 1, + 0, 255, 128, 14, 0, 170, 160, 2, + 0, 0, 3, 1, 0, 8, 128, 1, + 0, 255, 128, 14, 0, 170, 160, 1, + 0, 0, 2, 2, 0, 7, 128, 1, + 0, 228, 128, 39, 0, 0, 0, 1, + 0, 0, 2, 1, 0, 7, 224, 2, + 0, 228, 128, 2, 0, 0, 3, 1, + 0, 7, 128, 0, 0, 228, 129, 13, + 0, 228, 160, 1, 0, 0, 2, 2, + 0, 7, 128, 14, 0, 85, 160, 1, + 0, 0, 2, 1, 0, 8, 128, 14, + 0, 85, 160, 38, 0, 0, 1, 0, + 0, 228, 240, 45, 0, 3, 2, 1, + 0, 255, 128, 14, 0, 170, 160, 2, + 0, 0, 3, 1, 0, 8, 128, 1, + 0, 255, 128, 14, 0, 170, 160, 1, + 0, 0, 2, 2, 0, 7, 128, 1, + 0, 228, 128, 39, 0, 0, 0, 1, + 0, 0, 2, 2, 0, 7, 224, 2, + 0, 228, 128, 8, 0, 0, 3, 0, + 0, 1, 224, 5, 0, 228, 160, 0, + 0, 228, 144, 8, 0, 0, 3, 0, + 0, 2, 224, 6, 0, 228, 160, 0, + 0, 228, 144, 8, 0, 0, 3, 0, + 0, 4, 224, 7, 0, 228, 160, 0, + 0, 228, 144, 9, 0, 0, 3, 1, + 0, 1, 128, 8, 0, 228, 160, 0, + 0, 228, 128, 9, 0, 0, 3, 1, + 0, 4, 128, 9, 0, 228, 160, 0, + 0, 228, 128, 9, 0, 0, 3, 1, + 0, 8, 128, 10, 0, 228, 160, 0, + 0, 228, 128, 9, 0, 0, 3, 0, + 0, 1, 128, 11, 0, 228, 160, 0, + 0, 228, 128, 1, 0, 0, 2, 1, + 0, 2, 128, 1, 0, 170, 129, 2, + 0, 0, 3, 0, 0, 2, 128, 0, + 0, 0, 128, 1, 0, 255, 128, 5, + 0, 0, 3, 0, 0, 4, 192, 0, + 0, 85, 128, 14, 0, 255, 160, 4, + 0, 0, 4, 0, 0, 3, 192, 0, + 0, 0, 128, 0, 0, 228, 160, 1, + 0, 228, 128, 1, 0, 0, 2, 0, + 0, 8, 192, 0, 0, 0, 128, 255, +255, 0, 0, 83, 72, 68, 82, 4, + 4, 0, 0, 64, 0, 1, 0, 1, + 1, 0, 0, 89, 0, 0, 4, 70, +142, 32, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 95, 0, 0, 3, 114, + 16, 16, 0, 0, 0, 0, 0, 95, + 0, 0, 3, 242, 16, 16, 0, 1, + 0, 0, 0, 101, 0, 0, 3, 114, + 32, 16, 0, 0, 0, 0, 0, 101, + 0, 0, 3, 114, 32, 16, 0, 1, + 0, 0, 0, 101, 0, 0, 3, 114, + 32, 16, 0, 2, 0, 0, 0, 103, + 0, 0, 4, 242, 32, 16, 0, 3, + 0, 0, 0, 1, 0, 0, 0, 104, + 0, 0, 2, 3, 0, 0, 0, 105, + 0, 0, 4, 0, 0, 0, 0, 1, + 0, 0, 0, 4, 0, 0, 0, 105, + 0, 0, 4, 1, 0, 0, 0, 1, + 0, 0, 0, 4, 0, 0, 0, 54, + 0, 0, 9, 114, 48, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 64, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 54, 0, 0, 9, 114, + 48, 32, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 2, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 8, 18, 0, 16, 0, 0, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 70, + 30, 16, 0, 1, 0, 0, 0, 17, + 0, 0, 8, 34, 0, 16, 0, 0, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 70, + 30, 16, 0, 1, 0, 0, 0, 17, + 0, 0, 8, 66, 0, 16, 0, 0, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 70, + 30, 16, 0, 1, 0, 0, 0, 17, + 0, 0, 8, 130, 0, 16, 0, 0, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 70, + 30, 16, 0, 1, 0, 0, 0, 0, + 0, 0, 9, 114, 0, 16, 0, 1, + 0, 0, 0, 70, 2, 16, 128, 65, + 0, 0, 0, 0, 0, 0, 0, 70, +130, 32, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 54, 0, 0, 5, 130, + 0, 16, 0, 1, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 1, 33, 0, 0, 7, 18, + 0, 16, 0, 2, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 1, + 64, 0, 0, 1, 0, 0, 0, 3, + 0, 4, 3, 10, 0, 16, 0, 2, + 0, 0, 0, 54, 0, 0, 6, 114, + 48, 32, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 70, 2, 16, 0, 1, + 0, 0, 0, 30, 0, 0, 7, 130, + 0, 16, 0, 1, 0, 0, 0, 58, + 0, 16, 0, 1, 0, 0, 0, 1, + 64, 0, 0, 1, 0, 0, 0, 22, + 0, 0, 1, 0, 0, 0, 9, 114, + 0, 16, 0, 1, 0, 0, 0, 70, + 2, 16, 128, 65, 0, 0, 0, 0, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 54, + 0, 0, 5, 130, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 1, 33, + 0, 0, 7, 18, 0, 16, 0, 2, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 3, 0, 4, 3, 10, + 0, 16, 0, 2, 0, 0, 0, 54, + 0, 0, 6, 114, 48, 32, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 70, + 2, 16, 0, 1, 0, 0, 0, 30, + 0, 0, 7, 130, 0, 16, 0, 1, + 0, 0, 0, 58, 0, 16, 0, 1, + 0, 0, 0, 1, 64, 0, 0, 1, + 0, 0, 0, 22, 0, 0, 1, 16, + 0, 0, 8, 18, 32, 16, 0, 0, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 70, + 18, 16, 0, 0, 0, 0, 0, 16, + 0, 0, 8, 34, 32, 16, 0, 0, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 70, + 18, 16, 0, 0, 0, 0, 0, 16, + 0, 0, 8, 66, 32, 16, 0, 0, + 0, 0, 0, 70, 130, 32, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 70, + 18, 16, 0, 0, 0, 0, 0, 17, + 0, 0, 8, 18, 32, 16, 0, 3, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 7, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 17, + 0, 0, 8, 18, 0, 16, 0, 1, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 17, + 0, 0, 8, 34, 0, 16, 0, 1, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 17, + 0, 0, 8, 18, 0, 16, 0, 0, + 0, 0, 0, 70, 142, 32, 0, 0, + 0, 0, 0, 10, 0, 0, 0, 70, + 14, 16, 0, 0, 0, 0, 0, 54, + 0, 0, 6, 34, 32, 16, 0, 3, + 0, 0, 0, 10, 0, 16, 128, 65, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 7, 34, 0, 16, 0, 0, + 0, 0, 0, 10, 0, 16, 0, 0, + 0, 0, 0, 26, 0, 16, 0, 1, + 0, 0, 0, 56, 0, 0, 7, 66, + 32, 16, 0, 3, 0, 0, 0, 26, + 0, 16, 0, 0, 0, 0, 0, 1, + 64, 0, 0, 0, 0, 0, 63, 54, + 0, 0, 6, 114, 32, 16, 0, 1, + 0, 0, 0, 70, 50, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 6, 114, 32, 16, 0, 2, + 0, 0, 0, 70, 50, 32, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 5, 130, 32, 16, 0, 3, + 0, 0, 0, 10, 0, 16, 0, 0, + 0, 0, 0, 62, 0, 0, 1, 83, + 84, 65, 84, 116, 0, 0, 0, 36, + 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 16, + 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 82, 68, 69, 70, 180, + 1, 0, 0, 1, 0, 0, 0, 72, + 0, 0, 0, 1, 0, 0, 0, 28, + 0, 0, 0, 0, 4, 254, 255, 0, + 65, 0, 0, 128, 1, 0, 0, 60, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 36, + 71, 108, 111, 98, 97, 108, 115, 0, +171, 171, 171, 60, 0, 0, 0, 5, + 0, 0, 0, 96, 0, 0, 0, 208, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 216, 0, 0, 0, 0, + 0, 0, 0, 64, 0, 0, 0, 2, + 0, 0, 0, 232, 0, 0, 0, 0, + 0, 0, 0, 248, 0, 0, 0, 64, + 0, 0, 0, 44, 0, 0, 0, 2, + 0, 0, 0, 12, 1, 0, 0, 0, + 0, 0, 0, 28, 1, 0, 0, 112, + 0, 0, 0, 64, 0, 0, 0, 2, + 0, 0, 0, 232, 0, 0, 0, 0, + 0, 0, 0, 40, 1, 0, 0, 176, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 68, 1, 0, 0, 0, + 0, 0, 0, 84, 1, 0, 0, 192, + 0, 0, 0, 12, 0, 0, 0, 2, + 0, 0, 0, 112, 1, 0, 0, 0, + 0, 0, 0, 95, 67, 67, 95, 77, + 86, 77, 97, 116, 114, 105, 120, 0, +171, 171, 171, 3, 0, 3, 0, 4, + 0, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 95, 67, 67, 95, 78, +111, 114, 109, 97, 108, 77, 97, 116, +114, 105, 120, 0, 171, 171, 171, 3, + 0, 3, 0, 3, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 95, + 67, 67, 95, 80, 77, 97, 116, 114, +105, 120, 0, 95, 117, 95, 80, 111, +105, 110, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 80, 111, +115, 105, 116, 105, 111, 110, 0, 1, + 0, 3, 0, 1, 0, 3, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 95, +117, 95, 83, 112, 111, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 80, 111, 115, 105, 116, 105, 111, +110, 0, 171, 1, 0, 3, 0, 1, + 0, 3, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 77, 105, 99, 114, 111, +115, 111, 102, 116, 32, 40, 82, 41, + 32, 72, 76, 83, 76, 32, 83, 104, + 97, 100, 101, 114, 32, 67, 111, 109, +112, 105, 108, 101, 114, 32, 54, 46, + 51, 46, 57, 54, 48, 48, 46, 49, + 54, 51, 56, 52, 0, 171, 171, 73, + 83, 71, 78, 92, 0, 0, 0, 3, + 0, 0, 0, 8, 0, 0, 0, 80, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 7, 7, 0, 0, 80, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 1, + 0, 0, 0, 15, 15, 0, 0, 80, + 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0, 0, 2, + 0, 0, 0, 3, 0, 0, 0, 84, + 69, 88, 67, 79, 79, 82, 68, 0, +171, 171, 171, 79, 83, 71, 78, 128, + 0, 0, 0, 4, 0, 0, 0, 8, + 0, 0, 0, 104, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 7, + 8, 0, 0, 104, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 1, 0, 0, 0, 7, + 8, 0, 0, 104, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 2, 0, 0, 0, 7, + 8, 0, 0, 113, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 3, + 0, 0, 0, 3, 0, 0, 0, 15, + 0, 0, 0, 84, 69, 88, 67, 79, + 79, 82, 68, 0, 83, 86, 95, 80, +111, 115, 105, 116, 105, 111, 110, 0, +171, 171, 171, +}; + const unsigned char s_976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE[] = { 166, 147, 0, 0, 142, 9, 2, 1, @@ -5038,7 +7231,7 @@ const unsigned char s_976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE[] = { 99, 111, 108, 111, 114, 0, 0, 0, 0, 3, 0, 0, 0, 96, 4, 0, 0, 148, 13, 0, 0, 0, 0, 0, - 0, 194, 137, 0, 0, 0, 0, 0, + 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 157, 116, 105, 89, 118, 135, 249, 239, 42, 226, 184, @@ -5709,7 +7902,7 @@ const unsigned char s_A2377A827972A5466DA8637681045D32DA8A817D[] = { 99, 111, 108, 111, 114, 0, 0, 0, 0, 2, 0, 0, 0, 96, 4, 0, 0, 144, 4, 0, 0, 0, 0, 0, - 0, 194, 137, 0, 0, 0, 0, 0, + 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 157, 116, 105, 89, 118, 135, 249, 239, 42, 226, 184, @@ -6000,6 +8193,2047 @@ const unsigned char s_A2377A827972A5466DA8637681045D32DA8A817D[] = { 171, }; +const unsigned char s_A883DF8204EA77D28BC638CEAAB512DEE74FBB65[] = { + +166, 147, 0, 0, 142, 9, 2, 1, + 0, 128, 0, 0, 81, 139, 0, 0, + 10, 0, 0, 0, 97, 95, 112, 111, +115, 105, 116, 105, 111, 110, 3, 0, + 0, 0, 82, 139, 0, 0, 12, 0, + 0, 0, 97, 95, 98, 108, 101, 110, +100, 73, 110, 100, 101, 120, 0, 0, + 0, 0, 80, 139, 0, 0, 10, 0, + 0, 0, 97, 95, 116, 101, 120, 67, +111, 111, 114, 100, 4, 0, 0, 0, + 82, 139, 0, 0, 13, 0, 0, 0, + 97, 95, 98, 108, 101, 110, 100, 87, +101, 105, 103, 104, 116, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 81, 139, 0, 0, 8, 0, 0, + 0, 97, 95, 110, 111, 114, 109, 97, +108, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 18, 0, 0, 0, 92, 139, + 0, 0, 242, 141, 0, 0, 11, 0, + 0, 0, 67, 67, 95, 77, 86, 77, + 97, 116, 114, 105, 120, 0, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 4, 0, 0, 0, 91, 139, 0, + 0, 242, 141, 0, 0, 15, 0, 0, + 0, 67, 67, 95, 78, 111, 114, 109, + 97, 108, 77, 97, 116, 114, 105, 120, + 0, 0, 0, 0, 255, 255, 255, 255, + 4, 0, 0, 0, 3, 0, 0, 0, + 92, 139, 0, 0, 242, 141, 0, 0, + 10, 0, 0, 0, 67, 67, 95, 80, + 77, 97, 116, 114, 105, 120, 0, 0, + 0, 0, 255, 255, 255, 255, 7, 0, + 0, 0, 4, 0, 0, 0, 81, 139, + 0, 0, 242, 141, 0, 0, 26, 0, + 0, 0, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 80, 111, 115, 105, +116, 105, 111, 110, 1, 0, 0, 0, +255, 255, 255, 255, 11, 0, 0, 0, + 1, 0, 0, 0, 81, 139, 0, 0, +242, 141, 0, 0, 25, 0, 0, 0, +117, 95, 83, 112, 111, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 80, 111, 115, 105, 116, 105, 111, +110, 1, 0, 0, 0, 255, 255, 255, +255, 12, 0, 0, 0, 1, 0, 0, + 0, 82, 139, 0, 0, 242, 141, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 180, 0, 0, 0, +255, 255, 255, 255, 13, 0, 0, 0, +180, 0, 0, 0, 94, 139, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, + 67, 67, 95, 84, 101, 120, 116, 117, +114, 101, 48, 0, 0, 0, 0, 0, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 81, 139, 0, 0, 241, +141, 0, 0, 25, 0, 0, 0, 117, + 95, 65, 109, 98, 105, 101, 110, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 67, 111, 108, 111, 114, + 0, 0, 0, 0, 0, 0, 0, 0, +255, 255, 255, 255, 1, 0, 0, 0, + 81, 139, 0, 0, 241, 141, 0, 0, + 21, 0, 0, 0, 117, 95, 68, 105, +114, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 67, 111, 108, 111, +114, 1, 0, 0, 0, 1, 0, 0, + 0, 255, 255, 255, 255, 1, 0, 0, + 0, 81, 139, 0, 0, 241, 141, 0, + 0, 25, 0, 0, 0, 117, 95, 68, +105, 114, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 68, 105, 114, +101, 99, 116, 105, 111, 110, 1, 0, + 0, 0, 2, 0, 0, 0, 255, 255, +255, 255, 1, 0, 0, 0, 81, 139, + 0, 0, 241, 141, 0, 0, 23, 0, + 0, 0, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 67, 111, 108, 111, +114, 1, 0, 0, 0, 3, 0, 0, + 0, 255, 255, 255, 255, 1, 0, 0, + 0, 6, 20, 0, 0, 241, 141, 0, + 0, 30, 0, 0, 0, 117, 95, 80, +111, 105, 110, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 82, + 97, 110, 103, 101, 73, 110, 118, 101, +114, 115, 101, 1, 0, 0, 0, 4, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 81, 139, 0, 0, 241, +141, 0, 0, 22, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 1, 0, 0, + 0, 5, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 81, 139, 0, + 0, 241, 141, 0, 0, 26, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 68, 105, 114, 101, 99, 116, +105, 111, 110, 1, 0, 0, 0, 6, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 6, 20, 0, 0, 241, +141, 0, 0, 30, 0, 0, 0, 117, + 95, 83, 112, 111, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 73, 110, 110, 101, 114, 65, 110, 103, +108, 101, 67, 111, 115, 1, 0, 0, + 0, 7, 0, 0, 0, 255, 255, 255, +255, 1, 0, 0, 0, 6, 20, 0, + 0, 241, 141, 0, 0, 30, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 79, 117, 116, 101, 114, 65, +110, 103, 108, 101, 67, 111, 115, 1, + 0, 0, 0, 8, 0, 0, 0, 255, +255, 255, 255, 1, 0, 0, 0, 6, + 20, 0, 0, 241, 141, 0, 0, 29, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 82, 97, 110, 103, +101, 73, 110, 118, 101, 114, 115, 101, + 1, 0, 0, 0, 9, 0, 0, 0, +255, 255, 255, 255, 1, 0, 0, 0, + 82, 139, 0, 0, 241, 141, 0, 0, + 7, 0, 0, 0, 117, 95, 99, 111, +108, 111, 114, 0, 0, 0, 0, 10, + 0, 0, 0, 255, 255, 255, 255, 1, + 0, 0, 0, 197, 0, 0, 0, 11, + 0, 0, 0, 67, 67, 95, 77, 86, + 77, 97, 116, 114, 105, 120, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 0, + 0, 0, 67, 67, 95, 78, 111, 114, +109, 97, 108, 77, 97, 116, 114, 105, +120, 0, 0, 0, 0, 1, 0, 0, + 0, 10, 0, 0, 0, 67, 67, 95, + 80, 77, 97, 116, 114, 105, 120, 0, + 0, 0, 0, 2, 0, 0, 0, 26, + 0, 0, 0, 117, 95, 80, 111, 105, +110, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 80, 111, 115, +105, 116, 105, 111, 110, 0, 0, 0, + 0, 3, 0, 0, 0, 25, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 80, 111, 115, 105, 116, 105, +111, 110, 0, 0, 0, 0, 4, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 0, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 1, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 2, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 3, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 4, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 5, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 6, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 7, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 8, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 9, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 10, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 11, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 12, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 13, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 14, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 15, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 16, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 17, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 18, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 19, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 20, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 21, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 22, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 23, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 24, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 25, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 26, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 27, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 28, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 29, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 30, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 31, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 32, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 33, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 34, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 35, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 36, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 37, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 38, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 39, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 40, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 41, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 42, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 43, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 44, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 45, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 46, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 47, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 48, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 49, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 50, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 51, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 52, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 53, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 54, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 55, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 56, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 57, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 58, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 59, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 60, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 61, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 62, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 63, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 64, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 65, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 66, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 67, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 68, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 69, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 70, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 71, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 72, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 73, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 74, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 75, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 76, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 77, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 78, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 79, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 80, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 81, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 82, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 83, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 84, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 85, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 86, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 87, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 88, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 89, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 90, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 91, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 92, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 93, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 94, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 95, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 96, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, + 97, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 98, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 99, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 100, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 101, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 102, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 103, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 104, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +105, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 106, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 107, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 108, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 109, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 110, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 111, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 112, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +113, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 114, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 115, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 116, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 117, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 118, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 119, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 120, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +121, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 122, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 123, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 124, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 125, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 126, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 127, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 128, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +129, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 130, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 131, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 132, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 133, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 134, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 135, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 136, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +137, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 138, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 139, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 140, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 141, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 142, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 143, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 144, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +145, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 146, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 147, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 148, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 149, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 150, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 151, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 152, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +153, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 154, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 155, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 156, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 157, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 158, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 159, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 160, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +161, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 162, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 163, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 164, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 165, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 166, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 167, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 168, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +169, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 170, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 171, 0, + 0, 0, 5, 0, 0, 0, 15, 0, + 0, 0, 117, 95, 109, 97, 116, 114, +105, 120, 80, 97, 108, 101, 116, 116, +101, 172, 0, 0, 0, 5, 0, 0, + 0, 15, 0, 0, 0, 117, 95, 109, + 97, 116, 114, 105, 120, 80, 97, 108, +101, 116, 116, 101, 173, 0, 0, 0, + 5, 0, 0, 0, 15, 0, 0, 0, +117, 95, 109, 97, 116, 114, 105, 120, + 80, 97, 108, 101, 116, 116, 101, 174, + 0, 0, 0, 5, 0, 0, 0, 15, + 0, 0, 0, 117, 95, 109, 97, 116, +114, 105, 120, 80, 97, 108, 101, 116, +116, 101, 175, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 176, 0, 0, + 0, 5, 0, 0, 0, 15, 0, 0, + 0, 117, 95, 109, 97, 116, 114, 105, +120, 80, 97, 108, 101, 116, 116, 101, +177, 0, 0, 0, 5, 0, 0, 0, + 15, 0, 0, 0, 117, 95, 109, 97, +116, 114, 105, 120, 80, 97, 108, 101, +116, 116, 101, 178, 0, 0, 0, 5, + 0, 0, 0, 15, 0, 0, 0, 117, + 95, 109, 97, 116, 114, 105, 120, 80, + 97, 108, 101, 116, 116, 101, 179, 0, + 0, 0, 5, 0, 0, 0, 11, 0, + 0, 0, 67, 67, 95, 84, 101, 120, +116, 117, 114, 101, 48, 0, 0, 0, + 0, 6, 0, 0, 0, 25, 0, 0, + 0, 117, 95, 65, 109, 98, 105, 101, +110, 116, 76, 105, 103, 104, 116, 83, +111, 117, 114, 99, 101, 67, 111, 108, +111, 114, 0, 0, 0, 0, 7, 0, + 0, 0, 21, 0, 0, 0, 117, 95, + 68, 105, 114, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 67, 111, +108, 111, 114, 0, 0, 0, 0, 8, + 0, 0, 0, 25, 0, 0, 0, 117, + 95, 68, 105, 114, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 68, +105, 114, 101, 99, 116, 105, 111, 110, + 0, 0, 0, 0, 9, 0, 0, 0, + 23, 0, 0, 0, 117, 95, 80, 111, +105, 110, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 67, 111, +108, 111, 114, 0, 0, 0, 0, 10, + 0, 0, 0, 30, 0, 0, 0, 117, + 95, 80, 111, 105, 110, 116, 76, 105, +103, 104, 116, 83, 111, 117, 114, 99, +101, 82, 97, 110, 103, 101, 73, 110, +118, 101, 114, 115, 101, 0, 0, 0, + 0, 11, 0, 0, 0, 22, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, + 0, 0, 0, 12, 0, 0, 0, 26, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 68, 105, 114, 101, + 99, 116, 105, 111, 110, 0, 0, 0, + 0, 13, 0, 0, 0, 30, 0, 0, + 0, 117, 95, 83, 112, 111, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 73, 110, 110, 101, 114, 65, +110, 103, 108, 101, 67, 111, 115, 0, + 0, 0, 0, 14, 0, 0, 0, 30, + 0, 0, 0, 117, 95, 83, 112, 111, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 79, 117, 116, 101, +114, 65, 110, 103, 108, 101, 67, 111, +115, 0, 0, 0, 0, 15, 0, 0, + 0, 29, 0, 0, 0, 117, 95, 83, +112, 111, 116, 76, 105, 103, 104, 116, + 83, 111, 117, 114, 99, 101, 82, 97, +110, 103, 101, 73, 110, 118, 101, 114, +115, 101, 0, 0, 0, 0, 16, 0, + 0, 0, 7, 0, 0, 0, 117, 95, + 99, 111, 108, 111, 114, 0, 0, 0, + 0, 17, 0, 0, 0, 236, 16, 0, + 0, 188, 19, 0, 0, 0, 0, 0, + 0, 107, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 68, 88, 66, 67, 39, 224, 169, +185, 116, 156, 41, 157, 187, 9, 222, +142, 94, 217, 160, 100, 1, 0, 0, + 0, 236, 16, 0, 0, 6, 0, 0, + 0, 56, 0, 0, 0, 140, 3, 0, + 0, 144, 11, 0, 0, 12, 12, 0, + 0, 244, 15, 0, 0, 112, 16, 0, + 0, 65, 111, 110, 57, 76, 3, 0, + 0, 76, 3, 0, 0, 0, 2, 255, +255, 24, 3, 0, 0, 52, 0, 0, + 0, 1, 0, 40, 0, 0, 0, 52, + 0, 0, 0, 52, 0, 1, 0, 36, + 0, 0, 0, 52, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 255, +255, 81, 0, 0, 5, 11, 0, 15, +160, 0, 0, 0, 0, 0, 0, 128, + 63, 0, 0, 0, 192, 0, 0, 64, + 64, 31, 0, 0, 2, 0, 0, 0, +128, 0, 0, 7, 176, 31, 0, 0, + 2, 0, 0, 0, 128, 1, 0, 7, +176, 31, 0, 0, 2, 0, 0, 0, +128, 2, 0, 7, 176, 31, 0, 0, + 2, 0, 0, 0, 128, 3, 0, 3, +176, 31, 0, 0, 2, 0, 0, 0, +144, 0, 8, 15, 160, 5, 0, 0, + 3, 0, 0, 7, 128, 1, 0, 228, +176, 4, 0, 0, 160, 8, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 228, +128, 0, 0, 228, 128, 2, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 0, +129, 11, 0, 85, 160, 11, 0, 0, + 3, 1, 0, 8, 128, 0, 0, 0, +128, 11, 0, 0, 160, 2, 0, 0, + 3, 0, 0, 7, 128, 2, 0, 228, +160, 2, 0, 228, 160, 36, 0, 0, + 2, 1, 0, 7, 128, 0, 0, 228, +128, 36, 0, 0, 2, 0, 0, 7, +128, 0, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 228, +128, 1, 0, 228, 129, 5, 0, 0, + 3, 1, 0, 7, 128, 0, 0, 255, +128, 1, 0, 228, 160, 88, 0, 0, + 4, 1, 0, 7, 128, 0, 0, 255, +128, 1, 0, 228, 128, 11, 0, 0, +160, 2, 0, 0, 3, 1, 0, 7, +128, 1, 0, 228, 128, 0, 0, 228, +160, 36, 0, 0, 2, 2, 0, 7, +128, 1, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 228, +128, 2, 0, 228, 128, 5, 0, 0, + 3, 2, 0, 7, 128, 0, 0, 255, +128, 3, 0, 228, 160, 88, 0, 0, + 4, 2, 0, 7, 128, 0, 0, 255, +128, 2, 0, 228, 128, 11, 0, 0, +160, 4, 0, 0, 4, 1, 0, 7, +128, 2, 0, 228, 128, 1, 0, 255, +128, 1, 0, 228, 128, 2, 0, 0, + 3, 2, 0, 7, 128, 6, 0, 228, +160, 6, 0, 228, 160, 36, 0, 0, + 2, 3, 0, 7, 128, 2, 0, 228, +128, 36, 0, 0, 2, 2, 0, 7, +128, 2, 0, 228, 176, 8, 0, 0, + 3, 0, 0, 8, 128, 3, 0, 228, +128, 2, 0, 228, 129, 8, 0, 0, + 3, 1, 0, 8, 128, 0, 0, 228, +128, 2, 0, 228, 128, 2, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 255, +128, 8, 0, 0, 161, 1, 0, 0, + 2, 2, 0, 1, 128, 8, 0, 0, +160, 2, 0, 0, 3, 0, 0, 2, +128, 2, 0, 0, 129, 7, 0, 0, +160, 6, 0, 0, 2, 0, 0, 2, +128, 0, 0, 85, 128, 5, 0, 0, + 3, 0, 0, 17, 128, 0, 0, 85, +128, 0, 0, 0, 128, 4, 0, 0, + 4, 0, 0, 2, 128, 0, 0, 0, +128, 11, 0, 170, 160, 11, 0, 255, +160, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 0, +128, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 85, +128, 5, 0, 0, 3, 0, 0, 14, +128, 2, 0, 144, 176, 9, 0, 0, +160, 8, 0, 0, 3, 0, 0, 2, +128, 0, 0, 249, 128, 0, 0, 249, +128, 2, 0, 0, 3, 0, 0, 2, +128, 0, 0, 85, 129, 11, 0, 85, +160, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 0, 0, 85, +128, 88, 0, 0, 4, 0, 0, 1, +128, 0, 0, 85, 128, 0, 0, 0, +128, 11, 0, 0, 160, 5, 0, 0, + 3, 0, 0, 14, 128, 1, 0, 255, +128, 5, 0, 144, 160, 88, 0, 0, + 4, 0, 0, 14, 128, 1, 0, 255, +128, 0, 0, 228, 128, 11, 0, 0, +160, 4, 0, 0, 4, 0, 0, 7, +128, 0, 0, 249, 128, 0, 0, 0, +128, 1, 0, 228, 128, 66, 0, 0, + 3, 1, 0, 15, 128, 3, 0, 228, +176, 0, 8, 228, 160, 5, 0, 0, + 3, 1, 0, 15, 128, 1, 0, 228, +128, 10, 0, 228, 160, 1, 0, 0, + 2, 0, 0, 8, 128, 11, 0, 85, +160, 5, 0, 0, 3, 0, 0, 15, +128, 0, 0, 228, 128, 1, 0, 228, +128, 1, 0, 0, 2, 0, 8, 15, +128, 0, 0, 228, 128, 1, 0, 0, + 2, 1, 8, 15, 128, 0, 0, 228, +128, 1, 0, 0, 2, 2, 8, 15, +128, 0, 0, 228, 128, 1, 0, 0, + 2, 3, 8, 15, 128, 0, 0, 228, +128, 255, 255, 0, 0, 83, 72, 68, + 82, 252, 7, 0, 0, 64, 0, 0, + 0, 255, 1, 0, 0, 89, 0, 0, + 4, 70, 142, 32, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 90, 0, 0, + 3, 0, 96, 16, 0, 0, 0, 0, + 0, 88, 24, 0, 4, 0, 112, 16, + 0, 0, 0, 0, 0, 85, 85, 0, + 0, 98, 16, 0, 3, 114, 16, 16, + 0, 0, 0, 0, 0, 98, 16, 0, + 3, 114, 16, 16, 0, 1, 0, 0, + 0, 98, 16, 0, 3, 114, 16, 16, + 0, 2, 0, 0, 0, 98, 16, 0, + 3, 50, 16, 16, 0, 3, 0, 0, + 0, 101, 0, 0, 3, 242, 32, 16, + 0, 0, 0, 0, 0, 101, 0, 0, + 3, 242, 32, 16, 0, 1, 0, 0, + 0, 101, 0, 0, 3, 242, 32, 16, + 0, 2, 0, 0, 0, 101, 0, 0, + 3, 242, 32, 16, 0, 3, 0, 0, + 0, 104, 0, 0, 2, 4, 0, 0, + 0, 16, 0, 0, 7, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 68, 0, 0, + 5, 18, 0, 16, 0, 0, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 0, 0, 0, 0, 6, 0, 16, + 0, 0, 0, 0, 0, 70, 18, 16, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 2, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 68, 0, 0, + 5, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 1, 0, 0, 0, 246, 15, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 8, 130, 0, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 128, 65, 0, 0, + 0, 1, 0, 0, 0, 52, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 6, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 18, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 10, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 10, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 246, 15, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 30, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 56, 0, 0, 8, 114, 0, 16, + 0, 2, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 6, 128, 32, + 0, 0, 0, 0, 0, 4, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 0, 0, 0, + 8, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 128, 63, 52, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 68, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 56, 0, 0, 7, 114, 0, 16, + 0, 2, 0, 0, 0, 246, 15, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 52, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 56, 0, 0, + 8, 114, 0, 16, 0, 2, 0, 0, + 0, 246, 15, 16, 0, 1, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 54, 0, 0, + 5, 114, 0, 16, 0, 3, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 130, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 58, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 9, 114, 0, 16, + 0, 3, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 246, 15, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 3, 0, 0, 0, 30, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 22, 0, 0, 1, 56, 0, 0, + 8, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 6, 128, 32, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 0, 0, 0, 8, 130, 0, 16, + 0, 0, 0, 0, 0, 58, 0, 16, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 128, + 63, 52, 0, 0, 7, 130, 0, 16, + 0, 0, 0, 0, 0, 58, 0, 16, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 16, 0, 0, + 7, 18, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 68, 0, 0, 5, 18, 0, 16, + 0, 1, 0, 0, 0, 10, 0, 16, + 0, 1, 0, 0, 0, 56, 0, 0, + 7, 114, 0, 16, 0, 1, 0, 0, + 0, 6, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 0, 0, 0, 9, 114, 0, 16, + 0, 2, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 16, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 68, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 56, 0, 0, + 7, 114, 0, 16, 0, 2, 0, 0, + 0, 246, 15, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 16, 0, 0, 8, 130, 0, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 70, 2, 16, +128, 65, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 10, 18, 0, 16, + 0, 2, 0, 0, 0, 10, 128, 32, + 0, 0, 0, 0, 0, 7, 0, 0, + 0, 10, 128, 32, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 9, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 10, 128, 32, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 14, 0, 0, + 10, 18, 0, 16, 0, 2, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 128, + 63, 0, 0, 128, 63, 0, 0, 128, + 63, 0, 0, 128, 63, 10, 0, 16, + 0, 2, 0, 0, 0, 56, 32, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 10, 0, 16, 0, 2, 0, 0, + 0, 50, 0, 0, 9, 18, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 192, 1, 64, 0, + 0, 0, 0, 64, 64, 56, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 56, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 10, 0, 16, + 0, 2, 0, 0, 0, 56, 0, 0, + 7, 130, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 0, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 16, 0, 0, 7, 18, 0, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 52, 0, 0, + 7, 18, 0, 16, 0, 0, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 8, 114, 0, 16, + 0, 0, 0, 0, 0, 6, 0, 16, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 5, 0, 0, + 0, 54, 0, 0, 5, 114, 0, 16, + 0, 1, 0, 0, 0, 70, 2, 16, + 0, 3, 0, 0, 0, 54, 0, 0, + 5, 18, 0, 16, 0, 2, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 1, 33, 0, 0, + 7, 34, 0, 16, 0, 2, 0, 0, + 0, 10, 0, 16, 0, 2, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 3, 0, 4, 3, 26, 0, 16, + 0, 2, 0, 0, 0, 50, 0, 0, + 9, 114, 0, 16, 0, 1, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 246, 15, 16, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 30, 0, 0, 7, 18, 0, 16, + 0, 2, 0, 0, 0, 10, 0, 16, + 0, 2, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 69, 0, 0, 9, 242, 0, 16, + 0, 0, 0, 0, 0, 70, 16, 16, + 0, 3, 0, 0, 0, 70, 126, 16, + 0, 0, 0, 0, 0, 0, 96, 16, + 0, 0, 0, 0, 0, 56, 0, 0, + 8, 242, 0, 16, 0, 0, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 54, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 128, + 63, 56, 0, 0, 7, 242, 0, 16, + 0, 0, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 70, 14, 16, + 0, 1, 0, 0, 0, 54, 0, 0, + 5, 242, 32, 16, 0, 0, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 242, 32, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 54, 0, 0, + 5, 242, 32, 16, 0, 2, 0, 0, + 0, 70, 14, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 242, 32, 16, + 0, 3, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 62, 0, 0, + 1, 83, 84, 65, 84, 116, 0, 0, + 0, 75, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, + 0, 47, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 82, 68, 69, + 70, 224, 3, 0, 0, 1, 0, 0, + 0, 176, 0, 0, 0, 3, 0, 0, + 0, 28, 0, 0, 0, 0, 4, 255, +255, 0, 65, 0, 0, 172, 3, 0, + 0, 124, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, + 0, 145, 0, 0, 0, 2, 0, 0, + 0, 5, 0, 0, 0, 4, 0, 0, + 0, 255, 255, 255, 255, 0, 0, 0, + 0, 1, 0, 0, 0, 13, 0, 0, + 0, 166, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 115, 97, 109, 112, 108, 101, 114, + 95, 95, 67, 67, 95, 84, 101, 120, +116, 117, 114, 101, 48, 0, 116, 101, +120, 116, 117, 114, 101, 95, 95, 67, + 67, 95, 84, 101, 120, 116, 117, 114, +101, 48, 0, 36, 71, 108, 111, 98, + 97, 108, 115, 0, 171, 166, 0, 0, + 0, 11, 0, 0, 0, 200, 0, 0, + 0, 176, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 208, 1, 0, + 0, 0, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 236, 1, 0, + 0, 0, 0, 0, 0, 252, 1, 0, + 0, 16, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 20, 2, 0, + 0, 0, 0, 0, 0, 36, 2, 0, + 0, 32, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 64, 2, 0, + 0, 0, 0, 0, 0, 80, 2, 0, + 0, 48, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 108, 2, 0, + 0, 0, 0, 0, 0, 124, 2, 0, + 0, 64, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 156, 2, 0, + 0, 0, 0, 0, 0, 172, 2, 0, + 0, 80, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 196, 2, 0, + 0, 0, 0, 0, 0, 212, 2, 0, + 0, 96, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 240, 2, 0, + 0, 0, 0, 0, 0, 0, 3, 0, + 0, 112, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 32, 3, 0, + 0, 0, 0, 0, 0, 48, 3, 0, + 0, 128, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 80, 3, 0, + 0, 0, 0, 0, 0, 96, 3, 0, + 0, 144, 0, 0, 0, 4, 0, 0, + 0, 2, 0, 0, 0, 128, 3, 0, + 0, 0, 0, 0, 0, 144, 3, 0, + 0, 160, 0, 0, 0, 16, 0, 0, + 0, 2, 0, 0, 0, 156, 3, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 65, 109, 98, 105, 101, 110, 116, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 68, 105, 114, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 67, 111, 108, 111, 114, 0, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 68, 105, 114, 76, +105, 103, 104, 116, 83, 111, 117, 114, + 99, 101, 68, 105, 114, 101, 99, 116, +105, 111, 110, 0, 171, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 80, 111, 105, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 67, 111, 108, 111, 114, 0, 171, 171, +171, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 80, 111, 105, 110, +116, 76, 105, 103, 104, 116, 83, 111, +117, 114, 99, 101, 82, 97, 110, 103, +101, 73, 110, 118, 101, 114, 115, 101, + 0, 0, 0, 3, 0, 1, 0, 1, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 83, 112, 111, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 67, 111, 108, 111, 114, + 0, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 83, 112, 111, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 68, 105, 114, 101, 99, +116, 105, 111, 110, 0, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 73, +110, 110, 101, 114, 65, 110, 103, 108, +101, 67, 111, 115, 0, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 79, +117, 116, 101, 114, 65, 110, 103, 108, +101, 67, 111, 115, 0, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 83, 112, 111, 116, 76, 105, 103, 104, +116, 83, 111, 117, 114, 99, 101, 82, + 97, 110, 103, 101, 73, 110, 118, 101, +114, 115, 101, 0, 171, 0, 0, 3, + 0, 1, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, + 99, 111, 108, 111, 114, 0, 171, 171, +171, 1, 0, 3, 0, 1, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 77, 105, 99, 114, 111, 115, 111, +102, 116, 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, 97, 100, +101, 114, 32, 67, 111, 109, 112, 105, +108, 101, 114, 32, 54, 46, 51, 46, + 57, 54, 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 171, 73, 83, 71, + 78, 116, 0, 0, 0, 4, 0, 0, + 0, 8, 0, 0, 0, 104, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 2, 0, 0, + 0, 7, 7, 0, 0, 104, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, + 0, 3, 3, 0, 0, 84, 69, 88, + 67, 79, 79, 82, 68, 0, 171, 171, +171, 79, 83, 71, 78, 116, 0, 0, + 0, 4, 0, 0, 0, 8, 0, 0, + 0, 104, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 1, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 2, 0, 0, 0, 15, 0, 0, + 0, 104, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 15, 0, 0, + 0, 83, 86, 95, 84, 97, 114, 103, +101, 116, 0, 171, 171, 68, 88, 66, + 67, 81, 182, 195, 84, 24, 43, 87, +158, 66, 2, 136, 175, 232, 16, 88, +248, 1, 0, 0, 0, 188, 19, 0, + 0, 6, 0, 0, 0, 56, 0, 0, + 0, 120, 6, 0, 0, 20, 16, 0, + 0, 144, 16, 0, 0, 136, 18, 0, + 0, 28, 19, 0, 0, 65, 111, 110, + 57, 56, 6, 0, 0, 56, 6, 0, + 0, 0, 2, 254, 255, 4, 6, 0, + 0, 52, 0, 0, 0, 1, 0, 36, + 0, 0, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 36, 0, 1, 0, 48, + 0, 0, 0, 0, 0, 193, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 193, + 0, 1, 2, 254, 255, 81, 0, 0, + 5, 194, 0, 15, 160, 0, 0, 64, + 64, 0, 0, 0, 0, 0, 0, 128, + 63, 0, 0, 0, 0, 81, 0, 0, + 5, 0, 0, 15, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 125, 67, 81, 0, 0, + 5, 195, 0, 15, 160, 0, 0, 0, + 63, 0, 0, 128, 63, 0, 0, 128, +191, 0, 0, 0, 0, 48, 0, 0, + 5, 0, 0, 15, 240, 253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 0, 0, + 2, 5, 0, 0, 128, 0, 0, 15, +144, 31, 0, 0, 2, 5, 0, 1, +128, 1, 0, 15, 144, 31, 0, 0, + 2, 5, 0, 2, 128, 2, 0, 15, +144, 31, 0, 0, 2, 5, 0, 3, +128, 3, 0, 15, 144, 31, 0, 0, + 2, 5, 0, 4, 128, 4, 0, 15, +144, 19, 0, 0, 2, 0, 0, 1, +128, 0, 0, 0, 144, 2, 0, 0, + 3, 0, 0, 2, 128, 0, 0, 0, +129, 0, 0, 0, 144, 12, 0, 0, + 3, 0, 0, 4, 128, 0, 0, 0, +144, 0, 0, 0, 145, 12, 0, 0, + 3, 0, 0, 1, 128, 0, 0, 0, +129, 0, 0, 0, 128, 4, 0, 0, + 4, 0, 0, 1, 128, 0, 0, 170, +128, 0, 0, 0, 128, 0, 0, 85, +128, 5, 0, 0, 3, 0, 0, 1, +128, 0, 0, 0, 128, 194, 0, 0, +160, 46, 0, 0, 2, 0, 0, 1, +176, 0, 0, 0, 128, 5, 0, 0, + 4, 0, 0, 15, 128, 1, 0, 0, +144, 13, 32, 228, 160, 0, 0, 0, +176, 5, 0, 0, 4, 1, 0, 15, +128, 1, 0, 0, 144, 14, 32, 228, +160, 0, 0, 0, 176, 5, 0, 0, + 4, 2, 0, 15, 128, 1, 0, 0, +144, 15, 32, 228, 160, 0, 0, 0, +176, 41, 0, 4, 2, 194, 0, 85, +160, 1, 0, 85, 144, 19, 0, 0, + 2, 3, 0, 1, 128, 0, 0, 85, +144, 2, 0, 0, 3, 3, 0, 2, +128, 3, 0, 0, 129, 0, 0, 85, +144, 12, 0, 0, 3, 3, 0, 4, +128, 0, 0, 85, 144, 0, 0, 85, +145, 12, 0, 0, 3, 3, 0, 1, +128, 3, 0, 0, 129, 3, 0, 0, +128, 4, 0, 0, 4, 3, 0, 1, +128, 3, 0, 170, 128, 3, 0, 0, +128, 3, 0, 85, 128, 5, 0, 0, + 3, 3, 0, 1, 128, 3, 0, 0, +128, 194, 0, 0, 160, 46, 0, 0, + 2, 0, 0, 1, 176, 3, 0, 0, +128, 4, 0, 0, 5, 0, 0, 15, +128, 13, 32, 228, 160, 0, 0, 0, +176, 1, 0, 85, 144, 0, 0, 228, +128, 4, 0, 0, 5, 1, 0, 15, +128, 14, 32, 228, 160, 0, 0, 0, +176, 1, 0, 85, 144, 1, 0, 228, +128, 4, 0, 0, 5, 2, 0, 15, +128, 15, 32, 228, 160, 0, 0, 0, +176, 1, 0, 85, 144, 2, 0, 228, +128, 42, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 4, 2, 194, 0, 85, +160, 1, 0, 170, 144, 19, 0, 0, + 2, 3, 0, 1, 128, 0, 0, 170, +144, 2, 0, 0, 3, 3, 0, 2, +128, 3, 0, 0, 129, 0, 0, 170, +144, 12, 0, 0, 3, 3, 0, 4, +128, 0, 0, 170, 144, 0, 0, 170, +145, 12, 0, 0, 3, 3, 0, 1, +128, 3, 0, 0, 129, 3, 0, 0, +128, 4, 0, 0, 4, 3, 0, 1, +128, 3, 0, 170, 128, 3, 0, 0, +128, 3, 0, 85, 128, 5, 0, 0, + 3, 3, 0, 1, 128, 3, 0, 0, +128, 194, 0, 0, 160, 46, 0, 0, + 2, 0, 0, 1, 176, 3, 0, 0, +128, 4, 0, 0, 5, 0, 0, 15, +128, 13, 32, 228, 160, 0, 0, 0, +176, 1, 0, 170, 144, 0, 0, 228, +128, 4, 0, 0, 5, 1, 0, 15, +128, 14, 32, 228, 160, 0, 0, 0, +176, 1, 0, 170, 144, 1, 0, 228, +128, 4, 0, 0, 5, 2, 0, 15, +128, 15, 32, 228, 160, 0, 0, 0, +176, 1, 0, 170, 144, 2, 0, 228, +128, 42, 0, 0, 0, 43, 0, 0, + 0, 41, 0, 4, 2, 194, 0, 85, +160, 1, 0, 255, 144, 19, 0, 0, + 2, 3, 0, 1, 128, 0, 0, 255, +144, 2, 0, 0, 3, 3, 0, 2, +128, 3, 0, 0, 129, 0, 0, 255, +144, 12, 0, 0, 3, 3, 0, 4, +128, 0, 0, 255, 144, 0, 0, 255, +145, 12, 0, 0, 3, 3, 0, 1, +128, 3, 0, 0, 129, 3, 0, 0, +128, 4, 0, 0, 4, 3, 0, 1, +128, 3, 0, 170, 128, 3, 0, 0, +128, 3, 0, 85, 128, 5, 0, 0, + 3, 3, 0, 1, 128, 3, 0, 0, +128, 194, 0, 0, 160, 46, 0, 0, + 2, 0, 0, 1, 176, 3, 0, 0, +128, 4, 0, 0, 5, 0, 0, 15, +128, 13, 32, 228, 160, 0, 0, 0, +176, 1, 0, 255, 144, 0, 0, 228, +128, 4, 0, 0, 5, 1, 0, 15, +128, 14, 32, 228, 160, 0, 0, 0, +176, 1, 0, 255, 144, 1, 0, 228, +128, 4, 0, 0, 5, 2, 0, 15, +128, 15, 32, 228, 160, 0, 0, 0, +176, 1, 0, 255, 144, 2, 0, 228, +128, 42, 0, 0, 0, 43, 0, 0, + 0, 4, 0, 0, 4, 3, 0, 15, +128, 3, 0, 36, 144, 194, 0, 106, +160, 194, 0, 149, 160, 9, 0, 0, + 3, 4, 0, 1, 128, 3, 0, 228, +128, 0, 0, 228, 128, 9, 0, 0, + 3, 4, 0, 2, 128, 3, 0, 228, +128, 1, 0, 228, 128, 9, 0, 0, + 3, 4, 0, 4, 128, 3, 0, 228, +128, 2, 0, 228, 128, 8, 0, 0, + 3, 0, 0, 1, 128, 2, 0, 228, +144, 0, 0, 228, 128, 8, 0, 0, + 3, 0, 0, 2, 128, 2, 0, 228, +144, 1, 0, 228, 128, 8, 0, 0, + 3, 0, 0, 4, 128, 2, 0, 228, +144, 2, 0, 228, 128, 1, 0, 0, + 2, 4, 0, 8, 128, 194, 0, 170, +160, 9, 0, 0, 3, 1, 0, 1, +128, 0, 0, 228, 160, 4, 0, 228, +128, 9, 0, 0, 3, 1, 0, 2, +128, 1, 0, 228, 160, 4, 0, 228, +128, 9, 0, 0, 3, 1, 0, 4, +128, 2, 0, 228, 160, 4, 0, 228, +128, 9, 0, 0, 3, 1, 0, 8, +128, 3, 0, 228, 160, 4, 0, 228, +128, 2, 0, 0, 3, 2, 0, 7, +128, 1, 0, 228, 129, 11, 0, 228, +160, 1, 0, 0, 2, 3, 0, 7, +128, 194, 0, 85, 160, 1, 0, 0, + 2, 0, 0, 8, 128, 194, 0, 85, +160, 38, 0, 0, 1, 0, 0, 228, +240, 45, 0, 3, 2, 0, 0, 255, +128, 194, 0, 170, 160, 2, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 255, +128, 194, 0, 170, 160, 1, 0, 0, + 2, 3, 0, 7, 128, 2, 0, 228, +128, 39, 0, 0, 0, 1, 0, 0, + 2, 1, 0, 7, 224, 3, 0, 228, +128, 2, 0, 0, 3, 2, 0, 7, +128, 1, 0, 228, 129, 12, 0, 228, +160, 1, 0, 0, 2, 3, 0, 7, +128, 194, 0, 85, 160, 1, 0, 0, + 2, 0, 0, 8, 128, 194, 0, 85, +160, 38, 0, 0, 1, 0, 0, 228, +240, 45, 0, 3, 2, 0, 0, 255, +128, 194, 0, 170, 160, 2, 0, 0, + 3, 0, 0, 8, 128, 0, 0, 255, +128, 194, 0, 170, 160, 1, 0, 0, + 2, 3, 0, 7, 128, 2, 0, 228, +128, 39, 0, 0, 0, 1, 0, 0, + 2, 2, 0, 7, 224, 3, 0, 228, +128, 8, 0, 0, 3, 0, 0, 1, +224, 4, 0, 228, 160, 0, 0, 228, +128, 8, 0, 0, 3, 0, 0, 2, +224, 5, 0, 228, 160, 0, 0, 228, +128, 8, 0, 0, 3, 0, 0, 4, +224, 6, 0, 228, 160, 0, 0, 228, +128, 9, 0, 0, 3, 0, 0, 1, +128, 7, 0, 228, 160, 1, 0, 228, +128, 9, 0, 0, 3, 0, 0, 4, +128, 8, 0, 228, 160, 1, 0, 228, +128, 9, 0, 0, 3, 0, 0, 8, +128, 9, 0, 228, 160, 1, 0, 228, +128, 9, 0, 0, 3, 1, 0, 1, +128, 10, 0, 228, 160, 1, 0, 228, +128, 1, 0, 0, 2, 0, 0, 2, +128, 0, 0, 170, 129, 2, 0, 0, + 3, 0, 0, 4, 128, 0, 0, 255, +128, 1, 0, 0, 128, 5, 0, 0, + 3, 0, 0, 4, 192, 0, 0, 170, +128, 195, 0, 0, 160, 4, 0, 0, + 4, 0, 0, 3, 192, 1, 0, 0, +128, 193, 0, 228, 160, 0, 0, 228, +128, 4, 0, 0, 4, 3, 0, 3, +224, 4, 0, 228, 144, 195, 0, 233, +160, 195, 0, 231, 160, 1, 0, 0, + 2, 0, 0, 8, 192, 1, 0, 0, +128, 255, 255, 0, 0, 83, 72, 68, + 82, 148, 9, 0, 0, 64, 0, 1, + 0, 101, 2, 0, 0, 89, 8, 0, + 4, 70, 142, 32, 0, 0, 0, 0, + 0, 193, 0, 0, 0, 95, 0, 0, + 3, 242, 16, 16, 0, 0, 0, 0, + 0, 95, 0, 0, 3, 242, 16, 16, + 0, 1, 0, 0, 0, 95, 0, 0, + 3, 114, 16, 16, 0, 2, 0, 0, + 0, 95, 0, 0, 3, 114, 16, 16, + 0, 3, 0, 0, 0, 95, 0, 0, + 3, 50, 16, 16, 0, 4, 0, 0, + 0, 101, 0, 0, 3, 114, 32, 16, + 0, 0, 0, 0, 0, 101, 0, 0, + 3, 114, 32, 16, 0, 1, 0, 0, + 0, 101, 0, 0, 3, 114, 32, 16, + 0, 2, 0, 0, 0, 101, 0, 0, + 3, 50, 32, 16, 0, 3, 0, 0, + 0, 103, 0, 0, 4, 242, 32, 16, + 0, 4, 0, 0, 0, 1, 0, 0, + 0, 104, 0, 0, 2, 5, 0, 0, + 0, 105, 0, 0, 4, 0, 0, 0, + 0, 1, 0, 0, 0, 4, 0, 0, + 0, 105, 0, 0, 4, 1, 0, 0, + 0, 1, 0, 0, 0, 4, 0, 0, + 0, 54, 0, 0, 9, 114, 48, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 54, 0, 0, + 9, 114, 48, 32, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 2, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 27, 0, 0, 5, 18, 0, 16, + 0, 0, 0, 0, 0, 10, 16, 16, + 0, 0, 0, 0, 0, 38, 0, 0, + 8, 0, 208, 0, 0, 34, 0, 16, + 0, 0, 0, 0, 0, 10, 0, 16, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 3, 0, 0, 0, 56, 0, 0, + 10, 242, 0, 16, 0, 1, 0, 0, + 0, 6, 16, 16, 0, 1, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 26, 0, 16, + 0, 0, 0, 0, 0, 35, 0, 0, + 15, 50, 0, 16, 0, 0, 0, 0, + 0, 6, 0, 16, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 64, 0, + 0, 1, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 10, 242, 0, 16, + 0, 2, 0, 0, 0, 6, 16, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 6, 0, 0, 0, 0, 13, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 56, 0, 0, 10, 242, 0, 16, + 0, 0, 0, 0, 0, 6, 16, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 6, 0, 0, 0, 0, 13, 0, 0, + 0, 26, 0, 16, 0, 0, 0, 0, + 0, 49, 0, 0, 10, 114, 0, 16, + 0, 3, 0, 0, 0, 2, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 150, 23, 16, 0, 1, 0, 0, + 0, 31, 0, 4, 3, 10, 0, 16, + 0, 3, 0, 0, 0, 27, 0, 0, + 5, 18, 0, 16, 0, 3, 0, 0, + 0, 26, 16, 16, 0, 0, 0, 0, + 0, 38, 0, 0, 8, 0, 208, 0, + 0, 130, 0, 16, 0, 3, 0, 0, + 0, 10, 0, 16, 0, 3, 0, 0, + 0, 1, 64, 0, 0, 3, 0, 0, + 0, 50, 0, 0, 12, 242, 0, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 6, 0, 0, 0, 0, 13, 0, 0, + 0, 58, 0, 16, 0, 3, 0, 0, + 0, 86, 21, 16, 0, 1, 0, 0, + 0, 70, 14, 16, 0, 1, 0, 0, + 0, 35, 0, 0, 15, 146, 0, 16, + 0, 3, 0, 0, 0, 6, 0, 16, + 0, 3, 0, 0, 0, 2, 64, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 2, 64, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 2, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 16, + 0, 3, 0, 0, 0, 86, 21, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 2, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 58, 0, 16, + 0, 3, 0, 0, 0, 86, 21, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 21, 0, 0, + 1, 31, 0, 4, 3, 26, 0, 16, + 0, 3, 0, 0, 0, 27, 0, 0, + 5, 18, 0, 16, 0, 3, 0, 0, + 0, 42, 16, 16, 0, 0, 0, 0, + 0, 38, 0, 0, 8, 0, 208, 0, + 0, 34, 0, 16, 0, 3, 0, 0, + 0, 10, 0, 16, 0, 3, 0, 0, + 0, 1, 64, 0, 0, 3, 0, 0, + 0, 50, 0, 0, 12, 242, 0, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 6, 0, 0, 0, 0, 13, 0, 0, + 0, 26, 0, 16, 0, 3, 0, 0, + 0, 166, 26, 16, 0, 1, 0, 0, + 0, 70, 14, 16, 0, 1, 0, 0, + 0, 35, 0, 0, 15, 50, 0, 16, + 0, 3, 0, 0, 0, 6, 0, 16, + 0, 3, 0, 0, 0, 2, 64, 0, + 0, 3, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 1, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 2, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 16, + 0, 3, 0, 0, 0, 166, 26, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 2, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 26, 0, 16, + 0, 3, 0, 0, 0, 166, 26, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 21, 0, 0, + 1, 31, 0, 4, 3, 42, 0, 16, + 0, 3, 0, 0, 0, 27, 0, 0, + 5, 18, 0, 16, 0, 3, 0, 0, + 0, 58, 16, 16, 0, 0, 0, 0, + 0, 38, 0, 0, 8, 0, 208, 0, + 0, 34, 0, 16, 0, 3, 0, 0, + 0, 10, 0, 16, 0, 3, 0, 0, + 0, 1, 64, 0, 0, 3, 0, 0, + 0, 50, 0, 0, 12, 242, 0, 16, + 0, 1, 0, 0, 0, 70, 142, 32, + 6, 0, 0, 0, 0, 13, 0, 0, + 0, 26, 0, 16, 0, 3, 0, 0, + 0, 246, 31, 16, 0, 1, 0, 0, + 0, 70, 14, 16, 0, 1, 0, 0, + 0, 35, 0, 0, 15, 50, 0, 16, + 0, 3, 0, 0, 0, 6, 0, 16, + 0, 3, 0, 0, 0, 2, 64, 0, + 0, 3, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 1, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 2, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 10, 0, 16, + 0, 3, 0, 0, 0, 246, 31, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 2, 0, 0, 0, 50, 0, 0, + 12, 242, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 6, 0, 0, 0, + 0, 13, 0, 0, 0, 26, 0, 16, + 0, 3, 0, 0, 0, 246, 31, 16, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 21, 0, 0, + 1, 54, 0, 0, 5, 114, 0, 16, + 0, 3, 0, 0, 0, 70, 18, 16, + 0, 3, 0, 0, 0, 54, 0, 0, + 5, 130, 0, 16, 0, 3, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 128, + 63, 17, 0, 0, 7, 18, 0, 16, + 0, 4, 0, 0, 0, 70, 14, 16, + 0, 3, 0, 0, 0, 70, 14, 16, + 0, 1, 0, 0, 0, 17, 0, 0, + 7, 34, 0, 16, 0, 4, 0, 0, + 0, 70, 14, 16, 0, 3, 0, 0, + 0, 70, 14, 16, 0, 2, 0, 0, + 0, 17, 0, 0, 7, 66, 0, 16, + 0, 4, 0, 0, 0, 70, 14, 16, + 0, 3, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 16, 0, 0, + 7, 18, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 70, 2, 16, 0, 1, 0, 0, + 0, 16, 0, 0, 7, 34, 0, 16, + 0, 1, 0, 0, 0, 70, 18, 16, + 0, 2, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 16, 0, 0, + 7, 66, 0, 16, 0, 1, 0, 0, + 0, 70, 18, 16, 0, 2, 0, 0, + 0, 70, 2, 16, 0, 0, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 4, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 128, 63, 17, 0, 0, + 8, 18, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 70, 14, 16, + 0, 4, 0, 0, 0, 17, 0, 0, + 8, 34, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 70, 14, 16, + 0, 4, 0, 0, 0, 17, 0, 0, + 8, 66, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 70, 14, 16, + 0, 4, 0, 0, 0, 17, 0, 0, + 8, 130, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 70, 14, 16, + 0, 4, 0, 0, 0, 0, 0, 0, + 9, 114, 0, 16, 0, 2, 0, 0, + 0, 70, 2, 16, 128, 65, 0, 0, + 0, 0, 0, 0, 0, 70, 130, 32, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 54, 0, 0, 5, 130, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 0, 48, 0, 0, + 1, 33, 0, 0, 7, 130, 0, 16, + 0, 2, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 3, 0, 4, + 3, 58, 0, 16, 0, 2, 0, 0, + 0, 54, 0, 0, 6, 114, 48, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 70, 2, 16, 0, 2, 0, 0, + 0, 30, 0, 0, 7, 130, 0, 16, + 0, 1, 0, 0, 0, 58, 0, 16, + 0, 1, 0, 0, 0, 1, 64, 0, + 0, 1, 0, 0, 0, 22, 0, 0, + 1, 0, 0, 0, 9, 114, 0, 16, + 0, 2, 0, 0, 0, 70, 2, 16, +128, 65, 0, 0, 0, 0, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 54, 0, 0, + 5, 130, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 1, 33, 0, 0, + 7, 130, 0, 16, 0, 2, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 3, 0, 4, 3, 58, 0, 16, + 0, 2, 0, 0, 0, 54, 0, 0, + 6, 114, 48, 32, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 70, 2, 16, + 0, 2, 0, 0, 0, 30, 0, 0, + 7, 130, 0, 16, 0, 1, 0, 0, + 0, 58, 0, 16, 0, 1, 0, 0, + 0, 1, 64, 0, 0, 1, 0, 0, + 0, 22, 0, 0, 1, 16, 0, 0, + 8, 18, 32, 16, 0, 0, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 8, 34, 32, 16, 0, 0, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 16, 0, 0, + 8, 66, 32, 16, 0, 0, 0, 0, + 0, 70, 130, 32, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 70, 2, 16, + 0, 1, 0, 0, 0, 17, 0, 0, + 8, 18, 32, 16, 0, 4, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 7, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 17, 0, 0, + 8, 18, 0, 16, 0, 1, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 17, 0, 0, + 8, 34, 0, 16, 0, 1, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 17, 0, 0, + 8, 18, 0, 16, 0, 0, 0, 0, + 0, 70, 142, 32, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 70, 14, 16, + 0, 0, 0, 0, 0, 54, 0, 0, + 6, 34, 32, 16, 0, 4, 0, 0, + 0, 10, 0, 16, 128, 65, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 7, 34, 0, 16, 0, 0, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 26, 0, 16, 0, 1, 0, 0, + 0, 56, 0, 0, 7, 66, 32, 16, + 0, 4, 0, 0, 0, 26, 0, 16, + 0, 0, 0, 0, 0, 1, 64, 0, + 0, 0, 0, 0, 63, 54, 0, 0, + 6, 114, 32, 16, 0, 1, 0, 0, + 0, 70, 50, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 54, 0, 0, + 6, 114, 32, 16, 0, 2, 0, 0, + 0, 70, 50, 32, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 54, 0, 0, + 5, 130, 32, 16, 0, 4, 0, 0, + 0, 10, 0, 16, 0, 0, 0, 0, + 0, 50, 0, 0, 15, 50, 32, 16, + 0, 3, 0, 0, 0, 70, 16, 16, + 0, 4, 0, 0, 0, 2, 64, 0, + 0, 0, 0, 128, 63, 0, 0, 128, +191, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 128, 63, 0, 0, 0, + 0, 0, 0, 0, 0, 62, 0, 0, + 1, 83, 84, 65, 84, 116, 0, 0, + 0, 77, 0, 0, 0, 5, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, + 0, 36, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 82, 68, 69, + 70, 240, 1, 0, 0, 1, 0, 0, + 0, 72, 0, 0, 0, 1, 0, 0, + 0, 28, 0, 0, 0, 0, 4, 254, +255, 0, 65, 0, 0, 188, 1, 0, + 0, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 36, 71, 108, 111, 98, 97, 108, +115, 0, 171, 171, 171, 60, 0, 0, + 0, 6, 0, 0, 0, 96, 0, 0, + 0, 16, 12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 240, 0, 0, + 0, 0, 0, 0, 0, 64, 0, 0, + 0, 2, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 16, 1, 0, + 0, 64, 0, 0, 0, 44, 0, 0, + 0, 2, 0, 0, 0, 36, 1, 0, + 0, 0, 0, 0, 0, 52, 1, 0, + 0, 112, 0, 0, 0, 64, 0, 0, + 0, 2, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 64, 1, 0, + 0, 176, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 92, 1, 0, + 0, 0, 0, 0, 0, 108, 1, 0, + 0, 192, 0, 0, 0, 12, 0, 0, + 0, 2, 0, 0, 0, 136, 1, 0, + 0, 0, 0, 0, 0, 152, 1, 0, + 0, 208, 0, 0, 0, 64, 11, 0, + 0, 2, 0, 0, 0, 172, 1, 0, + 0, 0, 0, 0, 0, 95, 67, 67, + 95, 77, 86, 77, 97, 116, 114, 105, +120, 0, 171, 171, 171, 3, 0, 3, + 0, 4, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 95, 67, 67, + 95, 78, 111, 114, 109, 97, 108, 77, + 97, 116, 114, 105, 120, 0, 171, 171, +171, 3, 0, 3, 0, 3, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 95, 67, 67, 95, 80, 77, 97, +116, 114, 105, 120, 0, 95, 117, 95, + 80, 111, 105, 110, 116, 76, 105, 103, +104, 116, 83, 111, 117, 114, 99, 101, + 80, 111, 115, 105, 116, 105, 111, 110, + 0, 1, 0, 3, 0, 1, 0, 3, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 95, 117, 95, 83, 112, 111, 116, + 76, 105, 103, 104, 116, 83, 111, 117, +114, 99, 101, 80, 111, 115, 105, 116, +105, 111, 110, 0, 171, 1, 0, 3, + 0, 1, 0, 3, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 95, 117, 95, +109, 97, 116, 114, 105, 120, 80, 97, +108, 101, 116, 116, 101, 0, 171, 171, +171, 1, 0, 3, 0, 1, 0, 4, + 0, 180, 0, 0, 0, 0, 0, 0, + 0, 77, 105, 99, 114, 111, 115, 111, +102, 116, 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, 97, 100, +101, 114, 32, 67, 111, 109, 112, 105, +108, 101, 114, 32, 54, 46, 51, 46, + 57, 54, 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 171, 73, 83, 71, + 78, 140, 0, 0, 0, 5, 0, 0, + 0, 8, 0, 0, 0, 128, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 15, 15, 0, 0, 128, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 1, 0, 0, + 0, 15, 15, 0, 0, 128, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 2, 0, 0, + 0, 7, 7, 0, 0, 128, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 3, 0, 0, + 0, 7, 7, 0, 0, 128, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 4, 0, 0, + 0, 3, 3, 0, 0, 84, 69, 88, + 67, 79, 79, 82, 68, 0, 171, 171, +171, 79, 83, 71, 78, 152, 0, 0, + 0, 5, 0, 0, 0, 8, 0, 0, + 0, 128, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 1, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 2, 0, 0, 0, 7, 8, 0, + 0, 128, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 3, 12, 0, + 0, 137, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 0, 0, 15, 0, 0, + 0, 84, 69, 88, 67, 79, 79, 82, + 68, 0, 83, 86, 95, 80, 111, 115, +105, 116, 105, 111, 110, 0, 171, 171, +171, +}; + const unsigned char s_B5E27B4F3CF7236633255B28CBA530D6EE5CED86[] = { 166, 147, 0, 0, 142, 9, 2, 1, @@ -6094,7 +10328,7 @@ const unsigned char s_B5E27B4F3CF7236633255B28CBA530D6EE5CED86[] = { 111, 108, 111, 114, 0, 0, 0, 0, 2, 0, 0, 0, 240, 5, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, -194, 137, 0, 0, 0, 0, 0, 0, +107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 223, 173, 203, 80, 172, 13, 170, 215, 168, 128, 228, 5, @@ -6526,7 +10760,7 @@ const unsigned char s_E2C7CE1244DE9C76688EFA9463B2A130B6A08893[] = { 77, 97, 116, 114, 105, 120, 0, 0, 0, 0, 0, 0, 0, 0, 204, 2, 0, 0, 144, 4, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 127, 145, 81, 72, 216, 190, 16, 61, 245, 231, @@ -6856,8 +11090,8 @@ const unsigned char s_E2D56227712263272BD5218FEA117CD06180F81B[] = { 117, 95, 112, 111, 105, 110, 116, 83, 105, 122, 101, 0, 0, 0, 0, 2, 0, 0, 0, 204, 2, 0, 0, 208, - 4, 0, 0, 0, 0, 0, 0, 194, -137, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 107, +155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 127, 145, 81, 72, 216, 190, 16, 61, 245, 231, 235, 249, 125, @@ -7207,7 +11441,7 @@ const unsigned char s_F46558C274182079784898CF4968CF431593D5E2[] = { 116, 67, 111, 108, 111, 114, 0, 0, 0, 0, 3, 0, 0, 0, 108, 6, 0, 0, 4, 5, 0, 0, 0, 0, - 0, 0, 194, 137, 0, 0, 0, 0, + 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 47, 220, 115, 183, 137, 174, 141, 96, 204, 60, @@ -7663,7 +11897,7 @@ const unsigned char s_F6BA4519AF2653A53D57FB5D5508F0D8617105D6[] = { 101, 120, 116, 117, 114, 101, 48, 0, 0, 0, 0, 1, 0, 0, 0, 156, 3, 0, 0, 144, 4, 0, 0, 0, - 0, 0, 0, 194, 137, 0, 0, 0, + 0, 0, 0, 107, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 88, 66, 67, 203, 117, 183, 110, 154, 52, 220, 70, 125, @@ -7929,7 +12163,7 @@ const unsigned char s_F6BA4519AF2653A53D57FB5D5508F0D8617105D6[] = { 105, 111, 110, 0, 171, 171, 171, }; -const int s_numPrograms = 18; -const int s_programLengths[] = {2990,2528,4102,3022,2996,3358,2982,3073,2559,3300,3350,10261,3025,3556,2502,2675,3746,2775}; -const unsigned char* s_programs[] = {s_133478C5A874C1E6F59B418CE6C7C39F1AE0F873,s_13E33F532157A58EC77EDE3B3112560A89D272B2,s_1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE,s_53938AB67AD93ABA0DDB87F3C9889304284E011E,s_67837675F2BB48C0E926316F505FC1538228E0FA,s_78250E25D1929D4A842050738140787BE42541C6,s_7B67DD242152D35ACC079265FAD9D03DC98182DE,s_7CE5EE84ACB6110F7FA29152ECE3344CB6D6620D,s_7E1EEF397305D0BC2DCDBA4F2DAFBCBA1534E45C,s_847DBFDDA6EC09C57E4ED43012AE2FB5CAC7D8D5,s_92BE325B516F887D2C928EDE20ADF428DB01C038,s_976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE,s_A2377A827972A5466DA8637681045D32DA8A817D,s_B5E27B4F3CF7236633255B28CBA530D6EE5CED86,s_E2C7CE1244DE9C76688EFA9463B2A130B6A08893,s_E2D56227712263272BD5218FEA117CD06180F81B,s_F46558C274182079784898CF4968CF431593D5E2,s_F6BA4519AF2653A53D57FB5D5508F0D8617105D6}; -const char* s_programKeys[] = {"133478C5A874C1E6F59B418CE6C7C39F1AE0F873","13E33F532157A58EC77EDE3B3112560A89D272B2","1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE","53938AB67AD93ABA0DDB87F3C9889304284E011E","67837675F2BB48C0E926316F505FC1538228E0FA","78250E25D1929D4A842050738140787BE42541C6","7B67DD242152D35ACC079265FAD9D03DC98182DE","7CE5EE84ACB6110F7FA29152ECE3344CB6D6620D","7E1EEF397305D0BC2DCDBA4F2DAFBCBA1534E45C","847DBFDDA6EC09C57E4ED43012AE2FB5CAC7D8D5","92BE325B516F887D2C928EDE20ADF428DB01C038","976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE","A2377A827972A5466DA8637681045D32DA8A817D","B5E27B4F3CF7236633255B28CBA530D6EE5CED86","E2C7CE1244DE9C76688EFA9463B2A130B6A08893","E2D56227712263272BD5218FEA117CD06180F81B","F46558C274182079784898CF4968CF431593D5E2","F6BA4519AF2653A53D57FB5D5508F0D8617105D6"}; +const int s_numPrograms = 21; +const int s_programLengths[] = {2990,2528,4102,8993,3022,2996,3358,2982,3073,2559,3300,3350,8475,10261,3025,16289,3556,2502,2675,3746,2775}; +const unsigned char* s_programs[] = {s_133478C5A874C1E6F59B418CE6C7C39F1AE0F873,s_13E33F532157A58EC77EDE3B3112560A89D272B2,s_1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE,s_2CF9793879165058483EFB4AD6FA9746ECD7DD2A,s_53938AB67AD93ABA0DDB87F3C9889304284E011E,s_67837675F2BB48C0E926316F505FC1538228E0FA,s_78250E25D1929D4A842050738140787BE42541C6,s_7B67DD242152D35ACC079265FAD9D03DC98182DE,s_7CE5EE84ACB6110F7FA29152ECE3344CB6D6620D,s_7E1EEF397305D0BC2DCDBA4F2DAFBCBA1534E45C,s_847DBFDDA6EC09C57E4ED43012AE2FB5CAC7D8D5,s_92BE325B516F887D2C928EDE20ADF428DB01C038,s_93D31E1668075AE4941C53441D7A9D0DE8F76331,s_976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE,s_A2377A827972A5466DA8637681045D32DA8A817D,s_A883DF8204EA77D28BC638CEAAB512DEE74FBB65,s_B5E27B4F3CF7236633255B28CBA530D6EE5CED86,s_E2C7CE1244DE9C76688EFA9463B2A130B6A08893,s_E2D56227712263272BD5218FEA117CD06180F81B,s_F46558C274182079784898CF4968CF431593D5E2,s_F6BA4519AF2653A53D57FB5D5508F0D8617105D6}; +const char* s_programKeys[] = {"133478C5A874C1E6F59B418CE6C7C39F1AE0F873","13E33F532157A58EC77EDE3B3112560A89D272B2","1A69A7CC77C7C8FC62799B0513816EA41FBF3BFE","2CF9793879165058483EFB4AD6FA9746ECD7DD2A","53938AB67AD93ABA0DDB87F3C9889304284E011E","67837675F2BB48C0E926316F505FC1538228E0FA","78250E25D1929D4A842050738140787BE42541C6","7B67DD242152D35ACC079265FAD9D03DC98182DE","7CE5EE84ACB6110F7FA29152ECE3344CB6D6620D","7E1EEF397305D0BC2DCDBA4F2DAFBCBA1534E45C","847DBFDDA6EC09C57E4ED43012AE2FB5CAC7D8D5","92BE325B516F887D2C928EDE20ADF428DB01C038","93D31E1668075AE4941C53441D7A9D0DE8F76331","976D0E98457C40DFC2F0FBD00E30607C9E4CFDAE","A2377A827972A5466DA8637681045D32DA8A817D","A883DF8204EA77D28BC638CEAAB512DEE74FBB65","B5E27B4F3CF7236633255B28CBA530D6EE5CED86","E2C7CE1244DE9C76688EFA9463B2A130B6A08893","E2D56227712263272BD5218FEA117CD06180F81B","F46558C274182079784898CF4968CF431593D5E2","F6BA4519AF2653A53D57FB5D5508F0D8617105D6"}; diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index bdc8abe54e..e484aceea4 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -39,7 +39,7 @@ THE SOFTWARE. #include "deprecated/CCString.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) #include "CCPrecompiledShaders.h" #endif @@ -177,7 +177,7 @@ GLProgram::~GLProgram() bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) GLboolean hasCompiler = false; glGetBooleanv(GL_SHADER_COMPILER, &hasCompiler); _hasShaderCompiler = (hasCompiler == GL_TRUE); @@ -226,14 +226,14 @@ bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar* CHECK_GL_ERROR_DEBUG(); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) _shaderId = CCPrecompiledShaders::getInstance()->addShaders(vShaderByteArray, fShaderByteArray); #endif return true; } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) GLProgram* GLProgram::createWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray) { auto ret = new (std::nothrow) GLProgram(); @@ -529,7 +529,7 @@ bool GLProgram::link() { CCASSERT(_program != 0, "Cannot link invalid program"); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) if(!_hasShaderCompiler) { // precompiled shader program is already linked @@ -562,7 +562,7 @@ bool GLProgram::link() _vertShader = _fragShader = 0; -#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) glGetProgramiv(_program, GL_LINK_STATUS, &status); if (status == GL_FALSE) @@ -573,7 +573,7 @@ bool GLProgram::link() } #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) if (status == GL_TRUE) { CCPrecompiledShaders::getInstance()->addProgram(_program, _shaderId); diff --git a/cocos/renderer/CCGLProgram.h b/cocos/renderer/CCGLProgram.h index fa02252b97..fcb7670829 100644 --- a/cocos/renderer/CCGLProgram.h +++ b/cocos/renderer/CCGLProgram.h @@ -175,7 +175,7 @@ public: * @lua initWithString */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) /** Initializes the CCGLProgram with precompiled shader program */ static GLProgram* createWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); bool initWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); @@ -343,7 +343,7 @@ protected: struct _hashUniformEntry* _hashForUniforms; bool _hasShaderCompiler; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || defined(WP8_SHADER_COMPILER) std::string _shaderId; #endif diff --git a/cocos/renderer/CCQuadCommand.cpp b/cocos/renderer/CCQuadCommand.cpp index 5b910e7e89..b9549ddcbf 100644 --- a/cocos/renderer/CCQuadCommand.cpp +++ b/cocos/renderer/CCQuadCommand.cpp @@ -28,12 +28,17 @@ #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgram.h" #include "xxhash.h" -#include "renderer/CCRenderer.h" +#include "CCRenderer.h" NS_CC_BEGIN + QuadCommand::QuadCommand() -:_quads(nullptr) +:_materialID(0) +,_textureID(0) +,_glProgramState(nullptr) +,_blendType(BlendFunc::DISABLE) +,_quads(nullptr) ,_quadsCount(0) { _type = RenderCommand::Type::QUAD_COMMAND; @@ -43,43 +48,20 @@ void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* glPr { CCASSERT(glProgramState, "Invalid GLProgramState"); CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand"); - + _globalOrder = globalOrder; - + _quadsCount = quadCount; _quads = quad; - //generate triangles - { - static std::vector QUADINDICESMAX; - if(QUADINDICESMAX.size() == 0) - { - QUADINDICESMAX.resize(Renderer::INDEX_VBO_SIZE); - for(ssize_t i = 0; i < Renderer::INDEX_VBO_SIZE / 6; ++i) - { - QUADINDICESMAX[ 6 * i + 0] = 4 * i + 0; - QUADINDICESMAX[ 6 * i + 1] = 4 * i + 1; - QUADINDICESMAX[ 6 * i + 2] = 4 * i + 2; - QUADINDICESMAX[ 6 * i + 3] = 4 * i + 3; - QUADINDICESMAX[ 6 * i + 4] = 4 * i + 2; - QUADINDICESMAX[ 6 * i + 5] = 4 * i + 1; - } - } - - _triangles.vertCount = quadCount * 4; - _triangles.indexCount = quadCount * 6; - _triangles.indices = &QUADINDICESMAX[0]; - _triangles.verts = &quad->tl; - } - _mv = mv; - + if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || _glProgramState != glProgramState) { - + _textureID = textureID; _blendType = blendType; _glProgramState = glProgramState; - + generateMaterialID(); } } @@ -88,4 +70,31 @@ QuadCommand::~QuadCommand() { } -NS_CC_END +void QuadCommand::generateMaterialID() +{ + + if(_glProgramState->getUniformCount() > 0) + { + _materialID = Renderer::MATERIAL_ID_DO_NOT_BATCH; + } + else + { + int glProgram = (int)_glProgramState->getGLProgram()->getProgram(); + int intArray[4] = { glProgram, (int)_textureID, (int)_blendType.src, (int)_blendType.dst}; + + _materialID = XXH32((const void*)intArray, sizeof(intArray), 0); + } +} + +void QuadCommand::useMaterial() const +{ + //Set texture + GL::bindTexture2D(_textureID); + + //set blend mode + GL::blendFunc(_blendType.src, _blendType.dst); + + _glProgramState->apply(_mv); +} + +NS_CC_END \ No newline at end of file diff --git a/cocos/renderer/CCQuadCommand.h b/cocos/renderer/CCQuadCommand.h index bacd8528b3..d859751c66 100644 --- a/cocos/renderer/CCQuadCommand.h +++ b/cocos/renderer/CCQuadCommand.h @@ -27,29 +27,42 @@ #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgramState.h" -#include "renderer/CCTrianglesCommand.h" NS_CC_BEGIN /** Command used to render one or more Quads */ -class CC_DLL QuadCommand : public TrianglesCommand +class CC_DLL QuadCommand : public RenderCommand { public: - + QuadCommand(); ~QuadCommand(); - + /** Initializes the command with a globalZOrder, a texture ID, a `GLProgram`, a blending function, a pointer to quads, * quantity of quads, and the Model View transform to be used for the quads */ void init(float globalOrder, GLuint texutreID, GLProgramState* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, const Mat4& mv); - - inline const V3F_C4B_T2F_Quad* getQuads() const { return _quads; } + + void useMaterial() const; + + inline uint32_t getMaterialID() const { return _materialID; } + inline GLuint getTextureID() const { return _textureID; } + inline V3F_C4B_T2F_Quad* getQuads() const { return _quads; } inline ssize_t getQuadCount() const { return _quadsCount; } - + inline GLProgramState* getGLProgramState() const { return _glProgramState; } + inline BlendFunc getBlendType() const { return _blendType; } + inline const Mat4& getModelView() const { return _mv; } + protected: + void generateMaterialID(); + + uint32_t _materialID; + GLuint _textureID; + GLProgramState* _glProgramState; + BlendFunc _blendType; V3F_C4B_T2F_Quad* _quads; ssize_t _quadsCount; + Mat4 _mv; }; NS_CC_END diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index 226d26b17b..b8e8087474 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -141,6 +141,7 @@ Renderer::Renderer() ,_lastBatchedMeshCommand(nullptr) ,_filledVertex(0) ,_filledIndex(0) +,_numberQuads(0) ,_glViewAssigned(false) ,_isRendering(false) #if CC_ENABLE_CACHE_TEXTURE_DATA @@ -162,9 +163,11 @@ Renderer::~Renderer() _groupCommandManager->release(); glDeleteBuffers(2, _buffersVBO); + glDeleteBuffers(2, _quadbuffersVBO); if (Configuration::getInstance()->supportsShareableVAO()) { + glDeleteVertexArrays(1, &_buffersVAO); glDeleteVertexArrays(1, &_quadVAO); GL::bindVAO(0); } @@ -184,6 +187,18 @@ void Renderer::initGLView() Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_cacheTextureListener, -1); #endif + //setup index data for quads + + for( int i=0; i < VBO_SIZE/4; i++) + { + _quadIndices[i*6+0] = (GLushort) (i*4+0); + _quadIndices[i*6+1] = (GLushort) (i*4+1); + _quadIndices[i*6+2] = (GLushort) (i*4+2); + _quadIndices[i*6+3] = (GLushort) (i*4+3); + _quadIndices[i*6+4] = (GLushort) (i*4+2); + _quadIndices[i*6+5] = (GLushort) (i*4+1); + } + setupBuffer(); _glViewAssigned = true; @@ -203,8 +218,9 @@ void Renderer::setupBuffer() void Renderer::setupVBOAndVAO() { - glGenVertexArrays(1, &_quadVAO); - GL::bindVAO(_quadVAO); + //generate vbo and vao for trianglesCommand + glGenVertexArrays(1, &_buffersVAO); + GL::bindVAO(_buffersVAO); glGenBuffers(2, &_buffersVBO[0]); @@ -231,13 +247,42 @@ void Renderer::setupVBOAndVAO() glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); + //generate vbo and vao for quadCommand + glGenVertexArrays(1, &_quadVAO); + GL::bindVAO(_quadVAO); + + glGenBuffers(2, &_quadbuffersVBO[0]); + + glBindBuffer(GL_ARRAY_BUFFER, _quadbuffersVBO[0]); + glBufferData(GL_ARRAY_BUFFER, sizeof(_quadVerts[0]) * VBO_SIZE, _quadVerts, GL_DYNAMIC_DRAW); + + // vertices + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, vertices)); + + // colors + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, colors)); + + // tex coords + glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORD); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, texCoords)); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _quadbuffersVBO[1]); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_quadIndices[0]) * INDEX_VBO_SIZE, _quadIndices, GL_STATIC_DRAW); + + // Must unbind the VAO before changing the element buffer. + GL::bindVAO(0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + CHECK_GL_ERROR_DEBUG(); } void Renderer::setupVBO() { glGenBuffers(2, &_buffersVBO[0]); - + glGenBuffers(2, &_quadbuffersVBO[0]); mapBuffers(); } @@ -248,10 +293,18 @@ void Renderer::mapBuffers() glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * VBO_SIZE, _verts, GL_DYNAMIC_DRAW); + + glBindBuffer(GL_ARRAY_BUFFER, _quadbuffersVBO[0]); + glBufferData(GL_ARRAY_BUFFER, sizeof(_quadVerts[0]) * VBO_SIZE, _quadVerts, GL_DYNAMIC_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * INDEX_VBO_SIZE, _indices, GL_STATIC_DRAW); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _quadbuffersVBO[1]); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_quadIndices[0]) * INDEX_VBO_SIZE, _quadIndices, GL_STATIC_DRAW); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); CHECK_GL_ERROR_DEBUG(); @@ -301,23 +354,51 @@ void Renderer::visitRenderQueue(const RenderQueue& queue) { auto command = queue[index]; auto commandType = command->getType(); - if(RenderCommand::Type::QUAD_COMMAND == commandType || RenderCommand::Type::TRIANGLES_COMMAND == commandType) + if( RenderCommand::Type::TRIANGLES_COMMAND == commandType) { flush3D(); + if(_numberQuads > 0) + { + drawBatchedQuads(); + _lastMaterialID = 0; + } + auto cmd = static_cast(command); - //Batch quads + //Batch Triangles if( _filledVertex + cmd->getVertexCount() > VBO_SIZE || _filledIndex + cmd->getIndexCount() > INDEX_VBO_SIZE) { CCASSERT(cmd->getVertexCount()>= 0 && cmd->getVertexCount() < VBO_SIZE, "VBO for vertex is not big enough, please break the data down or use customized render command"); CCASSERT(cmd->getIndexCount()>= 0 && cmd->getIndexCount() < INDEX_VBO_SIZE, "VBO for index is not big enough, please break the data down or use customized render command"); - //Draw batched quads if VBO is full - drawBatchedQuads(); + //Draw batched Triangles if VBO is full + drawBatchedTriangles(); } _batchedCommands.push_back(cmd); fillVerticesAndIndices(cmd); + } + else if ( RenderCommand::Type::QUAD_COMMAND == commandType ) + { + flush3D(); + if(_filledIndex > 0) + { + drawBatchedTriangles(); + _lastMaterialID = 0; + } + auto cmd = static_cast(command); + //Batch quads + if( (_numberQuads + cmd->getQuadCount()) * 4 > VBO_SIZE ) + { + CCASSERT(cmd->getQuadCount()>= 0 && cmd->getQuadCount() * 4 < VBO_SIZE, "VBO for vertex is not big enough, please break the data down or use customized render command"); + //Draw batched quads if VBO is full + drawBatchedQuads(); + } + + _batchQuadCommands.push_back(cmd); + + fillQuads(cmd); + } else if(RenderCommand::Type::GROUP_COMMAND == commandType) { @@ -379,11 +460,18 @@ void Renderer::visitTransparentRenderQueue(const TransparentRenderQueue& queue) { auto command = queue[index]; auto commandType = command->getType(); - if(RenderCommand::Type::QUAD_COMMAND == commandType || RenderCommand::Type::TRIANGLES_COMMAND == commandType) + if( RenderCommand::Type::TRIANGLES_COMMAND == commandType) { auto cmd = static_cast(command); _batchedCommands.push_back(cmd); fillVerticesAndIndices(cmd); + drawBatchedTriangles(); + } + else if(RenderCommand::Type::QUAD_COMMAND == commandType) + { + auto cmd = static_cast(command); + _batchQuadCommands.push_back(cmd); + fillQuads(cmd); drawBatchedQuads(); } else if(RenderCommand::Type::GROUP_COMMAND == commandType) @@ -464,10 +552,12 @@ void Renderer::clean() _renderGroups[j].clear(); } - // Clear batch quad commands + // Clear batch commands _batchedCommands.clear(); + _batchQuadCommands.clear(); _filledVertex = 0; _filledIndex = 0; + _numberQuads = 0; _lastMaterialID = 0; _lastBatchedMeshCommand = nullptr; @@ -497,7 +587,23 @@ void Renderer::fillVerticesAndIndices(const TrianglesCommand* cmd) _filledIndex += cmd->getIndexCount(); } -void Renderer::drawBatchedQuads() +void Renderer::fillQuads(const QuadCommand *cmd) +{ + memcpy(_quadVerts + _numberQuads * 4, cmd->getQuads(), sizeof(V3F_C4B_T2F_Quad) * cmd->getQuadCount()); + + const Mat4& modelView = cmd->getModelView(); + + for(ssize_t i=0; i< cmd->getQuadCount() * 4; ++i) + { + V3F_C4B_T2F *q = &_quadVerts[i + _numberQuads * 4]; + Vec3 *vec1 = (Vec3*)&q->vertices; + modelView.transformPoint(vec1); + } + + _numberQuads += cmd->getQuadCount(); +} + +void Renderer::drawBatchedTriangles() { //TODO: we can improve the draw performance by insert material switching command before hand. @@ -513,7 +619,7 @@ void Renderer::drawBatchedQuads() if (Configuration::getInstance()->supportsShareableVAO()) { //Bind VAO - GL::bindVAO(_quadVAO); + GL::bindVAO(_buffersVAO); //Set VBO data glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); @@ -560,7 +666,7 @@ void Renderer::drawBatchedQuads() for(const auto& cmd : _batchedCommands) { auto newMaterialID = cmd->getMaterialID(); - if(_lastMaterialID != newMaterialID || newMaterialID == TrianglesCommand::MATERIAL_ID_DO_NOT_BATCH) + if(_lastMaterialID != newMaterialID || newMaterialID == MATERIAL_ID_DO_NOT_BATCH) { //Draw quads if(indexToDraw > 0) @@ -581,7 +687,7 @@ void Renderer::drawBatchedQuads() indexToDraw += cmd->getIndexCount(); } - //Draw any remaining quad + //Draw any remaining triangles if(indexToDraw > 0) { glDrawElements(GL_TRIANGLES, (GLsizei) indexToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (startIndex*sizeof(_indices[0])) ); @@ -605,6 +711,111 @@ void Renderer::drawBatchedQuads() _filledIndex = 0; } +void Renderer::drawBatchedQuads() +{ + //TODO: we can improve the draw performance by insert material switching command before hand. + + int indexToDraw = 0; + int startIndex = 0; + + //Upload buffer to VBO + if(_numberQuads <= 0 || _batchQuadCommands.empty()) + { + return; + } + + if (Configuration::getInstance()->supportsShareableVAO()) + { + //Bind VAO + GL::bindVAO(_quadVAO); + //Set VBO data + glBindBuffer(GL_ARRAY_BUFFER, _quadbuffersVBO[0]); + + // option 1: subdata + // glBufferSubData(GL_ARRAY_BUFFER, sizeof(_quads[0])*start, sizeof(_quads[0]) * n , &_quads[start] ); + + // option 2: data + // glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW); + + // option 3: orphaning + glMapBuffer + glBufferData(GL_ARRAY_BUFFER, sizeof(_quadVerts[0]) * _numberQuads * 4, nullptr, GL_DYNAMIC_DRAW); + void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + memcpy(buf, _quadVerts, sizeof(_quadVerts[0])* _numberQuads * 4); + glUnmapBuffer(GL_ARRAY_BUFFER); + + glBindBuffer(GL_ARRAY_BUFFER, 0); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _quadbuffersVBO[1]); + } + else + { +#define kQuadSize sizeof(_verts[0]) + glBindBuffer(GL_ARRAY_BUFFER, _quadbuffersVBO[0]); + + glBufferData(GL_ARRAY_BUFFER, sizeof(_quadVerts[0]) * _numberQuads * 4 , _quadVerts, GL_DYNAMIC_DRAW); + + GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX); + + // vertices + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, vertices)); + + // colors + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, colors)); + + // tex coords + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, texCoords)); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _quadbuffersVBO[1]); + } + + //Start drawing verties in batch + for(const auto& cmd : _batchQuadCommands) + { + auto newMaterialID = cmd->getMaterialID(); + if(_lastMaterialID != newMaterialID || newMaterialID == MATERIAL_ID_DO_NOT_BATCH) + { + //Draw quads + if(indexToDraw > 0) + { + glDrawElements(GL_TRIANGLES, (GLsizei) indexToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (startIndex*sizeof(_indices[0])) ); + _drawnBatches++; + _drawnVertices += indexToDraw; + + startIndex += indexToDraw; + indexToDraw = 0; + } + + //Use new material + cmd->useMaterial(); + _lastMaterialID = newMaterialID; + } + + indexToDraw += cmd->getQuadCount() * 6; + } + + //Draw any remaining quad + if(indexToDraw > 0) + { + glDrawElements(GL_TRIANGLES, (GLsizei) indexToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (startIndex*sizeof(_indices[0])) ); + _drawnBatches++; + _drawnVertices += indexToDraw; + } + + if (Configuration::getInstance()->supportsShareableVAO()) + { + //Unbind VAO + GL::bindVAO(0); + } + else + { + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } + + _batchQuadCommands.clear(); + _numberQuads = 0; +} + void Renderer::flush() { flush2D(); @@ -615,6 +826,8 @@ void Renderer::flush2D() { drawBatchedQuads(); _lastMaterialID = 0; + drawBatchedTriangles(); + _lastMaterialID = 0; } void Renderer::flush3D() diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index e9913dd775..fcd44e8e62 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -96,7 +96,8 @@ public: static const int INDEX_VBO_SIZE = VBO_SIZE * 6 / 4; static const int BATCH_QUADCOMMAND_RESEVER_SIZE = 64; - + static const int MATERIAL_ID_DO_NOT_BATCH = 0; + Renderer(); ~Renderer(); @@ -147,7 +148,7 @@ protected: void setupVBOAndVAO(); void setupVBO(); void mapBuffers(); - + void drawBatchedTriangles(); void drawBatchedQuads(); //Draw the previews queued quads and flush previous context @@ -162,7 +163,8 @@ protected: void visitTransparentRenderQueue(const TransparentRenderQueue& queue); void fillVerticesAndIndices(const TrianglesCommand* cmd); - + void fillQuads(const QuadCommand* cmd); + std::stack _commandGroupStack; std::vector _renderGroups; @@ -172,15 +174,25 @@ protected: MeshCommand* _lastBatchedMeshCommand; std::vector _batchedCommands; - + std::vector _batchQuadCommands; + + + //for TrianglesCommand V3F_C4B_T2F _verts[VBO_SIZE]; GLushort _indices[INDEX_VBO_SIZE]; - GLuint _quadVAO; + GLuint _buffersVAO; GLuint _buffersVBO[2]; //0: vertex 1: indices int _filledVertex; int _filledIndex; + //for QuadCommand + V3F_C4B_T2F _quadVerts[VBO_SIZE]; + GLushort _quadIndices[INDEX_VBO_SIZE]; + GLuint _quadVAO; + GLuint _quadbuffersVBO[2]; //0: vertex 1: indices + int _numberQuads; + bool _glViewAssigned; // stats diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index a7eb01b4b1..1073302d9b 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -1370,7 +1370,7 @@ Texture2D::PixelFormat Texture2D::getDefaultAlphaPixelFormat() unsigned int Texture2D::getBitsPerPixelForFormat(Texture2D::PixelFormat format) const { - if (format == PixelFormat::NONE) + if (format == PixelFormat::NONE || format == PixelFormat::DEFAULT) { return 0; } diff --git a/cocos/renderer/CCTextureCache.h b/cocos/renderer/CCTextureCache.h index b05eb78b86..39ff497642 100644 --- a/cocos/renderer/CCTextureCache.h +++ b/cocos/renderer/CCTextureCache.h @@ -269,7 +269,7 @@ protected: FontDefinition _fontDefinition; }; -class VolatileTextureMgr +class CC_DLL VolatileTextureMgr { public: static void addImageTexture(Texture2D *tt, const std::string& imageFileName); diff --git a/cocos/renderer/CCTrianglesCommand.cpp b/cocos/renderer/CCTrianglesCommand.cpp index 8f46ef9c6a..901183d37d 100644 --- a/cocos/renderer/CCTrianglesCommand.cpp +++ b/cocos/renderer/CCTrianglesCommand.cpp @@ -75,7 +75,7 @@ void TrianglesCommand::generateMaterialID() if(_glProgramState->getUniformCount() > 0) { - _materialID = TrianglesCommand::MATERIAL_ID_DO_NOT_BATCH; + _materialID = Renderer::MATERIAL_ID_DO_NOT_BATCH; } else { diff --git a/cocos/renderer/CCTrianglesCommand.h b/cocos/renderer/CCTrianglesCommand.h index 71cd1cca25..5a478fb1ae 100644 --- a/cocos/renderer/CCTrianglesCommand.h +++ b/cocos/renderer/CCTrianglesCommand.h @@ -31,9 +31,6 @@ NS_CC_BEGIN class CC_DLL TrianglesCommand : public RenderCommand { -public: - static const int MATERIAL_ID_DO_NOT_BATCH = 0; - public: struct Triangles { diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua index fb9c86d96c..799140a2d5 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua @@ -44,6 +44,21 @@ -- @param self -- @return float#float ret (return value: float) +-------------------------------- +-- create Animate3D by frame section, [startFrame, endFrame)
+-- param animation used to generate animate3D
+-- param startFrame
+-- param endFrame
+-- param frameRate default is 30 per second
+-- return Animate3D created using animate +-- @function [parent=#Animate3D] createWithFrames +-- @param self +-- @param #cc.Animation3D animation +-- @param #int startFrame +-- @param #int endFrame +-- @param #float frameRate +-- @return Animate3D#Animate3D ret (return value: cc.Animate3D) + -------------------------------- -- -- @function [parent=#Animate3D] startWithTarget diff --git a/cocos/scripting/lua-bindings/auto/api/AssetsManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/AssetsManagerEx.lua new file mode 100644 index 0000000000..0b0a8af401 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/AssetsManagerEx.lua @@ -0,0 +1,60 @@ + +-------------------------------- +-- @module AssetsManagerEx +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- @brief Gets the current update state. +-- @function [parent=#AssetsManagerEx] getState +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- @brief Check out if there is a new version of manifest.
+-- You may use this method before updating, then let user determine whether
+-- he wants to update resources. +-- @function [parent=#AssetsManagerEx] checkUpdate +-- @param self + +-------------------------------- +-- @brief Gets storage path. +-- @function [parent=#AssetsManagerEx] getStoragePath +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- @brief Update with the current local manifest. +-- @function [parent=#AssetsManagerEx] update +-- @param self + +-------------------------------- +-- @brief Function for retrieve the local manifest object +-- @function [parent=#AssetsManagerEx] getLocalManifest +-- @param self +-- @return Manifest#Manifest ret (return value: cc.Manifest) + +-------------------------------- +-- @brief Function for retrieve the remote manifest object +-- @function [parent=#AssetsManagerEx] getRemoteManifest +-- @param self +-- @return Manifest#Manifest ret (return value: cc.Manifest) + +-------------------------------- +-- @brief Reupdate all failed assets under the current AssetsManagerEx context +-- @function [parent=#AssetsManagerEx] downloadFailedAssets +-- @param self + +-------------------------------- +-- @brief Create function for creating a new AssetsManagerEx
+-- param manifestUrl The url for the local manifest file
+-- param storagePath The storage path for downloaded assetes
+-- warning The cached manifest in your storage path have higher priority and will be searched first,
+-- only if it doesn't exist, AssetsManagerEx will use the given manifestUrl. +-- @function [parent=#AssetsManagerEx] create +-- @param self +-- @param #string manifestUrl +-- @param #string storagePath +-- @return AssetsManagerEx#AssetsManagerEx ret (return value: cc.AssetsManagerEx) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua new file mode 100644 index 0000000000..3678abe33c --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua @@ -0,0 +1,47 @@ + +-------------------------------- +-- @module ClippingRectangleNode +-- @extend Node +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#ClippingRectangleNode] isClippingEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#ClippingRectangleNode] setClippingEnabled +-- @param self +-- @param #bool enabled + +-------------------------------- +-- +-- @function [parent=#ClippingRectangleNode] getClippingRegion +-- @param self +-- @return rect_table#rect_table ret (return value: rect_table) + +-------------------------------- +-- +-- @function [parent=#ClippingRectangleNode] setClippingRegion +-- @param self +-- @param #rect_table clippingRegion + +-------------------------------- +-- @overload self +-- @overload self, rect_table +-- @function [parent=#ClippingRectangleNode] create +-- @param self +-- @param #rect_table clippingRegion +-- @return ClippingRectangleNode#ClippingRectangleNode ret (retunr value: cc.ClippingRectangleNode) + +-------------------------------- +-- +-- @function [parent=#ClippingRectangleNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Director.lua b/cocos/scripting/lua-bindings/auto/api/Director.lua index bdabea04f8..e7b3350567 100644 --- a/cocos/scripting/lua-bindings/auto/api/Director.lua +++ b/cocos/scripting/lua-bindings/auto/api/Director.lua @@ -45,7 +45,8 @@ -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- +-- Returns the Console
+-- since v3.0 -- @function [parent=#Director] getConsole -- @param self -- @return Console#Console ret (return value: cc.Console) diff --git a/cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua new file mode 100644 index 0000000000..e5be0a16ef --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua @@ -0,0 +1,55 @@ + +-------------------------------- +-- @module EventAssetsManagerEx +-- @extend EventCustom +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getAssetsManagerEx +-- @param self +-- @return AssetsManagerEx#AssetsManagerEx ret (return value: cc.AssetsManagerEx) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getAssetId +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getCURLECode +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getMessage +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getCURLMCode +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getPercentByFile +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getEventCode +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- +-- @function [parent=#EventAssetsManagerEx] getPercent +-- @param self +-- @return float#float ret (return value: float) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerAssetsManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerAssetsManagerEx.lua new file mode 100644 index 0000000000..3d487d9aa8 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerAssetsManagerEx.lua @@ -0,0 +1,19 @@ + +-------------------------------- +-- @module EventListenerAssetsManagerEx +-- @extend EventListenerCustom +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#EventListenerAssetsManagerEx] clone +-- @param self +-- @return EventListenerAssetsManagerEx#EventListenerAssetsManagerEx ret (return value: cc.EventListenerAssetsManagerEx) + +-------------------------------- +-- / Overrides +-- @function [parent=#EventListenerAssetsManagerEx] checkAvailable +-- @param self +-- @return bool#bool ret (return value: bool) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Manifest.lua b/cocos/scripting/lua-bindings/auto/api/Manifest.lua new file mode 100644 index 0000000000..a8db33f8de --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Manifest.lua @@ -0,0 +1,43 @@ + +-------------------------------- +-- @module Manifest +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- @brief Gets remote manifest file url. +-- @function [parent=#Manifest] getManifestFileUrl +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- @brief Check whether the version informations have been fully loaded +-- @function [parent=#Manifest] isVersionLoaded +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- @brief Check whether the manifest have been fully loaded +-- @function [parent=#Manifest] isLoaded +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- @brief Gets remote package url. +-- @function [parent=#Manifest] getPackageUrl +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- @brief Gets manifest version. +-- @function [parent=#Manifest] getVersion +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- @brief Gets remote version file url. +-- @function [parent=#Manifest] getVersionFileUrl +-- @param self +-- @return string#string ret (return value: string) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua deleted file mode 100644 index 51d4c7a9e6..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua +++ /dev/null @@ -1,64 +0,0 @@ - --------------------------------- --- @module Skeleton --- @extend Node,BlendProtocol --- @parent_module sp - --------------------------------- --- --- @function [parent=#Skeleton] setToSetupPose --- @param self - --------------------------------- --- --- @function [parent=#Skeleton] setBlendFunc --- @param self --- @param #cc.BlendFunc func - --------------------------------- --- --- @function [parent=#Skeleton] onDraw --- @param self --- @param #mat4_table transform --- @param #unsigned int flags - --------------------------------- --- --- @function [parent=#Skeleton] setSlotsToSetupPose --- @param self - --------------------------------- --- --- @function [parent=#Skeleton] getBlendFunc --- @param self --- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) - --------------------------------- --- --- @function [parent=#Skeleton] setSkin --- @param self --- @param #char skinName --- @return bool#bool ret (return value: bool) - --------------------------------- --- --- @function [parent=#Skeleton] setBonesToSetupPose --- @param self - --------------------------------- --- --- @function [parent=#Skeleton] getBoundingBox --- @param self --- @return rect_table#rect_table ret (return value: rect_table) - --------------------------------- --- --- @function [parent=#Skeleton] onEnter --- @param self - --------------------------------- --- --- @function [parent=#Skeleton] onExit --- @param self - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua index c57eb13010..cfaee60ac3 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua @@ -1,17 +1,69 @@ -------------------------------- -- @module SkeletonAnimation --- @extend Skeleton +-- @extend SkeletonRenderer -- @parent_module sp +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setStartListener +-- @param self +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setTrackEventListener +-- @param self +-- @param #spTrackEntry entry +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setTrackCompleteListener +-- @param self +-- @param #spTrackEntry entry +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setTrackStartListener +-- @param self +-- @param #spTrackEntry entry +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setCompleteListener +-- @param self +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setTrackEndListener +-- @param self +-- @param #spTrackEntry entry +-- @param #function listener + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setEventListener +-- @param self +-- @param #function listener + -------------------------------- -- -- @function [parent=#SkeletonAnimation] setMix -- @param self --- @param #char fromAnimation --- @param #char toAnimation +-- @param #string fromAnimation +-- @param #string toAnimation -- @param #float duration +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] setEndListener +-- @param self +-- @param #function listener + -------------------------------- -- -- @function [parent=#SkeletonAnimation] clearTracks diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua new file mode 100644 index 0000000000..d110b1de54 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua @@ -0,0 +1,99 @@ + +-------------------------------- +-- @module SkeletonRenderer +-- @extend Node,BlendProtocol +-- @parent_module sp + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setTimeScale +-- @param self +-- @param #float scale + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] isOpacityModifyRGB +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setDebugSlotsEnabled +-- @param self +-- @param #bool enabled + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] getDebugSlotsEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setBonesToSetupPose +-- @param self + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setSlotsToSetupPose +-- @param self + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setSkin +-- @param self +-- @param #string skinName +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setToSetupPose +-- @param self + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setOpacityModifyRGB +-- @param self +-- @param #bool value + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] setDebugBonesEnabled +-- @param self +-- @param #bool enabled + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] getSkeleton +-- @param self +-- @return spSkeleton#spSkeleton ret (return value: spSkeleton) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] getDebugBonesEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] getTimeScale +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- @overload self, string, string, float +-- @overload self, string, spAtlas, float +-- @function [parent=#SkeletonRenderer] createWithFile +-- @param self +-- @param #string skeletonDataFile +-- @param #spAtlas atlas +-- @param #float scale +-- @return SkeletonRenderer#SkeletonRenderer ret (retunr value: sp.SkeletonRenderer) + +-------------------------------- +-- +-- @function [parent=#SkeletonRenderer] getBoundingBox +-- @param self +-- @return rect_table#rect_table ret (return value: rect_table) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 830d9c7f87..fcf72c61cf 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -1016,6 +1016,11 @@ -- @field [parent=#cc] ClippingNode#ClippingNode ClippingNode preloaded module +-------------------------------------------------------- +-- the cc ClippingRectangleNode +-- @field [parent=#cc] ClippingRectangleNode#ClippingRectangleNode ClippingRectangleNode preloaded module + + -------------------------------------------------------- -- the cc MotionStreak -- @field [parent=#cc] MotionStreak#MotionStreak MotionStreak preloaded module diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua index 99a0edbd12..f6189c9328 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua @@ -66,4 +66,24 @@ -- @field [parent=#cc] AssetsManager#AssetsManager AssetsManager preloaded module +-------------------------------------------------------- +-- the cc EventAssetsManagerEx +-- @field [parent=#cc] EventAssetsManagerEx#EventAssetsManagerEx EventAssetsManagerEx preloaded module + + +-------------------------------------------------------- +-- the cc Manifest +-- @field [parent=#cc] Manifest#Manifest Manifest preloaded module + + +-------------------------------------------------------- +-- the cc AssetsManagerEx +-- @field [parent=#cc] AssetsManagerEx#AssetsManagerEx AssetsManagerEx preloaded module + + +-------------------------------------------------------- +-- the cc EventListenerAssetsManagerEx +-- @field [parent=#cc] EventListenerAssetsManagerEx#EventListenerAssetsManagerEx EventListenerAssetsManagerEx preloaded module + + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua index a8bdf11a2a..c874e62c14 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua @@ -2,8 +2,8 @@ -- @module sp -------------------------------------------------------- --- the sp Skeleton --- @field [parent=#sp] Skeleton#Skeleton Skeleton preloaded module +-- the sp SkeletonRenderer +-- @field [parent=#sp] SkeletonRenderer#SkeletonRenderer SkeletonRenderer preloaded module -------------------------------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 43db45a304..9b06965efa 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1754,6 +1754,59 @@ int lua_cocos2dx_3d_Animate3D_getTransitionTime(lua_State* tolua_S) #endif return 0; } +int lua_cocos2dx_3d_Animate3D_createWithFrames(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 3) + { + cocos2d::Animation3D* arg0; + int arg1; + int arg2; + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Animate3D:createWithFrames"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Animate3D:createWithFrames"); + if(!ok) + return 0; + cocos2d::Animate3D* ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Animate3D",(cocos2d::Animate3D*)ret); + return 1; + } + if (argc == 4) + { + cocos2d::Animation3D* arg0; + int arg1; + int arg2; + double arg3; + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Animate3D:createWithFrames"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Animate3D:createWithFrames"); + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Animate3D:createWithFrames"); + if(!ok) + return 0; + cocos2d::Animate3D* ret = cocos2d::Animate3D::createWithFrames(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Animate3D",(cocos2d::Animate3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Animate3D:createWithFrames",argc, 3); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_createWithFrames'.",&tolua_err); +#endif + return 0; +} static int lua_cocos2dx_3d_Animate3D_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (Animate3D)"); @@ -1772,6 +1825,7 @@ int lua_register_cocos2dx_3d_Animate3D(lua_State* tolua_S) tolua_function(tolua_S,"getWeight",lua_cocos2dx_3d_Animate3D_getWeight); tolua_function(tolua_S,"create", lua_cocos2dx_3d_Animate3D_create); tolua_function(tolua_S,"getTransitionTime", lua_cocos2dx_3d_Animate3D_getTransitionTime); + tolua_function(tolua_S,"createWithFrames", lua_cocos2dx_3d_Animate3D_createWithFrames); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Animate3D).name(); g_luaType[typeName] = "cc.Animate3D"; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index 443f02e21d..2a79697214 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -58,6 +58,7 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); + #endif // __cocos2dx_3d_h__ diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 6444249b56..7f71237aab 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -45166,6 +45166,255 @@ int lua_register_cocos2dx_ClippingNode(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ClippingRectangleNode_isClippingEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const bool ret = cobj->isClippingEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:isClippingEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_isClippingEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_setClippingEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ClippingRectangleNode:setClippingEnabled"); + if(!ok) + return 0; + cobj->setClippingEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_getClippingRegion(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Rect& ret = cobj->getClippingRegion(); + rect_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:getClippingRegion",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_getClippingRegion'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_setClippingRegion(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ClippingRectangleNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ClippingRectangleNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Rect arg0; + + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:setClippingRegion"); + if(!ok) + return 0; + cobj->setClippingRegion(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ClippingRectangleNode:setClippingRegion",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_setClippingRegion'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ClippingRectangleNode_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.ClippingRectangleNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 0) + { + cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(); + object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + cocos2d::Rect arg0; + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.ClippingRectangleNode:create"); + if (!ok) { break; } + cocos2d::ClippingRectangleNode* ret = cocos2d::ClippingRectangleNode::create(arg0); + object_to_luaval(tolua_S, "cc.ClippingRectangleNode",(cocos2d::ClippingRectangleNode*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.ClippingRectangleNode:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ClippingRectangleNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ClippingRectangleNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ClippingRectangleNode)"); + return 0; +} + +int lua_register_cocos2dx_ClippingRectangleNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ClippingRectangleNode"); + tolua_cclass(tolua_S,"ClippingRectangleNode","cc.ClippingRectangleNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ClippingRectangleNode"); + tolua_function(tolua_S,"isClippingEnabled",lua_cocos2dx_ClippingRectangleNode_isClippingEnabled); + tolua_function(tolua_S,"setClippingEnabled",lua_cocos2dx_ClippingRectangleNode_setClippingEnabled); + tolua_function(tolua_S,"getClippingRegion",lua_cocos2dx_ClippingRectangleNode_getClippingRegion); + tolua_function(tolua_S,"setClippingRegion",lua_cocos2dx_ClippingRectangleNode_setClippingRegion); + tolua_function(tolua_S,"create", lua_cocos2dx_ClippingRectangleNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ClippingRectangleNode).name(); + g_luaType[typeName] = "cc.ClippingRectangleNode"; + g_typeCast["ClippingRectangleNode"] = "cc.ClippingRectangleNode"; + return 1; +} + int lua_cocos2dx_MotionStreak_reset(lua_State* tolua_S) { int argc = 0; @@ -60616,7 +60865,7 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S) tolua_beginmodule(tolua_S,"SpriteFrameCache"); tolua_function(tolua_S,"addSpriteFramesWithFileContent",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent); - tolua_function(tolua_S,"addSpriteFrames",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile); + tolua_function(tolua_S,"addSpriteFramesWithFile",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile); tolua_function(tolua_S,"addSpriteFrame",lua_cocos2dx_SpriteFrameCache_addSpriteFrame); tolua_function(tolua_S,"removeUnusedSpriteFrames",lua_cocos2dx_SpriteFrameCache_removeUnusedSpriteFrames); tolua_function(tolua_S,"getSpriteFrame",lua_cocos2dx_SpriteFrameCache_getSpriteFrameByName); @@ -66879,6 +67128,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Liquid(tolua_S); lua_register_cocos2dx_OrbitCamera(tolua_S); lua_register_cocos2dx_ParallaxNode(tolua_S); + lua_register_cocos2dx_ClippingRectangleNode(tolua_S); lua_register_cocos2dx_EventCustom(tolua_S); lua_register_cocos2dx_TransitionFade(tolua_S); lua_register_cocos2dx_Component(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 56cb3b93bd..b5d3b64f9d 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1600,6 +1600,12 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + + + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp index 1f1c29dacd..f140484a15 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp @@ -11570,6 +11570,1060 @@ int lua_register_cocos2dx_extension_AssetsManager(lua_State* tolua_S) g_typeCast["AssetsManager"] = "cc.AssetsManager"; return 1; } + +int lua_cocos2dx_extension_EventAssetsManagerEx_getAssetsManagerEx(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getAssetsManagerEx'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::extension::AssetsManagerEx* ret = cobj->getAssetsManagerEx(); + object_to_luaval(tolua_S, "cc.AssetsManagerEx",(cocos2d::extension::AssetsManagerEx*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getAssetsManagerEx",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getAssetsManagerEx'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getAssetId(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getAssetId'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getAssetId(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getAssetId",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getAssetId'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getCURLECode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getCURLECode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getCURLECode(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getCURLECode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getCURLECode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getMessage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getMessage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getMessage(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getMessage",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getMessage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getCURLMCode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getCURLMCode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getCURLMCode(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getCURLMCode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getCURLMCode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getPercentByFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getPercentByFile'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPercentByFile(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getPercentByFile",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getPercentByFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getEventCode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getEventCode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getEventCode(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getEventCode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getEventCode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_EventAssetsManagerEx_getPercent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::EventAssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.EventAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::EventAssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getPercent'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPercent(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventAssetsManagerEx:getPercent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EventAssetsManagerEx_getPercent'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_extension_EventAssetsManagerEx_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventAssetsManagerEx)"); + return 0; +} + +int lua_register_cocos2dx_extension_EventAssetsManagerEx(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventAssetsManagerEx"); + tolua_cclass(tolua_S,"EventAssetsManagerEx","cc.EventAssetsManagerEx","cc.EventCustom",nullptr); + + tolua_beginmodule(tolua_S,"EventAssetsManagerEx"); + tolua_function(tolua_S,"getAssetsManagerEx",lua_cocos2dx_extension_EventAssetsManagerEx_getAssetsManagerEx); + tolua_function(tolua_S,"getAssetId",lua_cocos2dx_extension_EventAssetsManagerEx_getAssetId); + tolua_function(tolua_S,"getCURLECode",lua_cocos2dx_extension_EventAssetsManagerEx_getCURLECode); + tolua_function(tolua_S,"getMessage",lua_cocos2dx_extension_EventAssetsManagerEx_getMessage); + tolua_function(tolua_S,"getCURLMCode",lua_cocos2dx_extension_EventAssetsManagerEx_getCURLMCode); + tolua_function(tolua_S,"getPercentByFile",lua_cocos2dx_extension_EventAssetsManagerEx_getPercentByFile); + tolua_function(tolua_S,"getEventCode",lua_cocos2dx_extension_EventAssetsManagerEx_getEventCode); + tolua_function(tolua_S,"getPercent",lua_cocos2dx_extension_EventAssetsManagerEx_getPercent); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::extension::EventAssetsManagerEx).name(); + g_luaType[typeName] = "cc.EventAssetsManagerEx"; + g_typeCast["EventAssetsManagerEx"] = "cc.EventAssetsManagerEx"; + return 1; +} + +int lua_cocos2dx_extension_Manifest_getManifestFileUrl(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_getManifestFileUrl'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const std::string& ret = cobj->getManifestFileUrl(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:getManifestFileUrl",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_getManifestFileUrl'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_Manifest_isVersionLoaded(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_isVersionLoaded'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isVersionLoaded(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:isVersionLoaded",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_isVersionLoaded'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_Manifest_isLoaded(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_isLoaded'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isLoaded(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:isLoaded",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_isLoaded'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_Manifest_getPackageUrl(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_getPackageUrl'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const std::string& ret = cobj->getPackageUrl(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:getPackageUrl",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_getPackageUrl'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_Manifest_getVersion(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_getVersion'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const std::string& ret = cobj->getVersion(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:getVersion",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_getVersion'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_Manifest_getVersionFileUrl(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::Manifest* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Manifest",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_getVersionFileUrl'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const std::string& ret = cobj->getVersionFileUrl(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:getVersionFileUrl",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_getVersionFileUrl'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_extension_Manifest_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Manifest)"); + return 0; +} + +int lua_register_cocos2dx_extension_Manifest(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Manifest"); + tolua_cclass(tolua_S,"Manifest","cc.Manifest","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Manifest"); + tolua_function(tolua_S,"getManifestFileUrl",lua_cocos2dx_extension_Manifest_getManifestFileUrl); + tolua_function(tolua_S,"isVersionLoaded",lua_cocos2dx_extension_Manifest_isVersionLoaded); + tolua_function(tolua_S,"isLoaded",lua_cocos2dx_extension_Manifest_isLoaded); + tolua_function(tolua_S,"getPackageUrl",lua_cocos2dx_extension_Manifest_getPackageUrl); + tolua_function(tolua_S,"getVersion",lua_cocos2dx_extension_Manifest_getVersion); + tolua_function(tolua_S,"getVersionFileUrl",lua_cocos2dx_extension_Manifest_getVersionFileUrl); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::extension::Manifest).name(); + g_luaType[typeName] = "cc.Manifest"; + g_typeCast["Manifest"] = "cc.Manifest"; + return 1; +} + +int lua_cocos2dx_extension_AssetsManagerEx_getState(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_getState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getState(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:getState",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_getState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_checkUpdate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_checkUpdate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->checkUpdate(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:checkUpdate",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_checkUpdate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_getStoragePath(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_getStoragePath'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const std::string& ret = cobj->getStoragePath(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:getStoragePath",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_getStoragePath'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_update(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_update'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->update(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:update",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_getLocalManifest(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_getLocalManifest'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::extension::Manifest* ret = cobj->getLocalManifest(); + object_to_luaval(tolua_S, "cc.Manifest",(cocos2d::extension::Manifest*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:getLocalManifest",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_getLocalManifest'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_getRemoteManifest(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_getRemoteManifest'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::extension::Manifest* ret = cobj->getRemoteManifest(); + object_to_luaval(tolua_S, "cc.Manifest",(cocos2d::extension::Manifest*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:getRemoteManifest",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_getRemoteManifest'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_downloadFailedAssets(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::extension::AssetsManagerEx* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::extension::AssetsManagerEx*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_AssetsManagerEx_downloadFailedAssets'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->downloadFailedAssets(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AssetsManagerEx:downloadFailedAssets",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_downloadFailedAssets'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_extension_AssetsManagerEx_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.AssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + std::string arg0; + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AssetsManagerEx:create"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.AssetsManagerEx:create"); + if(!ok) + return 0; + cocos2d::extension::AssetsManagerEx* ret = cocos2d::extension::AssetsManagerEx::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.AssetsManagerEx",(cocos2d::extension::AssetsManagerEx*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AssetsManagerEx:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_AssetsManagerEx_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_extension_AssetsManagerEx_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AssetsManagerEx)"); + return 0; +} + +int lua_register_cocos2dx_extension_AssetsManagerEx(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AssetsManagerEx"); + tolua_cclass(tolua_S,"AssetsManagerEx","cc.AssetsManagerEx","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"AssetsManagerEx"); + tolua_function(tolua_S,"getState",lua_cocos2dx_extension_AssetsManagerEx_getState); + tolua_function(tolua_S,"checkUpdate",lua_cocos2dx_extension_AssetsManagerEx_checkUpdate); + tolua_function(tolua_S,"getStoragePath",lua_cocos2dx_extension_AssetsManagerEx_getStoragePath); + tolua_function(tolua_S,"update",lua_cocos2dx_extension_AssetsManagerEx_update); + tolua_function(tolua_S,"getLocalManifest",lua_cocos2dx_extension_AssetsManagerEx_getLocalManifest); + tolua_function(tolua_S,"getRemoteManifest",lua_cocos2dx_extension_AssetsManagerEx_getRemoteManifest); + tolua_function(tolua_S,"downloadFailedAssets",lua_cocos2dx_extension_AssetsManagerEx_downloadFailedAssets); + tolua_function(tolua_S,"create", lua_cocos2dx_extension_AssetsManagerEx_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::extension::AssetsManagerEx).name(); + g_luaType[typeName] = "cc.AssetsManagerEx"; + g_typeCast["AssetsManagerEx"] = "cc.AssetsManagerEx"; + return 1; +} + +static int lua_cocos2dx_extension_EventListenerAssetsManagerEx_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventListenerAssetsManagerEx)"); + return 0; +} + +int lua_register_cocos2dx_extension_EventListenerAssetsManagerEx(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventListenerAssetsManagerEx"); + tolua_cclass(tolua_S,"EventListenerAssetsManagerEx","cc.EventListenerAssetsManagerEx","cc.EventListenerCustom",nullptr); + + tolua_beginmodule(tolua_S,"EventListenerAssetsManagerEx"); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::extension::EventListenerAssetsManagerEx).name(); + g_luaType[typeName] = "cc.EventListenerAssetsManagerEx"; + g_typeCast["EventListenerAssetsManagerEx"] = "cc.EventListenerAssetsManagerEx"; + return 1; +} TOLUA_API int register_all_cocos2dx_extension(lua_State* tolua_S) { tolua_open(tolua_S); @@ -11577,19 +12631,23 @@ TOLUA_API int register_all_cocos2dx_extension(lua_State* tolua_S) tolua_module(tolua_S,"cc",0); tolua_beginmodule(tolua_S,"cc"); + lua_register_cocos2dx_extension_AssetsManagerEx(tolua_S); lua_register_cocos2dx_extension_Control(tolua_S); + lua_register_cocos2dx_extension_ControlHuePicker(tolua_S); lua_register_cocos2dx_extension_TableViewCell(tolua_S); lua_register_cocos2dx_extension_ControlStepper(tolua_S); - lua_register_cocos2dx_extension_ControlSwitch(tolua_S); - lua_register_cocos2dx_extension_ScrollView(tolua_S); - lua_register_cocos2dx_extension_TableView(tolua_S); + lua_register_cocos2dx_extension_AssetsManager(tolua_S); + lua_register_cocos2dx_extension_ControlColourPicker(tolua_S); + lua_register_cocos2dx_extension_ControlButton(tolua_S); lua_register_cocos2dx_extension_ControlSlider(tolua_S); lua_register_cocos2dx_extension_ControlSaturationBrightnessPicker(tolua_S); - lua_register_cocos2dx_extension_ControlColourPicker(tolua_S); + lua_register_cocos2dx_extension_ScrollView(tolua_S); + lua_register_cocos2dx_extension_Manifest(tolua_S); lua_register_cocos2dx_extension_ControlPotentiometer(tolua_S); - lua_register_cocos2dx_extension_ControlButton(tolua_S); - lua_register_cocos2dx_extension_ControlHuePicker(tolua_S); - lua_register_cocos2dx_extension_AssetsManager(tolua_S); + lua_register_cocos2dx_extension_EventAssetsManagerEx(tolua_S); + lua_register_cocos2dx_extension_TableView(tolua_S); + lua_register_cocos2dx_extension_EventListenerAssetsManagerEx(tolua_S); + lua_register_cocos2dx_extension_ControlSwitch(tolua_S); tolua_endmodule(tolua_S); return 1; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp index 483cbe013a..fdeaeb9c57 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp @@ -244,6 +244,32 @@ int register_all_cocos2dx_extension(lua_State* tolua_S); + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp index 8d94bee826..59ee30b2c7 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp @@ -5,10 +5,10 @@ -int lua_cocos2dx_spine_Skeleton_setToSetupPose(lua_State* tolua_S) +int lua_cocos2dx_spine_SkeletonRenderer_setTimeScale(lua_State* tolua_S) { int argc = 0; - spine::Skeleton* cobj = nullptr; + spine::SkeletonRenderer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -17,58 +17,15 @@ int lua_cocos2dx_spine_Skeleton_setToSetupPose(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_setToSetupPose'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->setToSetupPose(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:setToSetupPose",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_setToSetupPose'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_spine_Skeleton_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - spine::Skeleton* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_setBlendFunc'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setTimeScale'", nullptr); return 0; } #endif @@ -76,29 +33,28 @@ int lua_cocos2dx_spine_Skeleton_setBlendFunc(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::BlendFunc arg0; + double arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; + ok &= luaval_to_number(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setTimeScale"); if(!ok) return 0; - cobj->setBlendFunc(arg0); + cobj->setTimeScale(arg0); return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:setBlendFunc",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setTimeScale",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_setBlendFunc'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setTimeScale'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_spine_Skeleton_onDraw(lua_State* tolua_S) +int lua_cocos2dx_spine_SkeletonRenderer_isOpacityModifyRGB(lua_State* tolua_S) { int argc = 0; - spine::Skeleton* cobj = nullptr; + spine::SkeletonRenderer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -107,64 +63,15 @@ int lua_cocos2dx_spine_Skeleton_onDraw(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_onDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Mat4 arg0; - unsigned int arg1; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "sp.Skeleton:onDraw"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "sp.Skeleton:onDraw"); - if(!ok) - return 0; - cobj->onDraw(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:onDraw",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_onDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_spine_Skeleton_setSlotsToSetupPose(lua_State* tolua_S) -{ - int argc = 0; - spine::Skeleton* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_setSlotsToSetupPose'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_isOpacityModifyRGB'", nullptr); return 0; } #endif @@ -174,114 +81,24 @@ int lua_cocos2dx_spine_Skeleton_setSlotsToSetupPose(lua_State* tolua_S) { if(!ok) return 0; - cobj->setSlotsToSetupPose(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:setSlotsToSetupPose",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_setSlotsToSetupPose'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_spine_Skeleton_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - spine::Skeleton* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_spine_Skeleton_setSkin(lua_State* tolua_S) -{ - int argc = 0; - spine::Skeleton* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_setSkin'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "sp.Skeleton:setSkin"); arg0 = arg0_tmp.c_str(); - if(!ok) - return 0; - bool ret = cobj->setSkin(arg0); + bool ret = cobj->isOpacityModifyRGB(); tolua_pushboolean(tolua_S,(bool)ret); return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:setSkin",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:isOpacityModifyRGB",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_setSkin'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_isOpacityModifyRGB'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_spine_Skeleton_setBonesToSetupPose(lua_State* tolua_S) +int lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled(lua_State* tolua_S) { int argc = 0; - spine::Skeleton* cobj = nullptr; + spine::SkeletonRenderer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -290,15 +107,105 @@ int lua_cocos2dx_spine_Skeleton_setBonesToSetupPose(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_setBonesToSetupPose'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setDebugSlotsEnabled"); + if(!ok) + return 0; + cobj->setDebugSlotsEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setDebugSlotsEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_getDebugSlotsEnabled(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_getDebugSlotsEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->getDebugSlotsEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:getDebugSlotsEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_getDebugSlotsEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose'", nullptr); return 0; } #endif @@ -311,42 +218,866 @@ int lua_cocos2dx_spine_Skeleton_setBonesToSetupPose(lua_State* tolua_S) cobj->setBonesToSetupPose(); return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:setBonesToSetupPose",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setBonesToSetupPose",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_setBonesToSetupPose'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_spine_Skeleton_finalize(lua_State* tolua_S) +int lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (Skeleton)"); + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setSlotsToSetupPose(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setSlotsToSetupPose",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_setSkin(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setSkin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setSkin"); + if(!ok) + return 0; + bool ret = cobj->setSkin(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setSkin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setSkin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setToSetupPose(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setToSetupPose",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_setOpacityModifyRGB(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setOpacityModifyRGB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setOpacityModifyRGB"); + if(!ok) + return 0; + cobj->setOpacityModifyRGB(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setOpacityModifyRGB",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setOpacityModifyRGB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setDebugBonesEnabled"); + if(!ok) + return 0; + cobj->setDebugBonesEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:setDebugBonesEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_getSkeleton(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_getSkeleton'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + spSkeleton* ret = cobj->getSkeleton(); + #pragma warning NO CONVERSION FROM NATIVE FOR spSkeleton*; + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:getSkeleton",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_getSkeleton'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->getDebugBonesEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:getDebugBonesEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_getTimeScale(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_getTimeScale'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getTimeScale(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:getTimeScale",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_getTimeScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonRenderer_createWithFile(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonRenderer",(spine::SkeletonRenderer*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonRenderer",(spine::SkeletonRenderer*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonRenderer",(spine::SkeletonRenderer*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:createWithFile"); + if (!ok) { break; } + spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonRenderer",(spine::SkeletonRenderer*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "sp.SkeletonRenderer:createWithFile",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_createWithFile'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_spine_SkeletonRenderer_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (SkeletonRenderer)"); return 0; } -int lua_register_cocos2dx_spine_Skeleton(lua_State* tolua_S) +int lua_register_cocos2dx_spine_SkeletonRenderer(lua_State* tolua_S) { - tolua_usertype(tolua_S,"sp.Skeleton"); - tolua_cclass(tolua_S,"Skeleton","sp.Skeleton","cc.Node",nullptr); + tolua_usertype(tolua_S,"sp.SkeletonRenderer"); + tolua_cclass(tolua_S,"SkeletonRenderer","sp.SkeletonRenderer","cc.Node",nullptr); - tolua_beginmodule(tolua_S,"Skeleton"); - tolua_function(tolua_S,"setToSetupPose",lua_cocos2dx_spine_Skeleton_setToSetupPose); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_spine_Skeleton_setBlendFunc); - tolua_function(tolua_S,"onDraw",lua_cocos2dx_spine_Skeleton_onDraw); - tolua_function(tolua_S,"setSlotsToSetupPose",lua_cocos2dx_spine_Skeleton_setSlotsToSetupPose); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_spine_Skeleton_getBlendFunc); - tolua_function(tolua_S,"setSkin",lua_cocos2dx_spine_Skeleton_setSkin); - tolua_function(tolua_S,"setBonesToSetupPose",lua_cocos2dx_spine_Skeleton_setBonesToSetupPose); + tolua_beginmodule(tolua_S,"SkeletonRenderer"); + tolua_function(tolua_S,"setTimeScale",lua_cocos2dx_spine_SkeletonRenderer_setTimeScale); + tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_spine_SkeletonRenderer_isOpacityModifyRGB); + tolua_function(tolua_S,"setDebugSlotsEnabled",lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled); + tolua_function(tolua_S,"getDebugSlotsEnabled",lua_cocos2dx_spine_SkeletonRenderer_getDebugSlotsEnabled); + tolua_function(tolua_S,"setBonesToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose); + tolua_function(tolua_S,"setSlotsToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose); + tolua_function(tolua_S,"setSkin",lua_cocos2dx_spine_SkeletonRenderer_setSkin); + tolua_function(tolua_S,"setToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose); + tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_spine_SkeletonRenderer_setOpacityModifyRGB); + tolua_function(tolua_S,"setDebugBonesEnabled",lua_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled); + tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_spine_SkeletonRenderer_getSkeleton); + tolua_function(tolua_S,"getDebugBonesEnabled",lua_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled); + tolua_function(tolua_S,"getTimeScale",lua_cocos2dx_spine_SkeletonRenderer_getTimeScale); + tolua_function(tolua_S,"createWithFile", lua_cocos2dx_spine_SkeletonRenderer_createWithFile); tolua_endmodule(tolua_S); - std::string typeName = typeid(spine::Skeleton).name(); - g_luaType[typeName] = "sp.Skeleton"; - g_typeCast["Skeleton"] = "sp.Skeleton"; + std::string typeName = typeid(spine::SkeletonRenderer).name(); + g_luaType[typeName] = "sp.SkeletonRenderer"; + g_typeCast["SkeletonRenderer"] = "sp.SkeletonRenderer"; return 1; } +int lua_cocos2dx_spine_SkeletonAnimation_setStartListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setStartListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setStartListener(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setStartListener",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setStartListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackEventListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + spTrackEntry* arg0; + std::function arg1; + + #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* + ok = false; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setTrackEventListener(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setTrackEventListener",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackEventListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + spTrackEntry* arg0; + std::function arg1; + + #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* + ok = false; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setTrackCompleteListener(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setTrackCompleteListener",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackStartListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + spTrackEntry* arg0; + std::function arg1; + + #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* + ok = false; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setTrackStartListener(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setTrackStartListener",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackStartListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setCompleteListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setCompleteListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setCompleteListener(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setCompleteListener",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setCompleteListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackEndListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + spTrackEntry* arg0; + std::function arg1; + + #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* + ok = false; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setTrackEndListener(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setTrackEndListener",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setTrackEndListener'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_spine_SkeletonAnimation_setEventListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setEventListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setEventListener(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setEventListener",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setEventListener'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_spine_SkeletonAnimation_setMix(lua_State* tolua_S) { int argc = 0; @@ -375,13 +1106,13 @@ int lua_cocos2dx_spine_SkeletonAnimation_setMix(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 3) { - const char* arg0; - const char* arg1; + std::string arg0; + std::string arg1; double arg2; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "sp.SkeletonAnimation:setMix"); arg0 = arg0_tmp.c_str(); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:setMix"); - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "sp.SkeletonAnimation:setMix"); arg1 = arg1_tmp.c_str(); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:setMix"); ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonAnimation:setMix"); if(!ok) @@ -399,6 +1130,56 @@ int lua_cocos2dx_spine_SkeletonAnimation_setMix(lua_State* tolua_S) return 0; } +int lua_cocos2dx_spine_SkeletonAnimation_setEndListener(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonAnimation* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setEndListener'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setEndListener(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:setEndListener",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setEndListener'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_spine_SkeletonAnimation_clearTracks(lua_State* tolua_S) { int argc = 0; @@ -504,10 +1285,18 @@ static int lua_cocos2dx_spine_SkeletonAnimation_finalize(lua_State* tolua_S) int lua_register_cocos2dx_spine_SkeletonAnimation(lua_State* tolua_S) { tolua_usertype(tolua_S,"sp.SkeletonAnimation"); - tolua_cclass(tolua_S,"SkeletonAnimation","sp.SkeletonAnimation","sp.Skeleton",nullptr); + tolua_cclass(tolua_S,"SkeletonAnimation","sp.SkeletonAnimation","sp.SkeletonRenderer",nullptr); tolua_beginmodule(tolua_S,"SkeletonAnimation"); + tolua_function(tolua_S,"setStartListener",lua_cocos2dx_spine_SkeletonAnimation_setStartListener); + tolua_function(tolua_S,"setTrackEventListener",lua_cocos2dx_spine_SkeletonAnimation_setTrackEventListener); + tolua_function(tolua_S,"setTrackCompleteListener",lua_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener); + tolua_function(tolua_S,"setTrackStartListener",lua_cocos2dx_spine_SkeletonAnimation_setTrackStartListener); + tolua_function(tolua_S,"setCompleteListener",lua_cocos2dx_spine_SkeletonAnimation_setCompleteListener); + tolua_function(tolua_S,"setTrackEndListener",lua_cocos2dx_spine_SkeletonAnimation_setTrackEndListener); + tolua_function(tolua_S,"setEventListener",lua_cocos2dx_spine_SkeletonAnimation_setEventListener); tolua_function(tolua_S,"setMix",lua_cocos2dx_spine_SkeletonAnimation_setMix); + tolua_function(tolua_S,"setEndListener",lua_cocos2dx_spine_SkeletonAnimation_setEndListener); tolua_function(tolua_S,"clearTracks",lua_cocos2dx_spine_SkeletonAnimation_clearTracks); tolua_function(tolua_S,"clearTrack",lua_cocos2dx_spine_SkeletonAnimation_clearTrack); tolua_endmodule(tolua_S); @@ -523,7 +1312,7 @@ TOLUA_API int register_all_cocos2dx_spine(lua_State* tolua_S) tolua_module(tolua_S,"sp",0); tolua_beginmodule(tolua_S,"sp"); - lua_register_cocos2dx_spine_Skeleton(tolua_S); + lua_register_cocos2dx_spine_SkeletonRenderer(tolua_S); lua_register_cocos2dx_spine_SkeletonAnimation(tolua_S); tolua_endmodule(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp index aedd24b3f5..5a23db13eb 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp @@ -18,6 +18,21 @@ int register_all_cocos2dx_spine(lua_State* tolua_S); + + + + + + + + + + + + + + + diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h index 27c1473adb..331fd298ac 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h +++ b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h @@ -170,6 +170,11 @@ public: EVENT_CONTROLLER_KEYREPEAT, EVENT_CONTROLLER_AXIS, + EVENT_SPINE_ANIMATION_START, + EVENT_SPINE_ANIMATION_END, + EVENT_SPINE_ANIMATION_COMPLETE, + EVENT_SPINE_ANIMATION_EVENT, + EVENT_CUSTOM_BEGAN = 10000, EVENT_CUSTOM_ENDED = 11000, }; diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp index 48b13a2760..42aa895c33 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp @@ -32,6 +32,8 @@ #include #endif #include "ui/UIWidget.h" +#include "ActionTimeline/CCActionTimeline.h" +#include "ActionTimeline/CSLoader.h" static int tolua_cocos2d_MenuItemImage_create(lua_State* tolua_S) { @@ -7086,6 +7088,51 @@ static void extendCamera(lua_State* tolua_S) lua_pop(tolua_S, 1); } +int lua_cocos2dx_CSLoader_createTimeline(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.CSLoader",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.CSLoader:createTimeline"); + if(!ok) + return 0; + cocostudio::timeline::ActionTimeline* ret = cocos2d::CSLoader::createTimeline(arg0); + object_to_luaval(tolua_S, "ccs.ActionTimeline",(cocostudio::timeline::ActionTimeline*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.CSLoader:createTimeline",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CSLoader_createTimeline'.",&tolua_err); +#endif + return 0; +} + +static void extendCSLoader(lua_State* tolua_S) +{ + lua_pushstring(tolua_S, "cc.CSLoader"); + lua_rawget(tolua_S, LUA_REGISTRYINDEX); + if (lua_istable(tolua_S,-1)) + { + tolua_function(tolua_S, "createTimeline", lua_cocos2dx_CSLoader_createTimeline); + } + lua_pop(tolua_S, 1); +} + int register_all_cocos2dx_manual(lua_State* tolua_S) { if (NULL == tolua_S) @@ -7142,7 +7189,7 @@ int register_all_cocos2dx_manual(lua_State* tolua_S) extendTextureCache(tolua_S); extendGLView(tolua_S); extendCamera(tolua_S); - + extendCSLoader(tolua_S); return 0; } diff --git a/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp b/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp index fa0bcb1832..bb8d05a1b9 100644 --- a/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp +++ b/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp @@ -1,7 +1,5 @@ #include "CustomGUIReader.h" #include "CCLuaEngine.h" -#include "base/ObjectFactory.h" -#include "json/document.h" #include "json/writer.h" #include "json/stringbuffer.h" diff --git a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp index 5ae4cf3c9a..ad1d6af94c 100644 --- a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp @@ -939,12 +939,81 @@ static void extendTableView(lua_State* L) lua_pop(L, 1); } +static void extendManifest(lua_State* L) +{ + lua_pushstring(L, "cc.Manifest"); + lua_rawget(L, LUA_REGISTRYINDEX); + lua_pop(L, 1); +} + +static int lua_cocos2dx_Extension_EventListenerAssetsManagerEx_create(lua_State* L) +{ + if (nullptr == L) + return 0; + + int argc = 0; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; + if (!tolua_isusertable(L,1,"cc.EventListenerAssetsManagerEx",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L)-1; + + if (argc == 2) + { + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(L, 2, "cc.AssetsManagerEx", 0, &tolua_err) || + !toluafix_isfunction(L,3,"LUA_FUNCTION",0,&tolua_err)) + goto tolua_lerror; +#endif + cocos2d::extension::AssetsManagerEx* assetManager = static_cast(tolua_tousertype(L,2,nullptr)); + + LUA_FUNCTION handler = toluafix_ref_function(L,3,0); + + cocos2d::extension::EventListenerAssetsManagerEx* ret = cocos2d::extension::EventListenerAssetsManagerEx::create(assetManager, [=](EventAssetsManagerEx* event){ + int id = event? (int)event->_ID : -1; + int* luaID = event? &event->_luaID : nullptr; + toluafix_pushusertype_ccobject(L, id, luaID, (void*)event,"cc.EventAssetsManagerEx"); + LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1); + }); + + int id = (ret) ? (int)ret->_ID : -1; + int* luaID = (ret) ? &ret->_luaID : nullptr; + toluafix_pushusertype_ccobject(L, id, luaID, (void*)ret,"cc.EventListenerAssetsManagerEx"); + return 1; + } + + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "create",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_Extension_EventListenerAssetsManagerEx_create'.",&tolua_err); + return 0; +#endif +} + +static void extendEventListenerAssetsManagerEx(lua_State* L) +{ + lua_pushstring(L, "cc.EventListenerAssetsManagerEx"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "create", lua_cocos2dx_Extension_EventListenerAssetsManagerEx_create); + } + lua_pop(L, 1); +} + int register_all_cocos2dx_extension_manual(lua_State* tolua_S) { extendControl(tolua_S); extendAssetsManager(tolua_S); extendScrollView(tolua_S); extendTableView(tolua_S); + extendManifest(tolua_S); + extendEventListenerAssetsManagerEx(tolua_S); return 0; } diff --git a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h index 44a9a86cd2..fc88b2626f 100644 --- a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h +++ b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.h @@ -38,12 +38,13 @@ TOLUA_API int register_extension_module(lua_State* tolua_S); struct LuaAssetsManagerEventData { int value; - + LuaAssetsManagerEventData(int _value = 0):value(_value) { } }; + struct LuaTableViewEventData { void* value; diff --git a/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp b/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp index 5620f3f892..6b397aec8c 100644 --- a/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp +++ b/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp @@ -32,73 +32,10 @@ using namespace spine; USING_NS_CC; -static int SendSpineEventToLua(int nHandler, spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount) -{ - if (nHandler <= 0) { - return 0; - } - - if (NULL == ScriptEngineManager::getInstance()->getScriptEngine()) { - return 0; - } - - LuaStack *pStack = LuaEngine::getInstance()->getLuaStack(); - if (NULL == pStack) { - return 0; - } - - lua_State *tolua_s = pStack->getLuaState(); - if (NULL == tolua_s) { - return 0; - } - - int nRet = 0; - - spTrackEntry* entry = spAnimationState_getCurrent(node->state, trackIndex); - std::string animationName = (entry && entry->animation) ? entry->animation->name : ""; - std::string eventType = ""; - - switch (type) { - case ANIMATION_START: - eventType = "start"; - break; - case ANIMATION_END: - eventType = "end"; - break; - case ANIMATION_COMPLETE: - eventType = "complete"; - break; - case ANIMATION_EVENT: - eventType = "event"; - break; - } - - LuaValueDict spineEvent; - spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("type", LuaValue::stringValue(eventType))); - spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("trackIndex", LuaValue::intValue(trackIndex))); - spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("animation", LuaValue::stringValue(animationName))); - spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("loopCount", LuaValue::intValue(loopCount))); - - if (NULL != event) { - LuaValueDict eventData; - eventData.insert(eventData.end(), LuaValueDict::value_type("name", LuaValue::stringValue(event->data->name))); - eventData.insert(eventData.end(), LuaValueDict::value_type("intValue", LuaValue::intValue(event->intValue))); - eventData.insert(eventData.end(), LuaValueDict::value_type("floatValue", LuaValue::floatValue(event->floatValue))); - eventData.insert(eventData.end(), LuaValueDict::value_type("stringValue", LuaValue::stringValue(event->stringValue))); - spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("eventData", LuaValue::dictValue(eventData))); - } - - pStack->pushLuaValueDict(spineEvent); - nRet = pStack->executeFunctionByHandler(nHandler, 1); - pStack->clean(); - return nRet; - -} - LuaSkeletonAnimation::LuaSkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale) : spine::SkeletonAnimation(skeletonDataFile, atlasFile, scale) { - this->setAnimationListener(this, animationStateEvent_selector(LuaSkeletonAnimation::animationStateEvent)); + } @@ -113,11 +50,3 @@ LuaSkeletonAnimation* LuaSkeletonAnimation::createWithFile (const char* skeleton node->autorelease(); return node; } - -void LuaSkeletonAnimation::animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount) -{ - int nHandler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this, ScriptHandlerMgr::HandlerType::EVENT_SPINE); - if (0 != nHandler) { - SendSpineEventToLua(nHandler, node, trackIndex, type, event, loopCount); - } -} diff --git a/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.h b/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.h index 7872ad7cbb..a498d716db 100644 --- a/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.h +++ b/cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.h @@ -28,9 +28,6 @@ #include "spine-cocos2dx.h" class LuaSkeletonAnimation: public spine::SkeletonAnimation { -private: - void animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); - public: static LuaSkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 1); diff --git a/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp b/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp index 3c504fd3d6..a0bf47faec 100644 --- a/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/spine/lua_cocos2dx_spine_manual.cpp @@ -142,6 +142,72 @@ tolua_lerror: return 0; } +int executeSpineEvent(LuaSkeletonAnimation* skeletonAnimation, int handler, spEventType eventType, int trackIndex , int loopCount = 0, spEvent* event = nullptr ) +{ + if (nullptr == skeletonAnimation || 0 == handler) + return 0; + + LuaStack* stack = LuaEngine::getInstance()->getLuaStack(); + if (nullptr == stack) + return 0; + + lua_State* L = LuaEngine::getInstance()->getLuaStack()->getLuaState(); + if (nullptr == L) + return 0; + + int ret = 0; + + spTrackEntry* entry = spAnimationState_getCurrent(skeletonAnimation->getState(), trackIndex); + std::string animationName = (entry && entry->animation) ? entry->animation->name : ""; + std::string eventTypeName = ""; + + switch (eventType) { + case spEventType::SP_ANIMATION_START: + { + eventTypeName = "start"; + } + break; + case spEventType::SP_ANIMATION_END: + { + eventTypeName = "end"; + } + break; + case spEventType::SP_ANIMATION_COMPLETE: + { + eventTypeName = "complete"; + } + break; + case spEventType::SP_ANIMATION_EVENT: + { + eventTypeName = "event"; + } + break; + + default: + break; + } + + LuaValueDict spineEvent; + spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("type", LuaValue::stringValue(eventTypeName))); + spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("trackIndex", LuaValue::intValue(trackIndex))); + spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("animation", LuaValue::stringValue(animationName))); + spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("loopCount", LuaValue::intValue(loopCount))); + + if (nullptr != event) + { + LuaValueDict eventData; + eventData.insert(eventData.end(), LuaValueDict::value_type("name", LuaValue::stringValue(event->data->name))); + eventData.insert(eventData.end(), LuaValueDict::value_type("intValue", LuaValue::intValue(event->intValue))); + eventData.insert(eventData.end(), LuaValueDict::value_type("floatValue", LuaValue::floatValue(event->floatValue))); + eventData.insert(eventData.end(), LuaValueDict::value_type("stringValue", LuaValue::stringValue(event->stringValue))); + spineEvent.insert(spineEvent.end(), LuaValueDict::value_type("eventData", LuaValue::dictValue(eventData))); + } + + stack->pushLuaValueDict(spineEvent); + ret = stack->executeFunctionByHandler(handler, 1); + return ret; +} + int tolua_Cocos2d_CCSkeletonAnimation_registerSpineEventHandler00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE @@ -149,7 +215,8 @@ int tolua_Cocos2d_CCSkeletonAnimation_registerSpineEventHandler00(lua_State* tol if ( !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || !toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) + !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else @@ -158,7 +225,44 @@ int tolua_Cocos2d_CCSkeletonAnimation_registerSpineEventHandler00(lua_State* tol LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); if (NULL != self ) { int handler = ( toluafix_ref_function(tolua_S,2,0)); - ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, ScriptHandlerMgr::HandlerType::EVENT_SPINE); + spEventType eventType = static_cast((int)tolua_tonumber(tolua_S, 3, 0)); + + switch (eventType) { + case spEventType::SP_ANIMATION_START: + { + self->setStartListener([=](int trackIndex){ + executeSpineEvent(self, handler, eventType, trackIndex); + }); + ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_START); + } + break; + case spEventType::SP_ANIMATION_END: + { + self->setEndListener([=](int trackIndex){ + executeSpineEvent(self, handler, eventType, trackIndex); + }); + ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_END); + } + break; + case spEventType::SP_ANIMATION_COMPLETE: + { + self->setCompleteListener([=](int trackIndex, int loopCount){ + executeSpineEvent(self, handler, eventType, trackIndex, loopCount); + }); + ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_COMPLETE); + } + break; + case spEventType::SP_ANIMATION_EVENT: + { + self->setEventListener([=](int trackIndex, spEvent* event){ + executeSpineEvent(self, handler, eventType, trackIndex, 0, event); + }); + ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_EVENT); + } + break; + default: + break; + } } } return 0; @@ -175,7 +279,8 @@ int tolua_Cocos2d_CCSkeletonAnimation_unregisterSpineEventHandler00(lua_State* t tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || - !tolua_isnoobj(tolua_S,2,&tolua_err) + !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else @@ -183,7 +288,26 @@ int tolua_Cocos2d_CCSkeletonAnimation_unregisterSpineEventHandler00(lua_State* t { LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); if (NULL != self ) { - ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)self, ScriptHandlerMgr::HandlerType::EVENT_SPINE); + spEventType eventType = static_cast((int)tolua_tonumber(tolua_S, 2, 0)); + ScriptHandlerMgr::HandlerType handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_START; + switch (eventType) { + case spEventType::SP_ANIMATION_START: + handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_START; + break; + case spEventType::SP_ANIMATION_END: + handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_END; + break; + case spEventType::SP_ANIMATION_COMPLETE: + handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_COMPLETE; + break; + case spEventType::SP_ANIMATION_EVENT: + handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_EVENT; + break; + + default: + break; + } + ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)self, handlerType); } } return 0; @@ -194,115 +318,6 @@ tolua_lerror: #endif } -static int tolua_Cocos2d_CCSkeletonAnimation_setTimeScale00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); - if (NULL != self ) { - LUA_NUMBER scale = tolua_tonumber(tolua_S, 2, 1); - self->timeScale = scale; - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setTimeScale'.",&tolua_err); - return 0; -#endif -} - -static int tolua_Cocos2d_CCSkeletonAnimation_setDebugSlots00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); - if (NULL != self ) { - bool debugSlots = tolua_toboolean(tolua_S, 2, 1); - self->debugSlots = debugSlots; - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setDebugSlots'.",&tolua_err); - return 0; -#endif -} - -static int tolua_Cocos2d_CCSkeletonAnimation_setDebugBones00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); - if (NULL != self ) { - bool debugBones = tolua_toboolean(tolua_S, 2, 1); - self->debugBones = debugBones; - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setDebugBones'.",&tolua_err); - return 0; -#endif -} - -static int tolua_Cocos2d_CCSkeletonAnimation_setPremultipliedAlpha00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err) || - !tolua_isboolean(tolua_S,2,0,&tolua_err) || - !tolua_isnoobj(tolua_S,3,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - LuaSkeletonAnimation* self = (LuaSkeletonAnimation*) tolua_tousertype(tolua_S,1,0); - if (NULL != self ) { - bool premultipliedAlpha = tolua_toboolean(tolua_S, 2, 1); - self->premultipliedAlpha = premultipliedAlpha; - } - } - return 0; -#ifndef TOLUA_RELEASE -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'setPremultipliedAlpha'.",&tolua_err); - return 0; -#endif -} - - static int tolua_spine_SkeletoneAnimation_setBlendFunc(lua_State* tolua_S) { return tolua_cocos2dx_setBlendFunc(tolua_S,"sp.SkeletonAnimation"); @@ -448,14 +463,15 @@ static void extendCCSkeletonAnimation(lua_State* L) tolua_function(L, "registerSpineEventHandler", tolua_Cocos2d_CCSkeletonAnimation_registerSpineEventHandler00); tolua_function(L, "unregisterSpineEventHandler", tolua_Cocos2d_CCSkeletonAnimation_unregisterSpineEventHandler00); tolua_function(L, "setBlendFunc", tolua_spine_SkeletoneAnimation_setBlendFunc); - tolua_function(L, "setTimeScale", tolua_Cocos2d_CCSkeletonAnimation_setTimeScale00); - tolua_function(L, "setDebugSlots", tolua_Cocos2d_CCSkeletonAnimation_setDebugSlots00); - tolua_function(L, "setDebugBones", tolua_Cocos2d_CCSkeletonAnimation_setDebugBones00); - tolua_function(L, "setPremultipliedAlpha", tolua_Cocos2d_CCSkeletonAnimation_setPremultipliedAlpha00); tolua_function(L, "addAnimation", lua_cocos2dx_spine_SkeletonAnimation_addAnimation); tolua_function(L, "setAnimation", lua_cocos2dx_spine_SkeletonAnimation_setAnimation); } lua_pop(L, 1); + + /*Because sp.SkeletonAnimation:create creat a LuaSkeletonAnimation object,so we need use LuaSkeletonAnimation typename for g_luaType*/ + std::string typeName = typeid(LuaSkeletonAnimation).name(); + g_luaType[typeName] = "sp.SkeletonAnimation"; + g_typeCast["SkeletonAnimation"] = "sp.SkeletonAnimation"; } int register_all_cocos2dx_spine_manual(lua_State* L) diff --git a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua index 469f58aec2..ea41e6f5c4 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua @@ -273,6 +273,10 @@ cc.Handler.EVENT_CONTROLLER_KEYDOWN = 60 cc.Handler.EVENT_CONTROLLER_KEYUP = 61 cc.Handler.EVENT_CONTROLLER_KEYREPEAT = 62 cc.Handler.EVENT_CONTROLLER_AXIS = 63 +cc.Handler.EVENT_SPINE_ANIMATION_START = 64 +cc.Handler.EVENT_SPINE_ANIMATION_END = 65 +cc.Handler.EVENT_SPINE_ANIMATION_COMPLETE = 66 +cc.Handler.EVENT_SPINE_ANIMATION_EVENT = 67 cc.EVENT_UNKNOWN = 0 @@ -477,7 +481,6 @@ cc.KeyCodeKey = cc.KeyCode = { - } for k,v in ipairs(cc.KeyCodeKey) do @@ -486,6 +489,28 @@ end cc.KeyCode.KEY_BACK = cc.KeyCode.KEY_ESCAPE +cc.EventAssetsManagerEx = +{ + EventCode = + { + ERROR_NO_LOCAL_MANIFEST = 0, + ERROR_DOWNLOAD_MANIFEST = 1, + ERROR_PARSE_MANIFEST = 2, + NEW_VERSION_FOUND = 3, + ALREADY_UP_TO_DATE = 4, + UPDATE_PROGRESSION = 5, + ASSET_UPDATED = 6, + ERROR_UPDATING = 7, + UPDATE_FINISHED = 8, + }, +} + +cc.AssetsManagerExStatic = +{ + VERSION_ID = "@version", + MANIFEST_ID = "@manifest", +} + cc.EventCode = { BEGAN = 0, diff --git a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua index 18e3fa684f..2c83429b4b 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua @@ -10,7 +10,7 @@ function CCDirectorDeprecated.sharedDirector() deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance") return cc.Director:getInstance() end -rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector) +CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector --functions of CCDirector will be deprecated,end @@ -20,19 +20,19 @@ function TextureCacheDeprecated.getInstance(self) deprecatedTip("cc.TextureCache:getInstance","cc.Director:getInstance():getTextureCache") return cc.Director:getInstance():getTextureCache() end -rawset(cc.TextureCache,"getInstance",TextureCacheDeprecated.getInstance) +cc.TextureCache.getInstance = TextureCacheDeprecated.getInstance function TextureCacheDeprecated.destroyInstance(self) deprecatedTip("cc.TextureCache:destroyInstance","cc.Director:getInstance():destroyTextureCache") return cc.Director:getInstance():destroyTextureCache() end -rawset(cc.TextureCache,"destroyInstance",TextureCacheDeprecated.destroyInstance) +cc.TextureCache.destroyInstance = TextureCacheDeprecated.destroyInstance function TextureCacheDeprecated.dumpCachedTextureInfo(self) deprecatedTip("self:dumpCachedTextureInfo","self:getCachedTextureInfo") return print(self:getCachedTextureInfo()) end -rawset(cc.TextureCache,"dumpCachedTextureInfo",TextureCacheDeprecated.dumpCachedTextureInfo) +cc.TextureCache.dumpCachedTextureInfo = TextureCacheDeprecated.dumpCachedTextureInfo local CCTextureCacheDeprecated = { } function CCTextureCacheDeprecated.sharedTextureCache() @@ -51,7 +51,7 @@ function CCTextureCacheDeprecated.addUIImage(self, image, key) deprecatedTip("CCTextureCache:addUIImage","CCTextureCache:addImage") return self:addImage(image,key) end -rawset(CCTextureCache,"addUIImage",CCTextureCacheDeprecated.addUIImage) +CCTextureCache.addUIImage = CCTextureCacheDeprecated.addUIImage --functions of CCTextureCache will be deprecated end --functions of CCAnimation will be deprecated begin @@ -60,7 +60,7 @@ function CCAnimationDeprecated.addSpriteFrameWithFileName(self,...) deprecatedTip("CCAnimationDeprecated:addSpriteFrameWithFileName","cc.Animation:addSpriteFrameWithFile") return self:addSpriteFrameWithFile(...) end -rawset(CCAnimation,"addSpriteFrameWithFileName",CCAnimationDeprecated.addSpriteFrameWithFileName) +CCAnimation.addSpriteFrameWithFileName = CCAnimationDeprecated.addSpriteFrameWithFileName --functions of CCAnimation will be deprecated end @@ -70,31 +70,31 @@ function CCAnimationCacheDeprecated.sharedAnimationCache() deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance") return CCAnimationCache:getInstance() end -rawset(CCAnimationCache,"sharedAnimationCache",CCAnimationCacheDeprecated.sharedAnimationCache) +CCAnimationCache.sharedAnimationCache = CCAnimationCacheDeprecated.sharedAnimationCache function CCAnimationCacheDeprecated.purgeSharedAnimationCache() deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance") return CCAnimationCache:destroyInstance() end -rawset(CCAnimationCache,"purgeSharedAnimationCache",CCAnimationCacheDeprecated.purgeSharedAnimationCache) +CCAnimationCache.purgeSharedAnimationCache = CCAnimationCacheDeprecated.purgeSharedAnimationCache function CCAnimationCacheDeprecated.addAnimationsWithFile(self,...) deprecatedTip("CCAnimationCache:addAnimationsWithFile","cc.AnimationCache:addAnimations") return self:addAnimations(...) end -rawset(CCAnimationCache,"addAnimationsWithFile",CCAnimationCacheDeprecated.addAnimationsWithFile) +CCAnimationCache.addAnimationsWithFile = CCAnimationCacheDeprecated.addAnimationsWithFile function CCAnimationCacheDeprecated.animationByName(self,...) deprecatedTip("CCAnimationCache:animationByName","cc.AnimationCache:getAnimation") return self:getAnimation(...) end -rawset(CCAnimationCache,"animationByName",CCAnimationCacheDeprecated.animationByName) +CCAnimationCache.animationByName = CCAnimationCacheDeprecated.animationByName function CCAnimationCacheDeprecated.removeAnimationByName(self) deprecatedTip("CCAnimationCache:removeAnimationByName","cc.AnimationCache:removeAnimation") return self:removeAnimation() end -rawset(CCAnimationCache,"removeAnimationByName",CCAnimationCacheDeprecated.removeAnimationByName) +CCAnimationCache.removeAnimationByName = CCAnimationCacheDeprecated.removeAnimationByName --functions of CCAnimationCache will be deprecated end --functions of CCFileUtils will be deprecated end @@ -103,13 +103,13 @@ function CCFileUtilsDeprecated.sharedFileUtils() deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance") return cc.FileUtils:getInstance() end -rawset(CCFileUtils,"sharedFileUtils",CCFileUtilsDeprecated.sharedFileUtils) +CCFileUtils.sharedFileUtils = CCFileUtilsDeprecated.sharedFileUtils function CCFileUtilsDeprecated.purgeFileUtils() deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance") return cc.FileUtils:destroyInstance() end -rawset(CCFileUtils,"purgeFileUtils",CCFileUtilsDeprecated.purgeFileUtils) +CCFileUtils.purgeFileUtils = CCFileUtilsDeprecated.purgeFileUtils --functions of CCFileUtils will be deprecated end --functions of CCMenu will be deprecated begin @@ -118,12 +118,12 @@ function CCMenuDeprecated.createWithItem(self,...) deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem") return self:create(...) end -rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem) +CCMenu.createWithItem = CCMenuDeprecated.createWithItem function CCMenuDeprecated.setHandlerPriority(self) print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********") end -rawset(CCMenu,"setHandlerPriority",CCMenuDeprecated.setHandlerPriority) +CCMenu.setHandlerPriority = CCMenuDeprecated.setHandlerPriority --functions of CCMenu will be deprecated end --functions of CCNode will be deprecated begin @@ -133,21 +133,21 @@ function CCNodeDeprecated.boundingBox(self) deprecatedTip("CCNode:boundingBox","cc.Node:getBoundingBox") return self:getBoundingBox() end -rawset(CCNode,"boundingBox",CCNodeDeprecated.boundingBox) +CCNode.boundingBox = CCNodeDeprecated.boundingBox function CCNodeDeprecated.numberOfRunningActions(self) deprecatedTip("CCNode:numberOfRunningActions","cc.Node:getNumberOfRunningActions") return self:getNumberOfRunningActions() end -rawset(CCNode,"numberOfRunningActions",CCNodeDeprecated.numberOfRunningActions) +CCNode.numberOfRunningActions = CCNodeDeprecated.numberOfRunningActions function CCNodeDeprecated.removeFromParentAndCleanup(self,...) deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent") return self:removeFromParent(...) end -rawset(CCNode,"removeFromParentAndCleanup",CCNodeDeprecated.removeFromParentAndCleanup) +CCNode.removeFromParentAndCleanup = CCNodeDeprecated.removeFromParentAndCleanup --functions of CCNode will be deprecated end --CCDrawPrimitives will be deprecated begin @@ -155,88 +155,88 @@ local function CCDrawPrimitivesClassDeprecated() deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives") return cc.DrawPrimitives end -_G["CCDrawPrimitives"] = CCDrawPrimitivesClassDeprecated() +_G.CCDrawPrimitives = CCDrawPrimitivesClassDeprecated() --functions of CCDrawPrimitives will be deprecated begin local CCDrawPrimitivesDeprecated = { } function CCDrawPrimitivesDeprecated.ccDrawPoint(pt) deprecatedTip("ccDrawPoint","cc.DrawPrimitives.drawPoint") return cc.DrawPrimitives.drawPoint(pt) end -rawset(_G, "ccDrawPoint", CCDrawPrimitivesDeprecated.ccDrawPoint) +_G.ccDrawPoint = CCDrawPrimitivesDeprecated.ccDrawPoint function CCDrawPrimitivesDeprecated.ccDrawLine(origin,destination) deprecatedTip("ccDrawLine","cc.DrawPrimitives.drawLine") return cc.DrawPrimitives.drawLine(origin,destination) end -rawset(_G, "ccDrawLine", CCDrawPrimitivesDeprecated.ccDrawLine) +_G.ccDrawLine = CCDrawPrimitivesDeprecated.ccDrawLine function CCDrawPrimitivesDeprecated.ccDrawRect(origin,destination) deprecatedTip("ccDrawRect","cc.DrawPrimitives.drawRect") return cc.DrawPrimitives.drawRect(origin,destination) end -rawset(_G, "ccDrawRect", CCDrawPrimitivesDeprecated.ccDrawRect) +_G.ccDrawRect = CCDrawPrimitivesDeprecated.ccDrawRect function CCDrawPrimitivesDeprecated.ccDrawSolidRect(origin,destination,color) deprecatedTip("ccDrawSolidRect","cc.DrawPrimitives.drawSolidRect") return cc.DrawPrimitives.drawSolidRect(origin,destination,color) end -rawset(_G, "ccDrawSolidRect", CCDrawPrimitivesDeprecated.ccDrawSolidRect) +_G.ccDrawSolidRect = CCDrawPrimitivesDeprecated.ccDrawSolidRect -- params:... may represent two param(xScale,yScale) or nil function CCDrawPrimitivesDeprecated.ccDrawCircle(center,radius,angle,segments,drawLineToCenter,...) deprecatedTip("ccDrawCircle","cc.DrawPrimitives.drawCircle") return cc.DrawPrimitives.drawCircle(center,radius,angle,segments,drawLineToCenter,...) end -rawset(_G, "ccDrawCircle", CCDrawPrimitivesDeprecated.ccDrawCircle) +_G.ccDrawCircle = CCDrawPrimitivesDeprecated.ccDrawCircle -- params:... may represent two param(xScale,yScale) or nil function CCDrawPrimitivesDeprecated.ccDrawSolidCircle(center,radius,angle,segments,...) deprecatedTip("ccDrawSolidCircle","cc.DrawPrimitives.drawSolidCircle") return cc.DrawPrimitives.drawSolidCircle(center,radius,angle,segments,...) end -rawset(_G, "ccDrawSolidCircle", CCDrawPrimitivesDeprecated.ccDrawSolidCircle) +_G.ccDrawSolidCircle = CCDrawPrimitivesDeprecated.ccDrawSolidCircle function CCDrawPrimitivesDeprecated.ccDrawQuadBezier(origin,control,destination,segments) deprecatedTip("ccDrawQuadBezier","cc.DrawPrimitives.drawQuadBezier") return cc.DrawPrimitives.drawQuadBezier(origin,control,destination,segments) end -rawset(_G, "ccDrawQuadBezier", CCDrawPrimitivesDeprecated.ccDrawQuadBezier) +_G.ccDrawQuadBezier = CCDrawPrimitivesDeprecated.ccDrawQuadBezier function CCDrawPrimitivesDeprecated.ccDrawCubicBezier(origin,control1,control2,destination,segments) deprecatedTip("ccDrawCubicBezier","cc.DrawPrimitives.drawCubicBezier") return cc.DrawPrimitives.drawCubicBezier(origin,control1,control2,destination,segments) end -rawset(_G, "ccDrawCubicBezier", CCDrawPrimitivesDeprecated.ccDrawCubicBezier) +_G.ccDrawCubicBezier = CCDrawPrimitivesDeprecated.ccDrawCubicBezier function CCDrawPrimitivesDeprecated.ccDrawCatmullRom(arrayOfControlPoints,segments) deprecatedTip("ccDrawCatmullRom","cc.DrawPrimitives.drawCatmullRom") return cc.DrawPrimitives.drawCatmullRom(arrayOfControlPoints,segments) end -rawset(_G, "ccDrawCatmullRom", CCDrawPrimitivesDeprecated.ccDrawCatmullRom) +_G.ccDrawCatmullRom = CCDrawPrimitivesDeprecated.ccDrawCatmullRom function CCDrawPrimitivesDeprecated.ccDrawCardinalSpline(config,tension,segments) deprecatedTip("ccDrawCardinalSpline","cc.DrawPrimitives.drawCardinalSpline") return cc.DrawPrimitives.drawCardinalSpline(config,tension,segments) end -rawset(_G, "ccDrawCardinalSpline", CCDrawPrimitivesDeprecated.ccDrawCardinalSpline) +_G.ccDrawCardinalSpline = CCDrawPrimitivesDeprecated.ccDrawCardinalSpline function CCDrawPrimitivesDeprecated.ccDrawColor4B(r,g,b,a) deprecatedTip("ccDrawColor4B","cc.DrawPrimitives.drawColor4B") return cc.DrawPrimitives.drawColor4B(r,g,b,a) end -rawset(_G, "ccDrawColor4B", CCDrawPrimitivesDeprecated.ccDrawColor4B) +_G.ccDrawColor4B = CCDrawPrimitivesDeprecated.ccDrawColor4B function CCDrawPrimitivesDeprecated.ccDrawColor4F(r,g,b,a) deprecatedTip("ccDrawColor4F","cc.DrawPrimitives.drawColor4F") return cc.DrawPrimitives.drawColor4F(r,g,b,a) end -rawset(_G, "ccDrawColor4F", CCDrawPrimitivesDeprecated.ccDrawColor4F) +_G.ccDrawColor4F = CCDrawPrimitivesDeprecated.ccDrawColor4F function CCDrawPrimitivesDeprecated.ccPointSize(pointSize) deprecatedTip("ccPointSize","cc.DrawPrimitives.setPointSize") return cc.DrawPrimitives.setPointSize(pointSize) end -rawset(_G, "ccPointSize", CCDrawPrimitivesDeprecated.ccPointSize) +_G.ccPointSize = CCDrawPrimitivesDeprecated.ccPointSize --functions of CCDrawPrimitives will be deprecated end --CCDrawPrimitives will be deprecated end @@ -245,7 +245,7 @@ function CCProgressTimerDeprecated.setReverseProgress(self,...) deprecatedTip("CCProgressTimer","CCProgressTimer:setReverseDirection") return self:setReverseDirection(...) end -rawset(CCProgressTimer,"setReverseProgress",CCProgressTimerDeprecated.setReverseProgress) +CCProgressTimer.setReverseProgress = CCProgressTimerDeprecated.setReverseProgress --functions of CCSpriteFrameCache will be deprecated begin local CCSpriteFrameCacheDeprecated = { } @@ -253,19 +253,19 @@ function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName) deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName") return self:getSpriteFrameByName(szName) end -rawset(CCSpriteFrameCache,"spriteFrameByName",CCSpriteFrameCacheDeprecated.spriteFrameByName) +CCSpriteFrameCache.spriteFrameByName = CCSpriteFrameCacheDeprecated.spriteFrameByName function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache() deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance") return CCSpriteFrameCache:getInstance() end -rawset(CCSpriteFrameCache,"sharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache) +CCSpriteFrameCache.sharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache() deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance") return CCSpriteFrameCache:destroyInstance() end -rawset(CCSpriteFrameCache,"purgeSharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache) +CCSpriteFrameCache.purgeSharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache function CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile(self,...) deprecatedTip("CCSpriteFrameCache:addSpriteFramesWithFile","CCSpriteFrameCache:addSpriteFrames") @@ -277,7 +277,7 @@ function CCSpriteFrameCacheDeprecated.getSpriteFrameByName(self,...) deprecatedTip("CCSpriteFrameCache:getSpriteFrameByName","CCSpriteFrameCache:getSpriteFrame") return self:getSpriteFrame(...) end -rawset(CCSpriteFrameCache,"getSpriteFrameByName",CCSpriteFrameCacheDeprecated.getSpriteFrameByName) +CCSpriteFrameCache.getSpriteFrameByName = CCSpriteFrameCacheDeprecated.getSpriteFrameByName --functions of CCSpriteFrameCache will be deprecated end --functions of CCLabelAtlas will be deprecated begin @@ -286,7 +286,7 @@ function CCLabelAtlasDeprecated.create(self,...) deprecatedTip("CCLabelAtlas:create","CCLabelAtlas:_create") return self:_create(...) end -rawset(CCLabelAtlas,"create",CCLabelAtlasDeprecated.create) +CCLabelAtlas.create = CCLabelAtlasDeprecated.create --functions of CCLabelAtlas will be deprecated end @@ -296,55 +296,55 @@ local function CCRectMake(x,y,width,height) deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua") return cc.rect(x,y,width,height) end -rawset(_G,"CCRectMake",CCRectMake) +_G.CCRectMake = CCRectMake local function ccc3(r,g,b) deprecatedTip("ccc3(r,g,b)","cc.c3b(r,g,b)") return cc.c3b(r,g,b) end -rawset(_G,"ccc3",ccc3) +_G.ccc3 = ccc3 local function ccp(x,y) deprecatedTip("ccp(x,y)","cc.p(x,y)") return cc.p(x,y) end -rawset(_G,"ccp",ccp) +_G.ccp = ccp local function CCSizeMake(width,height) deprecatedTip("CCSizeMake(width,height)","cc.size(width,height)") return cc.size(width,height) end -rawset(_G,"CCSizeMake",CCSizeMake) +_G.CCSizeMake = CCSizeMake local function ccc4(r,g,b,a) deprecatedTip("ccc4(r,g,b,a)","cc.c4b(r,g,b,a)") return cc.c4b(r,g,b,a) end -rawset(_G,"ccc4",ccc4) +_G.ccc4 = ccc4 local function ccc4FFromccc3B(color3B) deprecatedTip("ccc4FFromccc3B(color3B)","cc.c4f(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)") return cc.c4f(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0) end -rawset(_G,"ccc4FFromccc3B",ccc4FFromccc3B) +_G.ccc4FFromccc3B = ccc4FFromccc3B local function ccc4f(r,g,b,a) deprecatedTip("ccc4f(r,g,b,a)","cc.c4f(r,g,b,a)") return cc.c4f(r,g,b,a) end -rawset(_G,"ccc4f",ccc4f) +_G.ccc4f = ccc4f local function ccc4FFromccc4B(color4B) deprecatedTip("ccc4FFromccc4B(color4B)","cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)") return cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0) end -rawset(_G,"ccc4FFromccc4B",ccc4FFromccc4B) +_G.ccc4FFromccc4B = ccc4FFromccc4B local function ccc4FEqual(a,b) deprecatedTip("ccc4FEqual(a,b)","a:equals(b)") return a:equals(b) end -rawset(_G,"ccc4FEqual",ccc4FEqual) +_G.ccc4FEqual = ccc4FEqual --global functions wil be deprecated, end @@ -353,14 +353,14 @@ local function ccpLineIntersect(a,b,c,d,s,t) deprecatedTip("ccpLineIntersect","cc.pIsLineIntersect") return cc.pIsLineIntersect(a,b,c,d,s,t) end -rawset(_G,"ccpLineIntersect",ccpLineIntersect) +_G.ccpLineIntersect = ccpLineIntersect local function CCPointMake(x,y) deprecatedTip("CCPointMake(x,y)","cc.p(x,y)") return cc.p(x,y) end -rawset(_G,"CCPointMake",CCPointMake) +_G.CCPointMake = CCPointMake @@ -368,304 +368,304 @@ local function ccpNeg(pt) deprecatedTip("ccpNeg","cc.pSub") return cc.pSub({x = 0,y = 0}, pt) end -rawset(_G,"ccpNeg",ccpNeg) +_G.ccpNeg = ccpNeg local function ccpAdd(pt1,pt2) deprecatedTip("ccpAdd","cc.pAdd") return cc.pAdd(pt1,pt2) end -rawset(_G,"ccpAdd",ccpAdd) +_G.ccpAdd = ccpAdd local function ccpSub(pt1,pt2) deprecatedTip("ccpSub","cc.pSub") return cc.pSub(pt1,pt2) end -rawset(_G,"ccpSub",ccpSub) +_G.ccpSub = ccpSub local function ccpMult(pt,factor) deprecatedTip("ccpMult","cc.pMul") return cc.pMul(pt,factor) end -rawset(_G,"ccpMult",ccpMult) +_G.ccpMult = ccpMult local function ccpMidpoint(pt1,pt2) deprecatedTip("ccpMidpoint","cc.pMidpoint") return cc.pMidpoint(pt1,pt2) end -rawset(_G,"ccpMidpoint",ccpMidpoint) +_G.ccpMidpoint = ccpMidpoint local function ccpDot(pt1,pt2) deprecatedTip("ccpDot","cc.pDot") return cc.pDot(pt1,pt2) end -rawset(_G,"ccpDot",ccpDot) +_G.ccpDot = ccpDot local function ccpCross(pt1,pt2) deprecatedTip("ccpCross","cc.pCross") return cc.pCross(pt1, pt2) end -rawset(_G,"ccpCross",ccpCross) +_G.ccpCross = ccpCross local function ccpPerp(pt) deprecatedTip("ccpPerp","cc.pPerp") return cc.pPerp(pt) end -rawset(_G,"ccpPerp",ccpPerp) +_G.ccpPerp = ccpPerp local function ccpRPerp(pt) deprecatedTip("ccpRPerp","cc.RPerp") return cc.RPerp(pt) end -rawset(_G,"ccpRPerp",ccpRPerp) +_G.ccpRPerp = ccpRPerp local function ccpProject(pt1,pt2) deprecatedTip("ccpProject","cc.pProject") return cc.pProject(pt1,pt2) end -rawset(_G,"ccpProject",ccpProject) +_G.ccpProject = ccpProject local function ccpRotate(pt1,pt2) deprecatedTip("ccpRotate","cc.pRotate") return cc.pRotate(pt1,pt2) end -rawset(_G,"ccpRotate",ccpRotate) +_G.ccpRotate = ccpRotate local function ccpUnrotate(pt1,pt2) deprecatedTip("ccpUnrotate","cc.pUnrotate") return cc.pUnrotate(pt1,pt2) end -rawset(_G,"ccpUnrotate",ccpUnrotate) +_G.ccpUnrotate = ccpUnrotate local function ccpLengthSQ(pt) deprecatedTip("ccpLengthSQ","cc.pLengthSQ") return cc.pLengthSQ(pt) end -rawset(_G,"ccpLengthSQ",ccpLengthSQ) +_G.ccpLengthSQ = ccpLengthSQ local function ccpDistanceSQ(pt1,pt2) deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ") return cc.pDistanceSQ(pt1,pt2) end -rawset(_G,"ccpDistanceSQ",ccpDistanceSQ) +_G.ccpDistanceSQ = ccpDistanceSQ local function ccpLength(pt) deprecatedTip("ccpLength","cc.pGetLength") return cc.pGetLength(pt) end -rawset(_G,"ccpLength",ccpLength) +_G.ccpLength = ccpLength local function ccpDistance(pt1,pt2) deprecatedTip("ccpDistance","cc.pGetDistance") return cc.pGetDistance(pt1, pt2) end -rawset(_G,"ccpDistance",ccpDistance) +_G.ccpDistance = ccpDistance local function ccpNormalize(pt) deprecatedTip("ccpNormalize","cc.pNormalize") return cc.pNormalize(pt) end -rawset(_G,"ccpNormalize",ccpNormalize) +_G.ccpNormalize = ccpNormalize local function ccpForAngle(angle) deprecatedTip("ccpForAngle","cc.pForAngle") return cc.pForAngle(angle) end -rawset(_G,"ccpForAngle",ccpForAngle) +_G.ccpForAngle = ccpForAngle local function ccpToAngle(pt) deprecatedTip("ccpToAngle","cc.pToAngleSelf") return cc.pToAngleSelf(pt) end -rawset(_G,"ccpToAngle",ccpToAngle) +_G.ccpToAngle = ccpToAngle local function ccpClamp(pt1,pt2,pt3) deprecatedTip("ccpClamp","cc.pGetClampPoint") return cc.pGetClampPoint(pt1,pt2,pt3) end -rawset(_G,"ccpClamp",ccpClamp) +_G.ccpClamp = ccpClamp local function ccpFromSize(sz) deprecatedTip("ccpFromSize(sz)","cc.pFromSize") return cc.pFromSize(sz) end -rawset(_G,"ccpFromSize",ccpFromSize) +_G.ccpFromSize = ccpFromSize local function ccpLerp(pt1,pt2,alpha) deprecatedTip("ccpLerp","cc.pLerp") return cc.pLerp(pt1,pt2,alpha) end -rawset(_G,"ccpLerp",ccpLerp) +_G.ccpLerp = ccpLerp local function ccpFuzzyEqual(pt1,pt2,variance) deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual") return cc.pFuzzyEqual(pt1,pt2,variance) end -rawset(_G,"ccpFuzzyEqual",ccpFuzzyEqual) +_G.ccpFuzzyEqual = ccpFuzzyEqual local function ccpCompMult(pt1,pt2) deprecatedTip("ccpCompMult","cc.p") return cc.p(pt1.x * pt2.x , pt1.y * pt2.y) end -rawset(_G,"ccpCompMult",ccpCompMult) +_G.ccpCompMult = ccpCompMult local function ccpAngleSigned(pt1,pt2) deprecatedTip("ccpAngleSigned","cc.pGetAngle") return cc.pGetAngle(pt1, pt2) end -rawset(_G,"ccpAngleSigned",ccpAngleSigned) +_G.ccpAngleSigned = ccpAngleSigned local function ccpAngle(pt1,pt2) deprecatedTip("ccpAngle","cc.pGetAngle") return cc.pGetAngle(pt1,ptw) end -rawset(_G,"ccpAngle",ccpAngle) +_G.ccpAngle = ccpAngle local function ccpRotateByAngle(pt1,pt2,angle) deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle") return cc.pRotateByAngle(pt1, pt2, angle) end -rawset(_G,"ccpRotateByAngle",ccpRotateByAngle) +_G.ccpRotateByAngle = ccpRotateByAngle local function ccpSegmentIntersect(pt1,pt2,pt3,pt4) deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect") return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4) end -rawset(_G,"ccpSegmentIntersect",ccpSegmentIntersect) +_G.ccpSegmentIntersect = ccpSegmentIntersect local function ccpIntersectPoint(pt1,pt2,pt3,pt4) deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint") return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4) end -rawset(_G,"ccpIntersectPoint",ccpIntersectPoint) +_G.ccpIntersectPoint = ccpIntersectPoint local function vertex2(x,y) deprecatedTip("vertex2(x,y)","cc.vertex2F(x,y)") return cc.vertex2F(x,y) end -rawset(_G,"vertex2",vertex2) +_G.vertex2 = vertex2 local function vertex3(x,y,z) deprecatedTip("vertex3(x,y,z)","cc.Vertex3F(x,y,z)") return cc.Vertex3F(x,y,z) end -rawset(_G,"vertex3",vertex3) +_G.vertex3 = vertex3 local function tex2(u,v) deprecatedTip("tex2(u,v)","cc.tex2f(u,v)") return cc.tex2f(u,v) end -rawset(_G,"tex2",tex2) +_G.tex2 = tex2 local function ccc4BFromccc4F(color4F) deprecatedTip("ccc4BFromccc4F(color4F)","Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)") return Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0) end -rawset(_G,"ccc4BFromccc4F",ccc4BFromccc4F) +_G.ccc4BFromccc4F = ccc4BFromccc4F local function ccColor3BDeprecated() deprecatedTip("ccColor3B","cc.c3b(0,0,0)") return cc.c3b(0,0,0) end -_G["ccColor3B"] = ccColor3BDeprecated +_G.ccColor3B = ccColor3BDeprecated local function ccColor4BDeprecated() deprecatedTip("ccColor4B","cc.c4b(0,0,0,0)") return cc.c4b(0,0,0,0) end -_G["ccColor4B"] = ccColor4BDeprecated +_G.ccColor4B = ccColor4BDeprecated local function ccColor4FDeprecated() deprecatedTip("ccColor4F","cc.c4f(0.0,0.0,0.0,0.0)") return cc.c4f(0.0,0.0,0.0,0.0) end -_G["ccColor4F"] = ccColor4FDeprecated +_G.ccColor4F = ccColor4FDeprecated local function ccVertex2FDeprecated() deprecatedTip("ccVertex2F","cc.vertex2F(0.0,0.0)") return cc.vertex2F(0.0,0.0) end -_G["ccVertex2F"] = ccVertex2FDeprecated +_G.ccVertex2F = ccVertex2FDeprecated local function ccVertex3FDeprecated() deprecatedTip("ccVertex3F","cc.Vertex3F(0.0, 0.0, 0.0)") return cc.Vertex3F(0.0, 0.0, 0.0) end -_G["ccVertex3F"] = ccVertex3FDeprecated +_G.ccVertex3F = ccVertex3FDeprecated local function ccTex2FDeprecated() deprecatedTip("ccTex2F","cc.tex2F(0.0, 0.0)") return cc.tex2F(0.0, 0.0) end -_G["ccTex2F"] = ccTex2FDeprecated +_G.ccTex2F = ccTex2FDeprecated local function ccPointSpriteDeprecated() deprecatedTip("ccPointSprite","cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)") return cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0) end -_G["ccPointSprite"] = ccPointSpriteDeprecated +_G.ccPointSprite = ccPointSpriteDeprecated local function ccQuad2Deprecated() deprecatedTip("ccQuad2","cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))") return cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0)) end -_G["ccQuad2"] = ccQuad2Deprecated +_G.ccQuad2 = ccQuad2Deprecated local function ccQuad3Deprecated() deprecatedTip("ccQuad3","cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))") return cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0)) end -_G["ccQuad3"] = ccQuad3Deprecated +_G.ccQuad3 = ccQuad3Deprecated local function ccV2FC4BT2FDeprecated() deprecatedTip("ccV2F_C4B_T2F","cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))") return cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)) end -_G["ccV2F_C4B_T2F"] = ccV2FC4BT2FDeprecated +_G.ccV2F_C4B_T2F = ccV2FC4BT2FDeprecated local function ccV2FC4FT2FDeprecated() deprecatedTip("ccV2F_C4F_T2F","cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0 ), cc.tex2F(0.0, 0.0))") return cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0), cc.tex2F(0.0, 0.0)) end -_G["ccV2F_C4F_T2F"] = ccV2FC4FT2FDeprecated +_G.ccV2F_C4F_T2F = ccV2FC4FT2FDeprecated local function ccV3FC4BT2FDeprecated() deprecatedTip("ccV3F_C4B_T2F","cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))") return cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0)) end -_G["ccV3F_C4B_T2F"] = ccV3FC4BT2FDeprecated +_G.ccV3F_C4B_T2F = ccV3FC4BT2FDeprecated local function ccV2FC4BT2FQuadDeprecated() deprecatedTip("ccV2F_C4B_T2F_Quad","cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))") return cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV2F_C4B_T2F_Quad"] = ccV2FC4BT2FQuadDeprecated +_G.ccV2F_C4B_T2F_Quad = ccV2FC4BT2FQuadDeprecated local function ccV3FC4BT2FQuadDeprecated() deprecatedTip("ccV3F_C4B_T2F_Quad","cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)") return cc.V3F_C4B_T2F_Quad(cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV3F_C4B_T2F_Quad"] = ccV3FC4BT2FQuadDeprecated +_G.ccV3F_C4B_T2F_Quad = ccV3FC4BT2FQuadDeprecated local function ccV2FC4FT2FQuadDeprecated() deprecatedTip("ccV2F_C4F_T2F_Quad","cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)") return cc.V2F_C4F_T2F_Quad(cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV2F_C4F_T2F_Quad"] = ccV2FC4FT2FQuadDeprecated +_G.ccV2F_C4F_T2F_Quad = ccV2FC4FT2FQuadDeprecated local function ccT2FQuadDeprecated() deprecatedTip("ccT2F_Quad","cc.T2F_Quad(_bl, _br, _tl, _tr)") return cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)) end -_G["ccT2F_Quad"] = ccT2FQuadDeprecated +_G.ccT2F_Quad = ccT2FQuadDeprecated local function ccAnimationFrameDataDeprecated() deprecatedTip("ccAnimationFrameData","cc.AnimationFrameData( _texCoords, _delay, _size)") return cc.AnimationFrameData(cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)), 0, cc.size(0,0)) end -_G["ccAnimationFrameData"] = ccAnimationFrameDataDeprecated +_G.ccAnimationFrameData = ccAnimationFrameDataDeprecated @@ -673,7 +673,7 @@ local function tex2(u,v) deprecatedTip("tex2(u,v)","cc.tex2f(u,v)") return cc.tex2f(u,v) end -rawset(_G,"tex2",tex2) +_G.tex2 = tex2 --functions of CCApplication will be deprecated end @@ -682,7 +682,7 @@ function CCApplicationDeprecated.sharedApplication() deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance") return CCApplication:getInstance() end -rawset(CCApplication,"sharedApplication",CCApplicationDeprecated.sharedApplication) +CCApplication.sharedApplication = CCApplicationDeprecated.sharedApplication --functions of CCApplication will be deprecated end @@ -692,7 +692,7 @@ function CCDirectorDeprecated.sharedDirector() deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance") return CCDirector:getInstance() end -rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector) +CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector --functions of CCDirector will be deprecated end @@ -702,13 +702,13 @@ function CCUserDefaultDeprecated.sharedUserDefault() deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance") return CCUserDefault:getInstance() end -rawset(CCUserDefault,"sharedUserDefault",CCUserDefaultDeprecated.sharedUserDefault) +CCUserDefault.sharedUserDefault = CCUserDefaultDeprecated.sharedUserDefault function CCUserDefaultDeprecated.purgeSharedUserDefault() deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance") return CCUserDefault:destroyInstance() end -rawset(CCUserDefault,"purgeSharedUserDefault",CCUserDefaultDeprecated.purgeSharedUserDefault) +CCUserDefault.purgeSharedUserDefault = CCUserDefaultDeprecated.purgeSharedUserDefault --functions of CCUserDefault will be deprecated end --functions of CCGrid3DAction will be deprecated begin @@ -717,13 +717,13 @@ function CCGrid3DActionDeprecated.vertex(self,pt) deprecatedTip("vertex","CCGrid3DAction:getVertex") return self:getVertex(pt) end -rawset(CCGrid3DAction,"vertex",CCGrid3DActionDeprecated.vertex) +CCGrid3DAction.vertex = CCGrid3DActionDeprecated.vertex function CCGrid3DActionDeprecated.originalVertex(self,pt) deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex") return self:getOriginalVertex(pt) end -rawset(CCGrid3DAction,"originalVertex",CCGrid3DActionDeprecated.originalVertex) +CCGrid3DAction.originalVertex = CCGrid3DActionDeprecated.originalVertex --functions of CCGrid3DAction will be deprecated end @@ -733,13 +733,13 @@ function CCTiledGrid3DActionDeprecated.tile(self,pt) deprecatedTip("tile","CCTiledGrid3DAction:getTile") return self:getTile(pt) end -rawset(CCTiledGrid3DAction,"tile",CCTiledGrid3DActionDeprecated.tile) +CCTiledGrid3DAction.tile = CCTiledGrid3DActionDeprecated.tile function CCTiledGrid3DActionDeprecated.originalTile(self,pt) deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile") return self:getOriginalTile(pt) end -rawset(CCTiledGrid3DAction,"originalTile",CCTiledGrid3DActionDeprecated.originalTile) +CCTiledGrid3DAction.originalTile = CCTiledGrid3DActionDeprecated.originalTile --functions of CCTiledGrid3DAction will be deprecated end @@ -749,25 +749,25 @@ function CCTexture2DDeprecated.stringForFormat(self) deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat") return self:getStringForFormat() end -rawset(CCTexture2D,"stringForFormat",CCTexture2DDeprecated.stringForFormat) +CCTexture2D.stringForFormat = CCTexture2DDeprecated.stringForFormat function CCTexture2DDeprecated.bitsPerPixelForFormat(self) deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat") return self:getBitsPerPixelForFormat() end -rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat) +CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat) deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat") return self:getBitsPerPixelForFormat(pixelFormat) end -rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat) +CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat function CCTexture2DDeprecated.defaultAlphaPixelFormat(self) deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat") return self:getDefaultAlphaPixelFormat() end -rawset(CCTexture2D,"defaultAlphaPixelFormat",CCTexture2DDeprecated.defaultAlphaPixelFormat) +CCTexture2D.defaultAlphaPixelFormat = CCTexture2DDeprecated.defaultAlphaPixelFormat --functions of CCTexture2D will be deprecated end @@ -777,13 +777,13 @@ function CCTimerDeprecated.timerWithScriptHandler(handler,seconds) deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler") return CCTimer:createWithScriptHandler(handler,seconds) end -rawset(CCTimer,"timerWithScriptHandler",CCTimerDeprecated.timerWithScriptHandler) +CCTimer.timerWithScriptHandler = CCTimerDeprecated.timerWithScriptHandler function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target) deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget") return self:getNumberOfRunningActionsInTarget(target) end -rawset(CCTimer,"numberOfRunningActionsInTarget",CCTimerDeprecated.numberOfRunningActionsInTarget) +CCTimer.numberOfRunningActionsInTarget = CCTimerDeprecated.numberOfRunningActionsInTarget --functions of CCTimer will be deprecated end @@ -793,25 +793,25 @@ function CCMenuItemFontDeprecated.fontSize() deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize") return CCMenuItemFont:getFontSize() end -rawset(CCMenuItemFont,"fontSize",CCMenuItemFontDeprecated.fontSize) +CCMenuItemFont.fontSize = CCMenuItemFontDeprecated.fontSize function CCMenuItemFontDeprecated.fontName() deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName") return CCMenuItemFont:getFontName() end -rawset(CCMenuItemFont,"fontName",CCMenuItemFontDeprecated.fontName) +CCMenuItemFont.fontName = CCMenuItemFontDeprecated.fontName function CCMenuItemFontDeprecated.fontSizeObj(self) deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj") return self:getFontSizeObj() end -rawset(CCMenuItemFont,"fontSizeObj",CCMenuItemFontDeprecated.fontSizeObj) +CCMenuItemFont.fontSizeObj = CCMenuItemFontDeprecated.fontSizeObj function CCMenuItemFontDeprecated.fontNameObj(self) deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj") return self:getFontNameObj() end -rawset(CCMenuItemFont,"fontNameObj",CCMenuItemFontDeprecated.fontNameObj) +CCMenuItemFont.fontNameObj = CCMenuItemFontDeprecated.fontNameObj --functions of CCMenuItemFont will be deprecated end @@ -821,7 +821,7 @@ function CCMenuItemToggleDeprecated.selectedItem(self) deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem") return self:getSelectedItem() end -rawset(CCMenuItemToggle,"selectedItem",CCMenuItemToggleDeprecated.selectedItem) +CCMenuItemToggle.selectedItem = CCMenuItemToggleDeprecated.selectedItem --functions of CCMenuItemToggle will be deprecated end @@ -831,7 +831,7 @@ function CCTileMapAtlasDeprecated.tileAt(self,pos) deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt") return self:getTileAt(pos) end -rawset(CCTileMapAtlas,"tileAt",CCTileMapAtlasDeprecated.tileAt) +CCTileMapAtlas.tileAt = CCTileMapAtlasDeprecated.tileAt --functions of CCTileMapAtlas will be deprecated end @@ -841,25 +841,25 @@ function CCTMXLayerDeprecated.tileAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt") return self:getTileAt(tileCoordinate) end -rawset(CCTMXLayer,"tileAt",CCTMXLayerDeprecated.tileAt) +CCTMXLayer.tileAt = CCTMXLayerDeprecated.tileAt function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt") return self:getTileGIDAt(tileCoordinate) end -rawset(CCTMXLayer,"tileGIDAt",CCTMXLayerDeprecated.tileGIDAt) +CCTMXLayer.tileGIDAt = CCTMXLayerDeprecated.tileGIDAt function CCTMXLayerDeprecated.positionAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt") return self:getPositionAt(tileCoordinate) end -rawset(CCTMXLayer,"positionAt",CCTMXLayerDeprecated.positionAt) +CCTMXLayer.positionAt = CCTMXLayerDeprecated.positionAt function CCTMXLayerDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXLayer,"propertyNamed",CCTMXLayerDeprecated.propertyNamed) +CCTMXLayer.propertyNamed = CCTMXLayerDeprecated.propertyNamed --functions of CCTMXLayer will be deprecated end --functions of CCTMXTiledMap will be deprecated begin @@ -868,25 +868,25 @@ function CCTMXTiledMapDeprecated.layerNamed(self,layerName) deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer") return self:getLayer(layerName) end -rawset(CCTMXTiledMap,"layerNamed", CCTMXTiledMapDeprecated.layerNamed) +CCTMXTiledMap.layerNamed = CCTMXTiledMapDeprecated.layerNamed function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXTiledMap,"propertyNamed", CCTMXTiledMapDeprecated.propertyNamed ) +CCTMXTiledMap.propertyNamed = CCTMXTiledMapDeprecated.propertyNamed function CCTMXTiledMapDeprecated.propertiesForGID(self,GID) deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID") return self:getPropertiesForGID(GID) end -rawset(CCTMXTiledMap,"propertiesForGID", CCTMXTiledMapDeprecated.propertiesForGID) +CCTMXTiledMap.propertiesForGID = CCTMXTiledMapDeprecated.propertiesForGID function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName) deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup") return self:getObjectGroup(groupName) end -rawset(CCTMXTiledMap,"objectGroupNamed", CCTMXTiledMapDeprecated.objectGroupNamed) +CCTMXTiledMap.objectGroupNamed = CCTMXTiledMapDeprecated.objectGroupNamed --functions of CCTMXTiledMap will be deprecated end @@ -896,19 +896,19 @@ function CCTMXMapInfoDeprecated.getStoringCharacters(self) deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters") return self:isStoringCharacters() end -rawset(CCTMXMapInfo,"getStoringCharacters", CCTMXMapInfoDeprecated.getStoringCharacters) +CCTMXMapInfo.getStoringCharacters = CCTMXMapInfoDeprecated.getStoringCharacters function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile) deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create") return CCTMXMapInfo:create(tmxFile) end -rawset(CCTMXMapInfo,"formatWithTMXFile", CCTMXMapInfoDeprecated.formatWithTMXFile) +CCTMXMapInfo.formatWithTMXFile = CCTMXMapInfoDeprecated.formatWithTMXFile function CCTMXMapInfoDeprecated.formatWithXML(infoTable,tmxString,resourcePath) deprecatedTip("CCTMXMapInfo:formatWithXML","TMXMapInfo:createWithXML") return CCTMXMapInfo:createWithXML(tmxString,resourcePath) end -rawset(CCTMXMapInfo,"formatWithXML", CCTMXMapInfoDeprecated.formatWithXML) +CCTMXMapInfo.formatWithXML = CCTMXMapInfoDeprecated.formatWithXML --functions of CCTMXMapInfo will be deprecated end @@ -918,13 +918,13 @@ function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXObjectGroup,"propertyNamed", CCTMXObjectGroupDeprecated.propertyNamed) +CCTMXObjectGroup.propertyNamed = CCTMXObjectGroupDeprecated.propertyNamed function CCTMXObjectGroupDeprecated.objectNamed(self, objectName) deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject") return self:getObject(objectName) end -rawset(CCTMXObjectGroup,"objectNamed", CCTMXObjectGroupDeprecated.objectNamed) +CCTMXObjectGroup.objectNamed = CCTMXObjectGroupDeprecated.objectNamed --functions of CCTMXObject will be deprecated end --functions of CCRenderTexture will be deprecated begin @@ -933,7 +933,7 @@ function CCRenderTextureDeprecated.newCCImage(self) deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage") return self:newImage() end -rawset(CCRenderTexture, "newCCImage", CCRenderTextureDeprecated.newCCImage) +CCRenderTexture.newCCImage = CCRenderTextureDeprecated.newCCImage --functions of CCRenderTexture will be deprecated end --functions of Sprite will be deprecated begin @@ -942,13 +942,13 @@ function CCSpriteDeprecated.setFlipX(self,flag) deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX") return self:setFlippedX(flag) end -rawset(cc.Sprite, "setFlipX", CCSpriteDeprecated.setFlipX) +cc.Sprite.setFlipX = CCSpriteDeprecated.setFlipX function CCSpriteDeprecated.setFlipY(self,flag) deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY") return self:setFlippedY(flag) end -rawset(cc.Sprite, "setFlipY", CCSpriteDeprecated.setFlipY) +cc.Sprite.setFlipY = CCSpriteDeprecated.setFlipY --functions of Sprite will be deprecated end @@ -957,12 +957,12 @@ local CCLayerDeprecated = {} function CCLayerDeprecated.setKeypadEnabled( self, enabled) return self:setKeyboardEnabled(enabled) end -rawset(cc.Layer, "setKeypadEnabled", CCLayerDeprecated.setKeypadEnabled ) +cc.Layer.setKeypadEnabled = CCLayerDeprecated.setKeypadEnabled function CCLayerDeprecated.isKeypadEnabled(self) return self:isKeyboardEnabled() end -rawset(cc.Layer, "isKeypadEnabled", CCLayerDeprecated.isKeypadEnabled ) +cc.Layer.isKeypadEnabled = CCLayerDeprecated.isKeypadEnabled --functions of Layer will be deprecated end --functions of cc.Node will be deprecated begin @@ -971,25 +971,25 @@ function NodeDeprecated.setZOrder(self,zOrder) deprecatedTip("cc.Node:setZOrder","cc.Node:setLocalZOrder") return self:setLocalZOrder(zOrder) end -rawset(cc.Node,"setZOrder",NodeDeprecated.setZOrder) +cc.Node.setZOrder = NodeDeprecated.setZOrder function NodeDeprecated.getZOrder(self) deprecatedTip("cc.Node:getZOrder","cc.Node:getLocalZOrder") return self:getLocalZOrder() end -rawset(cc.Node,"getZOrder",NodeDeprecated.getZOrder) +cc.Node.getZOrder = NodeDeprecated.getZOrder function NodeDeprecated.setVertexZ(self,vertexZ) deprecatedTip("cc.Node:setVertexZ", "cc.Node:setPositionZ") return self:setPositionZ(vertexZ) end -rawset(cc.Node,"setVertexZ",NodeDeprecated.setVertexZ) +cc.Node.setVertexZ = NodeDeprecated.setVertexZ function NodeDeprecated.getVertexZ(self) deprecatedTip("cc.Node:getVertexZ", "cc.Node:getPositionZ") return self:getPositionZ() end -rawset(cc.Node, "getVertexZ", NodeDeprecated.getVertexZ) +cc.Node.getVertexZ = NodeDeprecated.getVertexZ --functions of cc.Node will be deprecated end --functions of cc.GLProgram will be deprecated begin @@ -998,17 +998,17 @@ function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderB deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays") return self:initWithByteArrays(vShaderByteArray, fShaderByteArray) end -rawset(cc.GLProgram,"initWithVertexShaderByteArray", GLProgram.initWithVertexShaderByteArray) +cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray) deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames") return self:initWithFilenames(vShaderByteArray, fShaderByteArray) end -rawset(cc.GLProgram,"initWithVertexShaderFilename", GLProgram.initWithVertexShaderFilename) +cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename function GLProgram.addAttribute(self, attributeName, index) deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation") return self:bindAttribLocation(attributeName, index) end -rawset(cc.GLProgram,"addAttribute", GLProgram.addAttribute) +cc.GLProgram.addAttribute = GLProgram.addAttribute --functions of cc.GLProgram will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua b/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua index f6a5401ed2..932962e505 100644 --- a/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua @@ -9,11 +9,11 @@ function SimpleAudioEngineDeprecated.sharedEngine() deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance") return cc.SimpleAudioEngine:getInstance() end -rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine) +SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...) deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic") return self:playMusic(...) end -rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic) +SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic --functions of SimpleAudioEngine will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua b/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua index 72331f1b09..0c8952690f 100644 --- a/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua @@ -9,13 +9,13 @@ function GUIReaderDeprecated.shareReader() deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance") return ccs.GUIReader:getInstance() end -rawset(GUIReader,"shareReader",GUIReaderDeprecated.shareReader) +GUIReader.shareReader = GUIReaderDeprecated.shareReader function GUIReaderDeprecated.purgeGUIReader() deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") return ccs.GUIReader:destroyInstance() end -rawset(GUIReader,"purgeGUIReader",GUIReaderDeprecated.purgeGUIReader) +GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader --functions of GUIReader will be deprecated end --functions of SceneReader will be deprecated begin @@ -24,13 +24,13 @@ function SceneReaderDeprecated.sharedSceneReader() deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance") return ccs.SceneReader:getInstance() end -rawset(SceneReader,"sharedSceneReader",SceneReaderDeprecated.sharedSceneReader) +SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader function SceneReaderDeprecated.purgeSceneReader(self) deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance") return self:destroyInstance() end -rawset(SceneReader,"purgeSceneReader",SceneReaderDeprecated.purgeSceneReader) +SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader --functions of SceneReader will be deprecated end @@ -40,7 +40,7 @@ function CCSGUIReaderDeprecated.purgeGUIReader() deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") return ccs.GUIReader:destroyInstance() end -rawset(ccs.GUIReader,"purgeGUIReader",CCSGUIReaderDeprecated.purgeGUIReader) +ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader --functions of ccs.GUIReader will be deprecated end --functions of ccs.ActionManagerEx will be deprecated begin @@ -49,7 +49,7 @@ function CCSActionManagerExDeprecated.destroyActionManager() deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance") return ccs.ActionManagerEx:destroyInstance() end -rawset(ccs.ActionManagerEx,"destroyActionManager",CCSActionManagerExDeprecated.destroyActionManager) +ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager --functions of ccs.ActionManagerEx will be deprecated end --functions of ccs.SceneReader will be deprecated begin @@ -58,7 +58,7 @@ function CCSSceneReaderDeprecated.destroySceneReader(self) deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance") return self:destroyInstance() end -rawset(ccs.SceneReader,"destroySceneReader",CCSSceneReaderDeprecated.destroySceneReader) +ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader --functions of ccs.SceneReader will be deprecated end --functions of CCArmatureDataManager will be deprecated begin @@ -67,11 +67,11 @@ function CCArmatureDataManagerDeprecated.sharedArmatureDataManager() deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance") return ccs.ArmatureDataManager:getInstance() end -rawset(CCArmatureDataManager,"sharedArmatureDataManager",CCArmatureDataManagerDeprecated.sharedArmatureDataManager) +CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager function CCArmatureDataManagerDeprecated.purge() deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance") return ccs.ArmatureDataManager:destoryInstance() end -rawset(CCArmatureDataManager,"purge",CCArmatureDataManagerDeprecated.purge) +CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge --functions of CCArmatureDataManager will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua b/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua index 513c2cbf85..282c0118b5 100644 --- a/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua +++ b/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua @@ -10,19 +10,19 @@ function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent) print("come in addHandleOfControlEvent") self:registerControlEventHandler(func,controlEvent) end -rawset(CCControl,"addHandleOfControlEvent",CCControlDeprecated.addHandleOfControlEvent) +CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent --functions of CCControl will be deprecated end --Enums of CCTableView will be deprecated begin -rawset(CCTableView, "kTableViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) -rawset(CCTableView,"kTableViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) -rawset(CCTableView,"kTableCellTouched",cc.TABLECELL_TOUCHED) -rawset(CCTableView,"kTableCellSizeForIndex",cc.TABLECELL_SIZE_FOR_INDEX) -rawset(CCTableView,"kTableCellSizeAtIndex",cc.TABLECELL_SIZE_AT_INDEX) -rawset(CCTableView,"kNumberOfCellsInTableView",cc.NUMBER_OF_CELLS_IN_TABLEVIEW) +CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL +CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM +CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED +CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX +CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX +CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW --Enums of CCTableView will be deprecated end --Enums of CCScrollView will be deprecated begin -rawset(CCScrollView, "kScrollViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) -rawset(CCScrollView,"kScrollViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) +CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL +CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM --Enums of CCScrollView will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/extension/ExtensionConstants.lua b/cocos/scripting/lua-bindings/script/extension/ExtensionConstants.lua index 1aa9634c54..4bd74ba274 100644 --- a/cocos/scripting/lua-bindings/script/extension/ExtensionConstants.lua +++ b/cocos/scripting/lua-bindings/script/extension/ExtensionConstants.lua @@ -57,3 +57,13 @@ cc.KEYBOARD_RETURNTYPE_DONE = 1 cc.KEYBOARD_RETURNTYPE_SEND = 2 cc.KEYBOARD_RETURNTYPE_SEARCH = 3 cc.KEYBOARD_RETURNTYPE_GO = 4 + +cc.ASSETSMANAGER_CREATE_FILE = 0 +cc.ASSETSMANAGER_NETWORK = 1 +cc.ASSETSMANAGER_NO_NEW_VERSION = 2 +cc.ASSETSMANAGER_UNCOMPRESS = 3 + +cc.ASSETSMANAGER_PROTOCOL_PROGRESS = 0 +cc.ASSETSMANAGER_PROTOCOL_SUCCESS = 1 +cc.ASSETSMANAGER_PROTOCOL_ERROR = 2 + diff --git a/cocos/scripting/lua-bindings/script/init.lua b/cocos/scripting/lua-bindings/script/init.lua index c31e436578..4e2621b0dd 100644 --- a/cocos/scripting/lua-bindings/script/init.lua +++ b/cocos/scripting/lua-bindings/script/init.lua @@ -2,6 +2,7 @@ require "cocos.cocos2d.Cocos2d" require "cocos.cocos2d.Cocos2dConstants" require "cocos.cocos2d.extern" +require "cocos.cocos2d.bitExtend" -- opengl require "cocos.cocos2d.Opengl" diff --git a/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua b/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua index 83869f7775..6ea3cfac9b 100644 --- a/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua +++ b/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua @@ -11,13 +11,13 @@ if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTar deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString") return self:sendString(string) end - rawset(WebSocket,"sendTextMsg", WebSocketDeprecated.sendTextMsg) + WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize) deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString") string.char(unpack(table)) return self:sendString(string.char(unpack(table))) end - rawset(WebSocket,"sendBinaryMsg", WebSocketDeprecated.sendBinaryMsg) + WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg end --functions of WebSocket will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/spine/SpineConstants.lua b/cocos/scripting/lua-bindings/script/spine/SpineConstants.lua new file mode 100644 index 0000000000..470bf6a712 --- /dev/null +++ b/cocos/scripting/lua-bindings/script/spine/SpineConstants.lua @@ -0,0 +1,10 @@ + +sp = sp or {} + +sp.EventType = +{ + ANIMATION_START = 0, + ANIMATION_END = 1, + ANIMATION_COMPLETE = 2, + ANIMATION_EVENT = 3, +} diff --git a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua index 203f417d6d..8427740119 100644 --- a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua +++ b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua @@ -9,13 +9,13 @@ function TextDeprecated.setText(self, str) deprecatedTip("ccui.Text:setText","ccui.Text:setString") return self:setString(str) end -rawset(ccui.Text,"setText", TextDeprecated.setText) +ccui.Text.setText = TextDeprecated.setText function TextDeprecated.getStringValue(self) deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString") return self:getString() end -rawset(ccui.Text,"getStringValue", TextDeprecated.getStringValue) +ccui.Text.getStringValue = TextDeprecated.getStringValue --functions of ccui.Text will be deprecated begin @@ -25,13 +25,13 @@ function TextAtlasDeprecated.setStringValue(self, str) deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString") return self:setString(str) end -rawset(ccui.TextAtlas,"setStringValue", TextAtlasDeprecated.setStringValue) +ccui.TextAtlas.setStringValue = TextAtlasDeprecated.setStringValue function TextAtlasDeprecated.getStringValue(self) deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString") return self:getString() end -rawset(ccui.TextAtlas,"getStringValue", TextAtlasDeprecated.getStringValue) +ccui.TextAtlas.getStringValue = TextAtlasDeprecated.getStringValue --functions of ccui.TextAtlas will be deprecated begin @@ -41,13 +41,13 @@ function TextBMFontDeprecated.setText(self, str) deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString") return self:setString(str) end -rawset(ccui.TextBMFont,"setText", TextBMFontDeprecated.setText) +ccui.TextBMFont.setText = TextBMFontDeprecated.setText function TextBMFontDeprecated.getStringValue(self) deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString") return self:getString() end -rawset(ccui.Text,"getStringValue", TextBMFontDeprecated.getStringValue) +ccui.Text.getStringValue = TextBMFontDeprecated.getStringValue --functions of ccui.TextBMFont will be deprecated begin --functions of cc.ShaderCache will be deprecated begin @@ -56,7 +56,7 @@ function ShaderCacheDeprecated.getProgram(self,strShader) deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram") return self:getGLProgram(strShader) end -rawset(cc.ShaderCache,"getProgram", ShaderCacheDeprecated.getProgram) +cc.ShaderCache.getProgram = ShaderCacheDeprecated.getProgram --functions of ccui.TextBMFont will be deprecated begin --functions of ccui.Widget will be deprecated begin @@ -65,37 +65,37 @@ function UIWidgetDeprecated.getLeftInParent(self) deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary") return self:getLeftBoundary() end -rawset(ccui.Widget,"getLeftInParent", UIWidgetDeprecated.getLeftInParent) +ccui.Widget.getLeftInParent = UIWidgetDeprecated.getLeftInParent function UIWidgetDeprecated.getBottomInParent(self) deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary") return self:getBottomBoundary() end -rawset(ccui.Widget,"getBottomInParent", UIWidgetDeprecated.getBottomInParent) +ccui.Widget.getBottomInParent = UIWidgetDeprecated.getBottomInParent function UIWidgetDeprecated.getRightInParent(self) deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary") return self:getRightBoundary() end -rawset(ccui.Widget,"getRightInParent", UIWidgetDeprecated.getRightInParent) +ccui.Widget.getRightInParent = UIWidgetDeprecated.getRightInParent function UIWidgetDeprecated.getTopInParent(self) deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary") return self:getTopBoundary() end -rawset(ccui.Widget,"getTopInParent", UIWidgetDeprecated.getTopInParent) +ccui.Widget.getTopInParent = UIWidgetDeprecated.getTopInParent function UIWidgetDeprecated.getSize(self) deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize") return self:getContentSize() end -rawset(ccui.Widget,"getSize", UIWidgetDeprecated.getSize) +ccui.Widget.getSize = UIWidgetDeprecated.getSize function UIWidgetDeprecated.setSize(self, ...) deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize") return self:setContentSize(...) end -rawset(ccui.Widget,"setSize", UIWidgetDeprecated.setSize) +ccui.Widget.setSize = UIWidgetDeprecated.setSize --functions of ccui.Widget will be deprecated end @@ -105,19 +105,19 @@ function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler) deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener") return self:addEventListener(handler) end -rawset(ccui.CheckBox,"addEventListenerCheckBox", UICheckBoxDeprecated.addEventListenerCheckBox) +ccui.CheckBox.addEventListenerCheckBox = UICheckBoxDeprecated.addEventListenerCheckBox function UICheckBoxDeprecated.setSelectedState(self,flag) deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected") return self:setSelected(flag) end -rawset(ccui.CheckBox, "setSelectedState", UICheckBoxDeprecated.setSelectedState) +ccui.CheckBox.setSelectedState = UICheckBoxDeprecated.setSelectedState function UICheckBoxDeprecated.getSelectedState(self) deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected") return self:getSelected() end -rawset(ccui.CheckBox, "getSelectedState", UICheckBoxDeprecated.setSelectedState) +ccui.CheckBox.getSelectedState = UICheckBoxDeprecated.setSelectedState --functions of ccui.CheckBox will be deprecated end @@ -127,7 +127,7 @@ function UISliderDeprecated.addEventListenerSlider(self,handler) deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener") return self:addEventListener(handler) end -rawset(ccui.Slider,"addEventListenerSlider", UISliderDeprecated.addEventListenerSlider) +ccui.Slider.addEventListenerSlider = UISliderDeprecated.addEventListenerSlider --functions of ccui.Slider will be deprecated end --functions of ccui.TextField will be deprecated begin @@ -136,19 +136,19 @@ function UITextFieldDeprecated.addEventListenerTextField(self,handler) deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener") return self:addEventListener(handler) end -rawset(ccui.TextField,"addEventListenerTextField", UITextFieldDeprecated.addEventListenerTextField) +ccui.TextField.addEventListenerTextField = UITextFieldDeprecated.addEventListenerTextField function UITextFieldDeprecated.setText(self, str) deprecatedTip("ccui.TextField:setText","ccui.TextField:setString") return self:setString(str) end -rawset(ccui.TextField,"setText", UITextFieldDeprecated.setText) +ccui.TextField.setText = UITextFieldDeprecated.setText function UITextFieldDeprecated.getStringValue(self) deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString") return self:getString() end -rawset(ccui.TextField,"getStringValue", UITextFieldDeprecated.getStringValue) +ccui.TextField.getStringValue = UITextFieldDeprecated.getStringValue --functions of ccui.TextField will be deprecated end --functions of ccui.PageView will be deprecated begin @@ -157,7 +157,7 @@ function UIPageViewDeprecated.addEventListenerPageView(self,handler) deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.PageView,"addEventListenerPageView", UIPageViewDeprecated.addEventListenerPageView) +ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView --functions of ccui.PageView will be deprecated end --functions of ccui.ScrollView will be deprecated begin @@ -166,7 +166,7 @@ function UIScrollViewDeprecated.addEventListenerScrollView(self,handler) deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.ScrollView,"addEventListenerScrollView", UIScrollViewDeprecated.addEventListenerScrollView) +ccui.ScrollView.addEventListenerScrollView = UIScrollViewDeprecated.addEventListenerScrollView --functions of ccui.ScrollView will be deprecated end --functions of ccui.ListView will be deprecated begin @@ -175,5 +175,5 @@ function UIListViewDeprecated.addEventListenerListView(self,handler) deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.ListView,"addEventListenerListView", UIListViewDeprecated.addEventListenerListView) +ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView --functions of ccui.ListView will be deprecated end diff --git a/cocos/storage/local-storage/Android.mk b/cocos/storage/local-storage/Android.mk index 65a29778fd..38563bbe8e 100644 --- a/cocos/storage/local-storage/Android.mk +++ b/cocos/storage/local-storage/Android.mk @@ -6,7 +6,7 @@ LOCAL_MODULE := cocos_localstorage_static LOCAL_MODULE_FILENAME := liblocalstorage LOCAL_SRC_FILES := LocalStorage.cpp \ -LocalStorageAndroid.cpp +LocalStorage-android.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. diff --git a/cocos/storage/local-storage/LocalStorage.h b/cocos/storage/local-storage/LocalStorage.h index c79d46b1ee..58692549e6 100644 --- a/cocos/storage/local-storage/LocalStorage.h +++ b/cocos/storage/local-storage/LocalStorage.h @@ -31,20 +31,21 @@ THE SOFTWARE. #define __JSB_LOCALSTORAGE_H #include +#include "CCPlatformMacros.h" /** Initializes the database. If path is null, it will create an in-memory DB */ -void localStorageInit( const std::string& fullpath = ""); +void CC_DLL localStorageInit( const std::string& fullpath = ""); /** Frees the allocated resources */ -void localStorageFree(); +void CC_DLL localStorageFree(); /** sets an item in the LS */ -void localStorageSetItem( const std::string& key, const std::string& value); +void CC_DLL localStorageSetItem( const std::string& key, const std::string& value); /** gets an item from the LS */ -std::string localStorageGetItem( const std::string& key ); +std::string CC_DLL localStorageGetItem( const std::string& key ); /** removes an item from the LS */ -void localStorageRemoveItem( const std::string& key ); +void CC_DLL localStorageRemoveItem( const std::string& key ); #endif // __JSB_LOCALSTORAGE_H diff --git a/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj b/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj deleted file mode 100644 index 34e625ad9b..0000000000 --- a/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {88982C27-5A7B-40A8-86E7-B3187B44B322} - libLocalStorage - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - true - - - true - false - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters b/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters deleted file mode 100644 index b23d606b74..0000000000 --- a/cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {0310200c-b520-4f77-85f6-46f568b10f4d} - - - {69cfa37c-4b20-409e-ad74-a26314878d8a} - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index f71f89ea5c..316d8a51d1 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -37,18 +37,10 @@ UIEditBox/UIEditBox.cpp \ UIEditBox/UIEditBoxImpl-android.cpp \ UILayoutComponent.cpp \ -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../editor-support +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../editor-support -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../../external \ -$(LOCAL_PATH)/.. \ -$(LOCAL_PATH)/../.. \ -$(LOCAL_PATH)/../editor-support \ -$(LOCAL_PATH)/../platform/android +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../editor-support -LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static +LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) - diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 6f2749be72..c98f238a17 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -48,7 +48,7 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ui/UIVideoPlayer.h" #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ui/UIWebView.h" #endif #include "ui/UIDeprecated.h" diff --git a/cocos/ui/GUIExport.h b/cocos/ui/GUIExport.h index 983504664f..717a0ad9e4 100644 --- a/cocos/ui/GUIExport.h +++ b/cocos/ui/GUIExport.h @@ -1,7 +1,7 @@ #ifndef __CCLIBGUI_H__ #define __CCLIBGUI_H__ -#if defined(WIN32) && defined(_WINDOWS) +#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8) #ifdef __MINGW32__ #include #endif diff --git a/cocos/ui/UIScrollView.cpp b/cocos/ui/UIScrollView.cpp index f36f76d706..95bab8ed39 100644 --- a/cocos/ui/UIScrollView.cpp +++ b/cocos/ui/UIScrollView.cpp @@ -1422,10 +1422,12 @@ void ScrollView::endRecordSlidAction() } float totalDis = 0.0f; Vec2 dir; + Vec2 touchEndPositionInNodeSpace = this->convertToNodeSpace(_touchEndPosition); + Vec2 touchBeganPositionInNodeSpace = this->convertToNodeSpace(_touchBeganPosition); switch (_direction) { case Direction::VERTICAL: - totalDis = _touchEndPosition.y - _touchBeganPosition.y; + totalDis = touchEndPositionInNodeSpace.y - touchBeganPositionInNodeSpace.y; if (totalDis < 0.0f) { dir = SCROLLDIR_DOWN; @@ -1436,7 +1438,7 @@ void ScrollView::endRecordSlidAction() } break; case Direction::HORIZONTAL: - totalDis = _touchEndPosition.x - _touchBeganPosition.x; + totalDis = touchEndPositionInNodeSpace.x - touchBeganPositionInNodeSpace.x; if (totalDis < 0.0f) { dir = SCROLLDIR_LEFT; @@ -1448,7 +1450,7 @@ void ScrollView::endRecordSlidAction() break; case Direction::BOTH: { - Vec2 subVector = _touchEndPosition - _touchBeganPosition; + Vec2 subVector = touchEndPositionInNodeSpace - touchBeganPositionInNodeSpace; totalDis = subVector.getLength(); dir = subVector.getNormalized(); break; @@ -1470,7 +1472,9 @@ void ScrollView::handlePressLogic(Touch *touch) void ScrollView::handleMoveLogic(Touch *touch) { - Vec2 delta = touch->getLocation() - touch->getPreviousLocation(); + Vec2 touchPositionInNodeSpace = this->convertToNodeSpace(touch->getLocation()); + Vec2 previousTouchPositionInNodeSpace = this->convertToNodeSpace(touch->getPreviousLocation()); + Vec2 delta = touchPositionInNodeSpace - previousTouchPositionInNodeSpace; switch (_direction) { case Direction::VERTICAL: // vertical diff --git a/cocos/ui/UIWebView.cpp b/cocos/ui/UIWebView.cpp index 745b281db0..b7b2a4fc7d 100644 --- a/cocos/ui/UIWebView.cpp +++ b/cocos/ui/UIWebView.cpp @@ -28,9 +28,4 @@ #include "UIWebViewImpl-android.h" #include "UIWebView-inl.h" -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - -#include "UIWebViewImpl-win32.h" -#include "UIWebView-inl.h" - #endif diff --git a/cocos/ui/UIWebViewImpl-win32.cpp b/cocos/ui/UIWebViewImpl-win32.cpp deleted file mode 100644 index f97542eced..0000000000 --- a/cocos/ui/UIWebViewImpl-win32.cpp +++ /dev/null @@ -1,876 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - Author: Jeff Wang - - 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. - ****************************************************************************/ - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - -#include -#include -#include -#include -#include "UIWebViewImpl-win32.h" -#include "UIWebView.h" -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" -#include "platform/CCGLView.h" - -// declarate -class Win32WebControl : public DWebBrowserEvents2 -{ -public: - Win32WebControl(); - - bool createWebView( - const std::function &shouldStartLoading, - const std::function &didFinishLoading, - const std::function &didFailLoading, - const std::function &onJsCallback); - void removeWebView(); - - void setWebViewRect(const int left, const int top, const int width, const int height); - void setJavascriptInterfaceScheme(const std::string &scheme) const; - void loadData(const std::string &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) const; - void loadHTMLString(const std::string &html, const std::string &baseURL); - void loadURL(const std::string &url) const; - void loadFile(const std::string &filePath) const; - void stopLoading() const; - void reload() const; - bool canGoBack() const; - bool canGoForward() const; - void goBack() const; - void goForward() const; - void evaluateJS(const std::string &js) const; - void setScalesPageToFit(const bool scalesPageToFit) const; - void setWebViewVisible(const bool visible) const; - - // Implement IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); - - // Implement IDispatch - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( - REFIID riid, - LPOLESTR *rgszNames, - UINT cNames, - LCID lcid, - DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke( - DISPID dispIdMember, - REFIID riid, - LCID lcid, - WORD wFlags, - DISPPARAMS *pDispParams, - VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, - UINT *puArgErr); - -private: - CAxWindow _winContainer; - IWebBrowser2 *_webBrowser2; - IConnectionPoint *_connectionPoint; - IDispatch *_htmlDoc; - bool _goBackEnabled; - bool _goForwardEnabled; - DWORD _cookie; - ULONG _reference; - std::function _shouldStartLoading; - std::function _didFinishLoading; - std::function _didFailLoading; - std::function _onJsCallback; - std::string _htmlWillLoad; - - static bool s_isInitialized; - static CComModule s_module; - static void lazyInit(); - - void _loadHTMLString(const std::string &html) const; - void loadURL(BSTR url) const; - void loadURL(const std::wstring &url) const; -}; - - - -namespace cocos2d { - namespace experimental { - namespace ui { - - WebViewImpl::WebViewImpl(WebView *webView) : _createSucceeded(false), _systemWebControl(nullptr), _webView(webView) - { - _systemWebControl = new Win32WebControl(); - if (_systemWebControl == nullptr) - { - return; - } - - _createSucceeded = _systemWebControl->createWebView( - [this](const std::string &url)->bool { - std::function shouldStartLoading = _webView->getOnShouldStartLoading(); - if (shouldStartLoading != nullptr) - { - return shouldStartLoading(_webView, url); - } - return true; - }, - [this](const std::string &url) { - WebView::ccWebViewCallback didFinishLoading = _webView->getOnDidFinishLoading(); - if (didFinishLoading != nullptr) - { - didFinishLoading(_webView, url); - } - }, - [this](const std::string &url) { - WebView::ccWebViewCallback didFailLoading = _webView->getOnDidFailLoading(); - if (didFailLoading != nullptr) - { - didFailLoading(_webView, url); - } - }, - [this](const std::string &url) { - WebView::ccWebViewCallback onJsCallback = _webView->getOnJSCallback(); - if (onJsCallback != nullptr) - { - onJsCallback(_webView, url); - } - }); - } - - WebViewImpl::~WebViewImpl() - { - if (_systemWebControl != nullptr) - { - _systemWebControl->removeWebView(); - delete _systemWebControl; - _systemWebControl = nullptr; - } - } - - void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) - { - if (_createSucceeded) - { - std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); - _systemWebControl->loadData(dataString, MIMEType, encoding, baseURL); - } - } - - void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) - { - if (_createSucceeded) - { - _systemWebControl->loadHTMLString(string, baseURL); - } - } - - void WebViewImpl::loadURL(const std::string &url) - { - if (_createSucceeded) - { - _systemWebControl->loadURL(url); - } - } - - void WebViewImpl::loadFile(const std::string &fileName) - { - if (_createSucceeded) - { - std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName); - _systemWebControl->loadFile(fullPath); - } - } - - void WebViewImpl::stopLoading() - { - if (_createSucceeded) - { - _systemWebControl->stopLoading(); - } - } - - void WebViewImpl::reload() - { - if (_createSucceeded) - { - _systemWebControl->reload(); - } - } - - bool WebViewImpl::canGoBack() - { - if (_createSucceeded) - { - return _systemWebControl->canGoBack(); - } - return false; - } - - bool WebViewImpl::canGoForward() - { - if (_createSucceeded) - { - return _systemWebControl->canGoForward(); - } - return false; - } - - void WebViewImpl::goBack() - { - if (_createSucceeded) - { - _systemWebControl->goBack(); - } - } - - void WebViewImpl::goForward() - { - if (_createSucceeded) - { - _systemWebControl->goForward(); - } - } - - void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) - { - if (_createSucceeded) - { - _systemWebControl->setJavascriptInterfaceScheme(scheme); - } - } - - void WebViewImpl::evaluateJS(const std::string &js) - { - if (_createSucceeded) - { - _systemWebControl->evaluateJS(js); - } - } - - void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) - { - if (_createSucceeded) - { - _systemWebControl->setScalesPageToFit(scalesPageToFit); - } - } - - void WebViewImpl::draw(Renderer *renderer, Mat4 const &transform, uint32_t flags) - { - if (_createSucceeded && (flags & Node::FLAGS_TRANSFORM_DIRTY)) - { - Director *directorInstance = cocos2d::Director::getInstance(); - GLView *glView = directorInstance->getOpenGLView(); - const Size &frameSize = glView->getFrameSize(); - const Size &winSize = directorInstance->getWinSize(); - Vec2 leftBottom = this->_webView->convertToWorldSpace(Point::ZERO); - Vec2 rightTop = this->_webView->convertToWorldSpace(Point(_webView->getContentSize().width, _webView->getContentSize().height)); - float uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2) * glView->getScaleX(); - float uiTop = frameSize.height / 2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); - - _systemWebControl->setWebViewRect(uiLeft, uiTop, - (rightTop.x - leftBottom.x) * glView->getScaleX(), - (rightTop.y - leftBottom.y) * glView->getScaleY()); - } - } - - void WebViewImpl::setVisible(bool visible) - { - if (_createSucceeded) - { - _systemWebControl->setWebViewVisible(visible); - } - } - } // namespace ui - } // namespace experimental -} //namespace cocos2d - -// -// Implement Win32WebControl -// -bool Win32WebControl::s_isInitialized = false; -CComModule Win32WebControl::s_module; - -void Win32WebControl::lazyInit() -{ - // reset the main windows style so that its drawing does not cover the webview sub window - HWND hwnd = cocos2d::Director::getInstance()->getOpenGLView()->getWin32Window(); - LONG style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style | WS_CLIPCHILDREN); - - HINSTANCE hInstance = GetModuleHandle(NULL); - CoInitialize(NULL); - s_module.Init(NULL, hInstance); - AtlAxWinInit(); -} - -static HGLOBAL globalAllocWstringFromString(const std::string &str) -{ - int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0); - if (len <= 0) - { - return NULL; - } - HGLOBAL wstr = GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, (len + 1) * sizeof(WCHAR)); - if (wstr == NULL) - { - return NULL; - } - MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, (WCHAR *)wstr, len); - return wstr; -} - -static std::string bstr2string(BSTR bstr) -{ - wchar_t *str = OLE2W(bstr); - std::string ret; - int len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); - if (len > 0) - { - HGLOBAL utf8Str = GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1); - if (utf8Str != NULL) - { - WideCharToMultiByte(CP_UTF8, 0, str, -1, (char *)utf8Str, len, NULL, NULL); - ret.assign((char *)utf8Str); - GlobalFree(utf8Str); - } - } - return ret; -} - -static bool isUrlJs(BSTR url) -{ - return wcsncmp(OLE2W(url), L"javascript:", 11) == 0; -} - -Win32WebControl::Win32WebControl() - : _webBrowser2(NULL) - , _connectionPoint(NULL) - , _htmlDoc(NULL) - , _goBackEnabled(true) - , _goForwardEnabled(true) - , _cookie(0) - , _reference(0) - , _shouldStartLoading(nullptr) - , _didFinishLoading(nullptr) - , _didFailLoading(nullptr) -{ - if (!s_isInitialized) - { - lazyInit(); - } -} - -bool Win32WebControl::createWebView( - const std::function &shouldStartLoading, - const std::function &didFinishLoading, - const std::function &didFailLoading, - const std::function &onJsCallback) -{ - bool ret = false; - IConnectionPointContainer *container = NULL; - do - { - HWND hwnd = cocos2d::Director::getInstance()->getOpenGLView()->getWin32Window(); - _winContainer.Create(hwnd, NULL, NULL, WS_CHILD | WS_VISIBLE); - - HRESULT hr; - hr = _winContainer.CreateControl(L"shell.Explorer.2"); - CC_BREAK_IF(FAILED(hr)); - - hr = _winContainer.QueryControl(__uuidof(IWebBrowser2), (void **)&_webBrowser2); - CC_BREAK_IF(FAILED(hr) || _webBrowser2 == NULL); - - _webBrowser2->put_Silent(VARIANT_TRUE); - - VARIANT var; - VariantInit(&var); - var.vt = VT_BSTR; - var.bstrVal = SysAllocString(L"about:blank"); - hr = _webBrowser2->Navigate2(&var, NULL, NULL, NULL, NULL); - SysFreeString(var.bstrVal); - VariantClear(&var); - CC_BREAK_IF(FAILED(hr)); - - hr = _webBrowser2->QueryInterface(IID_IConnectionPointContainer, (void **)&container); - CC_BREAK_IF(FAILED(hr)); - - hr = container->FindConnectionPoint(DIID_DWebBrowserEvents2, &_connectionPoint); - CC_BREAK_IF(FAILED(hr)); - - hr = _connectionPoint->Advise(this, &_cookie); - CC_BREAK_IF(FAILED(hr)); - - hr = _webBrowser2->get_Document(&_htmlDoc); - CC_BREAK_IF(FAILED(hr)); - - ret = true; - } while (0); - - if (!ret) - { - removeWebView(); - } - if (container != NULL) - { - container->Release(); - container = NULL; - } - - _shouldStartLoading = shouldStartLoading; - _didFinishLoading = didFinishLoading; - _didFailLoading = didFailLoading; - _onJsCallback = onJsCallback; - return ret; -} - -void Win32WebControl::removeWebView() -{ - if (_connectionPoint != NULL) - { - _connectionPoint->Unadvise(_cookie); - _connectionPoint->Release(); - _connectionPoint = NULL; - } - if (_htmlDoc != NULL) - { - _htmlDoc->Release(); - _htmlDoc = NULL; - } - if (_webBrowser2 != NULL) - { - _webBrowser2->Release(); - _webBrowser2 = NULL; - } - _winContainer.DestroyWindow(); -} - -void Win32WebControl::setWebViewRect(const int left, const int top, const int width, const int height) -{ - _winContainer.MoveWindow(left, top, width, height); -} - -void Win32WebControl::setJavascriptInterfaceScheme(const std::string &scheme) const -{ - // To be implemented! -} - -void Win32WebControl::loadData(const std::string &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) const -{ - // To be implemented! -} - -void Win32WebControl::loadHTMLString(const std::string &html, const std::string &baseURL) -{ - // NOTE: should we load base URL first? - // If so, we will cause many loadURL callbacks, - // and it would be very difficult to distinguish between `loadURL' and `loadHTMLString' - - //if (baseURL.empty()) - //{ - _loadHTMLString(html); - //} - //else - //{ - // _htmlWillLoad = html; - // loadURL(baseURL); - //} -} - -void Win32WebControl::_loadHTMLString(const std::string &html) const -{ - bool flag = false; - HGLOBAL htmlText = globalAllocWstringFromString(html); - if (htmlText != NULL) - { - IStream *stream = NULL; - if (SUCCEEDED(CreateStreamOnHGlobal(htmlText, FALSE, &stream))) - { - IPersistStreamInit *persistStreamInit = NULL; - if (SUCCEEDED(_htmlDoc->QueryInterface(IID_IPersistStreamInit, (void **)&persistStreamInit))) - { - if (SUCCEEDED(persistStreamInit->InitNew()) && SUCCEEDED(persistStreamInit->Load(stream))) - { - flag = true; - } - persistStreamInit->Release(); - } - stream->Release(); - } - GlobalFree(htmlText); - } - if (flag) - { - if (_didFinishLoading != nullptr) - { - std::string str("data:text/html,"); - str.append(html); - _didFinishLoading(str); - } - } - else - { - if (_didFailLoading != nullptr) - { - std::string str("data:text/html,"); - str.append(html); - _didFailLoading(str); - } - } -} - -void Win32WebControl::loadURL(BSTR url) const -{ - VARIANT var; - VariantInit(&var); - var.vt = VT_BSTR; - var.bstrVal = url; - _webBrowser2->Navigate2(&var, NULL, NULL, NULL, NULL); - VariantClear(&var); -} - -void Win32WebControl::loadURL(const std::wstring &url) const -{ - BSTR bstr = SysAllocString(url.c_str()); - loadURL(bstr); - SysFreeString(bstr); -} - -void Win32WebControl::loadURL(const std::string &url) const -{ - HGLOBAL unicodeStr = globalAllocWstringFromString(url); - if (unicodeStr != NULL) - { - loadURL(std::wstring((WCHAR *)unicodeStr)); - GlobalFree(unicodeStr); - } -} - -void Win32WebControl::loadFile(const std::string &filePath) const -{ - HGLOBAL unicodeStr = globalAllocWstringFromString(filePath); - if (unicodeStr != NULL) - { - loadURL(std::wstring((WCHAR *)unicodeStr)); - GlobalFree(unicodeStr); - } -} - -void Win32WebControl::stopLoading() const -{ - _webBrowser2->Stop(); -} - -void Win32WebControl::reload() const -{ - _webBrowser2->Refresh(); -} - -bool Win32WebControl::canGoBack() const -{ - return _goBackEnabled; -} - -bool Win32WebControl::canGoForward() const -{ - return _goForwardEnabled; -} - -void Win32WebControl::goBack() const -{ - _webBrowser2->GoBack(); -} - -void Win32WebControl::goForward() const -{ - _webBrowser2->GoForward(); -} - -void Win32WebControl::evaluateJS(const std::string &js) const -{ - std::string url("javascript:"); - url.append(js); - loadURL(url); -} - -void Win32WebControl::setScalesPageToFit(const bool scalesPageToFit) const -{ -} - -void Win32WebControl::setWebViewVisible(const bool visible) const -{ - _webBrowser2->put_Visible(visible ? VARIANT_TRUE : VARIANT_FALSE); -} - -// Implement IUnknown -HRESULT STDMETHODCALLTYPE Win32WebControl::QueryInterface(REFIID riid, void **ppvObject) -{ - BOOL isBadPtr = FALSE; - CCASSERT(!(isBadPtr = IsBadWritePtr(ppvObject, sizeof(void *))), ""); - if (isBadPtr) - { - return E_POINTER; - } - *ppvObject = NULL; - - if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IDispatch) || IsEqualIID(riid, DIID_DWebBrowserEvents2)) - { - AddRef(); - *ppvObject = this; - return S_OK; - } - - return E_NOINTERFACE; -} - -ULONG STDMETHODCALLTYPE Win32WebControl::AddRef(void) -{ - InterlockedIncrement(&_reference); - return _reference; -} - -ULONG STDMETHODCALLTYPE Win32WebControl::Release(void) -{ - CCASSERT(_reference > 0, "reference count should greater than 0"); - InterlockedDecrement(&_reference); - // DO NOT delete this if _reference == 0, otherwise, it will crash when call removeWebView - return _reference; -} - -// Implement IDispatch -HRESULT STDMETHODCALLTYPE Win32WebControl::GetTypeInfoCount(UINT *pctinfo) -{ - *pctinfo = 0; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE Win32WebControl::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) -{ - UNREFERENCED_PARAMETER(iTInfo); - UNREFERENCED_PARAMETER(lcid); - *ppTInfo = NULL; - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE Win32WebControl::GetIDsOfNames( - REFIID riid, - LPOLESTR *rgszNames, - UINT cNames, - LCID lcid, - DISPID *rgDispId) -{ - UNREFERENCED_PARAMETER(riid); - UNREFERENCED_PARAMETER(rgszNames); - UNREFERENCED_PARAMETER(cNames); - UNREFERENCED_PARAMETER(lcid); - UNREFERENCED_PARAMETER(rgDispId); - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE Win32WebControl::Invoke( - DISPID dispIdMember, - REFIID riid, - LCID lcid, - WORD wFlags, - DISPPARAMS *pDispParams, - VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - if (!IsEqualIID(riid, IID_NULL)) // riid should always be IID_NULL - { - return DISP_E_UNKNOWNINTERFACE; - } - - switch (dispIdMember) - { - case DISPID_COMMANDSTATECHANGE: - if (pDispParams != NULL && pDispParams->cArgs == 2) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[0].vt == VT_BOOL && rgvarg[1].vt == VT_I4) - { - switch (rgvarg[1].intVal) - { - case CSC_NAVIGATEFORWARD: - _goForwardEnabled = (rgvarg[0].boolVal != VARIANT_FALSE); // VARIANT_TRUE is -1 - return S_OK; - case CSC_NAVIGATEBACK: - _goBackEnabled = (rgvarg[0].boolVal != VARIANT_FALSE); // VARIANT_TRUE is -1 - return S_OK; - default: - break; - } - } - } - break; - - case DISPID_BEFORENAVIGATE2: - if (pDispParams != NULL && pDispParams->cArgs == 7) - { - VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[6].vt == VT_DISPATCH && rgvarg[6].pdispVal == _webBrowser2) - { - if (rgvarg[0].vt == (VT_BYREF | VT_BOOL) && rgvarg[5].vt == (VT_BYREF | VT_VARIANT)) - { - VARIANT_BOOL *cancel = rgvarg[0].pboolVal; - BSTR url = rgvarg[5].pvarVal->bstrVal; - *cancel = VARIANT_FALSE; - if (isUrlJs(url)) - { - if (_onJsCallback != nullptr) - { - _onJsCallback(bstr2string(url + 11)); // skip the prefix `javascript' - } - } - else - { - if (_shouldStartLoading != nullptr) - { - *cancel = _shouldStartLoading(bstr2string(url)) ? VARIANT_FALSE : VARIANT_TRUE; // VARIANT_TRUE is -1 - } - } - return S_OK; - } - } - } - break; - - case DISPID_DOCUMENTCOMPLETE: - if (pDispParams != NULL && pDispParams->cArgs == 2) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[1].vt == VT_DISPATCH && rgvarg[1].pdispVal == _webBrowser2 && rgvarg[0].vt == (VT_BYREF | VT_VARIANT)) - { - READYSTATE state; - if (SUCCEEDED(_webBrowser2->get_ReadyState(&state)) && state == READYSTATE_COMPLETE) - { - BSTR url = rgvarg[0].pvarVal->bstrVal; - if (_didFinishLoading != nullptr && !isUrlJs(url)) // ignore js - { - _didFinishLoading(bstr2string(url)); - } - if (!_htmlWillLoad.empty()) - { - _loadHTMLString(_htmlWillLoad); - _htmlWillLoad.clear(); - } - return S_OK; - } - } - } - break; - - case DISPID_NAVIGATECOMPLETE2: - if (pDispParams != NULL && pDispParams->cArgs == 2) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[1].vt == VT_DISPATCH && rgvarg[1].pdispVal == _webBrowser2) - { - if (rgvarg[0].vt == (VT_BYREF | VT_VARIANT)) - { - BSTR url = rgvarg[0].pvarVal->bstrVal; - return S_OK; - } - } - } - break; - - case DISPID_NAVIGATEERROR: - if (pDispParams != NULL && pDispParams->cArgs == 5) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[4].vt == VT_DISPATCH && rgvarg[4].pdispVal == _webBrowser2) - { - if (rgvarg[3].vt == (VT_BYREF | VT_VARIANT) && rgvarg[1].vt == (VT_BYREF | VT_VARIANT) && rgvarg[0].vt == (VT_BYREF | VT_BOOL)) - { - VARIANT_BOOL *cancel = rgvarg[0].pboolVal; - HRESULT codes = rgvarg[1].pvarVal->lVal; - BSTR url = rgvarg[3].pvarVal->bstrVal; - if (_didFailLoading != nullptr && !isUrlJs(url)) // ignore js - { - _didFailLoading(bstr2string(url)); - } - *cancel = VARIANT_FALSE; - return S_OK; - } - } - } - break; - case DISPID_PROGRESSCHANGE: - if (pDispParams != NULL && pDispParams->cArgs == 2) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[0].vt == VT_I4 && rgvarg[1].vt == VT_I4) - { - LONG maxProgress = rgvarg[0].lVal; - LONG curProgress = rgvarg[1].lVal; - return S_OK; - } - } - break; - - case DISPID_NEWWINDOW2: - if (pDispParams != NULL && pDispParams->cArgs == 2) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[0].vt == (VT_BYREF | VT_BOOL) && rgvarg[1].vt == (VT_BYREF | VT_DISPATCH)) - { - VARIANT_BOOL *cancel = rgvarg[0].pboolVal; - IDispatch **dis = rgvarg[1].ppdispVal; - *dis = NULL; - *cancel = VARIANT_TRUE; // forbit to create new window - return S_OK; - } - } - break; - case DISPID_NEWWINDOW3: - if (pDispParams != NULL && pDispParams->cArgs == 5) - { - const VARIANTARG *rgvarg = pDispParams->rgvarg; - if (rgvarg[0].vt == VT_BSTR && rgvarg[1].vt == VT_BSTR && rgvarg[2].vt == VT_I4 - && rgvarg[3].vt == (VT_BYREF | VT_BOOL) && rgvarg[4].vt == (VT_BYREF | VT_DISPATCH)) - { - BSTR url = rgvarg[0].bstrVal; - BSTR urlContext = rgvarg[1].bstrVal; - LONG flags = rgvarg[2].lVal; - VARIANT_BOOL *cancel = rgvarg[3].pboolVal; - IDispatch **dis = rgvarg[4].ppdispVal; - *dis = NULL; - *cancel = VARIANT_TRUE; // forbit to create new window - loadURL(url); - return S_OK; - } - } - break; - - default: - break; - } - return E_NOTIMPL; -} - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 diff --git a/cocos/ui/UIWebViewImpl-win32.h b/cocos/ui/UIWebViewImpl-win32.h deleted file mode 100644 index e9749a07b3..0000000000 --- a/cocos/ui/UIWebViewImpl-win32.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - Author: Jeff Wang - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __COCOS2D__UI__WEBVIEWIMPL_WIN32_H_ -#define __COCOS2D__UI__WEBVIEWIMPL_WIN32_H_ - -#include "platform/CCPlatformConfig.h" - -#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - -#include -#include "CCStdC.h" - -namespace cocos2d { - class Data; - class Renderer; - class Mat4; - - namespace experimental { - namespace ui { - class WebView; - } - } -} - -class Win32WebControl; - -namespace cocos2d { - namespace experimental { - namespace ui { - - class WebViewImpl - { - public: - WebViewImpl(cocos2d::experimental::ui::WebView *webView); - virtual ~WebViewImpl(); - - void setJavascriptInterfaceScheme(const std::string &scheme); - void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); - void loadHTMLString(const std::string &string, const std::string &baseURL); - void loadURL(const std::string &url); - void loadFile(const std::string &fileName); - void stopLoading(); - void reload(); - bool canGoBack(); - bool canGoForward(); - void goBack(); - void goForward(); - void evaluateJS(const std::string &js); - void setScalesPageToFit(const bool scalesPageToFit); - - virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); - virtual void setVisible(bool visible); - - private: - bool _createSucceeded; - Win32WebControl *_systemWebControl; - WebView *_webView; - }; - } // namespace ui - } // namespace experimental -} //cocos2d - -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - -#endif // __COCOS2D__UI__WEBVIEWIMPL_WIN32_H_ diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj b/cocos/ui/proj.wp8/libGUI.vcxproj deleted file mode 100644 index ca3199c465..0000000000 --- a/cocos/ui/proj.wp8/libGUI.vcxproj +++ /dev/null @@ -1,225 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {08FB23E4-1517-4EDC-B682-DA238CDAA83D} - libGUI - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - false - true - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - true - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WP8;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - true - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj.filters b/cocos/ui/proj.wp8/libGUI.vcxproj.filters deleted file mode 100644 index d4c7c2e197..0000000000 --- a/cocos/ui/proj.wp8/libGUI.vcxproj.filters +++ /dev/null @@ -1,186 +0,0 @@ - - - - - {e31ab7d3-b8b2-467f-9e08-fd5fe168b491} - - - {f9d13563-9e5e-4b35-b0e7-d41f587efa42} - - - {ed8a2ae0-5690-4d0d-829b-7c07164c0597} - - - {5f6e9e52-fbe7-4073-ac71-98632f9e6781} - - - {b59b178a-b7e0-4826-ba07-44c46cd29a10} - - - - - Layouts - - - Layouts - - - System - - - System - - - UIWidgets\ScrollWidget - - - UIWidgets\ScrollWidget - - - UIWidgets\ScrollWidget - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - BaseClasses - - - Layouts - - - UIWidgets - - - Layouts - - - Layouts - - - System - - - BaseClasses - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - Layouts - - - - - Layouts - - - Layouts - - - System - - - System - - - UIWidgets\ScrollWidget - - - UIWidgets\ScrollWidget - - - UIWidgets\ScrollWidget - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - UIWidgets - - - BaseClasses - - - Layouts - - - UIWidgets - - - Layouts - - - Layouts - - - System - - - BaseClasses - - - UIWidgets - - - UIWidgets - - - Layouts - - - \ No newline at end of file diff --git a/extensions/Android.mk b/extensions/Android.mk index 2603f2f3d2..116dfc8cda 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -7,6 +7,11 @@ LOCAL_MODULE_FILENAME := libextension LOCAL_SRC_FILES := \ assets-manager/AssetsManager.cpp \ +assets-manager/Downloader.cpp \ +assets-manager/Manifest.cpp \ +assets-manager/AssetsManagerEx.cpp \ +assets-manager/CCEventAssetsManagerEx.cpp \ +assets-manager/CCEventListenerAssetsManagerEx.cpp \ GUI/CCControlExtension/CCControl.cpp \ GUI/CCControlExtension/CCControlButton.cpp \ GUI/CCControlExtension/CCControlColourPicker.cpp \ @@ -28,21 +33,12 @@ LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static LOCAL_STATIC_LIBRARIES += box2d_static -GU/CCEditBox/CCEditBox.cpp \ -GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ -GUI/CCEditBox/CCEditBoxImplNone.cpp \ -GUI/CCEditBox/CCEditBoxImplWin.cpp \ LOCAL_CXXFLAGS += -fexceptions -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../cocos \ - $(LOCAL_PATH)/../cocos/platform/android \ - $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ - $(LOCAL_PATH)/../external/curl/include/android \ - $(LOCAL_PATH)/../external/unzip +LOCAL_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/. \ + $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/GUI/CCControlExtension \ $(LOCAL_PATH)/GUI/CCScrollView diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index b5b057e8c2..fd212cba4e 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -22,6 +22,11 @@ include_directories( set(COCOS_EXTENSIONS_SRC ../extensions/assets-manager/AssetsManager.cpp + ../extensions/assets-manager/AssetsManagerEx.cpp + ../extensions/assets-manager/CCEventAssetsManagerEx.cpp + ../extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp + ../extensions/assets-manager/Downloader.cpp + ../extensions/assets-manager/Manifest.cpp ../extensions/GUI/CCControlExtension/CCControl.cpp ../extensions/GUI/CCControlExtension/CCControlButton.cpp ../extensions/GUI/CCControlExtension/CCControlColourPicker.cpp diff --git a/extensions/ExtensionExport.h b/extensions/ExtensionExport.h index 5360f249b1..837df61c54 100644 --- a/extensions/ExtensionExport.h +++ b/extensions/ExtensionExport.h @@ -1,7 +1,7 @@ #ifndef __CCEXTENSIONEXPORT_H__ #define __CCEXTENSIONEXPORT_H__ -#if defined(WIN32) && defined(_WINDOWS) +#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8) #ifdef __MINGW32__ #include #endif diff --git a/extensions/assets-manager/AssetsManager.cpp b/extensions/assets-manager/AssetsManager.cpp index 241243199b..d3f57bb3e4 100644 --- a/extensions/assets-manager/AssetsManager.cpp +++ b/extensions/assets-manager/AssetsManager.cpp @@ -450,7 +450,16 @@ bool AssetsManager::uncompress() */ bool AssetsManager::createDirectory(const char *path) { -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) + return FileUtils::getInstance()->createDirectory(_storagePath.c_str()); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + BOOL ret = CreateDirectoryA(path, nullptr); + if (!ret && ERROR_ALREADY_EXISTS != GetLastError()) + { + return false; + } + return true; +#else mode_t processMask = umask(0); int ret = mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO); umask(processMask); @@ -458,16 +467,11 @@ bool AssetsManager::createDirectory(const char *path) { return false; } - - return true; -#else - BOOL ret = CreateDirectoryA(path, nullptr); - if (!ret && ERROR_ALREADY_EXISTS != GetLastError()) - { - return false; - } + return true; #endif + + } void AssetsManager::setSearchPath() @@ -638,19 +642,20 @@ AssetsManager* AssetsManager::create(const char* packageUrl, const char* version void AssetsManager::createStoragePath() { // Remove downloaded files -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) + FileUtils::getInstance()->createDirectory(_storagePath.c_str()); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + if ((GetFileAttributesA(_storagePath.c_str())) == INVALID_FILE_ATTRIBUTES) + { + CreateDirectoryA(_storagePath.c_str(), 0); + } +#else DIR *dir = nullptr; - dir = opendir (_storagePath.c_str()); if (!dir) { mkdir(_storagePath.c_str(), S_IRWXU | S_IRWXG | S_IRWXO); } -#else - if ((GetFileAttributesA(_storagePath.c_str())) == INVALID_FILE_ATTRIBUTES) - { - CreateDirectoryA(_storagePath.c_str(), 0); - } #endif } @@ -660,16 +665,18 @@ void AssetsManager::destroyStoragePath() deleteVersion(); // Remove downloaded files -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) - string command = "rm -r "; - // Path may include space. - command += "\"" + _storagePath + "\""; - system(command.c_str()); -#else +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) + FileUtils::getInstance()->removeDirectory(_storagePath.c_str()); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) string command = "rd /s /q "; // Path may include space. command += "\"" + _storagePath + "\""; system(command.c_str()); +#else + string command = "rm -r "; + // Path may include space. + command += "\"" + _storagePath + "\""; + system(command.c_str()); #endif } diff --git a/extensions/assets-manager/AssetsManagerEx.cpp b/extensions/assets-manager/AssetsManagerEx.cpp new file mode 100644 index 0000000000..3011e81bda --- /dev/null +++ b/extensions/assets-manager/AssetsManagerEx.cpp @@ -0,0 +1,877 @@ +/**************************************************************************** + Copyright (c) 2014 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. + ****************************************************************************/ +#include "AssetsManagerEx.h" +#include "CCEventListenerAssetsManagerEx.h" +#include "cocos2d.h" + +#include +#include +#include + +#include "unzip.h" + +NS_CC_EXT_BEGIN + +#define VERSION_FILENAME "version.manifest" +#define TEMP_MANIFEST_FILENAME "project.manifest.temp" +#define MANIFEST_FILENAME "project.manifest" + +#define BUFFER_SIZE 8192 +#define MAX_FILENAME 512 + +#define DEFAULT_CONNECTION_TIMEOUT 8 + +const std::string AssetsManagerEx::VERSION_ID = "@version"; +const std::string AssetsManagerEx::MANIFEST_ID = "@manifest"; +const std::string AssetsManagerEx::BATCH_UPDATE_ID = "@batch_update"; + +// Implementation of AssetsManagerEx + +AssetsManagerEx::AssetsManagerEx(const std::string& manifestUrl, const std::string& storagePath) +: _updateState(State::UNCHECKED) +, _waitToUpdate(false) +, _totalToDownload(0) +, _totalWaitToDownload(0) +, _percent(0) +, _percentByFile(0) +, _manifestUrl(manifestUrl) +, _storagePath("") +, _cacheVersionPath("") +, _cacheManifestPath("") +, _tempManifestPath("") +, _assets(nullptr) +, _localManifest(nullptr) +, _tempManifest(nullptr) +, _remoteManifest(nullptr) +{ + // Init variables + _eventDispatcher = Director::getInstance()->getEventDispatcher(); + std::string pointer = StringUtils::format("%p", this); + _eventName = EventListenerAssetsManagerEx::LISTENER_ID + pointer; + _fileUtils = FileUtils::getInstance(); + _updateState = State::UNCHECKED; + + _downloader = std::make_shared(); + _downloader->setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT); + _downloader->_onError = std::bind(&AssetsManagerEx::onError, this, std::placeholders::_1); + _downloader->_onProgress = std::bind(&AssetsManagerEx::onProgress, + this, + std::placeholders::_1, + std::placeholders::_2, + std::placeholders::_3, + std::placeholders::_4); + _downloader->_onSuccess = std::bind(&AssetsManagerEx::onSuccess, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); + setStoragePath(storagePath); + _cacheVersionPath = _storagePath + VERSION_FILENAME; + _cacheManifestPath = _storagePath + MANIFEST_FILENAME; + _tempManifestPath = _storagePath + TEMP_MANIFEST_FILENAME; + + // Init and load local manifest + _localManifest = new Manifest(); + loadLocalManifest(manifestUrl); + + // Init and load temporary manifest + _tempManifest = new Manifest(); + _tempManifest->parse(_tempManifestPath); + if (!_tempManifest->isLoaded()) + _fileUtils->removeFile(_tempManifestPath); + + // Init remote manifest for future usage + _remoteManifest = new Manifest(); +} + +AssetsManagerEx::~AssetsManagerEx() +{ + _downloader->_onError = nullptr; + _downloader->_onSuccess = nullptr; + _downloader->_onProgress = nullptr; + CC_SAFE_RELEASE(_localManifest); + // _tempManifest could share a ptr with _remoteManifest or _localManifest + if (_tempManifest != _localManifest && _tempManifest != _remoteManifest) + CC_SAFE_RELEASE(_tempManifest); + CC_SAFE_RELEASE(_remoteManifest); +} + +AssetsManagerEx* AssetsManagerEx::create(const std::string& manifestUrl, const std::string& storagePath) +{ + AssetsManagerEx* ret = new AssetsManagerEx(manifestUrl, storagePath); + if (ret) + { + ret->autorelease(); + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; +} + +void AssetsManagerEx::prepareLocalManifest() +{ + // An alias to assets + _assets = &(_localManifest->getAssets()); + + // Add search paths + _localManifest->prependSearchPaths(); +} + +void AssetsManagerEx::loadLocalManifest(const std::string& manifestUrl) +{ + // Prefer to use the cached manifest file, if not found use user configured manifest file + if (_fileUtils->isFileExist(_cacheManifestPath)) + { + _localManifest->parse(_cacheManifestPath); + if (_localManifest->isLoaded()) + prepareLocalManifest(); + else + _fileUtils->removeFile(_cacheManifestPath); + } + + // Fail to found or load cached manifest file + if (!_localManifest->isLoaded()) + { + _localManifest->parse(_manifestUrl); + if (_localManifest->isLoaded()) + prepareLocalManifest(); + } + + // Fail to load local manifest + if (!_localManifest->isLoaded()) + { + CCLOG("AssetsManagerEx : No local manifest file found error.\n"); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_NO_LOCAL_MANIFEST); + } +} + +std::string AssetsManagerEx::basename(const std::string& path) const +{ + size_t found = path.find_last_of("/\\"); + + if (std::string::npos != found) + { + return path.substr(0, found); + } + else + { + return path; + } +} + +std::string AssetsManagerEx::get(const std::string& key) const +{ + auto it = _assets->find(key); + if (it != _assets->cend()) { + return _storagePath + it->second.path; + } + else return ""; +} + +const Manifest* AssetsManagerEx::getLocalManifest() const +{ + return _localManifest; +} + +const Manifest* AssetsManagerEx::getRemoteManifest() const +{ + return _remoteManifest; +} + +const std::string& AssetsManagerEx::getStoragePath() const +{ + return _storagePath; +} + +void AssetsManagerEx::setStoragePath(const std::string& storagePath) +{ + if (_storagePath.size() > 0) + _fileUtils->removeDirectory(_storagePath); + + _storagePath = storagePath; + adjustPath(_storagePath); + _fileUtils->createDirectory(_storagePath); +} + +void AssetsManagerEx::adjustPath(std::string &path) +{ + if (path.size() > 0 && path[path.size() - 1] != '/') + { + path.append("/"); + } +} + +bool AssetsManagerEx::decompress(const std::string &zip) +{ + // Find root path for zip file + size_t pos = zip.find_last_of("/\\"); + if (pos == std::string::npos) + { + CCLOG("AssetsManagerEx : no root path specified for zip file %s\n", zip.c_str()); + return false; + } + const std::string rootPath = zip.substr(0, pos+1); + + // Open the zip file + unzFile zipfile = unzOpen(zip.c_str()); + if (! zipfile) + { + CCLOG("AssetsManagerEx : can not open downloaded zip file %s\n", zip.c_str()); + return false; + } + + // Get info about the zip file + unz_global_info global_info; + if (unzGetGlobalInfo(zipfile, &global_info) != UNZ_OK) + { + CCLOG("AssetsManagerEx : can not read file global info of %s\n", zip.c_str()); + unzClose(zipfile); + return false; + } + + // Buffer to hold data read from the zip file + char readBuffer[BUFFER_SIZE]; + // Loop to extract all files. + uLong i; + for (i = 0; i < global_info.number_entry; ++i) + { + // Get info about current file. + unz_file_info fileInfo; + char fileName[MAX_FILENAME]; + if (unzGetCurrentFileInfo(zipfile, + &fileInfo, + fileName, + MAX_FILENAME, + NULL, + 0, + NULL, + 0) != UNZ_OK) + { + CCLOG("AssetsManagerEx : can not read compressed file info\n"); + unzClose(zipfile); + return false; + } + const std::string fullPath = rootPath + fileName; + + // Check if this entry is a directory or a file. + const size_t filenameLength = strlen(fileName); + if (fileName[filenameLength-1] == '/') + { + //There are not directory entry in some case. + //So we need to create directory when decompressing file entry + if ( !_fileUtils->createDirectory(basename(fullPath)) ) + { + // Failed to create directory + CCLOG("AssetsManagerEx : can not create directory %s\n", fullPath.c_str()); + unzClose(zipfile); + return false; + } + } + else + { + // Entry is a file, so extract it. + // Open current file. + if (unzOpenCurrentFile(zipfile) != UNZ_OK) + { + CCLOG("AssetsManagerEx : can not extract file %s\n", fileName); + unzClose(zipfile); + return false; + } + + // Create a file to store current file. + FILE *out = fopen(fullPath.c_str(), "wb"); + if (!out) + { + CCLOG("AssetsManagerEx : can not create decompress destination file %s\n", fullPath.c_str()); + unzCloseCurrentFile(zipfile); + unzClose(zipfile); + return false; + } + + // Write current file content to destinate file. + int error = UNZ_OK; + do + { + error = unzReadCurrentFile(zipfile, readBuffer, BUFFER_SIZE); + if (error < 0) + { + CCLOG("AssetsManagerEx : can not read zip file %s, error code is %d\n", fileName, error); + fclose(out); + unzCloseCurrentFile(zipfile); + unzClose(zipfile); + return false; + } + + if (error > 0) + { + fwrite(readBuffer, error, 1, out); + } + } while(error > 0); + + fclose(out); + } + + unzCloseCurrentFile(zipfile); + + // Goto next entry listed in the zip file. + if ((i+1) < global_info.number_entry) + { + if (unzGoToNextFile(zipfile) != UNZ_OK) + { + CCLOG("AssetsManagerEx : can not read next file for decompressing\n"); + unzClose(zipfile); + return false; + } + } + } + + unzClose(zipfile); + return true; +} + +void AssetsManagerEx::decompressDownloadedZip() +{ + // Decompress all compressed files + for (auto it = _compressedFiles.begin(); it != _compressedFiles.end(); ++it) { + std::string zipfile = *it; + if (!decompress(zipfile)) + { + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_DECOMPRESS, "", "Unable to decompress file " + zipfile); + } + _fileUtils->removeFile(zipfile); + } + _compressedFiles.clear(); +} + +void AssetsManagerEx::dispatchUpdateEvent(EventAssetsManagerEx::EventCode code, const std::string &assetId/* = ""*/, const std::string &message/* = ""*/, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/) +{ + EventAssetsManagerEx event(_eventName, this, code, _percent, _percentByFile, assetId, message, curle_code, curlm_code); + _eventDispatcher->dispatchEvent(&event); +} + +AssetsManagerEx::State AssetsManagerEx::getState() const +{ + return _updateState; +} + +void AssetsManagerEx::downloadVersion() +{ + if (_updateState > State::PREDOWNLOAD_VERSION) + return; + + std::string versionUrl = _localManifest->getVersionFileUrl(); + + if (versionUrl.size() > 0) + { + _updateState = State::DOWNLOADING_VERSION; + // Download version file asynchronously + _downloader->downloadAsync(versionUrl, _cacheVersionPath, VERSION_ID); + } + // No version file found + else + { + CCLOG("AssetsManagerEx : No version file found, step skipped\n"); + _updateState = State::PREDOWNLOAD_MANIFEST; + downloadManifest(); + } +} + +void AssetsManagerEx::parseVersion() +{ + if (_updateState != State::VERSION_LOADED) + return; + + _remoteManifest->parse(_cacheVersionPath); + + if (!_remoteManifest->isVersionLoaded()) + { + CCLOG("AssetsManagerEx : Fail to parse version file, step skipped\n"); + _updateState = State::PREDOWNLOAD_MANIFEST; + downloadManifest(); + } + else + { + if (_localManifest->versionEquals(_remoteManifest)) + { + _updateState = State::UP_TO_DATE; + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ALREADY_UP_TO_DATE); + } + else + { + _updateState = State::NEED_UPDATE; + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::NEW_VERSION_FOUND); + + // Wait to update so continue the process + if (_waitToUpdate) + { + _updateState = State::PREDOWNLOAD_MANIFEST; + downloadManifest(); + } + } + } +} + +void AssetsManagerEx::downloadManifest() +{ + if (_updateState != State::PREDOWNLOAD_MANIFEST) + return; + + std::string manifestUrl = _localManifest->getManifestFileUrl(); + if (manifestUrl.size() > 0) + { + _updateState = State::DOWNLOADING_MANIFEST; + // Download version file asynchronously + _downloader->downloadAsync(manifestUrl, _tempManifestPath, MANIFEST_ID); + } + // No manifest file found + else + { + CCLOG("AssetsManagerEx : No manifest file found, check update failed\n"); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_DOWNLOAD_MANIFEST); + _updateState = State::UNCHECKED; + } +} + +void AssetsManagerEx::parseManifest() +{ + if (_updateState != State::MANIFEST_LOADED) + return; + + _remoteManifest->parse(_tempManifestPath); + + if (!_remoteManifest->isLoaded()) + { + CCLOG("AssetsManagerEx : Error parsing manifest file\n"); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_PARSE_MANIFEST); + _updateState = State::UNCHECKED; + } + else + { + if (_localManifest->versionEquals(_remoteManifest)) + { + _updateState = State::UP_TO_DATE; + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ALREADY_UP_TO_DATE); + } + else + { + _updateState = State::NEED_UPDATE; + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::NEW_VERSION_FOUND); + + if (_waitToUpdate) + { + startUpdate(); + } + } + } +} + +void AssetsManagerEx::startUpdate() +{ + if (_updateState != State::NEED_UPDATE) + return; + + _updateState = State::UPDATING; + // Clean up before update + _failedUnits.clear(); + _downloadUnits.clear(); + _compressedFiles.clear(); + _totalWaitToDownload = _totalToDownload = 0; + _percent = _percentByFile = _sizeCollected = _totalSize = 0; + _downloadedSize.clear(); + _totalEnabled = false; + + // Temporary manifest exists, resuming previous download + if (_tempManifest->isLoaded() && _tempManifest->versionEquals(_remoteManifest)) + { + _tempManifest->genResumeAssetsList(&_downloadUnits); + + _totalWaitToDownload = _totalToDownload = (int)_downloadUnits.size(); + _downloader->batchDownloadAsync(_downloadUnits, BATCH_UPDATE_ID); + + std::string msg = StringUtils::format("Resuming from previous unfinished update, %d files remains to be finished.", _totalToDownload); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, "", msg); + } + // Check difference + else + { + // Temporary manifest not exists, + // it will be used to register the download states of each asset, + // in this case, it equals remote manifest. + if(!_tempManifest->isLoaded()) { + _tempManifest->release(); + _tempManifest = _remoteManifest; + } + + std::unordered_map diff_map = _localManifest->genDiff(_remoteManifest); + if (diff_map.size() == 0) + { + _updateState = State::UP_TO_DATE; + // Rename temporary manifest to valid manifest + _fileUtils->renameFile(_storagePath, TEMP_MANIFEST_FILENAME, MANIFEST_FILENAME); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ALREADY_UP_TO_DATE); + } + else + { + // Generate download units for all assets that need to be updated or added + std::string packageUrl = _remoteManifest->getPackageUrl(); + for (auto it = diff_map.begin(); it != diff_map.end(); ++it) + { + Manifest::AssetDiff diff = it->second; + + if (diff.type == Manifest::DiffType::DELETED) + { + _fileUtils->removeFile(_storagePath + diff.asset.path); + } + else + { + std::string path = diff.asset.path; + // Create path + _fileUtils->createDirectory(basename(_storagePath + path)); + + Downloader::DownloadUnit unit; + unit.customId = it->first; + unit.srcUrl = packageUrl + path; + unit.storagePath = _storagePath + path; + unit.resumeDownload = false; + _downloadUnits.emplace(unit.customId, unit); + } + } + // Set other assets' downloadState to SUCCESSED + auto assets = _remoteManifest->getAssets(); + for (auto it = assets.cbegin(); it != assets.cend(); ++it) + { + const std::string &key = it->first; + auto diffIt = diff_map.find(key); + if (diffIt == diff_map.end()) + { + _tempManifest->setAssetDownloadState(key, Manifest::DownloadState::SUCCESSED); + } + } + + _totalWaitToDownload = _totalToDownload = (int)_downloadUnits.size(); + _downloader->batchDownloadAsync(_downloadUnits, BATCH_UPDATE_ID); + + std::string msg = StringUtils::format("Start to update %d files from remote package.", _totalToDownload); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, "", msg); + } + } + + _waitToUpdate = false; +} + +void AssetsManagerEx::updateSucceed() +{ + // Every thing is correctly downloaded, do the following + // 1. rename temporary manifest to valid manifest + _fileUtils->renameFile(_storagePath, TEMP_MANIFEST_FILENAME, MANIFEST_FILENAME); + // 2. swap the localManifest + if (_localManifest != nullptr) + _localManifest->release(); + _localManifest = _remoteManifest; + _remoteManifest = nullptr; + // 3. make local manifest take effect + prepareLocalManifest(); + // 4. decompress all compressed files + decompressDownloadedZip(); + // 5. Set update state + _updateState = State::UP_TO_DATE; + // 6. Notify finished event + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_FINISHED); +} + +void AssetsManagerEx::checkUpdate() +{ + if (!_localManifest->isLoaded()) + { + CCLOG("AssetsManagerEx : No local manifest file found error.\n"); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_NO_LOCAL_MANIFEST); + return; + } + + switch (_updateState) { + case State::UNCHECKED: + case State::PREDOWNLOAD_VERSION: + { + downloadVersion(); + } + break; + case State::UP_TO_DATE: + { + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ALREADY_UP_TO_DATE); + } + break; + case State::FAIL_TO_UPDATE: + case State::NEED_UPDATE: + { + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::NEW_VERSION_FOUND); + } + break; + default: + break; + } +} + +void AssetsManagerEx::update() +{ + if (!_localManifest->isLoaded()) + { + CCLOG("AssetsManagerEx : No local manifest file found error.\n"); + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_NO_LOCAL_MANIFEST); + return; + } + + _waitToUpdate = true; + + switch (_updateState) { + case State::UNCHECKED: + { + _updateState = State::PREDOWNLOAD_VERSION; + } + case State::PREDOWNLOAD_VERSION: + { + downloadVersion(); + } + break; + case State::VERSION_LOADED: + { + parseVersion(); + } + break; + case State::PREDOWNLOAD_MANIFEST: + { + downloadManifest(); + } + break; + case State::MANIFEST_LOADED: + { + parseManifest(); + } + break; + case State::FAIL_TO_UPDATE: + case State::NEED_UPDATE: + { + // Manifest not loaded yet + if (!_remoteManifest->isLoaded()) + { + _waitToUpdate = true; + _updateState = State::PREDOWNLOAD_MANIFEST; + downloadManifest(); + } + else + { + startUpdate(); + } + } + break; + case State::UP_TO_DATE: + case State::UPDATING: + _waitToUpdate = false; + break; + default: + break; + } +} + +void AssetsManagerEx::updateAssets(const Downloader::DownloadUnits& assets) +{ + if (_updateState != State::UPDATING && _localManifest->isLoaded() && _remoteManifest->isLoaded()) + { + int size = (int)(assets.size()); + if (size > 0) + { + _updateState = State::UPDATING; + _downloadUnits.clear(); + _downloadUnits = assets; + _downloader->batchDownloadAsync(_downloadUnits, BATCH_UPDATE_ID); + } + else if (size == 0 && _totalWaitToDownload == 0) + { + updateSucceed(); + } + } +} + +const Downloader::DownloadUnits& AssetsManagerEx::getFailedAssets() const +{ + return _failedUnits; +} + +void AssetsManagerEx::downloadFailedAssets() +{ + CCLOG("AssetsManagerEx : Start update %lu failed assets.\n", _failedUnits.size()); + updateAssets(_failedUnits); +} + + +void AssetsManagerEx::onError(const Downloader::Error &error) +{ + // Skip version error occured + if (error.customId == VERSION_ID) + { + CCLOG("AssetsManagerEx : Fail to download version file, step skipped\n"); + _updateState = State::PREDOWNLOAD_MANIFEST; + downloadManifest(); + } + else if (error.customId == MANIFEST_ID) + { + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_DOWNLOAD_MANIFEST, error.customId, error.message, error.curle_code, error.curlm_code); + } + else + { + auto unitIt = _downloadUnits.find(error.customId); + // Found unit and add it to failed units + if (unitIt != _downloadUnits.end()) + { + Downloader::DownloadUnit unit = unitIt->second; + _failedUnits.emplace(unit.customId, unit); + } + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ERROR_UPDATING, error.customId, error.message, error.curle_code, error.curlm_code); + } +} + +void AssetsManagerEx::onProgress(double total, double downloaded, const std::string &url, const std::string &customId) +{ + if (customId == VERSION_ID || customId == MANIFEST_ID) + { + _percent = 100 * (total - downloaded) / total; + // Notify progression event + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, customId); + return; + } + else + { + // Calcul total downloaded + bool found = false; + double totalDownloaded = 0; + for (auto it = _downloadedSize.begin(); it != _downloadedSize.end(); ++it) + { + if (it->first == customId) + { + it->second = downloaded; + found = true; + } + totalDownloaded += it->second; + } + // Collect information if not registed + if (!found) + { + // Set download state to DOWNLOADING, this will run only once in the download process + _tempManifest->setAssetDownloadState(customId, Manifest::DownloadState::DOWNLOADING); + // Register the download size information + _downloadedSize.emplace(customId, downloaded); + _totalSize += total; + _sizeCollected++; + // All collected, enable total size + if (_sizeCollected == _totalToDownload) + { + _totalEnabled = true; + } + } + + if (_totalEnabled && _updateState == State::UPDATING) + { + float currentPercent = 100 * totalDownloaded / _totalSize; + // Notify at integer level change + if ((int)currentPercent != (int)_percent) { + _percent = currentPercent; + // Notify progression event + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, ""); + } + } + } +} + +void AssetsManagerEx::onSuccess(const std::string &srcUrl, const std::string &storagePath, const std::string &customId) +{ + if (customId == VERSION_ID) + { + _updateState = State::VERSION_LOADED; + parseVersion(); + } + else if (customId == MANIFEST_ID) + { + _updateState = State::MANIFEST_LOADED; + parseManifest(); + } + else if (customId == BATCH_UPDATE_ID) + { + // Finished with error check + if (_failedUnits.size() > 0 || _totalWaitToDownload > 0) + { + // Save current download manifest information for resuming + _tempManifest->saveToFile(_tempManifestPath); + + decompressDownloadedZip(); + + _updateState = State::FAIL_TO_UPDATE; + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_FAILED); + } + else + { + updateSucceed(); + } + } + else + { + auto assets = _remoteManifest->getAssets(); + auto assetIt = assets.find(customId); + if (assetIt != assets.end()) + { + // Set download state to SUCCESSED + _tempManifest->setAssetDownloadState(customId, Manifest::DownloadState::SUCCESSED); + + // Add file to need decompress list + if (assetIt->second.compressed) { + _compressedFiles.push_back(storagePath); + } + } + + auto unitIt = _downloadUnits.find(customId); + if (unitIt != _downloadUnits.end()) + { + // Reduce count only when unit found in _downloadUnits + _totalWaitToDownload--; + + _percentByFile = 100 * (float)(_totalToDownload - _totalWaitToDownload) / _totalToDownload; + // Notify progression event + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, ""); + } + // Notify asset updated event + dispatchUpdateEvent(EventAssetsManagerEx::EventCode::ASSET_UPDATED, customId); + + unitIt = _failedUnits.find(customId); + // Found unit and delete it + if (unitIt != _failedUnits.end()) + { + // Remove from failed units list + _failedUnits.erase(unitIt); + } + } +} + +void AssetsManagerEx::destroyDownloadedVersion() +{ + _fileUtils->removeFile(_cacheVersionPath); + _fileUtils->removeFile(_cacheManifestPath); +} + +NS_CC_EXT_END diff --git a/extensions/assets-manager/AssetsManagerEx.h b/extensions/assets-manager/AssetsManagerEx.h new file mode 100644 index 0000000000..8e2afcc769 --- /dev/null +++ b/extensions/assets-manager/AssetsManagerEx.h @@ -0,0 +1,266 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#ifndef __AssetsManagerEx__ +#define __AssetsManagerEx__ + +#include "base/CCEventDispatcher.h" +#include "platform/CCFileUtils.h" +#include "CCEventAssetsManagerEx.h" +#include "Downloader.h" +#include "Manifest.h" +#include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" +#include "json/document.h" + +#include +#include +#include + +NS_CC_EXT_BEGIN + +/** + * @brief This class is used to auto update resources, such as pictures or scripts. + */ +class CC_EX_DLL AssetsManagerEx : public Ref +{ +public: + + friend class Downloader; + friend int downloadProgressFunc(Downloader::ProgressData *ptr, double totalToDownload, double nowDownloaded, double totalToUpLoad, double nowUpLoaded); + + //! Update states + enum class State + { + UNCHECKED, + PREDOWNLOAD_VERSION, + DOWNLOADING_VERSION, + VERSION_LOADED, + PREDOWNLOAD_MANIFEST, + DOWNLOADING_MANIFEST, + MANIFEST_LOADED, + NEED_UPDATE, + UPDATING, + UP_TO_DATE, + FAIL_TO_UPDATE + }; + + const static std::string VERSION_ID; + const static std::string MANIFEST_ID; + const static std::string BATCH_UPDATE_ID; + + /** @brief Create function for creating a new AssetsManagerEx + @param manifestUrl The url for the local manifest file + @param storagePath The storage path for downloaded assetes + @warning The cached manifest in your storage path have higher priority and will be searched first, + only if it doesn't exist, AssetsManagerEx will use the given manifestUrl. + */ + static AssetsManagerEx* create(const std::string &manifestUrl, const std::string &storagePath); + + /** @brief Check out if there is a new version of manifest. + * You may use this method before updating, then let user determine whether + * he wants to update resources. + */ + void checkUpdate(); + + /** @brief Update with the current local manifest. + */ + void update(); + + /** @brief Reupdate all failed assets under the current AssetsManagerEx context + */ + void downloadFailedAssets(); + + /** @brief Gets the current update state. + */ + State getState() const; + + /** @brief Gets storage path. + */ + const std::string& getStoragePath() const; + + /** @brief Function for retrieve the local manifest object + */ + const Manifest* getLocalManifest() const; + + /** @brief Function for retrieve the remote manifest object + */ + const Manifest* getRemoteManifest() const; + +CC_CONSTRUCTOR_ACCESS: + + AssetsManagerEx(const std::string& manifestUrl, const std::string& storagePath); + + virtual ~AssetsManagerEx(); + +protected: + + std::string basename(const std::string& path) const; + + std::string get(const std::string& key) const; + + void loadLocalManifest(const std::string& manifestUrl); + + void prepareLocalManifest(); + + void setStoragePath(const std::string& storagePath); + + void adjustPath(std::string &path); + + void dispatchUpdateEvent(EventAssetsManagerEx::EventCode code, const std::string &message = "", const std::string &assetId = "", int curle_code = 0, int curlm_code = 0); + + void downloadVersion(); + void parseVersion(); + void downloadManifest(); + void parseManifest(); + void startUpdate(); + void updateSucceed(); + bool decompress(const std::string &filename); + void decompressDownloadedZip(); + + /** @brief Update a list of assets under the current AssetsManagerEx context + */ + void updateAssets(const Downloader::DownloadUnits& assets); + + /** @brief Retrieve all failed assets during the last update + */ + const Downloader::DownloadUnits& getFailedAssets() const; + + /** @brief Function for destorying the downloaded version file and manifest file + */ + void destroyDownloadedVersion(); + + /** @brief Call back function for error handling, + the error will then be reported to user's listener registed in addUpdateEventListener + @param error The error object contains ErrorCode, message, asset url, asset key + @warning AssetsManagerEx internal use only + * @js NA + * @lua NA + */ + virtual void onError(const Downloader::Error &error); + + /** @brief Call back function for recording downloading percent of the current asset, + the progression will then be reported to user's listener registed in addUpdateProgressEventListener + @param total Total size to download for this asset + @param downloaded Total size already downloaded for this asset + @param url The url of this asset + @param customId The key of this asset + @warning AssetsManagerEx internal use only + * @js NA + * @lua NA + */ + virtual void onProgress(double total, double downloaded, const std::string &url, const std::string &customId); + + /** @brief Call back function for success of the current asset + the success event will then be send to user's listener registed in addUpdateEventListener + @param srcUrl The url of this asset + @param customId The key of this asset + @warning AssetsManagerEx internal use only + * @js NA + * @lua NA + */ + virtual void onSuccess(const std::string &srcUrl, const std::string &storagePath, const std::string &customId); + +private: + + //! The event of the current AssetsManagerEx in event dispatcher + std::string _eventName; + + //! Reference to the global event dispatcher + EventDispatcher *_eventDispatcher; + //! Reference to the global file utils + FileUtils *_fileUtils; + + //! State of update + State _updateState; + + //! Downloader + std::shared_ptr _downloader; + + //! The reference to the local assets + const std::unordered_map *_assets; + + //! The path to store downloaded resources. + std::string _storagePath; + + //! The local path of cached version file + std::string _cacheVersionPath; + + //! The local path of cached manifest file + std::string _cacheManifestPath; + + //! The local path of cached temporary manifest file + std::string _tempManifestPath; + + //! The path of local manifest file + std::string _manifestUrl; + + //! Local manifest + Manifest *_localManifest; + + //! Local temporary manifest for download resuming + Manifest *_tempManifest; + + //! Remote manifest + Manifest *_remoteManifest; + + //! Whether user have requested to update + bool _waitToUpdate; + + //! All assets unit to download + Downloader::DownloadUnits _downloadUnits; + + //! All failed units + Downloader::DownloadUnits _failedUnits; + + //! All files to be decompressed + std::vector _compressedFiles; + + //! Download percent + float _percent; + + //! Download percent by file + float _percentByFile; + + //! Indicate whether the total size should be enabled + int _totalEnabled; + + //! Indicate the number of file whose total size have been collected + int _sizeCollected; + + //! Total file size need to be downloaded (sum of all file) + double _totalSize; + + //! Downloaded size for each file + std::unordered_map _downloadedSize; + + //! Total number of assets to download + int _totalToDownload; + //! Total number of assets still waiting to be downloaded + int _totalWaitToDownload; +}; + +NS_CC_EXT_END + +#endif /* defined(__AssetsManagerEx__) */ diff --git a/extensions/assets-manager/CCEventAssetsManagerEx.cpp b/extensions/assets-manager/CCEventAssetsManagerEx.cpp new file mode 100644 index 0000000000..ba2c0f8d2f --- /dev/null +++ b/extensions/assets-manager/CCEventAssetsManagerEx.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "CCEventAssetsManagerEx.h" +#include "base/ccMacros.h" +#include +#include "AssetsManagerEx.h" + +NS_CC_EXT_BEGIN + +EventAssetsManagerEx::EventAssetsManagerEx(const std::string& eventName, cocos2d::extension::AssetsManagerEx *manager, const EventCode &code, float percent/* = 0 */, float percentByFile/* = 0*/, const std::string& assetId/* = "" */, const std::string& message/* = "" */, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/) +: EventCustom(eventName) +, _manager(manager) +, _code(code) +, _curle_code(curle_code) +, _curlm_code(curlm_code) +, _percent(percent) +, _percentByFile(percentByFile) +, _assetId(assetId) +, _message(message) +{ +} + + +NS_CC_EXT_END diff --git a/extensions/assets-manager/CCEventAssetsManagerEx.h b/extensions/assets-manager/CCEventAssetsManagerEx.h new file mode 100644 index 0000000000..a94b39b1e6 --- /dev/null +++ b/extensions/assets-manager/CCEventAssetsManagerEx.h @@ -0,0 +1,99 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_libs__CCEventAssetsManagerEx__ +#define __cocos2d_libs__CCEventAssetsManagerEx__ + +#include "base/CCEvent.h" +#include "base/CCEventCustom.h" +#include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" + +NS_CC_EXT_BEGIN + +class AssetsManagerEx; + +class CC_EX_DLL EventAssetsManagerEx : public cocos2d::EventCustom +{ +public: + + friend class AssetsManagerEx; + + //! Update events code + enum class EventCode + { + ERROR_NO_LOCAL_MANIFEST, + ERROR_DOWNLOAD_MANIFEST, + ERROR_PARSE_MANIFEST, + NEW_VERSION_FOUND, + ALREADY_UP_TO_DATE, + UPDATE_PROGRESSION, + ASSET_UPDATED, + ERROR_UPDATING, + UPDATE_FINISHED, + UPDATE_FAILED, + ERROR_DECOMPRESS + }; + + inline EventCode getEventCode() const { return _code; }; + + inline int getCURLECode() const { return _curle_code; }; + + inline int getCURLMCode() const { return _curlm_code; }; + + inline std::string getMessage() const { return _message; }; + + inline std::string getAssetId() const { return _assetId; }; + + inline cocos2d::extension::AssetsManagerEx *getAssetsManagerEx() const { return _manager; }; + + inline float getPercent() const { return _percent; }; + + inline float getPercentByFile() const { return _percentByFile; }; + +CC_CONSTRUCTOR_ACCESS: + /** Constructor */ + EventAssetsManagerEx(const std::string& eventName, cocos2d::extension::AssetsManagerEx *manager, const EventCode &code, float percent = 0, float percentByFile = 0, const std::string& assetId = "", const std::string& message = "", int curle_code = 0, int curlm_code = 0); + +private: + EventCode _code; + + cocos2d::extension::AssetsManagerEx *_manager; + + std::string _message; + + std::string _assetId; + + int _curle_code; + + int _curlm_code; + + float _percent; + + float _percentByFile; +}; + +NS_CC_EXT_END + +#endif /* defined(__cocos2d_libs__CCEventAssetsManagerEx__) */ diff --git a/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp b/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp new file mode 100644 index 0000000000..99045c2e06 --- /dev/null +++ b/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "CCEventListenerAssetsManagerEx.h" +#include "CCEventAssetsManagerEx.h" +#include "AssetsManagerEx.h" +#include "cocos2d.h" + +NS_CC_EXT_BEGIN + +const std::string EventListenerAssetsManagerEx::LISTENER_ID = "__cc_assets_manager_"; + +EventListenerAssetsManagerEx::EventListenerAssetsManagerEx() +: _onAssetsManagerExEvent(nullptr) +, _AssetsManagerEx(nullptr) +{ +} + +EventListenerAssetsManagerEx* EventListenerAssetsManagerEx::create(cocos2d::extension::AssetsManagerEx *AssetsManagerEx, const std::function& callback) +{ + EventListenerAssetsManagerEx* ret = new EventListenerAssetsManagerEx(); + if (ret && ret->init(AssetsManagerEx, callback)) + { + ret->autorelease(); + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; +} + +bool EventListenerAssetsManagerEx::init(const AssetsManagerEx *AssetsManagerEx, const std::function& callback) +{ + bool ret = false; + + _AssetsManagerEx = AssetsManagerEx; + _onAssetsManagerExEvent = callback; + + auto func = [this](EventCustom *event) -> void + { + EventAssetsManagerEx *eventAssetsManagerEx = dynamic_cast(event); + _onAssetsManagerExEvent(eventAssetsManagerEx); + }; + std::string pointer = StringUtils::format("%p", AssetsManagerEx); + if (EventListenerCustom::init(LISTENER_ID + pointer, func)) + { + ret = true; + } + return ret; +} + +EventListenerAssetsManagerEx* EventListenerAssetsManagerEx::clone() +{ + EventListenerAssetsManagerEx* ret = new EventListenerAssetsManagerEx(); + if (ret && ret->init(_AssetsManagerEx, _onAssetsManagerExEvent)) + { + ret->autorelease(); + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; +} + +bool EventListenerAssetsManagerEx::checkAvailable() +{ + bool ret = false; + if (EventListener::checkAvailable() && _AssetsManagerEx != nullptr && _onAssetsManagerExEvent != nullptr) + { + ret = true; + } + return ret; +} + +NS_CC_EXT_END \ No newline at end of file diff --git a/extensions/assets-manager/CCEventListenerAssetsManagerEx.h b/extensions/assets-manager/CCEventListenerAssetsManagerEx.h new file mode 100644 index 0000000000..03693d49ee --- /dev/null +++ b/extensions/assets-manager/CCEventListenerAssetsManagerEx.h @@ -0,0 +1,86 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_libs__CCEventListenerAssetsManagerEx__ +#define __cocos2d_libs__CCEventListenerAssetsManagerEx__ + +#include "base/CCEventListener.h" +#include "base/CCEventListenerCustom.h" +#include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" + +NS_CC_EXT_BEGIN + +class EventAssetsManagerEx; +class AssetsManagerEx; + +/** + * Usage: + * auto dispatcher = Director::getInstance()->getEventDispatcher(); + * auto manager = AssetsManagerEx::create(manifestUrl, storagePath); + * Adds a listener: + * + * auto callback = [](EventAssetsManagerEx* event){ do_some_thing(); }; + * auto listener = EventListenerAssetsManagerEx::create(manager, callback); + * dispatcher->addEventListenerWithSceneGraphPriority(listener, one_node); + * + * Removes a listener + * + * dispatcher->removeEventListener(listener); + */ +class CC_EX_DLL EventListenerAssetsManagerEx : public cocos2d::EventListenerCustom +{ +public: + friend class AssetsManagerEx; + + /** Creates an event listener with type and callback. + * @param eventType The type of the event. + * @param callback The callback function when the specified event was emitted. + */ + static EventListenerAssetsManagerEx* create(AssetsManagerEx *AssetsManagerEx, const std::function& callback); + + /// Overrides + virtual bool checkAvailable() override; + virtual EventListenerAssetsManagerEx* clone() override; + +CC_CONSTRUCTOR_ACCESS: + /** Constructor */ + EventListenerAssetsManagerEx(); + + /** Initializes event with type and callback function */ + bool init(const AssetsManagerEx *AssetsManagerEx, const std::function& callback); + +protected: + static const std::string LISTENER_ID; + + std::function _onAssetsManagerExEvent; + + const AssetsManagerEx *_AssetsManagerEx; + + //friend class luaEventListenerAssetsManagerEx; +}; + +NS_CC_EXT_END + +#endif /* defined(__cocos2d_libs__CCEventListenerAssetsManagerEx__) */ diff --git a/extensions/assets-manager/Downloader.cpp b/extensions/assets-manager/Downloader.cpp new file mode 100644 index 0000000000..7e8ef08c4a --- /dev/null +++ b/extensions/assets-manager/Downloader.cpp @@ -0,0 +1,680 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#include "Downloader.h" +#include "cocos2d.h" +#include +#include +#include +#include + +NS_CC_EXT_BEGIN + +#define LOW_SPEED_LIMIT 1L +#define LOW_SPEED_TIME 5L +#define MAX_REDIRS 2 +#define DEFAULT_TIMEOUT 5 +#define HTTP_CODE_SUPPORT_RESUME 206 + +#define TEMP_EXT ".temp" + +size_t fileWriteFunc(void *ptr, size_t size, size_t nmemb, void *userdata) +{ + FILE *fp = (FILE*)userdata; + size_t written = fwrite(ptr, size, nmemb, fp); + return written; +} + +size_t bufferWriteFunc(void *ptr, size_t size, size_t nmemb, void *userdata) +{ + Downloader::StreamData *streamBuffer = (Downloader::StreamData *)userdata; + size_t written = size * nmemb; + // Avoid pointer overflow + if (streamBuffer->offset + written <= streamBuffer->total) + { + memcpy(streamBuffer->buffer + streamBuffer->offset, ptr, written); + streamBuffer->offset += written; + return written; + } + else return 0; +} + +// This is only for batchDownload process, will notify file succeed event in progress function +int batchDownloadProgressFunc(Downloader::ProgressData *ptr, double totalToDownload, double nowDownloaded, double totalToUpLoad, double nowUpLoaded) +{ + if (ptr->totalToDownload == 0) + { + ptr->totalToDownload = totalToDownload; + } + + if (ptr->downloaded != nowDownloaded) + { + ptr->downloaded = nowDownloaded; + + Downloader::ProgressData data = *ptr; + + if (nowDownloaded == totalToDownload) + { + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!data.downloader.expired()) + { + std::shared_ptr downloader = data.downloader.lock(); + + auto progressCB = downloader->getProgressCallback(); + if (progressCB != nullptr) + { + progressCB(totalToDownload, nowDownloaded, data.url, data.customId); + } + auto successCB = downloader->getSuccessCallback(); + if (successCB != nullptr) + { + successCB(data.url, data.path + data.name, data.customId); + } + } + }); + } + else + { + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!data.downloader.expired()) + { + std::shared_ptr downloader = data.downloader.lock(); + + auto callback = downloader->getProgressCallback(); + if (callback != nullptr) + { + callback(totalToDownload, nowDownloaded, data.url, data.customId); + } + } + }); + } + } + + return 0; +} + +// Compare to batchDownloadProgressFunc, this only handles progress information notification +int downloadProgressFunc(Downloader::ProgressData *ptr, double totalToDownload, double nowDownloaded, double totalToUpLoad, double nowUpLoaded) +{ + if (ptr->totalToDownload == 0) + { + ptr->totalToDownload = totalToDownload; + } + + if (ptr->downloaded != nowDownloaded) + { + ptr->downloaded = nowDownloaded; + Downloader::ProgressData data = *ptr; + + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!data.downloader.expired()) + { + std::shared_ptr downloader = data.downloader.lock(); + + auto callback = downloader->getProgressCallback(); + if (callback != nullptr) + { + callback(totalToDownload, nowDownloaded, data.url, data.customId); + } + } + }); + } + + return 0; +} + +Downloader::Downloader() +: _onError(nullptr) +, _onProgress(nullptr) +, _onSuccess(nullptr) +, _connectionTimeout(DEFAULT_TIMEOUT) +, _supportResuming(false) +{ + _fileUtils = FileUtils::getInstance(); +} + +Downloader::~Downloader() +{ +} + +int Downloader::getConnectionTimeout() +{ + return _connectionTimeout; +} + +void Downloader::setConnectionTimeout(int timeout) +{ + if (timeout >= 0) + _connectionTimeout = timeout; +} + +void Downloader::notifyError(ErrorCode code, const std::string &msg/* ="" */, const std::string &customId/* ="" */, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/) +{ + std::weak_ptr ptr = shared_from_this(); + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!ptr.expired()) + { + std::shared_ptr downloader = ptr.lock(); + if (downloader->_onError != nullptr) + { + Error err; + err.code = code; + err.curle_code = curle_code; + err.curlm_code = curlm_code; + err.message = msg; + err.customId = customId; + downloader->_onError(err); + } + } + }); +} + +void Downloader::notifyError(const std::string &msg, int curlm_code, const std::string &customId/* = ""*/) +{ + notifyError(ErrorCode::CURL_MULTI_ERROR, msg, customId, CURLE_OK, curlm_code); +} + +void Downloader::notifyError(const std::string &msg, const std::string &customId, int curle_code) +{ + notifyError(ErrorCode::CURL_EASY_ERROR, msg, customId, curle_code); +} + +std::string Downloader::getFileNameFromUrl(const std::string &srcUrl) +{ + // Find file name and file extension + std::string filename; + unsigned long found = srcUrl.find_last_of("/\\"); + if (found != std::string::npos) + filename = srcUrl.substr(found+1); + return filename; +} + +void Downloader::clearBatchDownloadData() +{ + while (_progDatas.size() != 0) { + delete _progDatas.back(); + _progDatas.pop_back(); + } + + while (_files.size() != 0) { + delete _files.back(); + _files.pop_back(); + } +} + +void Downloader::prepareDownload(const std::string &srcUrl, const std::string &storagePath, const std::string &customId, bool resumeDownload, FileDescriptor *fDesc, ProgressData *pData) +{ + std::shared_ptr downloader = shared_from_this(); + pData->customId = customId; + pData->url = srcUrl; + pData->downloader = downloader; + pData->downloaded = 0; + pData->totalToDownload = 0; + + fDesc->fp = nullptr; + fDesc->curl = nullptr; + + Error err; + err.customId = customId; + + // Asserts + // Find file name and file extension + unsigned long found = storagePath.find_last_of("/\\"); + if (found != std::string::npos) + { + pData->name = storagePath.substr(found+1); + pData->path = storagePath.substr(0, found+1); + } + else + { + err.code = ErrorCode::INVALID_URL; + err.message = "Invalid url or filename not exist error: " + srcUrl; + if (this->_onError) this->_onError(err); + return; + } + + // Create a file to save file. + const std::string outFileName = storagePath + TEMP_EXT; + if (_supportResuming && resumeDownload && _fileUtils->isFileExist(outFileName)) + { + fDesc->fp = fopen(outFileName.c_str(), "ab"); + } + else + { + fDesc->fp = fopen(outFileName.c_str(), "wb"); + } + if (!fDesc->fp) + { + err.code = ErrorCode::CREATE_FILE; + err.message = StringUtils::format("Can not create file %s: errno %d", outFileName.c_str(), errno); + if (this->_onError) this->_onError(err); + } +} + +bool Downloader::prepareHeader(void *curl, const std::string &srcUrl) const +{ + curl_easy_setopt(curl, CURLOPT_URL, srcUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_HEADER, 1); + curl_easy_setopt(curl, CURLOPT_NOBODY, 1); + if (curl_easy_perform(curl) == CURLE_OK) + return true; + else + return false; +} + +long Downloader::getContentSize(const std::string &srcUrl) const +{ + double contentLength = -1; + CURL *header = curl_easy_init(); + if (prepareHeader(header, srcUrl)) + { + curl_easy_getinfo(header, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength); + } + curl_easy_cleanup(header); + + return contentLength; +} + +void Downloader::downloadToBufferAsync(const std::string &srcUrl, unsigned char *buffer, const long &size, const std::string &customId/* = ""*/) +{ + if (buffer != nullptr) + { + std::shared_ptr downloader = shared_from_this(); + ProgressData pData; + pData.customId = customId; + pData.url = srcUrl; + pData.downloader = downloader; + pData.downloaded = 0; + pData.totalToDownload = 0; + + StreamData streamBuffer; + streamBuffer.buffer = buffer; + streamBuffer.total = size; + streamBuffer.offset = 0; + + auto t = std::thread(&Downloader::downloadToBuffer, this, srcUrl, customId, streamBuffer, pData); + t.detach(); + } +} + +void Downloader::downloadToBufferSync(const std::string &srcUrl, unsigned char *buffer, const long &size, const std::string &customId/* = ""*/) +{ + if (buffer != nullptr) + { + std::shared_ptr downloader = shared_from_this(); + ProgressData pData; + pData.customId = customId; + pData.url = srcUrl; + pData.downloader = downloader; + pData.downloaded = 0; + pData.totalToDownload = 0; + + StreamData streamBuffer; + streamBuffer.buffer = buffer; + streamBuffer.total = size; + streamBuffer.offset = 0; + + downloadToBuffer(srcUrl, customId, streamBuffer, pData); + } +} + +void Downloader::downloadToBuffer(const std::string &srcUrl, const std::string &customId, const StreamData &buffer, const ProgressData &data) +{ + std::weak_ptr ptr = shared_from_this(); + CURL *curl = curl_easy_init(); + if (!curl) + { + this->notifyError(ErrorCode::CURL_EASY_ERROR, "Can not init curl with curl_easy_init", customId); + return; + } + + // Download pacakge + curl_easy_setopt(curl, CURLOPT_URL, srcUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, bufferWriteFunc); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer); + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); + curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, downloadProgressFunc); + curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); + if (_connectionTimeout) curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, _connectionTimeout); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, LOW_SPEED_LIMIT); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, LOW_SPEED_TIME); + + CURLcode res = curl_easy_perform(curl); + if (res != CURLE_OK) + { + _fileUtils->removeFile(data.path + data.name + TEMP_EXT); + std::string msg = StringUtils::format("Unable to download file: [curl error]%s", curl_easy_strerror(res)); + this->notifyError(msg, customId, res); + } + + curl_easy_cleanup(curl); + + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!ptr.expired()) + { + std::shared_ptr downloader = ptr.lock(); + + auto successCB = downloader->getSuccessCallback(); + if (successCB != nullptr) + { + successCB(data.url, "", data.customId); + } + } + }); +} + +void Downloader::downloadAsync(const std::string &srcUrl, const std::string &storagePath, const std::string &customId/* = ""*/) +{ + FileDescriptor fDesc; + ProgressData pData; + prepareDownload(srcUrl, storagePath, customId, false, &fDesc, &pData); + if (fDesc.fp != NULL) + { + auto t = std::thread(&Downloader::download, this, srcUrl, customId, fDesc, pData); + t.detach(); + } +} + +void Downloader::downloadSync(const std::string &srcUrl, const std::string &storagePath, const std::string &customId/* = ""*/) +{ + FileDescriptor fDesc; + ProgressData pData; + prepareDownload(srcUrl, storagePath, customId, false, &fDesc, &pData); + if (fDesc.fp != NULL) + { + download(srcUrl, customId, fDesc, pData); + } +} + +void Downloader::download(const std::string &srcUrl, const std::string &customId, const FileDescriptor &fDesc, const ProgressData &data) +{ + std::weak_ptr ptr = shared_from_this(); + CURL *curl = curl_easy_init(); + if (!curl) + { + this->notifyError(ErrorCode::CURL_EASY_ERROR, "Can not init curl with curl_easy_init", customId); + return; + } + + // Download pacakge + curl_easy_setopt(curl, CURLOPT_URL, srcUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fileWriteFunc); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, fDesc.fp); + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); + curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, downloadProgressFunc); + curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); + if (_connectionTimeout) curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, _connectionTimeout); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, LOW_SPEED_LIMIT); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, LOW_SPEED_TIME); + + CURLcode res = curl_easy_perform(curl); + if (res != CURLE_OK) + { + _fileUtils->removeFile(data.path + data.name + TEMP_EXT); + std::string msg = StringUtils::format("Unable to download file: [curl error]%s", curl_easy_strerror(res)); + this->notifyError(msg, customId, res); + } + + fclose(fDesc.fp); + curl_easy_cleanup(curl); + + // This can only be done after fclose + if (res == CURLE_OK) + { + _fileUtils->renameFile(data.path, data.name + TEMP_EXT, data.name); + + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=]{ + if (!ptr.expired()) + { + std::shared_ptr downloader = ptr.lock(); + + auto successCB = downloader->getSuccessCallback(); + if (successCB != nullptr) + { + successCB(data.url, data.path + data.name, data.customId); + } + } + }); + } +} + +void Downloader::batchDownloadAsync(const DownloadUnits &units, const std::string &batchId/* = ""*/) +{ + auto t = std::thread(&Downloader::batchDownloadSync, this, units, batchId); + t.detach(); +} + +void Downloader::batchDownloadSync(const DownloadUnits &units, const std::string &batchId/* = ""*/) +{ + if (units.size() == 0) + { + return; + } + // Make sure downloader won't be released + std::weak_ptr ptr = shared_from_this(); + + // Test server download resuming support with the first unit + _supportResuming = false; + CURL *header = curl_easy_init(); + // Make a resume request + curl_easy_setopt(header, CURLOPT_RESUME_FROM_LARGE, 0); + if (prepareHeader(header, units.begin()->second.srcUrl)) + { + long responseCode; + curl_easy_getinfo(header, CURLINFO_RESPONSE_CODE, &responseCode); + if (responseCode == HTTP_CODE_SUPPORT_RESUME) + { + _supportResuming = true; + } + } + curl_easy_cleanup(header); + + int count = 0; + DownloadUnits group; + for (auto it = units.cbegin(); it != units.cend(); ++it, ++count) + { + if (count == FOPEN_MAX) + { + groupBatchDownload(group); + group.clear(); + count = 0; + } + const std::string &key = it->first; + const DownloadUnit &unit = it->second; + group.emplace(key, unit); + } + if (group.size() > 0) + { + groupBatchDownload(group); + } + + Director::getInstance()->getScheduler()->performFunctionInCocosThread([ptr, batchId]{ + if (!ptr.expired()) { + std::shared_ptr downloader = ptr.lock(); + auto callback = downloader->getSuccessCallback(); + if (callback != nullptr) + { + callback("", "", batchId); + } + } + }); + _supportResuming = false; +} + +void Downloader::groupBatchDownload(const DownloadUnits &units) +{ + CURLM* multi_handle = curl_multi_init(); + int still_running = 0; + + for (auto it = units.cbegin(); it != units.cend(); ++it) + { + DownloadUnit unit = it->second; + std::string srcUrl = unit.srcUrl; + std::string storagePath = unit.storagePath; + std::string customId = unit.customId; + + FileDescriptor *fDesc = new FileDescriptor(); + ProgressData *data = new ProgressData(); + prepareDownload(srcUrl, storagePath, customId, unit.resumeDownload, fDesc, data); + + if (fDesc->fp != NULL) + { + CURL* curl = curl_easy_init(); + curl_easy_setopt(curl, CURLOPT_URL, srcUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fileWriteFunc); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, fDesc->fp); + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); + curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, batchDownloadProgressFunc); + curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, data); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); + if (_connectionTimeout) curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, _connectionTimeout); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, LOW_SPEED_LIMIT); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, LOW_SPEED_TIME); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); + curl_easy_setopt(curl, CURLOPT_MAXREDIRS, MAX_REDIRS); + + // Resuming download support + if (_supportResuming && unit.resumeDownload) + { + // Check already downloaded size for current download unit + long size = _fileUtils->getFileSize(storagePath + TEMP_EXT); + if (size != -1) + { + curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, size); + } + } + fDesc->curl = curl; + + CURLMcode code = curl_multi_add_handle(multi_handle, curl); + if (code != CURLM_OK) + { + // Avoid memory leak + fclose(fDesc->fp); + delete data; + delete fDesc; + std::string msg = StringUtils::format("Unable to add curl handler for %s: [curl error]%s", customId.c_str(), curl_multi_strerror(code)); + this->notifyError(msg, code, customId); + } + else + { + // Add to list for tracking + _progDatas.push_back(data); + _files.push_back(fDesc); + } + } + } + + // Query multi perform + CURLMcode curlm_code = CURLM_CALL_MULTI_PERFORM; + while(CURLM_CALL_MULTI_PERFORM == curlm_code) { + curlm_code = curl_multi_perform(multi_handle, &still_running); + } + if (curlm_code != CURLM_OK) { + std::string msg = StringUtils::format("Unable to continue the download process: [curl error]%s", curl_multi_strerror(curlm_code)); + this->notifyError(msg, curlm_code); + } + else + { + bool failed = false; + while (still_running > 0 && !failed) + { + // set a suitable timeout to play around with + struct timeval select_tv; + long curl_timeo = -1; + select_tv.tv_sec = 1; + select_tv.tv_usec = 0; + + curl_multi_timeout(multi_handle, &curl_timeo); + if(curl_timeo >= 0) { + select_tv.tv_sec = curl_timeo / 1000; + if(select_tv.tv_sec > 1) + select_tv.tv_sec = 1; + else + select_tv.tv_usec = (curl_timeo % 1000) * 1000; + } + + int rc; + fd_set fdread; + fd_set fdwrite; + fd_set fdexcep; + int maxfd = -1; + FD_ZERO(&fdread); + FD_ZERO(&fdwrite); + FD_ZERO(&fdexcep); + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &select_tv); + + switch(rc) + { + case -1: + failed = true; + break; + case 0: + default: + curlm_code = CURLM_CALL_MULTI_PERFORM; + while(CURLM_CALL_MULTI_PERFORM == curlm_code) { + curlm_code = curl_multi_perform(multi_handle, &still_running); + } + if (curlm_code != CURLM_OK) { + std::string msg = StringUtils::format("Unable to continue the download process: [curl error]%s", curl_multi_strerror(curlm_code)); + this->notifyError(msg, curlm_code); + } + break; + } + } + } + + // Clean up and close files + curl_multi_cleanup(multi_handle); + for (auto it = _files.begin(); it != _files.end(); ++it) + { + FILE *f = (*it)->fp; + fclose(f); + auto single = (*it)->curl; + curl_multi_remove_handle(multi_handle, single); + curl_easy_cleanup(single); + } + + // Check unfinished files and notify errors, succeed files will be renamed from temporary file name to real name + for (auto it = _progDatas.begin(); it != _progDatas.end(); ++it) { + ProgressData *data = *it; + if (data->downloaded < data->totalToDownload || data->totalToDownload == 0) + { + this->notifyError(ErrorCode::NETWORK, "Unable to download file", data->customId); + } + else + { + _fileUtils->renameFile(data->path, data->name + TEMP_EXT, data->name); + } + } + + clearBatchDownloadData(); +} + +NS_CC_EXT_END diff --git a/extensions/assets-manager/Downloader.h b/extensions/assets-manager/Downloader.h new file mode 100644 index 0000000000..55fb405c3e --- /dev/null +++ b/extensions/assets-manager/Downloader.h @@ -0,0 +1,196 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#ifndef __Downloader__ +#define __Downloader__ + +#include "platform/CCFileUtils.h" +#include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" + +#include +#include +#include +#include + +NS_CC_EXT_BEGIN + +class CC_EX_DLL Downloader : public std::enable_shared_from_this +{ +public: + + friend class AssetsManagerEx; + + enum class ErrorCode + { + CREATE_FILE, + + NETWORK, + + NO_NEW_VERSION, + + UNCOMPRESS, + + CURL_UNINIT, + + CURL_MULTI_ERROR, + + CURL_EASY_ERROR, + + INVALID_URL, + + INVALID_STORAGE_PATH + }; + + struct Error + { + ErrorCode code; + int curlm_code; + int curle_code; + std::string message; + std::string customId; + std::string url; + }; + + struct ProgressData + { + std::weak_ptr downloader; + std::string customId; + std::string url; + std::string path; + std::string name; + double downloaded; + double totalToDownload; + }; + + struct DownloadUnit + { + std::string srcUrl; + std::string storagePath; + std::string customId; + bool resumeDownload; + }; + + struct StreamData + { + long offset; + long total; + unsigned char *buffer; + }; + + typedef std::unordered_map DownloadUnits; + + typedef std::function ErrorCallback; + typedef std::function ProgressCallback; + typedef std::function SuccessCallback; + + int getConnectionTimeout(); + + void setConnectionTimeout(int timeout); + + void setErrorCallback(const ErrorCallback &callback) { _onError = callback; }; + + void setProgressCallback(const ProgressCallback &callback) { _onProgress = callback; }; + + void setSuccessCallback(const SuccessCallback &callback) { _onSuccess = callback; }; + + ErrorCallback getErrorCallback() const { return _onError; }; + + ProgressCallback getProgressCallback() const { return _onProgress; }; + + SuccessCallback getSuccessCallback() const { return _onSuccess; }; + + long getContentSize(const std::string &srcUrl) const; + + void downloadToBufferAsync(const std::string &srcUrl, unsigned char *buffer, const long &size, const std::string &customId = ""); + + void downloadToBufferSync(const std::string &srcUrl, unsigned char *buffer, const long &size, const std::string &customId = ""); + + void downloadAsync(const std::string &srcUrl, const std::string &storagePath, const std::string &customId = ""); + + void downloadSync(const std::string &srcUrl, const std::string &storagePath, const std::string &customId = ""); + + void batchDownloadAsync(const DownloadUnits &units, const std::string &batchId = ""); + + void batchDownloadSync(const DownloadUnits &units, const std::string &batchId = ""); + + /** + * The default constructor. + */ + Downloader(); + + ~Downloader(); + +protected: + + struct FileDescriptor + { + FILE *fp; + void *curl; + }; + + void prepareDownload(const std::string &srcUrl, const std::string &storagePath, const std::string &customId, bool resumeDownload, FileDescriptor *fDesc, ProgressData *pData); + + bool prepareHeader(void *curl, const std::string &srcUrl) const; + + void downloadToBuffer(const std::string &srcUrl, const std::string &customId, const StreamData &buffer, const ProgressData &data); + + void download(const std::string &srcUrl, const std::string &customId, const FileDescriptor &fDesc, const ProgressData &data); + + void groupBatchDownload(const DownloadUnits &units); + + void notifyError(ErrorCode code, const std::string &msg = "", const std::string &customId = "", int curle_code = 0, int curlm_code = 0); + + void notifyError(const std::string &msg, int curlm_code, const std::string &customId = ""); + + void notifyError(const std::string &msg, const std::string &customId, int curle_code); + +private: + + int _connectionTimeout; + + ErrorCallback _onError; + + ProgressCallback _onProgress; + + SuccessCallback _onSuccess; + + std::string getFileNameFromUrl(const std::string &srcUrl); + + void clearBatchDownloadData(); + + std::vector _files; + + std::vector _progDatas; + + FileUtils *_fileUtils; + + bool _supportResuming; +}; + +int downloadProgressFunc(Downloader::ProgressData *ptr, double totalToDownload, double nowDownloaded, double totalToUpLoad, double nowUpLoaded); + +NS_CC_EXT_END + +#endif /* defined(__Downloader__) */ diff --git a/extensions/assets-manager/Manifest.cpp b/extensions/assets-manager/Manifest.cpp new file mode 100644 index 0000000000..370c14c581 --- /dev/null +++ b/extensions/assets-manager/Manifest.cpp @@ -0,0 +1,481 @@ +/**************************************************************************** + Copyright (c) 2014 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. + ****************************************************************************/ + +#include "Manifest.h" +#include "json/filestream.h" +#include "json/prettywriter.h" +#include "json/stringbuffer.h" + +#include + +#define KEY_VERSION "version" +#define KEY_PACKAGE_URL "packageUrl" +#define KEY_MANIFEST_URL "remoteManifestUrl" +#define KEY_VERSION_URL "remoteVersionUrl" +#define KEY_GROUP_VERSIONS "groupVersions" +#define KEY_ENGINE_VERSION "engineVersion" +#define KEY_ASSETS "assets" +#define KEY_COMPRESSED_FILES "compressedFiles" +#define KEY_SEARCH_PATHS "searchPaths" + +#define KEY_PATH "path" +#define KEY_MD5 "md5" +#define KEY_GROUP "group" +#define KEY_COMPRESSED "compressed" +#define KEY_COMPRESSED_FILE "compressedFile" +#define KEY_DOWNLOAD_STATE "downloadState" + +NS_CC_EXT_BEGIN + +Manifest::Manifest(const std::string& manifestUrl/* = ""*/) +: _versionLoaded(false) +, _loaded(false) +, _manifestRoot("") +, _remoteManifestUrl("") +, _remoteVersionUrl("") +, _version("") +, _engineVer("") +{ + // Init variables + _fileUtils = FileUtils::getInstance(); + if (manifestUrl.size() > 0) + parse(manifestUrl); +} + +void Manifest::parse(const std::string& manifestUrl) +{ + clear(); + std::string content; + if (_fileUtils->isFileExist(manifestUrl)) + { + // Load file content + content = _fileUtils->getStringFromFile(manifestUrl); + + if (content.size() == 0) + { + CCLOG("Fail to retrieve local file content: %s\n", manifestUrl.c_str()); + } + else + { + // Parse file with rapid json + _json.Parse<0>(content.c_str()); + // Print error + if (_json.HasParseError()) { + size_t offset = _json.GetErrorOffset(); + if (offset > 0) + offset--; + std::string errorSnippet = content.substr(offset, 10); + CCLOG("File parse error %s at <%s>\n", _json.GetParseError(), errorSnippet.c_str()); + } + } + } + + if (_json.IsObject()) + { + // Register the local manifest root + size_t found = manifestUrl.find_last_of("/\\"); + if (found != std::string::npos) + { + _manifestRoot = manifestUrl.substr(0, found+1); + } + loadManifest(_json); + } +} + +bool Manifest::isVersionLoaded() const +{ + return _versionLoaded; +} +bool Manifest::isLoaded() const +{ + return _loaded; +} + +bool Manifest::versionEquals(const Manifest *b) const +{ + // Check manifest version + if (_version != b->getVersion()) + { + return false; + } + // Check group versions + else + { + std::vector bGroups = b->getGroups(); + std::unordered_map bGroupVer = b->getGroupVerions(); + // Check group size + if (bGroups.size() != _groups.size()) + return false; + + // Check groups version + for (int i = 0; i < _groups.size(); ++i) { + std::string gid =_groups[i]; + // Check group name + if (gid != bGroups[i]) + return false; + // Check group version + if (_groupVer.at(gid) != bGroupVer.at(gid)) + return false; + } + } + return true; +} + +std::unordered_map Manifest::genDiff(const Manifest *b) const +{ + std::unordered_map diff_map; + std::unordered_map bAssets = b->getAssets(); + + std::string key; + Asset valueA; + Asset valueB; + std::unordered_map::const_iterator valueIt, it; + for (it = _assets.begin(); it != _assets.end(); ++it) + { + key = it->first; + valueA = it->second; + + // Deleted + valueIt = bAssets.find(key); + if (valueIt == bAssets.cend()) { + AssetDiff diff; + diff.asset = valueA; + diff.type = DiffType::DELETED; + diff_map.emplace(key, diff); + continue; + } + + // Modified + valueB = valueIt->second; + if (valueA.md5 != valueB.md5) { + AssetDiff diff; + diff.asset = valueB; + diff.type = DiffType::MODIFIED; + diff_map.emplace(key, diff); + } + } + + for (it = bAssets.begin(); it != bAssets.end(); ++it) + { + key = it->first; + valueB = it->second; + + // Added + valueIt = _assets.find(key); + if (valueIt == _assets.cend()) { + AssetDiff diff; + diff.asset = valueB; + diff.type = DiffType::ADDED; + diff_map.emplace(key, diff); + } + } + + return diff_map; +} + +void Manifest::genResumeAssetsList(Downloader::DownloadUnits *units) const +{ + for (auto it = _assets.begin(); it != _assets.end(); ++it) + { + Asset asset = it->second; + + if (asset.downloadState != DownloadState::SUCCESSED) + { + Downloader::DownloadUnit unit; + unit.customId = it->first; + unit.srcUrl = _packageUrl + asset.path; + unit.storagePath = _manifestRoot + asset.path; + if (asset.downloadState == DownloadState::DOWNLOADING) + { + unit.resumeDownload = true; + } + else + { + unit.resumeDownload = false; + } + units->emplace(unit.customId, unit); + } + } +} + + +void Manifest::prependSearchPaths() +{ + std::vector searchPaths = FileUtils::getInstance()->getSearchPaths(); + std::vector::iterator iter = searchPaths.begin(); + searchPaths.insert(iter, _manifestRoot); + + for (int i = (int)_searchPaths.size()-1; i >= 0; i--) + { + std::string path = _searchPaths[i]; + if (path.size() > 0 && path[path.size() - 1] != '/') + path.append("/"); + path = _manifestRoot + path; + iter = searchPaths.begin(); + searchPaths.insert(iter, path); + } + FileUtils::getInstance()->setSearchPaths(searchPaths); +} + + +const std::string& Manifest::getPackageUrl() const +{ + return _packageUrl; +} + +const std::string& Manifest::getManifestFileUrl() const +{ + return _remoteManifestUrl; +} + +const std::string& Manifest::getVersionFileUrl() const +{ + return _remoteVersionUrl; +} + +const std::string& Manifest::getVersion() const +{ + return _version; +} + +const std::vector& Manifest::getGroups() const +{ + return _groups; +} + +const std::unordered_map& Manifest::getGroupVerions() const +{ + return _groupVer; +} + +const std::string& Manifest::getGroupVersion(const std::string &group) const +{ + return _groupVer.at(group); +} + +const std::unordered_map& Manifest::getAssets() const +{ + return _assets; +} + +void Manifest::setAssetDownloadState(const std::string &key, const Manifest::DownloadState &state) +{ + auto valueIt = _assets.find(key); + if (valueIt != _assets.end()) + { + valueIt->second.downloadState = state; + + // Update json object + if(_json.IsObject()) + { + if ( _json.HasMember(KEY_ASSETS) ) + { + rapidjson::Value &assets = _json[KEY_ASSETS]; + if (assets.IsObject()) + { + for (rapidjson::Value::MemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr) + { + std::string jkey = itr->name.GetString(); + if (jkey == key) { + rapidjson::Value &entry = itr->value; + rapidjson::Value &value = entry[KEY_DOWNLOAD_STATE]; + if (value.IsInt()) + { + value.SetInt((int)state); + } + else + { + entry.AddMember(KEY_DOWNLOAD_STATE, (int)state, _json.GetAllocator()); + } + } + } + } + } + } + } +} + +void Manifest::clear() +{ + if (_versionLoaded || _loaded) + { + _groups.clear(); + _groupVer.clear(); + + _remoteManifestUrl = ""; + _remoteVersionUrl = ""; + _version = ""; + _engineVer = ""; + + _versionLoaded = false; + } + + if (_loaded) + { + _assets.clear(); + _searchPaths.clear(); + _loaded = false; + } +} + +Manifest::Asset Manifest::parseAsset(const std::string &path, const rapidjson::Value &json) +{ + Asset asset; + asset.path = path; + + if ( json.HasMember(KEY_MD5) && json[KEY_MD5].IsString() ) + { + asset.md5 = json[KEY_MD5].GetString(); + } + else asset.md5 = ""; + + if ( json.HasMember(KEY_PATH) && json[KEY_PATH].IsString() ) + { + asset.path = json[KEY_PATH].GetString(); + } + + if ( json.HasMember(KEY_COMPRESSED) && json[KEY_COMPRESSED].IsBool() ) + { + asset.compressed = json[KEY_COMPRESSED].GetBool(); + } + else asset.compressed = false; + + if ( json.HasMember(KEY_DOWNLOAD_STATE) && json[KEY_DOWNLOAD_STATE].IsInt() ) + { + asset.downloadState = (DownloadState)(json[KEY_DOWNLOAD_STATE].GetInt()); + } + else asset.downloadState = DownloadState::UNSTARTED; + + return asset; +} + +void Manifest::loadVersion(const rapidjson::Document &json) +{ + // Retrieve remote manifest url + if ( json.HasMember(KEY_MANIFEST_URL) && json[KEY_MANIFEST_URL].IsString() ) + { + _remoteManifestUrl = json[KEY_MANIFEST_URL].GetString(); + } + + // Retrieve remote version url + if ( json.HasMember(KEY_VERSION_URL) && json[KEY_VERSION_URL].IsString() ) + { + _remoteVersionUrl = json[KEY_VERSION_URL].GetString(); + } + + // Retrieve local version + if ( json.HasMember(KEY_VERSION) && json[KEY_VERSION].IsString() ) + { + _version = json[KEY_VERSION].GetString(); + } + + // Retrieve local group version + if ( json.HasMember(KEY_GROUP_VERSIONS) ) + { + const rapidjson::Value& groupVers = json[KEY_GROUP_VERSIONS]; + if (groupVers.IsObject()) + { + for (rapidjson::Value::ConstMemberIterator itr = groupVers.MemberonBegin(); itr != groupVers.MemberonEnd(); ++itr) + { + std::string group = itr->name.GetString(); + std::string version = "0"; + if (itr->value.IsString()) + { + version = itr->value.GetString(); + } + _groups.push_back(group); + _groupVer.emplace(group, version); + } + } + } + + // Retrieve local engine version + if ( json.HasMember(KEY_ENGINE_VERSION) && json[KEY_ENGINE_VERSION].IsString() ) + { + _engineVer = json[KEY_ENGINE_VERSION].GetString(); + } + + _versionLoaded = true; +} + +void Manifest::loadManifest(const rapidjson::Document &json) +{ + loadVersion(json); + + // Retrieve package url + if ( json.HasMember(KEY_PACKAGE_URL) && json[KEY_PACKAGE_URL].IsString() ) + { + _packageUrl = json[KEY_PACKAGE_URL].GetString(); + // Append automatically "/" + if (_packageUrl.size() > 0 && _packageUrl[_packageUrl.size() - 1] != '/') + { + _packageUrl.append("/"); + } + } + + // Retrieve all assets + if ( json.HasMember(KEY_ASSETS) ) + { + const rapidjson::Value& assets = json[KEY_ASSETS]; + if (assets.IsObject()) + { + for (rapidjson::Value::ConstMemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr) + { + std::string key = itr->name.GetString(); + Asset asset = parseAsset(key, itr->value); + _assets.emplace(key, asset); + } + } + } + + // Retrieve all search paths + if ( json.HasMember(KEY_SEARCH_PATHS) ) + { + const rapidjson::Value& paths = json[KEY_SEARCH_PATHS]; + if (paths.IsArray()) + { + for (rapidjson::SizeType i = 0; i < paths.Size(); ++i) + { + if (paths[i].IsString()) { + _searchPaths.push_back(paths[i].GetString()); + } + } + } + } + + _loaded = true; +} + +void Manifest::saveToFile(const std::string &filepath) +{ + rapidjson::StringBuffer buffer; + rapidjson::PrettyWriter writer(buffer); + _json.Accept(writer); + + std::ofstream output(filepath, std::ofstream::out); + if(!output.bad()) + output << buffer.GetString() << std::endl; +} + +NS_CC_EXT_END \ No newline at end of file diff --git a/extensions/assets-manager/Manifest.h b/extensions/assets-manager/Manifest.h new file mode 100644 index 0000000000..adebf3e404 --- /dev/null +++ b/extensions/assets-manager/Manifest.h @@ -0,0 +1,207 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#ifndef __Manifest__ +#define __Manifest__ + +#include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" +#include "Downloader.h" + +#include +#include +#include + +#include "json/document.h" + +NS_CC_EXT_BEGIN + + +class CC_EX_DLL Manifest : public Ref +{ +public: + + friend class AssetsManagerEx; + + //! The type of difference + enum class DiffType { + ADDED, + DELETED, + MODIFIED + }; + + enum class DownloadState { + UNSTARTED, + DOWNLOADING, + SUCCESSED + }; + + //! Asset object + struct Asset { + std::string md5; + std::string path; + bool compressed; + DownloadState downloadState; + }; + + //! Object indicate the difference between two Assets + struct AssetDiff { + Asset asset; + DiffType type; + }; + + /** @brief Check whether the version informations have been fully loaded + */ + bool isVersionLoaded() const; + + /** @brief Check whether the manifest have been fully loaded + */ + bool isLoaded() const; + + /** @brief Gets remote package url. + */ + const std::string& getPackageUrl() const; + + /** @brief Gets remote manifest file url. + */ + const std::string& getManifestFileUrl() const; + + /** @brief Gets remote version file url. + */ + const std::string& getVersionFileUrl() const; + + /** @brief Gets manifest version. + */ + const std::string& getVersion() const; + +protected: + + /** @brief Constructor for Manifest class + @param manifestUrl Url of the local manifest + */ + Manifest(const std::string& manifestUrl = ""); + + /** @brief Parse the manifest file information into this manifest + * @param manifestUrl Url of the local manifest + */ + void parse(const std::string& manifestUrl); + + /** @brief Check whether the version of this manifest equals to another. + * @param b The other manifest + */ + bool versionEquals(const Manifest *b) const; + + /** @brief Generate difference between this Manifest and another. + * @param b The other manifest + */ + std::unordered_map genDiff(const Manifest *b) const; + + /** @brief Generate resuming download assets list + * @param units The download units reference to be modified by the generation result + */ + void genResumeAssetsList(Downloader::DownloadUnits *units) const; + + /** @brief Prepend all search paths to the FileUtils. + */ + void prependSearchPaths(); + + void loadVersion(const rapidjson::Document &json); + + void loadManifest(const rapidjson::Document &json); + + void saveToFile(const std::string &filepath); + + Asset parseAsset(const std::string &path, const rapidjson::Value &json); + + void clear(); + + /** @brief Gets all groups. + */ + const std::vector& getGroups() const; + + /** @brief Gets all groups version. + */ + const std::unordered_map& getGroupVerions() const; + + /** @brief Gets version for the given group. + * @param group Key of the requested group + */ + const std::string& getGroupVersion(const std::string &group) const; + + /** @brief Gets assets. + */ + const std::unordered_map& getAssets() const; + + /** @brief Set the download state for an asset + * @param key Key of the asset to set + * @param state The current download state of the asset + */ + void setAssetDownloadState(const std::string &key, const DownloadState &state); + +private: + + //! Indicate whether the version informations have been fully loaded + bool _versionLoaded; + + //! Indicate whether the manifest have been fully loaded + bool _loaded; + + //! Reference to the global file utils + FileUtils *_fileUtils; + + //! The local manifest root + std::string _manifestRoot; + + //! The remote package url + std::string _packageUrl; + + //! The remote path of manifest file + std::string _remoteManifestUrl; + + //! The remote path of version file [Optional] + std::string _remoteVersionUrl; + + //! The version of local manifest + std::string _version; + + //! All groups exist in manifest [Optional] + std::vector _groups; + + //! The versions of all local group [Optional] + std::unordered_map _groupVer; + + //! The version of local engine + std::string _engineVer; + + //! Full assets list + std::unordered_map _assets; + + //! All search paths + std::vector _searchPaths; + + rapidjson::Document _json; +}; + +NS_CC_EXT_END +#endif /* defined(__Manifest__) */ diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index 6f742b7046..9ff891ed60 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -13,6 +13,10 @@ #include "physics-nodes/CCPhysicsSprite.h" #include "assets-manager/AssetsManager.h" +#include "assets-manager/AssetsManagerEx.h" +#include "assets-manager/CCEventAssetsManagerEx.h" +#include "assets-manager/CCEventListenerAssetsManagerEx.h" +#include "assets-manager/Manifest.h" #include "ExtensionDeprecated.h" #endif /* __COCOS2D_EXT_H__ */ diff --git a/extensions/proj.wp8/libExtensions.vcxproj b/extensions/proj.wp8/libExtensions.vcxproj deleted file mode 100644 index 53fd84de79..0000000000 --- a/extensions/proj.wp8/libExtensions.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4} - Extensions.win32 - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - - - - - - - - - - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - pch.h - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_LIB;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - pch.h - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WP8;_DEBUG;_LIB;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - pch.h - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - Use - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WP8;NDEBUG;_LIB;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_STATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - pch.h - /Zm200 %(AdditionalOptions) - - - Console - false - - - /IGNORE:4264 %(AdditionalOptions) - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/extensions/proj.wp8/libExtensions.vcxproj.filters b/extensions/proj.wp8/libExtensions.vcxproj.filters deleted file mode 100644 index 2a3c131354..0000000000 --- a/extensions/proj.wp8/libExtensions.vcxproj.filters +++ /dev/null @@ -1,127 +0,0 @@ - - - - - {202b519b-b5e0-499f-b3b8-ed5da144b248} - - - {c07abd14-e9dd-4e2d-85c4-a180070161b4} - - - {46797895-f71d-4ddb-b381-d0884e678d39} - - - {d5806151-7ae1-4fef-af5a-2fa1d1c7377b} - - - {49487dbe-5758-436a-b014-8e2edc6b33ae} - - - - - GUI\CCScrollView - - - GUI\CCScrollView - - - GUI\CCScrollView - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - physics_nodes - - - physics_nodes - - - - - - GUI\CCScrollView - - - - - GUI\CCScrollView - - - GUI\CCScrollView - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - GUI\CCControlExtension - - - physics_nodes - - - physics_nodes - - - - \ No newline at end of file diff --git a/extensions/proj.wp8/pch.cpp b/extensions/proj.wp8/pch.cpp deleted file mode 100644 index bcb5590be1..0000000000 --- a/extensions/proj.wp8/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/extensions/proj.wp8/pch.h b/extensions/proj.wp8/pch.h deleted file mode 100644 index 4c3b8cde28..0000000000 --- a/extensions/proj.wp8/pch.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" diff --git a/external/config.json b/external/config.json index a58141a5e3..23006bc601 100644 --- a/external/config.json +++ b/external/config.json @@ -1,6 +1,6 @@ { - "version":"v3-deps-17", - "zip_file_size":"70810291", + "version":"v3-deps-19", + "zip_file_size":"88112898", "repo_name":"cocos2d-x-3rd-party-libs-bin", "repo_parent":"https://github.com/cocos2d/", "move_dirs":{ diff --git a/licenses/LICENSE_spine.txt b/licenses/LICENSE_spine.txt index b7df802e2e..148461ab57 100644 --- a/licenses/LICENSE_spine.txt +++ b/licenses/LICENSE_spine.txt @@ -1,33 +1,28 @@ -/****************************************************************************** - * Spine Runtime Software License - Version 1.1 - * - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms in whole or in part, with - * or without modification, are permitted provided that the following conditions - * are met: - * - * 1. A Spine Essential, Professional, Enterprise, or Education License must - * be purchased from Esoteric Software and the license must remain valid: - * http://esotericsoftware.com/ - * 2. Redistributions of source code must retain this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer. - * 3. Redistributions in binary form must reproduce this license, which is the - * above copyright notice, this declaration of conditions and the following - * disclaimer, in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ +Spine Runtimes Software License +Version 2.2 +Copyright (c) 2013, Esoteric Software +All rights reserved. + +You are granted a perpetual, non-exclusive, non-sublicensable and +non-transferable license to use, install, execute and perform the Spine +Runtimes Software (the "Software") and derivative works solely for personal or +internal use. Without the written permission of Esoteric Software (typically +granted by licensing Spine), you may not (a) modify, translate, adapt or +otherwise create derivative works, improvements of the Software or develop +new applications using the Software or (b) remove, delete, alter or obscure +any trademarks or any copyright, trademark, patent or other intellectual +property or proprietary rights notices on or in the Software, including any +copy thereof. Redistributions in binary or source form must include this +license and terms. + +THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index ea79fbbb8e..7578776872 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -7,31 +7,12 @@ "README.md", "build/android-build.py", "build/cocos2d-win32.vc2012.sln", - "build/cocos2d-wp8.vc2012.sln", + "build/cocos2d-wp8.sln", "build/cocos2d_libs.xcodeproj/project.pbxproj", "build/cocos2d_tests.xcodeproj/project.pbxproj", "build/install-deps-linux.sh", "build/win32-msvc-2012-x86.cmd", "build/win32-msvc-2013-x86.cmd", - "build/winrt/Cocos2dShaderCompiler/App.xaml", - "build/winrt/Cocos2dShaderCompiler/App.xaml.cpp", - "build/winrt/Cocos2dShaderCompiler/App.xaml.h", - "build/winrt/Cocos2dShaderCompiler/Assets/Logo.png", - "build/winrt/Cocos2dShaderCompiler/Assets/SmallLogo.png", - "build/winrt/Cocos2dShaderCompiler/Assets/SplashScreen.png", - "build/winrt/Cocos2dShaderCompiler/Assets/StoreLogo.png", - "build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln", - "build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj", - "build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters", - "build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx", - "build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml", - "build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.cpp", - "build/winrt/Cocos2dShaderCompiler/DirectXPage.xaml.h", - "build/winrt/Cocos2dShaderCompiler/Package.appxmanifest", - "build/winrt/Cocos2dShaderCompiler/ShaderCompiler.cpp", - "build/winrt/Cocos2dShaderCompiler/ShaderCompiler.h", - "build/winrt/Cocos2dShaderCompiler/pch.cpp", - "build/winrt/Cocos2dShaderCompiler/pch.h", "build/winrt/angle.bat", "build/winrt/convertprojects.ps1", "build/winrt/scripts/converterutils.ps1", @@ -47,6 +28,22 @@ "build/winrt/scripts/templates/wp8_sln_header_template.txt", "build/winrt/scripts/winrtconverter.ps1", "build/winrt/wp8_precompiled_shaders.txt", + "build/wp8/Cocos2dShaderCompiler/App.xaml", + "build/wp8/Cocos2dShaderCompiler/App.xaml.cpp", + "build/wp8/Cocos2dShaderCompiler/App.xaml.h", + "build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.sln", + "build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj", + "build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters", + "build/wp8/Cocos2dShaderCompiler/Cocos2dShaderCompiler_TemporaryKey.pfx", + "build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml", + "build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.cpp", + "build/wp8/Cocos2dShaderCompiler/DirectXPage.xaml.h", + "build/wp8/Cocos2dShaderCompiler/Package.appxmanifest", + "build/wp8/Cocos2dShaderCompiler/ShaderCompiler.cpp", + "build/wp8/Cocos2dShaderCompiler/ShaderCompiler.h", + "build/wp8/Cocos2dShaderCompiler/pch.cpp", + "build/wp8/Cocos2dShaderCompiler/pch.h", + "build/wp8/wp8_precompiled_shaders.txt", "cmake/BuildHelpers.CMakeLists.txt", "cmake/Modules/CMakeParseArguments.cmake", "cmake/Modules/FindChipmunk.cmake", @@ -193,16 +190,29 @@ "cocos/2d/CMakeLists.txt", "cocos/2d/cocos2d.def", "cocos/2d/cocos2d_headers.props", - "cocos/2d/cocos2d_winrt.props", - "cocos/2d/cocos2d_winrt.vcxproj", - "cocos/2d/cocos2d_winrt.vcxproj.filters", - "cocos/2d/cocos2d_winrt_headers.props", - "cocos/2d/cocos2d_wp8.vcxproj", - "cocos/2d/cocos2d_wp8.vcxproj.filters", - "cocos/2d/cocos2d_wp8_headers.props", "cocos/2d/cocos2dx.props", "cocos/2d/libcocos2d.vcxproj", "cocos/2d/libcocos2d.vcxproj.filters", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1.sln", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/targetver.h", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj.filters", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj", + "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj.filters", + "cocos/2d/libcocos2d_wp8.vcxproj", + "cocos/2d/libcocos2d_wp8.vcxproj.filters", + "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props", + "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props", + "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_platform.props", + "cocos/2d/winrt_props/cocos2d_winrt.props", + "cocos/2d/winrt_props/cocos2d_winrt_app.props", + "cocos/2d/winrt_props/cocos2d_winrt_platform.props", + "cocos/2d/wp8_props/cocos2d_wp8.props", + "cocos/2d/wp8_props/cocos2d_wp8_app.props", + "cocos/2d/wp8_props/cocos2d_wp8_component.props", + "cocos/2d/wp_8.1_props/cocos2d_wp_8.1_platform.props", "cocos/3d/Android.mk", "cocos/3d/CCAABB.cpp", "cocos/3d/CCAABB.h", @@ -291,9 +301,6 @@ "cocos/audio/openal/OpenALDecoder.cpp", "cocos/audio/openal/OpenALDecoder.h", "cocos/audio/openal/SimpleAudioEngineOpenAL.cpp", - "cocos/audio/proj.wp8/CocosDenshion.vcxproj", - "cocos/audio/proj.wp8/CocosDenshion.vcxproj.filters", - "cocos/audio/proj.wp8/CocosDenshion.vcxproj.user", "cocos/audio/win32/AudioCache.cpp", "cocos/audio/win32/AudioCache.h", "cocos/audio/win32/AudioEngine-win32.cpp", @@ -498,11 +505,6 @@ "cocos/editor-support/cocosbuilder/CCSpriteLoader.h", "cocos/editor-support/cocosbuilder/CMakeLists.txt", "cocos/editor-support/cocosbuilder/CocosBuilder.h", - "cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj", - "cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.filters", - "cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.user", - "cocos/editor-support/cocosbuilder/proj.wp8/pch.cpp", - "cocos/editor-support/cocosbuilder/proj.wp8/pch.h", "cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp", "cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h", "cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp", @@ -622,68 +624,77 @@ "cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp", "cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h", "cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h", - "cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj", - "cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.filters", - "cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.user", - "cocos/editor-support/cocostudio/proj.wp8/pch.cpp", - "cocos/editor-support/cocostudio/proj.wp8/pch.h", "cocos/editor-support/spine/Android.mk", - "cocos/editor-support/spine/Animation.cpp", + "cocos/editor-support/spine/Animation.c", "cocos/editor-support/spine/Animation.h", - "cocos/editor-support/spine/AnimationState.cpp", + "cocos/editor-support/spine/AnimationState.c", "cocos/editor-support/spine/AnimationState.h", - "cocos/editor-support/spine/AnimationStateData.cpp", + "cocos/editor-support/spine/AnimationStateData.c", "cocos/editor-support/spine/AnimationStateData.h", - "cocos/editor-support/spine/Atlas.cpp", + "cocos/editor-support/spine/Atlas.c", "cocos/editor-support/spine/Atlas.h", - "cocos/editor-support/spine/AtlasAttachmentLoader.cpp", + "cocos/editor-support/spine/AtlasAttachmentLoader.c", "cocos/editor-support/spine/AtlasAttachmentLoader.h", - "cocos/editor-support/spine/Attachment.cpp", + "cocos/editor-support/spine/Attachment.c", "cocos/editor-support/spine/Attachment.h", - "cocos/editor-support/spine/AttachmentLoader.cpp", + "cocos/editor-support/spine/AttachmentLoader.c", "cocos/editor-support/spine/AttachmentLoader.h", - "cocos/editor-support/spine/Bone.cpp", + "cocos/editor-support/spine/Bone.c", "cocos/editor-support/spine/Bone.h", - "cocos/editor-support/spine/BoneData.cpp", + "cocos/editor-support/spine/BoneData.c", "cocos/editor-support/spine/BoneData.h", - "cocos/editor-support/spine/BoundingBoxAttachment.cpp", + "cocos/editor-support/spine/BoundingBoxAttachment.c", "cocos/editor-support/spine/BoundingBoxAttachment.h", - "cocos/editor-support/spine/CCSkeleton.cpp", - "cocos/editor-support/spine/CCSkeleton.h", - "cocos/editor-support/spine/CCSkeletonAnimation.cpp", - "cocos/editor-support/spine/CCSkeletonAnimation.h", "cocos/editor-support/spine/CMakeLists.txt", - "cocos/editor-support/spine/Event.cpp", + "cocos/editor-support/spine/Event.c", "cocos/editor-support/spine/Event.h", - "cocos/editor-support/spine/EventData.cpp", + "cocos/editor-support/spine/EventData.c", "cocos/editor-support/spine/EventData.h", - "cocos/editor-support/spine/Json.cpp", + "cocos/editor-support/spine/IkConstraint.c", + "cocos/editor-support/spine/IkConstraint.h", + "cocos/editor-support/spine/IkConstraintData.c", + "cocos/editor-support/spine/IkConstraintData.h", + "cocos/editor-support/spine/Json.c", "cocos/editor-support/spine/Json.h", - "cocos/editor-support/spine/RegionAttachment.cpp", + "cocos/editor-support/spine/MeshAttachment.c", + "cocos/editor-support/spine/MeshAttachment.h", + "cocos/editor-support/spine/PolygonBatch.cpp", + "cocos/editor-support/spine/PolygonBatch.h", + "cocos/editor-support/spine/RegionAttachment.c", "cocos/editor-support/spine/RegionAttachment.h", - "cocos/editor-support/spine/Skeleton.cpp", + "cocos/editor-support/spine/Skeleton.c", "cocos/editor-support/spine/Skeleton.h", - "cocos/editor-support/spine/SkeletonBounds.cpp", + "cocos/editor-support/spine/SkeletonAnimation.cpp", + "cocos/editor-support/spine/SkeletonAnimation.h", + "cocos/editor-support/spine/SkeletonBounds.c", "cocos/editor-support/spine/SkeletonBounds.h", - "cocos/editor-support/spine/SkeletonData.cpp", + "cocos/editor-support/spine/SkeletonData.c", "cocos/editor-support/spine/SkeletonData.h", - "cocos/editor-support/spine/SkeletonJson.cpp", + "cocos/editor-support/spine/SkeletonJson.c", "cocos/editor-support/spine/SkeletonJson.h", - "cocos/editor-support/spine/Skin.cpp", + "cocos/editor-support/spine/SkeletonRenderer.cpp", + "cocos/editor-support/spine/SkeletonRenderer.h", + "cocos/editor-support/spine/Skin.c", "cocos/editor-support/spine/Skin.h", - "cocos/editor-support/spine/Slot.cpp", + "cocos/editor-support/spine/SkinnedMeshAttachment.c", + "cocos/editor-support/spine/SkinnedMeshAttachment.h", + "cocos/editor-support/spine/Slot.c", "cocos/editor-support/spine/Slot.h", - "cocos/editor-support/spine/SlotData.cpp", + "cocos/editor-support/spine/SlotData.c", "cocos/editor-support/spine/SlotData.h", - "cocos/editor-support/spine/extension.cpp", + "cocos/editor-support/spine/extension.c", "cocos/editor-support/spine/extension.h", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems.filters", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj.filters", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj", + "cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj.filters", "cocos/editor-support/spine/proj.wp8/libSpine.vcxproj", "cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters", "cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.user", - "cocos/editor-support/spine/proj.wp8/pch.cpp", - "cocos/editor-support/spine/proj.wp8/pch.h", "cocos/editor-support/spine/spine-cocos2dx.cpp", "cocos/editor-support/spine/spine-cocos2dx.h", "cocos/editor-support/spine/spine.h", @@ -729,8 +740,6 @@ "cocos/network/SocketIO.h", "cocos/network/WebSocket.cpp", "cocos/network/WebSocket.h", - "cocos/network/proj.wp8/libNetwork.vcxproj", - "cocos/network/proj.wp8/libNetwork.vcxproj.filters", "cocos/physics/CCPhysicsBody.cpp", "cocos/physics/CCPhysicsBody.h", "cocos/physics/CCPhysicsContact.cpp", @@ -911,11 +920,14 @@ "cocos/platform/winrt/CCFreeTypeFont.cpp", "cocos/platform/winrt/CCFreeTypeFont.h", "cocos/platform/winrt/CCGL.h", + "cocos/platform/winrt/CCGLViewImpl-winrt.cpp", + "cocos/platform/winrt/CCGLViewImpl-winrt.h", "cocos/platform/winrt/CCGLViewImpl.cpp", "cocos/platform/winrt/CCGLViewImpl.h", "cocos/platform/winrt/CCGL_Angle.h", "cocos/platform/winrt/CCPThreadWinRT.cpp", "cocos/platform/winrt/CCPThreadWinRT.h", + "cocos/platform/winrt/CCPlatformDefine-winrt.h", "cocos/platform/winrt/CCPlatformDefine.h", "cocos/platform/winrt/CCPrecompiledShaders.cpp", "cocos/platform/winrt/CCPrecompiledShaders.h", @@ -936,6 +948,7 @@ "cocos/platform/winrt/sha1.cpp", "cocos/platform/winrt/sha1.h", "cocos/platform/winrt/shaders/precompiledshaders.h", + "cocos/platform/winrt/targetver.h", "cocos/platform/wp8-xaml/CopyTemplateFiles.vcxproj", "cocos/platform/wp8-xaml/CopyTemplateFiles.vcxproj.filters", "cocos/platform/wp8-xaml/CopyTemplateFiles.vcxproj.user", @@ -962,8 +975,6 @@ "cocos/platform/wp8/Direct3DBase.h", "cocos/platform/wp8/DirectXBase.cpp", "cocos/platform/wp8/DirectXBase.h", - "cocos/platform/wp8/pch.cpp", - "cocos/platform/wp8/pch.h", "cocos/platform/wp8/shaders/precompiledshaders.h", "cocos/renderer/CCBatchCommand.cpp", "cocos/renderer/CCBatchCommand.h", @@ -1042,8 +1053,6 @@ "cocos/storage/local-storage/LocalStorage-android.cpp", "cocos/storage/local-storage/LocalStorage.cpp", "cocos/storage/local-storage/LocalStorage.h", - "cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj", - "cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters", "cocos/ui/Android.mk", "cocos/ui/CMakeLists.txt", "cocos/ui/CocosGUI.cpp", @@ -1121,14 +1130,10 @@ "cocos/ui/UIWebViewImpl-android.h", "cocos/ui/UIWebViewImpl-ios.h", "cocos/ui/UIWebViewImpl-ios.mm", - "cocos/ui/UIWebViewImpl-win32.cpp", - "cocos/ui/UIWebViewImpl-win32.h", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", "cocos/ui/proj.win32/libui.vcxproj", "cocos/ui/proj.win32/libui.vcxproj.filters", - "cocos/ui/proj.wp8/libGUI.vcxproj", - "cocos/ui/proj.wp8/libGUI.vcxproj.filters", "docs/CODING_STYLE.md", "docs/Groups.h", "docs/MainPage.h", @@ -1173,15 +1178,21 @@ "extensions/GUI/CCScrollView/CCTableViewCell.h", "extensions/assets-manager/AssetsManager.cpp", "extensions/assets-manager/AssetsManager.h", + "extensions/assets-manager/AssetsManagerEx.cpp", + "extensions/assets-manager/AssetsManagerEx.h", + "extensions/assets-manager/CCEventAssetsManagerEx.cpp", + "extensions/assets-manager/CCEventAssetsManagerEx.h", + "extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp", + "extensions/assets-manager/CCEventListenerAssetsManagerEx.h", + "extensions/assets-manager/Downloader.cpp", + "extensions/assets-manager/Downloader.h", + "extensions/assets-manager/Manifest.cpp", + "extensions/assets-manager/Manifest.h", "extensions/cocos-ext.h", "extensions/physics-nodes/CCPhysicsDebugNode.cpp", "extensions/physics-nodes/CCPhysicsDebugNode.h", "extensions/physics-nodes/CCPhysicsSprite.cpp", "extensions/physics-nodes/CCPhysicsSprite.h", - "extensions/proj.wp8/libExtensions.vcxproj", - "extensions/proj.wp8/libExtensions.vcxproj.filters", - "extensions/proj.wp8/pch.cpp", - "extensions/proj.wp8/pch.h", "external/Box2D/Android.mk", "external/Box2D/Box2D.h", "external/Box2D/CMakeLists.txt", @@ -1279,6 +1290,12 @@ "external/Box2D/Rope/b2Rope.h", "external/Box2D/proj.win32/libbox2d.vcxproj", "external/Box2D/proj.win32/libbox2d.vcxproj.filters", + "external/Box2D/proj.win8.1-universal/libbox2d.Shared/libbox2d.Shared.vcxitems", + "external/Box2D/proj.win8.1-universal/libbox2d.Shared/libbox2d.Shared.vcxitems.filters", + "external/Box2D/proj.win8.1-universal/libbox2d.Windows/libbox2d.Windows.vcxproj", + "external/Box2D/proj.win8.1-universal/libbox2d.Windows/libbox2d.Windows.vcxproj.filters", + "external/Box2D/proj.win8.1-universal/libbox2d.WindowsPhone/libbox2d.WindowsPhone.vcxproj", + "external/Box2D/proj.win8.1-universal/libbox2d.WindowsPhone/libbox2d.WindowsPhone.vcxproj.filters", "external/Box2D/proj.wp8/Box2D.vcxproj", "external/Box2D/proj.wp8/Box2D.vcxproj.filters", "external/ConvertUTF/ConvertUTF.c", @@ -1319,8 +1336,12 @@ "external/chipmunk/prebuilt/mac/libchipmunk.a", "external/chipmunk/prebuilt/win32/debug-lib/libchipmunk.lib", "external/chipmunk/prebuilt/win32/release-lib/libchipmunk.lib", + "external/chipmunk/prebuilt/winrt_8.1/arm/libchipmunk.lib", + "external/chipmunk/prebuilt/winrt_8.1/win32/libchipmunk.lib", "external/chipmunk/prebuilt/wp8/ARM/libchipmunk.lib", "external/chipmunk/prebuilt/wp8/win32/libchipmunk.lib", + "external/chipmunk/prebuilt/wp_8.1/arm/libchipmunk.lib", + "external/chipmunk/prebuilt/wp_8.1/win32/libchipmunk.lib", "external/config.json", "external/curl/include/android/curl/curl.h", "external/curl/include/android/curl/curlbuild.h", @@ -1350,6 +1371,15 @@ "external/curl/include/win32/curl/multi.h", "external/curl/include/win32/curl/stdcheaders.h", "external/curl/include/win32/curl/typecheck-gcc.h", + "external/curl/include/winrt_8.1/curl/curl.h", + "external/curl/include/winrt_8.1/curl/curlbuild.h", + "external/curl/include/winrt_8.1/curl/curlrules.h", + "external/curl/include/winrt_8.1/curl/curlver.h", + "external/curl/include/winrt_8.1/curl/easy.h", + "external/curl/include/winrt_8.1/curl/mprintf.h", + "external/curl/include/winrt_8.1/curl/multi.h", + "external/curl/include/winrt_8.1/curl/stdcheaders.h", + "external/curl/include/winrt_8.1/curl/typecheck-gcc.h", "external/curl/include/wp8/curl/curl.h", "external/curl/include/wp8/curl/curlbuild.h", "external/curl/include/wp8/curl/curlrules.h", @@ -1359,6 +1389,15 @@ "external/curl/include/wp8/curl/multi.h", "external/curl/include/wp8/curl/stdcheaders.h", "external/curl/include/wp8/curl/typecheck-gcc.h", + "external/curl/include/wp_8.1/curl/curl.h", + "external/curl/include/wp_8.1/curl/curlbuild.h", + "external/curl/include/wp_8.1/curl/curlrules.h", + "external/curl/include/wp_8.1/curl/curlver.h", + "external/curl/include/wp_8.1/curl/easy.h", + "external/curl/include/wp_8.1/curl/mprintf.h", + "external/curl/include/wp_8.1/curl/multi.h", + "external/curl/include/wp_8.1/curl/stdcheaders.h", + "external/curl/include/wp_8.1/curl/typecheck-gcc.h", "external/curl/prebuilt/android/Android.mk", "external/curl/prebuilt/android/armeabi-v7a/libcurl.a", "external/curl/prebuilt/android/armeabi/libcurl.a", @@ -1366,6 +1405,16 @@ "external/curl/prebuilt/ios/libcurl.a", "external/curl/prebuilt/win32/libcurl.dll", "external/curl/prebuilt/win32/libcurl_imp.lib", + "external/curl/prebuilt/winrt_8.1/arm/libcurl.dll", + "external/curl/prebuilt/winrt_8.1/arm/libcurl.lib", + "external/curl/prebuilt/winrt_8.1/arm/libeay32.dll", + "external/curl/prebuilt/winrt_8.1/arm/libwebsockets.dll", + "external/curl/prebuilt/winrt_8.1/arm/libwebsockets.lib", + "external/curl/prebuilt/winrt_8.1/arm/ssleay32.dll", + "external/curl/prebuilt/winrt_8.1/win32/libcurl.dll", + "external/curl/prebuilt/winrt_8.1/win32/libcurl.lib", + "external/curl/prebuilt/winrt_8.1/win32/libeay32.dll", + "external/curl/prebuilt/winrt_8.1/win32/ssleay32.dll", "external/curl/prebuilt/wp8/arm/libcurl.dll", "external/curl/prebuilt/wp8/arm/libcurl.lib", "external/curl/prebuilt/wp8/arm/libeay32.dll", @@ -1374,6 +1423,20 @@ "external/curl/prebuilt/wp8/win32/libcurl.lib", "external/curl/prebuilt/wp8/win32/libeay32.dll", "external/curl/prebuilt/wp8/win32/ssleay32.dll", + "external/curl/prebuilt/wp_8.1/arm/libcurl.dll", + "external/curl/prebuilt/wp_8.1/arm/libcurl.lib", + "external/curl/prebuilt/wp_8.1/arm/libeay32.dll", + "external/curl/prebuilt/wp_8.1/arm/libeay32.lib", + "external/curl/prebuilt/wp_8.1/arm/libwebsockets.dll", + "external/curl/prebuilt/wp_8.1/arm/libwebsockets.lib", + "external/curl/prebuilt/wp_8.1/arm/ssleay32.dll", + "external/curl/prebuilt/wp_8.1/arm/ssleay32.lib", + "external/curl/prebuilt/wp_8.1/win32/libcurl.dll", + "external/curl/prebuilt/wp_8.1/win32/libcurl.lib", + "external/curl/prebuilt/wp_8.1/win32/libeay32.dll", + "external/curl/prebuilt/wp_8.1/win32/libeay32.lib", + "external/curl/prebuilt/wp_8.1/win32/ssleay32.dll", + "external/curl/prebuilt/wp_8.1/win32/ssleay32.lib", "external/edtaa3func/edtaa3func.cpp", "external/edtaa3func/edtaa3func.h", "external/freetype2/include/android/freetype2/freetype/config/ftconfig.h", @@ -1866,6 +1929,94 @@ "external/freetype2/include/winrt/ft2build.h", "external/freetype2/include/winrt/proj.winrt/freetype.vcxproj", "external/freetype2/include/winrt/proj.winrt/freetype.vcxproj.filters", + "external/freetype2/include/winrt_8.1/freetype/config/ftconfig.h", + "external/freetype2/include/winrt_8.1/freetype/config/ftheader.h", + "external/freetype2/include/winrt_8.1/freetype/config/ftmodule.h", + "external/freetype2/include/winrt_8.1/freetype/config/ftoption.h", + "external/freetype2/include/winrt_8.1/freetype/config/ftstdlib.h", + "external/freetype2/include/winrt_8.1/freetype/freetype.h", + "external/freetype2/include/winrt_8.1/freetype/ftadvanc.h", + "external/freetype2/include/winrt_8.1/freetype/ftautoh.h", + "external/freetype2/include/winrt_8.1/freetype/ftbbox.h", + "external/freetype2/include/winrt_8.1/freetype/ftbdf.h", + "external/freetype2/include/winrt_8.1/freetype/ftbitmap.h", + "external/freetype2/include/winrt_8.1/freetype/ftbzip2.h", + "external/freetype2/include/winrt_8.1/freetype/ftcache.h", + "external/freetype2/include/winrt_8.1/freetype/ftcffdrv.h", + "external/freetype2/include/winrt_8.1/freetype/ftchapters.h", + "external/freetype2/include/winrt_8.1/freetype/ftcid.h", + "external/freetype2/include/winrt_8.1/freetype/fterrdef.h", + "external/freetype2/include/winrt_8.1/freetype/fterrors.h", + "external/freetype2/include/winrt_8.1/freetype/ftgasp.h", + "external/freetype2/include/winrt_8.1/freetype/ftglyph.h", + "external/freetype2/include/winrt_8.1/freetype/ftgxval.h", + "external/freetype2/include/winrt_8.1/freetype/ftgzip.h", + "external/freetype2/include/winrt_8.1/freetype/ftimage.h", + "external/freetype2/include/winrt_8.1/freetype/ftincrem.h", + "external/freetype2/include/winrt_8.1/freetype/ftlcdfil.h", + "external/freetype2/include/winrt_8.1/freetype/ftlist.h", + "external/freetype2/include/winrt_8.1/freetype/ftlzw.h", + "external/freetype2/include/winrt_8.1/freetype/ftmac.h", + "external/freetype2/include/winrt_8.1/freetype/ftmm.h", + "external/freetype2/include/winrt_8.1/freetype/ftmodapi.h", + "external/freetype2/include/winrt_8.1/freetype/ftmoderr.h", + "external/freetype2/include/winrt_8.1/freetype/ftotval.h", + "external/freetype2/include/winrt_8.1/freetype/ftoutln.h", + "external/freetype2/include/winrt_8.1/freetype/ftpfr.h", + "external/freetype2/include/winrt_8.1/freetype/ftrender.h", + "external/freetype2/include/winrt_8.1/freetype/ftsizes.h", + "external/freetype2/include/winrt_8.1/freetype/ftsnames.h", + "external/freetype2/include/winrt_8.1/freetype/ftstroke.h", + "external/freetype2/include/winrt_8.1/freetype/ftsynth.h", + "external/freetype2/include/winrt_8.1/freetype/ftsystem.h", + "external/freetype2/include/winrt_8.1/freetype/fttrigon.h", + "external/freetype2/include/winrt_8.1/freetype/ftttdrv.h", + "external/freetype2/include/winrt_8.1/freetype/fttypes.h", + "external/freetype2/include/winrt_8.1/freetype/ftwinfnt.h", + "external/freetype2/include/winrt_8.1/freetype/ftxf86.h", + "external/freetype2/include/winrt_8.1/freetype/internal/autohint.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftcalc.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftdebug.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftdriver.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftgloadr.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftmemory.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftobjs.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftpic.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftrfork.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftserv.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftstream.h", + "external/freetype2/include/winrt_8.1/freetype/internal/fttrace.h", + "external/freetype2/include/winrt_8.1/freetype/internal/ftvalid.h", + "external/freetype2/include/winrt_8.1/freetype/internal/internal.h", + "external/freetype2/include/winrt_8.1/freetype/internal/psaux.h", + "external/freetype2/include/winrt_8.1/freetype/internal/pshints.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svbdf.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svcid.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svgldict.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svgxval.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svkern.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svmm.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svotval.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svpfr.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svpostnm.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svprop.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svpscmap.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svpsinfo.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svsfnt.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svttcmap.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svtteng.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svttglyf.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svwinfnt.h", + "external/freetype2/include/winrt_8.1/freetype/internal/services/svxf86nm.h", + "external/freetype2/include/winrt_8.1/freetype/internal/sfnt.h", + "external/freetype2/include/winrt_8.1/freetype/internal/t1types.h", + "external/freetype2/include/winrt_8.1/freetype/internal/tttypes.h", + "external/freetype2/include/winrt_8.1/freetype/t1tables.h", + "external/freetype2/include/winrt_8.1/freetype/ttnameid.h", + "external/freetype2/include/winrt_8.1/freetype/tttables.h", + "external/freetype2/include/winrt_8.1/freetype/tttags.h", + "external/freetype2/include/winrt_8.1/freetype/ttunpat.h", + "external/freetype2/include/winrt_8.1/ft2build.h", "external/freetype2/include/wp8/README.txt", "external/freetype2/include/wp8/freetype/config/ftconfig.h", "external/freetype2/include/wp8/freetype/config/ftheader.h", @@ -1958,6 +2109,94 @@ "external/freetype2/include/wp8/proj.wp8/freetype.sln", "external/freetype2/include/wp8/proj.wp8/freetype.vcxproj", "external/freetype2/include/wp8/proj.wp8/freetype.vcxproj.filters", + "external/freetype2/include/wp_8.1/freetype/config/ftconfig.h", + "external/freetype2/include/wp_8.1/freetype/config/ftheader.h", + "external/freetype2/include/wp_8.1/freetype/config/ftmodule.h", + "external/freetype2/include/wp_8.1/freetype/config/ftoption.h", + "external/freetype2/include/wp_8.1/freetype/config/ftstdlib.h", + "external/freetype2/include/wp_8.1/freetype/freetype.h", + "external/freetype2/include/wp_8.1/freetype/ftadvanc.h", + "external/freetype2/include/wp_8.1/freetype/ftautoh.h", + "external/freetype2/include/wp_8.1/freetype/ftbbox.h", + "external/freetype2/include/wp_8.1/freetype/ftbdf.h", + "external/freetype2/include/wp_8.1/freetype/ftbitmap.h", + "external/freetype2/include/wp_8.1/freetype/ftbzip2.h", + "external/freetype2/include/wp_8.1/freetype/ftcache.h", + "external/freetype2/include/wp_8.1/freetype/ftcffdrv.h", + "external/freetype2/include/wp_8.1/freetype/ftchapters.h", + "external/freetype2/include/wp_8.1/freetype/ftcid.h", + "external/freetype2/include/wp_8.1/freetype/fterrdef.h", + "external/freetype2/include/wp_8.1/freetype/fterrors.h", + "external/freetype2/include/wp_8.1/freetype/ftgasp.h", + "external/freetype2/include/wp_8.1/freetype/ftglyph.h", + "external/freetype2/include/wp_8.1/freetype/ftgxval.h", + "external/freetype2/include/wp_8.1/freetype/ftgzip.h", + "external/freetype2/include/wp_8.1/freetype/ftimage.h", + "external/freetype2/include/wp_8.1/freetype/ftincrem.h", + "external/freetype2/include/wp_8.1/freetype/ftlcdfil.h", + "external/freetype2/include/wp_8.1/freetype/ftlist.h", + "external/freetype2/include/wp_8.1/freetype/ftlzw.h", + "external/freetype2/include/wp_8.1/freetype/ftmac.h", + "external/freetype2/include/wp_8.1/freetype/ftmm.h", + "external/freetype2/include/wp_8.1/freetype/ftmodapi.h", + "external/freetype2/include/wp_8.1/freetype/ftmoderr.h", + "external/freetype2/include/wp_8.1/freetype/ftotval.h", + "external/freetype2/include/wp_8.1/freetype/ftoutln.h", + "external/freetype2/include/wp_8.1/freetype/ftpfr.h", + "external/freetype2/include/wp_8.1/freetype/ftrender.h", + "external/freetype2/include/wp_8.1/freetype/ftsizes.h", + "external/freetype2/include/wp_8.1/freetype/ftsnames.h", + "external/freetype2/include/wp_8.1/freetype/ftstroke.h", + "external/freetype2/include/wp_8.1/freetype/ftsynth.h", + "external/freetype2/include/wp_8.1/freetype/ftsystem.h", + "external/freetype2/include/wp_8.1/freetype/fttrigon.h", + "external/freetype2/include/wp_8.1/freetype/ftttdrv.h", + "external/freetype2/include/wp_8.1/freetype/fttypes.h", + "external/freetype2/include/wp_8.1/freetype/ftwinfnt.h", + "external/freetype2/include/wp_8.1/freetype/ftxf86.h", + "external/freetype2/include/wp_8.1/freetype/internal/autohint.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftcalc.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftdebug.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftdriver.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftgloadr.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftmemory.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftobjs.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftpic.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftrfork.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftserv.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftstream.h", + "external/freetype2/include/wp_8.1/freetype/internal/fttrace.h", + "external/freetype2/include/wp_8.1/freetype/internal/ftvalid.h", + "external/freetype2/include/wp_8.1/freetype/internal/internal.h", + "external/freetype2/include/wp_8.1/freetype/internal/psaux.h", + "external/freetype2/include/wp_8.1/freetype/internal/pshints.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svbdf.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svcid.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svgldict.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svgxval.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svkern.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svmm.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svotval.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svpfr.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svpostnm.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svprop.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svpscmap.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svpsinfo.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svsfnt.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svttcmap.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svtteng.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svttglyf.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svwinfnt.h", + "external/freetype2/include/wp_8.1/freetype/internal/services/svxf86nm.h", + "external/freetype2/include/wp_8.1/freetype/internal/sfnt.h", + "external/freetype2/include/wp_8.1/freetype/internal/t1types.h", + "external/freetype2/include/wp_8.1/freetype/internal/tttypes.h", + "external/freetype2/include/wp_8.1/freetype/t1tables.h", + "external/freetype2/include/wp_8.1/freetype/ttnameid.h", + "external/freetype2/include/wp_8.1/freetype/tttables.h", + "external/freetype2/include/wp_8.1/freetype/tttags.h", + "external/freetype2/include/wp_8.1/freetype/ttunpat.h", + "external/freetype2/include/wp_8.1/ft2build.h", "external/freetype2/prebuilt/android/Android.mk", "external/freetype2/prebuilt/android/armeabi-v7a/libfreetype.a", "external/freetype2/prebuilt/android/armeabi/libfreetype.a", @@ -1969,8 +2208,12 @@ "external/freetype2/prebuilt/win32/freetype250.lib", "external/freetype2/prebuilt/winrt/ARM/freetype.lib", "external/freetype2/prebuilt/winrt/Win32/freetype.lib", + "external/freetype2/prebuilt/winrt_8.1/arm/freetype250.lib", + "external/freetype2/prebuilt/winrt_8.1/win32/freetype250.lib", "external/freetype2/prebuilt/wp8/ARM/freetype.lib", "external/freetype2/prebuilt/wp8/Win32/freetype.lib", + "external/freetype2/prebuilt/wp_8.1/arm/freetype250.lib", + "external/freetype2/prebuilt/wp_8.1/win32/freetype250.lib", "external/glfw3/include/mac/glfw3.h", "external/glfw3/include/mac/glfw3native.h", "external/glfw3/include/win32/glfw3.h", @@ -2004,6 +2247,9 @@ "external/jpeg/include/winrt/libjpeg.sln", "external/jpeg/include/winrt/libjpeg.vcxproj", "external/jpeg/include/winrt/libjpeg.vcxproj.filters", + "external/jpeg/include/winrt_8.1/jconfig.h", + "external/jpeg/include/winrt_8.1/jmorecfg.h", + "external/jpeg/include/winrt_8.1/jpeglib.h", "external/jpeg/include/wp8/README.txt", "external/jpeg/include/wp8/jconfig.h", "external/jpeg/include/wp8/jconfig_linux.h", @@ -2013,6 +2259,9 @@ "external/jpeg/include/wp8/jpeglib.h", "external/jpeg/include/wp8/libjpeg.vcxproj", "external/jpeg/include/wp8/libjpeg.vcxproj.filters", + "external/jpeg/include/wp_8.1/jconfig.h", + "external/jpeg/include/wp_8.1/jmorecfg.h", + "external/jpeg/include/wp_8.1/jpeglib.h", "external/jpeg/prebuilt/android/Android.mk", "external/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a", "external/jpeg/prebuilt/android/armeabi/libjpeg.a", @@ -2024,8 +2273,12 @@ "external/jpeg/prebuilt/win32/libjpeg.lib", "external/jpeg/prebuilt/winrt/ARM/libjpeg.lib", "external/jpeg/prebuilt/winrt/Win32/libjpeg.lib", + "external/jpeg/prebuilt/winrt_8.1/arm/libjpeg.lib", + "external/jpeg/prebuilt/winrt_8.1/win32/libjpeg.lib", "external/jpeg/prebuilt/wp8/ARM/libjpeg.lib", "external/jpeg/prebuilt/wp8/Win32/libjpeg.lib", + "external/jpeg/prebuilt/wp_8.1/arm/libjpeg.lib", + "external/jpeg/prebuilt/wp_8.1/win32/libjpeg.lib", "external/json/document.h", "external/json/filestream.h", "external/json/internal/pow10.h", @@ -2077,12 +2330,15 @@ "external/png/include/winrt/libpng.vcxproj.filters", "external/png/include/winrt/png.h", "external/png/include/winrt/pngconf.h", - "external/png/include/wp8/README.txt", - "external/png/include/wp8/libpng.sln", - "external/png/include/wp8/libpng.vcxproj", - "external/png/include/wp8/libpng.vcxproj.filters", + "external/png/include/winrt_8.1/png.h", + "external/png/include/winrt_8.1/pngconf.h", + "external/png/include/winrt_8.1/pnglibconf.h", "external/png/include/wp8/png.h", "external/png/include/wp8/pngconf.h", + "external/png/include/wp8/pnglibconf.h", + "external/png/include/wp_8.1/png.h", + "external/png/include/wp_8.1/pngconf.h", + "external/png/include/wp_8.1/pnglibconf.h", "external/png/prebuilt/android/Android.mk", "external/png/prebuilt/android/armeabi-v7a/libpng.a", "external/png/prebuilt/android/armeabi/libpng.a", @@ -2092,8 +2348,12 @@ "external/png/prebuilt/win32/libpng.lib", "external/png/prebuilt/winrt/ARM/libpng.lib", "external/png/prebuilt/winrt/Win32/libpng.lib", + "external/png/prebuilt/winrt_8.1/arm/libpng.lib", + "external/png/prebuilt/winrt_8.1/win32/libpng.lib", "external/png/prebuilt/wp8/ARM/libpng.lib", "external/png/prebuilt/wp8/Win32/libpng.lib", + "external/png/prebuilt/wp_8.1/arm/libpng.lib", + "external/png/prebuilt/wp_8.1/win32/libpng.lib", "external/protobuf-lite/Android.mk", "external/protobuf-lite/CMakeLists.txt", "external/protobuf-lite/src/google/protobuf/config.h", @@ -2146,6 +2406,18 @@ "external/sqlite3/include/sqlite3ext.h", "external/sqlite3/libraries/win32/sqlite3.dll", "external/sqlite3/libraries/win32/sqlite3.lib", + "external/sqlite3/libraries/winrt_8.1/arm/sqlite3.dll", + "external/sqlite3/libraries/winrt_8.1/arm/sqlite3.lib", + "external/sqlite3/libraries/winrt_8.1/win32/sqlite3.dll", + "external/sqlite3/libraries/winrt_8.1/win32/sqlite3.lib", + "external/sqlite3/libraries/wp8/arm/sqlite3.dll", + "external/sqlite3/libraries/wp8/arm/sqlite3.lib", + "external/sqlite3/libraries/wp8/win32/sqlite3.dll", + "external/sqlite3/libraries/wp8/win32/sqlite3.lib", + "external/sqlite3/libraries/wp_8.1/arm/sqlite3.dll", + "external/sqlite3/libraries/wp_8.1/arm/sqlite3.lib", + "external/sqlite3/libraries/wp_8.1/win32/sqlite3.dll", + "external/sqlite3/libraries/wp_8.1/win32/sqlite3.lib", "external/tiff/CMakeLists.txt", "external/tiff/include/android/tiff.h", "external/tiff/include/android/tiffconf.h", @@ -2175,6 +2447,11 @@ "external/tiff/include/winrt/tiffconf.h", "external/tiff/include/winrt/tiffio.h", "external/tiff/include/winrt/tiffvers.h", + "external/tiff/include/winrt_8.1/tif_config.h", + "external/tiff/include/winrt_8.1/tiff.h", + "external/tiff/include/winrt_8.1/tiffconf.h", + "external/tiff/include/winrt_8.1/tiffio.h", + "external/tiff/include/winrt_8.1/tiffvers.h", "external/tiff/include/wp8/README.txt", "external/tiff/include/wp8/libtiff.vcxproj", "external/tiff/include/wp8/libtiff.vcxproj.filters", @@ -2183,6 +2460,11 @@ "external/tiff/include/wp8/tiffconf.h", "external/tiff/include/wp8/tiffio.h", "external/tiff/include/wp8/tiffvers.h", + "external/tiff/include/wp_8.1/tif_config.h", + "external/tiff/include/wp_8.1/tiff.h", + "external/tiff/include/wp_8.1/tiffconf.h", + "external/tiff/include/wp_8.1/tiffio.h", + "external/tiff/include/wp_8.1/tiffvers.h", "external/tiff/prebuilt/android/Android.mk", "external/tiff/prebuilt/android/armeabi-v7a/libtiff.a", "external/tiff/prebuilt/android/armeabi/libtiff.a", @@ -2195,8 +2477,12 @@ "external/tiff/prebuilt/win32/libtiff.lib", "external/tiff/prebuilt/winrt/ARM/libtiff.lib", "external/tiff/prebuilt/winrt/Win32/libtiff.lib", + "external/tiff/prebuilt/winrt_8.1/arm/libtiff.lib", + "external/tiff/prebuilt/winrt_8.1/win32/libtiff.lib", "external/tiff/prebuilt/wp8/ARM/libtiff.lib", "external/tiff/prebuilt/wp8/Win32/libtiff.lib", + "external/tiff/prebuilt/wp_8.1/arm/libtiff.lib", + "external/tiff/prebuilt/wp_8.1/win32/libtiff.lib", "external/tinyxml2/CMakeLists.txt", "external/tinyxml2/tinyxml2.cpp", "external/tinyxml2/tinyxml2.h", @@ -2240,6 +2526,19 @@ "external/websockets/include/win32/libwebsockets.h", "external/websockets/include/win32/win32helpers/gettimeofday.h", "external/websockets/include/win32/win32helpers/websock-w32.h", + "external/websockets/include/winrt_8.1/libwebsockets.h", + "external/websockets/include/winrt_8.1/private-libwebsockets.h", + "external/websockets/include/winrt_8.1/win32helpers/getopt.c", + "external/websockets/include/winrt_8.1/win32helpers/getopt.h", + "external/websockets/include/winrt_8.1/win32helpers/getopt_long.c", + "external/websockets/include/winrt_8.1/win32helpers/gettimeofday.c", + "external/websockets/include/winrt_8.1/win32helpers/gettimeofday.h", + "external/websockets/include/winrt_8.1/win32helpers/netdb.h", + "external/websockets/include/winrt_8.1/win32helpers/strings.h", + "external/websockets/include/winrt_8.1/win32helpers/sys/time.h", + "external/websockets/include/winrt_8.1/win32helpers/unistd.h", + "external/websockets/include/winrt_8.1/win32helpers/websock-w32.c", + "external/websockets/include/winrt_8.1/win32helpers/websock-w32.h", "external/websockets/include/wp8/libwebsockets.h", "external/websockets/include/wp8/private-libwebsockets.h", "external/websockets/include/wp8/win32helpers/getopt.c", @@ -2253,6 +2552,19 @@ "external/websockets/include/wp8/win32helpers/unistd.h", "external/websockets/include/wp8/win32helpers/websock-w32.c", "external/websockets/include/wp8/win32helpers/websock-w32.h", + "external/websockets/include/wp_8.1/libwebsockets.h", + "external/websockets/include/wp_8.1/private-libwebsockets.h", + "external/websockets/include/wp_8.1/win32helpers/getopt.c", + "external/websockets/include/wp_8.1/win32helpers/getopt.h", + "external/websockets/include/wp_8.1/win32helpers/getopt_long.c", + "external/websockets/include/wp_8.1/win32helpers/gettimeofday.c", + "external/websockets/include/wp_8.1/win32helpers/gettimeofday.h", + "external/websockets/include/wp_8.1/win32helpers/netdb.h", + "external/websockets/include/wp_8.1/win32helpers/strings.h", + "external/websockets/include/wp_8.1/win32helpers/sys/time.h", + "external/websockets/include/wp_8.1/win32helpers/unistd.h", + "external/websockets/include/wp_8.1/win32helpers/websock-w32.c", + "external/websockets/include/wp_8.1/win32helpers/websock-w32.h", "external/websockets/prebuilt/android/Android.mk", "external/websockets/prebuilt/android/armeabi-v7a/libwebsockets.a", "external/websockets/prebuilt/android/armeabi/libwebsockets.a", @@ -2263,10 +2575,18 @@ "external/websockets/prebuilt/mac/libwebsockets.a", "external/websockets/prebuilt/win32/websockets.dll", "external/websockets/prebuilt/win32/websockets.lib", + "external/websockets/prebuilt/winrt_8.1/arm/libwebsockets.dll", + "external/websockets/prebuilt/winrt_8.1/arm/libwebsockets.lib", + "external/websockets/prebuilt/winrt_8.1/win32/libwebsockets.dll", + "external/websockets/prebuilt/winrt_8.1/win32/libwebsockets.lib", "external/websockets/prebuilt/wp8/arm/libwebsockets.dll", "external/websockets/prebuilt/wp8/arm/libwebsockets.lib", "external/websockets/prebuilt/wp8/win32/libwebsockets.dll", "external/websockets/prebuilt/wp8/win32/libwebsockets.lib", + "external/websockets/prebuilt/wp_8.1/arm/libwebsockets.dll", + "external/websockets/prebuilt/wp_8.1/arm/libwebsockets.lib", + "external/websockets/prebuilt/wp_8.1/win32/libwebsockets.dll", + "external/websockets/prebuilt/wp_8.1/win32/libwebsockets.lib", "external/win32-specific/MP3Decoder/include/mpg123.h", "external/win32-specific/MP3Decoder/prebuilt/libmpg123.dll", "external/win32-specific/MP3Decoder/prebuilt/libmpg123.lib", @@ -2329,6 +2649,42 @@ "external/winrt-specific/zlib/include/zlib.vcxproj.filters", "external/winrt-specific/zlib/prebuilt/ARM/zlib.lib", "external/winrt-specific/zlib/prebuilt/Win32/zlib.lib", + "external/winrt_8.1-specific/angle/include/EGL/egl.h", + "external/winrt_8.1-specific/angle/include/EGL/eglext.h", + "external/winrt_8.1-specific/angle/include/EGL/eglplatform.h", + "external/winrt_8.1-specific/angle/include/GLES2/gl2.h", + "external/winrt_8.1-specific/angle/include/GLES2/gl2ext.h", + "external/winrt_8.1-specific/angle/include/GLES2/gl2platform.h", + "external/winrt_8.1-specific/angle/include/GLES3/gl3.h", + "external/winrt_8.1-specific/angle/include/GLES3/gl3ext.h", + "external/winrt_8.1-specific/angle/include/GLES3/gl3platform.h", + "external/winrt_8.1-specific/angle/include/GLSLANG/ShaderLang.h", + "external/winrt_8.1-specific/angle/include/GLSLANG/ShaderVars.h", + "external/winrt_8.1-specific/angle/include/KHR/khrplatform.h", + "external/winrt_8.1-specific/angle/include/angle_gl.h", + "external/winrt_8.1-specific/angle/include/angle_windowsstore.h", + "external/winrt_8.1-specific/angle/prebuilt/arm/libEGL.dll", + "external/winrt_8.1-specific/angle/prebuilt/arm/libEGL.lib", + "external/winrt_8.1-specific/angle/prebuilt/arm/libGLESv2.dll", + "external/winrt_8.1-specific/angle/prebuilt/arm/libGLESv2.lib", + "external/winrt_8.1-specific/angle/prebuilt/win32/libEGL.dll", + "external/winrt_8.1-specific/angle/prebuilt/win32/libEGL.lib", + "external/winrt_8.1-specific/angle/prebuilt/win32/libGLESv2.dll", + "external/winrt_8.1-specific/angle/prebuilt/win32/libGLESv2.lib", + "external/winrt_8.1-specific/zlib/include/zconf.h", + "external/winrt_8.1-specific/zlib/include/zlib.h", + "external/winrt_8.1-specific/zlib/prebuilt/arm/zlib.lib", + "external/winrt_8.1-specific/zlib/prebuilt/win32/zlib.lib", + "external/wp8-specific/angle/include/EGL/egl.h", + "external/wp8-specific/angle/include/EGL/eglext.h", + "external/wp8-specific/angle/include/EGL/eglplatform.h", + "external/wp8-specific/angle/include/GLES2/gl2.h", + "external/wp8-specific/angle/include/GLES2/gl2ext.h", + "external/wp8-specific/angle/include/GLES2/gl2platform.h", + "external/wp8-specific/angle/include/GLSLANG/ShaderLang.h", + "external/wp8-specific/angle/include/KHR/khrplatform.h", + "external/wp8-specific/angle/include/esUtil.h", + "external/wp8-specific/angle/include/winrtangle.h", "external/wp8-specific/angle/prebuilt/ARM/esUtil_phone.lib", "external/wp8-specific/angle/prebuilt/ARM/libEGL_phone.dll", "external/wp8-specific/angle/prebuilt/ARM/libEGL_phone.lib", @@ -2346,6 +2702,32 @@ "external/wp8-specific/zlib/include/zlib.vcxproj.filters", "external/wp8-specific/zlib/prebuilt/ARM/zlib.lib", "external/wp8-specific/zlib/prebuilt/Win32/zlib.lib", + "external/wp_8.1-specific/angle/include/EGL/egl.h", + "external/wp_8.1-specific/angle/include/EGL/eglext.h", + "external/wp_8.1-specific/angle/include/EGL/eglplatform.h", + "external/wp_8.1-specific/angle/include/GLES2/gl2.h", + "external/wp_8.1-specific/angle/include/GLES2/gl2ext.h", + "external/wp_8.1-specific/angle/include/GLES2/gl2platform.h", + "external/wp_8.1-specific/angle/include/GLES3/gl3.h", + "external/wp_8.1-specific/angle/include/GLES3/gl3ext.h", + "external/wp_8.1-specific/angle/include/GLES3/gl3platform.h", + "external/wp_8.1-specific/angle/include/GLSLANG/ShaderLang.h", + "external/wp_8.1-specific/angle/include/GLSLANG/ShaderVars.h", + "external/wp_8.1-specific/angle/include/KHR/khrplatform.h", + "external/wp_8.1-specific/angle/include/angle_gl.h", + "external/wp_8.1-specific/angle/include/angle_windowsstore.h", + "external/wp_8.1-specific/angle/prebuilt/arm/libEGL.dll", + "external/wp_8.1-specific/angle/prebuilt/arm/libEGL.lib", + "external/wp_8.1-specific/angle/prebuilt/arm/libGLESv2.dll", + "external/wp_8.1-specific/angle/prebuilt/arm/libGLESv2.lib", + "external/wp_8.1-specific/angle/prebuilt/win32/libEGL.dll", + "external/wp_8.1-specific/angle/prebuilt/win32/libEGL.lib", + "external/wp_8.1-specific/angle/prebuilt/win32/libGLESv2.dll", + "external/wp_8.1-specific/angle/prebuilt/win32/libGLESv2.lib", + "external/wp_8.1-specific/zlib/include/zconf.h", + "external/wp_8.1-specific/zlib/include/zlib.h", + "external/wp_8.1-specific/zlib/prebuilt/arm/zlib.lib", + "external/wp_8.1-specific/zlib/prebuilt/win32/zlib.lib", "external/xxhash/CMakeLists.txt", "external/xxhash/xxhash.c", "external/xxhash/xxhash.h", @@ -4237,6 +4619,7 @@ "cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua", "cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua", "cocos/scripting/lua-bindings/auto/api/AssetsManager.lua", + "cocos/scripting/lua-bindings/auto/api/AssetsManagerEx.lua", "cocos/scripting/lua-bindings/auto/api/AtlasNode.lua", "cocos/scripting/lua-bindings/auto/api/AttachNode.lua", "cocos/scripting/lua-bindings/auto/api/AudioEngine.lua", @@ -4261,6 +4644,7 @@ "cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua", "cocos/scripting/lua-bindings/auto/api/CheckBox.lua", "cocos/scripting/lua-bindings/auto/api/ClippingNode.lua", + "cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua", "cocos/scripting/lua-bindings/auto/api/ColorFrame.lua", "cocos/scripting/lua-bindings/auto/api/ComAttribute.lua", "cocos/scripting/lua-bindings/auto/api/ComAudio.lua", @@ -4325,6 +4709,7 @@ "cocos/scripting/lua-bindings/auto/api/EditBox.lua", "cocos/scripting/lua-bindings/auto/api/Event.lua", "cocos/scripting/lua-bindings/auto/api/EventAcceleration.lua", + "cocos/scripting/lua-bindings/auto/api/EventAssetsManagerEx.lua", "cocos/scripting/lua-bindings/auto/api/EventController.lua", "cocos/scripting/lua-bindings/auto/api/EventCustom.lua", "cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua", @@ -4333,6 +4718,7 @@ "cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua", "cocos/scripting/lua-bindings/auto/api/EventListener.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua", + "cocos/scripting/lua-bindings/auto/api/EventListenerAssetsManagerEx.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerController.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua", @@ -4394,6 +4780,7 @@ "cocos/scripting/lua-bindings/auto/api/Liquid.lua", "cocos/scripting/lua-bindings/auto/api/ListView.lua", "cocos/scripting/lua-bindings/auto/api/LoadingBar.lua", + "cocos/scripting/lua-bindings/auto/api/Manifest.lua", "cocos/scripting/lua-bindings/auto/api/Menu.lua", "cocos/scripting/lua-bindings/auto/api/MenuItem.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemAtlasFont.lua", @@ -4494,9 +4881,9 @@ "cocos/scripting/lua-bindings/auto/api/Show.lua", "cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua", "cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua", - "cocos/scripting/lua-bindings/auto/api/Skeleton.lua", "cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua", "cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua", + "cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua", "cocos/scripting/lua-bindings/auto/api/SkewBy.lua", "cocos/scripting/lua-bindings/auto/api/SkewFrame.lua", "cocos/scripting/lua-bindings/auto/api/SkewTo.lua", @@ -4732,6 +5119,7 @@ "cocos/scripting/lua-bindings/script/network/DeprecatedNetworkEnum.lua", "cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua", "cocos/scripting/lua-bindings/script/network/NetworkConstants.lua", + "cocos/scripting/lua-bindings/script/spine/SpineConstants.lua", "cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua", "cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua", "cocos/scripting/lua-bindings/script/ui/GuiConstants.lua", diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index bbc1a303b7..2b810ea4ec 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -20,13 +20,18 @@ if (MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1") + set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -std=c99") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -std=c++11 -stdlib=libc++ -Wno-deprecated-declarations -Wno-reorder") + elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1") set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder") - endif() # architecture @@ -36,7 +41,34 @@ else() set(ARCH_DIR "32-bit") endif() -if( UNIX ) #assume linux +if( APPLE AND IOS ) +include_directories(Classes) +set(GAME_SRC + proj.ios_mac/ios/main.m + proj.ios_mac/ios/RootViewController.mm + proj.ios_mac/ios/AppController.mm + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) +set(GAME_HEADERS + Classes/AppDelegate.h + Classes/HelloWorldScene.h + proj.ios_mac/ios/RootViewController.h + proj.ios_mac/ios/AppController.h +) +elseif(APPLE) #desktop +include_directories(Classes) +include(Classes/CMakeLists.txt) +set(GAME_SRC + proj.ios_mac/mac/main.cpp + Classes/AppDelegate.cpp + Classes/HelloWorldScene.cpp +) +set(GAME_HEADERS + Classes/AppDelegate.h + Classes/HelloWorldScene.h +) +elseif( UNIX AND NOT APPLE) #assume linux set(GAME_SRC proj.linux/main.cpp Classes/AppDelegate.cpp @@ -132,9 +164,61 @@ include_directories( ${COCOS2D_ROOT}/external/linux-specific/fmod/include/${ARCH_DIR} ${COCOS2D_ROOT}/external/xxhash ) +elseif(APPLE AND IOS) +include_directories( + /usr/local/include/GLFW + /usr/include/GLFW + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/platform + ${COCOS2D_ROOT}/cocos/platform/ios + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/chipmunk/include/chipmunk + ${COCOS2D_ROOT}/external/jpeg/include/ios + ${COCOS2D_ROOT}/external/tiff/include/ios + ${COCOS2D_ROOT}/external/webp/include/ios + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/freetype2/include/ios + ${COCOS2D_ROOT}/external/websockets/include/ios + ${COCOS2D_ROOT}/external/spidermonkey/include/liniosux + ${COCOS2D_ROOT}/external/xxhash +) +elseif(APPLE) +include_directories( + /usr/local/include/GLFW + /usr/include/GLFW + ${COCOS2D_ROOT} + ${COCOS2D_ROOT}/cocos + ${COCOS2D_ROOT}/cocos/audio/include + ${COCOS2D_ROOT}/cocos/platform + ${COCOS2D_ROOT}/cocos/platform/mac + ${COCOS2D_ROOT}/cocos/editor-support + ${COCOS2D_ROOT}/extensions + ${COCOS2D_ROOT}/external + ${COCOS2D_ROOT}/external/edtaa3func + ${COCOS2D_ROOT}/external/chipmunk/include/chipmunk + ${COCOS2D_ROOT}/external/jpeg/include/mac + ${COCOS2D_ROOT}/external/tiff/include/mac + ${COCOS2D_ROOT}/external/webp/include/mac + ${COCOS2D_ROOT}/external/tinyxml2 + ${COCOS2D_ROOT}/external/unzip + ${COCOS2D_ROOT}/external/freetype2/include/mac + ${COCOS2D_ROOT}/external/websockets/include/mac + ${COCOS2D_ROOT}/external/spidermonkey/include/liniosux + ${COCOS2D_ROOT}/external/xxhash +) +endif() +if(NOT APPLE) ADD_DEFINITIONS(-DLINUX) +endif() +if(LINUX) link_directories( /usr/local/lib ${COCOS2D_ROOT}/external/jpeg/prebuilt/linux/${ARCH_DIR} @@ -146,10 +230,42 @@ link_directories( ${COCOS2D_ROOT}/external/linux-specific/fmod/prebuilt/${ARCH_DIR} ${COCOS2D_ROOT}/external/chipmunk/prebuilt/linux/${ARCH_DIR} ) +elseif(APPLE AND IOS) +link_directories( + /usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/ios + ${COCOS2D_ROOT}/external/tiff/prebuilt/ios + ${COCOS2D_ROOT}/external/webp/prebuilt/ios + ${COCOS2D_ROOT}/external/freetype2/prebuilt/ios + ${COCOS2D_ROOT}/external/websockets/prebuilt/ios + ${COCOS2D_ROOT}/external/chipmunk/prebuilt/ios +) +elseif(APPLE) +if(IOS) +link_directories( +/usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/ios + ${COCOS2D_ROOT}/external/tiff/prebuilt/ios + ${COCOS2D_ROOT}/external/webp/prebuilt/ios + ${COCOS2D_ROOT}/external/freetype2/prebuilt/ios + ${COCOS2D_ROOT}/external/websockets/prebuilt/ios + ${COCOS2D_ROOT}/external/chipmunk/prebuilt/ios +) +else() +link_directories( +/usr/local/lib + ${COCOS2D_ROOT}/external/jpeg/prebuilt/mac + ${COCOS2D_ROOT}/external/tiff/prebuilt/mac + ${COCOS2D_ROOT}/external/webp/prebuilt/mac + ${COCOS2D_ROOT}/external/freetype2/prebuilt/mac + ${COCOS2D_ROOT}/external/websockets/prebuilt/mac + ${COCOS2D_ROOT}/external/chipmunk/prebuilt/mac +) +endif() endif() # build for 3rd party libraries -if(LINUX) +if(LINUX OR APPLE) add_subdirectory(${COCOS2D_ROOT}/external/Box2D) add_subdirectory(${COCOS2D_ROOT}/external/unzip) add_subdirectory(${COCOS2D_ROOT}/external/xxhash) @@ -159,8 +275,11 @@ endif() # libcocos2d add_subdirectory(${COCOS2D_ROOT}/cocos) - +if(GAME_HEADERS) +add_executable(${APP_NAME} ${GAME_SRC} ${GAME_HEADERS}) +else() add_executable(${APP_NAME} ${GAME_SRC}) +endif() target_link_libraries(${APP_NAME} cocos2d) diff --git a/templates/cpp-template-default/Classes/HelloWorldScene.cpp b/templates/cpp-template-default/Classes/HelloWorldScene.cpp index cea2c2ccfa..8a437afe99 100644 --- a/templates/cpp-template-default/Classes/HelloWorldScene.cpp +++ b/templates/cpp-template-default/Classes/HelloWorldScene.cpp @@ -54,7 +54,7 @@ bool HelloWorld::init() // add a label shows "Hello World" // create and initialize a label - auto label = LabelTTF::create("Hello World", "Arial", 24); + auto label = Label::createWithTTF("Hello World", "Arial", 24); // position the label on the center of the screen label->setPosition(Vec2(origin.x + visibleSize.width/2, diff --git a/templates/cpp-template-default/Classes/HelloWorldScene.h b/templates/cpp-template-default/Classes/HelloWorldScene.h index 02cacbed5f..dbf4013485 100644 --- a/templates/cpp-template-default/Classes/HelloWorldScene.h +++ b/templates/cpp-template-default/Classes/HelloWorldScene.h @@ -10,7 +10,7 @@ public: static cocos2d::Scene* createScene(); // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone - virtual bool init(); + virtual bool init(); // a selector callback void menuCloseCallback(cocos2d::Ref* pSender); diff --git a/templates/cpp-template-default/Resources/res/.gitkeep b/templates/cpp-template-default/Resources/res/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj index 3ca78d1be6..9834bed23e 100644 --- a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj +++ b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 3EACC98F19EE6D4300EB3C5E /* res in Resources */ = {isa = PBXBuildFile; fileRef = 3EACC98E19EE6D4300EB3C5E /* res */; }; + 3EACC99019EE6D4300EB3C5E /* res in Resources */ = {isa = PBXBuildFile; fileRef = 3EACC98E19EE6D4300EB3C5E /* res */; }; 46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; }; 46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; }; 46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; }; @@ -55,6 +57,8 @@ 50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF629517ECD46A001EB2F8 /* Icon-100.png */; }; 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A017ECD613001EB2F8 /* Icon-29.png */; }; 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A117ECD613001EB2F8 /* Icon-50.png */; }; + 521A8E6419F0C34300D177D7 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6219F0C34300D177D7 /* Default-667h@2x.png */; }; + 521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */; }; BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; }; BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; }; @@ -102,6 +106,7 @@ 1D6058910D05DD3D006BFB54 /* HelloCpp iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloCpp iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 3EACC98E19EE6D4300EB3C5E /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "res"; sourceTree = ""; }; 46880B7619C43A67006E1F66 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = ""; }; 46880B7719C43A67006E1F66 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = ""; }; 46880B7919C43A67006E1F66 /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = ""; }; @@ -142,6 +147,8 @@ 50EF629517ECD46A001EB2F8 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; 50EF62A017ECD613001EB2F8 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; 50EF62A117ECD613001EB2F8 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; + 521A8E6219F0C34300D177D7 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -263,6 +270,7 @@ 46880B7519C43A67006E1F66 /* Resources */ = { isa = PBXGroup; children = ( + 3EACC98E19EE6D4300EB3C5E /* res */, 46880B7619C43A67006E1F66 /* CloseNormal.png */, 46880B7719C43A67006E1F66 /* CloseSelected.png */, 46880B7819C43A67006E1F66 /* fonts */, @@ -315,6 +323,8 @@ 5087E77117EB970100C73F5D /* Icons */ = { isa = PBXGroup; children = ( + 521A8E6219F0C34300D177D7 /* Default-667h@2x.png */, + 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */, 5087E77217EB970100C73F5D /* Default-568h@2x.png */, 5087E77317EB970100C73F5D /* Default.png */, 5087E77417EB970100C73F5D /* Default@2x.png */, @@ -446,15 +456,18 @@ 46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */, 5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */, 5087E78517EB970100C73F5D /* Icon-72.png in Resources */, + 521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */, 50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */, 5087E78017EB970100C73F5D /* Icon-114.png in Resources */, 46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */, 50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */, 50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */, 5087E78217EB970100C73F5D /* Icon-144.png in Resources */, + 3EACC98F19EE6D4300EB3C5E /* res in Resources */, 50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */, 5087E78417EB970100C73F5D /* Icon-57.png in Resources */, 5087E77E17EB970100C73F5D /* Default.png in Resources */, + 521A8E6419F0C34300D177D7 /* Default-667h@2x.png in Resources */, 46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */, 50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */, ); @@ -467,6 +480,7 @@ 46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */, 46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */, 503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */, + 3EACC99019EE6D4300EB3C5E /* res in Resources */, 46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */, 46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */, ); diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Default-667h@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/Default-667h@2x.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Default-736h@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/Default-736h@3x.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Info.plist b/templates/cpp-template-default/proj.ios_mac/ios/Info.plist index 9613e3c273..5a2a98e47c 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/Info.plist +++ b/templates/cpp-template-default/proj.ios_mac/ios/Info.plist @@ -55,6 +55,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIAppFonts diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj index cb1022aa77..001e96c4c4 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj +++ b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj @@ -62,20 +62,24 @@ - - + + + - - + + + - - + + + - - + + + @@ -83,7 +87,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -103,7 +107,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -123,7 +127,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -143,7 +147,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -167,113 +171,42 @@ false - - - {b5af91b3-64ea-44e1-84b0-d759e93758fb} - - - {df125891-eee9-4466-b903-f828fd272158} - - - {20d4035d-fd3f-4fd3-baba-97bc1c38dfc2} - - - {51e5736e-e1a3-4c94-abb7-e92ecef9c12e} - - - {7d4fc6eb-9497-4804-98f3-3eaedc896154} - - - {7daa99e7-8e07-4fef-8374-8ec04e395d2e} - - - {88982c27-5a7b-40a8-86e7-b3187b44b322} - - - {08fb23e4-1517-4edc-b682-da238cdaa83d} - - - {04a0c42f-23bb-469b-a9d8-ca49136adbd4} - - - {c55734a3-702c-4fa1-b950-32c8e169302f} - - - - Create - Create - Create - Create - + + Create + Create + Create + Create + - + - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - + + {7c5dbc42-27f6-4978-aabc-02ba77e2a7f0} + + + {7d4fc6eb-9497-4804-98f3-3eaedc896154} + + + {c55734a3-702c-4fa1-b950-32c8e169302f} + diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj.filters b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj.filters index 635d66d9ae..ec4cf74ac2 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj.filters +++ b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/HelloCppComponent.vcxproj.filters @@ -1,21 +1,20 @@  - - platform_src + src - platform_src + src - platform_src + src - platform_src + src - platform_src + src Classes @@ -23,26 +22,28 @@ Classes + + src + - - platform_src + src - platform_src + src - platform_src + src - platform_src + src - platform_src + src - platform_src + src Classes @@ -50,27 +51,25 @@ Classes + + src + - - {6fcff44b-bb9f-4ed9-8553-558855bc91e3} - {ddb0f381-1dc4-44a0-ab28-0f672a551265} + + {6fcff44b-bb9f-4ed9-8553-558855bc91e3} + - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.cpp b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.cpp deleted file mode 100644 index bcb5590be1..0000000000 --- a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.h b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.h deleted file mode 100644 index 5e0bbb907c..0000000000 --- a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/pch.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "cocos2d.h" diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/Cocos2dRenderer.cpp b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/Cocos2dRenderer.cpp index 608cc6f828..d0d5a5f61c 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/Cocos2dRenderer.cpp +++ b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/Cocos2dRenderer.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "Cocos2dRenderer.h" #include "cocos2d.h" #include "CCApplication.h" -#include "CCGLViewImpl.h" +#include "CCGLViewImpl-wp8.h" #include "AppDelegate.h" #include @@ -56,11 +56,11 @@ void Cocos2dRenderer::CreateGLResources() GLViewImpl* glview = GLViewImpl::create("Test Cpp"); glview->Create(m_eglDisplay, m_eglContext, m_eglSurface, m_renderTargetSize.Width, m_renderTargetSize.Height,m_orientation); director->setOpenGLView(glview); - CCApplication::getInstance()->run(); glview->SetXamlEventDelegate(m_delegate); glview->SetXamlMessageBoxDelegate(m_messageBoxDelegate); glview->SetXamlEditBoxDelegate(m_editBoxDelegate); - } + CCApplication::getInstance()->run(); + } else { cocos2d::GL::invalidateStateCache(); @@ -71,7 +71,7 @@ void Cocos2dRenderer::CreateGLResources() director->getEventDispatcher()->dispatchEvent(&recreatedEvent); cocos2d::Application::getInstance()->applicationWillEnterForeground(); director->setGLDefaultValues(); - } + } m_loadingComplete = true; } diff --git a/cocos/editor-support/cocosbuilder/proj.wp8/pch.cpp b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/pch.cpp similarity index 100% rename from cocos/editor-support/cocosbuilder/proj.wp8/pch.cpp rename to templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/pch.cpp diff --git a/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/pch.h b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/pch.h new file mode 100644 index 0000000000..5dbe96eb9f --- /dev/null +++ b/templates/cpp-template-default/proj.wp8-xaml/AppComponent/src/pch.h @@ -0,0 +1,11 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include +#include "cocos2d.h" +#include "cocos-ext.h" \ No newline at end of file diff --git a/templates/cpp-template-default/proj.wp8-xaml/HelloCpp.sln b/templates/cpp-template-default/proj.wp8-xaml/HelloCpp.sln index 40aa8942b1..e70edfa5b2 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/HelloCpp.sln +++ b/templates/cpp-template-default/proj.wp8-xaml/HelloCpp.sln @@ -1,30 +1,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloCpp", "App\HelloCpp.csproj", "{83CC88FE-7E79-4E1E-A129-742987130B5C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCppComponent", "AppComponent\HelloCppComponent.vcxproj", "{60EC6889-C3C4-45AD-A006-47D9EE689212}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d_wp8.vcxproj", "{B5AF91B3-64EA-44E1-84B0-D759E93758FB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDenshion", "..\cocos2d\cocos\audio\proj.wp8\CocosDenshion.vcxproj", "{DF125891-EEE9-4466-B903-F828FD272158}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.wp8\libExtensions.vcxproj", "{04A0C42F-23BB-469B-A9D8-CA49136ADBD4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d\cocos\editor-support\cocosbuilder\proj.wp8\libCocosBuilder.vcxproj", "{20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2d\cocos\editor-support\cocostudio\proj.wp8\libCocosStudio.vcxproj", "{51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.wp8\libSpine.vcxproj", "{7D4FC6EB-9497-4804-98F3-3EAEDC896154}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos2d\cocos\storage\local-storage\proj.wp8\libLocalStorage.vcxproj", "{88982C27-5A7B-40A8-86E7-B3187B44B322}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\ui\proj.wp8\libGUI.vcxproj", "{08FB23E4-1517-4EDC-B682-DA238CDAA83D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{1CD6A64E-A2B6-49BC-A5DC-25122C07166A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Box2D", "..\cocos2d\external\Box2D\proj.wp8\Box2D.vcxproj", "{C55734A3-702C-4FA1-B950-32C8E169302F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos2d\cocos\network\proj.wp8\libNetwork.vcxproj", "{7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.wp8\libSpine.vcxproj", "{7D4FC6EB-9497-4804-98F3-3EAEDC896154}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_wp8", "..\cocos2d\cocos\2d\libcocos2d_wp8.vcxproj", "{7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -88,150 +76,6 @@ Global {60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Win32.Build.0 = Release|Win32 {60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|x86.ActiveCfg = Release|Win32 {60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|x86.Build.0 = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.ActiveCfg = Debug|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.Build.0 = Debug|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.ActiveCfg = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.Build.0 = Debug|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Any CPU.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.ActiveCfg = Release|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.Build.0 = Release|ARM - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.Build.0 = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.Build.0 = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.ActiveCfg = Release|Win32 - {B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.ActiveCfg = Debug|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.Build.0 = Debug|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.ActiveCfg = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.Build.0 = Debug|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Any CPU.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.ActiveCfg = Release|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.Build.0 = Release|ARM - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.Build.0 = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.ActiveCfg = Release|Win32 - {DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.ActiveCfg = Debug|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|ARM.Build.0 = Debug|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Win32.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|Win32.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|x86.ActiveCfg = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Debug|x86.Build.0 = Debug|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Any CPU.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|ARM.ActiveCfg = Release|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|ARM.Build.0 = Release|ARM - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Mixed Platforms.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Win32.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|Win32.Build.0 = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|x86.ActiveCfg = Release|Win32 - {04A0C42F-23BB-469B-A9D8-CA49136ADBD4}.Release|x86.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|ARM.ActiveCfg = Debug|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|ARM.Build.0 = Debug|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Win32.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|Win32.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|x86.ActiveCfg = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Debug|x86.Build.0 = Debug|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Any CPU.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|ARM.ActiveCfg = Release|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|ARM.Build.0 = Release|ARM - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Mixed Platforms.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Win32.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|Win32.Build.0 = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|x86.ActiveCfg = Release|Win32 - {20D4035D-FD3F-4FD3-BABA-97BC1C38DFC2}.Release|x86.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|ARM.ActiveCfg = Debug|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|ARM.Build.0 = Debug|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Win32.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|Win32.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|x86.ActiveCfg = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Debug|x86.Build.0 = Debug|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Any CPU.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|ARM.ActiveCfg = Release|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|ARM.Build.0 = Release|ARM - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Mixed Platforms.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Win32.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|Win32.Build.0 = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|x86.ActiveCfg = Release|Win32 - {51E5736E-E1A3-4C94-ABB7-E92ECEF9C12E}.Release|x86.Build.0 = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.ActiveCfg = Debug|ARM - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.Build.0 = Debug|ARM - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Win32.ActiveCfg = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Win32.Build.0 = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|x86.ActiveCfg = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|x86.Build.0 = Debug|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Any CPU.ActiveCfg = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|ARM.ActiveCfg = Release|ARM - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|ARM.Build.0 = Release|ARM - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Mixed Platforms.Build.0 = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Win32.ActiveCfg = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Win32.Build.0 = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.ActiveCfg = Release|Win32 - {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.ActiveCfg = Debug|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.Build.0 = Debug|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Win32.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Win32.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|x86.ActiveCfg = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|x86.Build.0 = Debug|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Any CPU.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|ARM.ActiveCfg = Release|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|ARM.Build.0 = Release|ARM - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Mixed Platforms.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Win32.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|Win32.Build.0 = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|x86.ActiveCfg = Release|Win32 - {88982C27-5A7B-40A8-86E7-B3187B44B322}.Release|x86.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.ActiveCfg = Debug|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|ARM.Build.0 = Debug|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Win32.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|Win32.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|x86.ActiveCfg = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Debug|x86.Build.0 = Debug|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Any CPU.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|ARM.ActiveCfg = Release|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|ARM.Build.0 = Release|ARM - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Mixed Platforms.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Win32.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|Win32.Build.0 = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.ActiveCfg = Release|Win32 - {08FB23E4-1517-4EDC-B682-DA238CDAA83D}.Release|x86.Build.0 = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|Any CPU.ActiveCfg = Debug|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|ARM.ActiveCfg = Debug|ARM {C55734A3-702C-4FA1-B950-32C8E169302F}.Debug|ARM.Build.0 = Debug|ARM @@ -250,26 +94,48 @@ Global {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|Win32.Build.0 = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.ActiveCfg = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|ARM.ActiveCfg = Debug|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|ARM.Build.0 = Debug|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|Win32.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|x86.ActiveCfg = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Debug|x86.Build.0 = Debug|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Any CPU.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|ARM.ActiveCfg = Release|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|ARM.Build.0 = Release|ARM - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Mixed Platforms.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Win32.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|Win32.Build.0 = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|x86.ActiveCfg = Release|Win32 - {7DAA99E7-8E07-4FEF-8374-8EC04E395D2E}.Release|x86.Build.0 = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.ActiveCfg = Debug|ARM + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|ARM.Build.0 = Debug|ARM + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Win32.ActiveCfg = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|Win32.Build.0 = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|x86.ActiveCfg = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Debug|x86.Build.0 = Debug|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Any CPU.ActiveCfg = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|ARM.ActiveCfg = Release|ARM + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|ARM.Build.0 = Release|ARM + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Win32.ActiveCfg = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|Win32.Build.0 = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.ActiveCfg = Release|Win32 + {7D4FC6EB-9497-4804-98F3-3EAEDC896154}.Release|x86.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|ARM.ActiveCfg = Debug|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|ARM.Build.0 = Debug|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Win32.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|Win32.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|x86.ActiveCfg = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Debug|x86.Build.0 = Debug|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Any CPU.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|ARM.ActiveCfg = Release|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|ARM.Build.0 = Release|ARM + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Win32.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|Win32.Build.0 = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|x86.ActiveCfg = Release|Win32 + {7C5DBC42-27F6-4978-AABC-02BA77E2A7F0}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C55734A3-702C-4FA1-B950-32C8E169302F} = {1CD6A64E-A2B6-49BC-A5DC-25122C07166A} + {7D4FC6EB-9497-4804-98F3-3EAEDC896154} = {1CD6A64E-A2B6-49BC-A5DC-25122C07166A} + EndGlobalSection EndGlobal diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index 945c790335..1d94185add 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -46,6 +46,8 @@ 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */; }; 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */; }; 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */; }; + 521A8E6A19F0C3AC00D177D7 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6819F0C3AC00D177D7 /* Default-667h@2x.png */; }; + 521A8E6B19F0C3AC00D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6919F0C3AC00D177D7 /* Default-736h@3x.png */; }; C03781B918BF655400FE4F13 /* res in Resources */ = {isa = PBXBuildFile; fileRef = C03781B718BF655400FE4F13 /* res */; }; C03781BA18BF655400FE4F13 /* res in Resources */ = {isa = PBXBuildFile; fileRef = C03781B718BF655400FE4F13 /* res */; }; C03781BB18BF655400FE4F13 /* src in Resources */ = {isa = PBXBuildFile; fileRef = C03781B818BF655400FE4F13 /* src */; }; @@ -159,6 +161,8 @@ 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 521A8E6819F0C3AC00D177D7 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 521A8E6919F0C3AC00D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; C03781AE18BF654500FE4F13 /* cocos2d_lua_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_lua_bindings.xcodeproj; path = "../../cocos2d-x/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj"; sourceTree = ""; }; C03781B718BF655400FE4F13 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../../../res; sourceTree = ""; }; C03781B818BF655400FE4F13 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../../src; sourceTree = ""; }; @@ -232,6 +236,8 @@ 5023810617EBBCAC00990C9B /* ios */ = { isa = PBXGroup; children = ( + 521A8E6819F0C3AC00D177D7 /* Default-667h@2x.png */, + 521A8E6919F0C3AC00D177D7 /* Default-736h@3x.png */, 5023810717EBBCAC00990C9B /* AppController.h */, 5023810817EBBCAC00990C9B /* AppController.mm */, 5023810917EBBCAC00990C9B /* Default-568h@2x.png */, @@ -492,6 +498,8 @@ 5091733617ECE17A00D62437 /* Icon-29.png in Resources */, 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */, 5091733917ECE17A00D62437 /* Icon-58.png in Resources */, + 521A8E6B19F0C3AC00D177D7 /* Default-736h@3x.png in Resources */, + 521A8E6A19F0C3AC00D177D7 /* Default-667h@2x.png in Resources */, 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */, 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */, C03781B918BF655400FE4F13 /* res in Resources */, diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist index ac80cbf650..a496e7a91a 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist @@ -49,6 +49,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon diff --git a/templates/lua-template-runtime/cocos-project-template.json b/templates/lua-template-runtime/cocos-project-template.json index b75ccf0fbe..be860c7814 100644 --- a/templates/lua-template-runtime/cocos-project-template.json +++ b/templates/lua-template-runtime/cocos-project-template.json @@ -26,14 +26,35 @@ ] }, { - "from": "external/win32-specific/zlib/prebuilt", + "from": "external/win32-specific/icon/prebuilt", "to": "runtime/win32", "include": [ "*.dll" ] }, { - "from": "external/win32-specific/icon/prebuilt", + "from": "external/win32-specific/MP3Decoder/prebuilt", + "to": "runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from": "external/win32-specific/OggDecoder/prebuilt", + "to": "runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from": "external/win32-specific/OpenalSoft/prebuilt", + "to": "runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from": "external/win32-specific/zlib/prebuilt", "to": "runtime/win32", "include": [ "*.dll" diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/runtime/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/runtime/Runtime.cpp index e6961444b9..95b8e7e994 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/runtime/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/runtime/Runtime.cpp @@ -93,6 +93,7 @@ void startScript(string strDebugArg) if (!strDebugArg.empty()) { // open debugger.lua module + luaopen_lua_debugger(engine->getLuaStack()->getLuaState()); engine->executeString(strDebugArg.c_str()); } cocos2d::log("debug args = %s", strDebugArg.c_str()); @@ -1220,7 +1221,6 @@ void initRuntime() auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); register_runtime_override_function(engine->getLuaStack()->getLuaState()); - luaopen_lua_debugger(engine->getLuaStack()->getLuaState()); static ConsoleCustomCommand *g_customCommand; g_customCommand = new ConsoleCustomCommand(); diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index ed80163ffe..d3d0c84aea 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -75,6 +75,8 @@ 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */; }; 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */; }; 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */; }; + 521A8E7019F0C3D200D177D7 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */; }; + 521A8E7119F0C3D200D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */; }; C00FD4921938512100C6382D /* Landscape_png.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00FD48A1938512100C6382D /* Landscape_png.cpp */; }; C00FD4931938512100C6382D /* Landscape_png.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00FD48A1938512100C6382D /* Landscape_png.cpp */; }; C00FD4941938512100C6382D /* PlayDisable_png.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C00FD48B1938512100C6382D /* PlayDisable_png.cpp */; }; @@ -252,6 +254,8 @@ 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; + 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; C00FD48A1938512100C6382D /* Landscape_png.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Landscape_png.cpp; sourceTree = ""; }; C00FD48B1938512100C6382D /* PlayDisable_png.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayDisable_png.cpp; sourceTree = ""; }; C00FD48C1938512100C6382D /* PlayEnable_png.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayEnable_png.cpp; sourceTree = ""; }; @@ -420,6 +424,8 @@ 5023810617EBBCAC00990C9B /* ios */ = { isa = PBXGroup; children = ( + 521A8E6E19F0C3D200D177D7 /* Default-667h@2x.png */, + 521A8E6F19F0C3D200D177D7 /* Default-736h@3x.png */, 5023810717EBBCAC00990C9B /* AppController.h */, 5023810817EBBCAC00990C9B /* AppController.mm */, 5023810917EBBCAC00990C9B /* Default-568h@2x.png */, @@ -715,6 +721,7 @@ 5091733917ECE17A00D62437 /* Icon-58.png in Resources */, 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */, 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */, + 521A8E7019F0C3D200D177D7 /* Default-667h@2x.png in Resources */, C03781B918BF655400FE4F13 /* res in Resources */, 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */, 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */, @@ -725,6 +732,7 @@ 5091733817ECE17A00D62437 /* Icon-50.png in Resources */, 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */, C05D1C121923449100B808A4 /* config.json in Resources */, + 521A8E7119F0C3D200D177D7 /* Default-736h@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png differ diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png differ diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist index 2b8d4ae1c0..7971812d78 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist @@ -49,6 +49,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon @@ -64,7 +147,6 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight diff --git a/tests/cpp-empty-test/CMakeLists.txt b/tests/cpp-empty-test/CMakeLists.txt index a8fb93181e..b1199a8070 100644 --- a/tests/cpp-empty-test/CMakeLists.txt +++ b/tests/cpp-empty-test/CMakeLists.txt @@ -17,7 +17,7 @@ elseif(IOS) proj.ios/RootViewController.mm ) -elseif(MACOSX) +elseif(MACOSX OR APPLE) set(PLATFORM_SRC proj.mac/main.cpp ) diff --git a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj index 0f318527ab..17bf7f73e5 100644 --- a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj +++ b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj @@ -62,20 +62,24 @@ - - + + + - - + + + - - + + + - - + + + @@ -83,7 +87,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -96,15 +100,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);$(EngineRoot)external\protocolBuf\prebuilt\wp8\$(Platform)\debug;%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -117,15 +121,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);$(EngineRoot)external\protocolBuf\prebuilt\wp8\$(Platform)\release;%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -138,15 +142,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -159,10 +163,10 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) @@ -172,6 +176,12 @@ + + Create + Create + Create + Create + @@ -179,18 +189,9 @@ - - Create - Create - Create - Create - false - false - false - false - + @@ -200,90 +201,18 @@ - - - {b5af91b3-64ea-44e1-84b0-d759e93758fb} - - - {df125891-eee9-4466-b903-f828fd272158} - - - {20d4035d-fd3f-4fd3-baba-97bc1c38dfc2} - - - {51e5736e-e1a3-4c94-abb7-e92ecef9c12e} + + {7c5dbc42-27f6-4978-aabc-02ba77e2a7f0} {7d4fc6eb-9497-4804-98f3-3eaedc896154} - - {7daa99e7-8e07-4fef-8374-8ec04e395d2e} - - - {88982c27-5a7b-40a8-86e7-b3187b44b322} - - - {08fb23e4-1517-4edc-b682-da238cdaa83d} - - - {04a0c42f-23bb-469b-a9d8-ca49136adbd4} - {c55734a3-702c-4fa1-b950-32c8e169302f} - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - diff --git a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj.filters b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj.filters index 9180508691..7992bf66f7 100644 --- a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj.filters +++ b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj.filters @@ -12,12 +12,12 @@ Classes - + @@ -29,26 +29,21 @@ Classes - + - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.ios/Default-667h@2x.png b/tests/cpp-empty-test/proj.ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/cpp-empty-test/proj.ios/Default-667h@2x.png differ diff --git a/tests/cpp-empty-test/proj.ios/Default-736h@3x.png b/tests/cpp-empty-test/proj.ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/cpp-empty-test/proj.ios/Default-736h@3x.png differ diff --git a/tests/cpp-empty-test/proj.ios/Info.plist b/tests/cpp-empty-test/proj.ios/Info.plist index 5162d3a8da..a0dcce71cf 100644 --- a/tests/cpp-empty-test/proj.ios/Info.plist +++ b/tests/cpp-empty-test/proj.ios/Info.plist @@ -77,6 +77,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 2f9ee37b04..f8a92032d0 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -49,6 +49,7 @@ set(TESTS_SRC Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp Classes/EffectsAdvancedTest/EffectsAdvancedTest.cpp Classes/EffectsTest/EffectsTest.cpp + Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.cpp Classes/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.cpp Classes/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp diff --git a/tests/cpp-tests/Classes/AppDelegate.cpp b/tests/cpp-tests/Classes/AppDelegate.cpp index 707872191c..1d07655c0a 100644 --- a/tests/cpp-tests/Classes/AppDelegate.cpp +++ b/tests/cpp-tests/Classes/AppDelegate.cpp @@ -96,6 +96,7 @@ bool AppDelegate::applicationDidFinishLaunching() searchPaths.push_back("ccs-res/hd/scenetest/UIComponentTest"); searchPaths.push_back("ccs-res/hd/scenetest/TriggerTest"); searchPaths.push_back("ccs-res"); + searchPaths.push_back("Manifests"); director->setContentScaleFactor(resourceSize.height/designSize.height); } else @@ -124,16 +125,12 @@ bool AppDelegate::applicationDidFinishLaunching() auto scene = Scene::create(); auto layer = new (std::nothrow) TestController(); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) - layer->addConsoleAutoTest(); -#endif layer->autorelease(); layer->addConsoleAutoTest(); scene->addChild(layer); director->runWithScene(scene); // Enable Remote Console -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) auto console = director->getConsole(); console->listenOnTCP(5678); Configuration *conf = Configuration::getInstance(); @@ -142,7 +139,6 @@ bool AppDelegate::applicationDidFinishLaunching() { layer->startAutoRun(); } -#endif return true; } diff --git a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp index b13fd39fa6..cbb49e7a2e 100644 --- a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp +++ b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp @@ -105,6 +105,24 @@ BillBoardTest::BillBoardTest() layer->runAction( RepeatForever::create( RotateBy::create( CCRANDOM_0_1(), Vec3(0.0f, 45.0f, 0.0f) ) ) ); } + { + auto billboard = BillBoard::create("Images/Icon.png"); + billboard->setScale(0.2f); + billboard->setPosition3D(Vec3(0.0f, 30.0f, 0.0f)); + + auto billboard2 = BillBoard::create("Images/r2.png"); + billboard2->setPosition3D(Vec3(0.0f, 0.0f, 100.0f)); + billboard->addChild(billboard2); + _billboards.push_back(billboard); + _billboards.push_back(billboard2); + + auto sprite3d = Sprite3D::create("Sprite3DTest/orc.c3t"); + sprite3d->setScale(2.0f); + sprite3d->addChild(billboard); + sprite3d->runAction( RepeatForever::create( RotateBy::create( 10.0f, Vec3(0.0f, 360.0f, 0.0f) ) ) ); + _layerBillBorad->addChild(sprite3d); + } + addNewBillBoradWithCoords(Vec3(20,5,0)); addNewBillBoradWithCoords(Vec3(60,5,0)); addNewBillBoradWithCoords(Vec3(100,5,0)); @@ -115,8 +133,8 @@ BillBoardTest::BillBoardTest() addNewAniBillBoradWithCoords(Vec3(-100,0,0)); addNewAniBillBoradWithCoords(Vec3(-140,0,0)); addNewAniBillBoradWithCoords(Vec3(-180,0,0)); - _camera->setPosition3D(Vec3(0, 130, 230)); - _camera->lookAt(Vec3(0,0,100), Vec3(0,1,0)); + _camera->setPosition3D(Vec3(0, 100, 230)); + _camera->lookAt(Vec3(0,0,0), Vec3(0,1,0)); TTFConfig ttfConfig("fonts/arial.ttf", 16); auto label1 = Label::createWithTTF(ttfConfig,"rotate+"); diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index 6e66f53288..c7dcae167c 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -157,7 +157,7 @@ static Layer* backSpriteTestAction() int total = MAX_LAYER; if( sceneIdx < 0 ) sceneIdx += total; - + auto layer = (createFunctions[sceneIdx])(); return layer; } @@ -179,6 +179,10 @@ Camera3DTestDemo::Camera3DTestDemo(void) , _camera(nullptr) , _incRot(nullptr) , _decRot(nullptr) +,_bZoomOut(false) +,_bZoomIn(false) +,_bRotateLeft(false) +,_bRotateRight(false) { } Camera3DTestDemo::~Camera3DTestDemo(void) @@ -204,7 +208,7 @@ void Camera3DTestDemo::scaleCameraCallback(Ref* sender,float value) cameraPos+= cameraPos.getNormalized()*value; _camera->setPosition3D(cameraPos); } -} +} void Camera3DTestDemo::rotateCameraCallback(Ref* sender,float value) { if(_cameraType==CameraType::FreeCamera || _cameraType==CameraType::FirstCamera) @@ -223,10 +227,13 @@ void Camera3DTestDemo::SwitchViewCallback(Ref* sender, CameraType cameraType) _cameraType = cameraType; if(_cameraType==CameraType::FreeCamera) { - _camera->setPosition3D(Vec3(0, 130, 130) + _sprite3D->getPosition3D()); - _camera->lookAt(_sprite3D->getPosition3D(), Vec3(0,1,0)); - _incRot->setEnabled(true); - _decRot->setEnabled(true); + _camera->setPosition3D(Vec3(0, 130, 130) + _sprite3D->getPosition3D()); + _camera->lookAt(_sprite3D->getPosition3D(), Vec3(0,1,0)); + + _RotateRightlabel->setColor(Color3B::WHITE); + _RotateLeftlabel->setColor(Color3B::WHITE); + _ZoomInlabel->setColor(Color3B::WHITE); + _ZoomOutlabel->setColor(Color3B::WHITE); } else if(_cameraType==CameraType::FirstCamera) { @@ -235,15 +242,21 @@ void Camera3DTestDemo::SwitchViewCallback(Ref* sender, CameraType cameraType) newFaceDir.normalize(); _camera->setPosition3D(Vec3(0,35,0) + _sprite3D->getPosition3D()); _camera->lookAt(_sprite3D->getPosition3D() + newFaceDir*50, Vec3(0, 1, 0)); - _incRot->setEnabled(true); - _decRot->setEnabled(true); + + _RotateRightlabel->setColor(Color3B::WHITE); + _RotateLeftlabel->setColor(Color3B::WHITE); + _ZoomInlabel->setColor(Color3B::GRAY); + _ZoomOutlabel->setColor(Color3B::GRAY); } else if(_cameraType==CameraType::ThirdCamera) { _camera->setPosition3D(Vec3(0, 130, 130) + _sprite3D->getPosition3D()); _camera->lookAt(_sprite3D->getPosition3D(), Vec3(0,1,0)); - _incRot->setEnabled(false); - _decRot->setEnabled(false); + + _RotateRightlabel->setColor(Color3B::GRAY); + _RotateLeftlabel->setColor(Color3B::GRAY); + _ZoomInlabel->setColor(Color3B::WHITE); + _ZoomOutlabel->setColor(Color3B::WHITE); } } void Camera3DTestDemo::onEnter() @@ -262,32 +275,76 @@ void Camera3DTestDemo::onEnter() _curState=State_None; addNewSpriteWithCoords( Vec3(0,0,0),"Sprite3DTest/girl.c3b",true,0.2f,true); TTFConfig ttfConfig("fonts/arial.ttf", 20); - auto label1 = Label::createWithTTF(ttfConfig,"zoom out"); - auto menuItem1 = MenuItemLabel::create(label1, CC_CALLBACK_1(Camera3DTestDemo::scaleCameraCallback,this,1)); - auto label2 = Label::createWithTTF(ttfConfig,"zoom in"); - auto menuItem2 = MenuItemLabel::create(label2, CC_CALLBACK_1(Camera3DTestDemo::scaleCameraCallback,this,-1)); - auto label3 = Label::createWithTTF(ttfConfig,"rotate+"); - auto menuItem3 = MenuItemLabel::create(label3, CC_CALLBACK_1(Camera3DTestDemo::rotateCameraCallback,this,10)); - _incRot = menuItem3; - auto label4 = Label::createWithTTF(ttfConfig,"rotate-"); - auto menuItem4 = MenuItemLabel::create(label4, CC_CALLBACK_1(Camera3DTestDemo::rotateCameraCallback,this,-10)); - _decRot = menuItem4; - auto label5 = Label::createWithTTF(ttfConfig,"free "); - auto menuItem5 = MenuItemLabel::create(label5, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::FreeCamera)); - auto label6 = Label::createWithTTF(ttfConfig,"third person"); - auto menuItem6 = MenuItemLabel::create(label6, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::ThirdCamera)); - auto label7 = Label::createWithTTF(ttfConfig,"first person"); - auto menuItem7 = MenuItemLabel::create(label7, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::FirstCamera)); - auto menu = Menu::create(menuItem1, menuItem2, menuItem3, menuItem4, menuItem5, menuItem6, menuItem7, nullptr); - + + auto containerForLabel1 = Node::create(); + _ZoomOutlabel = Label::createWithTTF(ttfConfig,"zoom out"); + _ZoomOutlabel->setPosition(s.width-50, VisibleRect::top().y-30); + containerForLabel1->addChild(_ZoomOutlabel); + addChild(containerForLabel1, 10); + + auto listener1 = EventListenerTouchOneByOne::create(); + listener1->setSwallowTouches(true); + + listener1->onTouchBegan = CC_CALLBACK_2(Camera3DTestDemo::onTouchesZoomOut, this); + listener1->onTouchEnded = CC_CALLBACK_2(Camera3DTestDemo::onTouchesZoomOutEnd, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener1, _ZoomOutlabel); + + auto containerForLabel2 = Node::create(); + _ZoomInlabel = Label::createWithTTF(ttfConfig,"zoom in"); + _ZoomInlabel->setPosition(s.width-50, VisibleRect::top().y-100); + containerForLabel2->addChild(_ZoomInlabel); + addChild(containerForLabel2, 10); + + auto listener2 = EventListenerTouchOneByOne::create(); + listener2->setSwallowTouches(true); + + listener2->onTouchBegan = CC_CALLBACK_2(Camera3DTestDemo::onTouchesZoomIn, this); + listener2->onTouchEnded = CC_CALLBACK_2(Camera3DTestDemo::onTouchesZoomInEnd, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener2, _ZoomInlabel); + + auto containerForLabel3 = Node::create(); + _RotateLeftlabel = Label::createWithTTF(ttfConfig,"rotate left"); + _RotateLeftlabel->setPosition(s.width-50, VisibleRect::top().y-170); + containerForLabel3->addChild(_RotateLeftlabel); + addChild(containerForLabel3, 10); + + auto listener3 = EventListenerTouchOneByOne::create(); + listener3->setSwallowTouches(true); + + listener3->onTouchBegan = CC_CALLBACK_2(Camera3DTestDemo::onTouchesRotateLeft, this); + listener3->onTouchEnded = CC_CALLBACK_2(Camera3DTestDemo::onTouchesRotateLeftEnd, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener3, _RotateLeftlabel); + + auto containerForLabel4 = Node::create(); + _RotateRightlabel = Label::createWithTTF(ttfConfig,"rotate right"); + _RotateRightlabel->setPosition(s.width-50, VisibleRect::top().y-240); + containerForLabel4->addChild(_RotateRightlabel); + addChild(containerForLabel4, 10); + + auto listener4 = EventListenerTouchOneByOne::create(); + listener4->setSwallowTouches(true); + + listener4->onTouchBegan = CC_CALLBACK_2(Camera3DTestDemo::onTouchesRotateRight, this); + listener4->onTouchEnded = CC_CALLBACK_2(Camera3DTestDemo::onTouchesRotateRightEnd, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener4, _RotateRightlabel); + + auto label1 = Label::createWithTTF(ttfConfig,"free "); + auto menuItem1 = MenuItemLabel::create(label1, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::FreeCamera)); + auto label2 = Label::createWithTTF(ttfConfig,"third person"); + auto menuItem2 = MenuItemLabel::create(label2, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::ThirdCamera)); + auto label3 = Label::createWithTTF(ttfConfig,"first person"); + auto menuItem3 = MenuItemLabel::create(label3, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::FirstCamera)); + auto menu = Menu::create(menuItem1, menuItem2, menuItem3, nullptr); + menu->setPosition(Vec2::ZERO); - menuItem1->setPosition(s.width-50, VisibleRect::top().y-50 ); - menuItem2->setPosition(s.width-50, VisibleRect::top().y-100); - menuItem3->setPosition(s.width-50, VisibleRect::top().y-150); - menuItem4->setPosition(s.width-50, VisibleRect::top().y-200); - menuItem5->setPosition(VisibleRect::left().x+100, VisibleRect::top().y-50); - menuItem6->setPosition(VisibleRect::left().x+100, VisibleRect::top().y -100); - menuItem7->setPosition(VisibleRect::left().x+100, VisibleRect::top().y -150); + + menuItem1->setPosition(VisibleRect::left().x+100, VisibleRect::top().y-50); + menuItem2->setPosition(VisibleRect::left().x+100, VisibleRect::top().y -100); + menuItem3->setPosition(VisibleRect::left().x+100, VisibleRect::top().y -150); addChild(menu, 0); schedule(CC_SCHEDULE_SELECTOR(Camera3DTestDemo::updateCamera), 0.0f); if (_camera == nullptr) @@ -327,7 +384,7 @@ void Camera3DTestDemo::restartCallback(Ref* sender) { auto s = new (std::nothrow) Camera3DTestScene(); s->addChild(restartSpriteTestAction()); - + Director::getInstance()->replaceScene(s); s->release(); } @@ -348,7 +405,7 @@ void Camera3DTestDemo::backCallback(Ref* sender) } void Camera3DTestDemo::addNewSpriteWithCoords(Vec3 p,std::string fileName,bool playAnimation,float scale,bool bindCamera) { - + auto sprite = Sprite3D::create(fileName); _layer3D->addChild(sprite); float globalZOrder=sprite->getGlobalZOrder(); @@ -368,7 +425,7 @@ void Camera3DTestDemo::addNewSpriteWithCoords(Vec3 p,std::string fileName,bool p _sprite3D=sprite; } sprite->setScale(scale); - + } void Camera3DTestDemo::onTouchesBegan(const std::vector& touches, cocos2d::Event *event) { @@ -376,7 +433,6 @@ void Camera3DTestDemo::onTouchesBegan(const std::vector& touches, cocos2 { auto touch = item; auto location = touch->getLocation(); - } } void Camera3DTestDemo::onTouchesMoved(const std::vector& touches, cocos2d::Event *event) @@ -388,19 +444,19 @@ void Camera3DTestDemo::onTouchesMoved(const std::vector& touches, cocos2 Point newPos = touch->getPreviousLocation()-location; if(_cameraType==CameraType::FreeCamera || _cameraType==CameraType::FirstCamera) { - Vec3 cameraDir; - Vec3 cameraRightDir; - _camera->getNodeToWorldTransform().getForwardVector(&cameraDir); - cameraDir.normalize(); - cameraDir.y = 0; - _camera->getNodeToWorldTransform().getRightVector(&cameraRightDir); - cameraRightDir.normalize(); - cameraRightDir.y = 0; - Vec3 cameraPos = _camera->getPosition3D(); - cameraPos += cameraDir*newPos.y * 0.1f; - cameraPos += cameraRightDir * newPos.x * 0.1f; + Vec3 cameraDir; + Vec3 cameraRightDir; + _camera->getNodeToWorldTransform().getForwardVector(&cameraDir); + cameraDir.normalize(); + cameraDir.y=0; + _camera->getNodeToWorldTransform().getRightVector(&cameraRightDir); + cameraRightDir.normalize(); + cameraRightDir.y=0; + Vec3 cameraPos= _camera->getPosition3D(); + cameraPos+=cameraDir*newPos.y*0.1f; + cameraPos+=cameraRightDir*newPos.x*0.1f; _camera->setPosition3D(cameraPos); - if(_sprite3D && _cameraType == CameraType::FirstCamera) + if(_sprite3D && _cameraType==CameraType::FirstCamera) { _sprite3D->setPosition3D(Vec3(_camera->getPositionX(),0,_camera->getPositionZ())); _targetPos=_sprite3D->getPosition3D(); @@ -468,7 +524,7 @@ void Camera3DTestDemo::onTouchesEnded(const std::vector& touches, cocos2 auto location = touch->getLocationInView(); if(_camera) { - if(_sprite3D && _cameraType==CameraType::ThirdCamera) + if(_sprite3D && _cameraType==CameraType::ThirdCamera && _bZoomOut == false && _bZoomIn == false && _bRotateLeft == false && _bRotateRight == false) { Vec3 nearP(location.x, location.y, -1.0f), farP(location.x, location.y, 1.0f); @@ -483,6 +539,16 @@ void Camera3DTestDemo::onTouchesEnded(const std::vector& touches, cocos2 float ndo = Vec3::dot(Vec3(0,1,0),nearP); dist= (0 - ndo) / ndd; Vec3 p = nearP + dist * dir; + + if( p.x > 100) + p.x = 100; + if( p.x < -100) + p.x = -100; + if( p.z > 100) + p.z = 100; + if( p.z < -100) + p.z = -100; + _targetPos=p; } } @@ -504,7 +570,7 @@ void Camera3DTestDemo::updateCamera(float fDelta) if(isState(_curState,State_Rotate)) { Vec3 curPos = _sprite3D->getPosition3D(); - + Vec3 newFaceDir = _targetPos - curPos; newFaceDir.y = 0; newFaceDir.normalize(); @@ -520,17 +586,17 @@ void Camera3DTestDemo::updateCamera(float fDelta) mat.m[1] = right.y; mat.m[2] = right.z; mat.m[3] = 0.0f; - + mat.m[4] = up.x; mat.m[5] = up.y; mat.m[6] = up.z; mat.m[7] = 0.0f; - + mat.m[8] = newFaceDir.x; mat.m[9] = newFaceDir.y; mat.m[10] = newFaceDir.z; mat.m[11] = 0.0f; - + mat.m[12] = pos.x; mat.m[13] = pos.y; mat.m[14] = pos.z; @@ -539,12 +605,156 @@ void Camera3DTestDemo::updateCamera(float fDelta) } } } + if(_bZoomOut == true) + { + if(_camera) + { + if(_cameraType == CameraType::ThirdCamera) + { + Vec3 lookDir = _camera->getPosition3D() - _sprite3D->getPosition3D(); + Vec3 cameraPos = _camera->getPosition3D(); + if(lookDir.length() <= 300) + { + cameraPos += lookDir.getNormalized(); + _camera->setPosition3D(cameraPos); + } + } + else if(_cameraType == CameraType::FreeCamera) + { + Vec3 cameraPos = _camera->getPosition3D(); + if(cameraPos.length() <= 300) + { + cameraPos += cameraPos.getNormalized(); + _camera->setPosition3D(cameraPos); + } + } + } + } + if(_bZoomIn == true) + { + if(_camera) + { + if(_cameraType == CameraType::ThirdCamera) + { + Vec3 lookDir = _camera->getPosition3D() - _sprite3D->getPosition3D(); + Vec3 cameraPos = _camera->getPosition3D(); + if(lookDir.length() >= 50) + { + cameraPos -= lookDir.getNormalized(); + _camera->setPosition3D(cameraPos); + } + } + else if(_cameraType == CameraType::FreeCamera) + { + Vec3 cameraPos = _camera->getPosition3D(); + if(cameraPos.length() >= 50) + { + cameraPos -= cameraPos.getNormalized(); + _camera->setPosition3D(cameraPos); + } + } + } + } + if(_bRotateLeft == true) + { + if(_cameraType==CameraType::FreeCamera || _cameraType==CameraType::FirstCamera) + { + Vec3 rotation3D= _camera->getRotation3D(); + rotation3D.y+= 1; + _camera->setRotation3D(rotation3D); + } + } + if(_bRotateRight == true) + { + if(_cameraType==CameraType::FreeCamera || _cameraType==CameraType::FirstCamera) + { + Vec3 rotation3D= _camera->getRotation3D(); + rotation3D.y-= 1; + _camera->setRotation3D(rotation3D); + } + } } } bool Camera3DTestDemo::isState(unsigned int state,unsigned int bit) const { return (state & bit) == bit; } +bool Camera3DTestDemo::onTouchesZoomOut(Touch* touch, Event* event) +{ + auto target = static_cast(event->getCurrentTarget()); + + Vec2 locationInNode = target->convertToNodeSpace(touch->getLocation()); + Size s = target->getContentSize(); + Rect rect = Rect(0, 0, s.width, s.height); + + if (rect.containsPoint(locationInNode)) + { + _bZoomOut = true; + return true; + } + return false; +} +void Camera3DTestDemo::onTouchesZoomOutEnd(Touch* touch, Event* event) +{ + _bZoomOut = false; +} +bool Camera3DTestDemo::onTouchesZoomIn(Touch* touch, Event* event) +{ + auto target = static_cast(event->getCurrentTarget()); + + Vec2 locationInNode = target->convertToNodeSpace(touch->getLocation()); + Size s = target->getContentSize(); + Rect rect = Rect(0, 0, s.width, s.height); + + if (rect.containsPoint(locationInNode)) + { + _bZoomIn = true; + return true; + } + return false; +} +void Camera3DTestDemo::onTouchesZoomInEnd(Touch* touch, Event* event) +{ + _bZoomIn = false; +} +bool Camera3DTestDemo::onTouchesRotateLeft(Touch* touch, Event* event) +{ + auto target = static_cast(event->getCurrentTarget()); + + Vec2 locationInNode = target->convertToNodeSpace(touch->getLocation()); + Size s = target->getContentSize(); + Rect rect = Rect(0, 0, s.width, s.height); + + if (rect.containsPoint(locationInNode)) + { + _bRotateLeft = true; + return true; + } + return false; +} +void Camera3DTestDemo::onTouchesRotateLeftEnd(Touch* touch, Event* event) +{ + _bRotateLeft = false; +} +bool Camera3DTestDemo::onTouchesRotateRight(Touch* touch, Event* event) +{ + auto target = static_cast(event->getCurrentTarget()); + + Vec2 locationInNode = target->convertToNodeSpace(touch->getLocation()); + Size s = target->getContentSize(); + Rect rect = Rect(0, 0, s.width, s.height); + + if (rect.containsPoint(locationInNode)) + { + _bRotateRight = true; + return true; + } + return false; +} +void Camera3DTestDemo::onTouchesRotateRightEnd(Touch* touch, Event* event) +{ + _bRotateRight = false; +} void Camera3DTestScene::runThisTest() { auto layer = nextSpriteTestAction(); diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h index 6c5a40099a..633bfd3155 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h @@ -56,7 +56,7 @@ public: CREATE_FUNC(Camera3DTestDemo); Camera3DTestDemo(void); virtual ~Camera3DTestDemo(void); - + void restartCallback(Ref* sender); void nextCallback(Ref* sender); void backCallback(Ref* sender); @@ -77,6 +77,16 @@ public: void updateState(float elapsedTime); bool isState(unsigned int state,unsigned int bit) const; void reachEndCallBack(); + + bool onTouchesZoomOut(Touch* touch, Event* event); + void onTouchesZoomOutEnd(Touch* touch, Event* event); + bool onTouchesZoomIn(Touch* touch, Event* event); + void onTouchesZoomInEnd(Touch* touch, Event* event); + + bool onTouchesRotateLeft(Touch* touch, Event* event); + void onTouchesRotateLeftEnd(Touch* touch, Event* event); + bool onTouchesRotateRight(Touch* touch, Event* event); + void onTouchesRotateRightEnd(Touch* touch, Event* event); protected: std::string _title; Layer* _layer3D; @@ -88,6 +98,14 @@ protected: unsigned int _curState; Camera* _camera; MoveTo* _moveAction; + bool _bZoomOut; + bool _bZoomIn; + bool _bRotateLeft; + bool _bRotateRight; + Label* _RotateRightlabel; + Label* _RotateLeftlabel; + Label* _ZoomInlabel; + Label* _ZoomOutlabel; }; class Camera3DTestScene : public TestScene { diff --git a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.h b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.h index 97963f223d..75bf0e2cfe 100644 --- a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.h +++ b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.h @@ -59,9 +59,7 @@ protected: ConsoleCustomCommand(); virtual ~ConsoleCustomCommand(); -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) cocos2d::Console *_console; -#endif private: CC_DISALLOW_COPY_AND_ASSIGN(ConsoleCustomCommand); diff --git a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp new file mode 100644 index 0000000000..b1044ccb7c --- /dev/null +++ b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp @@ -0,0 +1,212 @@ +#include "AssetsManagerExTest.h" +#include "../../testResource.h" +#include "cocos2d.h" + +const char* sceneManifests[] = {"AMTestScene1/project.manifest", "AMTestScene2/project.manifest", "AMTestScene3/project.manifest"}; +const char* storagePaths[] = {"CppTests/AssetsManagerExTest/scene1/", "CppTests/AssetsManagerExTest/scene2/", "CppTests/AssetsManagerExTest/scene3"}; +const char* backgroundPaths[] = {"Images/background1.jpg", "Images/background2.jpg", "Images/background3.png"}; + +AssetsManagerExTestLayer::AssetsManagerExTestLayer(const std::string& spritePath) +: _spritePath(spritePath) +{ +} + +AssetsManagerExTestLayer::~AssetsManagerExTestLayer(void) +{ +} + +std::string AssetsManagerExTestLayer::title() const +{ + return "AssetsManagerExTest"; +} + +void AssetsManagerExTestLayer::onEnter() +{ + BaseTest::onEnter(); + _background = Sprite::create(_spritePath); + if (_background) + { + addChild(_background, 1); + _background->setPosition( VisibleRect::center() ); + } +} + +void AssetsManagerExTestLayer::restartCallback(Ref* sender) +{ +} + +void AssetsManagerExTestLayer::nextCallback(Ref* sender) +{ + if (AssetsManagerExLoaderScene::currentScene < 2) + { + AssetsManagerExLoaderScene::currentScene++; + } + else + { + AssetsManagerExLoaderScene::currentScene = 0; + } + auto scene = new AssetsManagerExLoaderScene(); + scene->runThisTest(); + scene->release(); +} + +void AssetsManagerExTestLayer::backCallback(Ref* sender) +{ + if (AssetsManagerExLoaderScene::currentScene > 0) + { + AssetsManagerExLoaderScene::currentScene--; + } + else AssetsManagerExLoaderScene::currentScene = 2; + auto scene = new AssetsManagerExLoaderScene(); + scene->runThisTest(); + scene->release(); +} + + +AssetsManagerExTestScene::AssetsManagerExTestScene(std::string background) +{ + auto layer = new AssetsManagerExTestLayer(background); + addChild(layer); + layer->release(); +} + +void AssetsManagerExTestScene::runThisTest() +{ +} + +int AssetsManagerExLoaderScene::currentScene = 0; +AssetsManagerExLoaderScene::AssetsManagerExLoaderScene() +: _progress(nullptr) +, _amListener(nullptr) +{ +} + +void AssetsManagerExLoaderScene::runThisTest() +{ + int currentId = currentScene; + std::string manifestPath = sceneManifests[currentId], storagePath = FileUtils::getInstance()->getWritablePath() + storagePaths[currentId]; + CCLOG("Storage path for this test : %s", storagePath.c_str()); + + Sprite *sprite = Sprite::create("Images/Icon.png"); + auto layer = Layer::create(); + addChild(layer); + layer->addChild(sprite); + sprite->setPosition( VisibleRect::center() ); + + TTFConfig config("fonts/tahoma.ttf", 30); + _progress = Label::createWithTTF(config, "0%", TextHAlignment::CENTER); + _progress->setPosition( Vec2(VisibleRect::center().x, VisibleRect::center().y + 50) ); + layer->addChild(_progress); + + _am = AssetsManagerEx::create(manifestPath, storagePath); + _am->retain(); + + if (!_am->getLocalManifest()->isLoaded()) + { + CCLOG("Fail to update assets, step skipped."); + AssetsManagerExTestScene *scene = new AssetsManagerExTestScene(backgroundPaths[currentId]); + Director::getInstance()->replaceScene(scene); + scene->release(); + } + else + { + _amListener = cocos2d::extension::EventListenerAssetsManagerEx::create(_am, [currentId, this](EventAssetsManagerEx* event){ + static int failCount = 0; + AssetsManagerExTestScene *scene; + switch (event->getEventCode()) + { + case EventAssetsManagerEx::EventCode::ERROR_NO_LOCAL_MANIFEST: + { + CCLOG("No local manifest file found, skip assets update."); + scene = new AssetsManagerExTestScene(backgroundPaths[currentId]); + Director::getInstance()->replaceScene(scene); + scene->release(); + } + break; + case EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION: + { + std::string assetId = event->getAssetId(); + float percent = event->getPercent(); + std::string str; + if (assetId == AssetsManagerEx::VERSION_ID) + { + str = StringUtils::format("Version file: %.2f", percent) + "%"; + } + else if (assetId == AssetsManagerEx::MANIFEST_ID) + { + str = StringUtils::format("Manifest file: %.2f", percent) + "%"; + } + else + { + str = StringUtils::format("%.2f", percent) + "%"; + CCLOG("%.2f Percent", percent); + } + if (this->_progress != nullptr) + this->_progress->setString(str); + } + break; + case EventAssetsManagerEx::EventCode::ERROR_DOWNLOAD_MANIFEST: + case EventAssetsManagerEx::EventCode::ERROR_PARSE_MANIFEST: + { + CCLOG("Fail to download manifest file, update skipped."); + scene = new AssetsManagerExTestScene(backgroundPaths[currentId]); + Director::getInstance()->replaceScene(scene); + scene->release(); + } + break; + case EventAssetsManagerEx::EventCode::ALREADY_UP_TO_DATE: + case EventAssetsManagerEx::EventCode::UPDATE_FINISHED: + { + CCLOG("Update finished. %s", event->getMessage().c_str()); + scene = new AssetsManagerExTestScene(backgroundPaths[currentId]); + Director::getInstance()->replaceScene(scene); + scene->release(); + } + break; + case EventAssetsManagerEx::EventCode::UPDATE_FAILED: + { + CCLOG("Update failed. %s", event->getMessage().c_str()); + + failCount ++; + if (failCount < 5) + { + _am->downloadFailedAssets(); + } + else + { + CCLOG("Reach maximum fail count, exit update process"); + failCount = 0; + scene = new AssetsManagerExTestScene(backgroundPaths[currentId]); + Director::getInstance()->replaceScene(scene); + scene->release(); + } + } + break; + case EventAssetsManagerEx::EventCode::ERROR_UPDATING: + { + CCLOG("Asset %s : %s", event->getAssetId().c_str(), event->getMessage().c_str()); + } + break; + case EventAssetsManagerEx::EventCode::ERROR_DECOMPRESS: + { + CCLOG("%s", event->getMessage().c_str()); + } + break; + default: + break; + } + }); + Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_amListener, 1); + + _am->update(); + + Director::getInstance()->replaceScene(this); + } +} + +void AssetsManagerExLoaderScene::onExit() +{ + _eventDispatcher->removeEventListener(_amListener); + _am->release(); + Scene::onExit(); +} diff --git a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h new file mode 100644 index 0000000000..a9c78b3162 --- /dev/null +++ b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h @@ -0,0 +1,53 @@ +#ifndef __AssetsManagerEx_Test_H__ +#define __AssetsManagerEx_Test_H__ + +#include "extensions/cocos-ext.h" +#include "../../testBasic.h" +#include "../../BaseTest.h" + +USING_NS_CC; +USING_NS_CC_EXT; + +class AssetsManagerExTestLayer : public BaseTest +{ +public: + AssetsManagerExTestLayer(const std::string& spritePath); + ~AssetsManagerExTestLayer(void); + + virtual std::string title() const; + void onEnter(); + + virtual void restartCallback(Ref* sender); + virtual void nextCallback(Ref* sender); + virtual void backCallback(Ref* sender); + +private: + Sprite *_background; + std::string _spritePath; +}; + +class AssetsManagerExTestScene : public TestScene +{ +public: + AssetsManagerExTestScene(std::string background); + virtual void runThisTest() override; +}; + +class AssetsManagerExLoaderScene : public TestScene +{ +public: + AssetsManagerExLoaderScene(); + + virtual void runThisTest() override; + + virtual void onExit() override; + + static int currentScene; + +private: + AssetsManagerEx *_am; + Label *_progress; + EventListenerAssetsManagerEx* _amListener; +}; + +#endif /* defined(__AssetsManagerEx_Test_H__) */ diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp index 22fdccf095..5d4cc3ba9a 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp @@ -214,6 +214,7 @@ void SceneEditorTestLayer::changeLoadTypeCallback(cocos2d::Ref *pSender) if(_rootNode != nullptr) { + ActionManagerEx::getInstance()->releaseActions(); this->removeChild(_rootNode); _rootNode = SceneReader::getInstance()->createNodeWithSceneFile(_filePath.c_str()); if (_rootNode == nullptr) diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index 10d31a2900..8f060c4a96 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -1,9 +1,10 @@ #include "ExtensionsTest.h" #include "../testResource.h" +#include "AssetsManagerExTest/AssetsManagerExTest.h" #include "NotificationCenterTest/NotificationCenterTest.h" #include "ControlExtensionTest/CCControlSceneManager.h" #include "CocosBuilderTest/CocosBuilderTest.h" -#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) #include "NetworkTest/HttpClientTest.h" #endif #include "TableViewTest/TableViewTestScene.h" @@ -13,7 +14,7 @@ #include "CocoStudioComponentsTest/ComponentsTestScene.h" #include "CocoStudioSceneTest/SceneEditorTest.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "NetworkTest/WebSocketTest.h" #include "NetworkTest/SocketIOTest.h" #endif @@ -29,6 +30,10 @@ static struct { const char *name; std::function callback; } g_extensionsTests[] = { + { "AssetsManagerExTest", [](Ref* sender) { + AssetsManagerExLoaderScene *scene = new AssetsManagerExLoaderScene(); + scene->runThisTest(); + } }, { "NotificationCenterTest", [](Ref* sender) { runNotificationCenterTest(); } }, { "CCControlButtonTest", [](Ref *sender){ @@ -44,11 +49,11 @@ static struct { scene->release(); } }}, -#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) { "HttpClientTest", [](Ref *sender){ runHttpClientTest();} }, #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) { "WebSocketTest", [](Ref *sender){ runWebSocketTest();} }, { "SocketIOTest", [](Ref *sender){ runSocketIOTest();} diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index 719007e2ca..c1732bcc47 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -535,13 +535,16 @@ VBOFullTest::VBOFullTest() { Size s = Director::getInstance()->getWinSize(); Node* parent = Node::create(); - parent->setPosition(s.width/2, s.height/2); + parent->setPosition(0,0); addChild(parent); - for (int i=0; isetPosition(Vec2(0,0)); + sprite->setScale(0.1, 0.1); + float x = ((float)std::rand()) /RAND_MAX; + float y = ((float)std::rand()) /RAND_MAX; + sprite->setPosition(Vec2(x * s.width, y * s.height)); parent->addChild(sprite); } } diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index 780abace13..262d97c73b 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -34,6 +34,7 @@ namespace ShaderTest2 static std::function createFunctions[] = { CL(EffectSpriteTest), + CL(EffectSpriteLamp), }; static unsigned int TEST_CASE_COUNT = sizeof(ShaderTest2::createFunctions) / sizeof(ShaderTest2::createFunctions[0]); @@ -433,6 +434,77 @@ protected: } }; +class EffectNormalMapped : public Effect +{ +public: + CREATE_FUNC(EffectNormalMapped); + static EffectNormalMapped* create(const std::string&normalMapFileName) + { + EffectNormalMapped *normalMappedSprite = new (std::nothrow) EffectNormalMapped(); + if (normalMappedSprite && normalMappedSprite->init() && normalMappedSprite->initNormalMap(normalMapFileName)) + { + + normalMappedSprite->autorelease(); + return normalMappedSprite; + } + CC_SAFE_DELETE(normalMappedSprite); + return nullptr; + } + void setKBump(float value); + void setLightPos(const Vec3& pos); + void setLightColor(const Color4F& color); + float getKBump()const{return _kBump;} +protected: + bool init(); + bool initNormalMap(const std::string&normalMapFileName); + virtual void setTarget(EffectSprite* sprite) override; + EffectSprite* _sprite; + Vec3 _lightPos; + Color4F _lightColor; + float _kBump; +}; + +bool EffectNormalMapped::init() +{ + initGLProgramState("Shaders3D/Normal.frag"); + _kBump = 2; + return true; +} +bool EffectNormalMapped::initNormalMap(const std::string&normalMapFileName) +{ + auto normalMapTextrue = TextureCache::getInstance()->addImage(normalMapFileName.c_str()); + getGLProgramState()->setUniformTexture("u_normalMap", normalMapTextrue); + return true; +} +void EffectNormalMapped::setTarget(EffectSprite* sprite) +{ + _sprite = sprite; + getGLProgramState()->setUniformFloat("u_kBump", _kBump); + getGLProgramState()->setUniformVec2("u_contentSize", Vec2(sprite->getContentSize().width,sprite->getContentSize().height)); +} + +void EffectNormalMapped::setKBump(float value) +{ + _kBump = value; + auto glProgramState = getGLProgramState(); + if(glProgramState) glProgramState->setUniformFloat("u_kBump", _kBump); +} + +void EffectNormalMapped::setLightPos(const Vec3& pos) +{ + _lightPos = pos; + auto glProgramState = getGLProgramState(); + if(glProgramState) glProgramState->setUniformVec4("u_lightPosInLocalSpace", Vec4(_lightPos.x,_lightPos.y,_lightPos.z,1)); + +} + +void EffectNormalMapped::setLightColor(const Color4F& color) +{ + _lightColor = color; + auto glProgramState = getGLProgramState(); + if(glProgramState) getGLProgramState()->setUniformVec3("u_diffuseL", Vec3(_lightColor.r,_lightColor.g,_lightColor.b)); + +} EffectSpriteTest::EffectSpriteTest() { @@ -495,3 +567,79 @@ EffectSpriteTest::EffectSpriteTest() } } +EffectSpriteLamp::EffectSpriteLamp() +{ + if (ShaderTestDemo2::init()) { + + auto s = Director::getInstance()->getWinSize(); + _sprite = EffectSprite::create("Images/elephant1_Diffuse.png"); + //auto contentSize = _sprite->getContentSize(); + _sprite->setPosition(Vec2(s.width/2, s.height/2)); + addChild(_sprite); + + auto lampEffect = EffectNormalMapped::create("Images/elephant1_Normal.png"); + + Vec3 pos(150,150, 50); + _lightSprite = Sprite::create("Images/ball.png"); + this->addChild(_lightSprite); + _lightSprite->setPosition(Vec2(pos.x, s.height- pos.y)); + Mat4 mat = _sprite->getNodeToWorldTransform(); + Point lightPosInLocalSpace=PointApplyAffineTransform(Vec2(pos.x, pos.y),_sprite->worldToNodeTransform()); + lampEffect->setLightColor(Color4F(1,1,1,1)); + lampEffect->setLightPos(Vec3(lightPosInLocalSpace.x, lightPosInLocalSpace.y, 50)); + lampEffect->setKBump(2); + _sprite->setEffect(lampEffect); + _effect = lampEffect; + auto listerner = EventListenerTouchAllAtOnce::create(); + listerner->onTouchesBegan = CC_CALLBACK_2(EffectSpriteLamp::onTouchesBegan, this); + listerner->onTouchesMoved = CC_CALLBACK_2(EffectSpriteLamp::onTouchesMoved, this); + listerner->onTouchesEnded = CC_CALLBACK_2(EffectSpriteLamp::onTouchesEnded, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(listerner, this); + } +} + + +void EffectSpriteLamp::onTouchesBegan(const std::vector& touches, Event *unused_event) +{ + for ( auto &item: touches ) + { + auto touch = item; + auto s = Director::getInstance()->getWinSize(); + Point loc_winSpace = touch->getLocationInView(); + _lightSprite->setPosition(Vec2( loc_winSpace.x, s.height - loc_winSpace.y)); + Vec3 pos(loc_winSpace.x,loc_winSpace.y, 50); + Mat4 mat = _sprite->getNodeToWorldTransform(); + Point lightPosInLocalSpace=PointApplyAffineTransform(Vec2(pos.x, pos.y),_sprite->worldToNodeTransform()); + ((EffectNormalMapped*)_effect)->setLightPos(Vec3(lightPosInLocalSpace.x, lightPosInLocalSpace.y, 50)); + } +} + +void EffectSpriteLamp::onTouchesMoved(const std::vector& touches, Event *unused_event) +{ + for ( auto &item: touches ) + { + auto touch = item; + auto s = Director::getInstance()->getWinSize(); + Point loc_winSpace = touch->getLocationInView(); + _lightSprite->setPosition(Vec2( loc_winSpace.x, s.height - loc_winSpace.y)); + Vec3 pos(loc_winSpace.x,loc_winSpace.y, 50); + Mat4 mat = _sprite->getNodeToWorldTransform(); + Point lightPosInLocalSpace=PointApplyAffineTransform(Vec2(pos.x, pos.y),_sprite->worldToNodeTransform()); + ((EffectNormalMapped*)_effect)->setLightPos(Vec3(lightPosInLocalSpace.x, lightPosInLocalSpace.y, 50)); + } +} + +void EffectSpriteLamp::onTouchesEnded(const std::vector& touches, Event *unused_event) +{ + for ( auto &item: touches ) + { + auto touch = item; + auto s = Director::getInstance()->getWinSize(); + Point loc_winSpace = touch->getLocationInView(); + _lightSprite->setPosition(Vec2( loc_winSpace.x, s.height - loc_winSpace.y)); + Vec3 pos(loc_winSpace.x,loc_winSpace.y, 50); + Mat4 mat = _sprite->getNodeToWorldTransform(); + Point lightPosInLocalSpace=PointApplyAffineTransform(Vec2(pos.x, pos.y),_sprite->worldToNodeTransform()); + ((EffectNormalMapped*)_effect)->setLightPos(Vec3(lightPosInLocalSpace.x, lightPosInLocalSpace.y, 50)); + } +} diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h index 707d1cb80b..162ab11a44 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.h @@ -59,5 +59,21 @@ protected: EffectSprite *_sprite; }; +class EffectSpriteLamp : public ShaderTestDemo2 +{ +public: + CREATE_FUNC(EffectSpriteLamp); + EffectSpriteLamp(); + virtual std::string subtitle() const {return "Sprite Lamp effects";} + //callback +public: + virtual void onTouchesBegan(const std::vector& touches, Event *unused_event); + virtual void onTouchesMoved(const std::vector& touches, Event *unused_event); + virtual void onTouchesEnded(const std::vector& touches, Event *unused_event); +protected: + EffectSprite *_sprite; + Effect* _effect; + Sprite* _lightSprite; +}; #endif diff --git a/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp b/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp index e0887829ab..eee9541cab 100644 --- a/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp +++ b/tests/cpp-tests/Classes/SpineTest/SpineTest.cpp @@ -1,16 +1,16 @@ /******************************************************************************* * Copyright (c) 2013, Esoteric Software * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -27,7 +27,7 @@ #include #include #include - #include "spine/spine.h" +#include "spine/spine.h" using namespace cocos2d; using namespace std; @@ -38,7 +38,53 @@ using namespace spine; // SpineTestScene // //------------------------------------------------------------------ + +static std::function createFunctions[] = +{ + CL(SpineTestLayerNormal), + CL(SpineTestLayerFFD), + CL(SpineTestPerformanceLayer), +}; + +static int sceneIdx = -1; + +#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) + +Layer* nextSpineTestLayer() +{ + sceneIdx++; + sceneIdx = sceneIdx % MAX_LAYER; + + auto layer = (createFunctions[sceneIdx])(); + return layer; +} + +Layer* backSpineTestLayer() +{ + sceneIdx--; + int total = MAX_LAYER; + if( sceneIdx < 0 ) + sceneIdx += total; + + auto layer = (createFunctions[sceneIdx])(); + return layer; +} + +Layer* restartSpineTestLayer() +{ + auto layer = (createFunctions[sceneIdx])(); + return layer; +} + void SpineTestScene::runThisTest() +{ + auto layer = nextSpineTestLayer(); + addChild(layer); + + Director::getInstance()->replaceScene(this); +} + +void SpineTestSceneFFD::runThisTest() { auto layer = SpineTestLayer::create(); addChild(layer); @@ -46,58 +92,175 @@ void SpineTestScene::runThisTest() Director::getInstance()->replaceScene(this); } -bool SpineTestLayer::init () { +SpineTestLayer::SpineTestLayer(void) +: BaseTest() +{ +} + +SpineTestLayer::~SpineTestLayer(void) +{ +} + +std::string SpineTestLayer::title() const +{ + return "No title"; +} + +std::string SpineTestLayer::subtitle() const +{ + return ""; +} + +void SpineTestLayer::onEnter() +{ + BaseTest::onEnter(); +} + +void SpineTestLayer::restartCallback(Ref* sender) +{ + auto s = new SpineTestScene(); + s->addChild(restartSpineTestLayer()); + + Director::getInstance()->replaceScene(s); + s->release(); +} + +void SpineTestLayer::nextCallback(Ref* sender) +{ + auto s = new SpineTestScene(); + s->addChild( nextSpineTestLayer() ); + Director::getInstance()->replaceScene(s); + s->release(); +} + +void SpineTestLayer::backCallback(Ref* sender) +{ + auto s = new SpineTestScene(); + s->addChild( backSpineTestLayer() ); + Director::getInstance()->replaceScene(s); + s->release(); +} + +bool SpineTestLayerNormal::init () { if (!Layer::init()) return false; - skeletonNode = SkeletonAnimation::createWithFile("spine/spineboy.json", "spine/spineboy.atlas"); - skeletonNode->setMix("walk", "jump", 0.2f); - skeletonNode->setMix("jump", "walk", 0.4f); + skeletonNode = SkeletonAnimation::createWithFile("spine/spineboy.json", "spine/spineboy.atlas", 0.6f); + skeletonNode->setScale(0.5); - skeletonNode->setAnimationListener(this, animationStateEvent_selector(SpineTestLayer::animationStateEvent)); - skeletonNode->setAnimation(0, "walk", false); - skeletonNode->addAnimation(0, "jump", false); - skeletonNode->addAnimation(0, "walk", true); - skeletonNode->addAnimation(0, "jump", true, 4); - // skeletonNode->addAnimation(1, "drawOrder", true); + skeletonNode->setStartListener( [this] (int trackIndex) { + spTrackEntry* entry = spAnimationState_getCurrent(skeletonNode->getState(), trackIndex); + const char* animationName = (entry && entry->animation) ? entry->animation->name : 0; + log("%d start: %s", trackIndex, animationName); + }); + skeletonNode->setEndListener( [] (int trackIndex) { + log("%d end", trackIndex); + }); + skeletonNode->setCompleteListener( [] (int trackIndex, int loopCount) { + log("%d complete: %d", trackIndex, loopCount); + }); + skeletonNode->setEventListener( [] (int trackIndex, spEvent* event) { + log("%d event: %s, %d, %f, %s", trackIndex, event->data->name, event->intValue, event->floatValue, event->stringValue); + }); - skeletonNode->timeScale = 0.3f; - skeletonNode->debugBones = true; - skeletonNode->update(0); + skeletonNode->setMix("walk", "jump", 0.2f); + skeletonNode->setMix("jump", "run", 0.2f); + skeletonNode->setAnimation(0, "walk", true); + spTrackEntry* jumpEntry = skeletonNode->addAnimation(0, "jump", false, 3); + skeletonNode->addAnimation(0, "run", true); - skeletonNode->runAction(CCRepeatForever::create(CCSequence::create(CCFadeOut::create(1), - CCFadeIn::create(1), - CCDelayTime::create(5), - nullptr))); + skeletonNode->setTrackStartListener(jumpEntry, [] (int trackIndex) { + log("jumped!"); + }); Size windowSize = Director::getInstance()->getWinSize(); - skeletonNode->setPosition(Vec2(windowSize.width / 2, 20)); - addChild(skeletonNode); + skeletonNode->setPosition(Vec2(windowSize.width / 2, 20)); + addChild(skeletonNode); - scheduleUpdate(); + scheduleUpdate(); - return true; + EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); + listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { + if (!skeletonNode->getDebugBonesEnabled()) + skeletonNode->setDebugBonesEnabled(true); + else if (skeletonNode->getTimeScale() == 1) + skeletonNode->setTimeScale(0.3f); + else + { + skeletonNode->setTimeScale(1); + skeletonNode->setDebugBonesEnabled(false); + } + + return true; + }; + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; } -void SpineTestLayer::update (float deltaTime) { +void SpineTestLayerNormal::update (float deltaTime) { } -void SpineTestLayer::animationStateEvent (SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount) { - spTrackEntry* entry = spAnimationState_getCurrent(node->state, trackIndex); - const char* animationName = (entry && entry->animation) ? entry->animation->name : 0; +bool SpineTestLayerFFD::init () { + if (!Layer::init()) return false; - switch (type) { - case ANIMATION_START: - log("%d start: %s", trackIndex, animationName); - break; - case ANIMATION_END: - log("%d end: %s", trackIndex, animationName); - break; - case ANIMATION_COMPLETE: - log("%d complete: %s, %d", trackIndex, animationName, loopCount); - break; - case ANIMATION_EVENT: - log("%d event: %s, %s: %d, %f, %s", trackIndex, animationName, event->data->name, event->intValue, event->floatValue, event->stringValue); - break; - } + skeletonNode = SkeletonAnimation::createWithFile("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5f); + skeletonNode->setAnimation(0, "walk", true); + skeletonNode->setSkin("goblin"); + + skeletonNode->setScale(0.5); + Size windowSize = Director::getInstance()->getWinSize(); + skeletonNode->setPosition(Vec2(windowSize.width / 2, 20)); + addChild(skeletonNode); + + scheduleUpdate(); + + EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); + listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { + if (!skeletonNode->getDebugBonesEnabled()) + skeletonNode->setDebugBonesEnabled(true); + else if (skeletonNode->getTimeScale() == 1) + skeletonNode->setTimeScale(0.3f); + else + { + skeletonNode->setTimeScale(1); + skeletonNode->setDebugBonesEnabled(false); + } + return true; + }; + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; } + +void SpineTestLayerFFD::update (float deltaTime) { + +} + +bool SpineTestPerformanceLayer::init () { + if (!Layer::init()) return false; + + scheduleUpdate(); + + EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); + listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool + { + + Vec2 pos = convertToNodeSpace(touch->getLocation()); + auto skeletonNode = SkeletonAnimation::createWithFile("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5f); + skeletonNode->setAnimation(0, "walk", true); + skeletonNode->setSkin("goblin"); + + skeletonNode->setScale(0.2); + skeletonNode->setPosition(pos); + addChild(skeletonNode); + return true; + }; + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + return true; +} + +void SpineTestPerformanceLayer::update (float deltaTime) { + +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/SpineTest/SpineTest.h b/tests/cpp-tests/Classes/SpineTest/SpineTest.h index 33eea39c34..55a778b717 100644 --- a/tests/cpp-tests/Classes/SpineTest/SpineTest.h +++ b/tests/cpp-tests/Classes/SpineTest/SpineTest.h @@ -1,16 +1,16 @@ /******************************************************************************* * Copyright (c) 2013, Esoteric Software * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -28,6 +28,7 @@ #include "cocos2d.h" #include "../testBasic.h" +#include "../BaseTest.h" #include class SpineTestScene : public TestScene @@ -36,17 +37,87 @@ public: virtual void runThisTest(); }; -class SpineTestLayer: public cocos2d::Layer { +class SpineTestSceneFFD : public TestScene +{ +public: + virtual void runThisTest(); +}; + +class SpineTestLayer : public BaseTest +{ +protected: + std::string _title; + +public: + SpineTestLayer(void); + virtual ~SpineTestLayer(void); + + void restartCallback(Ref* sender); + void nextCallback(Ref* sender); + void backCallback(Ref* sender); + + // overrides + virtual std::string title() const override; + virtual std::string subtitle() const override; + virtual void onEnter() override; +}; + +class SpineTestLayerNormal: public SpineTestLayer { private: spine::SkeletonAnimation* skeletonNode; - + public: - + virtual std::string title() const override + { + return "Spine Test"; + } + virtual std::string subtitle() const override + { + return "Normal Spine"; + } virtual bool init (); virtual void update (float deltaTime); - void animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); + // void animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); - CREATE_FUNC (SpineTestLayer); + CREATE_FUNC (SpineTestLayerNormal); +}; + +class SpineTestLayerFFD: public SpineTestLayer { +private: + spine::SkeletonAnimation* skeletonNode; + +public: + virtual std::string title() const override + { + return "Spine Test"; + } + virtual std::string subtitle() const override + { + return "FFD Spine"; + } + virtual bool init (); + virtual void update (float deltaTime); + // void animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); + + CREATE_FUNC (SpineTestLayerFFD); +}; + +class SpineTestPerformanceLayer: public SpineTestLayer +{ +public: + virtual std::string title() const override + { + return "Spine Test"; + } + virtual std::string subtitle() const override + { + return "Performance Test for Spine"; + } + virtual bool init (); + virtual void update (float deltaTime); + // void animationStateEvent (spine::SkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount); + + CREATE_FUNC (SpineTestPerformanceLayer); }; #endif // _EXAMPLELAYER_H_ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 7d3bfe3879..c6fb2138d5 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -30,7 +30,7 @@ g_guisTests[] = } }, #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) { "WebViewTest", [](Ref* sender) @@ -211,7 +211,7 @@ g_guisTests[] = UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); sceneManager->setCurrentUISceneId(kUIScrollViewTest_Vertical); sceneManager->setMinUISceneId(kUIScrollViewTest_Vertical); - sceneManager->setMaxUISceneId(kUIScrollViewNestTest); + sceneManager->setMaxUISceneId(kUIScrollViewRotated); Scene* scene = sceneManager->currentUIScene(); Director::getInstance()->replaceScene(scene); } diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index 113deec116..c00944cd14 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -21,7 +21,7 @@ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIVideoPlayerTest/UIVideoPlayerTest.h" #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIWebViewTest/UIWebViewTest.h" #endif #include "UIScale9SpriteTest.h" @@ -91,6 +91,7 @@ static const char* s_testArray[] = "UIScrollViewTest_ScrollToPercentBothDirection", "UIScrollViewTest_ScrollToPercentBothDirection_Bounce", "UIScrollViewNestTest", + "UIScrollViewRotated", "UIPageViewTest", "UIPageViewButtonTest", @@ -114,7 +115,7 @@ static const char* s_testArray[] = #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) "UIVideoPlayerTest", #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) "UIWebViewTest", #endif "UIScale9SpriteTest", @@ -323,6 +324,9 @@ Scene *UISceneManager::currentUIScene() return UIScrollViewTest_ScrollToPercentBothDirection_Bounce::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIScrollViewNestTest: return UIScrollViewNestTest::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUIScrollViewRotated: + return UIScrollViewRotated::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUIPageViewTest: return UIPageViewTest::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIPageViewButtonTest: @@ -360,7 +364,7 @@ Scene *UISceneManager::currentUIScene() case kUIVideoPlayerTest: return VideoPlayerTest::sceneWithTitle(s_testArray[_currentUISceneId]); #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) case KWebViewTest: return WebViewTest::sceneWithTitle(s_testArray[_currentUISceneId]); #endif diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index 658cdb4e7c..cc49fb4f40 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -82,6 +82,8 @@ enum kUIScrollViewTest_ScrollToPercentBothDirection, kUIScrollViewTest_ScrollToPercentBothDirection_Bounce, kUIScrollViewNestTest, + kUIScrollViewRotated, + kUIPageViewTest, kUIPageViewButtonTest, kUIPageViewCustomScrollThreshold, @@ -100,7 +102,7 @@ enum #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) kUIVideoPlayerTest, #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) KWebViewTest, #endif kUIScale9SpriteTest, diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp index e73cb4d4e5..1c57acae30 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp @@ -39,7 +39,7 @@ bool UIScrollViewTest_Vertical::init() // Create the scrollview by vertical ui::ScrollView* scrollView = ui::ScrollView::create(); - scrollView->setContentSize(Size(280.0f, 150.0f)); + scrollView->setContentSize(Size(280.0f, 100.0f)); Size backgroundSize = background->getContentSize(); scrollView->setPosition(Vec2((widgetSize.width - backgroundSize.width) / 2.0f + (backgroundSize.width - scrollView->getContentSize().width) / 2.0f, @@ -71,7 +71,8 @@ bool UIScrollViewTest_Vertical::init() imageView->setPosition(Vec2(innerWidth / 2.0f, imageView->getContentSize().height / 2.0f)); scrollView->addChild(imageView); - + + return true; } @@ -425,3 +426,81 @@ bool UIScrollViewNestTest::init() return false; } +// UIScrollViewRotated + +UIScrollViewRotated::UIScrollViewRotated() +: _displayValueLabel(nullptr) +{ +} + +UIScrollViewRotated::~UIScrollViewRotated() +{ +} + +bool UIScrollViewRotated::init() +{ + if (UIScene::init()) + { + Size widgetSize = _widget->getContentSize(); + + // Add a label in which the scrollview alert will be displayed + _displayValueLabel = Text::create("Move by vertical direction", "fonts/Marker Felt.ttf", 32); + _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1.0f)); + _displayValueLabel->setPosition(Vec2(widgetSize.width / 2.0f, + widgetSize.height / 2.0f + _displayValueLabel->getContentSize().height * 1.5f)); + _uiLayer->addChild(_displayValueLabel); + + // Add the alert + Text* alert = Text::create("ScrollView vertical", "fonts/Marker Felt.ttf", 30); + alert->setColor(Color3B(159, 168, 176)); + alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 3.075f)); + _uiLayer->addChild(alert); + + Layout* root = static_cast(_uiLayer->getChildByTag(81)); + + Layout* background = dynamic_cast(root->getChildByName("background_Panel")); + + // Create the scrollview by vertical + ui::ScrollView* scrollView = ui::ScrollView::create(); + scrollView->setContentSize(Size(280.0f, 150.0f)); + scrollView->setDirection(ui::ScrollView::Direction::BOTH); + Size backgroundSize = background->getContentSize(); + scrollView->setPosition(Vec2((widgetSize.width - backgroundSize.width) / 2.0f + + (backgroundSize.width - scrollView->getContentSize().width) / 2.0f, + (widgetSize.height - backgroundSize.height) / 2.0f + + (backgroundSize.height - scrollView->getContentSize().height) / 2.0f + 100) ); + scrollView->setRotation(45); + _uiLayer->addChild(scrollView); + + ImageView* imageView = ImageView::create("cocosui/ccicon.png"); + + float innerWidth = scrollView->getContentSize().width; + float innerHeight = scrollView->getContentSize().height + imageView->getContentSize().height; + + scrollView->setInnerContainerSize(Size(innerWidth, innerHeight)); + + Button* button = Button::create("cocosui/animationbuttonnormal.png", "cocosui/animationbuttonpressed.png"); + button->setPosition(Vec2(innerWidth / 2.0f, scrollView->getInnerContainerSize().height - button->getContentSize().height / 2.0f)); + scrollView->addChild(button); + + Button* titleButton = Button::create("cocosui/backtotopnormal.png", "cocosui/backtotoppressed.png"); + titleButton->setTitleText("Title Button"); + titleButton->setPosition(Vec2(innerWidth / 2.0f, button->getBottomBoundary() - button->getContentSize().height)); + scrollView->addChild(titleButton); + + Button* button_scale9 = Button::create("cocosui/button.png", "cocosui/buttonHighlighted.png"); + button_scale9->setScale9Enabled(true); + button_scale9->setContentSize(Size(100.0f, button_scale9->getVirtualRendererSize().height)); + button_scale9->setPosition(Vec2(innerWidth / 2.0f, titleButton->getBottomBoundary() - titleButton->getContentSize().height)); + scrollView->addChild(button_scale9); + + imageView->setPosition(Vec2(innerWidth / 2.0f, imageView->getContentSize().height / 2.0f)); + scrollView->addChild(imageView); + + + + return true; + } + + return false; +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h index bbb78949d3..766a11002b 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h @@ -99,4 +99,16 @@ protected: Text* _displayValueLabel; }; +class UIScrollViewRotated : public UIScene +{ +public: + UIScrollViewRotated(); + ~UIScrollViewRotated(); + bool init(); + +protected: + UI_SCENE_CREATE_FUNC(UIScrollViewRotated) + Text* _displayValueLabel; +}; + #endif /* defined(__TestCpp__UIScrollViewTest__) */ diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 0d0498b695..2a20d6a19d 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -256,7 +256,7 @@ void TestController::onMouseScroll(Event *event) s_tCurPos = nextPos; } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) + void TestController::runAllTests(int fd) { AppDelegate* app = (AppDelegate *)Application::getInstance(); @@ -519,7 +519,7 @@ void TestController::autorun() hints.ai_flags = 0; hints.ai_protocol = 0; /* Any protocol */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WSADATA wsaData; WSAStartup(MAKEWORD(2, 2),&wsaData); #endif @@ -545,7 +545,7 @@ void TestController::autorun() if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; /* Success */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(sfd); #else close(sfd); @@ -581,7 +581,7 @@ void TestController::autorun() strcpy(cmd, tmp.c_str()); send(sfd,cmd,strlen(cmd),0); wait(1); - #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(sfd); WSACleanup(); #else @@ -590,5 +590,4 @@ void TestController::autorun() return; } -#endif diff --git a/tests/cpp-tests/Resources/Images/elephant1_Diffuse.png b/tests/cpp-tests/Resources/Images/elephant1_Diffuse.png new file mode 100755 index 0000000000..05f532150f Binary files /dev/null and b/tests/cpp-tests/Resources/Images/elephant1_Diffuse.png differ diff --git a/tests/cpp-tests/Resources/Images/elephant1_Normal.png b/tests/cpp-tests/Resources/Images/elephant1_Normal.png new file mode 100755 index 0000000000..c5c837817a Binary files /dev/null and b/tests/cpp-tests/Resources/Images/elephant1_Normal.png differ diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest new file mode 100644 index 0000000000..06a0da1f85 --- /dev/null +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest @@ -0,0 +1,16 @@ +{ + "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/project_dev.manifest", + "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/version_dev.manifest", + "version" : "1.0.0", + "engineVersion" : "3.0 beta", + + "assets" : { + "Images/background1.jpg" : { + "md5" : "..." + } + }, + + "searchPaths" : [ + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest new file mode 100644 index 0000000000..ad698e4d19 --- /dev/null +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest @@ -0,0 +1,15 @@ +{ + "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene2/", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene2/project_dev.manifest", + "version" : "1.0.0", + "engineVersion" : "3.0 beta", + + "assets" : { + "Images/background2.jpg" : { + "md5" : "..." + } + }, + + "searchPaths" : [ + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest new file mode 100644 index 0000000000..bea34649b0 --- /dev/null +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest @@ -0,0 +1,16 @@ +{ + "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/project_dev.manifest", + "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/version_dev.manifest", + "version" : "1.0.0", + "engineVersion" : "3.0 beta", + + "assets" : { + "Images/background3.png" : { + "md5" : "..." + } + }, + + "searchPaths" : [ + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/Shaders3D/Normal.frag b/tests/cpp-tests/Resources/Shaders3D/Normal.frag new file mode 100755 index 0000000000..7f1f3d6735 --- /dev/null +++ b/tests/cpp-tests/Resources/Shaders3D/Normal.frag @@ -0,0 +1,31 @@ +#ifdef GL_ES +precision mediump float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; +uniform sampler2D u_normalMap; +uniform float u_kBump; +uniform vec4 u_lightPosInLocalSpace; +uniform vec2 u_contentSize; +uniform vec3 u_diffuseL; +void main(void) +{ + vec4 texColor=texture2D(CC_Texture0, v_texCoord); + vec3 normal=texture2D(u_normalMap, v_texCoord).rgb; + normal=normal*2.0-1.0; + normal.y=-normal.y; + if(u_kBump!=1.0) + { + //if the vertex.z mult kBump, then the normal.z should div kBump and re-normalize + normal=vec3(normal.x,normal.y,normal.z/u_kBump); + normal=normalize(normal); + } + vec4 curPixelPosInLocalSpace=vec4(v_texCoord.x*u_contentSize.x,(1.0-v_texCoord.y)*u_contentSize.y,0.0,1.0); + vec4 lightDir=normalize(curPixelPosInLocalSpace-u_lightPosInLocalSpace); + vec3 posToLight=-lightDir.xyz; + float normDotPosToLight=max(0.0,dot(normal,posToLight)); + vec4 diffuse=vec4(normDotPosToLight*u_diffuseL,1.0); + vec4 ambient=vec4(0.5,0.5,0.5,1); + gl_FragColor=texColor*vec4(vec3(diffuse+ambient),diffuse.a);; +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/ccs-res b/tests/cpp-tests/Resources/ccs-res index 72970e1622..a3f7dba196 160000 --- a/tests/cpp-tests/Resources/ccs-res +++ b/tests/cpp-tests/Resources/ccs-res @@ -1 +1 @@ -Subproject commit 72970e16227dd624de4f9dd11395d4e510646441 +Subproject commit a3f7dba196a8c2cfffc1809e64a2166a487c4818 diff --git a/tests/cpp-tests/Resources/spine/goblins-ffd.atlas b/tests/cpp-tests/Resources/spine/goblins-ffd.atlas new file mode 100644 index 0000000000..b977b07f61 --- /dev/null +++ b/tests/cpp-tests/Resources/spine/goblins-ffd.atlas @@ -0,0 +1,292 @@ + +goblins-ffd.png +format: RGBA8888 +filter: Linear,Linear +repeat: none +dagger + rotate: false + xy: 2, 28 + size: 26, 108 + orig: 26, 108 + offset: 0, 0 + index: -1 +goblin/eyes-closed + rotate: false + xy: 137, 29 + size: 34, 12 + orig: 34, 12 + offset: 0, 0 + index: -1 +goblin/head + rotate: false + xy: 26, 357 + size: 103, 66 + orig: 103, 66 + offset: 0, 0 + index: -1 +goblin/left-arm + rotate: false + xy: 30, 28 + size: 37, 35 + orig: 37, 35 + offset: 0, 0 + index: -1 +goblin/left-foot + rotate: false + xy: 134, 260 + size: 65, 31 + orig: 65, 31 + offset: 0, 0 + index: -1 +goblin/left-hand + rotate: false + xy: 69, 25 + size: 36, 41 + orig: 36, 41 + offset: 0, 0 + index: -1 +goblin/left-lower-leg + rotate: false + xy: 134, 293 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblin/left-shoulder + rotate: false + xy: 137, 43 + size: 29, 44 + orig: 29, 44 + offset: 0, 0 + index: -1 +goblin/left-upper-leg + rotate: false + xy: 30, 65 + size: 33, 73 + orig: 33, 73 + offset: 0, 0 + index: -1 +goblin/neck + rotate: false + xy: 201, 387 + size: 36, 41 + orig: 36, 41 + offset: 0, 0 + index: -1 +goblin/pelvis + rotate: false + xy: 26, 140 + size: 62, 43 + orig: 62, 43 + offset: 0, 0 + index: -1 +goblin/right-arm + rotate: false + xy: 171, 84 + size: 23, 50 + orig: 23, 50 + offset: 0, 0 + index: -1 +goblin/right-foot + rotate: false + xy: 134, 225 + size: 63, 33 + orig: 63, 33 + offset: 0, 0 + index: -1 +goblin/right-hand + rotate: false + xy: 204, 258 + size: 36, 37 + orig: 36, 37 + offset: 0, 0 + index: -1 +goblin/right-lower-leg + rotate: false + xy: 201, 430 + size: 36, 76 + orig: 36, 76 + offset: 0, 0 + index: -1 +goblin/right-shoulder + rotate: false + xy: 130, 89 + size: 39, 45 + orig: 39, 45 + offset: 0, 0 + index: -1 +goblin/right-upper-leg + rotate: false + xy: 98, 214 + size: 34, 63 + orig: 34, 63 + offset: 0, 0 + index: -1 +goblin/torso + rotate: false + xy: 131, 410 + size: 68, 96 + orig: 68, 96 + offset: 0, 0 + index: -1 +goblin/undie-straps + rotate: false + xy: 2, 7 + size: 55, 19 + orig: 55, 19 + offset: 0, 0 + index: -1 +goblin/undies + rotate: false + xy: 199, 227 + size: 36, 29 + orig: 36, 29 + offset: 0, 0 + index: -1 +goblingirl/eyes-closed + rotate: false + xy: 59, 2 + size: 37, 21 + orig: 37, 21 + offset: 0, 0 + index: -1 +goblingirl/head + rotate: false + xy: 26, 425 + size: 103, 81 + orig: 103, 81 + offset: 0, 0 + index: -1 +goblingirl/left-arm + rotate: false + xy: 201, 190 + size: 37, 35 + orig: 37, 35 + offset: 0, 0 + index: -1 +goblingirl/left-foot + rotate: false + xy: 134, 192 + size: 65, 31 + orig: 65, 31 + offset: 0, 0 + index: -1 +goblingirl/left-hand + rotate: false + xy: 196, 109 + size: 35, 40 + orig: 35, 40 + offset: 0, 0 + index: -1 +goblingirl/left-lower-leg + rotate: false + xy: 169, 293 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblingirl/left-shoulder + rotate: false + xy: 107, 30 + size: 28, 46 + orig: 28, 46 + offset: 0, 0 + index: -1 +goblingirl/left-upper-leg + rotate: false + xy: 65, 68 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblingirl/neck + rotate: false + xy: 204, 297 + size: 35, 41 + orig: 35, 41 + offset: 0, 0 + index: -1 +goblingirl/pelvis + rotate: false + xy: 131, 365 + size: 62, 43 + orig: 62, 43 + offset: 0, 0 + index: -1 +goblingirl/right-arm + rotate: false + xy: 100, 97 + size: 28, 50 + orig: 28, 50 + offset: 0, 0 + index: -1 +goblingirl/right-foot + rotate: false + xy: 134, 157 + size: 63, 33 + orig: 63, 33 + offset: 0, 0 + index: -1 +goblingirl/right-hand + rotate: false + xy: 199, 151 + size: 36, 37 + orig: 36, 37 + offset: 0, 0 + index: -1 +goblingirl/right-lower-leg + rotate: false + xy: 96, 279 + size: 36, 76 + orig: 36, 76 + offset: 0, 0 + index: -1 +goblingirl/right-shoulder + rotate: false + xy: 204, 340 + size: 39, 45 + orig: 39, 45 + offset: 0, 0 + index: -1 +goblingirl/right-upper-leg + rotate: false + xy: 98, 149 + size: 34, 63 + orig: 34, 63 + offset: 0, 0 + index: -1 +goblingirl/torso + rotate: false + xy: 26, 259 + size: 68, 96 + orig: 68, 96 + offset: 0, 0 + index: -1 +goblingirl/undie-straps + rotate: false + xy: 134, 136 + size: 55, 19 + orig: 55, 19 + offset: 0, 0 + index: -1 +goblingirl/undies + rotate: false + xy: 196, 78 + size: 36, 29 + orig: 36, 29 + offset: 0, 0 + index: -1 +shield + rotate: false + xy: 26, 185 + size: 70, 72 + orig: 70, 72 + offset: 0, 0 + index: -1 +spear + rotate: false + xy: 2, 138 + size: 22, 368 + orig: 22, 368 + offset: 0, 0 + index: -1 diff --git a/tests/cpp-tests/Resources/spine/goblins-ffd.json b/tests/cpp-tests/Resources/spine/goblins-ffd.json new file mode 100644 index 0000000000..b35360ad1f --- /dev/null +++ b/tests/cpp-tests/Resources/spine/goblins-ffd.json @@ -0,0 +1,1081 @@ +{ +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, + { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, + { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, + { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, + { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, + { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, + { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, + { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, + { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, + { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, + { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, + { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, + { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, + { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, + { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, + { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, + { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 }, + { "name": "spear1", "parent": "left hand", "length": 65.06, "x": 0.48, "y": 17.03, "rotation": 102.43 }, + { "name": "spear2", "parent": "spear1", "length": 61.41, "x": 65.05, "y": 0.04, "rotation": 0.9 }, + { "name": "spear3", "parent": "spear2", "length": 76.79, "x": 61.88, "y": 0.57, "rotation": -0.9 } +], +"slots": [ + { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, + { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, + { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, + { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, + { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, + { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, + { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, + { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, + { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, + { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, + { "name": "undies", "bone": "pelvis", "attachment": "undies" }, + { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eyes", "bone": "head" }, + { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, + { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, + { "name": "right hand thumb", "bone": "right hand", "attachment": "right hand thumb" }, + { "name": "right hand item", "bone": "right hand", "attachment": "dagger" }, + { "name": "right hand", "bone": "right hand", "attachment": "right hand" }, + { "name": "right hand item 2", "bone": "right hand", "attachment": "shield" } +], +"skins": { + "default": { + "left hand item": { + "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, + "spear": { + "type": "skinnedmesh", + "uvs": [ 1, 0.11236, 0.77096, 0.13278, 0.76608, 0.21781, 0.75642, 0.386, 0.74723, 0.54607, 0.72117, 1, 0.28838, 1, 0.24208, 0.54327, 0.22589, 0.38361, 0.2089, 0.21605, 0.20043, 0.13242, 0, 0.11519, 0.4527, 0, 0.58399, 0 ], + "triangles": [ 5, 6, 4, 6, 7, 4, 4, 7, 3, 2, 9, 1, 9, 10, 1, 10, 12, 1, 12, 13, 1, 1, 13, 0, 10, 11, 12, 3, 8, 2, 8, 9, 2, 7, 8, 3 ], + "vertices": [ 1, 20, 38.54, -10.88, 1, 1, 20, 30.97, -5.93, 1, 2, 19, 61.48, -5.58, 0.51, 20, -0.31, -6.16, 0.48, 2, 18, 64.73, -5.03, 0.5, 19, -0.4, -5.06, 0.49, 1, 16, 4.56, 23.91, 1, 1, 16, 41.7, -138.95, 1, 1, 16, 32.42, -141.1, 1, 1, 16, -6.49, 22.4, 1, 2, 18, 65.48, 6.64, 0.5, 19, 0.53, 6.59, 0.49, 2, 19, 62.18, 6.66, 0.51, 20, 0.2, 6.09, 0.48, 1, 20, 30.96, 6.61, 1, 1, 20, 37.26, 11.09, 1, 1, 20, 79.75, 1.59, 1, 1, 20, 79.78, -1.29, 1 ], + "edges": [ 24, 22, 22, 20, 10, 12, 2, 0, 24, 26, 0, 26, 8, 10, 12, 14, 6, 8, 14, 16, 2, 4, 4, 6, 16, 18, 18, 20, 20, 2 ], + "hull": 14, + "width": 22, + "height": 368 + } + }, + "right hand item": { + "dagger": { + "type": "mesh", + "uvs": [ 0.78091, 0.38453, 1, 0.38405, 1, 0.44881, 0.73953, 0.4687, 0.74641, 0.81344, 0.34022, 1, 0.15434, 1, 0.11303, 0.78858, 0.23007, 0.47367, 0, 0.45047, 0, 0.38621, 0.22367, 0.38573, 0.24384, 0, 1, 0 ], + "triangles": [ 0, 12, 13, 11, 12, 0, 0, 1, 2, 9, 10, 11, 3, 11, 0, 3, 0, 2, 8, 11, 3, 9, 11, 8, 5, 6, 7, 4, 5, 8, 4, 8, 3, 5, 7, 8 ], + "vertices": [ 15.49, -12.82, 21.13, -13.57, 20.16, -20.49, 13.15, -21.67, 8.13, -58.56, -5.13, -77.04, -9.92, -76.36, -7.79, -53.6, -0.03, -20.36, -5.6, -17.04, -4.63, -10.17, 1.12, -10.93, 7.46, 30.24, 26.93, 27.49 ], + "edges": [ 22, 20, 24, 26, 22, 24, 2, 0, 0, 22, 0, 26, 12, 14, 14, 16, 18, 20, 16, 18, 2, 4, 4, 6, 6, 8, 10, 12, 8, 10 ], + "hull": 14, + "width": 26, + "height": 108 + } + }, + "right hand item 2": { + "shield": { "rotation": 93.49, "width": 70, "height": 72 } + } + }, + "goblin": { + "eyes": { + "eyes closed": { "name": "goblin/eyes-closed", "x": 29.19, "y": -24.89, "rotation": -88.92, "width": 34, "height": 12 } + }, + "head": { + "head": { + "name": "goblin/head", + "type": "mesh", + "uvs": [ 0, 0.60494, 0.14172, 0.5145, 0.24218, 0.55229, 0.32667, 0.67806, 0.37969, 0.79352, 0.53505, 0.93014, 0.86056, 1, 0.94071, 0.94169, 0.92098, 0.69923, 0.9888, 0.65497, 0.99003, 0.51643, 0.89632, 0.43561, 0.94487, 0.41916, 1, 0.39713, 1, 0.2836, 0.94017, 0.27027, 0.87906, 0.25666, 0.80754, 0.16044, 0.66698, 0.01997, 0.4734, 0.01805, 0.29215, 0.19893, 0.25392, 0.31823, 0.09117, 0.324, 0, 0.44331, 0.43271, 0.69153, 0.466, 0.47794, 0.35996, 0.31246, 0.73473, 0.68593, 0.72215, 0.57425, 0.88179, 0.5583, 0.80267, 0.51015 ], + "triangles": [ 26, 20, 19, 21, 20, 26, 15, 14, 13, 12, 15, 13, 11, 16, 15, 11, 15, 12, 26, 17, 25, 18, 26, 19, 17, 26, 18, 30, 25, 17, 30, 17, 16, 30, 16, 11, 1, 22, 21, 23, 22, 1, 2, 1, 21, 2, 21, 26, 29, 30, 11, 29, 11, 10, 28, 25, 30, 0, 23, 1, 9, 29, 10, 25, 3, 2, 25, 2, 26, 29, 27, 28, 29, 28, 30, 24, 3, 25, 24, 25, 28, 24, 28, 27, 8, 29, 9, 27, 29, 8, 4, 3, 24, 5, 24, 27, 4, 24, 5, 7, 6, 27, 7, 27, 8, 5, 27, 6 ], + "vertices": [ 14.56, 50.42, 23.12, 35.47, 17.46, 26.36, 11.57, 16.86, 3.74, 11.71, -5.89, -3.91, -11.83, -37.23, -8.31, -45.63, 7.75, -44.24, 10.39, -51.33, 19.52, -51.82, 25.21, -43.15, 26.12, -47.43, 27.35, -53.16, 34.84, -53.46, 35.96, -47.33, 37.11, -41.08, 43.75, -33.97, 53.58, -19.87, 54.5, 0.03, 43.31, 19.16, 35.6, 23.41, 35.89, 40.17, 28.39, 49.87, 10.25, 5.99, 24.2, 2, 35.55, 12.48, 9.39, -25.1, 16.8, -24.31, 17.2, -40.65, 20.68, -33.02 ], + "edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 26, 28, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 0, 46, 6, 48, 48, 50, 50, 52, 52, 42, 2, 4, 4, 6, 4, 52, 2, 44, 22, 32, 22, 24, 24, 26, 28, 30, 30, 32, 24, 30, 16, 54, 54, 56, 20, 58, 58, 54, 16, 58, 22, 60, 60, 56, 58, 60 ], + "hull": 24, + "width": 103, + "height": 66 + } + }, + "left arm": { + "left arm": { + "name": "goblin/left-arm", + "type": "mesh", + "uvs": [ 0.68992, 0.29284, 1, 0.46364, 1, 0.74643, 0.84089, 1, 0.66344, 1, 0.33765, 0.64284, 0, 0.44124, 0, 0, 0.34295, 0 ], + "triangles": [ 6, 7, 8, 5, 6, 8, 0, 5, 8, 0, 1, 2, 5, 0, 2, 4, 5, 2, 3, 4, 2 ], + "vertices": [ 18.6, 8.81, 32.19, 10.31, 38.02, 1.62, 38.08, -9.63, 32.31, -13.49, 14.37, -9.62, -0.75, -10.78, -9.84, 2.77, 1.29, 10.25 ], + "edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 6, 4, 6, 8, 8, 10, 12, 14, 10, 12 ], + "hull": 9, + "width": 37, + "height": 35 + } + }, + "left foot": { + "left foot": { + "name": "goblin/left-foot", + "type": "mesh", + "uvs": [ 0.15733, 0.31873, 0.08195, 0.78502, 0.15884, 0.99366, 0.41633, 0.96804, 0.68822, 0.97636, 1, 0.96388, 0.99385, 0.73501, 0.85294, 0.51862, 0.61479, 0.31056, 0.46991, 0, 0.48032, 0.75604, 0.75994, 0.77706 ], + "triangles": [ 0, 9, 8, 10, 0, 8, 10, 8, 7, 11, 10, 7, 11, 7, 6, 1, 0, 10, 11, 6, 5, 3, 1, 10, 4, 10, 11, 4, 11, 5, 3, 10, 4, 2, 1, 3 ], + "vertices": [ 2.28, 13.07, -1.76, -1.64, 3.59, -7.8, 20.25, -6.04, 37.91, -5.27, 58.12, -3.71, 57.31, 3.34, 47.78, 9.51, 31.95, 15.05, 21.99, 24.11, 24.03, 0.75, 42.21, 1.16 ], + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 6, 20, 20, 16, 2, 20, 8, 22, 22, 14, 20, 22, 22, 10 ], + "hull": 10, + "width": 65, + "height": 31 + } + }, + "left hand": { + "left hand": { + "name": "goblin/left-hand", + "type": "mesh", + "uvs": [ 0.518, 0.12578, 1, 0.16285, 0.99788, 0.50578, 0.69745, 1, 0.37445, 1, 0, 0.80051, 0, 0.42792, 0.17601, 0, 0.43567, 0 ], + "triangles": [ 2, 0, 1, 0, 5, 6, 6, 7, 0, 0, 7, 8, 3, 4, 0, 4, 5, 0, 2, 3, 0 ], + "vertices": [ -3.11, 15.42, 10.83, 22.27, 15.5, 14.55, 18.35, -8.96, 9.48, -14.32, -4.58, -14.3, -11.63, -2.63, -14.89, 13.68, -7.75, 17.99 ], + "edges": [ 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 14, 16, 12, 14 ], + "hull": 9, + "width": 36, + "height": 41 + } + }, + "left lower leg": { + "left lower leg": { + "name": "goblin/left-lower-leg", + "type": "mesh", + "uvs": [ 0.95508, 0.20749, 0.81927, 0.65213, 0.94754, 0.77308, 0.67842, 0.97346, 0.46463, 1, 0.26845, 1, 0.04963, 0.90706, 0.2106, 0.60115, 0.07478, 0.40195, 0.18545, 0, 0.28857, 0 ], + "triangles": [ 10, 8, 9, 1, 7, 10, 7, 8, 10, 0, 1, 10, 1, 4, 7, 3, 1, 2, 5, 6, 7, 7, 4, 5, 1, 3, 4 ], + "vertices": [ -0.19, 6.82, 30.97, 10.96, 37.97, 17.33, 53.88, 12.6, 57.58, 6.31, 59.34, 0.08, 55.04, -8.63, 32.99, -9.33, 20.79, -17.43, -7.27, -21.56, -8.19, -18.29 ], + "edges": [ 20, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 18, 20, 16, 18 ], + "hull": 11, + "width": 33, + "height": 70 + } + }, + "left shoulder": { + "left shoulder": { + "name": "goblin/left-shoulder", + "type": "mesh", + "uvs": [ 0.7377, 0.40692, 1, 0.75237, 1, 1, 0.62046, 1, 0.26184, 0.56601, 0, 0.29783, 0, 0, 0.44115, 0 ], + "triangles": [ 5, 6, 7, 4, 5, 7, 4, 7, 0, 3, 4, 0, 3, 0, 1, 3, 1, 2 ], + "vertices": [ 15.18, 5.74, 32.17, 5.32, 41.79, 0.21, 36.63, -9.5, 14.88, -9.72, 0.9, -10.89, -10.66, -4.74, -4.66, 6.54 ], + "edges": [ 12, 14, 14, 0, 4, 2, 0, 2, 4, 6, 6, 8, 10, 12, 8, 10 ], + "hull": 8, + "width": 29, + "height": 44 + } + }, + "left upper leg": { + "left upper leg": { + "name": "goblin/left-upper-leg", + "type": "mesh", + "uvs": [ 1, 0.12167, 1, 0.54873, 0.91067, 0.78907, 0.76567, 1, 0.3087, 0.9579, 0, 0.68777, 0, 0.219, 0.51961, 0, 0.87552, 0 ], + "triangles": [ 7, 8, 0, 5, 6, 7, 0, 1, 7, 4, 5, 7, 1, 4, 7, 2, 4, 1, 3, 4, 2 ], + "vertices": [ 2.33, 13.06, 33.5, 12.57, 51, 9.34, 66.32, 4.31, 63, -10.71, 43.13, -20.58, 8.91, -20.04, -6.79, -2.64, -6.61, 9.1 ], + "edges": [ 10, 8, 8, 6, 6, 4, 4, 2, 10, 12, 12, 14, 14, 16, 2, 0, 16, 0 ], + "hull": 9, + "width": 33, + "height": 73 + } + }, + "neck": { + "neck": { + "name": "goblin/neck", + "type": "mesh", + "uvs": [ 0.81967, 0.27365, 0.92101, 0.82048, 0.47134, 1, 0.15679, 0.9354, 0, 0.7556, 0.19268, 0.51833, 0.15468, 0.35706, 0, 0.21989, 0.13568, 0, 0.68878, 0, 0.70145, 0.53872 ], + "triangles": [ 6, 8, 9, 6, 9, 0, 7, 8, 6, 10, 5, 6, 0, 10, 6, 10, 0, 1, 3, 4, 5, 2, 5, 10, 2, 10, 1, 3, 5, 2 ], + "vertices": [ 18.62, -11.65, -3.98, -13.85, -10.28, 2.76, -6.91, 13.89, 0.8, 19.05, 10.06, 11.51, 16.74, 12.45, 22.71, 17.64, 31.4, 12.19, 30.12, -7.67, 8.05, -6.71 ], + "edges": [ 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 20, 20, 0, 0, 18, 16, 18, 14, 16, 0, 2 ], + "hull": 10, + "width": 36, + "height": 41 + } + }, + "pelvis": { + "pelvis": { + "name": "goblin/pelvis", + "type": "mesh", + "uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ], + "triangles": [ 1, 2, 3, 1, 3, 0 ], + "vertices": [ 25.38, -20.73, -36.61, -20.73, -36.61, 22.26, 25.38, 22.26 ], + "edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ], + "hull": 4, + "width": 62, + "height": 43 + } + }, + "right arm": { + "right arm": { + "name": "goblin/right-arm", + "type": "mesh", + "uvs": [ 1, 0.09223, 1, 0.8501, 0.72058, 1, 0.24384, 1, 0, 0.86558, 0.20822, 0.10919, 0.50903, 0, 0.85342, 0 ], + "triangles": [ 6, 7, 0, 2, 3, 5, 4, 5, 3, 1, 6, 0, 6, 2, 5, 1, 2, 6 ], + "vertices": [ -4.75, 8.89, 33.03, 11.74, 40.99, 5.89, 41.81, -5.03, 35.53, -11.13, -2.53, -9.2, -8.5, -2.71, -9.09, 5.18 ], + "edges": [ 8, 6, 4, 6, 4, 2, 12, 14, 2, 0, 14, 0, 10, 12, 8, 10 ], + "hull": 8, + "width": 23, + "height": 50 + } + }, + "right foot": { + "right foot": { + "name": "goblin/right-foot", + "type": "mesh", + "uvs": [ 0.40851, 0.0047, 0.59087, 0.33404, 0.75959, 0.48311, 0.88907, 0.59751, 0.97532, 0.89391, 0.90385, 1, 0.6722, 1, 0.38633, 1, 0.08074, 1, 0, 0.88921, 0, 0.65984, 0, 0.46577, 0.0906, 0.0988, 0.305, 0, 0.47461, 0.71257, 0.715, 0.74681 ], + "triangles": [ 1, 10, 11, 1, 13, 0, 14, 1, 2, 1, 12, 13, 12, 1, 11, 14, 10, 1, 15, 14, 2, 15, 2, 3, 9, 10, 14, 15, 3, 4, 7, 8, 9, 14, 7, 9, 6, 14, 15, 5, 6, 15, 7, 14, 6, 4, 5, 15 ], + "vertices": [ 17.36, 25.99, 29.13, 15.44, 39.89, 10.8, 48.14, 7.24, 53.84, -2.38, 49.43, -6, 34.84, -6.39, 16.84, -6.87, -2.4, -7.38, -7.58, -3.86, -7.78, 3.7, -7.95, 10.1, -2.57, 22.36, 10.84, 25.97, 22.14, 2.75, 37.31, 2.03 ], + "edges": [ 0, 2, 6, 8, 8, 10, 16, 18, 22, 24, 24, 26, 0, 26, 10, 12, 2, 4, 4, 6, 12, 14, 14, 16, 18, 20, 20, 22, 2, 28, 28, 14, 20, 28, 4, 30, 30, 12, 28, 30, 30, 8 ], + "hull": 14, + "width": 63, + "height": 33 + } + }, + "right hand": { + "right hand": { + "name": "goblin/right-hand", + "type": "mesh", + "uvs": [ 0.17957, 0, 0, 0.44772, 0, 0.79734, 0.20057, 0.94264, 0.55057, 1, 0.8539, 1, 0.89823, 0.82004, 0.8259, 0.74285, 0.84223, 0.49993, 0.96356, 0.34102, 0.66023, 0 ], + "triangles": [ 8, 10, 9, 0, 10, 1, 8, 2, 1, 8, 1, 10, 7, 3, 8, 3, 2, 8, 4, 3, 7, 5, 7, 6, 4, 7, 5 ], + "vertices": [ -10.82, -9.45, 5.95, -15.34, 18.88, -14.9, 24, -7.5, 25.69, 5.16, 25.31, 16.07, 18.61, 17.44, 15.84, 14.74, 6.84, 15.02, 0.81, 19.18, -11.41, 7.83 ], + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 0, 20 ], + "hull": 11, + "width": 36, + "height": 37 + } + }, + "right hand thumb": { + "right hand thumb": { + "name": "goblin/right-hand", + "type": "mesh", + "uvs": [ 0.88538, 0.22262, 0.76167, 0.3594, 0.75088, 0.78308, 0.95326, 0.84981, 1, 0.60302 ], + "triangles": [ 1, 0, 4, 2, 1, 4, 3, 2, 4 ], + "vertices": [ -2.82, 15.97, 2.4, 11.71, 18.08, 11.9, 20.27, 19.27, 11.09, 20.62 ], + "edges": [ 2, 4, 4, 6, 6, 8, 2, 0, 0, 8 ], + "hull": 5, + "width": 36, + "height": 37 + } + }, + "right lower leg": { + "right lower leg": { + "name": "goblin/right-lower-leg", + "type": "mesh", + "uvs": [ 1, 0.27261, 0.81312, 0.52592, 0.79587, 0.71795, 0.95544, 0.80988, 0.85193, 0.95493, 0.47241, 1, 0.14033, 1, 0, 0.8773, 0.14896, 0.67914, 0.1619, 0.30325, 0.60611, 0 ], + "triangles": [ 1, 10, 0, 9, 10, 1, 8, 9, 1, 2, 8, 1, 4, 2, 3, 6, 7, 8, 5, 6, 8, 2, 5, 8, 4, 5, 2 ], + "vertices": [ 6.26, 8.46, 23.32, 8.04, 37.1, 12.89, 41.45, 20.82, 53.07, 21.46, 61.33, 10.06, 65.77, -1.03, 58.99, -9.19, 43.02, -9.81, 16.33, -20, -12.79, -9.26 ], + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 20, 18, 20 ], + "hull": 11, + "width": 36, + "height": 76 + } + }, + "right shoulder": { + "right shoulder": { + "name": "goblin/right-shoulder", + "type": "mesh", + "uvs": [ 0.62008, 0.03708, 0.92131, 0.09048, 1, 0.38319, 0.72049, 0.6937, 0.31656, 1, 0, 1, 0, 0.75106, 0.28233, 0.49988 ], + "triangles": [ 2, 3, 0, 2, 0, 1, 7, 0, 3, 4, 5, 6, 4, 7, 3, 4, 6, 7 ], + "vertices": [ -3.17, -11.05, -9, -0.57, -1.01, 10.33, 16.69, 11.17, 37.41, 8.2, 45.45, -1.16, 36.95, -8.46, 21.2, -7.47 ], + "edges": [ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, 6, 8, 10, 6, 8 ], + "hull": 8, + "width": 39, + "height": 45 + } + }, + "right upper leg": { + "right upper leg": { + "name": "goblin/right-upper-leg", + "type": "mesh", + "uvs": [ 0.27018, 0, 0.11618, 0.18177, 0, 0.70688, 0, 0.89577, 0.26668, 1, 0.48718, 1, 0.67618, 0.83532, 1, 0.5161, 1, 0.25543, 0.74618, 0.0571 ], + "triangles": [ 9, 8, 7, 9, 1, 0, 6, 9, 7, 6, 1, 9, 2, 1, 6, 4, 3, 2, 6, 4, 2, 5, 4, 6 ], + "vertices": [ -9.85, -10.37, 2.17, -14.07, 35.49, -13.66, 47.29, -12.11, 52.61, -2.26, 51.63, 5.16, 40.51, 10.18, 19.13, 18.47, 2.85, 16.32, -8.4, 6.14 ], + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18 ], + "hull": 10, + "width": 34, + "height": 63 + } + }, + "torso": { + "torso": { + "name": "goblin/torso", + "type": "mesh", + "uvs": [ 0, 0.33287, 0.15945, 0.46488, 0.15761, 0.60314, 0.15502, 0.79806, 0.32807, 0.93478, 0.6875, 1, 0.80731, 1, 1, 0.77763, 1, 0.66147, 1, 0.56703, 0.93207, 0.4771, 0.86944, 0.39416, 0.83837, 0.226, 0.68085, 0, 0.14836, 0, 0, 0.07199, 0.78734, 0.86249, 0.43679, 0.79649, 0.76738, 0.61733, 0.44345, 0.58747, 0.54329, 0.38316, 0.77692, 0.73446, 0.66478, 0.51012 ], + "triangles": [ 0, 15, 14, 20, 14, 13, 20, 13, 12, 1, 0, 14, 20, 12, 11, 20, 1, 14, 22, 20, 11, 22, 11, 10, 19, 1, 20, 19, 20, 22, 2, 1, 19, 18, 22, 10, 18, 10, 9, 19, 22, 18, 18, 9, 8, 21, 18, 8, 21, 8, 7, 17, 2, 19, 21, 17, 19, 21, 19, 18, 3, 2, 17, 16, 21, 7, 17, 21, 16, 4, 3, 17, 5, 17, 16, 4, 17, 5, 6, 16, 7, 5, 16, 6 ], + "vertices": [ 56.93, 27.95, 43.37, 18.23, 30.16, 19.5, 11.53, 21.28, -2.55, 10.69, -10.89, -13.12, -11.59, -21.23, 8.54, -36.12, 19.65, -37.08, 28.68, -37.86, 37.68, -34, 45.98, -30.44, 56.4, -29.07, 84.78, -20.92, 87.9, 15.15, 81.88, 25.79, 1.67, -21.01, 10.03, 2.18, 25.23, -18.25, 29.98, 0, 48.54, -8.39, 13.98, -21.36, 35.9, -15.6 ], + "edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 22, 24, 24, 26, 26, 28, 28, 30, 0, 30, 14, 32, 32, 34, 34, 6, 18, 36, 36, 38, 2, 4, 4, 6, 38, 4, 2, 40, 40, 22, 40, 38, 38, 34, 32, 10, 34, 8, 40, 28, 14, 16, 16, 18, 32, 42, 42, 36, 16, 42, 42, 34, 18, 20, 20, 22, 36, 44, 44, 40, 20, 44 ], + "hull": 16, + "width": 68, + "height": 96 + } + }, + "undie straps": { + "undie straps": { + "name": "goblin/undie-straps", + "type": "mesh", + "uvs": [ 0.36097, 0.44959, 0.66297, 0.60591, 1, 0.19486, 1, 0.57117, 0.75897, 1, 0.38697, 1, 0, 0.26433, 0, 0, 0.12497, 0 ], + "triangles": [ 6, 7, 8, 6, 8, 0, 3, 1, 2, 5, 0, 1, 6, 0, 5, 4, 1, 3, 5, 1, 4 ], + "vertices": [ -10.56, 12.87, 6.53, 9.9, 25.62, 17.71, 25.62, 10.56, 11.97, 2.41, -9.09, 2.41, -31, 16.39, -31, 21.41, -23.92, 21.41 ], + "edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 12, 14, 10, 12, 0, 10, 2, 8 ], + "hull": 9, + "width": 55, + "height": 19 + } + }, + "undies": { + "undies": { + "name": "goblin/undies", + "type": "mesh", + "uvs": [ 0, 0.32029, 0.14893, 0.59457, 0.22437, 1, 0.35909, 1, 0.50998, 1, 0.79559, 0.58453, 0.9842, 0.28015, 1, 0.00588, 0.46957, 0.17646, 0, 0.03933, 0.48843, 0.59122, 0.48114, 0.43099 ], + "triangles": [ 6, 8, 7, 0, 9, 8, 11, 8, 6, 0, 8, 11, 5, 11, 6, 10, 11, 5, 1, 0, 11, 1, 11, 10, 3, 2, 1, 10, 3, 1, 4, 10, 5, 3, 10, 4 ], + "vertices": [ -13.22, 5.56, -8, -2.47, -5.49, -14.27, -0.64, -14.36, 4.78, -14.45, 15.27, -2.59, 22.22, 6.11, 22.92, 14.05, 3.75, 9.44, -13.08, 13.71, 4.21, -2.59, 4.03, 2.05 ], + "edges": [ 0, 2, 2, 4, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 4, 6, 6, 8, 6, 20, 16, 22, 22, 20, 0, 22, 22, 12, 2, 20, 20, 10 ], + "hull": 10, + "width": 36, + "height": 29 + } + } + }, + "goblingirl": { + "eyes": { + "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } + }, + "head": { + "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } + }, + "left arm": { + "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } + }, + "left foot": { + "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblingirl/left-hand", + "x": 4.34, + "y": 2.39, + "scaleX": 0.896, + "scaleY": 0.896, + "rotation": 30.34, + "width": 35, + "height": 40 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } + }, + "left upper leg": { + "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } + }, + "neck": { + "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right hand thumb": { + "right hand thumb": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right lower leg": { + "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } + } + } +}, +"animations": { + "walk": { + "slots": { + "eyes": { + "attachment": [ + { "time": 0.7, "name": "eyes closed" }, + { "time": 0.8, "name": null } + ] + } + }, + "bones": { + "left upper leg": { + "rotate": [ + { "time": 0, "angle": -26.55 }, + { "time": 0.1333, "angle": -8.78 }, + { "time": 0.2333, "angle": 9.51 }, + { "time": 0.3666, "angle": 30.74 }, + { "time": 0.5, "angle": 25.33 }, + { "time": 0.6333, "angle": 26.11 }, + { "time": 0.7333, "angle": 7.45 }, + { "time": 0.8666, "angle": -21.19 }, + { "time": 1, "angle": -26.55 } + ], + "translate": [ + { "time": 0, "x": -1.32, "y": 1.7 }, + { "time": 0.3666, "x": -0.06, "y": 2.42 }, + { "time": 1, "x": -1.32, "y": 1.7 } + ] + }, + "right upper leg": { + "rotate": [ + { "time": 0, "angle": 42.45 }, + { + "time": 0.1333, + "angle": 49.86, + "curve": [ 0.414, 0, 0.705, 0.99 ] + }, + { "time": 0.2333, "angle": 22.51 }, + { "time": 0.5, "angle": -16.93 }, + { "time": 0.6333, "angle": 1.89 }, + { + "time": 0.7333, + "angle": 34.86, + "curve": [ 0.462, 0.11, 1, 1 ] + }, + { + "time": 0.8666, + "angle": 58.68, + "curve": [ 0.5, 0.02, 1, 1 ] + }, + { "time": 1, "angle": 42.45 } + ], + "translate": [ + { "time": 0, "x": 6.23, "y": 0 }, + { "time": 0.2333, "x": 2.14, "y": 2.4 }, + { "time": 0.5, "x": 2.44, "y": 4.8 }, + { "time": 1, "x": 6.23, "y": 0 } + ] + }, + "left lower leg": { + "rotate": [ + { "time": 0, "angle": -18.05 }, + { "time": 0.1333, "angle": -63.5 }, + { "time": 0.2333, "angle": -83.01 }, + { "time": 0.5, "angle": 5.11 }, + { "time": 0.6333, "angle": -28.29 }, + { "time": 0.7333, "angle": -27.52 }, + { "time": 0.8666, "angle": 3.53 }, + { "time": 1, "angle": -18.05 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2333, "x": 2.55, "y": -0.47 }, + { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "left foot": { + "rotate": [ + { "time": 0, "angle": -14.56 }, + { "time": 0.1333, "angle": -10.42 }, + { "time": 0.2333, "angle": -5.01 }, + { "time": 0.3, "angle": 6.67 }, + { "time": 0.3666, "angle": 3.87 }, + { "time": 0.5, "angle": -3.87 }, + { "time": 0.6333, "angle": 2.78 }, + { "time": 0.7333, "angle": -11.99 }, + { "time": 0.8666, "angle": -12.45 }, + { "time": 1, "angle": -14.56 } + ] + }, + "right shoulder": { + "rotate": [ + { + "time": 0, + "angle": 5.29, + "curve": [ 0.264, 0, 0.75, 1 ] + }, + { "time": 0.6333, "angle": 6.65 }, + { "time": 1, "angle": 5.29 } + ] + }, + "right arm": { + "rotate": [ + { + "time": 0, + "angle": -4.02, + "curve": [ 0.267, 0, 0.804, 0.99 ] + }, + { + "time": 0.6333, + "angle": 19.78, + "curve": [ 0.307, 0, 0.787, 0.99 ] + }, + { "time": 1, "angle": -4.02 } + ] + }, + "right hand": { + "rotate": [ + { "time": 0, "angle": 8.98 }, + { "time": 0.6333, "angle": 0.51 }, + { "time": 1, "angle": 8.98 } + ] + }, + "left shoulder": { + "rotate": [ + { + "time": 0, + "angle": 6.25, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": -11.78, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 6.25 } + ], + "translate": [ + { "time": 0, "x": 1.15, "y": 0.23 } + ] + }, + "left hand": { + "rotate": [ + { + "time": 0, + "angle": -21.23, + "curve": [ 0.295, 0, 0.755, 0.98 ] + }, + { + "time": 0.5, + "angle": -27.28, + "curve": [ 0.241, 0, 0.75, 0.97 ] + }, + { "time": 1, "angle": -21.23 } + ] + }, + "left arm": { + "rotate": [ + { + "time": 0, + "angle": 28.37, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": 60.09, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 28.37 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -10.28 }, + { + "time": 0.1333, + "angle": -15.38, + "curve": [ 0.545, 0, 0.818, 1 ] + }, + { + "time": 0.3666, + "angle": -9.78, + "curve": [ 0.58, 0.17, 0.669, 0.99 ] + }, + { + "time": 0.6333, + "angle": -15.75, + "curve": [ 0.235, 0.01, 0.795, 1 ] + }, + { + "time": 0.8666, + "angle": -7.06, + "curve": [ 0.209, 0, 0.816, 0.98 ] + }, + { "time": 1, "angle": -10.28 } + ], + "translate": [ + { "time": 0, "x": -3.72, "y": -0.01 } + ] + }, + "right foot": { + "rotate": [ + { "time": 0, "angle": -5.25 }, + { "time": 0.2333, "angle": -17.76 }, + { "time": 0.3666, "angle": -20.09 }, + { "time": 0.5, "angle": -19.73 }, + { "time": 0.7333, "angle": -11.68 }, + { "time": 0.8, "angle": 4.46 }, + { "time": 0.8666, "angle": 0.46 }, + { "time": 1, "angle": -5.25 } + ] + }, + "right lower leg": { + "rotate": [ + { + "time": 0, + "angle": -3.39, + "curve": [ 0.316, 0.01, 0.741, 0.98 ] + }, + { + "time": 0.1333, + "angle": -43.21, + "curve": [ 0.414, 0, 0.705, 0.99 ] + }, + { "time": 0.2333, "angle": -25.98 }, + { "time": 0.5, "angle": -19.53 }, + { "time": 0.6333, "angle": -64.8 }, + { + "time": 0.7333, + "angle": -89.54, + "curve": [ 0.557, 0.18, 1, 1 ] + }, + { "time": 1, "angle": -3.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.6333, "x": 2.18, "y": 0.21 }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": -8.4 }, + { + "time": 0.1333, + "x": 0, + "y": -9.35, + "curve": [ 0.326, 0.05, 0.674, 0.93 ] + }, + { + "time": 0.2333, + "x": 0, + "y": -0.59, + "curve": [ 0.325, 0.39, 0.643, 0.7 ] + }, + { "time": 0.3666, "x": 0, "y": -3.96 }, + { "time": 0.5, "x": 0, "y": -8.4 }, + { + "time": 0.6333, + "x": 0, + "y": -10, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { + "time": 0.7333, + "x": 0, + "y": -5.29, + "curve": [ 0.333, 0.36, 0.662, 0.69 ] + }, + { + "time": 0.8, + "x": 0, + "y": -2.49, + "curve": [ 0.322, 0.35, 0.651, 0.68 ] + }, + { "time": 0.8666, "x": 0, "y": -3.96 }, + { "time": 1, "x": 0, "y": -8.4 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 3.6 }, + { "time": 0.1333, "angle": 17.49 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { "time": 0.5, "angle": 5.17 }, + { "time": 0.6333, "angle": 18.36 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": 3.6, + "curve": [ 0, 0, 0.704, 1.17 ] + }, + { "time": 0.1333, "angle": -0.2 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { + "time": 0.5, + "angle": 5.17, + "curve": [ 0, 0, 0.704, 1.61 ] + }, + { "time": 0.6666, "angle": 1.1 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "pelvis": { + "rotate": [ + { "time": 0, "angle": -1.33 } + ], + "translate": [ + { "time": 0, "x": 0.39, "y": -0.78 } + ] + }, + "spear1": { + "rotate": [ + { "time": 0, "angle": 1.84 }, + { "time": 0.2, "angle": -5.38 }, + { "time": 0.5, "angle": 2.95 }, + { "time": 0.7333, "angle": -3.67 }, + { "time": 1, "angle": 1.84 } + ] + }, + "spear2": { + "rotate": [ + { "time": 0, "angle": 1.84 }, + { "time": 0.2, "angle": -5.38 }, + { "time": 0.5, "angle": 2.95 }, + { "time": 0.7333, "angle": -3.67 }, + { "time": 1, "angle": 1.84 } + ] + }, + "spear3": { + "rotate": [ + { "time": 0, "angle": 3.64 }, + { "time": 0.2, "angle": -3.59 }, + { "time": 0.5, "angle": 4.74 }, + { "time": 0.7333, "angle": -1.87 }, + { "time": 1, "angle": 3.64 } + ] + } + }, + "ffd": { + "default": { + "left hand item": { + "spear": [ + { "time": 0 } + ] + }, + "right hand item": { + "dagger": [ + { + "time": 0, + "offset": 26, + "vertices": [ 2.34, 0.14 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.5, + "offset": 8, + "vertices": [ -1.19, 4.31, 0.07, 6.41, 1.66, 6.18, 1.75, 3.59 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1, + "offset": 26, + "vertices": [ 2.34, 0.14 ] + } + ] + } + }, + "goblin": { + "head": { + "head": [ + { + "time": 0, + "curve": [ 0.632, 0, 0.75, 1 ] + }, + { + "time": 0.2, + "vertices": [ -10.97, -6.68, -4.68, -2.46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08, 0.08, -1.08, 0.08, -1.08, 0.08, 0, 0, -2.22, 2.66, -4.83, 2.7, -5.7, -0.51, -3.15, -1.61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64, 0.81, -11.82, -1.34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08, 0.08 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.3666, + "vertices": [ 10.69, 4.05, 3.66, 1.85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47, 0.09, 1.47, 0.09, 1.47, 0.09, 0, 0, 2.69, -0.22, 3.77, 0.11, 3.68, 1.55, 2.49, 1.65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45, -3.91, 9.19, -1.66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47, 0.09 ], + "curve": [ 0.621, 0, 0.75, 1 ] + }, + { + "time": 0.7, + "vertices": [ -10.97, -6.68, -4.68, -2.46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17, -0.17, -1.17, -0.17, -1.17, -0.17, 0, 0, -2.22, 2.66, -4.83, 2.7, -5.7, -0.51, -3.15, -1.61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64, 0.81, -11.82, -1.34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17, -0.17 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.8666, + "vertices": [ 10.69, 4.05, 3.66, 1.85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38, 0.08, 0.38, 0.08, 0.38, 0.08, 0, 0, 2.69, -0.22, 3.77, 0.11, 3.68, 1.55, 2.49, 1.65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45, -3.91, 9.19, -1.66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38, 0.08 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1 } + ] + }, + "left foot": { + "left foot": [ + { + "time": 0, + "offset": 8, + "vertices": [ 3.69, 2.37, -7.16, 18.79, -12.78, 14.77, -12.75, 6.5, -3.13, 1.98, -0.44, 0.36, 0, 0, -3.8, 2.98 ] + }, + { "time": 0.1333 }, + { + "time": 0.2333, + "offset": 8, + "vertices": [ -3.96, -2.34, -5.8, -12.47, -2.23, -12.99, 2.02, -9.1, 0, 0, 0, 0, 0, 0, -1.35, -5.28 ] + }, + { + "time": 0.3666, + "offset": 8, + "vertices": [ 0.66, 0.33, 0.33, 2.69, -0.48, 2.54, -1.13, 1.38, 0, 0, 0, 0, 0, 0, -0.11, 0.79 ] + }, + { "time": 0.5, "curve": "stepped" }, + { "time": 0.6333 }, + { + "time": 0.7333, + "offset": 8, + "vertices": [ -2.97, 9.4, -6.91, 19.92, -10.55, 18.41, -12.37, 12.38, -4.72, 6.3, 0, 0, -1.48, 4.88, -7.06, 10.7 ] + }, + { + "time": 0.8333, + "offset": 6, + "vertices": [ 1.05, 1.56, -2.52, 7.99, -5.52, 17.14, -8.93, 15.79, -10.73, 10.22, -4.23, 5.36, 0, 0, 0, 0, -5.83, 8.55 ] + }, + { + "time": 1, + "offset": 8, + "vertices": [ 3.69, 2.37, -7.16, 18.79, -12.78, 14.77, -12.75, 6.5, -3.13, 1.98, -0.44, 0.36, 0, 0, -3.8, 2.98 ] + } + ] + }, + "pelvis": { + "pelvis": [ + { "time": 0 }, + { + "time": 0.1333, + "offset": 6, + "vertices": [ -0.68, -4.13 ] + }, + { + "time": 0.3333, + "offset": 6, + "vertices": [ -1.04, -3.1 ] + }, + { + "time": 0.7, + "offset": 6, + "vertices": [ -1.42, -6.3 ] + }, + { + "time": 0.8666, + "offset": 6, + "vertices": [ -1.13, -1.79 ] + }, + { "time": 1 } + ] + }, + "right foot": { + "right foot": [ + { "time": 0 }, + { + "time": 0.1333, + "offset": 2, + "vertices": [ -2.81, 2.63, -2.35, 3.89, -1.99, 4.86, -0.93, 5.57, -0.48, 5.09, -0.34, 3.42, -0.17, 1.36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.31, 1.91, -1.32, 3.65 ] + }, + { + "time": 0.2333, + "offset": 2, + "vertices": [ -6.39, 6.41, -7.74, 8.27, -7.02, 11.35, -4.03, 13.93, -2.5, 12.62, -1.46, 7.58, -0.17, 1.36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.84, 2.61, -4.53, 7.92 ] + }, + { + "time": 0.3, + "offset": 2, + "vertices": [ -8.27, 6.68, -9.29, 10.13, -8.62, 14.71, -4.58, 18.81, -2.2, 17.1, -0.07, 9.9, 2.54, 1.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94, 2.38, -4.59, 10.01 ] + }, + { + "time": 0.3666, + "offset": 2, + "vertices": [ -10.47, 9.44, -13.36, 12.4, -14.32, 16.94, -9.24, 23.55, -5.51, 21.51, -1.19, 11.53, 2.54, 1.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.14, 2.29, -6.63, 11.37 ] + }, + { + "time": 0.5, + "offset": 2, + "vertices": [ -5.42, 4.36, -10.59, 7.04, -11.64, 11.55, -6.19, 20.12, -1.45, 18.05, 4.86, 6.41, 2.81, 0.27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.96, 4.94 ] + }, + { "time": 0.6333 }, + { + "time": 0.7333, + "offset": 4, + "vertices": [ 1.31, -6.84, -0.87, -12.54, -5.98, -14.08, -7.15, -11.63, -5.67, -4.83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06, -6.93 ] + }, + { + "time": 0.8, + "offset": 4, + "vertices": [ 0.65, -3.42, -0.43, -6.27, -2.99, -7.04, -3.57, -5.81, -2.83, -2.41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79, -1.28, 0, 0, 0, 0, -1.03, -3.46 ] + }, + { "time": 0.8666 } + ] + }, + "right hand": { + "right hand": [ + { + "time": 0, + "offset": 4, + "vertices": [ -1.48, 0.34, 0, 0, 1.31, 0.08, 1.6, 0.09, 0.13, 0.15, 0, 0, 0, 0, -0.72, -0.04 ] + }, + { "time": 0.5 }, + { + "time": 1, + "offset": 4, + "vertices": [ -1.48, 0.34, 0, 0, 1.31, 0.08, 1.6, 0.09, 0.13, 0.15, 0, 0, 0, 0, -0.72, -0.04 ] + } + ] + }, + "right lower leg": { + "right lower leg": [ + { "time": 0 }, + { + "time": 0.6, + "offset": 6, + "vertices": [ 1.8, -1.56 ] + }, + { "time": 1 } + ] + }, + "right upper leg": { + "right upper leg": [ + { + "time": 0, + "vertices": [ -6.03, -1.46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34, -1.93, -1.86, -5.05, -2.5, -3.09 ] + }, + { "time": 0.3333 }, + { + "time": 0.8666, + "offset": 14, + "vertices": [ 0.13, -2.35, -1.33, -5.99, -1.35, -4.43 ] + }, + { + "time": 1, + "vertices": [ -6.03, -1.46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34, -1.93, -1.86, -5.05, -2.5, -3.09 ] + } + ] + }, + "torso": { + "torso": [ + { + "time": 0, + "offset": 14, + "vertices": [ -1.48, -0.24, -2.72, -2.15, -0.51, -3.39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.09, -2.61, 0, 0, 0.57, -1.24, 0, 0, 0, 0, -2.11, -3.29 ] + }, + { + "time": 0.1333, + "offset": 14, + "vertices": [ 1.31, -0.59, -0.97, -1.62, 0.74, -0.61, -1.44, 1.97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.65, -3.95, 0, 0, -1.46, -0.31, 0, 0, 0, 0, -3.31, -3.55, -2.56, 0.29 ] + }, + { + "time": 0.3, + "offset": 14, + "vertices": [ 6.03, -3.13, 7.55, -1.38, 6.79, 0.31, 4.23, 1.14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.07, -5.16, 0, 0, 4, 0.27, 0, 0, 0, 0, 3.43, -3.52 ] + }, + { + "time": 0.5, + "offset": 14, + "vertices": [ 2.25, -0.87, 2.57, -0.56, 3.17, -0.57, 1.48, 0.99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.22, -4.43, 0, 0, 1.48, 0.01, 0, 0, 0, 0, 0.31, -3.28, -1.53, 0.17 ] + }, + { + "time": 0.6333, + "offset": 14, + "vertices": [ 0.75, -1.51, -0.97, -1.62, 0.74, -0.61, -1.44, 1.97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.65, -3.95, 0, 0, -1.46, -0.31, 0, 0, 0, 0, -3.31, -3.55, -2.56, 0.29 ] + }, + { + "time": 0.8666, + "offset": 14, + "vertices": [ 0.62, -1.26, 0.38, -2.2, 3.25, -0.5, 2.41, 2.39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.66, -3.1, 0, 0, 2.3, -1.15, 0, 0, 0, 0, -0.07, -3.63, -0.93, 0.1 ] + }, + { + "time": 1, + "offset": 14, + "vertices": [ -1.48, -0.24, -2.72, -2.15, -0.51, -3.39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.09, -2.61, 0, 0, 0.57, -1.24, 0, 0, 0, 0, -2.11, -3.29 ] + } + ] + }, + "undie straps": { + "undie straps": [ + { + "time": 0, + "offset": 2, + "vertices": [ -1.77, 0.54, -0.96, -1.03, -0.39, -0.24, -1.77, 0.54 ] + }, + { + "time": 0.1333, + "offset": 2, + "vertices": [ -2.25, -1.03, -1.49, -4.23, -0.74, -2.84, -1.9, 0.54 ] + }, + { + "time": 0.3333, + "offset": 2, + "vertices": [ -2.37, -0.05, -0.49, 0.19, -0.9, 1.16, -1.6, 2.7, 0.96, 0.8 ] + }, + { + "time": 0.7, + "offset": 2, + "vertices": [ -0.91, -2.76, -0.62, -3.63, -0.84, -2.26, -2.56, 0.52 ] + }, + { + "time": 0.8666, + "offset": 2, + "vertices": [ -2.56, 0.52, -1.58, 0.32, -1.38, 0.32, -2.56, 0.52 ] + }, + { + "time": 1, + "offset": 2, + "vertices": [ -1.77, 0.54, -0.8, 0.53, -0.8, 0.53, -1.77, 0.54 ] + } + ] + }, + "undies": { + "undies": [ + { + "time": 0, + "vertices": [ 0.43, 0.72, 10.6, -0.11, 2.29, 0, 2.29, 0, 2.29, 0, 0.58, 0.24, -2.4, -0.65, -2.27, -0.77, 2.29, 0, 0.58, -0.48, 4.98, -0.11, 6.5, -0.23 ] + }, + { + "time": 0.1333, + "vertices": [ 0.72, 0.43, 7.2, -0.16, 1.37, 0, 1.37, 0, 1.37, 0, 1.25, 0.04, -0.99, -2.95, -1.37, -3.07, 1.37, 0, 0.35, -0.29, 2.99, -0.07, 3.9, -0.14 ] + }, + { + "time": 0.3333, + "vertices": [ 1.16, 0, 2.1, -0.23, 0, 0, 0, 0, 0, 0, 2.24, -0.24, -0.43, 0.6, -1.55, 0.48 ] + }, + { + "time": 0.5333, + "vertices": [ 1.16, 0, -0.23, -0.93, -2.92, 0.35, 0, 0, 0, 0, 0.49, -0.24, -0.64, -2.07, -0.64, -2.07 ] + }, + { + "time": 0.7, + "vertices": [ 1.86, -0.11, 4.66, -0.09, -1.76, 0.21, 0, 0, -0.56, 0.32, -1.13, -1.15, -2.19, -3.47, -1.29, -3.47, 0, 0, 0, 0, 1.58, -0.04, 2.65, 0.16 ] + }, + { + "time": 0.8333, + "vertices": [ 2.41, -0.2, 8.58, 0.58, -0.83, 0.1, 0, 0, -1.02, 0.59, -2.44, -1.87, -1.62, 0, 0, 0, 0, 0, 0, 0, 2.85, -0.08, 4.78, 0.3 ] + }, + { + "time": 0.8666, + "vertices": [ 2.01, -0.02, 8.98, 0.44, -0.2, 0.08, 0.45, 0, -0.35, 0.47, -1.84, -1.44, -0.79, 1.26, 0.53, 1.23, 0.45, 0, 0.11, -0.09, 3.28, -0.09, 5.13, 0.19 ] + }, + { + "time": 1, + "vertices": [ 0.43, 0.72, 10.6, -0.11, 2.29, 0, 2.29, 0, 2.29, 0, 0.58, 0.24, -2.4, -0.65, -2.27, -0.77, 2.29, 0, 0.58, -0.48, 4.98, -0.11, 6.5, -0.23 ] + } + ] + } + } + } + } +} +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/spine/goblins-ffd.png b/tests/cpp-tests/Resources/spine/goblins-ffd.png new file mode 100644 index 0000000000..f172361f2b Binary files /dev/null and b/tests/cpp-tests/Resources/spine/goblins-ffd.png differ diff --git a/tests/cpp-tests/Resources/spine/spineboy.atlas b/tests/cpp-tests/Resources/spine/spineboy.atlas old mode 100755 new mode 100644 index 1f482c0a1d..19c0934b10 --- a/tests/cpp-tests/Resources/spine/spineboy.atlas +++ b/tests/cpp-tests/Resources/spine/spineboy.atlas @@ -3,164 +3,192 @@ spineboy.png format: RGBA8888 filter: Linear,Linear repeat: none +eye_indifferent + rotate: true + xy: 389, 5 + size: 56, 53 + orig: 56, 53 + offset: 0, 0 + index: -1 +eye_surprised + rotate: false + xy: 580, 34 + size: 56, 53 + orig: 56, 53 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 732, 85 + size: 35, 48 + orig: 35, 48 + offset: 0, 0 + index: -1 +front_fist_closed + rotate: false + xy: 556, 91 + size: 45, 49 + orig: 45, 49 + offset: 0, 0 + index: -1 +front_fist_open + rotate: false + xy: 668, 32 + size: 52, 52 + orig: 52, 52 + offset: 0, 0 + index: -1 +front_foot + rotate: false + xy: 924, 201 + size: 76, 41 + orig: 76, 41 + offset: 0, 0 + index: -1 +front_foot_bend1 + rotate: false + xy: 845, 200 + size: 77, 42 + orig: 77, 42 + offset: 0, 0 + index: -1 +front_foot_bend2 + rotate: false + xy: 778, 186 + size: 65, 56 + orig: 65, 56 + offset: 0, 0 + index: -1 +front_shin + rotate: true + xy: 444, 91 + size: 49, 110 + orig: 49, 110 + offset: 0, 0 + index: -1 +front_thigh + rotate: true + xy: 603, 89 + size: 29, 67 + orig: 29, 67 + offset: 0, 0 + index: -1 +front_upper_arm + rotate: true + xy: 672, 86 + size: 32, 58 + orig: 32, 58 + offset: 0, 0 + index: -1 +goggles + rotate: false + xy: 444, 142 + size: 157, 100 + orig: 157, 100 + offset: 0, 0 + index: -1 +gun + rotate: false + xy: 603, 120 + size: 126, 122 + orig: 126, 122 + offset: 0, 0 + index: -1 head rotate: false - xy: 1, 122 - size: 121, 132 - orig: 121, 132 + xy: 279, 63 + size: 163, 179 + orig: 163, 179 offset: 0, 0 index: -1 -torso +mouth_grind rotate: false - xy: 1, 28 - size: 68, 92 - orig: 68, 92 + xy: 845, 163 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -left-pant-bottom +mouth_oooo rotate: false - xy: 1, 4 - size: 44, 22 - orig: 44, 22 + xy: 842, 126 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -right-pant-bottom +mouth_smile rotate: false - xy: 47, 8 - size: 46, 18 - orig: 46, 18 + xy: 769, 97 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -right-upper-leg +muzzle rotate: false - xy: 71, 50 - size: 44, 70 - orig: 44, 70 - offset: 0, 0 - index: -1 -pelvis - rotate: false - xy: 95, 1 - size: 63, 47 - orig: 63, 47 - offset: 0, 0 - index: -1 -left-upper-leg - rotate: false - xy: 117, 53 - size: 33, 67 - orig: 33, 67 - offset: 0, 0 - index: -1 -right-foot - rotate: false - xy: 160, 224 - size: 67, 30 - orig: 67, 30 - offset: 0, 0 - index: -1 -left-shoulder - rotate: false - xy: 124, 201 - size: 34, 53 - orig: 34, 53 - offset: 0, 0 - index: -1 -left-ankle - rotate: false - xy: 229, 222 - size: 25, 32 - orig: 25, 32 - offset: 0, 0 - index: -1 -left-foot - rotate: false - xy: 160, 192 - size: 65, 30 - orig: 65, 30 + xy: 2, 2 + size: 275, 240 + orig: 277, 240 offset: 0, 0 index: -1 neck rotate: false - xy: 124, 171 - size: 34, 28 - orig: 34, 28 + xy: 903, 173 + size: 22, 25 + orig: 22, 25 offset: 0, 0 index: -1 -right-arm +rear_bracer rotate: false - xy: 124, 124 - size: 21, 45 - orig: 21, 45 + xy: 722, 40 + size: 34, 43 + orig: 34, 43 offset: 0, 0 index: -1 -right-ankle +rear_foot rotate: false - xy: 227, 190 - size: 25, 30 - orig: 25, 30 + xy: 444, 11 + size: 68, 36 + orig: 68, 36 offset: 0, 0 index: -1 -left-hand +rear_foot_bend1 rotate: false - xy: 147, 131 - size: 35, 38 - orig: 35, 38 + xy: 444, 49 + size: 70, 40 + orig: 70, 40 offset: 0, 0 index: -1 -left-arm +rear_foot_bend2 rotate: false - xy: 184, 161 - size: 35, 29 - orig: 35, 29 + xy: 778, 134 + size: 62, 50 + orig: 62, 50 offset: 0, 0 index: -1 -eyes-closed +rear_shin rotate: false - xy: 221, 161 - size: 34, 27 - orig: 34, 27 + xy: 731, 135 + size: 45, 107 + orig: 45, 107 offset: 0, 0 index: -1 -right-lower-leg +rear_thigh + rotate: true + xy: 516, 50 + size: 39, 62 + orig: 39, 62 + offset: 0, 0 + index: -1 +rear_upper_arm rotate: false - xy: 152, 65 - size: 51, 64 - orig: 51, 64 + xy: 638, 35 + size: 28, 52 + orig: 28, 52 offset: 0, 0 index: -1 -right-foot-idle - rotate: false - xy: 184, 131 - size: 53, 28 - orig: 53, 28 - offset: 0, 0 - index: -1 -left-lower-leg - rotate: false - xy: 205, 65 - size: 49, 64 - orig: 49, 64 - offset: 0, 0 - index: -1 -right-shoulder - rotate: false - xy: 160, 12 - size: 52, 51 - orig: 52, 51 - offset: 0, 0 - index: -1 -eyes - rotate: false - xy: 214, 36 - size: 34, 27 - orig: 34, 27 - offset: 0, 0 - index: -1 -right-hand - rotate: false - xy: 214, 2 - size: 32, 32 - orig: 32, 32 +torso + rotate: true + xy: 279, 2 + size: 59, 108 + orig: 59, 108 offset: 0, 0 index: -1 diff --git a/tests/cpp-tests/Resources/spine/spineboy.json b/tests/cpp-tests/Resources/spine/spineboy.json old mode 100755 new mode 100644 index 113e72c335..1ffa7aad57 --- a/tests/cpp-tests/Resources/spine/spineboy.json +++ b/tests/cpp-tests/Resources/spine/spineboy.json @@ -1,999 +1,2409 @@ { "bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, - { "name": "right upper leg", "parent": "hip", "length": 45.76, "x": -18.27, "rotation": -101.13 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 56.45, "x": 51.78, "y": 3.46, "rotation": -16.65 }, - { "name": "left shoulder", "parent": "torso", "length": 44.19, "x": 78.96, "y": -15.75, "rotation": -156.96 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 83.64, "y": -1.78, "rotation": 0.9 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 50.21, "y": 0.6, "rotation": -10.7 }, - { "name": "right shoulder", "parent": "torso", "length": 49.95, "x": 81.9, "y": 6.79, "rotation": 130.6 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 19.09, "y": 6.97, "rotation": -8.94 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 44.19, "y": -0.01, "rotation": 28.16 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 64.02, "y": -8.67, "rotation": 102.43 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 49.95, "y": -0.12, "rotation": 40.12 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } + { "name": "hip", "y": 247.47 }, + { "name": "front_thigh", "parent": "hip", "length": 74.8, "x": -17.45, "y": -11.64, "rotation": -95.51, "color": "00ff04ff" }, + { "name": "rear_thigh", "parent": "hip", "length": 85.71, "x": 8.91, "y": -5.62, "rotation": -72.54, "color": "ff000dff" }, + { "name": "torso", "parent": "hip", "length": 127.55, "x": -1.61, "y": 4.9, "rotation": 103.82, "color": "e0da19ff" }, + { + "name": "front_shin", + "parent": "front_thigh", + "length": 128.76, + "x": 78.69, + "y": 1.6, + "rotation": -2.21, + "inheritScale": false, + "color": "00ff04ff" + }, + { "name": "front_upper_arm", "parent": "torso", "length": 69.45, "x": 103.75, "y": 19.32, "rotation": 168.37, "color": "00ff04ff" }, + { "name": "neck", "parent": "torso", "length": 25.45, "x": 127.49, "y": -0.3, "rotation": -31.53, "color": "e0da19ff" }, + { "name": "rear_shin", "parent": "rear_thigh", "length": 121.87, "x": 86.1, "y": -1.32, "rotation": -19.83, "color": "ff000dff" }, + { "name": "rear_upper_arm", "parent": "torso", "length": 51.93, "x": 92.35, "y": -19.22, "rotation": -169.55, "color": "ff000dff" }, + { + "name": "front_bracer", + "parent": "front_upper_arm", + "length": 40.57, + "x": 68.8, + "y": -0.68, + "rotation": 18.29, + "color": "00ff04ff" + }, + { "name": "front_foot", "parent": "front_shin", "length": 91.34, "x": 128.75, "y": -0.33, "rotation": 77.9, "color": "00ff04ff" }, + { "name": "head", "parent": "neck", "length": 263.57, "x": 27.66, "y": -0.25, "rotation": 23.18, "color": "e0da19ff" }, + { "name": "rear_bracer", "parent": "rear_upper_arm", "length": 34.55, "x": 51.35, "rotation": 23.15, "color": "ff000dff" }, + { "name": "rear_foot", "parent": "rear_shin", "length": 82.57, "x": 121.45, "y": -0.75, "rotation": 69.3, "color": "ff000dff" }, + { "name": "front_fist", "parent": "front_bracer", "length": 65.38, "x": 40.56, "y": 0.19, "rotation": 12.43, "color": "00ff04ff" }, + { "name": "gun", "parent": "rear_bracer", "length": 43.1, "x": 34.42, "y": -0.45, "rotation": 5.34, "color": "ff000dff" }, + { "name": "gunTip", "parent": "gun", "x": 201.04, "y": 52.13, "rotation": 6.83, "color": "ff000dff" } ], "slots": [ - { "name": "left shoulder", "bone": "left shoulder", "attachment": "left-shoulder" }, - { "name": "left arm", "bone": "left arm", "attachment": "left-arm" }, - { "name": "left hand", "bone": "left hand", "attachment": "left-hand" }, - { "name": "left foot", "bone": "left foot", "attachment": "left-foot" }, - { "name": "left lower leg", "bone": "left lower leg", "attachment": "left-lower-leg" }, - { "name": "left upper leg", "bone": "left upper leg", "attachment": "left-upper-leg" }, - { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, - { "name": "right foot", "bone": "right foot", "attachment": "right-foot" }, - { "name": "right lower leg", "bone": "right lower leg", "attachment": "right-lower-leg" }, - { "name": "right upper leg", "bone": "right upper leg", "attachment": "right-upper-leg" }, - { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "rear_upper_arm", "bone": "rear_upper_arm", "attachment": "rear_upper_arm" }, + { "name": "rear_bracer", "bone": "rear_bracer", "attachment": "rear_bracer" }, + { "name": "gun", "bone": "gun", "attachment": "gun" }, + { "name": "rear_foot", "bone": "rear_foot", "attachment": "rear_foot" }, + { "name": "rear_thigh", "bone": "rear_thigh", "attachment": "rear_thigh" }, + { "name": "rear_shin", "bone": "rear_shin", "attachment": "rear_shin" }, { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "front_upper_arm", "bone": "front_upper_arm", "attachment": "front_upper_arm" }, { "name": "head", "bone": "head", "attachment": "head" }, - { "name": "eyes", "bone": "head", "attachment": "eyes" }, - { "name": "right shoulder", "bone": "right shoulder", "attachment": "right-shoulder", "additive": true }, - { "name": "right arm", "bone": "right arm", "attachment": "right-arm" }, - { "name": "right hand", "bone": "right hand", "attachment": "right-hand" }, - { "name": "bb-head", "bone": "head", "attachment": "bb-head" } + { "name": "eye", "bone": "head", "attachment": "eye_indifferent" }, + { "name": "front_thigh", "bone": "front_thigh", "attachment": "front_thigh" }, + { "name": "front_foot", "bone": "front_foot", "attachment": "front_foot" }, + { "name": "front_shin", "bone": "front_shin", "attachment": "front_shin" }, + { "name": "mouth", "bone": "head", "attachment": "mouth_smile" }, + { "name": "goggles", "bone": "head", "attachment": "goggles" }, + { "name": "front_bracer", "bone": "front_bracer", "attachment": "front_bracer" }, + { "name": "front_fist", "bone": "front_fist", "attachment": "front_fist_closed" }, + { "name": "muzzle", "bone": "gunTip", "additive": true } ], "skins": { "default": { - "bb-head": { - "bb-head": { - "type": "boundingbox", - "vertices": [ - 55.69696, - -44.60648, - 8.2226715, - -47.609646, - -11.244263, - -32.942703, - -0.05206299, - 35.835804, - 61.018433, - 43.227512, - 90.35846, - -16.054127, - 115.41275, - -32.817406, - 78.29431, - -56.05409 - ] - } + "eye": { + "eye_indifferent": { "x": 85.72, "y": -28.18, "rotation": -70.63, "width": 93, "height": 89 }, + "eye_surprised": { "x": 85.72, "y": -28.18, "rotation": -70.63, "width": 93, "height": 89 } }, - "eyes": { - "eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 }, - "eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 } + "front_bracer": { + "front_bracer": { "x": 12.03, "y": -1.67, "rotation": 79.59, "width": 58, "height": 80 } + }, + "front_fist": { + "front_fist_closed": { "x": 35.49, "y": 6, "rotation": 67.16, "width": 75, "height": 82 }, + "front_fist_open": { "x": 39.56, "y": 7.76, "rotation": 67.16, "width": 86, "height": 87 } + }, + "front_foot": { + "front_foot": { "x": 29.51, "y": 7.83, "rotation": 18.68, "width": 126, "height": 69 }, + "front_foot_bend1": { "x": 29.51, "y": 7.83, "rotation": 18.68, "width": 128, "height": 70 }, + "front_foot_bend2": { "x": 16.07, "y": 13.83, "rotation": 18.68, "width": 108, "height": 93 } + }, + "front_shin": { + "front_shin": { "x": 55.11, "y": -3.54, "rotation": 96.59, "width": 82, "height": 184 } + }, + "front_thigh": { + "front_thigh": { "x": 42.47, "y": 4.44, "rotation": 84.86, "width": 48, "height": 112 } + }, + "front_upper_arm": { + "front_upper_arm": { "x": 28.3, "y": 7.37, "rotation": 97.89, "width": 54, "height": 97 } + }, + "goggles": { + "goggles": { "x": 97.07, "y": 6.54, "rotation": -70.63, "width": 261, "height": 166 } + }, + "gun": { + "gun": { "x": 77.3, "y": 16.4, "rotation": 60.82, "width": 210, "height": 203 } }, "head": { - "head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 } + "head": { "x": 128.95, "y": 0.29, "rotation": -70.63, "width": 271, "height": 298 } }, - "left arm": { - "left-arm": { "x": 15.11, "y": -0.44, "rotation": 33.84, "width": 35, "height": 29 } + "mouth": { + "mouth_grind": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 }, + "mouth_oooo": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 }, + "mouth_smile": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 } }, - "left foot": { - "left-foot": { "x": 24.35, "y": 8.88, "rotation": 3.32, "width": 65, "height": 30 } - }, - "left hand": { - "left-hand": { "x": 0.75, "y": 1.86, "rotation": 31.14, "width": 35, "height": 38 } - }, - "left lower leg": { - "left-lower-leg": { "x": 24.55, "y": -1.92, "rotation": 105.75, "width": 49, "height": 64 } - }, - "left shoulder": { - "left-shoulder": { "x": 23.74, "y": 0.11, "rotation": 62.01, "width": 34, "height": 53 } - }, - "left upper leg": { - "left-upper-leg": { "x": 26.12, "y": -1.85, "rotation": 89.09, "width": 33, "height": 67 } + "muzzle": { + "muzzle": { "x": 18.25, "y": 5.44, "rotation": 0.15, "width": 462, "height": 400 } }, "neck": { - "neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 } + "neck": { "x": 9.76, "y": -3.01, "rotation": -55.22, "width": 36, "height": 41 } }, - "pelvis": { - "pelvis": { "x": -4.83, "y": 10.62, "width": 63, "height": 47 } + "rear_bracer": { + "rear_bracer": { "x": 11.15, "y": -2.2, "rotation": 66.17, "width": 56, "height": 72 } }, - "right arm": { - "right-arm": { "x": 18.34, "y": -2.64, "rotation": 94.32, "width": 21, "height": 45 } + "rear_foot": { + "rear_foot": { "x": 31.51, "y": 3.57, "rotation": 23.07, "width": 113, "height": 60 }, + "rear_foot_bend1": { "x": 34.39, "y": 4.8, "rotation": 23.07, "width": 117, "height": 66 }, + "rear_foot_bend2": { "x": 30.38, "y": 12.62, "rotation": 23.07, "width": 103, "height": 83 } }, - "right foot": { - "right-foot": { "x": 19.02, "y": 8.47, "rotation": 1.52, "width": 67, "height": 30 } + "rear_shin": { + "rear_shin": { "x": 58.29, "y": -2.75, "rotation": 92.37, "width": 75, "height": 178 } }, - "right hand": { - "right-hand": { "x": 6.82, "y": 1.25, "rotation": 91.96, "width": 32, "height": 32 } + "rear_thigh": { + "rear_thigh": { "x": 33.1, "y": -4.11, "rotation": 72.54, "width": 65, "height": 104 } }, - "right lower leg": { - "right-lower-leg": { "x": 23.28, "y": -2.59, "rotation": 111.83, "width": 51, "height": 64 } - }, - "right shoulder": { - "right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 } - }, - "right upper leg": { - "right-upper-leg": { "x": 23.03, "y": 0.25, "rotation": 101.13, "width": 44, "height": 70 } + "rear_upper_arm": { + "rear_upper_arm": { "x": 21.12, "y": 4.08, "rotation": 89.32, "width": 47, "height": 87 } }, "torso": { - "torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 } + "torso": { "x": 63.61, "y": 7.12, "rotation": -94.53, "width": 98, "height": 180 } } } }, "events": { - "behind": {}, - "headAttach": {}, - "headPop": {} + "footstep": {}, + "headAttach": { "int": 3, "float": 4 }, + "headBehind": { "int": 5, "float": 6, "string": "setup" }, + "headPop": { "int": 1, "float": 2 } }, "animations": { - "drawOrder": { + "death": { + "slots": { + "eye": { + "attachment": [ + { "time": 0, "name": "eye_surprised" }, + { "time": 0.4666, "name": "eye_indifferent" }, + { "time": 2.2333, "name": "eye_surprised" }, + { "time": 4.5333, "name": "eye_indifferent" } + ] + }, + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_oooo" }, + { "time": 2.2333, "name": "mouth_grind" }, + { "time": 4.5333, "name": "mouth_oooo" } + ] + } + }, "bones": { "head": { + "rotate": [ + { "time": 0, "angle": -2.82 }, + { "time": 0.1333, "angle": -28.74 }, + { "time": 0.2333, "angle": 11.42 }, + { "time": 0.3333, "angle": -50.24 }, + { "time": 0.4, "angle": -72.66, "curve": "stepped" }, + { "time": 0.4333, "angle": -72.66 }, + { "time": 0.5, "angle": -20.24 }, + { "time": 0.5666, "angle": -85.28, "curve": "stepped" }, + { "time": 0.9333, "angle": -85.28, "curve": "stepped" }, + { "time": 2.2333, "angle": -85.28 }, + { "time": 2.5, "angle": -51.96, "curve": "stepped" }, + { "time": 4.5333, "angle": -51.96 }, + { "time": 4.6666, "angle": -85.28 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": -2.82 }, + { "time": 0.1333, "angle": 12.35 }, + { "time": 0.2333, "angle": 29.89 }, + { "time": 0.3, "angle": 70.36 }, + { "time": 0.4, "angle": -10.22, "curve": "stepped" }, + { "time": 0.4333, "angle": -10.22 }, + { "time": 0.5, "angle": 2.92 }, + { "time": 0.5666, "angle": 47.94, "curve": "stepped" }, + { "time": 2.2333, "angle": 47.94 }, + { "time": 2.5, "angle": 18.5, "curve": "stepped" }, + { "time": 4.5333, "angle": 18.5 }, + { "time": 4.6666, "angle": 47.94 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -8.61 }, + { "time": 0.1333, "angle": 28.19 }, + { "time": 0.2666, "angle": -280.19 }, + { "time": 0.4, "angle": -237.22, "curve": "stepped" }, + { "time": 0.4333, "angle": -237.22 }, + { "time": 0.5, "angle": 76.03, "curve": "stepped" }, + { "time": 0.8, "angle": 76.03, "curve": "stepped" }, + { "time": 0.9333, "angle": 76.03, "curve": "stepped" }, + { "time": 2.2333, "angle": 76.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 2.2333, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -38.85 }, + { "time": 0.1333, "angle": -299.58 }, + { "time": 0.2666, "angle": -244.74 }, + { "time": 0.4, "angle": -292.35 }, + { "time": 0.4333, "angle": -315.84 }, + { "time": 0.5, "angle": -347.94 }, + { "time": 0.7, "angle": -347.33, "curve": "stepped" }, + { "time": 2.2333, "angle": -347.33 }, + { "time": 2.7, "angle": -290.68 }, + { "time": 2.7666, "angle": -285.1 }, + { "time": 4.6666, "angle": -290.68 }, + { "time": 4.8, "angle": 8.61 }, + { "time": 4.8666, "angle": 10.94 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": -44.69 }, + { "time": 0.1333, "angle": 112.26 }, + { "time": 0.2666, "angle": 129.07 }, + { "time": 0.4, "angle": 134.94, "curve": "stepped" }, + { "time": 0.4333, "angle": 134.94 }, + { "time": 0.5666, "angle": 172.6, "curve": "stepped" }, + { "time": 0.9333, "angle": 172.6, "curve": "stepped" }, + { "time": 2.2333, "angle": 172.6 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 21.88 }, + { "time": 0.1333, "angle": 11.48 }, + { "time": 0.2666, "angle": -18.81 }, + { "time": 0.4, "angle": -18.92 }, + { "time": 0.4333, "angle": -18.28 }, + { "time": 0.5, "angle": 60.61 }, + { "time": 0.7, "angle": -18.87, "curve": "stepped" }, + { "time": 2.2333, "angle": -18.87 }, + { "time": 2.7, "angle": -1.95, "curve": "stepped" }, + { "time": 4.6666, "angle": -1.95 }, + { "time": 4.8, "angle": 34.55 }, + { "time": 4.9333, "angle": -18.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -2.33 }, + { "time": 0.2666, "angle": 26.34 }, + { "time": 0.7, "angle": -6.07, "curve": "stepped" }, + { "time": 2.2333, "angle": -6.07 }, + { "time": 2.7, "angle": 5.72, "curve": "stepped" }, + { "time": 4.6666, "angle": 5.72 }, + { "time": 4.8666, "angle": -6.52 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 10.36 }, + { "time": 0.1333, "angle": -23.12 }, + { "time": 0.2666, "angle": -23.11 }, + { "time": 0.4, "angle": -23.16, "curve": "stepped" }, + { "time": 0.4333, "angle": -23.16 }, + { "time": 0.5666, "angle": -23.2, "curve": "stepped" }, + { "time": 0.9333, "angle": -23.2, "curve": "stepped" }, + { "time": 2.2333, "angle": -23.2 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": -2.78 }, + { "time": 0.1333, "angle": -24.58 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.9333, "angle": 0, "curve": "stepped" }, + { "time": 2.2333, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2, "x": 50.34, "y": 151.73 }, + { "time": 0.4, "x": 5.16, "y": -119.64, "curve": "stepped" }, + { "time": 0.4333, "x": 5.16, "y": -119.64 }, + { "time": 0.5, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 0.8, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 0.9333, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 2.2333, "x": 50.34, "y": -205.18 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_thigh": { "rotate": [ { "time": 0, "angle": 0 }, - { "time": 0.4827, "angle": -23.11 }, - { "time": 0.8965, "angle": -56.45 }, - { "time": 1.3103, "angle": 1.38 }, - { "time": 1.7931, "angle": 36.12 }, - { "time": 2.1379, "angle": 1.24 }, - { "time": 2.6206, "angle": -37.12 }, - { "time": 2.9666, "angle": 2.07 }, - { "time": 3.4666, "angle": 34.72 }, - { "time": 3.9, "angle": 359.99 } + { "time": 0.1333, "angle": 8.47 }, + { "time": 0.2666, "angle": 115.95 }, + { "time": 0.4, "angle": 180.66, "curve": "stepped" }, + { "time": 0.4333, "angle": 180.66 }, + { "time": 0.5, "angle": 155.22 }, + { "time": 0.6, "angle": 97.73 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -27.37 }, + { "time": 0.2666, "angle": -35.1 }, + { "time": 0.4, "angle": -37.72, "curve": "stepped" }, + { "time": 0.4333, "angle": -37.72 }, + { "time": 0.5, "angle": -40.06 }, + { "time": 0.6, "angle": 2.76 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 70.45 }, + { "time": 0.2666, "angle": 155.34 }, + { "time": 0.4, "angle": 214.31, "curve": "stepped" }, + { "time": 0.4333, "angle": 214.31 }, + { "time": 0.5, "angle": 169.67 }, + { "time": 0.8, "angle": 83.27 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 18.93 }, + { "time": 0.2666, "angle": -21.04 }, + { "time": 0.4, "angle": -29.93, "curve": "stepped" }, + { "time": 0.4333, "angle": -29.93 }, + { "time": 0.5, "angle": -16.79 }, + { "time": 0.8, "angle": 7.77 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -11.62 }, + { "time": 0.4, "angle": -45.59, "curve": "stepped" }, + { "time": 0.4333, "angle": -45.59 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.4, "angle": -48.75, "curve": "stepped" }, + { "time": 0.4333, "angle": -48.75 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gunTip": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + } + } + }, + "hit": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0.1666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" }, + { "time": 0.3333, "name": "mouth_smile" } + ] + } + }, + "bones": { + "torso": { + "rotate": [ + { "time": 0, "angle": 56.42 }, + { "time": 0.3333, "angle": 8.89 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 35.38 }, + { "time": 0.2333, "angle": 24.94 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 10.21 }, + { "time": 0.3333, "angle": -41.3 } + ] + }, + "front_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": -310.92, + "curve": [ 0.38, 0.53, 0.744, 1 ] + }, + { "time": 0.3333, "angle": -112.59 } + ], + "translate": [ + { "time": 0, "x": 7.23, "y": -13.13 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 36.99 }, + { "time": 0.3333, "angle": -28.64 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": 13.59 }, + { "time": 0.3333, "angle": 7.55 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": 271.02, + "curve": [ 0.342, 0.36, 0.68, 0.71 ] + }, + { "time": 0.3333, "angle": -15.84 } + ], + "translate": [ + { "time": 0.3333, "x": -0.09, "y": -0.46 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 40.03 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 14.98 }, + { "time": 0.3333, "angle": 39.75 } + ] + }, + "hip": { + "translate": [ + { "time": 0, "x": -75.54, "y": -78.03 }, + { "time": 0.2333, "x": -36.48, "y": 12.42 }, + { "time": 0.3333, "x": -36.48, "y": -2.99 } + ] + }, + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 90.94, + "curve": [ 0.227, 0.26, 0.432, 1 ] + }, + { "time": 0.3333, "angle": 32.02 } + ], + "translate": [ + { "time": 0, "x": 7.21, "y": -4 } + ] + }, + "rear_thigh": { + "rotate": [ + { + "time": 0, + "angle": 40.51, + "curve": [ 0.295, 0.3, 0.59, 0.99 ] + }, + { "time": 0.3333, "angle": 90.76 } + ], + "translate": [ + { "time": 0, "x": -1.96, "y": -0.32 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": -96.62 }, + { "time": 0.3333, "angle": -15.13 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 7.99 }, + { "time": 0.3333, "angle": -67.54 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 5.4 }, + { "time": 0.3333, "angle": -16.26 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 2.67 }, + { "time": 0.3333, "angle": -10.31 } + ] + } + } + }, + "idle": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" }, + { "time": 1.6666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_smile" }, + { "time": 1.6666, "name": "mouth_smile" } + ] + } + }, + "bones": { + "torso": { + "rotate": [ + { + "time": 0, + "angle": -5.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.8333, + "angle": -9.65, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -5.61 } + ], + "translate": [ + { "time": 0, "x": -6.49, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": -59.85, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -54.31, + "curve": [ 0.324, 0.11, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -59.85 } + ], + "translate": [ + { "time": 0, "x": -7.12, "y": -8.23 }, + { "time": 0.6666, "x": -6.32, "y": -8.3 }, + { "time": 1.6666, "x": -7.12, "y": -8.23 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": 62.41, + "curve": [ 0.504, 0.02, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": 43.83, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": 62.41 } + ], + "translate": [ + { "time": 0, "x": -1.83, "y": -16.78 }, + { "time": 0.6666, "x": 0.34, "y": -15.23 }, + { "time": 1.6666, "x": -1.83, "y": -16.78 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.6666, "angle": 2.39 }, + { "time": 1.6666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -1.88, "y": -4.76, "curve": "stepped" }, + { "time": 1.6666, "x": -1.88, "y": -4.76 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 0.64, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": -4.34, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 0.64 } + ], + "translate": [ + { "time": 0, "x": -13.39, "y": 6.69, "curve": "stepped" }, + { "time": 1.6666, "x": -13.39, "y": 6.69 } + ], + "scale": [ + { + "time": 0, + "x": 0.896, + "y": 1, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 0.825, + "y": 1, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": 0.896, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": -19.28, "curve": "stepped" }, + { "time": 1.6666, "angle": -19.28 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 0.994, + "y": 1, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { + "time": 0, + "angle": 30.5, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 40.15, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 30.5 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { + "time": 0, + "angle": -23.83, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": -43.77, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": -23.83 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { + "time": 0, + "angle": 5.13, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 10.04, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 5.13 } + ], + "scale": [ + { "time": 0, "x": 0.755, "y": 1.309, "curve": "stepped" }, + { "time": 1.6666, "x": 0.755, "y": 1.309 } + ] + }, + "hip": { + "translate": [ + { + "time": 0, + "x": -6.63, + "y": -23.01, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 6.27, + "y": -35, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": -6.63, "y": -23.01 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { + "time": 0, + "angle": -7.34, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 3.85, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": -7.34 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { + "time": 0, + "angle": -17.16, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": 12.52, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -17.16 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": -5.51, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -3.12, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -5.51 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { + "time": 0, + "angle": 45.46, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": 41.33, + "curve": [ 0.32, 0.1, 0.736, 0.91 ] + }, + { "time": 1.6666, "angle": 45.46 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -15.59, + "curve": [ 0.732, 0, 0.769, 0.99 ] + }, + { "time": 1.6666, "angle": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { + "time": 0, + "angle": -6.84, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -14.63, + "curve": [ 0.324, 0.11, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -6.84 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "x": 0.689, + "y": 1.1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + } + } + }, + "jump": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" }, + { "time": 0.2, "name": "front_fist_closed" }, + { "time": 0.6666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 91.53, + "curve": [ 0.278, 0.46, 0.763, 1 ] + }, + { + "time": 0.2, + "angle": -35.83, + "curve": [ 0.761, 0, 0.75, 1 ] + }, + { "time": 0.4333, "angle": 127.74 }, + { + "time": 0.7333, + "angle": 48.18, + "curve": [ 0.227, 0.26, 0.432, 1 ] + }, + { "time": 0.8333, "angle": 25.35 }, + { "time": 0.9333, "angle": 45.37 }, + { "time": 1.0333, "angle": 38.12 }, + { "time": 1.1333, "angle": 25.35 }, + { "time": 1.3333, "angle": 91.53 } + ], + "translate": [ + { "time": 0, "x": -2.56, "y": 5.77 }, + { "time": 0.4333, "x": 8.3, "y": 7.98 }, + { "time": 0.7333, "x": 7.21, "y": -4 }, + { "time": 1.3333, "x": -2.56, "y": 5.77 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -42.63 }, + { "time": 0.2, "angle": -5.74 }, + { "time": 0.4333, "angle": -50.76 }, + { "time": 0.7333, "angle": 1.89 }, + { "time": 0.8333, "angle": 11.58 }, + { "time": 0.9666, "angle": -1.89 }, + { "time": 1.1333, "angle": 11.58 }, + { "time": 1.3333, "angle": -42.63 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": -26.32 }, + { "time": 0.2, "angle": 121.44 }, + { "time": 0.4333, "angle": 70.54 }, + { + "time": 0.7333, + "angle": 79.89, + "curve": [ 0.295, 0.3, 0.59, 0.99 ] + }, + { "time": 0.8333, "angle": 99.12 }, + { "time": 0.9333, "angle": 74.05 }, + { "time": 1.0333, "angle": 98.04 }, + { "time": 1.1333, "angle": 99.12 }, + { "time": 1.3333, "angle": -26.32 } + ], + "translate": [ + { "time": 0, "x": -0.56, "y": -0.32 }, + { "time": 0.4333, "x": -8.5, "y": 10.58 }, + { "time": 0.7333, "x": -1.96, "y": -0.32 }, + { "time": 1.3333, "x": -0.56, "y": -0.32 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": -78.69 }, + { "time": 0.4333, "angle": -55.56 }, + { "time": 0.7333, "angle": -62.84 }, + { "time": 0.8333, "angle": -80.74 }, + { "time": 0.9333, "angle": -41.12 }, + { "time": 1.0333, "angle": -77.4 }, + { "time": 1.1333, "angle": -80.74 }, + { "time": 1.3333, "angle": -78.69 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7333, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -22.61 }, + { "time": 0.2, "angle": -246.68 }, + { + "time": 0.6, + "angle": 11.28, + "curve": [ 0.246, 0, 0.633, 0.53 ] + }, + { + "time": 0.7333, + "angle": -57.45, + "curve": [ 0.38, 0.53, 0.744, 1 ] + }, + { "time": 0.8666, "angle": -112.59 }, + { "time": 0.9333, "angle": -102.17 }, + { "time": 1.0333, "angle": -108.61 }, + { "time": 1.1333, "angle": -112.59 }, + { "time": 1.3333, "angle": -22.61 } + ], + "translate": [ + { "time": 0, "x": 6.08, "y": 7.15 }, + { "time": 0.2, "x": 7.23, "y": -13.13, "curve": "stepped" }, + { "time": 0.7333, "x": 7.23, "y": -13.13 }, + { "time": 1.3333, "x": 6.08, "y": 7.15 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 66.46 }, + { "time": 0.2, "angle": 42.39 }, + { "time": 0.4333, "angle": 26.06 }, + { "time": 0.7333, "angle": 13.28 }, + { "time": 0.8666, "angle": -28.64 }, + { "time": 0.9333, "angle": -22.31 }, + { "time": 1.0333, "angle": -35.39 }, + { "time": 1.1333, "angle": -28.64 }, + { "time": 1.3333, "angle": 66.46 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -28.43 }, + { "time": 0.4333, "angle": -45.6 }, + { "time": 0.7333, "angle": -53.66 }, + { "time": 0.8666, "angle": 7.55 }, + { "time": 0.9333, "angle": 31.15 }, + { "time": 1.0333, "angle": -32.58 }, + { "time": 1.1333, "angle": 7.55 }, + { "time": 1.3333, "angle": -28.43 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 39.68 }, + { "time": 0.2, "angle": 276.57 }, + { "time": 0.3, "angle": 17.73 }, + { "time": 0.4333, "angle": 83.38 }, + { + "time": 0.6, + "angle": -4.71, + "curve": [ 0.246, 0, 0.633, 0.53 ] + }, + { + "time": 0.7333, + "angle": -69.63, + "curve": [ 0.342, 0.36, 0.68, 0.71 ] + }, + { + "time": 0.7666, + "angle": 321.47, + "curve": [ 0.333, 0.33, 0.667, 0.66 ] + }, + { + "time": 0.8, + "angle": 33.7, + "curve": [ 0.358, 0.64, 0.693, 1 ] + }, + { "time": 0.8666, "angle": 34.56 }, + { "time": 1.0333, "angle": 71.96 }, + { "time": 1.1333, "angle": 34.56 }, + { "time": 1.3333, "angle": 39.68 } + ], + "translate": [ + { "time": 0, "x": -3.1, "y": -4.86 }, + { "time": 0.2, "x": 23.33, "y": 49.07 }, + { "time": 0.4333, "x": 20.78, "y": 40.21 }, + { "time": 1.3333, "x": -3.1, "y": -4.86 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 29.66 }, + { "time": 0.2, "angle": 45.06 }, + { "time": 0.4333, "angle": -4.34 }, + { "time": 0.7666, "angle": 61.68 }, + { "time": 0.8, "angle": 82.59 }, + { "time": 0.8666, "angle": 80.06 }, + { "time": 1.0333, "angle": 57.56 }, + { "time": 1.1333, "angle": 80.06 }, + { "time": 1.3333, "angle": 29.66 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 24.9 }, + { "time": 0.2, "angle": 16.31 }, + { "time": 0.4333, "angle": 7.44 }, + { "time": 0.7333, "angle": -20.35 }, + { "time": 0.8333, "angle": -0.69, "curve": "stepped" }, + { "time": 1.1333, "angle": -0.69 }, + { "time": 1.3333, "angle": 24.9 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 24.92 }, + { "time": 0.2, "angle": 10.36 }, + { "time": 0.4333, "angle": 28.65 }, + { "time": 0.7333, "angle": -2.65 }, + { "time": 0.8333, "angle": -28.94, "curve": "stepped" }, + { "time": 1.1333, "angle": -28.94 }, + { "time": 1.3333, "angle": 24.92 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { + "time": 0, + "x": -34.51, + "y": -78.62, + "curve": [ 0.232, 1, 0.75, 1 ] + }, + { + "time": 0.2, + "x": -34.51, + "y": 182.5, + "curve": [ 0.232, 0.48, 0.598, 0.79 ] + }, + { + "time": 0.7666, + "x": -34.51, + "y": 596.22, + "curve": [ 0.329, 0.17, 0.66, 0.21 ] + }, + { "time": 1.1333, "x": -34.51, "y": 2.49 }, + { "time": 1.3333, "x": -34.51, "y": -78.62 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { + "time": 0, + "angle": -90.62, + "curve": [ 0.416, 0.54, 0.743, 1 ] + }, + { + "time": 0.2, + "angle": -10.52, + "curve": [ 0.644, 0, 0.75, 1 ] + }, + { "time": 0.4333, "angle": -127.72 }, + { "time": 0.7333, "angle": -19.91 }, + { "time": 0.8333, "angle": -5.16 }, + { "time": 0.9333, "angle": -35.06 }, + { "time": 1.0333, "angle": -43.97 }, + { "time": 1.1333, "angle": -5.16 }, + { "time": 1.3333, "angle": -90.62 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": -0.79 }, + { "time": 0.0333, "angle": 16.27 }, + { "time": 0.0666, "angle": 23.52 }, + { "time": 0.1, "angle": 21.02 }, + { "time": 0.1333, "angle": 10.92 }, + { "time": 0.2, "angle": -38.45 }, + { "time": 0.4333, "angle": 6.62 }, + { "time": 0.7333, "angle": -11.51 }, + { "time": 1.0333, "angle": -22.91 }, + { "time": 1.3333, "angle": -0.79 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": -12.77 }, + { "time": 0.2, "angle": 17.05 }, + { "time": 0.4333, "angle": 19.45 }, + { "time": 0.7333, "angle": 2.67 }, + { "time": 1.0333, "angle": -28.49 }, + { "time": 1.3333, "angle": -12.77 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 6.18 }, + { "time": 0.2, "angle": 30.81 }, + { "time": 0.4333, "angle": 13.25 }, + { "time": 0.7333, "angle": 14.98 }, + { "time": 0.7666, "angle": 25.64 }, + { "time": 0.8, "angle": 20.62 }, + { "time": 0.8666, "angle": 64.52 }, + { "time": 1.0333, "angle": 8.59 }, + { "time": 1.1333, "angle": 64.52 }, + { "time": 1.3333, "angle": 6.18 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + } + } + }, + "run": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_closed" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 42.05, + "curve": [ 0.195, 0.86, 0.75, 1 ] + }, + { "time": 0.0666, "angle": 46.07 }, + { "time": 0.1333, "angle": -20.28 }, + { "time": 0.2, "angle": -27.23 }, + { "time": 0.2666, "angle": -47.16 }, + { "time": 0.3333, "angle": -39.79 }, + { "time": 0.4, "angle": -25.86 }, + { "time": 0.4666, "angle": 14.35 }, + { "time": 0.5333, "angle": 55.62 }, + { "time": 0.6, "angle": 69.65 }, + { "time": 0.6666, "angle": 86.4 }, + { "time": 0.7333, "angle": 65.87 }, + { "time": 0.8, "angle": 42.05 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.0333, "x": -5.79, "y": 11.15 }, + { "time": 0.0666, "x": -5.13, "y": 11.55 }, + { "time": 0.1333, "x": -7.7, "y": 8.98 }, + { "time": 0.5333, "x": -1.26, "y": 3.83 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -39.7 }, + { "time": 0.2, "angle": -57.29 }, + { "time": 0.4, "angle": -39.7 }, + { "time": 0.6, "angle": -57.29 }, + { "time": 0.8, "angle": -39.7 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": -56.59 }, + { "time": 0.0666, "angle": -21.57 }, + { "time": 0.1333, "angle": 27.95 }, + { "time": 0.2, "angle": 42.42 }, + { "time": 0.2666, "angle": 62.37 }, + { "time": 0.3333, "angle": 45.42 }, + { "time": 0.4, "angle": 15.67 }, + { "time": 0.4666, "angle": 28.22 }, + { "time": 0.5333, "angle": -38.62 }, + { "time": 0.6, "angle": -53.26 }, + { "time": 0.6666, "angle": -79.31 }, + { "time": 0.7333, "angle": -86.47 }, + { "time": 0.8, "angle": -56.59 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": -6.76, "y": -3.86 }, + { "time": 0.4333, "x": -15.85, "y": 7.28 }, + { "time": 0.4666, "x": -13.04, "y": 4.04 }, + { "time": 0.5, "x": -10.24, "y": 7.11 }, + { "time": 0.5333, "x": -9.01, "y": -5.15 }, + { "time": 0.6666, "x": -23.18, "y": -2.57 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": -74 }, + { "time": 0.0666, "angle": -83.38 }, + { "time": 0.1333, "angle": -106.69 }, + { "time": 0.2, "angle": -66.01 }, + { "time": 0.2666, "angle": -55.22 }, + { "time": 0.3333, "angle": -24.8 }, + { + "time": 0.4, + "angle": 18.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4666, "angle": -56.65 }, + { + "time": 0.5333, + "angle": -11.94, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.6666, "angle": -41.26 }, + { "time": 0.7333, "angle": -43.6 }, + { "time": 0.8, "angle": -74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -89.36 }, + { "time": 0.0666, "angle": -95.67 }, + { "time": 0.1333, "angle": -22 }, + { "time": 0.2, "angle": -316.04 }, + { "time": 0.2666, "angle": -274.94 }, + { "time": 0.3333, "angle": -273.74 }, + { "time": 0.4, "angle": -272.09 }, + { "time": 0.4666, "angle": -264.89 }, + { "time": 0.5333, "angle": -320.09 }, + { "time": 0.6, "angle": -50.83 }, + { "time": 0.6666, "angle": -81.72 }, + { "time": 0.7333, "angle": -83.92 }, + { "time": 0.8, "angle": -89.36 } + ], + "translate": [ + { "time": 0, "x": 6.24, "y": 10.05 }, + { "time": 0.2666, "x": 4.95, "y": -13.13 }, + { "time": 0.6, "x": -2.43, "y": 1.94 }, + { "time": 0.8, "x": 6.24, "y": 10.05 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 33.43 }, + { "time": 0.0666, "angle": 20.53 }, + { "time": 0.1333, "angle": 15.26 }, + { "time": 0.2, "angle": 19.28 }, + { "time": 0.2666, "angle": 22.62 }, + { "time": 0.3333, "angle": 37.29 }, + { "time": 0.4, "angle": 41.53 }, + { "time": 0.4666, "angle": 31.73 }, + { "time": 0.5333, "angle": 67.45 }, + { "time": 0.6666, "angle": 39.77 }, + { "time": 0.7333, "angle": 30.95 }, + { "time": 0.8, "angle": 33.43 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -19.75 }, + { "time": 0.0666, "angle": -37.11 }, + { "time": 0.1333, "angle": -50.79 }, + { "time": 0.2666, "angle": -12.69 }, + { "time": 0.3333, "angle": 3.01 }, + { "time": 0.4333, "angle": 12.05 }, + { "time": 0.5333, "angle": 13.25 }, + { "time": 0.8, "angle": -19.75 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 68.68 }, + { "time": 0.0666, "angle": 73.89 }, + { "time": 0.1333, "angle": -9.64 }, + { "time": 0.2, "angle": 284.27 }, + { "time": 0.2666, "angle": 283.29 }, + { "time": 0.3333, "angle": 278.28 }, + { "time": 0.4, "angle": 271.02 }, + { "time": 0.4666, "angle": 263.2 }, + { "time": 0.5333, "angle": 314.25 }, + { "time": 0.6, "angle": 16.83 }, + { "time": 0.6666, "angle": 70.35 }, + { "time": 0.7333, "angle": 73.53 }, + { "time": 0.8, "angle": 68.68 } + ], + "translate": [ + { "time": 0, "x": -2.57, "y": -8.89 }, + { "time": 0.1333, "x": -4.68, "y": 7.2 }, + { "time": 0.2, "x": 21.73, "y": 51.17 }, + { "time": 0.6, "x": 4.33, "y": 2.05 }, + { "time": 0.8, "x": -2.57, "y": -8.89 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 31.04 }, + { "time": 0.0666, "angle": 28.28 }, + { "time": 0.1333, "angle": 49.36 }, + { "time": 0.2, "angle": 59.37 }, + { "time": 0.2666, "angle": 8.56 }, + { "time": 0.3333, "angle": 9.38 }, + { "time": 0.4, "angle": 11.51 }, + { "time": 0.4666, "angle": 7.22 }, + { "time": 0.5333, "angle": -18.44 }, + { "time": 0.6, "angle": 11.44 }, + { "time": 0.6666, "angle": 9.99 }, + { "time": 0.7333, "angle": 8.28 }, + { "time": 0.8, "angle": 31.04 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 11.03 }, + { "time": 0.2, "angle": 13.58 }, + { "time": 0.4, "angle": 11.03 }, + { "time": 0.6, "angle": 13.58 }, + { "time": 0.8, "angle": 11.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 11.03 }, + { "time": 0.1, "angle": 12.34 }, + { "time": 0.2, "angle": 25.55 }, + { "time": 0.4, "angle": 11.03 }, + { "time": 0.5, "angle": 12.34 }, + { "time": 0.6, "angle": 25.55 }, + { "time": 0.8, "angle": 11.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -62.47, "y": -23.1 }, + { + "time": 0.0666, + "x": -62.47, + "y": -38.51, + "curve": [ 0.244, 0.04, 0.75, 1 ] + }, + { + "time": 0.2666, + "x": -62.47, + "y": 22.28, + "curve": [ 0.17, 0.52, 0.75, 1 ] + }, + { "time": 0.4, "x": -62.47, "y": -23.1 }, + { "time": 0.4333, "x": -62.47, "y": -24.59 }, + { + "time": 0.4666, + "x": -62.47, + "y": -43.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.6666, "x": -62.47, "y": 22.28 }, + { "time": 0.8, "x": -62.47, "y": -23.1 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.481, 0.01, 0.75, 1 ] + }, + { "time": 0.0666, "angle": -64.42 }, + { + "time": 0.1333, + "angle": -20.59, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.2666, "angle": -62.51 }, + { "time": 0.3333, "angle": -79.74 }, + { "time": 0.4, "angle": -78.28 }, + { + "time": 0.4666, + "angle": -118.96, + "curve": [ 0.93, 0, 0.952, 0.95 ] + }, + { "time": 0.6, "angle": -88.95 }, + { "time": 0.6666, "angle": -79.09 }, + { "time": 0.7333, "angle": -47.77 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { + "time": 0.0333, + "angle": -21.13, + "curve": [ 0.121, 0.23, 0.75, 1 ] + }, + { "time": 0.0666, "angle": 17.64 }, + { "time": 0.1, "angle": 29.92 }, + { "time": 0.1333, "angle": 16.44 }, + { "time": 0.2, "angle": -29.22 }, + { "time": 0.2666, "angle": -1.61 }, + { "time": 0.3333, "angle": -10.22 }, + { "time": 0.4666, "angle": -15.99 }, + { "time": 0.6, "angle": 9.03 }, + { "time": 0.7333, "angle": 17.32 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.0666, "angle": -12.04 }, + { "time": 0.1333, "angle": -0.87 }, + { "time": 0.2, "angle": 25.81 }, + { "time": 0.2666, "angle": 4.71 }, + { + "time": 0.4, + "angle": 18.09, + "curve": [ 0.281, 0.73, 0.75, 1 ] + }, + { "time": 0.4333, "angle": -1.7 }, + { "time": 0.4666, "angle": 27.12 }, + { "time": 0.5, "angle": 38.83 }, + { "time": 0.5333, "angle": 30.76 }, + { "time": 0.5666, "angle": -20.49 }, + { "time": 0.6, "angle": -30.8 }, + { "time": 0.6666, "angle": -1.31 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 24.72 }, + { "time": 0.5, "angle": -11.87 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + } + }, + "events": [ + { "time": 0, "name": "footstep" }, + { "time": 0.4, "name": "footstep", "int": 1 } + ] + }, + "shoot": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0.1333, "name": "front_fist_closed" }, + { "time": 0.4, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0.1333, "name": "mouth_grind" } + ] + }, + "muzzle": { + "attachment": [ + { "time": 0.1333, "name": "muzzle" }, + { "time": 0.2666, "name": null } + ], + "color": [ + { + "time": 0.1333, + "color": "ffffff00", + "curve": [ 0.118, 0.99, 0.75, 1 ] + }, + { + "time": 0.1666, + "color": "ffffffff", + "curve": [ 0.821, 0, 0.909, 0.89 ] + }, + { "time": 0.2666, "color": "ffffff00" } + ] + } + }, + "bones": { + "front_fist": { + "scale": [ + { "time": 0.1333, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.4, "x": 1, "y": 1 } + ] + }, + "gunTip": { + "translate": [ + { "time": 0.1333, "x": 0, "y": 0 }, + { "time": 0.2, "x": 20.93, "y": 1.57 } + ], + "scale": [ + { "time": 0.1333, "x": 1, "y": 1 }, + { "time": 0.2, "x": 1.247, "y": 1.516 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 1.9 } + ], + "translate": [ + { + "time": 0, + "x": 7.95, + "y": 5.84, + "curve": [ 0, 0.3, 0.678, 1 ] + }, + { "time": 0.3, "x": -9.3, "y": -1.41 }, + { "time": 0.4, "x": 0, "y": 0 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": -30.47 } ], "translate": [ { "time": 0, "x": 0, "y": 0, - "curve": [ 0.19, 0.4, 0.586, 0.75 ] + "curve": [ 0, 0.3, 0.678, 1 ] }, - { - "time": 0.2758, - "x": 57.88, - "y": -35.72, - "curve": [ 0.39, 0.54, 0.632, 0.72 ] - }, - { - "time": 0.4827, - "x": 87.26, - "y": -87.89, - "curve": [ 0.325, 0.23, 0.587, 0.36 ] - }, - { - "time": 0.6896, - "x": 28.89, - "y": -114.62, - "curve": [ 0.383, 0.23, 0.736, 0.55 ] - }, - { - "time": 0.8965, - "x": -76.58, - "y": -124.98, - "curve": [ 0.129, 0.21, 0.547, 0.64 ] - }, - { - "time": 1.1034, - "x": -154.37, - "y": -77.13, - "curve": [ 0.354, 0.48, 0.729, 0.9 ] - }, - { - "time": 1.3103, - "x": -181.02, - "y": 18.56, - "curve": [ 0.063, 0.15, 0.52, 0.62 ] - }, - { - "time": 1.5862, - "x": -150.38, - "y": 128.67, - "curve": [ 0.381, 0.54, 0.778, 1 ] - }, - { - "time": 1.7931, - "x": -112.08, - "y": 146.28, - "curve": [ 0.242, 0, 0.626, 0.45 ] - }, - { - "time": 1.931, - "x": -63.7, - "y": 111.22, - "curve": [ 0.398, 0.35, 0.786, 0.76 ] - }, - { - "time": 2.1379, - "x": -48.94, - "y": -1.55, - "curve": [ 0.188, 0.21, 0.575, 0.61 ] - }, - { - "time": 2.3448, - "x": -91.69, - "y": -91.93, - "curve": [ 0.362, 0.51, 0.766, 1 ] - }, - { - "time": 2.6206, - "x": -142.79, - "y": -126.83, - "curve": [ 0.227, 0.34, 0.593, 0.75 ] - }, - { - "time": 2.7586, - "x": -176.7, - "y": -98.32, - "curve": [ 0.26, 0.4, 0.612, 0.71 ] - }, - { - "time": 2.8965, - "x": -163.95, - "y": -24.04, - "curve": [ 0.338, 0.37, 0.676, 0.71 ] - }, - { - "time": 2.9655, - "x": -150.17, - "y": 10.71, - "curve": [ 0.387, 0.61, 0.741, 1 ] - }, - { - "time": 3.1034, - "x": -102.44, - "y": 45.92, - "curve": [ 0.31, 0.24, 0.648, 0.58 ] - }, - { - "time": 3.2413, - "x": -53.99, - "y": 70.39, - "curve": [ 0.325, 0.29, 0.663, 0.63 ] - }, - { - "time": 3.3793, - "x": 1.88, - "y": 55.54, - "curve": [ 0.387, 0.33, 0.769, 0.73 ] - }, - { - "time": 3.5862, - "x": 34.26, - "y": 36.13, - "curve": [ 0.206, 0.28, 0.596, 0.67 ] - }, - { - "time": 3.7931, - "x": 23.94, - "y": 1.01, - "curve": [ 0.373, 0.56, 0.759, 1 ] - }, - { "time": 4, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0.8275, "x": 1, "y": 1 }, - { "time": 1.3103, "x": 0.742, "y": 0.742 }, - { "time": 1.7931, "x": 1, "y": 1 }, - { "time": 2.1379, "x": 1.502, "y": 1.502 }, - { "time": 2.6206, "x": 1, "y": 1 }, - { "time": 2.9655, "x": 0.707, "y": 0.707 }, - { "time": 3.3793, "x": 1, "y": 1 } - ] - } - }, - "events": [ - { "time": 0, "name": "headPop", "string": "pop.wav" }, - { "time": 1.3103, "name": "behind" }, - { "time": 2.9655, "name": "behind" }, - { "time": 4, "name": "headAttach", "string": "attach.wav" } - ], - "draworder": [ - { - "time": 0.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } + { "time": 0.3, "x": -5.99, "y": -3.71 }, + { "time": 0.4, "x": 0, "y": 0 } ] }, - { - "time": 1.7931, - "offsets": [ - { "slot": "head", "offset": 3 }, - { "slot": "eyes", "offset": 3 } - ] - }, - { - "time": 2.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { "time": 3.5862 } - ] - }, - "jump": { - "bones": { - "hip": { + "rear_upper_arm": { "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 0.9333, "angle": 0, "curve": "stepped" }, - { "time": 1.3666, "angle": 0 } + { "time": 0, "angle": 62.3 } ], "translate": [ - { "time": 0, "x": -11.57, "y": -3 }, - { "time": 0.2333, "x": -16.2, "y": -19.43 }, - { - "time": 0.3333, - "x": 7.66, - "y": -8.48, - "curve": [ 0.057, 0.06, 0.712, 1 ] - }, - { "time": 0.3666, "x": 15.38, "y": 5.01 }, - { "time": 0.4666, "x": -7.84, "y": 57.22 }, - { - "time": 0.6, - "x": -10.81, - "y": 96.34, - "curve": [ 0.241, 0, 1, 1 ] - }, - { "time": 0.7333, "x": -7.01, "y": 54.7 }, - { "time": 0.8, "x": -10.58, "y": 32.2 }, - { "time": 0.9333, "x": -31.99, "y": 0.45 }, - { "time": 1.0666, "x": -12.48, "y": -29.47 }, - { "time": 1.3666, "x": -11.57, "y": -3 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left upper leg": { - "rotate": [ - { "time": 0, "angle": 17.13 }, - { "time": 0.2333, "angle": 44.35 }, - { "time": 0.3333, "angle": 16.46 }, - { "time": 0.4, "angle": -9.88 }, - { "time": 0.4666, "angle": -11.42 }, - { "time": 0.5666, "angle": 23.46 }, - { "time": 0.7666, "angle": 71.82 }, - { "time": 0.9333, "angle": 65.53 }, - { "time": 1.0666, "angle": 51.01 }, - { "time": 1.3666, "angle": 17.13 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 0.9333, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 1.3666, "x": -3, "y": -2.25 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -16.25 }, - { "time": 0.2333, "angle": -52.21 }, - { "time": 0.4, "angle": 15.04 }, - { "time": 0.4666, "angle": -8.95 }, - { "time": 0.5666, "angle": -39.53 }, - { "time": 0.7666, "angle": -27.27 }, - { "time": 0.9333, "angle": -3.52 }, - { "time": 1.0666, "angle": -61.92 }, - { "time": 1.3666, "angle": -16.25 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": 0.33 }, - { "time": 0.2333, "angle": 6.2 }, - { "time": 0.3333, "angle": 14.73 }, - { "time": 0.4, "angle": -15.54 }, - { "time": 0.4333, "angle": -21.2 }, - { "time": 0.5666, "angle": -7.55 }, - { "time": 0.7666, "angle": -0.67 }, - { "time": 0.9333, "angle": -0.58 }, - { "time": 1.0666, "angle": 14.64 }, - { "time": 1.3666, "angle": 0.33 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 25.97 }, - { "time": 0.2333, "angle": 46.43 }, - { "time": 0.3333, "angle": 22.61 }, - { "time": 0.4, "angle": 2.13 }, - { - "time": 0.4666, - "angle": 0.04, - "curve": [ 0, 0, 0.637, 0.98 ] - }, - { "time": 0.6, "angle": 65.55 }, - { "time": 0.7666, "angle": 64.93 }, - { "time": 0.9333, "angle": 41.08 }, - { "time": 1.0666, "angle": 66.25 }, - { "time": 1.3666, "angle": 25.97 } - ], - "translate": [ - { "time": 0, "x": 5.74, "y": 0.61 }, - { "time": 0.2333, "x": 4.79, "y": 1.79 }, - { "time": 0.3333, "x": 6.05, "y": -4.55 }, - { "time": 0.9333, "x": 4.79, "y": 1.79, "curve": "stepped" }, - { "time": 1.0666, "x": 4.79, "y": 1.79 }, - { "time": 1.3666, "x": 5.74, "y": 0.61 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -27.46 }, - { "time": 0.2333, "angle": -64.03 }, - { "time": 0.4, "angle": -48.36 }, - { "time": 0.5666, "angle": -76.86 }, - { "time": 0.7666, "angle": -26.89 }, - { "time": 0.9, "angle": -18.97 }, - { "time": 0.9333, "angle": -14.18 }, - { "time": 1.0666, "angle": -80.45 }, - { "time": 1.3666, "angle": -27.46 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": 1.08 }, - { "time": 0.2333, "angle": 16.02 }, - { "time": 0.3, "angle": 12.94 }, - { "time": 0.3333, "angle": 15.16 }, - { "time": 0.4, "angle": -14.7 }, - { "time": 0.4333, "angle": -12.85 }, - { "time": 0.4666, "angle": -19.18 }, - { "time": 0.5666, "angle": -15.82 }, - { "time": 0.6, "angle": -3.59 }, - { "time": 0.7666, "angle": -3.56 }, - { "time": 0.9333, "angle": 1.86 }, - { "time": 1.0666, "angle": 16.02 }, - { "time": 1.3666, "angle": 1.08 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -13.35 }, - { "time": 0.2333, "angle": -48.95 }, - { "time": 0.4333, "angle": -35.77 }, - { "time": 0.6, "angle": -4.59 }, - { "time": 0.7666, "angle": 14.61 }, - { "time": 0.9333, "angle": 15.74 }, - { "time": 1.0666, "angle": -32.44 }, - { "time": 1.3666, "angle": -13.35 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 0.9333, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 1.3666, "x": -3.67, "y": 1.68 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 12.78 }, - { "time": 0.2333, "angle": 16.46 }, - { "time": 0.4, "angle": 26.49 }, - { "time": 0.6, "angle": 15.51 }, - { "time": 0.7666, "angle": 1.34 }, - { "time": 0.9333, "angle": 2.35 }, - { "time": 1.0666, "angle": 6.08 }, - { "time": 1.3, "angle": 21.23 }, - { "time": 1.3666, "angle": 12.78 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "head": { - "rotate": [ - { "time": 0, "angle": 5.19 }, - { "time": 0.2333, "angle": 20.27 }, - { "time": 0.4, "angle": 15.27 }, - { "time": 0.6, "angle": -24.69 }, - { "time": 0.7666, "angle": -11.02 }, - { "time": 0.9333, "angle": -24.38 }, - { "time": 1.0666, "angle": 11.99 }, - { "time": 1.3, "angle": 4.86 }, - { "time": 1.3666, "angle": 5.19 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left shoulder": { - "rotate": [ { "time": 0, - "angle": 0.05, - "curve": [ 0, 0, 0.62, 1 ] + "x": 0, + "y": 0, + "curve": [ 0, 0.3, 0.678, 1 ] }, - { - "time": 0.2333, - "angle": 279.66, - "curve": [ 0.218, 0.67, 0.66, 0.99 ] - }, - { - "time": 0.5, - "angle": 62.27, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": 28.91 }, - { "time": 1.0666, "angle": -8.62 }, - { "time": 1.1666, "angle": -18.43 }, - { "time": 1.3666, "angle": 0.05 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 0.9333, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 1.3666, "x": -1.76, "y": 0.56 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left hand": { - "rotate": [ - { "time": 0, "angle": 11.58, "curve": "stepped" }, - { "time": 0.9333, "angle": 11.58, "curve": "stepped" }, - { "time": 1.3666, "angle": 11.58 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": 0.51 }, - { "time": 0.4333, "angle": 12.82 }, - { "time": 0.6, "angle": 47.55 }, - { "time": 0.9333, "angle": 12.82 }, - { "time": 1.1666, "angle": -6.5 }, - { "time": 1.3666, "angle": 0.51 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 43.82, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": -8.74, - "curve": [ 0.304, 0.58, 0.709, 0.97 ] - }, - { - "time": 0.5333, - "angle": -208.02, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": -246.72 }, - { "time": 1.0666, "angle": -307.13 }, - { "time": 1.1666, "angle": 37.15 }, - { "time": 1.3666, "angle": 43.82 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 0.9333, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 1.3666, "x": -7.84, "y": 7.19 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right arm": { - "rotate": [ - { "time": 0, "angle": -4.02 }, - { "time": 0.6, "angle": 17.5 }, - { "time": 0.9333, "angle": -4.02 }, - { "time": 1.1666, "angle": -16.72 }, - { "time": 1.3666, "angle": -4.02 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92, "curve": "stepped" }, - { "time": 0.9333, "angle": 22.92, "curve": "stepped" }, - { "time": 1.3666, "angle": 22.92 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "root": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4333, "angle": -14.52 }, - { "time": 0.8, "angle": 9.86 }, - { "time": 1.3666, "angle": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } + { "time": 0.3, "x": 2.81, "y": 11.41 }, + { "time": 0.4, "x": 0, "y": 0 } ] } } }, - "walk": { + "test": { + "slots": { + "front_foot": { + "color": [ + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "ff0700ff" } + ] + }, + "gun": { + "color": [ + { "time": 0, "color": "ffffffff", "curve": "stepped" }, + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "32ff00ff" } + ] + }, + "rear_foot": { + "color": [ + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "ff0700ff" } + ] + } + }, "bones": { - "left upper leg": { + "head": { "rotate": [ - { "time": 0, "angle": -26.55 }, - { "time": 0.1333, "angle": -8.78 }, - { "time": 0.2666, "angle": 9.51 }, - { "time": 0.4, "angle": 30.74 }, - { "time": 0.5333, "angle": 25.33 }, - { "time": 0.6666, "angle": 26.11 }, - { "time": 0.8, "angle": -7.7 }, - { "time": 0.9333, "angle": -21.19 }, - { "time": 1.0666, "angle": -26.55 } + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": -20.72 }, + { "time": 0.6666, "angle": -32.41 }, + { "time": 1, "angle": -5.3 }, + { "time": 1.3333, "angle": 24.96 }, + { "time": 1.6666, "angle": 15.61 }, + { "time": 2, "angle": 0 } ], "translate": [ - { "time": 0, "x": -3, "y": -2.25 }, - { "time": 0.4, "x": -2.18, "y": -2.25 }, - { "time": 1.0666, "x": -3, "y": -2.25 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 42.45 }, - { "time": 0.1333, "angle": 52.1 }, - { "time": 0.2666, "angle": 5.96 }, - { "time": 0.5333, "angle": -16.93 }, - { "time": 0.6666, "angle": 1.89 }, - { - "time": 0.8, - "angle": 28.06, - "curve": [ 0.462, 0.11, 1, 1 ] - }, - { - "time": 0.9333, - "angle": 58.68, - "curve": [ 0.5, 0.02, 1, 1 ] - }, - { "time": 1.0666, "angle": 42.45 } - ], - "translate": [ - { "time": 0, "x": 8.11, "y": -2.36 }, - { "time": 0.1333, "x": 10.03, "y": -2.56 }, - { "time": 0.4, "x": 2.76, "y": -2.97 }, - { "time": 0.5333, "x": 2.76, "y": -2.81 }, - { "time": 0.9333, "x": 8.67, "y": -2.54 }, - { "time": 1.0666, "x": 8.11, "y": -2.36 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -10.21 }, - { "time": 0.1333, "angle": -55.64 }, - { "time": 0.2666, "angle": -68.12 }, - { "time": 0.5333, "angle": 5.11 }, - { "time": 0.6666, "angle": -28.29 }, - { "time": 0.8, "angle": 4.08 }, - { "time": 0.9333, "angle": 3.53 }, - { "time": 1.0666, "angle": -10.21 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2666, "angle": -17.14 }, - { "time": 0.4, "angle": -2.83 }, - { "time": 0.5333, "angle": -3.87 }, - { "time": 0.6666, "angle": 2.78 }, - { "time": 0.8, "angle": 1.68 }, - { "time": 0.9333, "angle": -8.54 }, - { "time": 1.0666, "angle": -3.69 } - ] - }, - "right shoulder": { - "rotate": [ { "time": 0, - "angle": 20.89, - "curve": [ 0.264, 0, 0.75, 1 ] + "x": 0, + "y": 0, + "curve": [ 0.172, 0.37, 0.574, 0.73 ] }, { - "time": 0.1333, - "angle": 3.72, - "curve": [ 0.272, 0, 0.841, 1 ] - }, - { "time": 0.6666, "angle": -278.28 }, - { "time": 1.0666, "angle": 20.89 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19 }, - { "time": 0.1333, "x": -6.36, "y": 6.42 }, - { "time": 0.6666, "x": -11.07, "y": 5.25 }, - { "time": 1.0666, "x": -7.84, "y": 7.19 } - ] - }, - "right arm": { - "rotate": [ - { - "time": 0, - "angle": -4.02, - "curve": [ 0.267, 0, 0.804, 0.99 ] + "time": 0.1666, + "x": 144.19, + "y": -77.59, + "curve": [ 0.372, 0.61, 0.765, 1 ] }, { - "time": 0.1333, - "angle": -13.99, - "curve": [ 0.341, 0, 1, 1 ] + "time": 0.3333, + "x": 217.61, + "y": -192.63, + "curve": [ 0.282, 0, 0.624, 0.31 ] + }, + { + "time": 0.5, + "x": 181.21, + "y": -365.66, + "curve": [ 0.313, 0.21, 0.654, 0.54 ] }, { "time": 0.6666, - "angle": 36.54, - "curve": [ 0.307, 0, 0.787, 0.99 ] + "x": 20.09, + "y": -500.4, + "curve": [ 0.147, 0.27, 0.75, 1 ] }, - { "time": 1.0666, "angle": -4.02 } + { "time": 0.8333, "x": -194.24, "y": -341.84 }, + { "time": 1, "x": -307.93, "y": -114 }, + { + "time": 1.1666, + "x": -330.38, + "y": 121.42, + "curve": [ 0.25, 0, 0.764, 0.48 ] + }, + { + "time": 1.3333, + "x": -240.42, + "y": 335.66, + "curve": [ 0.229, 0.37, 0.58, 0.73 ] + }, + { + "time": 1.5, + "x": -56.12, + "y": 288.06, + "curve": [ 0.296, 0.6, 0.641, 1 ] + }, + { + "time": 1.6666, + "x": 87.63, + "y": 191.33, + "curve": [ 0.238, 0, 0.626, 0.39 ] + }, + { + "time": 1.8333, + "x": 60.62, + "y": 95.14, + "curve": [ 0.41, 0.26, 0.803, 0.62 ] + }, + { "time": 2, "x": 0, "y": 0 } + ] + } + }, + "draworder": [ + { + "time": 0.6666, + "offsets": [ + { "slot": "head", "offset": -9 }, + { "slot": "eye", "offset": -9 }, + { "slot": "mouth", "offset": -12 }, + { "slot": "goggles", "offset": -12 } ] }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92 }, - { "time": 0.4, "angle": -8.97 }, - { "time": 0.6666, "angle": 0.51 }, - { "time": 1.0666, "angle": 22.92 } + { "time": 1.3333 } + ], + "events": [ + { "time": 0, "name": "headPop", "int": 0, "float": 0, "string": "pop.wav" }, + { "time": 1, "name": "headBehind", "int": 7, "float": 8, "string": "animate" }, + { "time": 2, "name": "headAttach", "int": 0, "float": 0, "string": "attach.wav" } + ] + }, + "walk": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_closed" } ] }, - "left shoulder": { + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_smile" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { "rotate": [ - { "time": 0, "angle": -1.47 }, - { "time": 0.1333, "angle": 13.6 }, - { "time": 0.6666, "angle": 280.74 }, - { "time": 1.0666, "angle": -1.47 } + { "time": 0, "angle": 15.79 }, + { "time": 0.1, "angle": 27.39 }, + { "time": 0.2, "angle": -7.94 }, + { "time": 0.3, "angle": -16.94 }, + { "time": 0.4, "angle": -28.62 }, + { "time": 0.5, "angle": -19.3 }, + { "time": 0.6, "angle": -3.08 }, + { "time": 0.7, "angle": 29.51 }, + { "time": 0.8, "angle": 15.79 } ], "translate": [ - { "time": 0, "x": -1.76, "y": 0.56 }, - { "time": 0.6666, "x": -2.47, "y": 8.14 }, - { "time": 1.0666, "x": -1.76, "y": 0.56 } + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": -1.18, "y": 0.54 }, + { "time": 0.5, "x": 0.11, "y": 0.41 }, + { "time": 0.6, "x": 9.48, "y": 0.27 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.4, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, - "left hand": { + "front_shin": { "rotate": [ - { - "time": 0, - "angle": 11.58, - "curve": [ 0.169, 0.37, 0.632, 1.55 ] - }, - { - "time": 0.1333, - "angle": 28.13, - "curve": [ 0.692, 0, 0.692, 0.99 ] - }, - { - "time": 0.6666, - "angle": -27.42, - "curve": [ 0.117, 0.41, 0.738, 1.76 ] - }, - { "time": 0.8, "angle": -36.32 }, - { "time": 1.0666, "angle": 11.58 } + { "time": 0, "angle": 5.12 }, + { "time": 0.1, "angle": -20.87 }, + { "time": 0.2, "angle": 13.37 }, + { "time": 0.3, "angle": 15.98 }, + { "time": 0.4, "angle": 5.94 }, + { "time": 0.5, "angle": -26.76 }, + { "time": 0.7, "angle": -55.44 }, + { "time": 0.8, "angle": 5.12 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, - "left arm": { + "rear_thigh": { "rotate": [ - { "time": 0, "angle": -8.27 }, - { "time": 0.1333, "angle": 18.43 }, - { "time": 0.6666, "angle": 0.88 }, - { "time": 1.0666, "angle": -8.27 } + { "time": 0, "angle": -34.38 }, + { "time": 0.1, "angle": -30.32 }, + { "time": 0.2, "angle": -37.22 }, + { "time": 0.3, "angle": 20.73 }, + { "time": 0.4, "angle": 8.69 }, + { "time": 0.5, "angle": 12.16 }, + { "time": 0.6, "angle": -24.62 }, + { "time": 0.7, "angle": -27.26 }, + { "time": 0.8, "angle": -34.38 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": 4.08, "y": -9.53 }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.7, "x": -21.14, "y": -9.6 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 14.26 }, + { "time": 0.1, "angle": -17.3 }, + { "time": 0.2, "angle": -12.67 }, + { "time": 0.3, "angle": -58.89 }, + { "time": 0.4, "angle": 15.95 }, + { "time": 0.5, "angle": -9 }, + { "time": 0.6, "angle": 26.06 }, + { "time": 0.7, "angle": 21.85 }, + { "time": 0.8, "angle": 14.26 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 }, + { "time": 0.1, "x": 0.951, "y": 1 }, + { "time": 0.5, "x": 0.975, "y": 1 }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 10.13 }, + { "time": 0.1, "angle": 12.27 }, + { "time": 0.2, "angle": -2.94 }, + { "time": 0.3, "angle": 6.29 }, + { "time": 0.4, "angle": 13.45 }, + { "time": 0.5, "angle": -3.57 }, + { "time": 0.6, "angle": -0.97 }, + { "time": 0.7, "angle": 2.97 }, + { "time": 0.8, "angle": 10.13 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -23.74 }, + { "time": 0.4, "angle": -320.57 }, + { "time": 0.8, "angle": -23.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 11.62 }, + { "time": 0.1, "angle": 19.36 }, + { "time": 0.4, "angle": 345.26 }, + { "time": 0.5, "angle": 343.44 }, + { "time": 0.8, "angle": 11.62 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, "torso": { "rotate": [ - { "time": 0, "angle": -10.28 }, - { - "time": 0.1333, - "angle": -15.38, - "curve": [ 0.545, 0, 1, 1 ] - }, - { - "time": 0.4, - "angle": -9.78, - "curve": [ 0.58, 0.17, 1, 1 ] - }, - { "time": 0.6666, "angle": -15.75 }, - { "time": 0.9333, "angle": -7.06 }, - { "time": 1.0666, "angle": -10.28 } + { "time": 0, "angle": -12.11 }, + { "time": 0.1666, "angle": -17.16 }, + { "time": 0.4, "angle": -12.11 }, + { "time": 0.5666, "angle": -15.81 }, + { "time": 0.8, "angle": -12.11 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 1.41 }, + { "time": 0.2333, "angle": -3.04 }, + { "time": 0.4, "angle": 1.41 }, + { "time": 0.6333, "angle": -3.04 }, + { "time": 0.8, "angle": 1.41 } ], "translate": [ - { "time": 0, "x": -3.67, "y": 1.68 }, - { "time": 0.1333, "x": -3.67, "y": 0.68 }, - { "time": 0.4, "x": -3.67, "y": 1.97 }, - { "time": 0.6666, "x": -3.67, "y": -0.14 }, - { "time": 1.0666, "x": -3.67, "y": 1.68 } + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, - "right foot": { + "head": { "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2666, "angle": -4.08 }, - { "time": 0.4, "angle": -6.45 }, - { "time": 0.5333, "angle": -5.39 }, - { "time": 0.8, "angle": -11.68 }, - { "time": 0.9333, "angle": 0.46 }, - { "time": 1.0666, "angle": -5.25 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -3.39 }, - { "time": 0.1333, "angle": -45.53 }, - { "time": 0.2666, "angle": -2.59 }, - { "time": 0.5333, "angle": -19.53 }, - { "time": 0.6666, "angle": -64.8 }, - { - "time": 0.8, - "angle": -82.56, - "curve": [ 0.557, 0.18, 1, 1 ] - }, - { "time": 1.0666, "angle": -3.39 } + { "time": 0, "angle": 6.97 }, + { "time": 0.1666, "angle": 8.02 }, + { "time": 0.2666, "angle": 12.65 }, + { "time": 0.4, "angle": 6.97 }, + { "time": 0.5666, "angle": 8.02 }, + { "time": 0.6666, "angle": 12.65 }, + { "time": 0.8, "angle": 6.97 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, "hip": { "rotate": [ { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 1.0666, "angle": 0 } + { "time": 0.8, "angle": 0 } ], "translate": [ - { "time": 0, "x": 0, "y": 0 }, { - "time": 0.1333, - "x": 0, - "y": -7.61, - "curve": [ 0.272, 0.86, 1, 1 ] + "time": 0, + "x": -23.93, + "y": 3.22, + "curve": [ 0.518, 0.03, 0.807, 0.61 ] }, - { "time": 0.4, "x": 0, "y": 8.7 }, - { "time": 0.5333, "x": 0, "y": -0.41 }, { - "time": 0.6666, - "x": 0, - "y": -7.05, - "curve": [ 0.235, 0.89, 1, 1 ] + "time": 0.1, + "x": -23.93, + "y": -9.24, + "curve": [ 0.135, 0.33, 0.601, 0.99 ] }, - { "time": 0.8, "x": 0, "y": 2.92 }, - { "time": 0.9333, "x": 0, "y": 6.78 }, - { "time": 1.0666, "x": 0, "y": 0 } + { + "time": 0.2, + "x": -23.93, + "y": 4.35, + "curve": [ 0.204, 0.68, 0.75, 1 ] + }, + { + "time": 0.3, + "x": -23.93, + "y": 2.38, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.4, + "x": -23.93, + "y": -2.5, + "curve": [ 0.692, 0.01, 0.75, 1 ] + }, + { + "time": 0.5, + "x": -23.93, + "y": -10.32, + "curve": [ 0.235, 0.77, 0.75, 1 ] + }, + { + "time": 0.6, + "x": -23.93, + "y": 4.35, + "curve": [ 0.287, 0.37, 0.718, 0.76 ] + }, + { + "time": 0.7, + "x": -23.93, + "y": 10.34, + "curve": [ 0.615, 0, 0.75, 1 ] + }, + { "time": 0.8, "x": -23.93, "y": 3.22 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, - "neck": { + "front_bracer": { "rotate": [ - { "time": 0, "angle": 3.6 }, - { "time": 0.1333, "angle": 17.49 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { "time": 0.5333, "angle": 5.17 }, - { "time": 0.6666, "angle": 18.36 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } + { "time": 0, "angle": 0 }, + { "time": 0.4, "angle": 20.59 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] }, - "head": { + "front_foot": { + "rotate": [ + { "time": 0, "angle": 12.49 }, + { "time": 0.1, "angle": -8.34 }, + { "time": 0.2, "angle": -6.17 }, + { "time": 0.3, "angle": -0.75 }, + { "time": 0.3333, "angle": 3.89 }, + { "time": 0.4, "angle": 10.22 }, + { "time": 0.5, "angle": 11.44 }, + { "time": 0.6, "angle": -0.33 }, + { "time": 0.7, "angle": 0.15 }, + { "time": 0.8, "angle": 12.49 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 3.58 }, + { "time": 0.1, "angle": 5.51 }, + { "time": 0.4, "angle": -22.77 }, + { "time": 0.5, "angle": -9.65 }, + { "time": 0.8, "angle": 3.58 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -15.22 }, + { "time": 0.1, "angle": -51.4 }, + { "time": 0.4, "angle": -39.4 }, + { "time": 0.5, "angle": 19.26 }, + { "time": 0.8, "angle": -15.22 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "gun": { "rotate": [ { "time": 0, - "angle": 3.6, - "curve": [ 0, 0, 0.704, 1.61 ] + "angle": -24.06, + "curve": [ 0.25, 0, 0.75, 1 ] }, - { "time": 0.1666, "angle": -0.2 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, { - "time": 0.5333, - "angle": 5.17, - "curve": [ 0, 0, 0.704, 1.61 ] + "time": 0.1, + "angle": -10.94, + "curve": [ 0.381, 0.54, 0.742, 1 ] }, - { "time": 0.7, "angle": 1.1 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } + { + "time": 0.4, + "angle": 25.34, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -27.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.8, "angle": -24.06 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } ] } } diff --git a/tests/cpp-tests/Resources/spine/spineboy.png b/tests/cpp-tests/Resources/spine/spineboy.png old mode 100755 new mode 100644 index b8b493dfd1..b43262310a Binary files a/tests/cpp-tests/Resources/spine/spineboy.png and b/tests/cpp-tests/Resources/spine/spineboy.png differ diff --git a/tests/cpp-tests/Resources/spine/sprite.png b/tests/cpp-tests/Resources/spine/sprite.png old mode 100755 new mode 100644 diff --git a/tests/cpp-tests/proj.android/jni/Android.mk b/tests/cpp-tests/proj.android/jni/Android.mk index 566aec556f..0c5593c36a 100644 --- a/tests/cpp-tests/proj.android/jni/Android.mk +++ b/tests/cpp-tests/proj.android/jni/Android.mk @@ -49,6 +49,7 @@ LOCAL_SRC_FILES := main.cpp \ ../../Classes/EffectsAdvancedTest/EffectsAdvancedTest.cpp \ ../../Classes/EffectsTest/EffectsTest.cpp \ ../../Classes/ExtensionsTest/ExtensionsTest.cpp \ +../../Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp \ ../../Classes/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.cpp \ ../../Classes/ExtensionsTest/CocosBuilderTest/AnimationsTest/AnimationsTestLayer.cpp \ ../../Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.cpp \ diff --git a/tests/cpp-tests/proj.ios/Default-667h@2x.png b/tests/cpp-tests/proj.ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/cpp-tests/proj.ios/Default-667h@2x.png differ diff --git a/tests/cpp-tests/proj.ios/Default-736h@3x.png b/tests/cpp-tests/proj.ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/cpp-tests/proj.ios/Default-736h@3x.png differ diff --git a/tests/cpp-tests/proj.ios/Info.plist b/tests/cpp-tests/proj.ios/Info.plist index 0d0aff0b3b..46501d316c 100644 --- a/tests/cpp-tests/proj.ios/Info.plist +++ b/tests/cpp-tests/proj.ios/Info.plist @@ -57,6 +57,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIAppFonts diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 37a51472fc..7a885faf09 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -145,6 +145,7 @@ + @@ -233,7 +234,6 @@ - @@ -334,6 +334,7 @@ + @@ -425,7 +426,6 @@ - @@ -577,4 +577,4 @@ - + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 158b6fab9c..98b97b0ac6 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -331,8 +331,8 @@ {54a30b92-ddfb-420e-908b-886c23c21cf1} - - {a0b90b93-5575-4729-9afc-8a3839b378ac} + + {f6c2eb6d-ad25-4287-a2a4-1c0d7382a49f} {0ebafb87-26f5-4a07-b36f-1e4fa03afbe8} @@ -876,12 +876,12 @@ Classes\BillBoardTest + + Classes\ExtensionsTest\AssetsManagerExTest + Classes\LightTest - - Classes\UITest\CocostudioGUISceneTest\UIWebViewTest - Classes\NewAudioEngineTest @@ -1622,12 +1622,12 @@ Classes\BillBoardTest + + Classes\ExtensionsTest\AssetsManagerExTest + Classes\LightTest - - Classes\UITest\CocostudioGUISceneTest\UIWebViewTest - Classes\NewAudioEngineTest diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml new file mode 100644 index 0000000000..e7d31aea9d --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml @@ -0,0 +1,13 @@ + + + + + cpp_tests + + + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp new file mode 100644 index 0000000000..ecdc3bc361 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "pch.h" +#include "OpenGLESPage.xaml.h" + +using namespace cpp_tests; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h new file mode 100644 index 0000000000..135590b547 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cpp_tests +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.cpp new file mode 100644 index 0000000000..2e6700d0bc --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.cpp @@ -0,0 +1,161 @@ +// Based on Hello_Triangle.c from +// Book: OpenGL(R) ES 2.0 Programming Guide +// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner +// ISBN-10: 0321502795 +// ISBN-13: 9780321502797 +// Publisher: Addison-Wesley Professional +// URLs: http://safari.informit.com/9780321563835 +// http://www.opengles-book.com + +// +// This file is used by the template to render a basic scene using GL. +// + +#include "pch.h" +#include "HelloTriangleRenderer.h" + +// These are used by the shader compilation methods. +#include +#include +#include + +using namespace Platform; + +using namespace cpp_tests; + +#define STRING(s) #s + +GLuint CompileShader(GLenum type, const std::string &source) +{ + GLuint shader = glCreateShader(type); + + const char *sourceArray[1] = { source.c_str() }; + glShaderSource(shader, 1, sourceArray, NULL); + glCompileShader(shader); + + GLint compileResult; + glGetShaderiv(shader, GL_COMPILE_STATUS, &compileResult); + + if (compileResult == 0) + { + GLint infoLogLength; + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLength); + + std::vector infoLog(infoLogLength); + glGetShaderInfoLog(shader, (GLsizei)infoLog.size(), NULL, infoLog.data()); + + std::wstring errorMessage = std::wstring(L"Shader compilation failed: "); + errorMessage += std::wstring(infoLog.begin(), infoLog.end()); + + throw Exception::CreateException(E_FAIL, ref new Platform::String(errorMessage.c_str())); + } + + return shader; +} + +GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource) +{ + GLuint program = glCreateProgram(); + + if (program == 0) + { + throw Exception::CreateException(E_FAIL, L"Program creation failed"); + } + + GLuint vs = CompileShader(GL_VERTEX_SHADER, vsSource); + GLuint fs = CompileShader(GL_FRAGMENT_SHADER, fsSource); + + if (vs == 0 || fs == 0) + { + glDeleteShader(fs); + glDeleteShader(vs); + glDeleteProgram(program); + return 0; + } + + glAttachShader(program, vs); + glDeleteShader(vs); + + glAttachShader(program, fs); + glDeleteShader(fs); + + glLinkProgram(program); + + GLint linkStatus; + glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); + + if (linkStatus == 0) + { + GLint infoLogLength; + glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLogLength); + + std::vector infoLog(infoLogLength); + glGetProgramInfoLog(program, (GLsizei)infoLog.size(), NULL, infoLog.data()); + + std::wstring errorMessage = std::wstring(L"Program link failed: "); + errorMessage += std::wstring(infoLog.begin(), infoLog.end()); + + throw Exception::CreateException(E_FAIL, ref new Platform::String(errorMessage.c_str())); + } + + return program; +} + +HelloTriangleRenderer::HelloTriangleRenderer() : + mProgram(0) +{ + // Vertex Shader source + const std::string vs = STRING + ( + attribute vec4 vPosition; + void main() + { + gl_Position = vPosition; + } + ); + + // Fragment Shader source + const std::string fs = STRING + ( + precision mediump float; + void main() + { + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); + } + ); + + // CompileProgram will throw if it fails, so we don't need to check for success. + mProgram = CompileProgram(vs, fs); +} + +HelloTriangleRenderer::~HelloTriangleRenderer() +{ + if (mProgram != 0) + { + glDeleteProgram(mProgram); + mProgram = 0; + } +} + +// Draws a basic triangle +void HelloTriangleRenderer::Draw(GLsizei width, GLsizei height) +{ + glViewport(0, 0, width, height); + + GLfloat vertices[] = + { + 0.0f, 0.5f, 0.0f, + -0.5f, -0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, + }; + + glClear(GL_COLOR_BUFFER_BIT); + + glUseProgram(mProgram); + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vertices); + glEnableVertexAttribArray(0); + + glDrawArrays(GL_TRIANGLES, 0, 3); +} + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.h new file mode 100644 index 0000000000..410f5a2a54 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/HelloTriangleRenderer.h @@ -0,0 +1,17 @@ +#pragma once + +#include "pch.h" + +namespace cpp_tests +{ + class HelloTriangleRenderer + { + public: + HelloTriangleRenderer(); + ~HelloTriangleRenderer(); + void Draw(GLsizei width, GLsizei height); + + private: + GLuint mProgram; + }; +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.cpp new file mode 100644 index 0000000000..793b91d83f --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.cpp @@ -0,0 +1,153 @@ +#include "pch.h" + +using namespace Platform; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; + +OpenGLES::OpenGLES() : + mEglConfig(nullptr), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT) +{ + Initialize(); +} + +OpenGLES::~OpenGLES() +{ + Cleanup(); +} + +void OpenGLES::Initialize() +{ + const EGLint configAttributes[] = + { + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 8, + EGL_STENCIL_SIZE, 8, + EGL_NONE + }; + + const EGLint displayAttributes[] = + { + // This can be used to configure D3D11. For example, EGL_PLATFORM_ANGLE_TYPE_D3D11_FL9_3_ANGLE could be used. + // This would ask the graphics card to use D3D11 Feature Level 9_3 instead of Feature Level 11_0+. + // On Windows Phone, this would allow the Phone Emulator to act more like the GPUs that are available on real Phone devices. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_NONE, + }; + + const EGLint contextAttributes[] = + { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + // eglGetPlatformDisplayEXT is an alternative to eglGetDisplay. It allows us to pass in 'displayAttributes' to configure D3D11. + PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); + if (!eglGetPlatformDisplayEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to get function eglGetPlatformDisplayEXT"); + } + + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, displayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get default EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to initialize EGL"); + } + + EGLint numConfigs = 0; + if (eglGetConfigs(mEglDisplay, NULL, 0, &numConfigs) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGLConfig count"); + } + + if (eglChooseConfig(mEglDisplay, configAttributes, &mEglConfig, 1, &numConfigs) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to choose first EGLConfig"); + } + + mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttributes); + if (mEglContext == EGL_NO_CONTEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL context"); + } +} + +void OpenGLES::Cleanup() +{ + if (mEglDisplay != EGL_NO_DISPLAY && mEglContext != EGL_NO_CONTEXT) + { + eglDestroyContext(mEglDisplay, mEglContext); + mEglContext = EGL_NO_CONTEXT; + } + + if (mEglDisplay != EGL_NO_DISPLAY) + { + eglTerminate(mEglDisplay); + mEglDisplay = EGL_NO_DISPLAY; + } +} + +void OpenGLES::Reset() +{ + Cleanup(); + Initialize(); +} + +EGLSurface OpenGLES::CreateSurface(SwapChainPanel^ panel, const Size* renderSurfaceSize) +{ + if (!panel) + { + throw Exception::CreateException(E_INVALIDARG, L"SwapChainPanel parameter is invalid"); + } + + EGLSurface surface = EGL_NO_SURFACE; + + // Create a PropertySet and initialize with the EGLNativeWindowType. + PropertySet^ surfaceCreationProperties = ref new PropertySet(); + surfaceCreationProperties->Insert(ref new String(EGLNativeWindowTypeProperty), panel); + + // If a render surface size is specified, add it to the surface creation properties + if (renderSurfaceSize != nullptr) + { + surfaceCreationProperties->Insert(ref new String(EGLRenderSurfaceSizeProperty), PropertyValue::CreateSize(*renderSurfaceSize)); + } + + surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, reinterpret_cast(surfaceCreationProperties), NULL); + if (surface == EGL_NO_SURFACE) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL surface"); + } + + return surface; +} + +void OpenGLES::DestroySurface(const EGLSurface surface) +{ + if (mEglDisplay != EGL_NO_DISPLAY && surface != EGL_NO_SURFACE) + { + eglDestroySurface(mEglDisplay, surface); + } +} + +void OpenGLES::MakeCurrent(const EGLSurface surface) +{ + if (eglMakeCurrent(mEglDisplay, surface, surface, mEglContext) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to make EGLSurface current"); + } +} + +EGLBoolean OpenGLES::SwapBuffers(const EGLSurface surface) +{ + return (eglSwapBuffers(mEglDisplay, surface)); +} diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.h new file mode 100644 index 0000000000..2190e23c57 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/OpenGLES.h @@ -0,0 +1,23 @@ +#pragma once + +class OpenGLES +{ +public: + OpenGLES(); + ~OpenGLES(); + + EGLSurface CreateSurface(Windows::UI::Xaml::Controls::SwapChainPanel^ panel, const Windows::Foundation::Size* renderSurfaceSize); + void DestroySurface(const EGLSurface surface); + void MakeCurrent(const EGLSurface surface); + EGLBoolean SwapBuffers(const EGLSurface surface); + void Reset(); + +private: + void Initialize(); + void Cleanup(); + +private: + EGLDisplay mEglDisplay; + EGLContext mEglContext; + EGLConfig mEglConfig; +}; diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems new file mode 100644 index 0000000000..581da1b3de --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems @@ -0,0 +1,472 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {be3a1791-5bce-4cea-92cd-0e2d86dde27a} + cpp_tests + cpp-tests.Shared + f6ae64be-127a-4f7d-ad15-53a0fddb7f41 + + + + %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + $(MSBuildThisFileDirectory)App.xaml + + + + + $(MSBuildThisFileDirectory)App.xaml + + + + + Designer + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters new file mode 100644 index 0000000000..46fafd09d3 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters @@ -0,0 +1,1650 @@ + + + + + + + + Classes\ActionManagerTest + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurlTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\FileUtilsTest + + + Classes\InputTest\FontTest + + + Classes\InputTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + Classes\UITest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomImageTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UIFocusTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIRichTextTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\CocostudioParserTest + + + Classes\ExtensionsTest\AssetsManagerExTest + + + + + + + + Classes\ActionManagerTest + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurlTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\FileUtilsTest + + + Classes\InputTest\FontTest + + + Classes\InputTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + Classes\UITest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomImageTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UIFocusTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIRichTextTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\CocostudioParserTest + + + Classes\ExtensionsTest\AssetsManagerExTest + + + + + + + + + + + + + + {f391ec0c-7b86-4c69-a813-4408c0c29d10} + + + {784f6224-8e31-4d40-a41e-4c2fe7d59cc6} + + + {3969a756-b4c1-4c34-8c8e-e3c7b664957b} + + + {bfe12b3d-59c6-4c75-8698-57287c4027f8} + + + {58b95f58-d80a-4a1f-9092-b37ffc737b96} + + + {814ade2d-f829-4c47-aaca-e42973c1db3d} + + + {efe9c39a-90f7-41ab-b8db-f1fd1aa778d8} + + + {73532d98-203d-4bd9-817f-4ea53c517734} + + + {837f9d86-c5a5-4a6d-8146-ef1fc7bf4486} + + + {bef7f2ae-5316-4969-9bca-671bec69d657} + + + {ae7e0028-86fd-4844-9762-2f6421c34002} + + + {5f90fcaa-d833-4e8e-a495-a5fb2bd055f3} + + + {7d85d710-211a-4900-bedf-f6960cbffad2} + + + {83c5f16c-a381-4baf-8e50-074983fae35c} + + + {e1c57b44-5e20-40d7-b4c5-3125722b7ce5} + + + {0cfd5602-4bf6-4c53-bb4d-b5b31710fc19} + + + {4eec7e1e-cf38-4487-baaf-60dfdfa05151} + + + {93a58e0c-fb89-4509-9f60-85e8ce13eb8e} + + + {669f92bc-a151-40b6-9b60-dc135fbd4273} + + + {6047df81-7dab-4501-9c53-c256ee288cc1} + + + {ab724fe2-63cd-428d-9a10-237acc3cf3f9} + + + {116f5c58-3bb4-4245-aef4-f4f01259813c} + + + {7969a029-c634-41cb-ae18-9a88ada33ef2} + + + {8c3ab6f3-0ad4-4975-bc97-fea3203d3e4b} + + + {82b3b01f-888e-4240-8e25-814674de5fe7} + + + {fa9c060e-9543-478f-bcb8-ab8398ce816d} + + + {8a717ab0-bedc-49b7-b8e2-59b8af5f9619} + + + {afafc668-64ed-4e5e-9c8e-67c6bd9d78cf} + + + {661a29a4-770b-45d5-a958-b2e6cac37196} + + + {125637c8-3613-4d92-ba03-3b09d35ba748} + + + {1e03c44a-f6bc-4668-9ed3-6e597a94a94b} + + + {7ccc51aa-fc85-46ba-83d9-3138031e6034} + + + {7a56806d-9273-4d1d-8514-abfe13ecd43e} + + + {0cdc1974-166f-45c8-807f-11240d3bc9eb} + + + {b8791078-58dd-4e66-bfd5-424bd21bb990} + + + {d03098a9-23cb-4416-a708-dfe38e646f5d} + + + {c324aaa0-a652-41e4-867a-623f11b1bf1c} + + + {cf646b59-29c8-4591-a204-fc9f18e841a7} + + + {d6c3a1f7-8636-4d93-86e1-cb91089d991b} + + + {2bbe5860-9ad5-4853-b5e6-7464f24fd07a} + + + {823b55fb-d90a-410f-bccb-87d05c8f48d3} + + + {bb57df61-7f39-494b-a061-6e5d18d914ac} + + + {792c879a-1aad-4952-913f-3541b0b988ea} + + + {f21347d1-eee3-41d8-93b8-f078be49cbba} + + + {00f84260-18d5-4666-b444-e83cb00108fa} + + + {1b3d89b1-5eb3-4634-affb-39bf18b4601c} + + + {b73283dc-1c4e-4c6f-a2c7-6df60752bb6c} + + + {0dec3c93-bbb2-4461-bbd8-bae267d16620} + + + {ec720c13-b0bf-48e5-8fa0-1b7816f1aa3f} + + + {278aa377-14ba-4dce-a029-53a657b880d7} + + + {ace7592c-2a5d-4c6e-b56a-eeda64c44524} + + + {d165f9b9-74a3-4ff6-a5a3-6ebc43c1c4b1} + + + {16d2de7d-1133-4d71-b26f-d5540aed389a} + + + {11c29331-bdae-4675-af94-feb48fa06ed0} + + + {1f7b1b36-2c09-4717-8c06-7f602c402116} + + + {bc8d7588-16c1-438c-9313-13e596159cd9} + + + {4993f3de-958b-49dd-9c2e-2cf0aa1bcd7b} + + + {65affa7c-fd14-4568-a6b7-7747c462b7ad} + + + {8a1b4921-e6b0-439a-8adb-6881dd3f9cee} + + + {491a70bf-8338-4d4f-93b3-07f15d08ae24} + + + {5be8b84a-3e7b-49ef-95f8-ee7937ea89b2} + + + {77421d23-828e-4c2c-ba6b-630904771b82} + + + {2fe7368e-9751-4721-9eff-58153c669b6e} + + + {9febdcc8-5f5f-4757-ab82-dfa372517bfc} + + + {32e8ec0c-3552-4039-9751-273c525c7539} + + + {f1b2fe20-cce4-4885-919c-893014a66c95} + + + {82efd737-e8e7-4086-85e8-fb4229430d52} + + + {cc43ce58-9f43-4a06-9c51-e8aa588dfa94} + + + {baa5d22b-c453-4aba-a286-86a79614ee79} + + + {8e9d7d79-3cb4-4309-99f8-c6fe619df99e} + + + {c311adec-0d2e-40ec-97dd-e37f3279cacd} + + + {1644f6d4-1e8e-496f-bc58-fd6df7dadff0} + + + {fc2fa628-d858-40e0-8147-7a7c199276e5} + + + {a4ce391a-161c-4054-b10c-2bf57d151670} + + + {3b9baa68-f05a-4333-87a1-ac8d88b08d8e} + + + {f12b586c-8ad5-4a75-a643-5c4c1b89bfa0} + + + {4e6fd0ff-c790-4ae5-8bff-888f40ee9659} + + + {f1d5116f-a7fe-49fb-b3bd-6de0f2dabc9b} + + + {0fc0238a-39fb-40f6-9cf9-c452e651562e} + + + {29899d4b-d806-426f-8447-d7c83454c1cf} + + + {85734285-17b1-4122-a0a9-9e1c774a7558} + + + {d4c281b6-6279-4555-aa75-883f27e2a91c} + + + {e9f49d1a-9dd8-48df-b1bd-e067a7ec37cd} + + + {c54c84ec-5edf-4423-bcdd-5f6578b65525} + + + {daf6246b-c673-432b-be5d-7a2bb067a255} + + + {bc1094f8-6f03-45c3-b475-1ab16210b4b5} + + + {19bdeacf-7740-4c9c-822f-f8d3ea98d452} + + + {cf276f2c-502f-4752-9f0a-49910b3a5af3} + + + {054ab72c-845e-43ab-8a02-4f73569f7e02} + + + {6af0635b-c984-43a1-9263-0074e904b50c} + + + {b8edd306-886d-4fa6-a97c-b930adc2de36} + + + {3fd77e97-6478-4076-bcce-78366417556f} + + + {5cfc03ef-b92a-4907-aee5-7907fc6a2ec8} + + + {53b3883b-75fd-449a-bff0-049666bcb37f} + + + {acae99cc-d880-4639-8ca6-ea86280f8717} + + + {4d2df976-e166-4594-9623-f08b80cc89da} + + + {18235e83-827b-4f2b-b4e5-0a9101d1744f} + + + {81149ad7-cd77-4550-81d5-f92d2a24262d} + + + {2cfcecc0-e911-44d4-99b1-713334cad8fd} + + + {0dd6d6bc-8038-497b-9277-32bec637ea75} + + + {012f7c6c-1148-41d7-9a9e-3b7e354b5144} + + + {449f58a7-f925-420d-9298-a97299623782} + + + {c6942f2c-e4d7-408a-8dca-a4ab2560e90a} + + + {ca823c33-3ef6-4ba4-b84b-549ee38fbf25} + + + {acd7dd63-eaa6-49dd-b472-dcdfe4915a2d} + + + {021f3545-db93-472e-b645-fd7190182c03} + + + {bed2df6d-74db-41fe-9987-4159cdf9a30d} + + + {0378f118-a952-4990-83cc-1e50f51a9fde} + + + {6012744a-4a9e-4977-9009-811a9c38f754} + + + {bf02fcde-560c-4a44-a393-488318956014} + + + {8e194c48-76d0-4dae-bc91-b8b8292ea824} + + + {9ce60738-6f45-4d73-9774-2a80062b3944} + + + {4f4b4f24-d906-4845-a6fa-52a27d3ec99c} + + + {2c5dd382-6534-4369-b33c-6b18995e6576} + + + \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/proj.wp8/pch.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/pch.cpp similarity index 100% rename from cocos/editor-support/cocostudio/proj.wp8/pch.cpp rename to tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/pch.cpp diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/pch.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/pch.h new file mode 100644 index 0000000000..4bdade37c9 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/pch.h @@ -0,0 +1,27 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +// OpenGL ES includes +#include +#include + +// EGL includes +#include +#include +#include +#include + +#include "OpenGLES.h" +#include "HelloTriangleRenderer.h" +#include "App.xaml.h" + +#include "cocos2d.h" +#include "cocos-ext.h" \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml new file mode 100644 index 0000000000..47d2da5797 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.cpp new file mode 100644 index 0000000000..29392e8af4 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.cpp @@ -0,0 +1,188 @@ +#include "pch.h" +#include "OpenGLESPage.xaml.h" + +using namespace cpp_tests; +using namespace Platform; +using namespace Concurrency; +using namespace Windows::Foundation; + +OpenGLESPage::OpenGLESPage() : + OpenGLESPage(nullptr) +{ + +} + +OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : + mOpenGLES(openGLES), + mRenderSurface(EGL_NO_SURFACE), + mCustomRenderSurfaceSize(0,0), + mUseCustomRenderSurfaceSize(false) +{ + InitializeComponent(); + + Windows::UI::Core::CoreWindow^ window = Windows::UI::Xaml::Window::Current->CoreWindow; + + window->VisibilityChanged += + ref new Windows::Foundation::TypedEventHandler(this, &OpenGLESPage::OnVisibilityChanged); + + swapChainPanel->SizeChanged += + ref new Windows::UI::Xaml::SizeChangedEventHandler(this, &OpenGLESPage::OnSwapChainPanelSizeChanged); + + this->Loaded += + ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); + +#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) + // Disable all pointer visual feedback for better performance when touching. + // This is not supported on Windows Phone applications. + auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); + pointerVisualizationSettings->IsContactFeedbackEnabled = false; + pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif + + mSwapChainPanelSize = { swapChainPanel->RenderSize.Width, swapChainPanel->RenderSize.Height }; +} + +OpenGLESPage::~OpenGLESPage() +{ + StopRenderLoop(); + DestroyRenderSurface(); +} + +void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. + CreateRenderSurface(); + StartRenderLoop(); +} + +void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) +{ + if (args->Visible && mRenderSurface != EGL_NO_SURFACE) + { + StartRenderLoop(); + } + else + { + StopRenderLoop(); + } +} + +void OpenGLESPage::OnSwapChainPanelSizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) +{ + // Size change events occur outside of the render thread. A lock is required when updating + // the swapchainpanel size + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + mSwapChainPanelSize = { e->NewSize.Width, e->NewSize.Height }; +} + +void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + // If a custom render surface size is specified, return its size instead of + // the swapchain panel size. + if (mUseCustomRenderSurfaceSize) + { + *width = static_cast(mCustomRenderSurfaceSize.Width); + *height = static_cast(mCustomRenderSurfaceSize.Height); + } + else + { + *width = static_cast(mSwapChainPanelSize.Width); + *height = static_cast(mSwapChainPanelSize.Height); + } +} + +void OpenGLESPage::CreateRenderSurface() +{ + if (mOpenGLES) + { + // + // A Custom render surface size can be specified by uncommenting the following lines. + // The render surface will be automatically scaled to fit the entire window. Using a + // smaller sized render surface can result in a performance gain. + // + //mCustomRenderSurfaceSize = Size(800, 600); + //mUseCustomRenderSurfaceSize = true; + + mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, mUseCustomRenderSurfaceSize ? &mCustomRenderSurfaceSize : nullptr); + } +} + +void OpenGLESPage::DestroyRenderSurface() +{ + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + } + mRenderSurface = EGL_NO_SURFACE; +} + +void OpenGLESPage::RecoverFromLostDevice() +{ + // Stop the render loop, reset OpenGLES, recreate the render surface + // and start the render loop again to recover from a lost device. + + StopRenderLoop(); + + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + DestroyRenderSurface(); + mOpenGLES->Reset(); + CreateRenderSurface(); + } + + StartRenderLoop(); +} + +void OpenGLESPage::StartRenderLoop() +{ + // If the render loop is already running then do not start another thread. + if (mRenderLoopWorker != nullptr && mRenderLoopWorker->Status == Windows::Foundation::AsyncStatus::Started) + { + return; + } + + // Create a task for rendering that will be run on a background thread. + auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this](Windows::Foundation::IAsyncAction ^ action) + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + mOpenGLES->MakeCurrent(mRenderSurface); + HelloTriangleRenderer renderer; + + while (action->Status == Windows::Foundation::AsyncStatus::Started) + { + GLsizei panelWidth = 0; + GLsizei panelHeight = 0; + + GetSwapChainPanelSize(&panelWidth, &panelHeight); + renderer.Draw(panelWidth, panelHeight); + + // The call to eglSwapBuffers might not be successful (i.e. due to Device Lost) + // If the call fails, then we must reinitialize EGL and the GL resources. + if (mOpenGLES->SwapBuffers(mRenderSurface) != GL_TRUE) + { + // XAML objects like the SwapChainPanel must only be manipulated on the UI thread. + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() + { + RecoverFromLostDevice(); + }, CallbackContext::Any)); + + return; + } + } + }); + + // Run task on a dedicated high priority background thread. + mRenderLoopWorker = Windows::System::Threading::ThreadPool::RunAsync(workItemHandler, Windows::System::Threading::WorkItemPriority::High, Windows::System::Threading::WorkItemOptions::TimeSliced); +} + +void OpenGLESPage::StopRenderLoop() +{ + if (mRenderLoopWorker) + { + mRenderLoopWorker->Cancel(); + mRenderLoopWorker = nullptr; + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.h new file mode 100644 index 0000000000..3d9bd57996 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/OpenGLESPage.xaml.h @@ -0,0 +1,39 @@ +#pragma once + +#include "OpenGLESPage.g.h" + +namespace cpp_tests +{ + public ref class OpenGLESPage sealed + { + public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal: + OpenGLESPage(OpenGLES* openGLES); + + private: + void OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnSwapChainPanelSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); + void GetSwapChainPanelSize(GLsizei* width, GLsizei* height); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + + Windows::Foundation::Size mSwapChainPanelSize; + Concurrency::critical_section mSwapChainPanelSizeCriticalSection; + + Windows::Foundation::Size mCustomRenderSurfaceSize; + bool mUseCustomRenderSurfaceSize; + + EGLSurface mRenderSurface; // This surface is associated with a swapChainPanel on the page + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction^ mRenderLoopWorker; + }; +} diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/Package.appxmanifest b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/Package.appxmanifest new file mode 100644 index 0000000000..c33b43b0d4 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/Package.appxmanifest @@ -0,0 +1,42 @@ + + + + + + + cpp-tests.Windows + dalestam + Assets\StoreLogo.png + + + + 6.3.0 + 6.3.0 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj new file mode 100644 index 0000000000..df1b1bffab --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM + + + Release + ARM + + + + {f2bae06b-caae-43ee-b21b-57fa48db04fa} + cpp_tests + en-US + 12.0 + true + Windows Store + 8.1 + + + + Application + true + v120 + + + Application + false + true + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cpp-tests.Windows_TemporaryKey.pfx + + + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories); + + + pch.h + $(IntDir)pch.pch + ../../Classes;%(AdditionalIncludeDirectories) + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;%(DisableSpecificWarnings) + pch.h + pch.h + + + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories); + + + pch.h + $(IntDir)pch.pch + ../../Classes;%(AdditionalIncludeDirectories) + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;%(DisableSpecificWarnings) + pch.h + pch.h + + + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories); + + + pch.h + $(IntDir)pch.pch + ../../Classes;%(AdditionalIncludeDirectories) + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;%(DisableSpecificWarnings) + pch.h + pch.h + + + + + + + + + + + Designer + + + + + + + + + OpenGLESPage.xaml + + + + + OpenGLESPage.xaml + + + + + {9335005f-678e-4e8e-9b84-50037216aec8} + + + {f3550fe0-c795-44f6-8feb-093eb68143ae} + + + {3b26a12d-3a44-47ea-82d2-282660fc844d} + + + + + + + + + \ No newline at end of file diff --git a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj.filters similarity index 54% rename from build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters rename to tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj.filters index 1a0d3d8faf..1605ce7930 100644 --- a/build/winrt/Cocos2dShaderCompiler/Cocos2dShaderCompiler.vcxproj.filters +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj.filters @@ -2,9 +2,12 @@ - 5a7dfab3-eb13-41b4-a863-3136f23cdca2 + 3744285b-cd16-4f7f-b639-92c82877e0e1 bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + dll; + Assets @@ -19,27 +22,18 @@ - + - - - + - - - + - - - - - - + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows_TemporaryKey.pfx b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows_TemporaryKey.pfx new file mode 100644 index 0000000000..a0b95bf048 Binary files /dev/null and b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows_TemporaryKey.pfx differ diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml new file mode 100644 index 0000000000..47d2da5797 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.cpp b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.cpp new file mode 100644 index 0000000000..abd0e9b475 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.cpp @@ -0,0 +1,188 @@ +#include "pch.h" +#include "OpenGLESPage.xaml.h" + +using namespace cpp_tests; +using namespace Platform; +using namespace Concurrency; +using namespace Windows::Foundation; + +OpenGLESPage::OpenGLESPage() : + OpenGLESPage(nullptr) +{ + +} + +OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : + mOpenGLES(openGLES), + mRenderSurface(EGL_NO_SURFACE), + mCustomRenderSurfaceSize(0,0), + mUseCustomRenderSurfaceSize(false) +{ + InitializeComponent(); + + Windows::UI::Core::CoreWindow^ window = Windows::UI::Xaml::Window::Current->CoreWindow; + + window->VisibilityChanged += + ref new Windows::Foundation::TypedEventHandler(this, &OpenGLESPage::OnVisibilityChanged); + + swapChainPanel->SizeChanged += + ref new Windows::UI::Xaml::SizeChangedEventHandler(this, &OpenGLESPage::OnSwapChainPanelSizeChanged); + + this->Loaded += + ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); + +#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) + // Disable all pointer visual feedback for better performance when touching. + // This is not supported on Windows Phone applications. + auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); + pointerVisualizationSettings->IsContactFeedbackEnabled = false; + pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif + + mSwapChainPanelSize = { swapChainPanel->RenderSize.Width, swapChainPanel->RenderSize.Height }; +} + +OpenGLESPage::~OpenGLESPage() +{ + StopRenderLoop(); + DestroyRenderSurface(); +} + +void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. + CreateRenderSurface(); + StartRenderLoop(); +} + +void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) +{ + if (args->Visible && mRenderSurface != EGL_NO_SURFACE) + { + StartRenderLoop(); + } + else + { + StopRenderLoop(); + } +} + +void OpenGLESPage::OnSwapChainPanelSizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) +{ + // Size change events occur outside of the render thread. A lock is required when updating + // the swapchainpanel size + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + mSwapChainPanelSize = { e->NewSize.Width, e->NewSize.Height }; +} + +void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + // If a custom render surface size is specified, return its size instead of + // the swapchain panel size. + if (mUseCustomRenderSurfaceSize) + { + *width = static_cast(mCustomRenderSurfaceSize.Width); + *height = static_cast(mCustomRenderSurfaceSize.Height); + } + else + { + *width = static_cast(mSwapChainPanelSize.Width); + *height = static_cast(mSwapChainPanelSize.Height); + } +} + +void OpenGLESPage::CreateRenderSurface() +{ + if (mOpenGLES) + { + // + // A Custom render surface size can be specified by uncommenting the following lines. + // The render surface will be automatically scaled to fit the entire window. Using a + // smaller sized render surface can result in a performance gain. + // + //mCustomRenderSurfaceSize = Size(340, 400); + //mUseCustomRenderSurfaceSize = true; + + mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, mUseCustomRenderSurfaceSize ? &mCustomRenderSurfaceSize : nullptr); + } +} + +void OpenGLESPage::DestroyRenderSurface() +{ + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + } + mRenderSurface = EGL_NO_SURFACE; +} + +void OpenGLESPage::RecoverFromLostDevice() +{ + // Stop the render loop, reset OpenGLES, recreate the render surface + // and start the render loop again to recover from a lost device. + + StopRenderLoop(); + + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + DestroyRenderSurface(); + mOpenGLES->Reset(); + CreateRenderSurface(); + } + + StartRenderLoop(); +} + +void OpenGLESPage::StartRenderLoop() +{ + // If the render loop is already running then do not start another thread. + if (mRenderLoopWorker != nullptr && mRenderLoopWorker->Status == Windows::Foundation::AsyncStatus::Started) + { + return; + } + + // Create a task for rendering that will be run on a background thread. + auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this](Windows::Foundation::IAsyncAction ^ action) + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + mOpenGLES->MakeCurrent(mRenderSurface); + HelloTriangleRenderer renderer; + + while (action->Status == Windows::Foundation::AsyncStatus::Started) + { + GLsizei panelWidth = 0; + GLsizei panelHeight = 0; + + GetSwapChainPanelSize(&panelWidth, &panelHeight); + renderer.Draw(panelWidth, panelHeight); + + // The call to eglSwapBuffers might not be successful (i.e. due to Device Lost) + // If the call fails, then we must reinitialize EGL and the GL resources. + if (mOpenGLES->SwapBuffers(mRenderSurface) != GL_TRUE) + { + // XAML objects like the SwapChainPanel must only be manipulated on the UI thread. + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() + { + RecoverFromLostDevice(); + }, CallbackContext::Any)); + + return; + } + } + }); + + // Run task on a dedicated high priority background thread. + mRenderLoopWorker = Windows::System::Threading::ThreadPool::RunAsync(workItemHandler, Windows::System::Threading::WorkItemPriority::High, Windows::System::Threading::WorkItemOptions::TimeSliced); +} + +void OpenGLESPage::StopRenderLoop() +{ + if (mRenderLoopWorker) + { + mRenderLoopWorker->Cancel(); + mRenderLoopWorker = nullptr; + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.h b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.h new file mode 100644 index 0000000000..3d9bd57996 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/OpenGLESPage.xaml.h @@ -0,0 +1,39 @@ +#pragma once + +#include "OpenGLESPage.g.h" + +namespace cpp_tests +{ + public ref class OpenGLESPage sealed + { + public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal: + OpenGLESPage(OpenGLES* openGLES); + + private: + void OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnSwapChainPanelSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); + void GetSwapChainPanelSize(GLsizei* width, GLsizei* height); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + + Windows::Foundation::Size mSwapChainPanelSize; + Concurrency::critical_section mSwapChainPanelSizeCriticalSection; + + Windows::Foundation::Size mCustomRenderSurfaceSize; + bool mUseCustomRenderSurfaceSize; + + EGLSurface mRenderSurface; // This surface is associated with a swapChainPanel on the page + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction^ mRenderLoopWorker; + }; +} diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/Package.appxmanifest b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/Package.appxmanifest new file mode 100644 index 0000000000..3fa1ac495c --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/Package.appxmanifest @@ -0,0 +1,45 @@ + + + + + + + + + cpp-tests.WindowsPhone + dalestam + Assets\StoreLogo.png + + + + 6.3.1 + 6.3.1 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj new file mode 100644 index 0000000000..5485f28228 --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Release + ARM + + + Release + Win32 + + + + {15247c71-5289-4913-b88f-e253cc353720} + cpp_tests + en-US + 12.0 + true + Windows Phone + 8.1 + + + + Application + true + v120_wp81 + + + Application + false + true + v120_wp81 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(AdditionalLibraryDirectories) + %(AdditionalDependencies) + false + + + ../../Classes;%(AdditionalIncludeDirectories) + /Zm200 %(AdditionalOptions) + /Zm200 %(AdditionalOptions) + pch.h + pch.h + 4056;4996;%(DisableSpecificWarnings) + 4056;4996;%(DisableSpecificWarnings) + + + + + %(AdditionalLibraryDirectories); + %(AdditionalDependencies) + false + + + ../../Classes;%(AdditionalIncludeDirectories) + /Zm200 %(AdditionalOptions) + /Zm200 %(AdditionalOptions) + pch.h + pch.h + 4056;4996;%(DisableSpecificWarnings) + 4056;4996;%(DisableSpecificWarnings) + + + + True + x86 + + + + + + + + + + + + Designer + + + + + + + + OpenGLESPage.xaml + + + + + OpenGLESPage.xaml + + + + + {22f3b9df-1209-4574-8331-003966f562bf} + + + {cc1da216-a80d-4be4-b309-acb6af313aff} + + + {22f798d8-bfff-4754-996f-a5395343d5ec} + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj.filters b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj.filters new file mode 100644 index 0000000000..a91455b91f --- /dev/null +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj.filters @@ -0,0 +1,44 @@ + + + + + $guid2$ + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + dll; + + + + + + + + + + + + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj index ac9a97a470..d7cd694fdf 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj @@ -62,20 +62,24 @@ - - + + + - - + + + - - + + + - - + + + @@ -89,7 +93,7 @@ - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -102,15 +106,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -123,15 +127,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -144,15 +148,15 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) - WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;CC_STATIC;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) Use pch.h $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) @@ -165,10 +169,10 @@ Console false - d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;libwebsockets.lib;libcurl.lib;%(AdditionalDependencies) + %(AdditionalDependencies) ole32.lib;%(IgnoreSpecificDefaultLibraries) true - $(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform);$(EngineRoot)\external\curl\prebuilt\wp8\$(Platform);$(EngineRoot)external\websockets\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) @@ -178,6 +182,12 @@ + + Create + Create + Create + Create + @@ -193,6 +203,7 @@ + @@ -362,18 +373,9 @@ - - Create - Create - Create - Create - false - false - false - false - + @@ -395,6 +397,7 @@ + @@ -625,90 +628,18 @@ - - - {b5af91b3-64ea-44e1-84b0-d759e93758fb} - - - {df125891-eee9-4466-b903-f828fd272158} - - - {20d4035d-fd3f-4fd3-baba-97bc1c38dfc2} - - - {51e5736e-e1a3-4c94-abb7-e92ecef9c12e} + + {7c5dbc42-27f6-4978-aabc-02ba77e2a7f0} {7d4fc6eb-9497-4804-98f3-3eaedc896154} - - {7daa99e7-8e07-4fef-8374-8ec04e395d2e} - - - {88982c27-5a7b-40a8-86e7-b3187b44b322} - - - {08fb23e4-1517-4edc-b682-da238cdaa83d} - - - {04a0c42f-23bb-469b-a9d8-ca49136adbd4} - {c55734a3-702c-4fa1-b950-32c8e169302f} - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters index 1405c62cde..98237a7c02 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters @@ -329,7 +329,13 @@ {f3b97ed6-a90e-4abc-b916-f91da5de888d} - {a7609300-6bd1-4671-9a1d-0ab8a4c3f54d} + {e5476084-161e-4bfc-9f08-1dcd000dd122} + + + {af74683d-52b5-41a8-b153-62d2609b0035} + + + {1cefd884-4b0a-4952-bbcb-0b03be19330b} @@ -675,7 +681,6 @@ Classes\ConfigurationTest - Classes\ExtensionsTest\NetworkTest @@ -864,7 +869,6 @@ Classes\Camera3DTest - Classes\BillBoardTest @@ -874,6 +878,13 @@ Classes\LightTest + + + Classes\UITest\CocosStudioGUITest\UIEditBoxTest + + + Classes\ExtensionsTest\AssetsManagerExLoaderScene + @@ -1416,7 +1427,6 @@ Classes\ShaderTest - Classes\ExtensionsTest\NetworkTest @@ -1606,7 +1616,6 @@ Classes\Camera3DTest - Classes\BillBoardTest @@ -1616,19 +1625,21 @@ Classes\LightTest + + + Classes\UITest\CocosStudioGUITest\UIEditBoxTest + + + Classes\ExtensionsTest\AssetsManagerExLoaderScene + - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/tests/game-controller-test/proj.ios/Default-667h@2x.png b/tests/game-controller-test/proj.ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/game-controller-test/proj.ios/Default-667h@2x.png differ diff --git a/tests/game-controller-test/proj.ios/Default-736h@3x.png b/tests/game-controller-test/proj.ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/game-controller-test/proj.ios/Default-736h@3x.png differ diff --git a/tests/game-controller-test/proj.ios/Info.plist b/tests/game-controller-test/proj.ios/Info.plist index 5162d3a8da..a0dcce71cf 100644 --- a/tests/game-controller-test/proj.ios/Info.plist +++ b/tests/game-controller-test/proj.ios/Info.plist @@ -77,6 +77,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon diff --git a/tests/lua-empty-test/project/proj.ios/Default-667h@2x.png b/tests/lua-empty-test/project/proj.ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/lua-empty-test/project/proj.ios/Default-667h@2x.png differ diff --git a/tests/lua-empty-test/project/proj.ios/Default-736h@3x.png b/tests/lua-empty-test/project/proj.ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/lua-empty-test/project/proj.ios/Default-736h@3x.png differ diff --git a/tests/lua-empty-test/project/proj.ios/Info.plist b/tests/lua-empty-test/project/proj.ios/Info.plist index 12ee63ab86..22a50d6902 100644 --- a/tests/lua-empty-test/project/proj.ios/Info.plist +++ b/tests/lua-empty-test/project/proj.ios/Info.plist @@ -39,6 +39,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon @@ -54,8 +137,8 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft diff --git a/tests/lua-game-controller-test/project/proj.ios/Default-667h@2x.png b/tests/lua-game-controller-test/project/proj.ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/lua-game-controller-test/project/proj.ios/Default-667h@2x.png differ diff --git a/tests/lua-game-controller-test/project/proj.ios/Default-736h@3x.png b/tests/lua-game-controller-test/project/proj.ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/lua-game-controller-test/project/proj.ios/Default-736h@3x.png differ diff --git a/tests/lua-game-controller-test/project/proj.ios/Info.plist b/tests/lua-game-controller-test/project/proj.ios/Info.plist index 12ee63ab86..22a50d6902 100644 --- a/tests/lua-game-controller-test/project/proj.ios/Info.plist +++ b/tests/lua-game-controller-test/project/proj.ios/Info.plist @@ -39,6 +39,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIPrerenderedIcon @@ -54,8 +137,8 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft diff --git a/tests/lua-tests/project/Classes/lua_assetsmanager_test_sample.h b/tests/lua-tests/project/Classes/lua_assetsmanager_test_sample.h index 967593de71..cf4a96f58d 100644 --- a/tests/lua-tests/project/Classes/lua_assetsmanager_test_sample.h +++ b/tests/lua-tests/project/Classes/lua_assetsmanager_test_sample.h @@ -10,7 +10,7 @@ extern "C" { #endif /** - * The apis which are bound in this file are temporary for the assetsmanager test sample.After the completion of some systems like fileutils,these apis will be deprecated + * The apis which are bound in this file are temporary for the assetsmanager test sample.After the completion of some systems like fileutils,these apis will be deprecated */ TOLUA_API int register_assetsmanager_test_sample(lua_State* tolua_S); diff --git a/tests/lua-tests/project/Classes/lua_test_bindings.cpp b/tests/lua-tests/project/Classes/lua_test_bindings.cpp index ca41685d13..723af93e4d 100644 --- a/tests/lua-tests/project/Classes/lua_test_bindings.cpp +++ b/tests/lua-tests/project/Classes/lua_test_bindings.cpp @@ -521,7 +521,7 @@ int lua_cocos2dx_DrawNode3D_drawCube(lua_State* L) { lua_pushnumber(L, i + 1); lua_gettable(L, 2); -#ifndef TOLUA_RELEASE +#if COCOS2D_DEBUG >= 1 if (!tolua_istable(L, -1, 0, &tolua_err)) { lua_pop(L, 1); @@ -530,7 +530,7 @@ int lua_cocos2dx_DrawNode3D_drawCube(lua_State* L) #endif ok &= luaval_to_vec3(L, lua_gettop(L), &vec3); -#ifndef TOLUA_RELEASE +#if COCOS2D_DEBUG >= 1 if (!ok) { lua_pop(L, 1); diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Default-667h@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/Default-667h@2x.png new file mode 100644 index 0000000000..a0f61ec8e6 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/Default-667h@2x.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Default-736h@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/Default-736h@3x.png new file mode 100644 index 0000000000..dadccee686 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/Default-736h@3x.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Info.plist b/tests/lua-tests/project/proj.ios_mac/ios/Info.plist index dbfaaa0b95..ac0139dc5c 100644 --- a/tests/lua-tests/project/proj.ios_mac/ios/Info.plist +++ b/tests/lua-tests/project/proj.ios_mac/ios/Info.plist @@ -44,6 +44,89 @@ ???? CFBundleVersion 1.0 + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + LSRequiresIPhoneOS UIAppFonts @@ -68,8 +151,8 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index b574995047..6b8cc38035 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -70,7 +70,7 @@ - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 @@ -121,7 +121,7 @@ xcopy "$(ProjectDir)..\..\..\cpp-tests\Resources" "$(ProjectDir)..\..\res" /e /Y - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.filters b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.filters index 4cd4b112a8..2427487eb2 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.filters +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.filters @@ -15,15 +15,13 @@ win32 - - Classes - Classes Classes + @@ -32,11 +30,9 @@ win32 - - Classes - Classes + \ No newline at end of file diff --git a/tests/lua-tests/src/AssetsManagerExTest/AssetsManagerExTest.lua b/tests/lua-tests/src/AssetsManagerExTest/AssetsManagerExTest.lua new file mode 100644 index 0000000000..8e3c523c42 --- /dev/null +++ b/tests/lua-tests/src/AssetsManagerExTest/AssetsManagerExTest.lua @@ -0,0 +1,336 @@ +local targetPlatform = cc.Application:getInstance():getTargetPlatform() + +local sceneID = +{ + "AMTestScene1", + "AMTestScene2", + "AMTestScene3", +} + +local sceneManifests = +{ + "Manifests/AMTestScene1/project.manifest", + "Manifests/AMTestScene2/project.manifest", + "Manifests/AMTestScene3/project.manifest" +} + +--UNCHECK +local storagePaths = +{ + "LuaTests/AssetsManagerExTest/scene1", + "LuaTests/AssetsManagerExTest/scene2", + "LuaTests/AssetsManagerExTest/scene3", +} + +local backgroundPaths = +{ + "Images/background1.jpg", + "Images/background2.jpg", + "Images/background3.png" +} + +------------------------------------- +-- AssetsManagerEx1 Test +------------------------------------- +local AMTestScene1 = {} +AMTestScene1.__index = AMTestScene1 + +function AMTestScene1.create() + + local layer = cc.Layer:create() + + local am = nil + + local function onEnter() + + Helper.initWithLayer(layer) + Helper.titleLabel:setString("AssetsManagerExTest1") + + local sprite = cc.Sprite:create("Images/Icon.png") + layer:addChild(sprite) + sprite:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y)) + + local ttfConfig = {} + ttfConfig.fontFilePath = "fonts/arial.ttf" + ttfConfig.fontSize = 40 + + local progress = cc.Label:createWithTTF(ttfConfig, "0%", cc.VERTICAL_TEXT_ALIGNMENT_CENTER) + progress:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y + 50)) + layer:addChild(progress) + am = cc.AssetsManagerEx:create("Manifests/AMTestScene1/project.manifest", cc.FileUtils:getInstance():getWritablePath() .. "LuaTests/AssetsManagerExTest/scene1") + am:retain() + + if not am:getLocalManifest():isLoaded() then + print("Fail to update assets, step skipped.") + local background = cc.Sprite:create("Images/background1.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + else + local function onUpdateEvent(event) + local eventCode = event:getEventCode() + if eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_NO_LOCAL_MANIFEST then + print("No local manifest file found, skip assets update.") + local background = cc.Sprite:create("Images/background1.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_PROGRESSION then + local assetId = event:getAssetId() + local percent = event:getPercent() + local strInfo = "" + + if assetId == cc.AssetsManagerExStatic.VERSION_ID then + strInfo = string.format("Version file: %d%%", percent) + elseif assetId == cc.AssetsManagerExStatic.MANIFEST_ID then + strInfo = string.format("Manifest file: %d%%", percent) + else + strInfo = string.format("%d%%", percent) + end + progress:setString(strInfo) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_DOWNLOAD_MANIFEST or + eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_PARSE_MANIFEST then + print("Fail to download manifest file, update skipped.") + local background = cc.Sprite:create("Images/background1.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ALREADY_UP_TO_DATE or + eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_FINISHED then + print("Update finished.") + local background = cc.Sprite:create("Images/background1.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_UPDATING then + print("Asset ", event:getAssetId(), ", ", event:getMessage()) + local background = cc.Sprite:create("Images/background1.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + end + end + local listener = cc.EventListenerAssetsManagerEx:create(am,onUpdateEvent) + cc.Director:getInstance():getEventDispatcher():addEventListenerWithFixedPriority(listener, 1) + + am:update() + end + end + + local function onNodeEvent(event) + if "enter" == event then + onEnter() + elseif "exit" == event then + am:release() + end + end + layer:registerScriptHandler(onNodeEvent) + + return layer +end + + +------------------------------------- +-- AssetsManagerEx2 Test +------------------------------------- +local AMTestScene2 = {} +AMTestScene2.__index = AMTestScene2 + +function AMTestScene2.create() + + local layer = cc.Layer:create() + + local am = nil + + local function onEnter() + + Helper.initWithLayer(layer) + Helper.titleLabel:setString("AssetsManagerExTest2") + + local sprite = cc.Sprite:create("Images/Icon.png") + layer:addChild(sprite) + sprite:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y)) + + local ttfConfig = {} + ttfConfig.fontFilePath = "fonts/arial.ttf" + ttfConfig.fontSize = 40 + + local progress = cc.Label:createWithTTF(ttfConfig, "0%", cc.VERTICAL_TEXT_ALIGNMENT_CENTER) + progress:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y + 50)) + layer:addChild(progress) + + am = cc.AssetsManagerEx:create("Manifests/AMTestScene2/project.manifest", cc.FileUtils:getInstance():getWritablePath() .. "LuaTests/AssetsManagerExTest/scene2") + am:retain() + + if not am:getLocalManifest():isLoaded() then + print("Fail to update assets, step skipped.") + local background = cc.Sprite:create("Images/background2.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + else + local function onUpdateEvent(event) + local eventCode = event:getEventCode() + if eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_NO_LOCAL_MANIFEST then + print("No local manifest file found, skip assets update.") + local background = cc.Sprite:create("Images/background2.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_PROGRESSION then + local assetId = event:getAssetId() + local percent = event:getPercent() + local strInfo = "" + + if assetId == cc.AssetsManagerExStatic.VERSION_ID then + strInfo = string.format("Version file: %d%%", percent) + elseif assetId == cc.AssetsManagerExStatic.MANIFEST_ID then + strInfo = string.format("Manifest file: %d%%", percent) + else + strInfo = string.format("%d%%", percent) + end + progress:setString(strInfo) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_DOWNLOAD_MANIFEST or + eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_PARSE_MANIFEST then + print("Fail to download manifest file, update skipped.") + local background = cc.Sprite:create("Images/background2.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ALREADY_UP_TO_DATE or + eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_FINISHED then + print("Update finished.") + local background = cc.Sprite:create("Images/background2.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_UPDATING then + print("Asset ", event:getAssetId(), ", ", event:getMessage()) + local background = cc.Sprite:create("Images/background2.jpg") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + end + end + local listener = cc.EventListenerAssetsManagerEx:create(am,onUpdateEvent) + cc.Director:getInstance():getEventDispatcher():addEventListenerWithFixedPriority(listener, 1) + + am:update() + end + end + + local function onNodeEvent(event) + if "enter" == event then + onEnter() + elseif "exit" == event then + am:release() + end + end + layer:registerScriptHandler(onNodeEvent) + + return layer +end + +------------------------------------- +-- AssetsManagerEx3 Test +------------------------------------- +local AMTestScene3 = {} +AMTestScene3.__index = AMTestScene3 + +function AMTestScene3.create() + + local layer = cc.Layer:create() + + local am = nil + + local function onEnter() + + Helper.initWithLayer(layer) + Helper.titleLabel:setString("AssetsManagerExTest3") + + local sprite = cc.Sprite:create("Images/Icon.png") + layer:addChild(sprite) + sprite:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y)) + + local ttfConfig = {} + ttfConfig.fontFilePath = "fonts/arial.ttf" + ttfConfig.fontSize = 40 + + local progress = cc.Label:createWithTTF(ttfConfig, "0%", cc.VERTICAL_TEXT_ALIGNMENT_CENTER) + progress:setPosition(cc.p(VisibleRect:center().x, VisibleRect:center().y + 50)) + layer:addChild(progress) + + am = cc.AssetsManagerEx:create("Manifests/AMTestScene3/project.manifest", cc.FileUtils:getInstance():getWritablePath() .. "LuaTests/AssetsManagerExTest/scene3") + am:retain() + + if not am:getLocalManifest():isLoaded() then + print("Fail to update assets, step skipped.") + local background = cc.Sprite:create("Images/background3.png") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + else + local function onUpdateEvent(event) + local eventCode = event:getEventCode() + if eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_NO_LOCAL_MANIFEST then + print("No local manifest file found, skip assets update.") + local background = cc.Sprite:create("Images/background3.png") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_PROGRESSION then + local assetId = event:getAssetId() + local percent = event:getPercent() + local strInfo = "" + + if assetId == cc.AssetsManagerExStatic.VERSION_ID then + strInfo = string.format("Version file: %d%%", percent) + elseif assetId == cc.AssetsManagerExStatic.MANIFEST_ID then + strInfo = string.format("Manifest file: %d%%", percent) + else + strInfo = string.format("%d%%", percent) + end + progress:setString(strInfo) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_DOWNLOAD_MANIFEST or + eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_PARSE_MANIFEST then + print("Fail to download manifest file, update skipped.") + local background = cc.Sprite:create("Images/background3.png") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ALREADY_UP_TO_DATE or + eventCode == cc.EventAssetsManagerEx.EventCode.UPDATE_FINISHED then + print("Update finished.") + local background = cc.Sprite:create("Images/background3.png") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + elseif eventCode == cc.EventAssetsManagerEx.EventCode.ERROR_UPDATING then + print("Asset ", event:getAssetId(), ", ", event:getMessage()) + local background = cc.Sprite:create("Images/background3.png") + layer:addChild(background, 1) + background:setPosition( cc.p(VisibleRect:center().x, VisibleRect:center().y )) + end + end + local listener = cc.EventListenerAssetsManagerEx:create(am,onUpdateEvent) + cc.Director:getInstance():getEventDispatcher():addEventListenerWithFixedPriority(listener, 1) + + am:update() + end + end + + local function onNodeEvent(event) + if "enter" == event then + onEnter() + elseif "exit" == event then + am:release() + end + end + layer:registerScriptHandler(onNodeEvent) + + return layer +end + +------------------------------------- +-- AssetsManagerEx Test +------------------------------------- +function AssetsManagerExTestMain() + local scene = cc.Scene:create() + + Helper.createFunctionTable = + { + AMTestScene1.create, + AMTestScene2.create, + AMTestScene3.create, + } + + scene:addChild(AMTestScene1.create()) + scene:addChild(CreateBackMenuItem()) + return scene +end diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua index d2319daf07..bf5e1e3e6b 100644 --- a/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua +++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua @@ -59,7 +59,7 @@ end function TimelineTestLayer.title(idx) if TimelineTestIndex.TEST_ACTION_TIMELINE == idx then - return "CSArmature Test Bed" + return "Test ActionTimeline" elseif TimelineTestIndex.TEST_CHANGE_PLAY_SECTION == idx then return "Test Change Play Section" elseif TimelineTestIndex.TEST_TIMELINE_FRAME_EVENT == idx then @@ -188,14 +188,14 @@ end function TestActionTimeline:onEnter() cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png") - local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson") - local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson") + local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb") + local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb") node:runAction(action) action:gotoFrameAndPlay(0, 60, true) - node:setScale(0.4) - node:setPosition(0, 0) + node:setScale(0.2) + node:setPosition(150, 100) self:addChild(node) end @@ -241,8 +241,8 @@ end function TestChangePlaySection:onEnter() cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png") - local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson") - local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson") + local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb") + local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb") node:runAction(action) action:gotoFrameAndPlay(70, action:getDuration(), true) @@ -308,8 +308,8 @@ end function TestTimelineFrameEvent:onEnter() cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png") - local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson") - local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson") + local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb") + local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb") node:runAction(action) action:gotoFrameAndPlay(0, 60, true) @@ -377,8 +377,8 @@ function TestTimelinePerformance:onEnter() cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png") for i = 1,100 do - local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson") - local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson") + local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb") + local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb") node:runAction(action) action:gotoFrameAndPlay(70, action:getDuration(), true) diff --git a/tests/lua-tests/src/SpineTest/SpineTest.lua b/tests/lua-tests/src/SpineTest/SpineTest.lua index 3e93a7c975..57c698f5f3 100644 --- a/tests/lua-tests/src/SpineTest/SpineTest.lua +++ b/tests/lua-tests/src/SpineTest/SpineTest.lua @@ -1,82 +1,148 @@ -local SpineTestLayer1 = nil +require "cocos.spine.SpineConstants" +local SpineTestLayerNormal = class("SpineTestLayerNormal",function() + return cc.Layer:create() +end) --------------------------------------------------------------------- --- --- SpineTestLayer1 --- --------------------------------------------------------------------- +function SpineTestLayerNormal:ctor() -SpineTestLayer1 = function() - local ret = cc.Layer:create() + local function onNodeEvent(event) + if event == "enter" then + self:init() + end + end - local s = cc.Director:getInstance():getWinSize() - local spineboy + self:registerScriptHandler(onNodeEvent) +end + +function SpineTestLayerNormal:init() + local skeletonNode = sp.SkeletonAnimation:create("spine/spineboy.json", "spine/spineboy.atlas", 0.6) + skeletonNode:setScale(0.5) + + skeletonNode:registerSpineEventHandler(function (event) + print(string.format("[spine] %d start: %s", + event.trackIndex, + event.animation)) + end, sp.EventType.ANIMATION_START) + + skeletonNode:registerSpineEventHandler(function (event) + print(string.format("[spine] %d end:", + event.trackIndex)) + end, sp.EventType.ANIMATION_END) - local addSpineBoy = function() - spineboy = sp.SkeletonAnimation:create(s_pPathSpineBoyJson, s_pPathSpineBoyAtlas, 0.8) - ret:addChild(spineboy) - spineboy:setPosition(cc.p(s.width/2, 20)) - spineboy:setMix("walk", "jump", 0.2) - spineboy:setMix("jump", "walk", 0.4) - spineboy:setTimeScale(0.3) - spineboy:setDebugBones(true) - spineboy:setAnimation(0, 'walk', false) - spineboy:addAnimation(0, 'jump', false) - spineboy:addAnimation(0, 'walk', true) - spineboy:addAnimation(0, 'jump', true, 4) - - spineboy:registerSpineEventHandler(function(event) - if event.type == 'start' then - print(string.format("[spine] %d start: %s", - event.trackIndex, - event.animation)) - elseif event.type == 'end' then - print(string.format("[spine] %d end: %s", - event.trackIndex, - event.animation)) - elseif event.type == 'complete' then - print(string.format("[spine] %d complete: %s, %d", - event.trackIndex, - event.animation, + skeletonNode:registerSpineEventHandler(function (event) + print(string.format("[spine] %d complete: %d", + event.trackIndex, event.loopCount)) - elseif event.type == 'event' then - print(string.format("[spine] %d event: %s, %s: %d, %f, %s", + end, sp.EventType.ANIMATION_COMPLETE) + + skeletonNode:registerSpineEventHandler(function (event) + print(string.format("[spine] %d event: %s, %d, %f, %s", event.trackIndex, - event.animation, event.eventData.name, event.eventData.intValue, event.eventData.floatValue, - event.eventData.stringValue)) + event.eventData.stringValue)) + end, sp.EventType.ANIMATION_EVENT) + + skeletonNode:setMix("walk", "jump", 0.2) + skeletonNode:setMix("jump", "run", 0.2) + skeletonNode:setAnimation(0, "walk", true) + + skeletonNode:addAnimation(0, "jump", false, 3) + skeletonNode:addAnimation(0, "run", true) + + local windowSize = cc.Director:getInstance():getWinSize() + skeletonNode:setPosition(cc.p(windowSize.width / 2, 20)) + self:addChild(skeletonNode) + + local listener = cc.EventListenerTouchOneByOne:create() + listener:registerScriptHandler(function (touch, event) + if not skeletonNode:getDebugBonesEnabled() then + skeletonNode:setDebugBonesEnabled(true) + elseif skeletonNode:getTimeScale() == 1 then + skeletonNode:setTimeScale(0.3) + else + skeletonNode:setTimeScale(1) + skeletonNode:setDebugBonesEnabled(false) end - end) - spineboy:runAction(cc.RepeatForever:create(cc.Sequence:create(cc.FadeOut:create(1), - cc.FadeIn:create(1), - cc.DelayTime:create(5)))) - - - end + return true + end,cc.Handler.EVENT_TOUCH_BEGAN ) - local function onNodeEvent(event) - if event == "enter" then - cclog("SpineTestLayer1#onEnter") - addSpineBoy() - elseif event == "enterTransitionFinish" then - cclog("SceneTestLayer1#onEnterTransitionDidFinish") - end - end - - ret:registerScriptHandler(onNodeEvent) - return ret + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) end +function SpineTestLayerNormal.create( ... ) + local layer = SpineTestLayerNormal.new() + Helper.initWithLayer(layer) + Helper.titleLabel:setString("SpineTestLayerNormal Test") + return layer +end + +---- +local SpineTestLayerFFD = class("SpineTestLayerFFD",function() + return cc.Layer:create() +end) + +function SpineTestLayerFFD:ctor() + + local function onNodeEvent(event) + if event == "enter" then + self:init() + end + end + + self:registerScriptHandler(onNodeEvent) +end + +function SpineTestLayerFFD:init() + skeletonNode = sp.SkeletonAnimation:create("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5) + skeletonNode:setAnimation(0, "walk", true) + skeletonNode:setSkin("goblin") + + skeletonNode:setScale(0.5) + local windowSize = cc.Director:getInstance():getWinSize() + skeletonNode:setPosition(cc.p(windowSize.width / 2, 20)) + self:addChild(skeletonNode) + + local listener = cc.EventListenerTouchOneByOne:create() + listener:registerScriptHandler(function (touch, event) + if not skeletonNode:getDebugBonesEnabled() then + skeletonNode:setDebugBonesEnabled(true) + elseif skeletonNode:getTimeScale() == 1 then + skeletonNode:setTimeScale(0.3) + else + skeletonNode:setTimeScale(1) + skeletonNode:setDebugBonesEnabled(false) + end + + return true + end,cc.Handler.EVENT_TOUCH_BEGAN ) + + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) +end + +function SpineTestLayerFFD.create( ... ) + local layer = SpineTestLayerFFD.new() + Helper.initWithLayer(layer) + Helper.titleLabel:setString("SpineTestLayerFFD Test") + return layer +end function SpineTestMain() cclog("SpineTestMain") local scene = cc.Scene:create() - local layer = SpineTestLayer1() - scene:addChild(layer, 0) + + Helper.createFunctionTable = + { + SpineTestLayerNormal.create, + SpineTestLayerFFD.create, + } + + scene:addChild(SpineTestLayerNormal.create(), 0) scene:addChild(CreateBackMenuItem()) return scene end diff --git a/tests/lua-tests/src/controller.lua b/tests/lua-tests/src/controller.lua index aaec7837ff..7bb0d8cfa5 100644 --- a/tests/lua-tests/src/controller.lua +++ b/tests/lua-tests/src/controller.lua @@ -6,7 +6,7 @@ collectgarbage("setstepmul", 5000) ---------------- -- run cc.FileUtils:getInstance():addSearchPath("src") --- CC_USE_DEPRECATED_API = true +CC_USE_DEPRECATED_API = true require "cocos.init" local director = cc.Director:getInstance() diff --git a/tests/lua-tests/src/mainMenu.lua b/tests/lua-tests/src/mainMenu.lua index 9f76196f5b..31ba5cd10d 100644 --- a/tests/lua-tests/src/mainMenu.lua +++ b/tests/lua-tests/src/mainMenu.lua @@ -8,6 +8,7 @@ require "ActionsEaseTest/ActionsEaseTest" require "ActionsProgressTest/ActionsProgressTest" require "ActionsTest/ActionsTest" require "AssetsManagerTest/AssetsManagerTest" +require "AssetsManagerExTest/AssetsManagerExTest" require "BillBoardTest/BillBoardTest" require "BugsTest/BugsTest" require "ByteCodeEncryptTest/ByteCodeEncryptTest" @@ -72,6 +73,7 @@ local _allTests = { { isSupported = true, name = "ActionsProgressTest" , create_func = ProgressActionsTest }, { isSupported = true, name = "ActionsTest" , create_func = ActionsTest }, { isSupported = true, name = "AssetsManagerTest" , create_func = AssetsManagerTestMain }, + { isSupported = true, name = "AssetsManagerExTest" , create_func = AssetsManagerExTestMain }, { isSupported = audioEndineSupported, name = "AudioEngineTest", create_func = AudioEngineTest}, { isSupported = false, name = "Box2dTest" , create_func= Box2dTestMain }, { isSupported = false, name = "Box2dTestBed" , create_func= Box2dTestBedMain }, diff --git a/tools/bindings-generator b/tools/bindings-generator index a8496d540c..87efa95573 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit a8496d540c174236bec0d5a33457340571699f19 +Subproject commit 87efa95573ab18f1fd60a62c7a70744901d92142 diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 54d6013d43..5c4f65805d 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/2d/CCProtectedNode.h % # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device CSLoader +classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device CSLoader ClippingRectangleNode # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also diff --git a/tools/tolua/cocos2dx_extension.ini b/tools/tolua/cocos2dx_extension.ini index 162ebddd02..94cc61fea6 100644 --- a/tools/tolua/cocos2dx_extension.ini +++ b/tools/tolua/cocos2dx_extension.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external -I%(cocosdir)s/external/json cocos_flags = -DANDROID @@ -27,7 +27,7 @@ headers = %(cocosdir)s/extensions/cocos-ext.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = AssetsManager.* Control.* ControlButton.* ScrollView$ TableView$ TableViewCell$ +classes = Control.* ControlButton.* ScrollView$ TableView$ TableViewCell$ AssetsManager AssetsManagerEx Manifest EventAssetsManagerEx EventListenerAssetsManagerEx # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -39,13 +39,14 @@ classes = AssetsManager.* Control.* ControlButton.* ScrollView$ TableView$ Tabl skip = .*Delegate::[*], .*Loader.*::[*], *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType (g|s)etDelegate .*HSV], - AssetsManager::[(g|s)etDelegate], - AssetsManagerDelegateProtocol::[*], + EditBox::[(g|s)etDelegate ^keyboard.* touchDownAction getScriptEditBoxHandler registerScriptEditBoxHandler unregisterScriptEditBoxHandler], Control::[removeHandleOfControlEvent addHandleOfControlEvent], ControlUtils::[*], ControlSwitchSprite::[*], ScrollView::[(g|s)etDelegate$], - TableView::[create (g|s)etDataSource$ (g|s)etDelegate] + TableView::[create (g|s)etDataSource$ (g|s)etDelegate], + Manifest::[getAssets getAsset], + EventListenerAssetsManagerEx::[create] rename_functions = @@ -63,7 +64,7 @@ base_classes_to_skip = # classes that create no constructor # Set is special and we will use a hand-written constructor -abstract_classes = +abstract_classes = ArmatureDataManager Manifest # Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. script_control_cpp = no diff --git a/tools/tolua/cocos2dx_spine.ini b/tools/tolua/cocos2dx_spine.ini index b43c0ca4e3..0766da7388 100644 --- a/tools/tolua/cocos2dx_spine.ini +++ b/tools/tolua/cocos2dx_spine.ini @@ -27,7 +27,7 @@ headers = %(cocosdir)s/cocos/editor-support/spine/spine-cocos2dx.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = Skeleton SkeletonAnimation +classes = SkeletonRenderer SkeletonAnimation # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -36,8 +36,9 @@ classes = Skeleton SkeletonAnimation # will apply to all class names. This is a convenience wildcard to be able to skip similar named # functions from all classes. -skip = Skeleton::[findBone findSlot getAttachment setAttachment update draw createWith.*], - SkeletonAnimation::[addAnimationState setAnimationStateData update createWith.* (s|g)etBlendFunc addAnimation getCurrent setAnimation onAnimationStateEvent] +skip = SkeletonRenderer::[findBone findSlot getAttachment setAttachment update draw createWithData (s|g)etBlendFunc], + *::[update draw drawSkeleton], + SkeletonAnimation::[setAnimationStateData createWithData (s|g)etBlendFunc addAnimation getCurrent setAnimation onAnimationStateEvent onTrackEntryEvent getState createWithFile] rename_functions =