GAF Library
Generic Animation Format
 All Classes Functions Pages
GAFTextureAtlas.h
1 #pragma once
2 
3 #ifndef __GAF_TEXTURE_ATLAS___
4 #define __GAF_TEXTURE_ATLAS___
5 
6 #include "cocoa/CCObject.h"
7 
8 namespace cocos2d
9 {
10  class CCImage;
11  class CCArray;
12  class CCTexture2D;
13  class CCDictionary;
14 }
15 using namespace cocos2d;
16 
17 class GAFTextureAtlas : public CCObject
18 {
19 public:
20  ~GAFTextureAtlas();
21 
22  static GAFTextureAtlas * create(const char * aTexturesDirectory, CCDictionary * aTextureAtlasConfigDictionary);
23  bool init(const char * aTexturesDirectory, CCDictionary * aTextureAtlasConfigDictionary);
24 
25  inline bool loaded() const
26  {
27  return _loaded;
28  }
29 
30  CCImage * image();
31  CCArray * images();
32 
33  CCTexture2D * texture();
34  CCArray * textures();
35 
36  CCDictionary * elements();
37 
38  bool loadElementsFromAnimationConfigDictionary(CCDictionary * aConfigDictionary);
39 protected:
41 private:
42  bool _loaded;
43  CCArray * _images;
44  CCArray * _textures;
45  CCDictionary * _elements;
46 };
47 
48 #endif // __GAF_TEXTURE_ATLAS___
Definition: GAFTextureAtlas.h:17