C:/Documents and Settings/slap/My Documents/Visual Studio 2005/Projects/Template7/template7/template7.h File Reference

#include "stdafx.h"
#include "adll.h"
#include "t7Enums.h"

Functions

Project functions
DLLFUNC int project_load (char *csFilename)
 Load an xml file that defines the project.
DLLFUNC int project_remove ()
 Clear out the current project.
DLLFUNC int project_level_ (int i)
 Switch to a new level.
DLLFUNC int project_update ()
 Update the project for one frame.
DLLFUNC int entity_add (ENTITY *pEnt)
 Add an entity to the current level.
DLLFUNC void entity_remove (ENTITY *pEnt)
 Remove an entity (from the current level).
ENTITY_EDIT functions
DLLFUNC int entity_add_cmp (ENTITY *pEnt, int type)
 Add a component to the entity.
DLLFUNC int entity_cmp_set (ENTITY *pEnt, int cmpType, int editType, float data)
 Set the value of a single GE CMP.
DLLFUNC int entity_set_ptr (ENTITY *pEnt, int type, void *data)
 Set an entity's property using a pointer.
DLLFUNC int entity_set_vec (ENTITY *pEnt, int type, float x, float y, float z)
 Set an entity's property using a vector.
DLLFUNC int entity_set (ENTITY *pEnt, int type, float data)
 Set an entity's property using a float (or int).
DLLFUNC int entity_set_str (ENTITY *pEnt, int type, char *csName)
 Set an entity's property using a string.
Get functions
DLLFUNC int entity_get_int (ENTITY *pEnt, int editType, int *data)
DLLFUNC int entity_cmp_get_int (ENTITY *pEnt, int cmpType, int editType, int *data)
DLLFUNC int entity_get_var (ENTITY *pEnt, int editType, var *data)
DLLFUNC int entity_cmp_get_var (ENTITY *pEnt, int cmpType, int editType, var *data)
 Get a var value from a specific CMP.
DLLFUNC int entity_get_vec (ENTITY *pEnt, int editType, float *x, float *y, float *z)
 Get x,y,z values.
ENTITY_ACT functions
Parameters:
pEnt Pointer to the entity we are trying to get a value from
cmpType The component to check(see t7Cmp_ list)
editType t7Edit_ type
data Pointer to data (normally a struct).
Returns:
value less than zero on error, 0 if nothing found, positive otherwise


DLLFUNC int entity_act (ENTITY *pEnt, int actType, float data)
 Act on an entity.
DLLFUNC int entity_cmp_act (ENTITY *pEnt, int cmpType, int actType, float data)
 Act on an entity.
DLLFUNC int entity_act_vec (ENTITY *pEnt, int actType, float x, float y, float z)
 Send an action to an entity.
Animation functions
DLLFUNC void anim_reload (char *csFilename)
 Reload the animation from a file.

Detailed Description

Functions designed to be called from Lite-C code.

