orx  1.14
Portable Game Engine
OrxSpawner

Macros

#define orxSPAWNER_KU32_FLAG_AUTO_DELETE   0x00000001
 
#define orxSPAWNER_KU32_FLAG_AUTO_RESET   0x00000002
 
#define orxSPAWNER_KU32_FLAG_CLEAN_ON_DELETE   0x00000200
 
#define orxSPAWNER_KU32_FLAG_INTERPOLATE   0x00000400
 
#define orxSPAWNER_KU32_FLAG_NONE   0x00000000
 
#define orxSPAWNER_KU32_FLAG_USE_ALPHA   0x00000004
 
#define orxSPAWNER_KU32_FLAG_USE_COLOR   0x00000008
 
#define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_OBJECT   0x00000040
 
#define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_SPAWNER   0x00000080
 
#define orxSPAWNER_KU32_FLAG_USE_ROTATION   0x00000010
 
#define orxSPAWNER_KU32_FLAG_USE_SCALE   0x00000020
 
#define orxSPAWNER_KU32_FLAG_USE_SELF_AS_PARENT   0x00000100
 
#define orxSPAWNER_KU32_MASK_USE_RELATIVE_SPEED   0x000000C0
 
#define orxSPAWNER_KU32_MASK_USER_ALL   0x000004FF
 

Typedefs

typedef struct __orxSPAWNER_t orxSPAWNER
 

Enumerations

