/*=========================================================================
* Objinit.h :       Object initialzed init.
* 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(__OBJINIT_H__)
#define __OBJINIT_H__
 
/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000 */
/******************************************/
 
#include "GAM/Header.h"
#include "InitEnum.h"
 
#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
 
/*
 * variables of the above types are here
 */
 
void fn_vDestroyAllHierarchy(HIE_tdxHandleToSuperObject p_stSuperObject);
 
/**** Allocate Object and SuperObject ****/
HIE_tdxHandleToSuperObject fn_p_stAllocateEngineSuperObject(FILE *p_stHandle,tdObjectType otObjectFamilyType,tdObjectType otObjectModelType,tdObjectType otObjectPersonalType);
HIE_tdxHandleToSuperObject fn_p_stFreeEngineSuperObject(HIE_tdxHandleToSuperObject p_stSuperObject);
 
/**** Allocate Object ****/
struct tdstEngineObject_ *fn_p_stAllocateEngineObject(FILE *p_stHandle,tdObjectType otObjectFamilyType,tdObjectType otObjectModelType,tdObjectType otObjectPersonalType);
struct tdstEngineObject_ *fn_p_stFreeEngineObject(struct tdstEngineObject_ *p_stTempObject);
 
/**** Init for object ****/
void fn_vDesinitOneObject(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjIniType);
 
void fn_vForceActiveAnObject(struct tdstEngineObject_ *p_stObject);
void fn_vActiveAnObject(struct tdstEngineObject_ *p_stObject);
void fn_vDesactiveAnObject(struct tdstEngineObject_ *p_stObject);
 
void fn_vKillEngineObjectNotAlways(struct tdstEngineObject_ *p_stObject);
void fn_vKillEngineObjectOrAlwaysByPointer(struct tdstEngineObject_ *p_stObject);
void fn_vKillEngineObjectOrAlwaysByPersonalType(tdObjectType otPersonalType);
 
void fn_vInitAllObjectsWhenNewGameStart(void);
void fn_vInitAllObjectsWhenMapJustLoaded(void);
void fn_vInitAllObjectsWhenSavedGameJustLoaded(void);
void fn_vInitObjectsWhenPlayerChangeSector(HIE_tdxHandleToSuperObject hCharacter,HIE_tdxHandleToSuperObject hCurrentSector,HIE_tdxHandleToSuperObject hPreviousSector);
void fn_vForceReinitAllObjects(void);
void fn_vSnifThePlayerIsDead(void);
/*void fn_vSnifThePlayerIsDeadWithOption(ACP_tdxBool _bSpecialPositionUse);*/
void fn_vSnifThePlayerIsDeadWithResurrectionAt(HIE_tdxHandleToSuperObject _hCharacterPositionOne,HIE_tdxHandleToSuperObject _hCharacterPositionTwo);
void fn_vInitAllObjectsWhenPlayerDead(void);
 
void fn_vInitAllObjectTree(enum tdeObjectTreeInit_ eObjIniType,HIE_tdxHandleToSuperObject p_stSupObject);
/**** For editors */
extern CPA_EXPORT void fn_vAddChildToSuperObject(HIE_tdxHandleToSuperObject hChild,char *szFamily,char *szModel,char *szPersonal);
extern CPA_EXPORT void fn_vInitOneObject(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjIniType);
 
#if defined(__cplusplus)
}
#endif /* __cplusplus */
 
#endif /* __OBJINIT_H__ */
