orx  stable
Portable Game Engine
orxAnim.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 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 u32Counter;
107  } stLoop;
108 
109  /* Custom event */
110  struct
111  {
112  const orxSTRING zName;
113  orxFLOAT fValue;
114  orxFLOAT fTime;
115  } stCustom;
116  };
117 
119 
122 typedef struct __orxANIM_CUSTOM_EVENT_t
123 {
124  const orxSTRING zName;
125  orxFLOAT fValue;
126  orxFLOAT fTimeStamp;
129 
130 
133 extern orxDLLAPI void orxFASTCALL orxAnim_Setup();
134 
137 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Init();
138 
141 extern orxDLLAPI void orxFASTCALL orxAnim_Exit();
142 
143 
150 extern orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber);
151 
156 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Delete(orxANIM *_pstAnim);
157 
158 
165 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddKey(orxANIM *_pstAnim, orxSTRUCTURE *_pstData, orxFLOAT _fTimeStamp);
166 
171 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim);
172 
176 extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim);
177 
178 
186 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue);
187 
192 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastEvent(orxANIM *_pstAnim);
193 
197 extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllEvents(orxANIM *_pstAnim);
198 
204 extern orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp);
205 
206 
213 extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Update(orxANIM *_pstAnim, orxFLOAT _fTimeStamp, orxU32 *_pu32CurrentKey);
214 
220 extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxAnim_GetKeyData(const orxANIM *_pstAnim, orxU32 _u32Index);
221 
222 
227 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim);
228 
233 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCounter(const orxANIM *_pstAnim);
234 
235 
240 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventStorageSize(const orxANIM *_pstAnim);
241 
246 extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCounter(const orxANIM *_pstAnim);
247 
248 
253 extern orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetLength(const orxANIM *_pstAnim);
254 
259 extern orxDLLAPI const orxSTRING orxFASTCALL orxAnim_GetName(const orxANIM *_pstAnim);
260 
261 #endif /* _orxANIM_H_ */
262 
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim)
orxANIM * pstAnim
Definition: orxAnim.h:98
orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp)
const orxSTRING zName
Definition: orxAnim.h:112
orxFLOAT fTimeStamp
Definition: orxAnim.h:126
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim)
const orxSTRING zName
Definition: orxAnim.h:124
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_Update(orxANIM *_pstAnim, orxFLOAT _fTimeStamp, orxU32 *_pu32CurrentKey)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCounter(const orxANIM *_pstAnim)
orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetLength(const orxANIM *_pstAnim)
orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCounter(const orxANIM *_pstAnim)
orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim)
orxSTATUS
Definition: orxType.h:243
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:387
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

Generated for orx by doxygen 1.5.6