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

Animation for Maps Configuration. More...

Data Structures

struct  T_mapAnimHeaderStruct
 
struct  T_mapAnimInitState
 
struct  T_mapAnimSector
 
struct  T_mapAnimSectorState
 
struct  T_mapAnimSide
 
struct  T_mapAnimSideState
 
struct  T_mapAnimStates
 
struct  T_mapAnimWall
 
struct  T_mapAnimWallState
 

Macros

#define MAP_ANIM_INIT_STATE_TYPE_SECTOR   2
 
#define MAP_ANIM_INIT_STATE_TYPE_SIDE   0
 
#define MAP_ANIM_INIT_STATE_TYPE_UNKNOWN   3
 
#define MAP_ANIM_INIT_STATE_TYPE_WALL   1
 
#define MAP_ANIMATION_DEAD_TAG   (*((T_word32 *)"dMaN"))
 
#define MAP_ANIMATION_TAG   (*((T_word32 *)"MpAn"))
 

Typedefs

typedef T_byte8 T_mapAnimInitStateType
 

Functions

E_Boolean MapAnimateGetWallDamage (T_mapAnimation mapAnimation, T_3dObject *p_obj, T_word16 *p_damageAmount, T_byte8 *p_damageType)
 
T_mapAnimation MapAnimateLoad (T_word32 number)
 
T_void MapAnimateStartSector (T_mapAnimation mapAnimation, T_word16 sectorNum, T_word16 stateNumber)
 
T_void MapAnimateStartSide (T_mapAnimation mapAnimation, T_word16 sideNum, T_word16 stateNumber)
 
T_void MapAnimateStartWall (T_mapAnimation mapAnimation, T_word16 wallNum, T_word16 stateNumber)
 
T_void MapAnimateUnload (T_mapAnimation mapAnimation)
 
T_void MapAnimateUpdate (T_mapAnimation mapAnimation)
 

Detailed Description

Animation for Maps Configuration.

Because we wanted more animation effects than provided in the Deep 97 editor, we created .ANI files to store additional information about a map. Light, wall, and floor animations are provided here. It would be nice that when a text based editor is used, these are loaded as just properties on walls/sectors.

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

Macro Definition Documentation

#define MAP_ANIM_INIT_STATE_TYPE_SECTOR   2
#define MAP_ANIM_INIT_STATE_TYPE_SIDE   0
#define MAP_ANIM_INIT_STATE_TYPE_UNKNOWN   3
#define MAP_ANIM_INIT_STATE_TYPE_WALL   1
#define MAP_ANIMATION_DEAD_TAG   (*((T_word32 *)"dMaN"))
#define MAP_ANIMATION_TAG   (*((T_word32 *)"MpAn"))

Typedef Documentation

Function Documentation

E_Boolean MapAnimateGetWallDamage ( T_mapAnimation  mapAnimation,
T_3dObject p_obj,
T_word16 p_damageAmount,
T_byte8 p_damageType 
)

MapAnimateGetWallDamage takes an object and returns a damage type and damage amount. The routine is used to determine if an object is on a damage wall. If it is, this routine returns TRUE.

NOTE: The passed in object must have its area sectors correctly resolved.

Parameters
mapAnimation– MapAnimation to check
p_obj– Pointer to object to consider
p_damageAmount– where to return found damage amount
p_damageType– Returned damage type
Returns
TRUE if any type of damage here.
T_mapAnimation MapAnimateLoad ( T_word32  number)

MapAnimateLoad loads in a map animation record for the system.

NOTE: This routine MUST be called AFTER loading the map, NOT BEFORE.

Parameters
number– Number of map animation to load
Returns
Map animation handle
T_void MapAnimateStartSector ( T_mapAnimation  mapAnimation,
T_word16  sectorNum,
T_word16  stateNumber 
)

MapAnimateStartSector prepares a sector to go into the given animation state. If the sector is already animating, this routine also aborts the previous state for the new given state.

NOTE: You have to be careful when you have this called. Repeat calls DO reinitialize the state to zero.

Parameters
mapAnimation– Aninmationp of animations
sectorNum– Pointer to animation sector in effect
stateNumber– State number to become.
T_void MapAnimateStartSide ( T_mapAnimation  mapAnimation,
T_word16  sideNum,
T_word16  stateNumber 
)

MapAnimateStartSide prepares a side to go into the given animation state. If the side is already animating, this routine also aborts the previous state for the new given state.

NOTE: You have to be careful when you have this called. Repeat calls DO reinitialize the state to zero.

Parameters
mapAnimation– Aninmationp of animations
sideNum– Pointer to animation side in effect
stateNumber– State number to become.
T_void MapAnimateStartWall ( T_mapAnimation  mapAnimation,
T_word16  wallNum,
T_word16  stateNumber 
)

MapAnimateStartWall prepares a wall to go into the given animation state. If the wall is already animating, this routine also aborts the previous state for the new given state.

NOTE: You have to be careful when you have this called. Repeat calls DO reinitialize the state to zero.

Parameters
mapAnimation– Aninmationp of animations
wallNum– Pointer to animation wall in effect
stateNumber– State number to become.
T_void MapAnimateUnload ( T_mapAnimation  mapAnimation)

MapAnimateUnload deletes all data associated with this map animation.

Parameters
mapAnimation– Map animation to unload
T_void MapAnimateUpdate ( T_mapAnimation  mapAnimation)

MapAnimateUpdate goes through its list of things to animate and does them.

Parameters
mapAnimation– Map animation to update