enum  orxSPAWNER_EVENT {
  orxSPAWNER_EVENT_SPAWN = 0, orxSPAWNER_EVENT_CREATE, orxSPAWNER_EVENT_DELETE, orxSPAWNER_EVENT_RESET,
  orxSPAWNER_EVENT_EMPTY, orxSPAWNER_EVENT_WAVE_START, orxSPAWNER_EVENT_WAVE_STOP, orxSPAWNER_EVENT_NUMBER,
  orxSPAWNER_EVENT_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_Create ()
 
orxDLLAPI orxSPAWNER *orxFASTCALL orxSpawner_CreateFromConfig (const orxSTRING _zConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Delete (orxSPAWNER *_pstSpawner)
 
orxDLLAPI void orxFASTCALL orxSpawner_Enable (orxSPAWNER *_pstSpawner, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL orxSpawner_Exit ()
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectCount (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectLimit (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxFRAME *orxFASTCALL orxSpawner_GetFrame (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI const orxSTRING orxFASTCALL orxSpawner_GetName (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetNextWaveDelay (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetObjectSpeed (const orxSPAWNER *_pstSpawner, orxVECTOR *_pvObjectSpeed)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxSpawner_GetParent (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetPosition (const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetRotation (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetScale (const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale)
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectCount (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectLimit (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWaveDelay (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetWaveSize (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldPosition (const orxSPAWNER *_pstSpawner, orxVECTOR *_pvPosition)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWorldRotation (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSpawner_GetWorldScale (const orxSPAWNER *_pstSpawner, orxVECTOR *_pvScale)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxSpawner_IsEnabled (const orxSPAWNER *_pstSpawner)
 
orxDLLAPI void orxFASTCALL orxSpawner_Reset (orxSPAWNER *_pstSpawner)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetActiveObjectLimit (orxSPAWNER *_pstSpawner, orxU32 _u32ActiveObjectLimit)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetNextWaveDelay (orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetObjectSpeed (orxSPAWNER *_pstSpawner, const orxVECTOR *_pvObjectSpeed)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetParent (orxSPAWNER *_pstSpawner, void *_pParent)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetPosition (orxSPAWNER *_pstSpawner, const orxVECTOR *_pvPosition)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetRotation (orxSPAWNER *_pstSpawner, orxFLOAT _fRotation)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetScale (orxSPAWNER *_pstSpawner, const orxVECTOR *_pvScale)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetTotalObjectLimit (orxSPAWNER *_pstSpawner, orxU32 _u32TotalObjectLimit)
 
orxDLLAPI void orxFASTCALL orxSpawner_Setup ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveDelay (orxSPAWNER *_pstSpawner, orxFLOAT _fWaveDelay)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveSize (orxSPAWNER *_pstSpawner, orxU32 _u32WaveSize)
 
orxDLLAPI orxU32 orxFASTCALL orxSpawner_Spawn (orxSPAWNER *_pstSpawner, orxU32 _u32Number)
 

Detailed Description

Spawner module Allows to spawn orxSPAWNERS Spawners derived from structures

Macro Definition Documentation

#define orxSPAWNER_KU32_FLAG_AUTO_DELETE   0x00000001

Auto delete flag

Definition at line 58 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_AUTO_RESET   0x00000002

Auto delete flag

Definition at line 59 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_CLEAN_ON_DELETE   0x00000200

Clean on delete flag

Definition at line 70 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_INTERPOLATE   0x00000400

Interpolate flag

Definition at line 71 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_NONE   0x00000000

Spawner flagsNo flags

Definition at line 56 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_ALPHA   0x00000004

Use alpha flag

Definition at line 60 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_COLOR   0x00000008

Use color flag

Definition at line 61 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_OBJECT   0x00000040

Use relative speed (object) flag

Definition at line 65 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_RELATIVE_SPEED_SPAWNER   0x00000080

Use relative speed (spawner) flag

Definition at line 66 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_ROTATION   0x00000010

Use rotation flag

Definition at line 62 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_SCALE   0x00000020

Use scale flag

Definition at line 63 of file orxSpawner.h.

#define orxSPAWNER_KU32_FLAG_USE_SELF_AS_PARENT   0x00000100

Use self as parent flag

Definition at line 69 of file orxSpawner.h.

#define orxSPAWNER_KU32_MASK_USE_RELATIVE_SPEED   0x000000C0

Use relative speed mask

Definition at line 67 of file orxSpawner.h.

#define orxSPAWNER_KU32_MASK_USER_ALL   0x000004FF

All mask

Definition at line 73 of file orxSpawner.h.

Typedef Documentation

typedef struct __orxSPAWNER_t orxSPAWNER

Internal spawner structure

Definition at line 96 of file orxSpawner.h.

Enumeration Type Documentation

Event enum

Enumerator
orxSPAWNER_EVENT_SPAWN 
orxSPAWNER_EVENT_CREATE 
orxSPAWNER_EVENT_DELETE 
orxSPAWNER_EVENT_RESET 
orxSPAWNER_EVENT_EMPTY 
orxSPAWNER_EVENT_WAVE_START 
orxSPAWNER_EVENT_WAVE_STOP 
orxSPAWNER_EVENT_NUMBER 
orxSPAWNER_EVENT_NONE 

Definition at line 78 of file orxSpawner.h.

Function Documentation

orxDLLAPI orxSPAWNER* orxFASTCALL orxSpawner_Create ( )

Creates an empty spawner

Returns
orxSPAWNER / orxNULL
orxDLLAPI orxSPAWNER* orxFASTCALL orxSpawner_CreateFromConfig ( const orxSTRING  _zConfigID)

Creates a spawner from config

Parameters
[in]_zConfigIDConfig ID @ return orxSPAWNER / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Delete ( orxSPAWNER _pstSpawner)

Deletes a spawner

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxSpawner_Enable ( orxSPAWNER _pstSpawner,
orxBOOL  _bEnable 
)

Enables/disables a spawner

Parameters
[in]_pstSpawnerConcerned spawner
[in]_bEnableEnable / disable
orxDLLAPI void orxFASTCALL orxSpawner_Exit ( )

Exits from the spawner module

orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectCount ( const orxSPAWNER _pstSpawner)

Gets spawner active object count

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Active object count
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetActiveObjectLimit ( const orxSPAWNER _pstSpawner)

Gets spawner active object limit

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Active object limit, 0 for unlimited
orxDLLAPI orxFRAME* orxFASTCALL orxSpawner_GetFrame ( const orxSPAWNER _pstSpawner)

Gets spawner frame

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxFRAME
orxDLLAPI const orxSTRING orxFASTCALL orxSpawner_GetName ( const orxSPAWNER _pstSpawner)

Gets spawner name

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxSTRING / orxSTRING_EMPTY
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetNextWaveDelay ( const orxSPAWNER _pstSpawner)

Gets spawner next wave delay

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Delay before next wave is spawned / -1 if not in wave mode
orxDLLAPI orxVECTOR* orxFASTCALL orxSpawner_GetObjectSpeed ( const orxSPAWNER _pstSpawner,
orxVECTOR _pvObjectSpeed 
)

Gets spawner object speed

Parameters
[in]_pstSpawnerConcerned spawner
[in]_pvObjectSpeedSpeed applied to every spawned object
Returns
Speed applied to every spawned object / orxNULL if none is applied
orxDLLAPI orxSTRUCTURE* orxFASTCALL orxSpawner_GetParent ( const orxSPAWNER _pstSpawner)

Gets spawner parent

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Parent (object, spawner, camera or frame) / orxNULL
orxDLLAPI orxVECTOR* orxFASTCALL orxSpawner_GetPosition ( const orxSPAWNER _pstSpawner,
orxVECTOR _pvPosition 
)

Get spawner position

Parameters
[in]_pstSpawnerConcerned spawner
[out]_pvPositionSpawner position
Returns
orxVECTOR / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetRotation ( const orxSPAWNER _pstSpawner)

Get spawner rotation

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxFLOAT (radians)
orxDLLAPI orxVECTOR* orxFASTCALL orxSpawner_GetScale ( const orxSPAWNER _pstSpawner,
orxVECTOR _pvScale 
)

Get spawner scale

Parameters
[in]_pstSpawnerConcerned spawner
[out]_pvScaleSpawner scale vector
Returns
Scale vector
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectCount ( const orxSPAWNER _pstSpawner)

Gets spawner total object count

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Total object count
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetTotalObjectLimit ( const orxSPAWNER _pstSpawner)

Gets spawner total object limit

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Total object limit, 0 for unlimited
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWaveDelay ( const orxSPAWNER _pstSpawner)

Gets spawner wave delay

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Delay between two waves / -1 if not in wave mode
orxDLLAPI orxU32 orxFASTCALL orxSpawner_GetWaveSize ( const orxSPAWNER _pstSpawner)

Gets spawner wave size

Parameters
[in]_pstSpawnerConcerned spawner
Returns
Number of objects spawned in a wave
orxDLLAPI orxVECTOR* orxFASTCALL orxSpawner_GetWorldPosition ( const orxSPAWNER _pstSpawner,
orxVECTOR _pvPosition 
)

Get spawner world position

Parameters
[in]_pstSpawnerConcerned spawner
[out]_pvPositionSpawner world position
Returns
orxVECTOR / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxSpawner_GetWorldRotation ( const orxSPAWNER _pstSpawner)

Get spawner world rotation

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxFLOAT (radians)
orxDLLAPI orxVECTOR* orxFASTCALL orxSpawner_GetWorldScale ( const orxSPAWNER _pstSpawner,
orxVECTOR _pvScale 
)

Gets spawner world scale

Parameters
[in]_pstSpawnerConcerned spawner
[out]_pvScaleSpawner world scale
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_Init ( )

Inits the spawner module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxSpawner_IsEnabled ( const orxSPAWNER _pstSpawner)

Is spawner enabled?

Parameters
[in]_pstSpawnerConcerned spawner
Returns
orxTRUE if enabled, orxFALSE otherwise
orxDLLAPI void orxFASTCALL orxSpawner_Reset ( orxSPAWNER _pstSpawner)

Resets (and disables) a spawner

Parameters
[in]_pstSpawnerConcerned spawner
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetActiveObjectLimit ( orxSPAWNER _pstSpawner,
orxU32  _u32ActiveObjectLimit 
)

Sets spawner active object limit

Parameters
[in]_pstSpawnerConcerned spawner
[in]_u32ActiveObjectLimitActive object limit, 0 for unlimited
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetNextWaveDelay ( orxSPAWNER _pstSpawner,
orxFLOAT  _fWaveDelay 
)

Sets spawner next wave delay (without affecting the normal wave delay)

Parameters
[in]_pstSpawnerConcerned spawner
[in]_fWaveDelayDelay before next wave / -1 for the current full wave delay
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetObjectSpeed ( orxSPAWNER _pstSpawner,
const orxVECTOR _pvObjectSpeed 
)

Sets spawner object speed

Parameters
[in]_pstSpawnerConcerned spawner
[in]_pvObjectSpeedSpeed to apply to every spawned object / orxNULL to not apply any speed
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetParent ( orxSPAWNER _pstSpawner,
void _pParent 
)

Sets spawner parent

Parameters
[in]_pstSpawnerConcerned spawner
[in]_pParentParent structure to set (object, spawner, camera or frame) / orxNULL
Returns
orsSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetPosition ( orxSPAWNER _pstSpawner,
const orxVECTOR _pvPosition 
)

Sets spawner position

Parameters
[in]_pstSpawnerConcerned spawner
[in]_pvPositionSpawner position
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetRotation ( orxSPAWNER _pstSpawner,
orxFLOAT  _fRotation 
)

Sets spawner rotation

Parameters
[in]_pstSpawnerConcerned spawner
[in]_fRotationSpawner rotation (radians)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetScale ( orxSPAWNER _pstSpawner,
const orxVECTOR _pvScale 
)

Sets spawner scale

Parameters
[in]_pstSpawnerConcerned spawner
[in]_pvScaleSpawner scale vector
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetTotalObjectLimit ( orxSPAWNER _pstSpawner,
orxU32  _u32TotalObjectLimit 
)

Sets spawner total object limit

Parameters
[in]_pstSpawnerConcerned spawner
[in]_u32TotalObjectLimitTotal object limit, 0 for unlimited
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxSpawner_Setup ( )

Spawner module setup

orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveDelay ( orxSPAWNER _pstSpawner,
orxFLOAT  _fWaveDelay 
)

Sets spawner wave delay

Parameters
[in]_pstSpawnerConcerned spawner
[in]_fWaveDelayDelay between two waves / -1 for deactivating wave mode
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSpawner_SetWaveSize ( orxSPAWNER _pstSpawner,
orxU32  _u32WaveSize 
)

Sets spawner wave size

Parameters
[in]_pstSpawnerConcerned spawner
[in]_u32WaveSizeNumber of objects to spawn in a wave / 0 for deactivating wave mode
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxU32 orxFASTCALL orxSpawner_Spawn ( orxSPAWNER _pstSpawner,
orxU32  _u32Number 
)

Spawns items

Parameters
[in]_pstSpawnerConcerned spawner
[in]_u32NumberNumber of items to spawn, if orxU32_UNDEFINED, the spawner's wave size will be used instead
Returns
Number of spawned items

Generated for orx by doxygen 1.8.11