(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Function Documentation

DLLFUNC void anim_reload ( char *  csFilename  ) 

Reload the animation from a file.

Parameters:
csFilename Name of the file containing the animations. reload the animation
Parameters:
csFilename  reload the animation file

DLLFUNC int entity_act ( ENTITY *  pEnt,
int  actType,
float  data 
)

Act on an entity.

Parameters:
pEnt Pointer to the entity who's value we are acting on.
actType The action we are preforming (see t7EnityAct_ list).
data The float (or int) used to edit.
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_act_vec ( ENTITY *  pEnt,
int  actType,
float  x,
float  y,
float  z 
)

Send an action to an entity.

Parameters:
pEnt Pointer to the entity.
actType The action we are preforming (see t7Act_ list).
x X pos value (or pan).
y Y pos value (or tilt).
z Z pos value (or roll).
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_add ( ENTITY *  pEnt  ) 

Add an entity to the current level.

Parameters:
pEnt Pointer to the entity we are adding.
Returns:
Less than zero on error, otherwise the entity's ID number.
Add an entity to the current level
Returns:
less than zero if error, zero if the resulting GE has no associated data, otherwise the entity's ID number (positive)

DLLFUNC int entity_add_cmp ( ENTITY *  pEnt,
int  type 
)

Add a component to the entity.

Note:
The entity must already be added to the level (using entity_add()).
Parameters:
pEnt Pointer to the entity we are adding a new component to.
type The component we are adding (see t7EnityCMP_ list).
Returns:
Less than zero on error, otherwise positive.

DLLFUNC int entity_cmp_act ( ENTITY *  pEnt,
int  cmpType,
int  actType,
float  data 
)

Act on an entity.

Parameters:
pEnt Pointer to the entity who's value we are acting on.
cmpType The component to act on (see t7Cmp_ list).
actType The action we are preforming (see t7EnityAct_ list).
data The float (or int) used to edit.
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_cmp_get_int ( ENTITY *  pEnt,
int  cmpType,
int  editType,
int *  data 
)

Parameters:
pEnt Pointer to the entity we are trying to get a value from.
cmpType The component to check(see t7Cmp_ list).
editType t7Edit_ type.
data Pointer to int which will contain the value.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC int entity_cmp_get_var ( ENTITY *  pEnt,
int  cmpType,
int  editType,
var *  data 
)

Get a var value from a specific CMP.

Parameters:
pEnt Pointer to the entity we are trying to get a value from.
cmpType The component to check(see t7Cmp_ list).
editType t7Edit_ type.
data Pointer to var which will contain the value.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC int entity_cmp_set ( ENTITY *  pEnt,
int  cmpType,
int  editType,
float  data 
)

Set the value of a single GE CMP.

Parameters:
pEnt Pointer to the GE entity.
cmpType The component we are setting (see t7Cmp_ list).
editType t7Edit_ type we want to set.
data The data we are setting.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC int entity_get_int ( ENTITY *  pEnt,
int  editType,
int *  data 
)

Parameters:
pEnt Pointer to the entity we are trying to get a value from.
editType t7Edit_ type.
data Pointer to int which will contain the value.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC int entity_get_var ( ENTITY *  pEnt,
int  editType,
var *  data 
)

Parameters:
pEnt Pointer to the entity we are trying to get a value from.
editType t7Edit_ type.
data Pointer to var which will contain the value.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC int entity_get_vec ( ENTITY *  pEnt,
int  editType,
float *  x,
float *  y,
float *  z 
)

Get x,y,z values.

Parameters:
pEnt Pointer to the entity we are trying to get a value from.
editType t7Edit_ type.
x X value.
y Y value.
z Z value.
Returns:
value less than zero on error, 0 if nothing found, positive otherwise.

DLLFUNC void entity_remove ( ENTITY *  pEnt  ) 

Remove an entity (from the current level).

Parameters:
pEnt Pointer to the entity we want to remove.

DLLFUNC int entity_set ( ENTITY *  pEnt,
int  type,
float  data 
)

Set an entity's property using a float (or int).

Parameters:
pEnt Pointer to the entity who's value we are editing.
type The edit we are preforming (see t7Edit_ list).
data The float (or int) used to edit.
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_set_ptr ( ENTITY *  pEnt,
int  type,
void *  data 
)

Set an entity's property using a pointer.

Parameters:
pEnt Pointer to the entity who's value we are editing.
type The edit we are preforming (see t7Edit_ list).
data The data used to preform the action.
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_set_str ( ENTITY *  pEnt,
int  type,
char *  csName 
)

Set an entity's property using a string.

Parameters:
pEnt Pointer to the entity who's value we are editing.
type The edit we are preforming (see t7Edit_ list).
csName Pointer to an array of characters.
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int entity_set_vec ( ENTITY *  pEnt,
int  type,
float  x,
float  y,
float  z 
)

Set an entity's property using a vector.

Parameters:
pEnt Pointer to the entity who's value we are editing.
type The edit we are preforming (see t7Edit_ list).
x X pos value (or pan).
y Y pos value (or tilt).
z Z pos value (or roll).
Returns:
Less than zero on error, otherwise the entity's ID number.

DLLFUNC int project_level_ ( int  i  ) 

Switch to a new level.

Parameters:
i Index of the level we want to switch to.
Returns:
Index of the level we switched to, or neg value on error.
switch to a new level
Note:
postfixed '_' because we want users to call project_level() (which includes a wait(1))

DLLFUNC int project_load ( char *  csFilename  ) 

Load an xml file that defines the project.

Parameters:
csFilename Name of the file used to define the project.
Returns:
Negitive value on error, otherwise the number of levels in this project.

DLLFUNC int project_update (  ) 

Update the project for one frame.

Returns:
Positive value if there was an update, 0 if nothing to update.


Generated on Fri Dec 28 12:55:06 2007 for template7 by  doxygen 1.5.4