orx  1.14
Portable Game Engine
orxSpawner.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 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 
44 #ifndef _orxSPAWNER_H_
45 #define _orxSPAWNER_H_
46 
47 
48 #include "orxInclude.h"
49 
50 #include "object/orxStructure.h"
51 #include "object/orxFrame.h"
52 
53 
56 #define orxSPAWNER_KU32_FLAG_NONE 0x00000000
58 #define orxSPAWNER_KU32_FLAG_AUTO_DELETE 0x00000001
59 #define orxSPAWNER_KU32_FLAG_AUTO_RESET 0x00000002
60 #define orxSPAWNER_KU32_FLAG_USE_ALPHA 0x00000004
61 #define orxSPAWNER_KU32_FLAG_USE_COLOR 0x00000008
62 #define orxSPAWNER_KU32_FLAG_USE_ROTATION 0x00000010
63 #define orxSPAWNER_KU32_FLAG_USE_SCALE 0x00000020
65 #define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_OBJECT 0x00000040
66 #define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_SPAWNER 0x00000080
67 #define orxSPAWNER_KU32_MASK_USE_RELATIVE_SPEED 0x000000C0
69 #define orxSPAWNER_KU32_FLAG_USE_SELF_AS_PARENT 0x00000100
70 #define orxSPAWNER_KU32_FLAG_CLEAN_ON_DELETE 0x00000200
71 #define orxSPAWNER_KU32_FLAG_INTERPOLATE 0x00000400
73 #define orxSPAWNER_KU32_MASK_USER_ALL 0x000004FF
78 typedef enum __orxSPAWNER_EVENT_t
79 {
87 
89 
90  orxSPAWNER_EVENT_NONE = orxENUM_NONE
91 
93 
94 
96 typedef struct __orxSPAWNER_t orxSPAWNER;
97 
98 
101 extern orxDLLAPI void orxFASTCALL orxSpawner_Setup();
102 
106 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Init();
107 
110 extern orxDLLAPI void orxFASTCALL orxSpawner_Exit();
111 
115 extern orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_Create();
116 
121 extern orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_CreateFromConfig(const orxSTRING _zConfigID);
122 
127 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Delete(orxSPAWNER *_pstSpawner);
128 
133 extern orxDLLAPI void orxFASTCALL orxSpawner_Enable(orxSPAWNER *_pstSpawner, orxBOOL _bEnable);
134 
139 extern orxDLLAPI orxBOOL orxFASTCALL orxSpawner_IsEnabled(const orxSPAWNER *_pstSpawner);
140 
141 
145 extern orxDLLAPI void orxFASTCALL orxSpawner_Reset(orxSPAWNER *_pstSpawner);
146 
152 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetTotalObjectLimit(orxSPAWNER *_pstSpawner, orxU32 _u32TotalObjectLimit);
153 
159 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetActiveObjectLimit(orxSPAWNER *_pstSpawner, orxU32 _u32ActiveObjectLimit);
160 
165 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectLimit(const orxSPAWNER *_pstSpawner);
166 
171 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectLimit(const orxSPAWNER *_pstSpawner);
172 
177 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectCount(const orxSPAWNER *_pstSpawner);
178 
183 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectCount(const orxSPAWNER *_pstSpawner);
184 
185 
191 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveSize(orxSPAWNER *_pstSpawner, orxU32 _u32WaveSize);
192 
198 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveDelay(orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay);
199 
205 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetNextWaveDelay(orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay);
206 
211 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetWaveSize(const orxSPAWNER *_pstSpawner);
212 
217 extern orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWaveDelay(const orxSPAWNER *_pstSpawner);
218 
223 extern orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetNextWaveDelay(const orxSPAWNER *_pstSpawner);
224 
225 
231 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetObjectSpeed(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvObjectSpeed);
232 
238 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetObjectSpeed(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvObjectSpeed);
239 
240 
246 extern orxDLLAPI orxU32 orxFASTCALL orxSpawner_Spawn(orxSPAWNER *_pstSpawner, orxU32 _u32Number);
247 
248 
253 extern orxDLLAPI orxFRAME *orxFASTCALL orxSpawner_GetFrame(const orxSPAWNER *_pstSpawner);
254 
255 
261 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetPosition(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvPosition);
262 
268 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetRotation(orxSPAWNER *_pstSpawner, orxFLOAT _fRotation);
269 
275 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetScale(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvScale);
276 
282 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetPosition(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition);
283 
289 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldPosition(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition);
290 
295 extern orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetRotation(const orxSPAWNER *_pstSpawner);
296 
301 extern orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWorldRotation(const orxSPAWNER *_pstSpawner);
302 
308 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetScale(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale);
309 
315 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldScale(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale);
316 
317 
323 extern orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetParent(orxSPAWNER *_pstSpawner, void *_pParent);
324 
329 extern orxDLLAPI orxSTRUCTURE *orxFASTCALL orxSpawner_GetParent(const orxSPAWNER *_pstSpawner);
330 
331 
336 extern orxDLLAPI const orxSTRING orxFASTCALL orxSpawner_GetName(const orxSPAWNER *_pstSpawner);
337 
338 #endif /* _orxSPAWNER_H_ */
339 
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetRotation(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveSize(orxSPAWNER *_pstSpawner, orxU32 _u32WaveSize)
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxSpawner_GetParent(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetObjectSpeed(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvObjectSpeed)
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectLimit(const orxSPAWNER *_pstSpawner)
struct __orxFRAME_t orxFRAME
Definition: orxFrame.h:110
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetPosition(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Init()
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectCount(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectLimit(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetScale(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetRotation(orxSPAWNER *_pstSpawner, orxFLOAT _fRotation)
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWorldRotation(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxU32 orxFASTCALL orxSpawner_Spawn(orxSPAWNER *_pstSpawner, orxU32 _u32Number)
orxDLLAPI void orxFASTCALL orxSpawner_Exit()
orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI const orxSTRING orxFASTCALL orxSpawner_GetName(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetPosition(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition)
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWaveDelay(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetScale(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvScale)
orxSTATUS
Definition: orxType.h:256
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetNextWaveDelay(orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetTotalObjectLimit(orxSPAWNER *_pstSpawner, orxU32 _u32TotalObjectLimit)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveDelay(orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetObjectSpeed(orxSPAWNER *_pstSpawner, const orxVECTOR *_pvObjectSpeed)
orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_Create()
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetNextWaveDelay(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldScale(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale)
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldPosition(const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition)
orxDLLAPI void orxFASTCALL orxSpawner_Reset(orxSPAWNER *_pstSpawner)
orxSPAWNER_EVENT
Definition: orxSpawner.h:78
#define orxDLLAPI
Definition: orxDecl.h:370
orxDLLAPI orxFRAME *orxFASTCALL orxSpawner_GetFrame(const orxSPAWNER *_pstSpawner)
orxDLLAPI void orxFASTCALL orxSpawner_Enable(orxSPAWNER *_pstSpawner, orxBOOL _bEnable)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetParent(orxSPAWNER *_pstSpawner, void *_pParent)
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetWaveSize(const orxSPAWNER *_pstSpawner)
orxDLLAPI void orxFASTCALL orxSpawner_Setup()
struct __orxSPAWNER_t orxSPAWNER
Definition: orxSpawner.h:96
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Delete(orxSPAWNER *_pstSpawner)
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetActiveObjectLimit(orxSPAWNER *_pstSpawner, orxU32 _u32ActiveObjectLimit)
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectCount(const orxSPAWNER *_pstSpawner)
orxDLLAPI orxBOOL orxFASTCALL orxSpawner_IsEnabled(const orxSPAWNER *_pstSpawner)

Generated for orx by doxygen 1.8.11