GAF Library
Generic Animation Format
 All Classes Functions Pages
GAFCollections.h
1 #pragma once
2 
3 class GAFTextureAtlas;
5 class GAFSprite;
6 class GAFFilterData;
7 
8 #include "GAFAnimationSequence.h"
9 
10 enum GAFFilterType
11 {
12  GFT_DropShadow = 0,
13  GFT_Blur = 1,
14  GFT_Glow = 2,
15  GFT_ColorMatrix = 6
16 };
17 
18 typedef std::vector<GAFTextureAtlas*> TextureAtlases_t;
19 typedef std::map<unsigned int, unsigned int> AnimationMasks_t; // Object id -> Element Atlas Id
20 typedef std::map<unsigned int, unsigned int> AnimationObjects_t; // Object id -> Element Atlas Id
21 typedef std::vector<GAFAnimationFrame*> AnimationFrames_t;
22 typedef std::map<unsigned int, GAFSprite*> SubObjects_t;
23 typedef std::vector<GAFFilterData*> Filters_t;
24 
25 typedef std::map<unsigned int, int> CaptureObjects_t; // Object id -> capture flags
26 
27 // TODO: it better to use HashMap(Unordered map)
28 typedef std::map<std::string, GAFAnimationSequence> AnimationSequences_t;
29 typedef std::map<std::string, unsigned int> NamedParts_t;
30 
31 #define GAF_SAFE_RELEASE_MAP(__type, __instance)\
32 for (__type::iterator i = __instance.begin(), e = __instance.end(); i != e; ++i) {\
33 i->second->release(); \
34 } __instance.clear();
35 
36 #define GAF_SAFE_RELEASE_ARRAY(__type, __instance)\
37 for (__type::iterator i = __instance.begin(), e = __instance.end(); i != e; ++i) {\
38 (*i)->release(); \
39 } __instance.clear();
40 
41 #define GAF_RELEASE_ARRAY(__type, __instance)\
42 for (__type::iterator i = __instance.begin(), e = __instance.end(); i != e; ++i) {\
43 delete *i; \
44 } __instance.clear();
45 
46 #define GAF_RELEASE_MAP(__type, __instance)\
47 for (__type::iterator i = __instance.begin(), e = __instance.end(); i != e; ++i) {\
48 delete i->second; \
49 } __instance.clear();
50 
51 
52 enum
53 {
54  IDNONE = UINT_MAX
55 };
Definition: GAFSprite.h:23
Definition: GAFFilterData.h:10
Definition: GAFTextureAtlas.h:9
Definition: GAFAnimationFrame.h:9