├── .gitignore ├── LICENSE ├── README.md ├── cinderblock.png ├── cinderblock.xml ├── samples ├── SpritesheetAnimation │ ├── assets │ │ ├── charge.json │ │ └── charge.png │ ├── include │ │ └── Resources.h │ ├── resources │ │ └── CinderApp.icns │ ├── src │ │ └── SpritesheetAnimationApp.cpp │ ├── vc2013 │ │ ├── SpritesheetAnimation.sln │ │ ├── SpritesheetAnimation.vcxproj │ │ └── SpritesheetAnimation.vcxproj.filters │ └── xcode │ │ ├── Info.plist │ │ ├── SpritesheetAnimation.xcodeproj │ │ └── project.pbxproj │ │ └── SpritesheetAnimation_Prefix.pch └── SpritesheetFrame │ ├── assets │ ├── goblin.json │ └── goblin.png │ ├── include │ └── Resources.h │ ├── resources │ └── CinderApp.icns │ ├── src │ └── SpritesheetFrameApp.cpp │ ├── vc2013 │ ├── SpritesheetFrame.sln │ ├── SpritesheetFrame.vcxproj │ └── SpritesheetFrame.vcxproj.filters │ └── xcode │ ├── Info.plist │ ├── SpritesheetFrame.xcodeproj │ └── project.pbxproj │ └── SpritesheetFrame_Prefix.pch └── src ├── poScene ├── SpriteView.cpp └── SpriteView.h └── poSpritesheet ├── poSpritesheet.cpp ├── poSpritesheet.h ├── poSpritesheetAnimation.cpp └── poSpritesheetAnimation.h /.gitignore: -------------------------------------------------------------------------------- 1 | #OS X Files 2 | *.DS_STORE 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | 9 | # Compiled Dynamic libraries 10 | *.so 11 | *.dylib 12 | 13 | # Compiled Static libraries 14 | *.lai 15 | *.la 16 | 17 | # Xcode Noise 18 | *~.nib 19 | *.pbxuser 20 | *.perspective 21 | *.perspectivev3 22 | *.mode1v3 23 | *.mode2v3 24 | *.xcworkspace 25 | *.xcuserdata 26 | xcuserdata/ 27 | build/ 28 | 29 | #VS2013 Noise 30 | *.suo 31 | *.user 32 | *.userosscache 33 | *.sln.docstates 34 | *.userprefs 35 | *.ncb 36 | *.sdf 37 | *.opensdf 38 | *.idb 39 | Debug/ 40 | Release/ 41 | ipch/ 42 | 43 | DerivedData 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Potion Design LLC 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cinder-poSpritesheet 2 | 3 | [Potion's](http://www.potiondesign.com) spritesheet block for [Cinder](http://libcinder.org). Cinder-poSpritesheet is released under the [BSD New License](./LICENSE). 4 | 5 | ## Using this Repo 6 | 7 | When pulling down the repo, `develop` is the latest branch, `master` is stable. If you're using in conjunction with [poScene](../Cinder-poScene), make sure you're on poScene v2. If you're on poScene v1, you can check out the `v1.0` tag. If you're on an old project with Cinder 0.8.6, you can checkout the `v0.8.6` tag. 8 | 9 | ## Using the Block 10 | 11 | The block consists of two classes: 12 | 13 | - **Spritesheet:** parses and keeps track of the frame data 14 | - **SpritesheetAnimation:** provides control for frame playback 15 | 16 | Tested on OS X Yosemite and Windows 8. 17 | 18 | ## Features 19 | - Supports spritesheets created with [TexturePacker](https://www.codeandweb.com/texturepacker) 20 | - JSON (Array), XML (generic) data formats from within [TexturePacker](https://www.codeandweb.com/texturepacker) 21 | - Multipacked textures 22 | - Play, pause, stop, loop, reverse animation 23 | - Set animation frame rate 24 | - Get signal when animation has finished playing 25 | 26 | *Currently doesn't support rotated sprites.* 27 | 28 | ## Samples 29 | - **SpritesheetFrame:** draws a spritesheet frame based on mouse position 30 | - **SpritesheetAnimation:** animates spritesheet frames across the app window 31 | 32 | > [goblin](http://opengameart.org/content/goblin) by [Clint Bellanger](http://opengameart.org/users/clint-bellanger) used under [Creative Commons Attribution (CC-BY) 3.0 License](http://creativecommons.org/licenses/by/3.0/) / Scaled up from original. 33 | 34 | ## Getting started 35 | 36 | To draw a specific frame from the spritesheet: 37 | 38 | ```C++ 39 | gl::TextureRef texture = gl::Texture::create(loadImage(loadAsset("goblin.png"))); 40 | JsonTree json = JsonTree(loadAsset("goblin.json")); 41 | 42 | mSpritesheet = po::Spritesheet::create(texture, json); 43 | 44 | // draw frame by number 45 | mSpritesheet->drawFrame(6); 46 | 47 | // frame by source filename 48 | mSpritesheet->drawFrame("0031.png"); 49 | ``` 50 | 51 | To animate the spritesheet: 52 | 53 | ```C++ 54 | gl::TextureRef texture = gl::Texture::create(loadImage(loadAsset("charge.png"))); 55 | JsonTree json = JsonTree(loadAsset("charge.json")); 56 | 57 | mSpritesheet = po::Spritesheet::create(texture, json); 58 | mSpritesheetAnimation = po::SpritesheetAnimation::create(mSpritesheet); 59 | mSpritesheetAnimation->play(); 60 | ``` 61 | -------------------------------------------------------------------------------- /cinderblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potion/Cinder-poSpritesheet/03fb09d80fea0995f83272867f21742eb1e16bf4/cinderblock.png -------------------------------------------------------------------------------- /cinderblock.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 |
src/poSpritesheet/poSpritesheet.h
17 | src/poSpritesheet/poSpritesheet.cpp 18 | 19 |
src/poSpritesheet/poSpritesheetAnimation.h
20 | src/poSpritesheet/poSpritesheetAnimation.cpp 21 | 22 | 23 | src/poSpritesheet 24 | 25 | 26 | 27 | src/poSpritesheet 28 | 29 | 30 |
31 |
-------------------------------------------------------------------------------- /samples/SpritesheetAnimation/assets/charge.json: -------------------------------------------------------------------------------- 1 | {"frames": [ 2 | 3 | { 4 | "filename": "0013.png", 5 | "frame": {"x":1102,"y":2,"w":201,"h":167}, 6 | "rotated": false, 7 | "trimmed": true, 8 | "spriteSourceSize": {"x":121,"y":210,"w":201,"h":167}, 9 | "sourceSize": {"w":512,"h":512}, 10 | "pivot": {"x":0.5,"y":0.5} 11 | }, 12 | { 13 | "filename": "0014.png", 14 | "frame": {"x":366,"y":2,"w":198,"h":171}, 15 | "rotated": false, 16 | "trimmed": true, 17 | "spriteSourceSize": {"x":124,"y":209,"w":198,"h":171}, 18 | "sourceSize": {"w":512,"h":512}, 19 | "pivot": {"x":0.5,"y":0.5} 20 | }, 21 | { 22 | "filename": "0015.png", 23 | "frame": {"x":2,"y":2,"w":189,"h":175}, 24 | "rotated": false, 25 | "trimmed": true, 26 | "spriteSourceSize": {"x":126,"y":205,"w":189,"h":175}, 27 | "sourceSize": {"w":512,"h":512}, 28 | "pivot": {"x":0.5,"y":0.5} 29 | }, 30 | { 31 | "filename": "0016.png", 32 | "frame": {"x":931,"y":2,"w":169,"h":169}, 33 | "rotated": false, 34 | "trimmed": true, 35 | "spriteSourceSize": {"x":123,"y":209,"w":169,"h":169}, 36 | "sourceSize": {"w":512,"h":512}, 37 | "pivot": {"x":0.5,"y":0.5} 38 | }, 39 | { 40 | "filename": "0017.png", 41 | "frame": {"x":1305,"y":2,"w":175,"h":167}, 42 | "rotated": false, 43 | "trimmed": true, 44 | "spriteSourceSize": {"x":121,"y":210,"w":175,"h":167}, 45 | "sourceSize": {"w":512,"h":512}, 46 | "pivot": {"x":0.5,"y":0.5} 47 | }, 48 | { 49 | "filename": "0018.png", 50 | "frame": {"x":754,"y":2,"w":175,"h":169}, 51 | "rotated": false, 52 | "trimmed": true, 53 | "spriteSourceSize": {"x":123,"y":209,"w":175,"h":169}, 54 | "sourceSize": {"w":512,"h":512}, 55 | "pivot": {"x":0.5,"y":0.5} 56 | }, 57 | { 58 | "filename": "0019.png", 59 | "frame": {"x":193,"y":2,"w":171,"h":175}, 60 | "rotated": false, 61 | "trimmed": true, 62 | "spriteSourceSize": {"x":126,"y":205,"w":171,"h":175}, 63 | "sourceSize": {"w":512,"h":512}, 64 | "pivot": {"x":0.5,"y":0.5} 65 | }, 66 | { 67 | "filename": "0020.png", 68 | "frame": {"x":566,"y":2,"w":186,"h":169}, 69 | "rotated": false, 70 | "trimmed": true, 71 | "spriteSourceSize": {"x":123,"y":209,"w":186,"h":169}, 72 | "sourceSize": {"w":512,"h":512}, 73 | "pivot": {"x":0.5,"y":0.5} 74 | }], 75 | "meta": { 76 | "app": "http://www.codeandweb.com/texturepacker", 77 | "version": "1.0", 78 | "image": "charge.png", 79 | "format": "RGBA8888", 80 | "size": {"w":1482,"h":179}, 81 | "scale": "1", 82 | "smartupdate": "$TexturePacker:SmartUpdate:1d7643521db835a9ec28e22ce9c5b108:257eebb1f5f5c7909e2a9646a1186a0e:8760da782ca7071b98f21422f75eaf66$" 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/assets/charge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potion/Cinder-poSpritesheet/03fb09d80fea0995f83272867f21742eb1e16bf4/samples/SpritesheetAnimation/assets/charge.png -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/resources/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potion/Cinder-poSpritesheet/03fb09d80fea0995f83272867f21742eb1e16bf4/samples/SpritesheetAnimation/resources/CinderApp.icns -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/src/SpritesheetAnimationApp.cpp: -------------------------------------------------------------------------------- 1 | #include "cinder/app/App.h" 2 | #include "cinder/app/RendererGl.h" 3 | #include "cinder/gl/gl.h" 4 | #include "cinder/Timeline.h" 5 | #include "poSpritesheet.h" 6 | #include "poSpritesheetAnimation.h" 7 | 8 | using namespace ci; 9 | using namespace ci::app; 10 | using namespace std; 11 | 12 | class SpritesheetAnimationApp : public App { 13 | public: 14 | void setup(); 15 | void mouseDown( MouseEvent event ); 16 | void update(); 17 | void draw(); 18 | 19 | po::SpritesheetRef mSpritesheet; 20 | po::SpritesheetAnimationRef mSpritesheetAnimation; 21 | 22 | Anim mPos; 23 | vec2 mEndPos; 24 | }; 25 | 26 | void SpritesheetAnimationApp::setup() 27 | { 28 | setWindowSize(1024, 768); 29 | 30 | mPos = vec2(1024, 0); 31 | mEndPos = vec2(0, 768); 32 | 33 | gl::TextureRef texture = gl::Texture::create(loadImage(loadAsset("charge.png"))); 34 | JsonTree json = JsonTree(loadAsset("charge.json")); 35 | 36 | mSpritesheet = po::Spritesheet::create(texture, json); 37 | mSpritesheetAnimation = po::SpritesheetAnimation::create(mSpritesheet); 38 | mSpritesheetAnimation->setIsLoopingEnabled(true); 39 | mSpritesheetAnimation->play(); 40 | 41 | timeline().apply(&mPos, mEndPos, 15.0f).loop(); 42 | } 43 | 44 | void SpritesheetAnimationApp::mouseDown( MouseEvent event ) 45 | { 46 | } 47 | 48 | void SpritesheetAnimationApp::update() 49 | { 50 | mSpritesheetAnimation->update(); 51 | } 52 | 53 | void SpritesheetAnimationApp::draw() 54 | { 55 | gl::clear(Color::gray(0.2)); 56 | gl::pushModelView(); 57 | vec2 val = mPos.value(); 58 | gl::translate(val.x - mSpritesheet->getOriginalBounds().getWidth()/2, val.y - mSpritesheet->getOriginalBounds().getHeight()/2); 59 | mSpritesheetAnimation->draw(); 60 | gl::popModelView(); 61 | } 62 | 63 | CINDER_APP( SpritesheetAnimationApp, RendererGl ) 64 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/vc2013/SpritesheetAnimation.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpritesheetAnimation", "SpritesheetAnimation.vcxproj", "{054EC338-3F6F-483C-A99C-B703C7F7E0F9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Debug|Win32.Build.0 = Debug|Win32 18 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Debug|x64.ActiveCfg = Debug|x64 19 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Debug|x64.Build.0 = Debug|x64 20 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Release|Win32.ActiveCfg = Release|Win32 21 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Release|Win32.Build.0 = Release|Win32 22 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Release|x64.ActiveCfg = Release|x64 23 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/vc2013/SpritesheetAnimation.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {054EC338-3F6F-483C-A99C-B703C7F7E0F9} 23 | Win32Proj 24 | SpritesheetAnimation 25 | 26 | 27 | 28 | Application 29 | true 30 | v120 31 | Unicode 32 | 33 | 34 | Application 35 | true 36 | v120 37 | Unicode 38 | 39 | 40 | Application 41 | false 42 | v120 43 | true 44 | Unicode 45 | 46 | 47 | Application 48 | false 49 | v120 50 | true 51 | Unicode 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | true 71 | 72 | 73 | true 74 | 75 | 76 | false 77 | 78 | 79 | false 80 | 81 | 82 | 83 | 84 | 85 | Level3 86 | Disabled 87 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 88 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;%(AdditionalIncludeDirectories) 89 | 90 | 91 | Windows 92 | true 93 | 94 | 95 | 96 | 97 | 98 | 99 | Level2 100 | Disabled 101 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 102 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;..\..\..\..\INT\Cinder\include;%(AdditionalIncludeDirectories) 103 | MultiThreadedDebug 104 | 105 | 106 | Windows 107 | true 108 | ..\..\..\..\INT\Cinder\lib\msw\x64;%(AdditionalLibraryDirectories) 109 | libboost_filesystem-vc120-mt-sgd-1_58.lib;libboost_system-vc120-mt-sgd-1_58.lib;cinder-v120_d.lib;%(AdditionalDependencies) 110 | 111 | 112 | 113 | 114 | Level3 115 | 116 | 117 | MaxSpeed 118 | true 119 | true 120 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 121 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;%(AdditionalIncludeDirectories) 122 | 123 | 124 | Windows 125 | true 126 | true 127 | true 128 | 129 | 130 | 131 | 132 | Level2 133 | 134 | 135 | MaxSpeed 136 | true 137 | true 138 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 139 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;..\..\..\..\INT\Cinder\include;%(AdditionalIncludeDirectories) 140 | 141 | 142 | Windows 143 | true 144 | true 145 | true 146 | ..\..\..\..\INT\Cinder\lib\msw\x64;%(AdditionalLibraryDirectories) 147 | libboost_filesystem-vc120-mt-sgd-1_58.lib;libboost_system-vc120-mt-sgd-1_58.lib;cinder-v120_d.lib;%(AdditionalDependencies) 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/vc2013/SpritesheetAnimation.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 6 | h;hh;hpp;hxx;hm;inl;inc;xsd 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 11 | 12 | 13 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 14 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 15 | 16 | 17 | {eec7d3bb-6642-40cc-a17a-719b28d6eea4} 18 | 19 | 20 | {30027383-4a6b-4f3c-8bc3-67e9a29f669a} 21 | 22 | 23 | {eee6fddc-7ac2-4933-8fce-88e9d3002e30} 24 | 25 | 26 | {eeb9c340-a7aa-4174-951d-28c1a0058709} 27 | 28 | 29 | {ad1982a8-fe26-4eec-ae37-056a6b22b2b6} 30 | 31 | 32 | {f443529a-224f-4fd9-b55b-5e0ab689bea4} 33 | 34 | 35 | {580ee7f2-625c-4e13-96da-0cc116f16422} 36 | 37 | 38 | 39 | 40 | src 41 | 42 | 43 | Blocks\poScene\src 44 | 45 | 46 | Blocks\poScene\src 47 | 48 | 49 | Blocks\poScene\src 50 | 51 | 52 | Blocks\poScene\src 53 | 54 | 55 | Blocks\poScene\src 56 | 57 | 58 | Blocks\poScene\src 59 | 60 | 61 | Blocks\poScene\src 62 | 63 | 64 | Blocks\poScene\src 65 | 66 | 67 | Blocks\poScene\src 68 | 69 | 70 | Blocks\poSpritesheet\src\poScene 71 | 72 | 73 | Blocks\poSpritesheet\src\poSpritesheet 74 | 75 | 76 | Blocks\poSpritesheet\src\poSpritesheet 77 | 78 | 79 | 80 | 81 | Resource Files 82 | 83 | 84 | Header Files 85 | 86 | 87 | 88 | 89 | Header Files 90 | 91 | 92 | Blocks\poScene\src 93 | 94 | 95 | Blocks\poScene\src 96 | 97 | 98 | Blocks\poScene\src 99 | 100 | 101 | Blocks\poScene\src 102 | 103 | 104 | Blocks\poScene\src 105 | 106 | 107 | Blocks\poScene\src 108 | 109 | 110 | Blocks\poScene\src 111 | 112 | 113 | Blocks\poScene\src 114 | 115 | 116 | Blocks\poScene\src 117 | 118 | 119 | Blocks\poScene\src 120 | 121 | 122 | Blocks\poScene\src 123 | 124 | 125 | Blocks\poSpritesheet\src\poScene 126 | 127 | 128 | Blocks\poSpritesheet\src\poSpritesheet 129 | 130 | 131 | Blocks\poSpritesheet\src\poSpritesheet 132 | 133 | 134 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | org.libcinder.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2013 __MyCompanyName__. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/xcode/SpritesheetAnimation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; 11 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; 12 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; 13 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; 14 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; 15 | 0CBF7A82467742C5A29439FE /* SpritesheetAnimationApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1A717E51C04B5DBD3B9AAF /* SpritesheetAnimationApp.cpp */; }; 16 | 23A40E690806476AAB950409 /* poSpritesheetAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 079C453E4E0741A6A0D8864B /* poSpritesheetAnimation.cpp */; }; 17 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; 18 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; 19 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 20 | AAF4EF861C485C0100D50D5A /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAF4EF851C485C0100D50D5A /* IOKit.framework */; }; 21 | AAF4EF881C485C0700D50D5A /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAF4EF871C485C0700D50D5A /* AVFoundation.framework */; }; 22 | AAF4EF8A1C485C3400D50D5A /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAF4EF891C485C3400D50D5A /* CoreMedia.framework */; }; 23 | B82E4A7C88B648AA8D1E4894 /* poSpritesheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1856897574A547F1A4B20BCE /* poSpritesheet.cpp */; }; 24 | D9C25DA7E5C54797885E1B57 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = BEC8B1DAFF2B4A5AA998C198 /* CinderApp.icns */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 29 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 30 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 31 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 32 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 33 | 079C453E4E0741A6A0D8864B /* poSpritesheetAnimation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = poSpritesheetAnimation.cpp; path = ../../../src/poSpritesheet/poSpritesheetAnimation.cpp; sourceTree = ""; }; 34 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 35 | 1856897574A547F1A4B20BCE /* poSpritesheet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = poSpritesheet.cpp; path = ../../../src/poSpritesheet/poSpritesheet.cpp; sourceTree = ""; }; 36 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 37 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 38 | 3E6A9033D90E40BFBA281026 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 40 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 41 | 8D1107320486CEB800E47090 /* SpritesheetAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpritesheetAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | A05BE0A0BFC0458096E598A5 /* SpritesheetAnimation_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = SpritesheetAnimation_Prefix.pch; sourceTree = ""; }; 43 | AAF4EF851C485C0100D50D5A /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 44 | AAF4EF871C485C0700D50D5A /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 45 | AAF4EF891C485C3400D50D5A /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 46 | AF1A717E51C04B5DBD3B9AAF /* SpritesheetAnimationApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = SpritesheetAnimationApp.cpp; path = ../src/SpritesheetAnimationApp.cpp; sourceTree = ""; }; 47 | B31B630883BA4A95AB67AA7F /* poSpritesheet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = poSpritesheet.h; path = ../../../src/poSpritesheet/poSpritesheet.h; sourceTree = ""; }; 48 | BEC8B1DAFF2B4A5AA998C198 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../resources/CinderApp.icns; sourceTree = ""; }; 49 | D947688CE7FF411482382074 /* poSpritesheetAnimation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = poSpritesheetAnimation.h; path = ../../../src/poSpritesheet/poSpritesheetAnimation.h; sourceTree = ""; }; 50 | E11FECA2CA644695B312D5FF /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 8D11072E0486CEB800E47090 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | AAF4EF8A1C485C3400D50D5A /* CoreMedia.framework in Frameworks */, 59 | AAF4EF881C485C0700D50D5A /* AVFoundation.framework in Frameworks */, 60 | AAF4EF861C485C0100D50D5A /* IOKit.framework in Frameworks */, 61 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, 62 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, 63 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, 64 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, 65 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, 66 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, 67 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, 68 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 01B97315FEAEA392516A2CEA /* Blocks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | F350D990A65740198F4E2601 /* poSpritesheet */, 79 | ); 80 | name = Blocks; 81 | sourceTree = ""; 82 | }; 83 | 080E96DDFE201D6D7F000001 /* Source */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | AF1A717E51C04B5DBD3B9AAF /* SpritesheetAnimationApp.cpp */, 87 | ); 88 | name = Source; 89 | sourceTree = ""; 90 | }; 91 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, 95 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, 96 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, 97 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, 98 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, 99 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, 100 | 0091D8F80E81B9330029341E /* OpenGL.framework */, 101 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, 102 | ); 103 | name = "Linked Frameworks"; 104 | sourceTree = ""; 105 | }; 106 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */, 110 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */, 111 | ); 112 | name = "Other Frameworks"; 113 | sourceTree = ""; 114 | }; 115 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 8D1107320486CEB800E47090 /* SpritesheetAnimation.app */, 119 | ); 120 | name = Products; 121 | sourceTree = ""; 122 | }; 123 | 29B97314FDCFA39411CA2CEA /* SpritesheetAnimation */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 01B97315FEAEA392516A2CEA /* Blocks */, 127 | 29B97315FDCFA39411CA2CEA /* Headers */, 128 | 080E96DDFE201D6D7F000001 /* Source */, 129 | 29B97317FDCFA39411CA2CEA /* Resources */, 130 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 131 | 19C28FACFE9D520D11CA2CBB /* Products */, 132 | ); 133 | name = SpritesheetAnimation; 134 | sourceTree = ""; 135 | }; 136 | 29B97315FDCFA39411CA2CEA /* Headers */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | E11FECA2CA644695B312D5FF /* Resources.h */, 140 | A05BE0A0BFC0458096E598A5 /* SpritesheetAnimation_Prefix.pch */, 141 | ); 142 | name = Headers; 143 | sourceTree = ""; 144 | }; 145 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | BEC8B1DAFF2B4A5AA998C198 /* CinderApp.icns */, 149 | 3E6A9033D90E40BFBA281026 /* Info.plist */, 150 | ); 151 | name = Resources; 152 | sourceTree = ""; 153 | }; 154 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | AAF4EF891C485C3400D50D5A /* CoreMedia.framework */, 158 | AAF4EF871C485C0700D50D5A /* AVFoundation.framework */, 159 | AAF4EF851C485C0100D50D5A /* IOKit.framework */, 160 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 161 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, 162 | ); 163 | name = Frameworks; 164 | sourceTree = ""; 165 | }; 166 | A37A6941C406444E8A2C04B9 /* src */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | F9752033E1EE46B095CC0A5A /* poSpritesheet */, 170 | ); 171 | name = src; 172 | sourceTree = ""; 173 | }; 174 | F350D990A65740198F4E2601 /* poSpritesheet */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | A37A6941C406444E8A2C04B9 /* src */, 178 | ); 179 | name = poSpritesheet; 180 | sourceTree = ""; 181 | }; 182 | F9752033E1EE46B095CC0A5A /* poSpritesheet */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | B31B630883BA4A95AB67AA7F /* poSpritesheet.h */, 186 | 1856897574A547F1A4B20BCE /* poSpritesheet.cpp */, 187 | D947688CE7FF411482382074 /* poSpritesheetAnimation.h */, 188 | 079C453E4E0741A6A0D8864B /* poSpritesheetAnimation.cpp */, 189 | ); 190 | name = poSpritesheet; 191 | sourceTree = ""; 192 | }; 193 | /* End PBXGroup section */ 194 | 195 | /* Begin PBXNativeTarget section */ 196 | 8D1107260486CEB800E47090 /* SpritesheetAnimation */ = { 197 | isa = PBXNativeTarget; 198 | buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpritesheetAnimation" */; 199 | buildPhases = ( 200 | 8D1107290486CEB800E47090 /* Resources */, 201 | 8D11072C0486CEB800E47090 /* Sources */, 202 | 8D11072E0486CEB800E47090 /* Frameworks */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | ); 208 | name = SpritesheetAnimation; 209 | productInstallPath = "$(HOME)/Applications"; 210 | productName = SpritesheetAnimation; 211 | productReference = 8D1107320486CEB800E47090 /* SpritesheetAnimation.app */; 212 | productType = "com.apple.product-type.application"; 213 | }; 214 | /* End PBXNativeTarget section */ 215 | 216 | /* Begin PBXProject section */ 217 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 218 | isa = PBXProject; 219 | attributes = { 220 | }; 221 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpritesheetAnimation" */; 222 | compatibilityVersion = "Xcode 3.2"; 223 | developmentRegion = English; 224 | hasScannedForEncodings = 1; 225 | knownRegions = ( 226 | English, 227 | Japanese, 228 | French, 229 | German, 230 | ); 231 | mainGroup = 29B97314FDCFA39411CA2CEA /* SpritesheetAnimation */; 232 | projectDirPath = ""; 233 | projectRoot = ""; 234 | targets = ( 235 | 8D1107260486CEB800E47090 /* SpritesheetAnimation */, 236 | ); 237 | }; 238 | /* End PBXProject section */ 239 | 240 | /* Begin PBXResourcesBuildPhase section */ 241 | 8D1107290486CEB800E47090 /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | D9C25DA7E5C54797885E1B57 /* CinderApp.icns in Resources */, 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | }; 249 | /* End PBXResourcesBuildPhase section */ 250 | 251 | /* Begin PBXSourcesBuildPhase section */ 252 | 8D11072C0486CEB800E47090 /* Sources */ = { 253 | isa = PBXSourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | 0CBF7A82467742C5A29439FE /* SpritesheetAnimationApp.cpp in Sources */, 257 | B82E4A7C88B648AA8D1E4894 /* poSpritesheet.cpp in Sources */, 258 | 23A40E690806476AAB950409 /* poSpritesheetAnimation.cpp in Sources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | /* End PBXSourcesBuildPhase section */ 263 | 264 | /* Begin XCBuildConfiguration section */ 265 | C01FCF4B08A954540054247B /* Debug */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | COMBINE_HIDPI_IMAGES = YES; 269 | COPY_PHASE_STRIP = NO; 270 | DEAD_CODE_STRIPPING = YES; 271 | GCC_DYNAMIC_NO_PIC = NO; 272 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 273 | GCC_OPTIMIZATION_LEVEL = 0; 274 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 275 | GCC_PREFIX_HEADER = SpritesheetAnimation_Prefix.pch; 276 | GCC_PREPROCESSOR_DEFINITIONS = ( 277 | "DEBUG=1", 278 | "$(inherited)", 279 | ); 280 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 281 | INFOPLIST_FILE = Info.plist; 282 | INSTALL_PATH = "$(HOME)/Applications"; 283 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/libcinder_d.a\""; 284 | PRODUCT_NAME = SpritesheetAnimation; 285 | SYMROOT = ./build; 286 | WRAPPER_EXTENSION = app; 287 | }; 288 | name = Debug; 289 | }; 290 | C01FCF4C08A954540054247B /* Release */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | COMBINE_HIDPI_IMAGES = YES; 294 | DEAD_CODE_STRIPPING = YES; 295 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 296 | GCC_FAST_MATH = YES; 297 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 298 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 299 | GCC_OPTIMIZATION_LEVEL = 3; 300 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 301 | GCC_PREFIX_HEADER = SpritesheetAnimation_Prefix.pch; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "NDEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 307 | INFOPLIST_FILE = Info.plist; 308 | INSTALL_PATH = "$(HOME)/Applications"; 309 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/libcinder.a\""; 310 | PRODUCT_NAME = SpritesheetAnimation; 311 | STRIP_INSTALLED_PRODUCT = YES; 312 | SYMROOT = ./build; 313 | WRAPPER_EXTENSION = app; 314 | }; 315 | name = Release; 316 | }; 317 | C01FCF4F08A954540054247B /* Debug */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = YES; 321 | ARCHS = "$(ARCHS_STANDARD)"; 322 | CINDER_PATH = ../../../../..; 323 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 326 | GCC_WARN_UNUSED_VARIABLE = YES; 327 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/boost\""; 328 | MACOSX_DEPLOYMENT_TARGET = 10.9; 329 | ONLY_ACTIVE_ARCH = YES; 330 | SDKROOT = macosx; 331 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/poSpritesheet"; 332 | }; 333 | name = Debug; 334 | }; 335 | C01FCF5008A954540054247B /* Release */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = YES; 339 | ARCHS = "$(ARCHS_STANDARD)"; 340 | CINDER_PATH = ../../../../..; 341 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/boost\""; 346 | MACOSX_DEPLOYMENT_TARGET = 10.9; 347 | ONLY_ACTIVE_ARCH = YES; 348 | SDKROOT = macosx; 349 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/poSpritesheet"; 350 | }; 351 | name = Release; 352 | }; 353 | /* End XCBuildConfiguration section */ 354 | 355 | /* Begin XCConfigurationList section */ 356 | C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpritesheetAnimation" */ = { 357 | isa = XCConfigurationList; 358 | buildConfigurations = ( 359 | C01FCF4B08A954540054247B /* Debug */, 360 | C01FCF4C08A954540054247B /* Release */, 361 | ); 362 | defaultConfigurationIsVisible = 0; 363 | defaultConfigurationName = Release; 364 | }; 365 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpritesheetAnimation" */ = { 366 | isa = XCConfigurationList; 367 | buildConfigurations = ( 368 | C01FCF4F08A954540054247B /* Debug */, 369 | C01FCF5008A954540054247B /* Release */, 370 | ); 371 | defaultConfigurationIsVisible = 0; 372 | defaultConfigurationName = Release; 373 | }; 374 | /* End XCConfigurationList section */ 375 | }; 376 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 377 | } 378 | -------------------------------------------------------------------------------- /samples/SpritesheetAnimation/xcode/SpritesheetAnimation_Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #if defined( __cplusplus ) 6 | #include "cinder/Cinder.h" 7 | 8 | #include "cinder/app/App.h" 9 | 10 | #include "cinder/gl/gl.h" 11 | 12 | #include "cinder/CinderMath.h" 13 | #include "cinder/Matrix.h" 14 | #include "cinder/Vector.h" 15 | #include "cinder/Quaternion.h" 16 | #endif 17 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/assets/goblin.json: -------------------------------------------------------------------------------- 1 | {"frames": [ 2 | 3 | { 4 | "filename": "0001.png", 5 | "frame": {"x":1457,"y":173,"w":180,"h":166}, 6 | "rotated": false, 7 | "trimmed": true, 8 | "spriteSourceSize": {"x":142,"y":186,"w":180,"h":166}, 9 | "sourceSize": {"w":512,"h":512}, 10 | "pivot": {"x":0.5,"y":0.5} 11 | }, 12 | { 13 | "filename": "0002.png", 14 | "frame": {"x":1309,"y":710,"w":180,"h":164}, 15 | "rotated": false, 16 | "trimmed": true, 17 | "spriteSourceSize": {"x":142,"y":187,"w":180,"h":164}, 18 | "sourceSize": {"w":512,"h":512}, 19 | "pivot": {"x":0.5,"y":0.5} 20 | }, 21 | { 22 | "filename": "0003.png", 23 | "frame": {"x":1486,"y":515,"w":180,"h":161}, 24 | "rotated": false, 25 | "trimmed": true, 26 | "spriteSourceSize": {"x":142,"y":190,"w":180,"h":161}, 27 | "sourceSize": {"w":512,"h":512}, 28 | "pivot": {"x":0.5,"y":0.5} 29 | }, 30 | { 31 | "filename": "0004.png", 32 | "frame": {"x":1675,"y":800,"w":179,"h":159}, 33 | "rotated": false, 34 | "trimmed": true, 35 | "spriteSourceSize": {"x":140,"y":192,"w":179,"h":159}, 36 | "sourceSize": {"w":512,"h":512}, 37 | "pivot": {"x":0.5,"y":0.5} 38 | }, 39 | { 40 | "filename": "0005.png", 41 | "frame": {"x":1668,"y":497,"w":195,"h":148}, 42 | "rotated": false, 43 | "trimmed": true, 44 | "spriteSourceSize": {"x":143,"y":200,"w":195,"h":148}, 45 | "sourceSize": {"w":512,"h":512}, 46 | "pivot": {"x":0.5,"y":0.5} 47 | }, 48 | { 49 | "filename": "0006.png", 50 | "frame": {"x":1668,"y":647,"w":186,"h":151}, 51 | "rotated": false, 52 | "trimmed": true, 53 | "spriteSourceSize": {"x":133,"y":184,"w":186,"h":151}, 54 | "sourceSize": {"w":512,"h":512}, 55 | "pivot": {"x":0.5,"y":0.5} 56 | }, 57 | { 58 | "filename": "0007.png", 59 | "frame": {"x":1511,"y":841,"w":162,"h":161}, 60 | "rotated": false, 61 | "trimmed": true, 62 | "spriteSourceSize": {"x":176,"y":164,"w":162,"h":161}, 63 | "sourceSize": {"w":512,"h":512}, 64 | "pivot": {"x":0.5,"y":0.5} 65 | }, 66 | { 67 | "filename": "0008.png", 68 | "frame": {"x":536,"y":2,"w":158,"h":229}, 69 | "rotated": false, 70 | "trimmed": true, 71 | "spriteSourceSize": {"x":183,"y":85,"w":158,"h":229}, 72 | "sourceSize": {"w":512,"h":512}, 73 | "pivot": {"x":0.5,"y":0.5} 74 | }, 75 | { 76 | "filename": "0009.png", 77 | "frame": {"x":217,"y":281,"w":170,"h":269}, 78 | "rotated": false, 79 | "trimmed": true, 80 | "spriteSourceSize": {"x":180,"y":49,"w":170,"h":269}, 81 | "sourceSize": {"w":512,"h":512}, 82 | "pivot": {"x":0.5,"y":0.5} 83 | }, 84 | { 85 | "filename": "0010.png", 86 | "frame": {"x":156,"y":2,"w":178,"h":277}, 87 | "rotated": false, 88 | "trimmed": true, 89 | "spriteSourceSize": {"x":174,"y":52,"w":178,"h":277}, 90 | "sourceSize": {"w":512,"h":512}, 91 | "pivot": {"x":0.5,"y":0.5} 92 | }, 93 | { 94 | "filename": "0011.png", 95 | "frame": {"x":2,"y":613,"w":174,"h":276}, 96 | "rotated": false, 97 | "trimmed": true, 98 | "spriteSourceSize": {"x":173,"y":70,"w":174,"h":276}, 99 | "sourceSize": {"w":512,"h":512}, 100 | "pivot": {"x":0.5,"y":0.5} 101 | }, 102 | { 103 | "filename": "0012.png", 104 | "frame": {"x":961,"y":813,"w":186,"h":177}, 105 | "rotated": false, 106 | "trimmed": true, 107 | "spriteSourceSize": {"x":128,"y":174,"w":186,"h":177}, 108 | "sourceSize": {"w":512,"h":512}, 109 | "pivot": {"x":0.5,"y":0.5} 110 | }, 111 | { 112 | "filename": "0013.png", 113 | "frame": {"x":1283,"y":541,"w":201,"h":167}, 114 | "rotated": false, 115 | "trimmed": true, 116 | "spriteSourceSize": {"x":121,"y":210,"w":201,"h":167}, 117 | "sourceSize": {"w":512,"h":512}, 118 | "pivot": {"x":0.5,"y":0.5} 119 | }, 120 | { 121 | "filename": "0014.png", 122 | "frame": {"x":1163,"y":2,"w":198,"h":171}, 123 | "rotated": false, 124 | "trimmed": true, 125 | "spriteSourceSize": {"x":124,"y":209,"w":198,"h":171}, 126 | "sourceSize": {"w":512,"h":512}, 127 | "pivot": {"x":0.5,"y":0.5} 128 | }, 129 | { 130 | "filename": "0015.png", 131 | "frame": {"x":949,"y":406,"w":189,"h":175}, 132 | "rotated": false, 133 | "trimmed": true, 134 | "spriteSourceSize": {"x":126,"y":205,"w":189,"h":175}, 135 | "sourceSize": {"w":512,"h":512}, 136 | "pivot": {"x":0.5,"y":0.5} 137 | }, 138 | { 139 | "filename": "0016.png", 140 | "frame": {"x":1363,"y":2,"w":169,"h":169}, 141 | "rotated": false, 142 | "trimmed": true, 143 | "spriteSourceSize": {"x":123,"y":209,"w":169,"h":169}, 144 | "sourceSize": {"w":512,"h":512}, 145 | "pivot": {"x":0.5,"y":0.5} 146 | }, 147 | { 148 | "filename": "0017.png", 149 | "frame": {"x":1328,"y":346,"w":175,"h":167}, 150 | "rotated": false, 151 | "trimmed": true, 152 | "spriteSourceSize": {"x":121,"y":210,"w":175,"h":167}, 153 | "sourceSize": {"w":512,"h":512}, 154 | "pivot": {"x":0.5,"y":0.5} 155 | }, 156 | { 157 | "filename": "0018.png", 158 | "frame": {"x":1280,"y":175,"w":175,"h":169}, 159 | "rotated": false, 160 | "trimmed": true, 161 | "spriteSourceSize": {"x":123,"y":209,"w":175,"h":169}, 162 | "sourceSize": {"w":512,"h":512}, 163 | "pivot": {"x":0.5,"y":0.5} 164 | }, 165 | { 166 | "filename": "0019.png", 167 | "frame": {"x":1107,"y":193,"w":171,"h":175}, 168 | "rotated": false, 169 | "trimmed": true, 170 | "spriteSourceSize": {"x":126,"y":205,"w":171,"h":175}, 171 | "sourceSize": {"w":512,"h":512}, 172 | "pivot": {"x":0.5,"y":0.5} 173 | }, 174 | { 175 | "filename": "0020.png", 176 | "frame": {"x":1140,"y":370,"w":186,"h":169}, 177 | "rotated": false, 178 | "trimmed": true, 179 | "spriteSourceSize": {"x":123,"y":209,"w":186,"h":169}, 180 | "sourceSize": {"w":512,"h":512}, 181 | "pivot": {"x":0.5,"y":0.5} 182 | }, 183 | { 184 | "filename": "0021.png", 185 | "frame": {"x":904,"y":625,"w":157,"h":186}, 186 | "rotated": false, 187 | "trimmed": true, 188 | "spriteSourceSize": {"x":167,"y":169,"w":157,"h":186}, 189 | "sourceSize": {"w":512,"h":512}, 190 | "pivot": {"x":0.5,"y":0.5} 191 | }, 192 | { 193 | "filename": "0022.png", 194 | "frame": {"x":943,"y":210,"w":162,"h":194}, 195 | "rotated": false, 196 | "trimmed": true, 197 | "spriteSourceSize": {"x":144,"y":157,"w":162,"h":194}, 198 | "sourceSize": {"w":512,"h":512}, 199 | "pivot": {"x":0.5,"y":0.5} 200 | }, 201 | { 202 | "filename": "0023.png", 203 | "frame": {"x":178,"y":885,"w":237,"h":135}, 204 | "rotated": false, 205 | "trimmed": true, 206 | "spriteSourceSize": {"x":76,"y":212,"w":237,"h":135}, 207 | "sourceSize": {"w":512,"h":512}, 208 | "pivot": {"x":0.5,"y":0.5} 209 | }, 210 | { 211 | "filename": "0024.png", 212 | "frame": {"x":603,"y":867,"w":228,"h":154}, 213 | "rotated": false, 214 | "trimmed": true, 215 | "spriteSourceSize": {"x":89,"y":218,"w":228,"h":154}, 216 | "sourceSize": {"w":512,"h":512}, 217 | "pivot": {"x":0.5,"y":0.5} 218 | }, 219 | { 220 | "filename": "0025.png", 221 | "frame": {"x":863,"y":2,"w":135,"h":206}, 222 | "rotated": false, 223 | "trimmed": true, 224 | "spriteSourceSize": {"x":218,"y":136,"w":135,"h":206}, 225 | "sourceSize": {"w":512,"h":512}, 226 | "pivot": {"x":0.5,"y":0.5} 227 | }, 228 | { 229 | "filename": "0026.png", 230 | "frame": {"x":586,"y":233,"w":173,"h":216}, 231 | "rotated": false, 232 | "trimmed": true, 233 | "spriteSourceSize": {"x":169,"y":135,"w":173,"h":216}, 234 | "sourceSize": {"w":512,"h":512}, 235 | "pivot": {"x":0.5,"y":0.5} 236 | }, 237 | { 238 | "filename": "0027.png", 239 | "frame": {"x":1639,"y":332,"w":207,"h":163}, 240 | "rotated": false, 241 | "trimmed": true, 242 | "spriteSourceSize": {"x":108,"y":178,"w":207,"h":163}, 243 | "sourceSize": {"w":512,"h":512}, 244 | "pivot": {"x":0.5,"y":0.5} 245 | }, 246 | { 247 | "filename": "0028.png", 248 | "frame": {"x":1063,"y":583,"w":218,"h":170}, 249 | "rotated": false, 250 | "trimmed": true, 251 | "spriteSourceSize": {"x":95,"y":179,"w":218,"h":170}, 252 | "sourceSize": {"w":512,"h":512}, 253 | "pivot": {"x":0.5,"y":0.5} 254 | }, 255 | { 256 | "filename": "0029.png", 257 | "frame": {"x":833,"y":865,"w":126,"h":154}, 258 | "rotated": false, 259 | "trimmed": true, 260 | "spriteSourceSize": {"x":183,"y":203,"w":126,"h":154}, 261 | "sourceSize": {"w":512,"h":512}, 262 | "pivot": {"x":0.5,"y":0.5} 263 | }, 264 | { 265 | "filename": "0030.png", 266 | "frame": {"x":1149,"y":755,"w":158,"h":169}, 267 | "rotated": false, 268 | "trimmed": true, 269 | "spriteSourceSize": {"x":176,"y":180,"w":158,"h":169}, 270 | "sourceSize": {"w":512,"h":512}, 271 | "pivot": {"x":0.5,"y":0.5} 272 | }, 273 | { 274 | "filename": "0031.png", 275 | "frame": {"x":389,"y":268,"w":195,"h":254}, 276 | "rotated": false, 277 | "trimmed": true, 278 | "spriteSourceSize": {"x":162,"y":95,"w":195,"h":254}, 279 | "sourceSize": {"w":512,"h":512}, 280 | "pivot": {"x":0.5,"y":0.5} 281 | }, 282 | { 283 | "filename": "0032.png", 284 | "frame": {"x":336,"y":2,"w":198,"h":264}, 285 | "rotated": false, 286 | "trimmed": true, 287 | "spriteSourceSize": {"x":168,"y":84,"w":198,"h":264}, 288 | "sourceSize": {"w":512,"h":512}, 289 | "pivot": {"x":0.5,"y":0.5} 290 | }, 291 | { 292 | "filename": "0033.png", 293 | "frame": {"x":1511,"y":678,"w":148,"h":161}, 294 | "rotated": false, 295 | "trimmed": true, 296 | "spriteSourceSize": {"x":197,"y":179,"w":148,"h":161}, 297 | "sourceSize": {"w":512,"h":512}, 298 | "pivot": {"x":0.5,"y":0.5} 299 | }, 300 | { 301 | "filename": "0034.png", 302 | "frame": {"x":1639,"y":169,"w":212,"h":161}, 303 | "rotated": false, 304 | "trimmed": true, 305 | "spriteSourceSize": {"x":151,"y":175,"w":212,"h":161}, 306 | "sourceSize": {"w":512,"h":512}, 307 | "pivot": {"x":0.5,"y":0.5} 308 | }, 309 | { 310 | "filename": "0035.png", 311 | "frame": {"x":1000,"y":2,"w":161,"h":189}, 312 | "rotated": false, 313 | "trimmed": true, 314 | "spriteSourceSize": {"x":182,"y":171,"w":161,"h":189}, 315 | "sourceSize": {"w":512,"h":512}, 316 | "pivot": {"x":0.5,"y":0.5} 317 | }, 318 | { 319 | "filename": "0036.png", 320 | "frame": {"x":795,"y":428,"w":152,"h":195}, 321 | "rotated": false, 322 | "trimmed": true, 323 | "spriteSourceSize": {"x":205,"y":173,"w":152,"h":195}, 324 | "sourceSize": {"w":512,"h":512}, 325 | "pivot": {"x":0.5,"y":0.5} 326 | }, 327 | { 328 | "filename": "0037.png", 329 | "frame": {"x":735,"y":660,"w":167,"h":203}, 330 | "rotated": false, 331 | "trimmed": true, 332 | "spriteSourceSize": {"x":200,"y":159,"w":167,"h":203}, 333 | "sourceSize": {"w":512,"h":512}, 334 | "pivot": {"x":0.5,"y":0.5} 335 | }, 336 | { 337 | "filename": "0038.png", 338 | "frame": {"x":591,"y":451,"w":202,"h":207}, 339 | "rotated": false, 340 | "trimmed": true, 341 | "spriteSourceSize": {"x":174,"y":146,"w":202,"h":207}, 342 | "sourceSize": {"w":512,"h":512}, 343 | "pivot": {"x":0.5,"y":0.5} 344 | }, 345 | { 346 | "filename": "0039.png", 347 | "frame": {"x":1534,"y":2,"w":205,"h":165}, 348 | "rotated": false, 349 | "trimmed": true, 350 | "spriteSourceSize": {"x":177,"y":196,"w":205,"h":165}, 351 | "sourceSize": {"w":512,"h":512}, 352 | "pivot": {"x":0.5,"y":0.5} 353 | }, 354 | { 355 | "filename": "0040.png", 356 | "frame": {"x":1309,"y":876,"w":200,"h":140}, 357 | "rotated": false, 358 | "trimmed": true, 359 | "spriteSourceSize": {"x":164,"y":229,"w":200,"h":140}, 360 | "sourceSize": {"w":512,"h":512}, 361 | "pivot": {"x":0.5,"y":0.5} 362 | }, 363 | { 364 | "filename": "0041.png", 365 | "frame": {"x":603,"y":660,"w":130,"h":205}, 366 | "rotated": false, 367 | "trimmed": true, 368 | "spriteSourceSize": {"x":188,"y":137,"w":130,"h":205}, 369 | "sourceSize": {"w":512,"h":512}, 370 | "pivot": {"x":0.5,"y":0.5} 371 | }, 372 | { 373 | "filename": "0042.png", 374 | "frame": {"x":2,"y":2,"w":152,"h":307}, 375 | "rotated": false, 376 | "trimmed": true, 377 | "spriteSourceSize": {"x":199,"y":32,"w":152,"h":307}, 378 | "sourceSize": {"w":512,"h":512}, 379 | "pivot": {"x":0.5,"y":0.5} 380 | }, 381 | { 382 | "filename": "0043.png", 383 | "frame": {"x":2,"y":311,"w":213,"h":300}, 384 | "rotated": false, 385 | "trimmed": true, 386 | "spriteSourceSize": {"x":166,"y":44,"w":213,"h":300}, 387 | "sourceSize": {"w":512,"h":512}, 388 | "pivot": {"x":0.5,"y":0.5} 389 | }, 390 | { 391 | "filename": "0044.png", 392 | "frame": {"x":178,"y":613,"w":225,"h":270}, 393 | "rotated": false, 394 | "trimmed": true, 395 | "spriteSourceSize": {"x":159,"y":77,"w":225,"h":270}, 396 | "sourceSize": {"w":512,"h":512}, 397 | "pivot": {"x":0.5,"y":0.5} 398 | }, 399 | { 400 | "filename": "0045.png", 401 | "frame": {"x":761,"y":220,"w":180,"h":206}, 402 | "rotated": false, 403 | "trimmed": true, 404 | "spriteSourceSize": {"x":166,"y":143,"w":180,"h":206}, 405 | "sourceSize": {"w":512,"h":512}, 406 | "pivot": {"x":0.5,"y":0.5} 407 | }, 408 | { 409 | "filename": "0046.png", 410 | "frame": {"x":696,"y":2,"w":165,"h":216}, 411 | "rotated": false, 412 | "trimmed": true, 413 | "spriteSourceSize": {"x":167,"y":132,"w":165,"h":216}, 414 | "sourceSize": {"w":512,"h":512}, 415 | "pivot": {"x":0.5,"y":0.5} 416 | }, 417 | { 418 | "filename": "0047.png", 419 | "frame": {"x":417,"y":751,"w":184,"h":218}, 420 | "rotated": false, 421 | "trimmed": true, 422 | "spriteSourceSize": {"x":163,"y":142,"w":184,"h":218}, 423 | "sourceSize": {"w":512,"h":512}, 424 | "pivot": {"x":0.5,"y":0.5} 425 | }, 426 | { 427 | "filename": "0048.png", 428 | "frame": {"x":405,"y":524,"w":184,"h":225}, 429 | "rotated": false, 430 | "trimmed": true, 431 | "spriteSourceSize": {"x":164,"y":143,"w":184,"h":225}, 432 | "sourceSize": {"w":512,"h":512}, 433 | "pivot": {"x":0.5,"y":0.5} 434 | }], 435 | "meta": { 436 | "app": "http://www.codeandweb.com/texturepacker", 437 | "version": "1.0", 438 | "image": "goblin.png", 439 | "format": "RGBA8888", 440 | "size": {"w":1865,"h":1023}, 441 | "scale": "1", 442 | "smartupdate": "$TexturePacker:SmartUpdate:225f01d4344edb150d93b113dd64601d:768247ca4e4ee63c6e112773483911f6:56fcc8a03b90e324aea6762dac4dd6a8$" 443 | } 444 | } 445 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/assets/goblin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potion/Cinder-poSpritesheet/03fb09d80fea0995f83272867f21742eb1e16bf4/samples/SpritesheetFrame/assets/goblin.png -------------------------------------------------------------------------------- /samples/SpritesheetFrame/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/resources/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potion/Cinder-poSpritesheet/03fb09d80fea0995f83272867f21742eb1e16bf4/samples/SpritesheetFrame/resources/CinderApp.icns -------------------------------------------------------------------------------- /samples/SpritesheetFrame/src/SpritesheetFrameApp.cpp: -------------------------------------------------------------------------------- 1 | #include "cinder/app/App.h" 2 | #include "cinder/gl/gl.h" 3 | #include "poSpritesheet.h" 4 | #include "cinder/app/RendererGl.h" 5 | 6 | using namespace ci; 7 | using namespace ci::app; 8 | using namespace std; 9 | 10 | class SpritesheetFrameApp : public App { 11 | public: 12 | void setup(); 13 | void mouseDown( MouseEvent event ); 14 | void mouseMove( MouseEvent event ); 15 | void update(); 16 | void draw(); 17 | 18 | po::SpritesheetRef mSpritesheet; 19 | int mCurrentFrame; 20 | bool mUseFrameName; 21 | std::string mFrameName; 22 | }; 23 | 24 | void SpritesheetFrameApp::setup() 25 | { 26 | setWindowSize(1024, 768); 27 | 28 | mUseFrameName = false; 29 | mCurrentFrame = 0; 30 | mFrameName = "0031.png"; 31 | 32 | gl::TextureRef texture = gl::Texture::create(loadImage(loadAsset("goblin.png"))); 33 | JsonTree json = JsonTree(loadAsset("goblin.json")); 34 | 35 | mSpritesheet = po::Spritesheet::create(texture, json); 36 | } 37 | 38 | void SpritesheetFrameApp::mouseDown( MouseEvent event ) 39 | { 40 | mUseFrameName = !mUseFrameName; 41 | } 42 | 43 | void SpritesheetFrameApp::mouseMove(cinder::app::MouseEvent event) 44 | { 45 | float posMap = lmap(event.getPos().x, 0, getWindowWidth(), 0, mSpritesheet->getNumFrames() - 1); 46 | int frame = floorf(posMap); 47 | if (frame < 0) frame = 0; 48 | if (frame >= mSpritesheet->getNumFrames() - 1) frame = mSpritesheet->getNumFrames() - 1; 49 | mCurrentFrame = frame; 50 | } 51 | 52 | void SpritesheetFrameApp::update() 53 | { 54 | } 55 | 56 | void SpritesheetFrameApp::draw() 57 | { 58 | gl::clear(Color::gray(0.2)); 59 | gl::pushModelView(); 60 | gl::translate(getWindowWidth()/2 - mSpritesheet->getOriginalBounds().getWidth()/2, getWindowHeight()/2 - mSpritesheet->getOriginalBounds().getHeight()/2); 61 | 62 | if (mUseFrameName) { 63 | mSpritesheet->drawFrame(mFrameName); 64 | } else { 65 | mSpritesheet->drawFrame(mCurrentFrame); 66 | } 67 | 68 | gl::popModelView(); 69 | } 70 | 71 | CINDER_APP( SpritesheetFrameApp, RendererGl ) 72 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/vc2013/SpritesheetFrame.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpritesheetFrame", "SpritesheetFrame.vcxproj", "{E994CB17-49C6-469F-93AE-A9BE309326BF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Debug|Win32.Build.0 = Debug|Win32 18 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Debug|x64.ActiveCfg = Debug|x64 19 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Debug|x64.Build.0 = Debug|x64 20 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Release|Win32.ActiveCfg = Release|Win32 21 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Release|Win32.Build.0 = Release|Win32 22 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Release|x64.ActiveCfg = Release|x64 23 | {E994CB17-49C6-469F-93AE-A9BE309326BF}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/vc2013/SpritesheetFrame.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {E994CB17-49C6-469F-93AE-A9BE309326BF} 23 | Win32Proj 24 | SpritesheetFrame 25 | 26 | 27 | 28 | Application 29 | true 30 | v120 31 | Unicode 32 | 33 | 34 | Application 35 | true 36 | v120 37 | Unicode 38 | 39 | 40 | Application 41 | false 42 | v120 43 | true 44 | Unicode 45 | 46 | 47 | Application 48 | false 49 | v120 50 | true 51 | Unicode 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | true 71 | 72 | 73 | true 74 | 75 | 76 | false 77 | 78 | 79 | false 80 | 81 | 82 | 83 | 84 | 85 | Level3 86 | Disabled 87 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 88 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;..\..\..\..\INT\Cinder\include;%(AdditionalIncludeDirectories) 89 | MultiThreadedDebug 90 | 91 | 92 | Windows 93 | true 94 | ..\..\..\..\INT\Cinder\lib\msw\x64 95 | libboost_filesystem-vc120-mt-sgd-1_58.lib;libboost_system-vc120-mt-sgd-1_58.lib;cinder-v120_d.lib;%(AdditionalDependencies) 96 | 97 | 98 | 99 | 100 | 101 | 102 | Level3 103 | Disabled 104 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 105 | ..\include;..\..\..\src\poScene;..\..\..\src\poSpritesheet;..\..\..\..\INT\blocks\Cinder-poScene\src\poScene;..\..\..\..\INT\Cinder\include;%(AdditionalIncludeDirectories) 106 | MultiThreadedDebug 107 | 108 | 109 | Windows 110 | true 111 | ..\..\..\..\INT\Cinder\lib\msw\x64 112 | libboost_filesystem-vc120-mt-sgd-1_58.lib;libboost_system-vc120-mt-sgd-1_58.lib;cinder-v120_d.lib;%(AdditionalDependencies) 113 | 114 | 115 | 116 | 117 | Level3 118 | 119 | 120 | MaxSpeed 121 | true 122 | true 123 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 124 | 125 | 126 | Windows 127 | true 128 | true 129 | true 130 | 131 | 132 | 133 | 134 | Level3 135 | 136 | 137 | MaxSpeed 138 | true 139 | true 140 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 141 | 142 | 143 | Windows 144 | true 145 | true 146 | true 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/vc2013/SpritesheetFrame.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {20a89e15-674f-4071-89fb-8ab8ba9cfc06} 18 | 19 | 20 | {d60cee09-8759-4a1f-bff8-30a465cf56ec} 21 | 22 | 23 | {3aee3cfa-fe7b-4589-b849-6cea967099aa} 24 | 25 | 26 | {c1ec6c7e-fe91-421d-84ca-302c80435648} 27 | 28 | 29 | {9f1449aa-5f3e-4fd4-b72e-077c51e2fa07} 30 | 31 | 32 | {f81bce76-c8d7-499c-a3e3-009a46b30bdb} 33 | 34 | 35 | {904e29f7-f3c6-41ca-85ef-cb00ba81192c} 36 | 37 | 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files\Blocks\poScene\src 44 | 45 | 46 | Source Files\Blocks\poScene\src 47 | 48 | 49 | Source Files\Blocks\poScene\src 50 | 51 | 52 | Source Files\Blocks\poScene\src 53 | 54 | 55 | Source Files\Blocks\poScene\src 56 | 57 | 58 | Source Files\Blocks\poScene\src 59 | 60 | 61 | Source Files\Blocks\poScene\src 62 | 63 | 64 | Source Files\Blocks\poScene\src 65 | 66 | 67 | Source Files\Blocks\poScene\src 68 | 69 | 70 | Source Files\Blocks\poSpritesheet\src\poScene 71 | 72 | 73 | Source Files\Blocks\poSpritesheet\src\poSpritesheet 74 | 75 | 76 | Source Files\Blocks\poSpritesheet\src\poSpritesheet 77 | 78 | 79 | 80 | 81 | Resource Files 82 | 83 | 84 | 85 | 86 | Header Files 87 | 88 | 89 | Source Files\Blocks\poScene\src 90 | 91 | 92 | Source Files\Blocks\poScene\src 93 | 94 | 95 | Source Files\Blocks\poScene\src 96 | 97 | 98 | Source Files\Blocks\poScene\src 99 | 100 | 101 | Source Files\Blocks\poScene\src 102 | 103 | 104 | Source Files\Blocks\poScene\src 105 | 106 | 107 | Source Files\Blocks\poScene\src 108 | 109 | 110 | Source Files\Blocks\poScene\src 111 | 112 | 113 | Source Files\Blocks\poScene\src 114 | 115 | 116 | Source Files\Blocks\poScene\src 117 | 118 | 119 | Source Files\Blocks\poScene\src 120 | 121 | 122 | Source Files\Blocks\poSpritesheet\src\poScene 123 | 124 | 125 | Source Files\Blocks\poSpritesheet\src\poSpritesheet 126 | 127 | 128 | Source Files\Blocks\poSpritesheet\src\poSpritesheet 129 | 130 | 131 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2013 __MyCompanyName__. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/xcode/SpritesheetFrame.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 236FA03DAEDE4E09BCCDE575 /* poSpritesheetAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27C780B5CB3B43738BDF2C24 /* poSpritesheetAnimation.cpp */; }; 11 | 32CF7D9C1FBD1E37008B77C9 /* _DragAndDrop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C1B1FBD1E31008B77C9 /* _DragAndDrop.cpp */; }; 12 | 32CF7D9D1FBD1E37008B77C9 /* _DraggableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C1C1FBD1E31008B77C9 /* _DraggableView.cpp */; }; 13 | 32CF7D9E1FBD1E37008B77C9 /* _EventCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C1D1FBD1E31008B77C9 /* _EventCenter.cpp */; }; 14 | 32CF7D9F1FBD1E37008B77C9 /* _Events.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C1E1FBD1E31008B77C9 /* _Events.cpp */; }; 15 | 32CF7DA01FBD1E37008B77C9 /* _ImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C1F1FBD1E31008B77C9 /* _ImageView.cpp */; }; 16 | 32CF7DA11FBD1E37008B77C9 /* _MatrixSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C201FBD1E31008B77C9 /* _MatrixSet.cpp */; }; 17 | 32CF7DA21FBD1E37008B77C9 /* _Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C211FBD1E31008B77C9 /* _Scene.cpp */; }; 18 | 32CF7DA31FBD1E37008B77C9 /* _ShapeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C221FBD1E31008B77C9 /* _ShapeView.cpp */; }; 19 | 32CF7DA41FBD1E37008B77C9 /* _TextView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C231FBD1E31008B77C9 /* _TextView.cpp */; }; 20 | 32CF7DA51FBD1E37008B77C9 /* _View.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C241FBD1E31008B77C9 /* _View.cpp */; }; 21 | 32CF7DA61FBD1E37008B77C9 /* _ViewController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C251FBD1E31008B77C9 /* _ViewController.cpp */; }; 22 | 32CF7DA71FBD1E37008B77C9 /* _Button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C311FBD1E31008B77C9 /* _Button.cpp */; }; 23 | 32CF7DA81FBD1E37008B77C9 /* _ButtonSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C321FBD1E31008B77C9 /* _ButtonSet.cpp */; }; 24 | 32CF7DA91FBD1E37008B77C9 /* _ScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF6C331FBD1E31008B77C9 /* _ScrollView.cpp */; }; 25 | 32CF7DB61FBD1F56008B77C9 /* SpriteView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32CF7DB51FBD1F56008B77C9 /* SpriteView.cpp */; }; 26 | 32CF80EC1FBD2471008B77C9 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80D21FBD23D8008B77C9 /* IOSurface.framework */; }; 27 | 32CF80ED1FBD2471008B77C9 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80D11FBD23D2008B77C9 /* IOKit.framework */; }; 28 | 32CF80EE1FBD2471008B77C9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80D01FBD23CD008B77C9 /* Cocoa.framework */; }; 29 | 32CF80EF1FBD2471008B77C9 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CF1FBD23C8008B77C9 /* OpenGL.framework */; }; 30 | 32CF80F01FBD2471008B77C9 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CE1FBD23C2008B77C9 /* CoreVideo.framework */; }; 31 | 32CF80F11FBD2471008B77C9 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CD1FBD23B9008B77C9 /* CoreAudio.framework */; }; 32 | 32CF80F21FBD2471008B77C9 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CC1FBD23B3008B77C9 /* AudioUnit.framework */; }; 33 | 32CF80F31FBD2471008B77C9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CB1FBD23AD008B77C9 /* AudioToolbox.framework */; }; 34 | 32CF80F41FBD2471008B77C9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80CA1FBD23A3008B77C9 /* Accelerate.framework */; }; 35 | 32CF80F51FBD2471008B77C9 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80C91FBD239D008B77C9 /* CoreMedia.framework */; }; 36 | 32CF80F61FBD2471008B77C9 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32CF80C81FBD2392008B77C9 /* AVFoundation.framework */; }; 37 | 5CB8F741B7334295BFEBD155 /* SpritesheetFrameApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA2B980F1B4F447D9310E27F /* SpritesheetFrameApp.cpp */; }; 38 | 607681B84D284AB9A1224E40 /* poSpritesheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91B192C5293A48619DC990CB /* poSpritesheet.cpp */; }; 39 | E57E37A6BBA8406EA8D1F737 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = E340C27B87334ACBB3B3C422 /* CinderApp.icns */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 27C780B5CB3B43738BDF2C24 /* poSpritesheetAnimation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = poSpritesheetAnimation.cpp; path = ../../../src/poSpritesheet/poSpritesheetAnimation.cpp; sourceTree = ""; }; 44 | 32CF6C1B1FBD1E31008B77C9 /* _DragAndDrop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _DragAndDrop.cpp; sourceTree = ""; }; 45 | 32CF6C1C1FBD1E31008B77C9 /* _DraggableView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _DraggableView.cpp; sourceTree = ""; }; 46 | 32CF6C1D1FBD1E31008B77C9 /* _EventCenter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _EventCenter.cpp; sourceTree = ""; }; 47 | 32CF6C1E1FBD1E31008B77C9 /* _Events.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _Events.cpp; sourceTree = ""; }; 48 | 32CF6C1F1FBD1E31008B77C9 /* _ImageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _ImageView.cpp; sourceTree = ""; }; 49 | 32CF6C201FBD1E31008B77C9 /* _MatrixSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _MatrixSet.cpp; sourceTree = ""; }; 50 | 32CF6C211FBD1E31008B77C9 /* _Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _Scene.cpp; sourceTree = ""; }; 51 | 32CF6C221FBD1E31008B77C9 /* _ShapeView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _ShapeView.cpp; sourceTree = ""; }; 52 | 32CF6C231FBD1E31008B77C9 /* _TextView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _TextView.cpp; sourceTree = ""; }; 53 | 32CF6C241FBD1E31008B77C9 /* _View.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _View.cpp; sourceTree = ""; }; 54 | 32CF6C251FBD1E31008B77C9 /* _ViewController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _ViewController.cpp; sourceTree = ""; }; 55 | 32CF6C261FBD1E31008B77C9 /* DragAndDrop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragAndDrop.h; sourceTree = ""; }; 56 | 32CF6C271FBD1E31008B77C9 /* DraggableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DraggableView.h; sourceTree = ""; }; 57 | 32CF6C281FBD1E31008B77C9 /* EventCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventCenter.h; sourceTree = ""; }; 58 | 32CF6C291FBD1E31008B77C9 /* Events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Events.h; sourceTree = ""; }; 59 | 32CF6C2A1FBD1E31008B77C9 /* ImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageView.h; sourceTree = ""; }; 60 | 32CF6C2B1FBD1E31008B77C9 /* MatrixSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MatrixSet.h; sourceTree = ""; }; 61 | 32CF6C2C1FBD1E31008B77C9 /* Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scene.h; sourceTree = ""; }; 62 | 32CF6C2D1FBD1E31008B77C9 /* ShapeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeView.h; sourceTree = ""; }; 63 | 32CF6C2E1FBD1E31008B77C9 /* TextureFit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureFit.h; sourceTree = ""; }; 64 | 32CF6C2F1FBD1E31008B77C9 /* TextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextView.h; sourceTree = ""; }; 65 | 32CF6C311FBD1E31008B77C9 /* _Button.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _Button.cpp; sourceTree = ""; }; 66 | 32CF6C321FBD1E31008B77C9 /* _ButtonSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _ButtonSet.cpp; sourceTree = ""; }; 67 | 32CF6C331FBD1E31008B77C9 /* _ScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _ScrollView.cpp; sourceTree = ""; }; 68 | 32CF6C341FBD1E31008B77C9 /* Button.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Button.h; sourceTree = ""; }; 69 | 32CF6C351FBD1E31008B77C9 /* ButtonSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonSet.h; sourceTree = ""; }; 70 | 32CF6C361FBD1E31008B77C9 /* ScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollView.h; sourceTree = ""; }; 71 | 32CF6C371FBD1E31008B77C9 /* VideoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoView.h; sourceTree = ""; }; 72 | 32CF6C381FBD1E31008B77C9 /* View.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = View.h; sourceTree = ""; }; 73 | 32CF6C391FBD1E31008B77C9 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 74 | 32CF6C3A1FBD1E31008B77C9 /* ViewEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewEvents.h; sourceTree = ""; }; 75 | 32CF7DB41FBD1F56008B77C9 /* SpriteView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteView.h; sourceTree = ""; }; 76 | 32CF7DB51FBD1F56008B77C9 /* SpriteView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteView.cpp; sourceTree = ""; }; 77 | 32CF80C81FBD2392008B77C9 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 78 | 32CF80C91FBD239D008B77C9 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 79 | 32CF80CA1FBD23A3008B77C9 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 80 | 32CF80CB1FBD23AD008B77C9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 81 | 32CF80CC1FBD23B3008B77C9 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 82 | 32CF80CD1FBD23B9008B77C9 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 83 | 32CF80CE1FBD23C2008B77C9 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 84 | 32CF80CF1FBD23C8008B77C9 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 85 | 32CF80D01FBD23CD008B77C9 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 86 | 32CF80D11FBD23D2008B77C9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 87 | 32CF80D21FBD23D8008B77C9 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; }; 88 | 32CF80D31FBD23E0008B77C9 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 89 | 32CF80D41FBD23E7008B77C9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 90 | 5BFC9157FFD4442190F847B6 /* SpritesheetFrame_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = SpritesheetFrame_Prefix.pch; sourceTree = ""; }; 91 | 8D1107320486CEB800E47090 /* SpritesheetFrame.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpritesheetFrame.app; sourceTree = BUILT_PRODUCTS_DIR; }; 92 | 91B192C5293A48619DC990CB /* poSpritesheet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = poSpritesheet.cpp; path = ../../../src/poSpritesheet/poSpritesheet.cpp; sourceTree = ""; }; 93 | B7BA6CE142764ABBB6EE119E /* poSpritesheet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = poSpritesheet.h; path = ../../../src/poSpritesheet/poSpritesheet.h; sourceTree = ""; }; 94 | BE3CC855F5384AD8BE90954A /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; 95 | DA2B980F1B4F447D9310E27F /* SpritesheetFrameApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = SpritesheetFrameApp.cpp; path = ../src/SpritesheetFrameApp.cpp; sourceTree = ""; }; 96 | E029426EFE384A9B9B86D122 /* poSpritesheetAnimation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = poSpritesheetAnimation.h; path = ../../../src/poSpritesheet/poSpritesheetAnimation.h; sourceTree = ""; }; 97 | E340C27B87334ACBB3B3C422 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../resources/CinderApp.icns; sourceTree = ""; }; 98 | F95AC0EC0481466CA224133A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 99 | /* End PBXFileReference section */ 100 | 101 | /* Begin PBXFrameworksBuildPhase section */ 102 | 8D11072E0486CEB800E47090 /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | 32CF80EC1FBD2471008B77C9 /* IOSurface.framework in Frameworks */, 107 | 32CF80ED1FBD2471008B77C9 /* IOKit.framework in Frameworks */, 108 | 32CF80EE1FBD2471008B77C9 /* Cocoa.framework in Frameworks */, 109 | 32CF80EF1FBD2471008B77C9 /* OpenGL.framework in Frameworks */, 110 | 32CF80F01FBD2471008B77C9 /* CoreVideo.framework in Frameworks */, 111 | 32CF80F11FBD2471008B77C9 /* CoreAudio.framework in Frameworks */, 112 | 32CF80F21FBD2471008B77C9 /* AudioUnit.framework in Frameworks */, 113 | 32CF80F31FBD2471008B77C9 /* AudioToolbox.framework in Frameworks */, 114 | 32CF80F41FBD2471008B77C9 /* Accelerate.framework in Frameworks */, 115 | 32CF80F51FBD2471008B77C9 /* CoreMedia.framework in Frameworks */, 116 | 32CF80F61FBD2471008B77C9 /* AVFoundation.framework in Frameworks */, 117 | ); 118 | runOnlyForDeploymentPostprocessing = 0; 119 | }; 120 | /* End PBXFrameworksBuildPhase section */ 121 | 122 | /* Begin PBXGroup section */ 123 | 01B97315FEAEA392516A2CEA /* Blocks */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 32CF593A1FBD1E23008B77C9 /* Cinder-poScene */, 127 | 191FEE39558D4CCF8AC986B8 /* poSpritesheet */, 128 | ); 129 | name = Blocks; 130 | sourceTree = ""; 131 | }; 132 | 080E96DDFE201D6D7F000001 /* Source */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | DA2B980F1B4F447D9310E27F /* SpritesheetFrameApp.cpp */, 136 | ); 137 | name = Source; 138 | sourceTree = ""; 139 | }; 140 | 191FEE39558D4CCF8AC986B8 /* poSpritesheet */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 3273ADE698FA4EF0A39922AF /* src */, 144 | ); 145 | name = poSpritesheet; 146 | sourceTree = ""; 147 | }; 148 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 8D1107320486CEB800E47090 /* SpritesheetFrame.app */, 152 | ); 153 | name = Products; 154 | sourceTree = ""; 155 | }; 156 | 29B97314FDCFA39411CA2CEA /* SpritesheetFrame */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 01B97315FEAEA392516A2CEA /* Blocks */, 160 | 29B97315FDCFA39411CA2CEA /* Headers */, 161 | 080E96DDFE201D6D7F000001 /* Source */, 162 | 29B97317FDCFA39411CA2CEA /* Resources */, 163 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 164 | 19C28FACFE9D520D11CA2CBB /* Products */, 165 | ); 166 | name = SpritesheetFrame; 167 | sourceTree = ""; 168 | }; 169 | 29B97315FDCFA39411CA2CEA /* Headers */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | BE3CC855F5384AD8BE90954A /* Resources.h */, 173 | 5BFC9157FFD4442190F847B6 /* SpritesheetFrame_Prefix.pch */, 174 | ); 175 | name = Headers; 176 | sourceTree = ""; 177 | }; 178 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | E340C27B87334ACBB3B3C422 /* CinderApp.icns */, 182 | F95AC0EC0481466CA224133A /* Info.plist */, 183 | ); 184 | name = Resources; 185 | sourceTree = ""; 186 | }; 187 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 32CF80EB1FBD2404008B77C9 /* Other Frameworks */, 191 | 32CF80C71FBD230F008B77C9 /* Linked Frameworks */, 192 | ); 193 | name = Frameworks; 194 | sourceTree = ""; 195 | }; 196 | 3273ADE698FA4EF0A39922AF /* src */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | AAF4EF911C485D1700D50D5A /* poScene */, 200 | 483835CCA1C14D39A5029D2F /* poSpritesheet */, 201 | ); 202 | name = src; 203 | sourceTree = ""; 204 | }; 205 | 32CF593A1FBD1E23008B77C9 /* Cinder-poScene */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 32CF6C191FBD1E31008B77C9 /* src */, 209 | ); 210 | name = "Cinder-poScene"; 211 | path = "../../../../Cinder-poScene"; 212 | sourceTree = ""; 213 | }; 214 | 32CF6C191FBD1E31008B77C9 /* src */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 32CF6C1A1FBD1E31008B77C9 /* poScene */, 218 | ); 219 | path = src; 220 | sourceTree = ""; 221 | }; 222 | 32CF6C1A1FBD1E31008B77C9 /* poScene */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 32CF6C1B1FBD1E31008B77C9 /* _DragAndDrop.cpp */, 226 | 32CF6C1C1FBD1E31008B77C9 /* _DraggableView.cpp */, 227 | 32CF6C1D1FBD1E31008B77C9 /* _EventCenter.cpp */, 228 | 32CF6C1E1FBD1E31008B77C9 /* _Events.cpp */, 229 | 32CF6C1F1FBD1E31008B77C9 /* _ImageView.cpp */, 230 | 32CF6C201FBD1E31008B77C9 /* _MatrixSet.cpp */, 231 | 32CF6C211FBD1E31008B77C9 /* _Scene.cpp */, 232 | 32CF6C221FBD1E31008B77C9 /* _ShapeView.cpp */, 233 | 32CF6C231FBD1E31008B77C9 /* _TextView.cpp */, 234 | 32CF6C241FBD1E31008B77C9 /* _View.cpp */, 235 | 32CF6C251FBD1E31008B77C9 /* _ViewController.cpp */, 236 | 32CF6C261FBD1E31008B77C9 /* DragAndDrop.h */, 237 | 32CF6C271FBD1E31008B77C9 /* DraggableView.h */, 238 | 32CF6C281FBD1E31008B77C9 /* EventCenter.h */, 239 | 32CF6C291FBD1E31008B77C9 /* Events.h */, 240 | 32CF6C2A1FBD1E31008B77C9 /* ImageView.h */, 241 | 32CF6C2B1FBD1E31008B77C9 /* MatrixSet.h */, 242 | 32CF6C2C1FBD1E31008B77C9 /* Scene.h */, 243 | 32CF6C2D1FBD1E31008B77C9 /* ShapeView.h */, 244 | 32CF6C2E1FBD1E31008B77C9 /* TextureFit.h */, 245 | 32CF6C2F1FBD1E31008B77C9 /* TextView.h */, 246 | 32CF6C301FBD1E31008B77C9 /* ui */, 247 | 32CF6C371FBD1E31008B77C9 /* VideoView.h */, 248 | 32CF6C381FBD1E31008B77C9 /* View.h */, 249 | 32CF6C391FBD1E31008B77C9 /* ViewController.h */, 250 | 32CF6C3A1FBD1E31008B77C9 /* ViewEvents.h */, 251 | ); 252 | path = poScene; 253 | sourceTree = ""; 254 | }; 255 | 32CF6C301FBD1E31008B77C9 /* ui */ = { 256 | isa = PBXGroup; 257 | children = ( 258 | 32CF6C311FBD1E31008B77C9 /* _Button.cpp */, 259 | 32CF6C321FBD1E31008B77C9 /* _ButtonSet.cpp */, 260 | 32CF6C331FBD1E31008B77C9 /* _ScrollView.cpp */, 261 | 32CF6C341FBD1E31008B77C9 /* Button.h */, 262 | 32CF6C351FBD1E31008B77C9 /* ButtonSet.h */, 263 | 32CF6C361FBD1E31008B77C9 /* ScrollView.h */, 264 | ); 265 | path = ui; 266 | sourceTree = ""; 267 | }; 268 | 32CF80C71FBD230F008B77C9 /* Linked Frameworks */ = { 269 | isa = PBXGroup; 270 | children = ( 271 | 32CF80D21FBD23D8008B77C9 /* IOSurface.framework */, 272 | 32CF80D11FBD23D2008B77C9 /* IOKit.framework */, 273 | 32CF80D01FBD23CD008B77C9 /* Cocoa.framework */, 274 | 32CF80CF1FBD23C8008B77C9 /* OpenGL.framework */, 275 | 32CF80CE1FBD23C2008B77C9 /* CoreVideo.framework */, 276 | 32CF80CD1FBD23B9008B77C9 /* CoreAudio.framework */, 277 | 32CF80CC1FBD23B3008B77C9 /* AudioUnit.framework */, 278 | 32CF80CB1FBD23AD008B77C9 /* AudioToolbox.framework */, 279 | 32CF80CA1FBD23A3008B77C9 /* Accelerate.framework */, 280 | 32CF80C91FBD239D008B77C9 /* CoreMedia.framework */, 281 | 32CF80C81FBD2392008B77C9 /* AVFoundation.framework */, 282 | ); 283 | name = "Linked Frameworks"; 284 | sourceTree = ""; 285 | }; 286 | 32CF80EB1FBD2404008B77C9 /* Other Frameworks */ = { 287 | isa = PBXGroup; 288 | children = ( 289 | 32CF80D41FBD23E7008B77C9 /* Foundation.framework */, 290 | 32CF80D31FBD23E0008B77C9 /* AppKit.framework */, 291 | ); 292 | name = "Other Frameworks"; 293 | sourceTree = ""; 294 | }; 295 | 483835CCA1C14D39A5029D2F /* poSpritesheet */ = { 296 | isa = PBXGroup; 297 | children = ( 298 | B7BA6CE142764ABBB6EE119E /* poSpritesheet.h */, 299 | 91B192C5293A48619DC990CB /* poSpritesheet.cpp */, 300 | E029426EFE384A9B9B86D122 /* poSpritesheetAnimation.h */, 301 | 27C780B5CB3B43738BDF2C24 /* poSpritesheetAnimation.cpp */, 302 | ); 303 | name = poSpritesheet; 304 | sourceTree = ""; 305 | }; 306 | AAF4EF911C485D1700D50D5A /* poScene */ = { 307 | isa = PBXGroup; 308 | children = ( 309 | 32CF7DB51FBD1F56008B77C9 /* SpriteView.cpp */, 310 | 32CF7DB41FBD1F56008B77C9 /* SpriteView.h */, 311 | ); 312 | name = poScene; 313 | path = ../../../src/poScene; 314 | sourceTree = ""; 315 | }; 316 | /* End PBXGroup section */ 317 | 318 | /* Begin PBXNativeTarget section */ 319 | 8D1107260486CEB800E47090 /* SpritesheetFrame */ = { 320 | isa = PBXNativeTarget; 321 | buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpritesheetFrame" */; 322 | buildPhases = ( 323 | 8D1107290486CEB800E47090 /* Resources */, 324 | 8D11072C0486CEB800E47090 /* Sources */, 325 | 8D11072E0486CEB800E47090 /* Frameworks */, 326 | ); 327 | buildRules = ( 328 | ); 329 | dependencies = ( 330 | ); 331 | name = SpritesheetFrame; 332 | productInstallPath = "$(HOME)/Applications"; 333 | productName = SpritesheetFrame; 334 | productReference = 8D1107320486CEB800E47090 /* SpritesheetFrame.app */; 335 | productType = "com.apple.product-type.application"; 336 | }; 337 | /* End PBXNativeTarget section */ 338 | 339 | /* Begin PBXProject section */ 340 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 341 | isa = PBXProject; 342 | attributes = { 343 | LastUpgradeCheck = 0910; 344 | }; 345 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpritesheetFrame" */; 346 | compatibilityVersion = "Xcode 3.2"; 347 | developmentRegion = English; 348 | hasScannedForEncodings = 1; 349 | knownRegions = ( 350 | English, 351 | Japanese, 352 | French, 353 | German, 354 | ); 355 | mainGroup = 29B97314FDCFA39411CA2CEA /* SpritesheetFrame */; 356 | projectDirPath = ""; 357 | projectRoot = ""; 358 | targets = ( 359 | 8D1107260486CEB800E47090 /* SpritesheetFrame */, 360 | ); 361 | }; 362 | /* End PBXProject section */ 363 | 364 | /* Begin PBXResourcesBuildPhase section */ 365 | 8D1107290486CEB800E47090 /* Resources */ = { 366 | isa = PBXResourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | E57E37A6BBA8406EA8D1F737 /* CinderApp.icns in Resources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | /* End PBXResourcesBuildPhase section */ 374 | 375 | /* Begin PBXSourcesBuildPhase section */ 376 | 8D11072C0486CEB800E47090 /* Sources */ = { 377 | isa = PBXSourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | 32CF7DA71FBD1E37008B77C9 /* _Button.cpp in Sources */, 381 | 32CF7DA31FBD1E37008B77C9 /* _ShapeView.cpp in Sources */, 382 | 32CF7D9D1FBD1E37008B77C9 /* _DraggableView.cpp in Sources */, 383 | 32CF7DA01FBD1E37008B77C9 /* _ImageView.cpp in Sources */, 384 | 32CF7DA81FBD1E37008B77C9 /* _ButtonSet.cpp in Sources */, 385 | 32CF7DB61FBD1F56008B77C9 /* SpriteView.cpp in Sources */, 386 | 32CF7D9F1FBD1E37008B77C9 /* _Events.cpp in Sources */, 387 | 5CB8F741B7334295BFEBD155 /* SpritesheetFrameApp.cpp in Sources */, 388 | 32CF7DA91FBD1E37008B77C9 /* _ScrollView.cpp in Sources */, 389 | 607681B84D284AB9A1224E40 /* poSpritesheet.cpp in Sources */, 390 | 32CF7DA41FBD1E37008B77C9 /* _TextView.cpp in Sources */, 391 | 32CF7DA21FBD1E37008B77C9 /* _Scene.cpp in Sources */, 392 | 32CF7DA61FBD1E37008B77C9 /* _ViewController.cpp in Sources */, 393 | 32CF7DA11FBD1E37008B77C9 /* _MatrixSet.cpp in Sources */, 394 | 32CF7D9E1FBD1E37008B77C9 /* _EventCenter.cpp in Sources */, 395 | 236FA03DAEDE4E09BCCDE575 /* poSpritesheetAnimation.cpp in Sources */, 396 | 32CF7D9C1FBD1E37008B77C9 /* _DragAndDrop.cpp in Sources */, 397 | 32CF7DA51FBD1E37008B77C9 /* _View.cpp in Sources */, 398 | ); 399 | runOnlyForDeploymentPostprocessing = 0; 400 | }; 401 | /* End PBXSourcesBuildPhase section */ 402 | 403 | /* Begin XCBuildConfiguration section */ 404 | C01FCF4B08A954540054247B /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | COMBINE_HIDPI_IMAGES = YES; 408 | COPY_PHASE_STRIP = NO; 409 | DEAD_CODE_STRIPPING = YES; 410 | GCC_DYNAMIC_NO_PIC = NO; 411 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 412 | GCC_OPTIMIZATION_LEVEL = 0; 413 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 414 | GCC_PREFIX_HEADER = SpritesheetFrame_Prefix.pch; 415 | GCC_PREPROCESSOR_DEFINITIONS = ( 416 | "DEBUG=1", 417 | "$(inherited)", 418 | ); 419 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 420 | INFOPLIST_FILE = Info.plist; 421 | INSTALL_PATH = "$(HOME)/Applications"; 422 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/Debug/libcinder.a\""; 423 | PRODUCT_BUNDLE_IDENTIFIER = "org.libcinder.${PRODUCT_NAME:rfc1034identifier}"; 424 | PRODUCT_NAME = SpritesheetFrame; 425 | SYMROOT = ./build; 426 | WRAPPER_EXTENSION = app; 427 | }; 428 | name = Debug; 429 | }; 430 | C01FCF4C08A954540054247B /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | COMBINE_HIDPI_IMAGES = YES; 434 | DEAD_CODE_STRIPPING = YES; 435 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 436 | GCC_FAST_MATH = YES; 437 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 438 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 439 | GCC_OPTIMIZATION_LEVEL = 3; 440 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 441 | GCC_PREFIX_HEADER = SpritesheetFrame_Prefix.pch; 442 | GCC_PREPROCESSOR_DEFINITIONS = ( 443 | "NDEBUG=1", 444 | "$(inherited)", 445 | ); 446 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 447 | INFOPLIST_FILE = Info.plist; 448 | INSTALL_PATH = "$(HOME)/Applications"; 449 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/Release/libcinder.a\""; 450 | PRODUCT_BUNDLE_IDENTIFIER = "org.libcinder.${PRODUCT_NAME:rfc1034identifier}"; 451 | PRODUCT_NAME = SpritesheetFrame; 452 | STRIP_INSTALLED_PRODUCT = YES; 453 | SYMROOT = ./build; 454 | WRAPPER_EXTENSION = app; 455 | }; 456 | name = Release; 457 | }; 458 | C01FCF4F08A954540054247B /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ALWAYS_SEARCH_USER_PATHS = YES; 462 | CINDER_PATH = ../../../../..; 463 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 464 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 467 | CLANG_WARN_BOOL_CONVERSION = YES; 468 | CLANG_WARN_COMMA = YES; 469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 477 | CLANG_WARN_STRICT_PROTOTYPES = YES; 478 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 479 | CLANG_WARN_UNREACHABLE_CODE = YES; 480 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | ENABLE_TESTABILITY = YES; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | HEADER_SEARCH_PATHS = ( 491 | "\"$(CINDER_PATH)/boost\"", 492 | "\"$(POSCENE_PATH)/src\"", 493 | "\"$(POSCENE_PATH)\"", 494 | ); 495 | MACOSX_DEPLOYMENT_TARGET = 10.8; 496 | ONLY_ACTIVE_ARCH = YES; 497 | POSCENE_PATH = "../../../../Cinder-poScene"; 498 | SDKROOT = macosx; 499 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/poSpritesheet"; 500 | }; 501 | name = Debug; 502 | }; 503 | C01FCF5008A954540054247B /* Release */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_SEARCH_USER_PATHS = YES; 507 | CINDER_PATH = ../../../../..; 508 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 509 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 512 | CLANG_WARN_BOOL_CONVERSION = YES; 513 | CLANG_WARN_COMMA = YES; 514 | CLANG_WARN_CONSTANT_CONVERSION = YES; 515 | CLANG_WARN_EMPTY_BODY = YES; 516 | CLANG_WARN_ENUM_CONVERSION = YES; 517 | CLANG_WARN_INFINITE_RECURSION = YES; 518 | CLANG_WARN_INT_CONVERSION = YES; 519 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 520 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 521 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 522 | CLANG_WARN_STRICT_PROTOTYPES = YES; 523 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 524 | CLANG_WARN_UNREACHABLE_CODE = YES; 525 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_NO_COMMON_BLOCKS = YES; 528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 529 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 530 | GCC_WARN_UNDECLARED_SELECTOR = YES; 531 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 532 | GCC_WARN_UNUSED_FUNCTION = YES; 533 | GCC_WARN_UNUSED_VARIABLE = YES; 534 | HEADER_SEARCH_PATHS = ( 535 | "\"$(CINDER_PATH)/boost\"", 536 | "\"$(POSCENE_PATH)/src\"", 537 | "\"$(POSCENE_PATH)\"", 538 | ); 539 | MACOSX_DEPLOYMENT_TARGET = 10.8; 540 | POSCENE_PATH = "../../../../Cinder-poScene"; 541 | SDKROOT = macosx; 542 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/poSpritesheet"; 543 | }; 544 | name = Release; 545 | }; 546 | /* End XCBuildConfiguration section */ 547 | 548 | /* Begin XCConfigurationList section */ 549 | C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpritesheetFrame" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | C01FCF4B08A954540054247B /* Debug */, 553 | C01FCF4C08A954540054247B /* Release */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpritesheetFrame" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | C01FCF4F08A954540054247B /* Debug */, 562 | C01FCF5008A954540054247B /* Release */, 563 | ); 564 | defaultConfigurationIsVisible = 0; 565 | defaultConfigurationName = Release; 566 | }; 567 | /* End XCConfigurationList section */ 568 | }; 569 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 570 | } 571 | -------------------------------------------------------------------------------- /samples/SpritesheetFrame/xcode/SpritesheetFrame_Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #if defined( __cplusplus ) 6 | #include "cinder/Cinder.h" 7 | 8 | #include "cinder/app/App.h" 9 | 10 | #include "cinder/gl/gl.h" 11 | 12 | #include "cinder/CinderMath.h" 13 | #include "cinder/Matrix.h" 14 | #include "cinder/Vector.h" 15 | #include "cinder/Quaternion.h" 16 | #endif 17 | -------------------------------------------------------------------------------- /src/poScene/SpriteView.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Sprite.cpp 3 | // ForestFriends 4 | // 5 | // Created by bruce on 9/11/14. 6 | // 7 | // 8 | 9 | #include "SpriteView.h" 10 | 11 | namespace po 12 | { 13 | namespace scene 14 | { 15 | //----------------------------------- 16 | // Single texture 17 | //----------------------------------- 18 | SpriteViewRef SpriteView::create( ci::gl::TextureRef texture, ci::JsonTree json ) 19 | { 20 | SpriteViewRef ref( new SpriteView() ); 21 | ref->setup( texture, json ); 22 | return ref; 23 | } 24 | 25 | SpriteViewRef SpriteView::create( ci::gl::TextureRef texture, ci::XmlTree xml ) 26 | { 27 | SpriteViewRef ref( new SpriteView() ); 28 | ref->setup( texture, xml ); 29 | return ref; 30 | } 31 | 32 | void SpriteView::setup( ci::gl::TextureRef texture, ci::JsonTree json ) 33 | { 34 | mSpritesheet = po::Spritesheet::create( texture, json ); 35 | setupAnimation(); 36 | } 37 | 38 | void SpriteView::setup( ci::gl::TextureRef texture, ci::XmlTree xml ) 39 | { 40 | mSpritesheet = po::Spritesheet::create( texture, xml ); 41 | setupAnimation(); 42 | } 43 | 44 | //----------------------------------- 45 | // Multipacked textures 46 | //----------------------------------- 47 | SpriteViewRef SpriteView::create( std::vector& textures, std::vector& data ) 48 | { 49 | SpriteViewRef ref( new SpriteView() ); 50 | ref->setup( textures, data ); 51 | return ref; 52 | } 53 | 54 | SpriteViewRef SpriteView::create( std::vector& textures, std::vector& data ) 55 | { 56 | SpriteViewRef ref( new SpriteView() ); 57 | ref->setup( textures, data ); 58 | return ref; 59 | } 60 | 61 | void SpriteView::setup( std::vector& textures, std::vector& data ) 62 | { 63 | mSpritesheet = po::Spritesheet::create( textures, data ); 64 | setupAnimation(); 65 | } 66 | 67 | void SpriteView::setup( std::vector& textures, std::vector& data ) 68 | { 69 | mSpritesheet = po::Spritesheet::create( textures, data ); 70 | setupAnimation(); 71 | } 72 | 73 | //----------------------------------- 74 | // Spritesheet 75 | //----------------------------------- 76 | SpriteViewRef SpriteView::create( po::SpritesheetRef spriteSheet ) 77 | { 78 | SpriteViewRef ref( new SpriteView() ); 79 | ref->setup( spriteSheet ); 80 | return ref; 81 | } 82 | 83 | void SpriteView::setup( po::SpritesheetRef spriteSheet ) 84 | { 85 | mSpritesheet = spriteSheet; 86 | setupAnimation(); 87 | } 88 | 89 | //----------------------------------- 90 | // Sprite Data 91 | //----------------------------------- 92 | SpriteViewRef SpriteView::create( SpriteDataJson& spriteData ) 93 | { 94 | return create( spriteData.textures, spriteData.jsonFiles ); 95 | } 96 | 97 | SpriteViewRef SpriteView::create( SpriteDataXml& spriteData ) 98 | { 99 | return create( spriteData.textures, spriteData.xmlFiles ); 100 | } 101 | 102 | //----------------------------------- 103 | // Sprite 104 | //----------------------------------- 105 | 106 | SpriteView::SpriteView() 107 | : mIsKeyShaderEnabled( false ) 108 | { 109 | } 110 | 111 | // 112 | // Create the spritesheet animation 113 | // 114 | void SpriteView::setupAnimation() 115 | { 116 | mSpritesheetAnimation = po::SpritesheetAnimation::create( mSpritesheet ); 117 | } 118 | 119 | // 120 | // Update the spritesheet animation 121 | // 122 | void SpriteView::update() 123 | { 124 | View::update(); 125 | setAlignment( getAlignment() ); // Update alignment b/c the sprite size is constantly changing 126 | mSpritesheetAnimation->update(); 127 | } 128 | 129 | // 130 | // Draw the spritesheet animation 131 | // 132 | void SpriteView::draw() 133 | { 134 | if( mIsKeyShaderEnabled ) { 135 | ci::gl::ScopedGlslProg keyShader( mShader ); 136 | mShader->bind(); 137 | // mShader->uniform("keyColor", Colors::KEY_COLOR); 138 | mShader->uniform( "replacementColor", mReplacementColor ); 139 | mShader->uniform( "alpha", getAppliedAlpha() ); 140 | mSpritesheetAnimation->draw(); 141 | 142 | } 143 | else { 144 | ci::gl::color( ci::ColorA( getFillColor(), getAppliedAlpha() ) ); 145 | mSpritesheetAnimation->draw(); 146 | } 147 | } 148 | 149 | // 150 | // Set the replacement color for the shader 151 | // 152 | void SpriteView::setReplacementColor( ci::Color color ) 153 | { 154 | mIsKeyShaderEnabled = true; 155 | mReplacementColor = color; 156 | } 157 | 158 | bool SpriteView::pointInside( const ci::vec2& point, bool localize ) 159 | { 160 | ci::vec2 pos = localize ? windowToLocal( point ) : point; 161 | return getSpritesheet()->getFrameBounds().contains( pos ); 162 | } 163 | } 164 | } -------------------------------------------------------------------------------- /src/poScene/SpriteView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sprite.h 3 | // ForestFriends 4 | // 5 | // Created by bruce on 9/11/14. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | 12 | #include "cinder/gl/GlslProg.h" 13 | #include "cinder/gl/Texture.h" 14 | #include "cinder/Json.h" 15 | 16 | #include "poScene/View.h" 17 | #include "poSpritesheet.h" 18 | #include "poSpritesheetAnimation.h" 19 | 20 | namespace po 21 | { 22 | namespace scene 23 | { 24 | class SpriteView; 25 | typedef std::shared_ptr SpriteViewRef; 26 | 27 | class SpriteView 28 | : public View 29 | { 30 | public: 31 | struct SpriteDataJson { 32 | std::vector textures; 33 | std::vector jsonFiles; 34 | }; 35 | 36 | struct SpriteDataXml { 37 | std::vector textures; 38 | std::vector xmlFiles; 39 | }; 40 | 41 | // using single-texture spritesheets 42 | static SpriteViewRef create( ci::gl::TextureRef texture, ci::JsonTree json ); 43 | static SpriteViewRef create( ci::gl::TextureRef texture, ci::XmlTree xml ); 44 | 45 | // using Multipacked texture spritesheets 46 | static SpriteViewRef create( std::vector& textures, std::vector& data ); 47 | static SpriteViewRef create( std::vector& textures, std::vector& data ); 48 | 49 | // using a spritesheet 50 | static SpriteViewRef create( po::SpritesheetRef spriteSheet ); 51 | 52 | // using spritedata object 53 | static SpriteViewRef create( SpriteDataJson& spriteData ); 54 | static SpriteViewRef create( SpriteDataXml& spriteData ); 55 | 56 | po::SpritesheetRef& getSpritesheet() { return mSpritesheet; } 57 | po::SpritesheetAnimationRef& getAnimation() { return mSpritesheetAnimation; } 58 | ci::Rectf getBounds() { return mSpritesheet->getOriginalBounds(); } 59 | void setReplacementColor( ci::Color color ); 60 | 61 | bool pointInside( const ci::vec2& point, bool localize = true ); 62 | 63 | protected: 64 | SpriteView(); 65 | 66 | void setup( ci::gl::TextureRef texture, ci::JsonTree json ); 67 | void setup( ci::gl::TextureRef texture, ci::XmlTree xml ); 68 | 69 | void setup( std::vector& textures, std::vector& data ); 70 | void setup( std::vector& textures, std::vector& data ); 71 | void setup( po::SpritesheetRef spriteSheet ); 72 | void update(); 73 | void draw(); 74 | 75 | private: 76 | ci::gl::GlslProgRef mShader; 77 | bool mIsKeyShaderEnabled; 78 | ci::Color mReplacementColor; 79 | 80 | po::SpritesheetRef mSpritesheet; 81 | po::SpritesheetAnimationRef mSpritesheetAnimation; 82 | 83 | void setupAnimation(); 84 | 85 | }; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/poSpritesheet/poSpritesheet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015, Potion Design LLC 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the name of copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "poSpritesheet.h" 32 | 33 | namespace po 34 | { 35 | 36 | //------------------------------------------ 37 | // Single texture spritesheet setup 38 | //------------------------------------------ 39 | 40 | SpritesheetRef Spritesheet::create( ci::gl::TextureRef texture, ci::JsonTree json ) 41 | { 42 | SpritesheetRef ref( new Spritesheet() ); 43 | ref->setup( texture, json ); 44 | return ref; 45 | } 46 | 47 | SpritesheetRef Spritesheet::create( ci::gl::TextureRef texture, ci::XmlTree xml ) 48 | { 49 | SpritesheetRef ref( new Spritesheet() ); 50 | ref->setup( texture, xml ); 51 | return ref; 52 | } 53 | 54 | void Spritesheet::setup( ci::gl::TextureRef texture, ci::JsonTree json ) 55 | { 56 | mTextures[0] = texture; 57 | setupSpriteMap( 0, json ); 58 | } 59 | 60 | void Spritesheet::setup( ci::gl::TextureRef texture, ci::XmlTree xml ) 61 | { 62 | mTextures[0] = texture; 63 | setupSpriteMap( 0, xml ); 64 | } 65 | 66 | 67 | 68 | //------------------------------------------ 69 | // Multipacked spritesheet setup 70 | //------------------------------------------ 71 | 72 | void Spritesheet::setup( std::vector& textures, std::vector data ) 73 | { 74 | int counter = 0; 75 | 76 | for( auto json : data ) { 77 | int textureID = counter; 78 | mTextures[textureID] = textures[counter]; 79 | setupSpriteMap( textureID, json ); 80 | counter++; 81 | } 82 | } 83 | 84 | void Spritesheet::setup( std::vector& textures, std::vector data ) 85 | { 86 | int counter = 0; 87 | 88 | for( auto xml : data ) { 89 | int textureID = counter; 90 | mTextures[textureID] = textures[counter]; 91 | setupSpriteMap( textureID, xml ); 92 | counter++; 93 | } 94 | } 95 | 96 | SpritesheetRef Spritesheet::create( std::vector& textures, std::vector& data ) 97 | { 98 | SpritesheetRef ref( new Spritesheet() ); 99 | ref->setup( textures, data ); 100 | return ref; 101 | } 102 | 103 | SpritesheetRef Spritesheet::create( std::vector& textures, std::vector& data ) 104 | { 105 | SpritesheetRef ref( new Spritesheet() ); 106 | ref->setup( textures, data ); 107 | return ref; 108 | } 109 | 110 | 111 | //------------------------------------------ 112 | // Spritesheet 113 | //------------------------------------------ 114 | 115 | Spritesheet::Spritesheet() 116 | : mIsDrawOriginalBounds( false ) 117 | , mIsDrawFrameBounds( false ) 118 | , mCurrentFrameKey( "" ) 119 | {} 120 | 121 | Spritesheet::~Spritesheet() 122 | {} 123 | 124 | 125 | // 126 | // Setup frame data and texture maps 127 | // 128 | void Spritesheet::setupSpriteMap( int textureID, ci::JsonTree json ) 129 | { 130 | // get all the frames in the json 131 | for( auto frame : json.getChild( "frames" ) ) { 132 | FrameData frameData = getFrameData( frame ); 133 | std::string frameKey = frameData.filename; 134 | mFrameData[frameKey] = frameData; 135 | mTextureIDs[frameKey] = textureID; 136 | mFrameOrder.push_back( frameKey ); 137 | } 138 | 139 | // sort the frame order alphabetically 140 | std::sort( mFrameOrder.begin(), mFrameOrder.end() ); 141 | mNumFrames = mFrameOrder.size(); 142 | mCurrentFrameKey = mFrameOrder[0]; 143 | } 144 | 145 | // 146 | // Create framedata object from json 147 | // 148 | Spritesheet::FrameData Spritesheet::getFrameData( ci::JsonTree json ) 149 | { 150 | FrameData frameData = FrameData(); 151 | frameData.filename = json.getChild( "filename" ).getValue(); 152 | frameData.frame = ci::Area( 153 | json.getChild( "frame" ).getChild( "x" ).getValue(), 154 | json.getChild( "frame" ).getChild( "y" ).getValue(), 155 | json.getChild( "frame" ).getChild( "x" ).getValue() + 156 | json.getChild( "frame" ).getChild( "w" ).getValue(), 157 | json.getChild( "frame" ).getChild( "y" ).getValue() + 158 | json.getChild( "frame" ).getChild( "h" ).getValue() 159 | ); 160 | frameData.rotated = json.getChild( "rotated" ).getValue(); 161 | frameData.trimmed = json.getChild( "trimmed" ).getValue(); 162 | frameData.spriteSourceSize = ci::Rectf( 163 | json.getChild( "spriteSourceSize" ).getChild( "x" ).getValue(), 164 | json.getChild( "spriteSourceSize" ).getChild( "y" ).getValue(), 165 | json.getChild( "spriteSourceSize" ).getChild( "x" ).getValue() + 166 | json.getChild( "spriteSourceSize" ).getChild( "w" ).getValue(), 167 | json.getChild( "spriteSourceSize" ).getChild( "y" ).getValue() + 168 | json.getChild( "spriteSourceSize" ).getChild( "h" ).getValue() 169 | ); 170 | frameData.sourceSize = ci::vec2( 171 | json.getChild( "sourceSize" ).getChild( "w" ).getValue(), 172 | json.getChild( "sourceSize" ).getChild( "h" ).getValue() 173 | ); 174 | 175 | return frameData; 176 | } 177 | 178 | 179 | // 180 | // Setup frame data and texture maps 181 | // 182 | void Spritesheet::setupSpriteMap( int textureID, ci::XmlTree xml ) 183 | { 184 | 185 | // get all the frames in the json 186 | for( auto frame : xml.getChild( "TextureAtlas" ) ) { 187 | FrameData frameData = getFrameData( frame ); 188 | std::string frameKey = frameData.filename; 189 | mFrameData[frameKey] = frameData; 190 | mTextureIDs[frameKey] = textureID; 191 | mFrameOrder.push_back( frameKey ); 192 | } 193 | 194 | // sort the frame order alphabetically 195 | std::sort( mFrameOrder.begin(), mFrameOrder.end() ); 196 | mNumFrames = mFrameOrder.size(); 197 | mCurrentFrameKey = mFrameOrder[0]; 198 | } 199 | 200 | 201 | // 202 | // Create framedata object from json 203 | // 204 | Spritesheet::FrameData Spritesheet::getFrameData( ci::XmlTree xml ) 205 | { 206 | FrameData frameData = FrameData(); 207 | frameData.filename = xml.getAttribute( "n" ).getValue(); 208 | 209 | // Get Sprite size in spritesheet 210 | frameData.frame = ci::Area( 211 | xml.getAttribute( "x" ).getValue(), 212 | xml.getAttribute( "y" ).getValue(), 213 | xml.getAttribute( "x" ).getValue() + 214 | xml.getAttribute( "w" ).getValue(), 215 | xml.getAttribute( "y" ).getValue() + 216 | xml.getAttribute( "h" ).getValue() 217 | ); 218 | frameData.sourceSize = ci::vec2( 219 | xml.getAttribute( "w" ).getValue(), 220 | xml.getAttribute( "h" ).getValue() 221 | ); 222 | 223 | // Get rotation 224 | if( xml.hasAttribute( "r" ) ) { 225 | frameData.rotated = xml.getChild( "r" ).getValue(); 226 | } 227 | else { 228 | frameData.rotated = false; 229 | } 230 | 231 | // Get Trim/Actual size 232 | if( xml.hasAttribute( "oX" ) ) { 233 | frameData.trimmed = true; 234 | frameData.spriteSourceSize = ci::Area( 235 | xml.getAttribute( "oX" ).getValue(), 236 | xml.getAttribute( "oY" ).getValue(), 237 | xml.getAttribute( "oX" ).getValue() + 238 | xml.getAttribute( "oW" ).getValue(), 239 | xml.getAttribute( "oY" ).getValue() + 240 | xml.getAttribute( "oH" ).getValue() 241 | ); 242 | } 243 | else { 244 | frameData.trimmed = false; 245 | frameData.spriteSourceSize = ci::Area( 0, 0, frameData.sourceSize.x, frameData.sourceSize.y ); 246 | } 247 | 248 | 249 | return frameData; 250 | } 251 | 252 | 253 | // 254 | // Draw bounds for the original size or the current frame size 255 | // 256 | void Spritesheet::drawBounds() 257 | { 258 | if( mIsDrawOriginalBounds ) { 259 | ci::gl::ScopedColor color( ci::Color( 1, 0, 0 ) ); 260 | ci::gl::drawStrokedRect( getOriginalBounds() ); 261 | } 262 | 263 | if( mIsDrawFrameBounds ) { 264 | ci::gl::ScopedColor color( ci::Color( 0, 1, 0 ) ); 265 | ci::gl::drawStrokedRect( getFrameBounds() ); 266 | } 267 | } 268 | 269 | // 270 | // Draw the texture for the current frame 271 | // 272 | void Spritesheet::drawFrame( int frameNum ) 273 | { 274 | ci::gl::ScopedMatrices matrices; 275 | ci::gl::ScopedBlendAlpha alpha; 276 | 277 | mCurrentFrameKey = mFrameOrder[frameNum]; 278 | ci::gl::draw( mTextures[mTextureIDs[mCurrentFrameKey]], mFrameData[mCurrentFrameKey].frame, mFrameData[mCurrentFrameKey].spriteSourceSize ); 279 | 280 | drawBounds(); 281 | } 282 | 283 | void Spritesheet::drawFrame( std::string frameName ) 284 | { 285 | int framenum = std::find( mFrameOrder.begin(), mFrameOrder.end(), frameName ) - mFrameOrder.begin(); 286 | 287 | if( framenum < mFrameOrder.size() ) { 288 | drawFrame( framenum ); 289 | } 290 | else { 291 | ci::app::console() << "No frame named: " << frameName << std::endl; 292 | } 293 | } 294 | 295 | // 296 | // Get the original bounds for the frame 297 | // 298 | ci::Rectf Spritesheet::getOriginalBounds() 299 | { 300 | ci::Rectf bounds( 0, 0, mFrameData[mCurrentFrameKey].sourceSize.x, mFrameData[mCurrentFrameKey].sourceSize.y ); 301 | return bounds; 302 | } 303 | 304 | // 305 | // Get the frame bounds for the current frame 306 | // 307 | ci::Rectf Spritesheet::getFrameBounds() 308 | { 309 | return mFrameData[mCurrentFrameKey].spriteSourceSize; 310 | } 311 | 312 | } -------------------------------------------------------------------------------- /src/poSpritesheet/poSpritesheet.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015, Potion Design LLC 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the name of copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #pragma once 32 | 33 | #include 34 | #include "cinder/app/App.h" 35 | #include "cinder/gl/gl.h" 36 | #include "cinder/gl/Texture.h" 37 | #include "cinder/Json.h" 38 | #include "cinder/Xml.h" 39 | #include "cinder/Rect.h" 40 | #include "cinder/Area.h" 41 | 42 | #include "cinder/gl/gl.h" 43 | #include "cinder/app/App.h" 44 | namespace po { 45 | 46 | class Spritesheet; 47 | typedef std::shared_ptr SpritesheetRef; 48 | 49 | class Spritesheet 50 | { 51 | public: 52 | // Single texture spritesheet with json or xml 53 | static SpritesheetRef create(ci::gl::TextureRef texture, ci::JsonTree json); 54 | static SpritesheetRef create(ci::gl::TextureRef texture, ci::XmlTree xml); 55 | 56 | // Multipacked texture spritesheet with json or xml 57 | static SpritesheetRef create(std::vector &textures, std::vector &data); 58 | static SpritesheetRef create(std::vector &textures, std::vector &data); 59 | 60 | ~Spritesheet(); 61 | 62 | // Source size 63 | ci::Rectf getOriginalBounds(); 64 | 65 | // Sprite source size 66 | ci::Rectf getFrameBounds(); 67 | 68 | // Draw frame bounds 69 | void drawOriginalBounds(bool isDrawOriginalBounds) { mIsDrawOriginalBounds = isDrawOriginalBounds; } 70 | void drawFrameBounds(bool isDrawFrameBounds) { mIsDrawFrameBounds = isDrawFrameBounds; } 71 | 72 | // Number of frames in the spritesheet 73 | int getNumFrames() { return mNumFrames; } 74 | 75 | // Draw frame number 76 | void drawFrame(int frameNum); 77 | 78 | // Draw frame name 79 | void drawFrame(std::string frameName); 80 | 81 | protected: 82 | Spritesheet(); 83 | 84 | // Json 85 | void setup(ci::gl::TextureRef texture, ci::JsonTree json); 86 | void setup(std::vector &textures, std::vector data); 87 | 88 | // XML 89 | void setup(ci::gl::TextureRef texture, ci::XmlTree json); 90 | void setup(std::vector &textures, std::vector data); 91 | 92 | private: 93 | 94 | // Frame data structure 95 | struct FrameData { 96 | FrameData(){}; 97 | 98 | std::string filename; 99 | ci::Area frame; 100 | bool rotated; 101 | bool trimmed; 102 | ci::Rectf spriteSourceSize; 103 | ci::vec2 sourceSize; 104 | }; 105 | 106 | // 107 | // Frame data map 108 | // key: sprite filename, value: frame data object 109 | // 110 | std::map mFrameData; 111 | 112 | // 113 | // Texture ids 114 | // key: sprite filename, value: texture id 115 | // 116 | std::map mTextureIDs; 117 | 118 | // 119 | // Texture map 120 | // key: texture id, value: texture ref 121 | // 122 | std::map mTextures; 123 | 124 | // 125 | // store the order frames should appear in 126 | // this is sorted alphabetically 127 | // 128 | std::vector mFrameOrder; 129 | 130 | int mNumFrames; 131 | std::string mCurrentFrameKey; // keep track of the current frame key 132 | 133 | bool mIsDrawOriginalBounds; 134 | bool mIsDrawFrameBounds; 135 | 136 | void setupSpriteMap(int textureID, ci::JsonTree json); 137 | FrameData getFrameData(ci::JsonTree json); 138 | 139 | void setupSpriteMap(int textureID, ci::XmlTree xml); 140 | FrameData getFrameData(ci::XmlTree xml); 141 | 142 | void drawBounds(); 143 | 144 | }; 145 | 146 | } -------------------------------------------------------------------------------- /src/poSpritesheet/poSpritesheetAnimation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015, Potion Design LLC 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the name of copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #include "poSpritesheetAnimation.h" 32 | #include "cinder/app/App.h" 33 | 34 | namespace po 35 | { 36 | 37 | SpritesheetAnimationRef SpritesheetAnimation::create( SpritesheetRef spritesheet, float fps ) 38 | { 39 | SpritesheetAnimationRef ref( new SpritesheetAnimation() ); 40 | ref->setup( spritesheet, fps ); 41 | return ref; 42 | } 43 | 44 | SpritesheetAnimation::SpritesheetAnimation() 45 | : mCurrentFrame( 0 ) 46 | , mIsPlaying( false ) 47 | , mIsLooping( false ) 48 | , mFPS( 12.f ) 49 | , mPreviousTime( 0.f ) 50 | , mCurrentTime( 0.f ) 51 | , mIsReverse( false ) 52 | {} 53 | 54 | SpritesheetAnimation::~SpritesheetAnimation() 55 | {} 56 | 57 | void SpritesheetAnimation::setup( SpritesheetRef spritesheet, float fps ) 58 | { 59 | mSpritesheet = spritesheet; 60 | setFrameRate( fps ); 61 | mLastFrame = mSpritesheet->getNumFrames() - 1; 62 | } 63 | 64 | // 65 | // Goto the next frame based on fps 66 | // 67 | void SpritesheetAnimation::update() 68 | { 69 | if( mIsPlaying ) { 70 | mCurrentTime = ci::app::getElapsedSeconds() * 1000; 71 | float timeDiff = mCurrentTime - mPreviousTime; 72 | 73 | if( timeDiff > mFrameRate ) { 74 | float over = timeDiff - mFrameRate; 75 | mPreviousTime = mCurrentTime - over; 76 | nextFrame(); 77 | } 78 | } 79 | } 80 | 81 | // 82 | // Draw the current frame in the texture 83 | // 84 | void SpritesheetAnimation::draw() 85 | { 86 | mSpritesheet->drawFrame( mCurrentFrame ); 87 | } 88 | 89 | // 90 | // Set the frame rate 91 | // 92 | void SpritesheetAnimation::setFrameRate( float frameRate ) 93 | { 94 | mFPS = frameRate; 95 | mFrameRate = 1000.f / mFPS; 96 | } 97 | 98 | // 99 | // Go to the next frame 100 | // 101 | void SpritesheetAnimation::nextFrame() 102 | { 103 | if( mIsPlaying ) { 104 | 105 | if( mIsReverse ) { 106 | mCurrentFrame = ( mCurrentFrame -= 1 ) % mSpritesheet->getNumFrames(); 107 | 108 | if( mCurrentFrame < 0 ) { mCurrentFrame = 0; } 109 | } 110 | else { 111 | mCurrentFrame = ( mCurrentFrame += 1 ) % mSpritesheet->getNumFrames(); 112 | 113 | if( mCurrentFrame > mLastFrame ) { mCurrentFrame = mLastFrame; } 114 | } 115 | 116 | if( !mIsLooping ) { 117 | 118 | int targetFrame = !mIsReverse ? mLastFrame : 0; 119 | 120 | if( mCurrentFrame == targetFrame ) { 121 | mIsPlaying = false; 122 | mPlayCompleteSignal.emit( shared_from_this() ); 123 | } 124 | } 125 | } 126 | } 127 | 128 | // 129 | // Start Playing 130 | // 131 | void SpritesheetAnimation::play() 132 | { 133 | mPreviousTime = ci::app::getElapsedSeconds() * 1000.0f; 134 | mIsPlaying = true; 135 | } 136 | 137 | // 138 | // Stop playing 139 | // 140 | void SpritesheetAnimation::stop() 141 | { 142 | mIsPlaying = false; 143 | 144 | if( mIsReverse ) { 145 | mCurrentFrame = mSpritesheet->getNumFrames() - 1; 146 | } 147 | else { 148 | mCurrentFrame = 0; 149 | } 150 | } 151 | 152 | // 153 | // Play in reverse 154 | // 155 | void SpritesheetAnimation::setIsReverse( bool reverse, bool andSkipToStartFrame ) 156 | { 157 | mIsReverse = reverse; 158 | 159 | if( andSkipToStartFrame ) { 160 | if( mIsReverse ) { 161 | if( mCurrentFrame == 0 ) { 162 | mCurrentFrame = mSpritesheet->getNumFrames() - 1; 163 | } 164 | 165 | mLastFrame = 0; 166 | } 167 | else { 168 | mLastFrame = mSpritesheet->getNumFrames() - 1; 169 | } 170 | } 171 | } 172 | 173 | } -------------------------------------------------------------------------------- /src/poSpritesheet/poSpritesheetAnimation.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015, Potion Design LLC 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the name of copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #pragma once 32 | 33 | #include "poSpritesheet.h" 34 | 35 | namespace po 36 | { 37 | 38 | class Spritesheet; 39 | typedef std::shared_ptr SpritesheetRef; 40 | 41 | class SpritesheetAnimation; 42 | typedef std::shared_ptr SpritesheetAnimationRef; 43 | 44 | class SpritesheetAnimation 45 | : public std::enable_shared_from_this 46 | { 47 | public: 48 | // Spritesheet to animate and frame rate 49 | static SpritesheetAnimationRef create( SpritesheetRef spritesheet, float fps = 12.f ); 50 | 51 | ~SpritesheetAnimation(); 52 | 53 | // Playing complete signal, when not looped 54 | typedef ci::signals::Signal SignalSpritesheetPlayComplete; 55 | 56 | virtual void update(); 57 | virtual void draw(); 58 | 59 | void play(); 60 | void pause() { mIsPlaying = false; } 61 | void stop(); 62 | void setIsLoopingEnabled( bool isLooping ) { mIsLooping = isLooping; } 63 | void setFrameRate( float frameRate ); 64 | void setIsReverse( bool reverse, bool andSkipToStartFrame = false ); 65 | 66 | SignalSpritesheetPlayComplete& getSignalPlayingComplete() { return mPlayCompleteSignal; } 67 | int getCurrentFrame() { return mCurrentFrame; } 68 | bool getIsPlaying() { return mIsPlaying; } 69 | 70 | 71 | protected: 72 | SpritesheetAnimation(); 73 | 74 | void setup( SpritesheetRef spritesheet, float fps ); 75 | 76 | private: 77 | SpritesheetRef mSpritesheet; 78 | 79 | // Keep track of frames 80 | int mCurrentFrame; 81 | int mLastFrame; 82 | 83 | // Keep track of state 84 | bool mIsPlaying; 85 | bool mIsLooping; 86 | bool mIsReverse; 87 | 88 | float mFrameRate; 89 | float mFPS; 90 | float mCurrentTime; 91 | float mPreviousTime; 92 | 93 | SignalSpritesheetPlayComplete mPlayCompleteSignal; 94 | 95 | // Proceed to next frame 96 | void nextFrame(); 97 | 98 | }; 99 | 100 | } 101 | --------------------------------------------------------------------------------