orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxAnim.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- 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
32
45
46
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
59
60#define orxANIM_KU32_FLAG_2D 0x00000001
61
62#define orxANIM_KU32_MASK_USER_ALL 0x0000000F
63
64#define orxANIM_KU32_MASK_ALL 0xFFFFFFFF
65
68#define orxANIM_KU32_KEY_MAX_NUMBER 65535
69#define orxANIM_KU32_EVENT_MAX_NUMBER 65535
70
71
74typedef struct __orxANIM_t orxANIM;
75
76
93
96typedef struct __orxANIM_EVENT_PAYLOAD_t
97{
99 const orxSTRING zAnimName;
100
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
128typedef struct __orxANIM_CUSTOM_EVENT_t
129{
130 const orxSTRING zName;
131 orxFLOAT fValue;
132 orxFLOAT fTimeStamp;
133
135
136
139extern orxDLLAPI void orxFASTCALL orxAnim_Setup();
140
143extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Init();
144
147extern orxDLLAPI void orxFASTCALL orxAnim_Exit();
148
149
156extern orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber);
157
162extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Delete(orxANIM *_pstAnim);
163
164
171extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddKey(orxANIM *_pstAnim, orxSTRUCTURE *_pstData, orxFLOAT _fTimeStamp);
172
177extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim);
178
182extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim);
183
184
192extern orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue);
193
199
203extern orxDLLAPI void orxFASTCALL orxAnim_RemoveAllEvents(orxANIM *_pstAnim);
204
210extern orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, const orxANIM_CUSTOM_EVENT *_pstEvent);
211
217extern orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetEventAfter(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp);
218
219
225extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKey(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp);
226
232extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxAnim_GetKeyData(const orxANIM *_pstAnim, orxU32 _u32Index);
233
234
239extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim);
240
245extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCount(const orxANIM *_pstAnim);
246
247
252extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventStorageSize(const orxANIM *_pstAnim);
253
258extern orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCount(const orxANIM *_pstAnim);
259
260
265extern orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetDuration(const orxANIM *_pstAnim);
266
271extern orxDLLAPI const orxSTRING orxFASTCALL orxAnim_GetName(const orxANIM *_pstAnim);
272
273#endif /* _orxANIM_H_ */
274
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastEvent(orxANIM *_pstAnim)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventStorageSize(const orxANIM *_pstAnim)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_RemoveLastKey(orxANIM *_pstAnim)
orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetNextEvent(const orxANIM *_pstAnim, const orxANIM_CUSTOM_EVENT *_pstEvent)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddKey(orxANIM *_pstAnim, orxSTRUCTURE *_pstData, orxFLOAT _fTimeStamp)
orxANIM_EVENT
Definition orxAnim.h:80
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Init()
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKey(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp)
struct __orxANIM_t orxANIM
Definition orxAnim.h:74
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_AddEvent(orxANIM *_pstAnim, const orxSTRING _zEventName, orxFLOAT _fTimeStamp, orxFLOAT _fValue)
orxDLLAPI void orxFASTCALL orxAnim_RemoveAllKeys(orxANIM *_pstAnim)
orxDLLAPI orxSTATUS orxFASTCALL orxAnim_Delete(orxANIM *_pstAnim)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyCount(const orxANIM *_pstAnim)
orxDLLAPI void orxFASTCALL orxAnim_RemoveAllEvents(orxANIM *_pstAnim)
orxDLLAPI orxANIM *orxFASTCALL orxAnim_Create(orxU32 _u32Flags, orxU32 _u32KeyNumber, orxU32 _u32EventNumber)
orxDLLAPI const orxSTRING orxFASTCALL orxAnim_GetName(const orxANIM *_pstAnim)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetEventCount(const orxANIM *_pstAnim)
orxDLLAPI void orxFASTCALL orxAnim_Exit()
orxDLLAPI orxFLOAT orxFASTCALL orxAnim_GetDuration(const orxANIM *_pstAnim)
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxAnim_GetKeyData(const orxANIM *_pstAnim, orxU32 _u32Index)
orxDLLAPI orxU32 orxFASTCALL orxAnim_GetKeyStorageSize(const orxANIM *_pstAnim)
orxDLLAPI const orxANIM_CUSTOM_EVENT *orxFASTCALL orxAnim_GetEventAfter(const orxANIM *_pstAnim, orxFLOAT _fTimeStamp)
orxDLLAPI void orxFASTCALL orxAnim_Setup()
@ orxANIM_EVENT_CUSTOM_EVENT
Definition orxAnim.h:86
@ orxANIM_EVENT_CUT
Definition orxAnim.h:83
@ orxANIM_EVENT_UPDATE
Definition orxAnim.h:85
@ orxANIM_EVENT_LOOP
Definition orxAnim.h:84
@ orxANIM_EVENT_NUMBER
Definition orxAnim.h:88
@ orxANIM_EVENT_START
Definition orxAnim.h:81
@ orxANIM_EVENT_STOP
Definition orxAnim.h:82
@ orxANIM_EVENT_NONE
Definition orxAnim.h:90
#define orxDLLAPI
Definition orxDecl.h:381
#define orxSTRUCTURE(STRUCTURE)
#define orxANIM(STRUCTURE)
orxSTATUS
Definition orxType.h:270
orxFLOAT fTimeStamp
Definition orxAnim.h:132
const orxSTRING zName
Definition orxAnim.h:130
const orxSTRING zName
Definition orxAnim.h:118
const orxSTRING zAnimName
Definition orxAnim.h:99
orxANIM * pstAnim
Definition orxAnim.h:98

Generated for orx by doxygen 1.8.11