From c26fe122ad2a9a1f7bac54dd906afb244b7afc9d Mon Sep 17 00:00:00 2001 From: Mikhail Shulepov Date: Fri, 12 Feb 2016 19:06:16 +0300 Subject: [PATCH] SpriteFrameCacheTest: test for PixelFormat --- build/cocos2d_tests.xcodeproj/project.pbxproj | 18 ++++ .../SpriteFrameCacheTest.cpp | 85 ++++++++++++++++++ .../SpriteFrameCacheTest.h | 47 ++++++++++ tests/cpp-tests/Classes/controller.cpp | 1 + tests/cpp-tests/Classes/tests.h | 1 + .../Images/sprite_frames_test/test_A8.plist | 39 ++++++++ .../Images/sprite_frames_test/test_A8.png | Bin 0 -> 351 bytes .../Images/sprite_frames_test/test_AI88.plist | 39 ++++++++ .../Images/sprite_frames_test/test_AI88.png | Bin 0 -> 663 bytes .../sprite_frames_test/test_NoFormat.plist | 37 ++++++++ .../sprite_frames_test/test_PVRTC2.plist | 39 ++++++++ .../Images/sprite_frames_test/test_PVRTC2.pvr | Bin 0 -> 4148 bytes .../test_PVRTC2_NOALPHA.plist | 39 ++++++++ .../test_PVRTC2_NOALPHA.pvr | Bin 0 -> 4148 bytes .../sprite_frames_test/test_PVRTC4.plist | 39 ++++++++ .../Images/sprite_frames_test/test_PVRTC4.pvr | Bin 0 -> 8244 bytes .../sprite_frames_test/test_RGB565.plist | 39 ++++++++ .../sprite_frames_test/test_RGB888.plist | 39 ++++++++ .../sprite_frames_test/test_RGBA4444.plist | 39 ++++++++ .../sprite_frames_test/test_RGBA5551.plist | 39 ++++++++ .../sprite_frames_test/test_RGBA5555.plist | 39 ++++++++ .../sprite_frames_test/test_RGBA8888.plist | 39 ++++++++ .../sprite_frames_test/test_RGBA8888.png | Bin 0 -> 796 bytes 23 files changed, 618 insertions(+) create mode 100644 tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp create mode 100644 tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.h create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.png create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_AI88.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_AI88.png create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_NoFormat.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.pvr create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2_NOALPHA.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2_NOALPHA.pvr create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC4.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC4.pvr create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGB565.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGB888.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA4444.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5551.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5555.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.plist create mode 100644 tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.png diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 9757d3f924..714934308d 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -677,6 +677,9 @@ 1AC35DF818CEE65B00F37B72 /* pew-pew-lei.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */; }; 1F33634F18E37E840074764D /* RefPtrTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F33634D18E37E840074764D /* RefPtrTest.cpp */; }; 1F33635018E37E840074764D /* RefPtrTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F33634D18E37E840074764D /* RefPtrTest.cpp */; }; + 27C5CE011C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27C5CDFF1C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp */; }; + 27C5CE021C6E0470000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27C5CDFF1C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp */; }; + 27C5CE031C6E0477000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27C5CDFF1C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp */; }; 29080D1C191B574B0066F8DF /* UITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1A191B574B0066F8DF /* UITest.cpp */; }; 29080D1D191B574B0066F8DF /* UITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1A191B574B0066F8DF /* UITest.cpp */; }; 29080D8D191B595E0066F8DF /* CocosGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */; }; @@ -2443,6 +2446,8 @@ 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 = ""; }; + 27C5CDFF1C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteFrameCacheTest.cpp; sourceTree = ""; }; + 27C5CE001C6E0469000CA4B3 /* SpriteFrameCacheTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteFrameCacheTest.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 = ""; }; @@ -3607,6 +3612,7 @@ A5030C3219D059AB000E78E7 /* OpenURLTest */, 1AC35B1C18CECF0C00F37B72 /* ZwoptexTest */, 1AC35C6F18CECF0C00F37B72 /* VibrateTest */, + 27C5CDFE1C6E043D000CA4B3 /* SpriteFrameCacheTest */, ); name = Classes; path = "../tests/cpp-tests/Classes"; @@ -4763,6 +4769,15 @@ name = tests; sourceTree = ""; }; + 27C5CDFE1C6E043D000CA4B3 /* SpriteFrameCacheTest */ = { + isa = PBXGroup; + children = ( + 27C5CDFF1C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp */, + 27C5CE001C6E0469000CA4B3 /* SpriteFrameCacheTest.h */, + ); + path = SpriteFrameCacheTest; + sourceTree = ""; + }; 29080D17191B571F0066F8DF /* UITest */ = { isa = PBXGroup; children = ( @@ -7134,6 +7149,7 @@ 1AC35C5F18CECF0C00F37B72 /* Paddle.cpp in Sources */, 1AC35BDB18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */, 1AC35B4B18CECF0C00F37B72 /* BugsTest.cpp in Sources */, + 27C5CE011C6E0469000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */, 1AC35C5118CECF0C00F37B72 /* testBasic.cpp in Sources */, 1AC35B7918CECF0C00F37B72 /* EnemyController.cpp in Sources */, 1AC35B6B18CECF0C00F37B72 /* CocosBuilderTest.cpp in Sources */, @@ -7362,6 +7378,7 @@ 507B418A1C31BEA60067B53E /* SpriteTest.cpp in Sources */, 507B418B1C31BEA60067B53E /* NewAudioEngineTest.cpp in Sources */, 507B418C1C31BEA60067B53E /* FileUtilsTest.cpp in Sources */, + 27C5CE031C6E0477000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */, 507B418D1C31BEA60067B53E /* CustomRootNodeReader.cpp in Sources */, 507B418E1C31BEA60067B53E /* CurlTest.cpp in Sources */, 507B418F1C31BEA60067B53E /* CustomTableViewCell.cpp in Sources */, @@ -7697,6 +7714,7 @@ 50921EB01B746D5F00C085CC /* DownloaderTest.cpp in Sources */, 1AC35C5818CECF0C00F37B72 /* TextureCacheTest.cpp in Sources */, 1AC35B6E18CECF0C00F37B72 /* HelloCocosBuilderLayer.cpp in Sources */, + 27C5CE021C6E0470000CA4B3 /* SpriteFrameCacheTest.cpp in Sources */, 29080D96191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */, 29080DE0191B595E0066F8DF /* UITextTest.cpp in Sources */, 29080DC0191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */, diff --git a/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp b/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp new file mode 100644 index 0000000000..fd935e2e16 --- /dev/null +++ b/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp @@ -0,0 +1,85 @@ +/**************************************************************************** + Copyright (c) 2012 cocos2d-x.org + Copyright (c) 2013-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 "SpriteFrameCacheTest.h" + +// enable log +#define COCOS2D_DEBUG 1 + +USING_NS_CC; + +SpriteFrameCacheTests::SpriteFrameCacheTests() +{ + ADD_TEST_CASE(SpriteFrameCachePixelFormatTest); +} + +SpriteFrameCachePixelFormatTest::SpriteFrameCachePixelFormatTest() +{ + const Size screenSize = Director::getInstance()->getWinSize(); + + infoLabel = Label::create(); + infoLabel->setAnchorPoint(Point(0.5f, 1.0f)); + infoLabel->setAlignment(cocos2d::TextHAlignment::CENTER); + infoLabel->setPosition(screenSize.width * 0.5f, screenSize.height * 0.7f); + addChild(infoLabel); + + // load atlas definition with specified PixelFormat and check that it matches to expected format + loadSpriteFrames("Images/sprite_frames_test/test_A8.plist", Texture2D::PixelFormat::A8); + loadSpriteFrames("Images/sprite_frames_test/test_RGBA8888.plist", Texture2D::PixelFormat::RGBA8888); + loadSpriteFrames("Images/sprite_frames_test/test_AI88.plist", Texture2D::PixelFormat::AI88); + loadSpriteFrames("Images/sprite_frames_test/test_RGBA8888.plist", Texture2D::PixelFormat::RGBA8888); + loadSpriteFrames("Images/sprite_frames_test/test_RGB565.plist", Texture2D::PixelFormat::RGB565); + loadSpriteFrames("Images/sprite_frames_test/test_RGB888.plist", Texture2D::PixelFormat::RGB888); + loadSpriteFrames("Images/sprite_frames_test/test_RGBA4444.plist", Texture2D::PixelFormat::RGBA4444); + loadSpriteFrames("Images/sprite_frames_test/test_RGBA5551.plist", Texture2D::PixelFormat::RGB5A1); +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC + loadSpriteFrames("Images/sprite_frames_test/test_PVRTC2.plist", Texture2D::PixelFormat::PVRTC2A); + loadSpriteFrames("Images/sprite_frames_test/test_PVRTC4.plist", Texture2D::PixelFormat::PVRTC4A); + loadSpriteFrames("Images/sprite_frames_test/test_PVRTC2_NOALPHA.plist", Texture2D::PixelFormat::PVRTC2); +#endif + + // test loading atlases wihtout PixelFormat specified + Texture2D::setDefaultAlphaPixelFormat(Texture2D::PixelFormat::RGB5A1); + loadSpriteFrames("Images/sprite_frames_test/test_NoFormat.plist", Texture2D::PixelFormat::RGB5A1); + + // restore default alpha pixel format + Texture2D::setDefaultAlphaPixelFormat(Texture2D::PixelFormat::RGBA8888); +} + +void SpriteFrameCachePixelFormatTest::loadSpriteFrames(const std::string &file, cocos2d::Texture2D::PixelFormat expectedFormat) +{ + SpriteFrameCache::getInstance()->addSpriteFramesWithFile(file); + SpriteFrame *spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("grossini.png"); + Texture2D *texture = spriteFrame->getTexture(); + const ssize_t bitsPerKB = 8 * 1024; + const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width * texture->getContentSizeInPixels().height / bitsPerKB; + CC_ASSERT(texture->getPixelFormat() == expectedFormat); + + const std::string textureInfo = StringUtils::format("%s: %.2f KB\r\n", texture->getStringForFormat(), memorySize); + infoLabel->setString(infoLabel->getString() + textureInfo); + + SpriteFrameCache::getInstance()->removeSpriteFramesFromFile(file); + Director::getInstance()->getTextureCache()->removeTexture(texture); +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.h b/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.h new file mode 100644 index 0000000000..811f46c7c0 --- /dev/null +++ b/tests/cpp-tests/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.h @@ -0,0 +1,47 @@ +/**************************************************************************** + 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. + ****************************************************************************/ + +#pragma once + +#include "cocos2d.h" +#include "../BaseTest.h" + +DEFINE_TEST_SUITE(SpriteFrameCacheTests); + +class SpriteFrameCachePixelFormatTest : public TestCase +{ +public: + CREATE_FUNC(SpriteFrameCachePixelFormatTest); + + virtual std::string title() const override { return "Pixel formats test"; } + virtual std::string subtitle() const override { return "It shouldn't crash"; } + + SpriteFrameCachePixelFormatTest(); + +private: + void loadSpriteFrames(const std::string &file, cocos2d::Texture2D::PixelFormat expectedFormat); + +private: + cocos2d::Label *infoLabel; +}; \ No newline at end of file diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 03ecae1b35..5799a84108 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -102,6 +102,7 @@ public: addTest("UserDefault", []() { return new UserDefaultTests(); }); addTest("Vibrate", []() { return new VibrateTests(); }); addTest("Zwoptex", []() { return new ZwoptexTests(); }); + addTest("SpriteFrameCache", []() { return new SpriteFrameCacheTests(); }); } }; diff --git a/tests/cpp-tests/Classes/tests.h b/tests/cpp-tests/Classes/tests.h index 40a13be668..06884048b8 100644 --- a/tests/cpp-tests/Classes/tests.h +++ b/tests/cpp-tests/Classes/tests.h @@ -91,5 +91,6 @@ #include "UserDefaultTest/UserDefaultTest.h" #include "VibrateTest/VibrateTest.h" #include "ZwoptexTest/ZwoptexTest.h" +#include "SpriteFrameCacheTest/SpriteFrameCacheTest.h" #endif diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.plist new file mode 100644 index 0000000000..8a8ce0f46f --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + A8 + format + 3 + realTextureFileName + test_A8.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:367f3e272a713cfa37f7149eaffe4d1b:ef6b77cb31cb9547aa403602c0e428cd:2afcf9dba9167e18b12a7edf43109b00$ + textureFileName + test_A8.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.png b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.png new file mode 100644 index 0000000000000000000000000000000000000000..2f4630804f40662dcd66061be69b9bc250b527ed GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^{y<#F!3-o9&*IAjQfvV}A+A9B|Ns9>Z_d99WN{XF zL>4nJa0`PlBg3pY5+G?$7srr{dv9;t7HTr!VY%?;|NkwIg_+Nu-Q*sWnW+ZaaB`GiFf2Vx7`c+f=jvwaV4kQPBnqPWA zQKgnm)q?HG`7I1{Uncb~SzsQyb|*{8@>8ZVP5)f>sw-XizhmR^RqHoa@{3-79shTO z!E8&_FKNHC4_eKCe|_h@ng8yaYf4>|)?fTh{pP*;U&}w~WoF#&ns;)ty1w12lRsVO u*;JnYq;~&gbo + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + AI88 + format + 3 + realTextureFileName + test_AI88.png + size + {114,79} + smartupdate + $TexturePacker:SmartUpdate:220661ac202739d5ab8ea5f365702a23:ef6b77cb31cb9547aa403602c0e428cd:c7432bd93722b9d782c25fdc837740b2$ + textureFileName + test_AI88.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_AI88.png b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_AI88.png new file mode 100644 index 0000000000000000000000000000000000000000..105fa481e785e03c2f2e63b14d60aae2428d6685 GIT binary patch literal 663 zcmV;I0%-k-P)4>6CPZVXYlR24_ zIhlh@coSq|cXl5#VWMTXF}=Eqap>FiD4MoS%vu?rGx3_pn1-g@)oS~ugVqib@f$6e z7}MaCy%OJ;Lh_<>3Nw^MQ(ywjm>_0DfGyD9=VJf~CsQZJkct|%r?P=eJi$E)cQItb z{6HlFR{=Q^UF4f8=?ALuj>8!uQWZ#jO=S>N04el#i!^_W%!)4)nL{eW8{XRHpUU04 zhanXS&B!uPxO)5)b%%F(TQwbJDbQ93F4?I#wWZTdgTxyZY zDzy2EZkx@HyelnI4ok+qrR>?0Rd zp2%z_;f3$$BCpLPzF~{`GDE6QRTkmXTorVDiEC@0b$IR5j#%8b!t*ls9Els(v0+8m zBHpoDe}5ABUQY6ztw#CG3*G$kmW^BaELwiAU==4~68{1b4`>wMU4P&V0pcem^5;Qu x$tX#L?Ae|?@ri@l + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.plist new file mode 100644 index 0000000000..f6940d69ea --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + PVRTC2 + format + 3 + realTextureFileName + test_PVRTC2.pvr + size + {128,128} + smartupdate + $TexturePacker:SmartUpdate:a0efbcf50a4c56a8f243e4beb96a30e1:ef6b77cb31cb9547aa403602c0e428cd:4bb41f9429a45a071fc102c0fbf27f4e$ + textureFileName + test_PVRTC2.pvr + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.pvr b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2.pvr new file mode 100644 index 0000000000000000000000000000000000000000..9d6e1214deb56e7086b1303766b1f513df21398d GIT binary patch literal 4148 zcmds3&u>&!6h3#x_9aI02K@tG&S74!844*YPcrYD^PO|g zJ?Fgh?tA;+IFKcX;!8?2{_~Id^baZ-h=&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riteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + PVRTC2_NOALPHA + format + 3 + realTextureFileName + test_PVRTC2_NOALPHA.pvr + size + {128,128} + smartupdate + $TexturePacker:SmartUpdate:b662a313de4b747f938ced2fe8d6accc:ef6b77cb31cb9547aa403602c0e428cd:fd9dcbc75e8562058fbd5b87154dd341$ + textureFileName + test_PVRTC2_NOALPHA.pvr + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2_NOALPHA.pvr b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC2_NOALPHA.pvr new file mode 100644 index 0000000000000000000000000000000000000000..e4799833223f80a7c57d61d07ab3e00c112ede5b GIT binary patch literal 4148 zcmds3O=ufe5T2E^yZ&pX5DJEt>@_5ZIM%H+k$UN+ZXIGd?V%xp_Er)C!Qh+TVGlmI z#RVO75JU%4OewK1gTNE-rINS%H<>-APPGEw~T*K(hwL`7kbP+h@p@CMBjxRTyZQ?!Ci|oWGVGM1@(~B zM{6;ssg8ZF)oQm%g*%Vh?Y5;JZ*|RkVEm)(9M@9xa~!|^XqV&qU#_=zFI*+{O(UK^ zzZ?6_G_GFQ#r)SBa08C4LEj?vOEaElOoQi0jWI<&C-I!0Kd-a;#`K&*P$5GiEO*hAMxTke}h19Pb z_rl5bSg@go8u-i!C&^~bDF7uu3d$$koQL&v=?<_w_*%jEMUvb@r^->s?lT!}j zB;B6s_Fldo;{7?5HY&(S);Z6uIF-@l<-Fzh)Ji!oO}<<0MFN&e&AhLc0}FmjL5%%Z z+->yX-pN~^lV2NY1WMihqB5aps?+3G3z`OY{-mj|)~l04r&H6IqqsOq{`sf3-Wxof z07qGKzux&7CN}{Ept+uBBJ#HkfH2O9|>4)zi{60i4 zD0)HD-{j(V7)o40(@*q*rv13w%-7^c#W($h3!39aFKF72%O$R$8Bg?rQddFKU-UHy z_k(FaE=PRq5Bx>@!A8gL_hY1YZQDxv!w-sKtDP!G=QH|t8|O6dpJ6TY%Q)eJlE0wn z|1Ffd3YznXUeL53mrGnhGamGva~uaN>aK#~0)HQtiwgnQGwtEL1X2PAgqlO08Hax7 zn*#gC=kRY$;Y67X>oX9>AmFD{Q4mJaXEL4n^6cSO@rdk_r{DqkM)MwKKht+6`fdoy zyn><^R0=00^2$RPwXSV)KAW5KK&SH4p3`J(LKvU6bct~hozJ*&Y7h4Yr?QiXx$6@8 z(5)sRtmkrB>N)Bb*TZ(;0lQ0y1lu#2_?+$DPi*IPv;ChqKF;=WNNg_@7z+@_1cdD| zIu(g4m`K<*+ieK@i(XLbD)_qfm+$xzEo1#oCHmgu{v&$9dS2D}wvp#T0cBpnSDjz{ zaUY5LL&iy83KxXG$DP^5F+VaOO-Vn_H#xPccd7k?`>S~QeL2qatxmpes^Pw&^`#C^ z<9@ThUVLYzu5#X_Qwi)R{{F`66}_ODugT4PO>X*!;mh?f{kwSdy>BlR1K#f{$}g*( zH~JmE_s02V(Z?^xGr6ooP~r<7mXFx~Zz%UzL34ew56r$b{a%;Lz7RCyh+fdN|5v%0 mugQ + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + PVRTC4 + format + 3 + realTextureFileName + test_PVRTC4.pvr + size + {128,128} + smartupdate + $TexturePacker:SmartUpdate:360eedec25e674f9b901672ff165b590:ef6b77cb31cb9547aa403602c0e428cd:dc03f2079a0d593234df9b6d46fd3d10$ + textureFileName + test_PVRTC4.pvr + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC4.pvr b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_PVRTC4.pvr new file mode 100644 index 0000000000000000000000000000000000000000..03d861f33ca30e88bf4ef1892322bd60a15101d1 GIT binary patch literal 8244 zcmeHLVQ5>|6~0fhobIW!V!Qh{uu6VxXf3Oy{#e0GX}e+Ay1Hwk4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ZJB$N7K3CFqfUIY&hE35U2PUyNC zDQIftl@#+>$9MC&pVIzC{pmeCf*%u zGUQ)2n_T}*d_ASG{r`8~;A&_X48 z!p$a#&Xrv}nBSk_`?r1G>fAfd-{isV=yrbS^WU)(<~aufH=X&UQUm=c>V0pS=qf1s z3|drmvfb7+i$K+U!bM#`Ux6FWyz4AN9-D5rM@E<*!O(Ubtq(WV(1a>qm?2 zHv)UkqO0ty4hzWYE`@bpOlrBKquTk?nAt zF6^?so%wW{^>^&G&|h@gW4n=p0%hkuqk~{M>(%SP6?IGvyyNQLflnq`l1%El7TiO~ zP5m(SPSf!D*6YPO=L_1Gtf>e3{8Zf(s((><=zS~ix{pxxyQ4l;crKhzcyE;4(D1yw z_O}iDgq7bw>*WLS2fj738Yx7J@2(LIpF>@wj9~d9@>S(CQ4^7%pIt+LD`YyIM!qxt zNO;Iwt;`1J1>?r+`h5S}{eL-!bMUKwEo*y3CrZX1#}m%iFdyuT@7b>X8Q#!9?-qNv zk=wkEsP!)A&Bj%tuOcH54$JX=*?7nLCmpwi4(wc+~fM?b#mHTe7e>BD^D zo#!6rbzL5PjsDE~hfdq^S?*^f$};yW+u!{rZ^G-1{EMQdt{NJS<8$;^yKoBI>GHet ksEbDzkIuUCzmgB8t{NKNmyw764-nSt^4 + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGB565 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGB888.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGB888.plist new file mode 100644 index 0000000000..ed56de2063 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGB888.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGB888 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA4444.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA4444.plist new file mode 100644 index 0000000000..36c23570ef --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA4444.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGBA4444 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5551.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5551.plist new file mode 100644 index 0000000000..11c340b0e2 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5551.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGBA5551 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5555.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5555.plist new file mode 100644 index 0000000000..be38a88cce --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA5555.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGBA5555 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.plist b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.plist new file mode 100644 index 0000000000..097d97d8e5 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.plist @@ -0,0 +1,39 @@ + + + + + frames + + grossini.png + + aliases + + spriteOffset + {-1,-1} + spriteSize + {77,111} + spriteSourceSize + {85,121} + textureRect + {{1,1},{77,111}} + textureRotated + + + + metadata + + pixelFormat + RGBA8888 + format + 3 + realTextureFileName + test_RGBA8888.png + size + {79,113} + smartupdate + $TexturePacker:SmartUpdate:ad29d611fceadf8c409f092951e97e43:ef6b77cb31cb9547aa403602c0e428cd:71e039f5bf43cb7bf0081ac402bb1084$ + textureFileName + test_RGBA8888.png + + + diff --git a/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.png b/tests/cpp-tests/Resources/Images/sprite_frames_test/test_RGBA8888.png new file mode 100644 index 0000000000000000000000000000000000000000..ab9888d9667fce8d7b5a87530bcf30f348926789 GIT binary patch literal 796 zcmV+%1LOROP)pPqR=+1z-T zXP)jEu9oa=58$4uIF~hd7gm@P?<4ZkZ6kS<6ML}ux_=gN4WQhV_x*A&=a)MlpR#zZP;DfwARHi$MCCMu;$8xR0(Bh&b>0TkgK^ z;a#&52^TyUm-qY!&5Hz_|9&2g5wX2@1sZiti<>Ab0d#GP?e-=HU@@lLjCWx?%eFDVN)KAPvl^VVYv>iH?$Dhd^+Zp--s`>IaJs1#6Ylk1 z@Adwn$L`?^{udnsPkh{Ib8;TbKpLLy#AhM*!WomzUdc^fZ}65}FNJi-&2}#ixhHr} aNPhwTiX