orx  1.10
Portable Game Engine
orxAnim.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2019 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
47 #ifndef _orxANIM_H_
48 #define _orxANIM_H_
49 
50 
51 #include "orxInclude.h"
52 
53 #include "object/orxStructure.h"
54 
55 
58 #define orxANIM_KU32_FLAG_NONE 0x00000000
60 #define orxANIM_KU32_FLAG_2D 0x00000001
62 #define orxANIM_KU32_MASK_USER_ALL 0x0000000F
64 #define orxANIM_KU32_MASK_ALL 0xFFFFFFFF
68 #define orxANIM_KU32_KEY_MAX_NUMBER 65535
69 #define orxANIM_KU32_EVENT_MAX_NUMBER 65535
74 typedef struct __orxANIM_t orxANIM;
75 
76 
79 typedef enum __orxANIM_EVENT_t
80 {
89 
90  orxANIM_EVENT_NONE = orxENUM_NONE
91 
93 
96 typedef struct __orxANIM_EVENT_PAYLOAD_t
97 {
99  const orxSTRING zAnimName;
101  union
102  {
103  /* Loop event */
104  struct
105  {
106  orxU32 u32Count;
107  } stLoop;
108 
109  /* Cut event */
110  struct
111  {
112  orxFLOAT fTime;
113  } stCut;
114 
115  /* Custom event */
116  struct
117  {
118  const orxSTRING zName;
119  orxFLOAT fValue;
120  orxFLOAT fTime;
121  } stCustom;
122  };
123 
125 
128 typedef struct __orxANIM_CUSTOM_EVENT_t
129 {
130  const orxSTRING zName;
131  orxFLOAT fValue;
132  orxFLOAT fTimeStamp;
135 
136 
139 extern orxDLLAPI void orxFASTCALL orxAnim_Setup();
140 
143 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Init();
144 
147 extern orxDLLAPI void orxFASTCALL orxAnim_Exit();
148 
149 
156 extern orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber);
157 
162 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Delete(orxANIM *_pstAnim);
163 
164 
171 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddKey(orxANIM *_pstAnim, orxSTRUCTURE *_pstData, orxFLOAT _fTimeStamp);
172 
177 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim);
178 
182 extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim);
183 
184 
192 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue);
193 
198 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastEvent(orxANIM *_pstAnim);
199 
203 extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllEvents(orxANIM *_pstAnim);
204 
210 extern orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp);
211 
212 
218 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKey(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp);
219 
225 extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxAnim_GetKeyData(const orxANIM *_pstAnim, orxU32 _u32Index);
226 
227 
232 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim);
233 
238 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCount(const orxANIM *_pstAnim);
239 
240 
245 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventStorageSize(const orxANIM *_pstAnim);
246 
251 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCount(const orxANIM *_pstAnim);
252 
253 
258 extern orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetLength(const orxANIM *_pstAnim);
259 
264 extern orxDLLAPI const orxSTRING orxFASTCALL orxAnim_GetName(const orxANIM *_pstAnim);
265 
266 #endif /* _orxANIM_H_ */
267 
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim)
orxANIM * pstAnim
Definition: orxAnim.h:98
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCount(const orxANIM *_pstAnim)
orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp)
const orxSTRING zName
Definition: orxAnim.h:118
orxFLOAT fTimeStamp
Definition: orxAnim.h:132
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim)
const orxSTRING zName
Definition: orxAnim.h:130
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddKey(orxANIM *_pstAnim, orxSTRUCTURE *_pstData, orxFLOAT _fTimeStamp)
const orxSTRING zAnimName
Definition: orxAnim.h:99
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventStorageSize(const orxANIM *_pstAnim)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue)
orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetLength(const orxANIM *_pstAnim)
orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber)
orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim)
orxSTATUS
Definition: orxType.h:246
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Delete(orxANIM *_pstAnim)
orxDLLAPI const orxSTRING orxFASTCALL orxAnim_GetName(const orxANIM *_pstAnim)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastEvent(orxANIM *_pstAnim)
#define orxDLLAPI
Definition: orxDecl.h:381
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Init()
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxAnim_GetKeyData(const orxANIM *_pstAnim, orxU32 _u32Index)
orxANIM_EVENT
Definition: orxAnim.h:79
orxDLLAPI void orxFASTCALL orxAnim_Setup()
orxDLLAPI void orxFASTCALL orxAnim_RemoveAllEvents(orxANIM *_pstAnim)
orxDLLAPI void orxFASTCALL orxAnim_Exit()
struct __orxANIM_t orxANIM
Definition: orxAnim.h:74
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCount(const orxANIM *_pstAnim)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKey(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp)

Generated for orx by doxygen 1.8.11