Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Macros | Typedefs | Functions
OBJGEN

Object Generator. More...

Data Structures

struct  _T_objectGenerator
 
struct  T_objectGeneratorHandleStruct
 

Macros

#define GENERATOR_DEAD_TAG   "DoG"
 
#define GENERATOR_TAG   "OGn"
 

Typedefs

typedef struct _T_objectGenerator T_objectGenerator
 

Functions

T_void GeneratorAddGenerator (T_word16 objectType, T_sword16 x, T_sword16 y, T_word16 angle, T_word16 timeBetween, T_word16 randomTimeBetween, T_word16 maxObjects, T_word16 maxLikeObjects, E_Boolean isActive, T_sword16 maxGenerate, T_word16 specialEffect)
 
T_void ObjectGeneratorActivate (T_word16 genID)
 
T_objectGeneratorHandle ObjectGeneratorCreateHandle (T_void)
 
T_void ObjectGeneratorDeactivate (T_word16 genID)
 
T_void ObjectGeneratorDestroyHandle (T_objectGeneratorHandle handle)
 
T_void ObjectGeneratorGetHandle (T_objectGeneratorHandle handle)
 
T_word16 ObjectGeneratorGetList (T_word16 objectType, T_objectGeneratorPosition *p_list, T_word16 maxList)
 
T_void ObjectGeneratorLoad (T_word32 mapNumber)
 
T_void ObjectGeneratorSetHandle (T_objectGeneratorHandle handle)
 
T_void ObjectGeneratorUnload (T_void)
 
T_void ObjectGeneratorUpdate (T_void)
 

Detailed Description

Object Generator.

The object generator is a special place on a map that generates one or more items or creatures when activated. It uses the tell tale teleporter sound as it generates objects.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Macro Definition Documentation

#define GENERATOR_DEAD_TAG   "DoG"
#define GENERATOR_TAG   "OGn"

Typedef Documentation

Function Documentation

T_void GeneratorAddGenerator ( T_word16  objectType,
T_sword16  x,
T_sword16  y,
T_word16  angle,
T_word16  timeBetween,
T_word16  randomTimeBetween,
T_word16  maxObjects,
T_word16  maxLikeObjects,
E_Boolean  isActive,
T_sword16  maxGenerate,
T_word16  specialEffect 
)
T_void ObjectGeneratorActivate ( T_word16  genID)
T_objectGeneratorHandle ObjectGeneratorCreateHandle ( T_void  )
T_void ObjectGeneratorDeactivate ( T_word16  genID)
T_void ObjectGeneratorDestroyHandle ( T_objectGeneratorHandle  handle)
T_void ObjectGeneratorGetHandle ( T_objectGeneratorHandle  handle)
T_word16 ObjectGeneratorGetList ( T_word16  objectType,
T_objectGeneratorPosition p_list,
T_word16  maxList 
)
T_void ObjectGeneratorLoad ( T_word32  mapNumber)

ObjectGeneratorLoad loads up and starts the object generators for the given level.

Parameters
mapNumber– Number of the map to load obj gens for.
T_void ObjectGeneratorSetHandle ( T_objectGeneratorHandle  handle)
T_void ObjectGeneratorUnload ( T_void  )

ObjectGeneratorUnload gets rid of all generators for this object.

T_void ObjectGeneratorUpdate ( T_void  )

ObjectGeneratorUpdate checks to see if a second has gone by. If one has, all the generators are updated. Those generators that have had enough time go by will attempt to generate. The process then starts over.