/*=========================================================================
* ObjType.h : This module contain all object's type functions
* This is a part of the Game project.
*
* Version                      1.0
* Creation date        20/08/96
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1996
*=======================================================================*/
#if !defined(__OBJTYPE_H__)
#define __OBJTYPE_H__
 
/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000 */
/******************************************/
 
#include "GAM/Header.h"
 
#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
 
typedef struct tdstObjectTypeElement_ *tdhHandleToObjectTypeElement;
 
LST2_M_DynamicUseListOf(tdhHandleToObjectTypeElement);
 
typedef struct tdstObjectTypeElement_
{
 LST2_M_DynamicElementDeclaration(tdhHandleToObjectTypeElement)
 char *szName;
 unsigned char ucElementPriority;
} tdstObjectTypeElement;
 
typedef struct tdstObjectType_
{
 LST2_M_DynamicAnchorDeclaration(tdhHandleToObjectTypeElement) hFamilyType;
 LST2_M_DynamicAnchorDeclaration(tdhHandleToObjectTypeElement) hModelType;
 LST2_M_DynamicAnchorDeclaration(tdhHandleToObjectTypeElement) hPersonalType;
} tdstObjectType;
 
 
/**********************************/
/**** Two modes used functions ****/
/**********************************/
void fn_vFirstInitObjectTypeStructure();
void fn_vLastDesinitObjectTypeStructure();
extern CPA_EXPORT struct tdstEngineObject_ *fn_p_stFindObjectByItsPersonalType(tdObjectType otPersonalType,HIE_tdxHandleToSuperObject p_stSuperObject);
 
/***************************************/
/**** mode with name used functions ****/
/***************************************/
 
/**** Family type ****/
extern CPA_EXPORT tdObjectType fn_otFindOrAddFamilyTypeOfFamilyTypeName(char *szFamilyType);
extern CPA_EXPORT tdObjectType fn_otFindFamilyTypeOfFamilyTypeName(char *szFamilyType);
extern CPA_EXPORT char *fn_szFindFamilyTypeNameOfFamilyType(tdObjectType otFamilyType);
extern CPA_EXPORT void fn_vChangeFamilyTypeNameOfFamilyType(tdObjectType _otFamilyType,char *_szNewName);
 
/**** Model type ****/
extern CPA_EXPORT tdObjectType fn_otFindOrAddModelTypeOfModelTypeName(char *szModelType);
extern CPA_EXPORT tdObjectType fn_otFindModelTypeOfModelTypeName(char *szModelType);
extern CPA_EXPORT char *fn_szFindModelTypeNameOfModelType(tdObjectType otModelType);
extern CPA_EXPORT void fn_vChangeModelTypeNameOfModelType(tdObjectType _otModelType,char *_szNewName);
 
/**** Personal type ****/
extern CPA_EXPORT tdObjectType fn_otFindOrAddPersonalTypeOfPersonalTypeName(char *szPersonalType);
extern CPA_EXPORT tdObjectType fn_otFindPersonalTypeOfPersonalTypeName(char *szPersonalType);
extern CPA_EXPORT char *fn_szFindPersonalTypeNameOfPersonalType(tdObjectType otPersonalType);
extern CPA_EXPORT void fn_vChangePersonalTypeNameOfPersonalType(tdObjectType _otPersonalType,char *_szNewName);
 
extern CPA_EXPORT struct tdstEngineObject_ *fn_p_stFindObjectByItsPersonalTypeName(char *szPersonalType,HIE_tdxHandleToSuperObject p_stSuperObject);
 
extern CPA_EXPORT void fn_vFreeAllObjectTypeForPriority(unsigned char ucPriority);
 
EXTERN tdstObjectType g_stObjectTypes;
 
#if defined(__cplusplus)
}
#endif /* __cplusplus */
 
#endif /* __OBJTYPE_H__ */
 
