/*========================================================================= * InitEng.c : Contain all engine initialized 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 *=======================================================================*/ /* *======================================================================= Modifications: New LST_M_??? Macros / Michaël / 070297 *=======================================================================*/ #include "Options/Options.h" #define D_Micro_StructureDefine #define D_StdGame_StructureDefine #if defined (GAM_USE_SCRIPT) #define AI_USE_SCRIPT #endif /* GAM_USE_SCRIPT*/ #include "ToolsCPA.h" #include "AI/AIBase/ReadRule.h" #include "AI/AIBase/WPWayPt.h" #include "Options/Opt_Info.h" #include "Macros.h" #include "actions\MS_micro.h" #include "Actions/AllActs.h" #include "Structur/3DOSLkTb.h" #include "Structur/EngMode.h" #include "Structur/ErrGame.h" #include "Structur/MemGame.h" #include "Structur/Input_S.h" #include "structur/Objects.h" #include "Structur/StdObjSt.h" #include "Structur/GameScpt.h" #include "Structur/State.h" #include "Main.h" #include "Always.h" #include "Basic.h" #include "Clock.h" #include "DspFix.h" #include "Family.h" #include "GameEng.h" #include "GamOpt.h" #include "GamSave.h" /*#include "GamExtra.h"*/ #include "InitEng.h" #include "Input.h" #include "LoadAni.h" #define C_A3BOFF "CPA_A3BOFF" /*#include "LoadBin.h"*/ #include "LoadGame.h" #include "LoadLvl.h" #include "MainChar.h" #include "ObjInit.h" #include "ObjType.h" #include "ZdxStuff.h" #include "ZeMem.h" #include "Toolcam.h" #include "Effect.h" #include "Micros.h" #include "PlayAnim/PlayAnim.h" #include "TBLLoad.h" #include "CHLLoad.h" #include "Typecam.h" #include "Structur/Anim_s.h" /*#include "LoadA3b.h"*/ /*XB980824*/ #ifndef D_THROW_MGT #include "MGT.h" #endif /* D_THROW_MGT */ /*End XB*/ /* 007*/ #include "GLD.h" #ifdef GAM_USE_SNA #include "SNA.h" #define D_IPT_Input_StructureDefine #ifdef USE_IPT_DX5 #include "INO_DX5.h" #include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/ #include "ipt_dx5\ipt_kdef.h" #include "ipt_dx5\ipt_str.h" #else /* USE_IPT_WIN */ #include "INO.h" #include "IPT.h" /* InPuT (absolutely before GAM.h)*/ #include "ipt\ipt_kdef.h" #include "ipt\ipt_str.h" #endif /* USE_IPT_WIN */ #undef D_IPT_Input_StructureDefine #include "PlayAnim/Interpol/a3x_mem.h" #include "PlayAnim/Interpol/a3x_glob.h" #include "locale\fonfont.h" #endif /* GAM_USE_SNA */ #if (!defined(U64)) #include "tex.h" #endif /* !U64 */ #include "ia_dnm.h" #include "Actions/AllActs.h" #include "structur/Objects.h" #include "textfrmt.h" #include "LSMem.h" #include "LipsSync.h" #include "LoadLSyn.h" #ifdef GAM_USE_SNA #include "sna\SNAsyn.h" #endif /* GAM_USE_SNA */ #ifdef ACTIVE_EDITOR /* use SAI save with editors */ ACP_tdxBool g_bUseSAIWithEditor=FALSE; #endif /* ACTIVE_EDITOR */ #include "AGO.h" #include "PRF.h" #if (defined(USE_PROFILER) && !defined(PRESS_DEMO) && !defined(U64)) extern void GAM_fn_vRasterDisplayInit (); extern void GAM_fn_vRasterDumpInit (); extern void GAM_fn_vRasterDumpReset (); extern void GAM_fn_vRasterDumpDesInit (); #endif /* USE_PROFILER && PRESS_DEMO && !U64 */ /* XB 23/06/99 */ #ifdef U64 #include "ldd.h" #endif /* U64 */ /* XB 23/06/99 */ /* XB 05/05/99 */ extern void GAM_fn_vLoadInitialAnimations(void); extern void CAM_fn_vForceBestPosition(HIE_tdxHandleToSuperObject _hCamera); #ifdef U64 #include "..\..\TempGrp\INO\Specif\u_demo.h" #endif /* U64 */ /* End XB */ #ifndef U64 #include "PTC.h" #endif extern struct tdstIndexMicrosList_ g_stIndexMicrosList; extern HIE_tdxHandleToSuperObject g_hCharacterLauchingSoundEvents; #ifdef RETAIL #ifndef _FIRE_DEADCODE_U64_ /* Added by RUC 04/06/99 */ struct tdst_EntryActions_ st_Tmp_3DOS_EntryActions; #endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC 04/06/99 */ #endif /* RETAIL */ #ifdef GAM_VIGNETTE extern struct VIG_tdstVignetteStructure_ *VIG_g_aDEF_pstVignetteTable[VIG_C_lVignetteMaxNb]; extern ACP_tdxIndex VIG_g_xVignetteNb; #endif /* GAM_VIGNETTE */ extern GEO_tdxHandleToMatrix HIE_g_a_hMatrixStack[HIE_C_lMaxMatrixInStack]; extern long HIE_g_lNbMatrixInStack ; extern struct VIG_tdstVignetteStructure_ *p_stBackGround; extern ACP_tdxHandleOfMaterial g_hShadowPolygonVisualMaterial; extern GMT_tdxHandleToGameMaterial g_hShadowPolygonGameMaterialInit; extern GMT_tdxHandleToGameMaterial g_hShadowPolygonGameMaterial; extern GLI_tdstTexture *g_p_stTextureOfTextureShadow; extern ACP_tdxHandleOfElement g_p_hHandleOfElementForShadow[SHW_C_xNbMaxOfShadows]; extern ACP_tdxHandleOfObject p_hHandleOfGeometricShadowObject[SHW_C_xNbMaxOfShadows]; /* ANNECY AV DEMO {*/ #ifndef U64 #include "Specif/Demos.h" extern DEMO_tdxHandleToDemoSOList g_hDemoSOList; extern DEMO_tdxHandleToDemoGMTList g_hDemoGMTFixList; extern DEMO_tdxHandleToDemoGMTList g_hDemoGMTLevelList; #endif /* END ANNECY AV }*/ #ifndef _FIRE_DEADCODE_U64_ ACP_tdxBool g_xA3bOff=FALSE; #endif /* _FIRE_DEADCODE_U64_ */ /*extern ACP_tdxBool g_bUseBinaryData;*/ /*extern HIE_tdxHandleToSuperObject g_hLoadedSuperObjectRoot;*/ #ifndef U64 HIE_tdxHandleToSuperObject g_hLoadedSuperObjectRoot=NULL; #endif BOOL bFirst=TRUE; ACP_tdxBool g_bBeginMapSoundEventFlag=FALSE; /* for sound*/ extern void MOR_fn_vRemoveAllMorphedObjects (void); #if !defined(U64) && defined(_DEBUG) extern unsigned char g_ucSlowDownEngine; extern unsigned char g_ucSlowDownTime; #endif /* !U64 && _DEBUG */ extern POS_tdstCompletePosition *POS_g_p_stIdentityMatrix; #ifndef _FIRE_DEADCODE_U64_ #if defined(GAM_USE_SNA) /** * GuS (14/09/98) * Init all objects in the fix. * This is normally done later by InitAllObjectWhenMapJustLoaded() * but we need to do the init BEFORE saving those objets. */ void fn_vInitObjectsInTheFix() { unsigned long ulI; for( ulI=0; ulIh_StandardGame ); } } void fn_vSaveFix(BOOL bFixLevel) { int i; char szFileName[255]; char szLevelSnapshotFilename[_MAX_PATH]; SNA_fn_vSetSaveLoadFix(); /* FIX.SNA : binary data for the fix*/ sprintf(szLevelSnapshotFilename,"%s\\Fix.sna",fn_szGetLevelsDataPath()); if (bFixLevel) { GLI_vEndofGeometricLoad(); /* Save the blocks defined in the array "ucModuleBlocToAvoidFixGlide" in SNA\Snammg.c*/ SNA_fn_vWriteAllMemoryBlocks(szLevelSnapshotFilename); } { /* Fix.ptx: file of the global pointers used in GLI for the textures*/ sprintf(szLevelSnapshotFilename,"%s\\Fix.ptx",fn_szGetLevelsDataPath()); TEX_SetNameOfBinaryFile((unsigned char *)szLevelSnapshotFilename); /* Fix.gpt: file of the global pointers */ sprintf(szFileName,"%s\\Fix.gpt",fn_szGetLevelsDataPath()); SNA_fn_xWriteOpenGlobalPointersFile(szFileName); /* Save the address of the identity matrix in Fix.gpt*/ SNA_fn_vWritePointerInGlobalPointersFile((unsigned long)POS_g_p_stIdentityMatrix); /* Save the content of the matrix stack and the number of matrix in the stack*/ for (i=0;iulType = POS_C_ulIdentityMatrixFlag; MTH3D_M_vNullVector(&(POS_g_p_stIdentityMatrix->stTranslationVector)); MTH3D_M_vSetIdentityMatrix(&(POS_g_p_stIdentityMatrix->stRotationMatrix)); MTH3D_M_vSetIdentityMatrix(&(POS_g_p_stIdentityMatrix->stTransformMatrix)); for (i=0;ip_stAlwaysObject); if ( p_stLinkValue ) { char szSectionName[SCR_CV_ui_Cfg_MaxLenName],szAction[SCR_CV_ui_Cfg_MaxLenName],szId[SCR_CV_ui_Cfg_MaxLenName]; // construct section name (hack: szSectionName is here as an anti-bug for ...Split... SCR_fn_v_RdL0_SplitSectionName(SCR_M_p_sz_Link_GetKey(p_stLinkValue), szSectionName, szAction, szId); bFoundSome = TRUE; if ( strlen(p_szTxt) + strlen(szId) + 3 >= ulAllocatedSize ) /* both strings, the tab, the CR/LF, and the terminator */ { ulAllocatedSize += strlen(szId) * 3; p_szTxt = realloc(p_szTxt, ulAllocatedSize); } strcat(p_szTxt, "\t"); strcat(p_szTxt, szId); strcat(p_szTxt, "\n"); } } if ( bFoundSome ) { MessageBox(NULL, p_szTxt, "Pour info", MB_OK|MB_ICONWARNING); } free(p_szTxt); } #endif /* ACTIVE_EDITOR */ #ifdef U64 fn_vForceReinitAllObjects(); #endif } void SPO_ReinitSuperimposedArray (void) ; /*----------------------------------------------------------------------------- * Description : It is the initialization of the engine when Game just dead *----------------------------------------------------------------------------- * Input : * Output : *----------------------------------------------------------------------------- * Creation date : 27/08/96 Author : Francois *----------------------------------------------------------------------------- * Modification date : Modification Author : * Modifications : *---------------------------------------------------------------------------*/ void fn_vInitDeadLoop() { SND_tduRefEvt uSoundEvent; /**** Trame counter ****/ g_stEngineStructure.stEngineTimer.ulTrameNumber = 0; g_stEngineStructure.bEngineFrozen = 0; /* by default all characters are handled normally*/ /* Begin Shaitan ModeLook*/ g_stEngineStructure.cCameraMode = C_CamModeNormal; /* by default the mode is normal*/ /* End Shaitan ModeLook*/ #ifdef U64 /* FQ FADE*/ /*fn_vFadeIn();*/ /*////////////*/ #endif fn_vStartEngineClock(); fn_vReinitTheStaticHierarchie(SECT_hFatherSector); CAM_fn_vActualizeAViewport(CAM_e_MainViewport); if ( g_stEngineStructure.eEngineMode!=EM_ModeEnterLevel && g_stEngineStructure.eEngineMode!=EM_ModeEnterGame ) { /* ANNECY MT - 28/08/98 {*/ HIE_tdxHandleToSuperObject hMaincharacter = MC_fn_hGetCharacterInMainCharacterNode( MC_fn_hGetFirstMainCharNode() ); /**** DFM 12/02/98*/ /* if the main character has 0 hitpoints left, we reinit the map as if it was just loaded */ if ( fn_ucStandardGameGetHitPoints ( M_GetMSHandle(hMaincharacter, StandardGame) ) > 0 ) { SAI_fn_bInitAllWhen(SAI_eInitWhenPlayerDead) ; fn_vInitAllObjectsWhenPlayerDead(); /* * reactivate all IPT entries that might have been deactivated by the AI of some characters * since it is also called by fn_vReinitTheMap(), it is useless to do this when we call it, like just below */ IPT_fn_vActivateAllEntryElements ( ) ; } else { fn_vReinitTheMap() ; /*SAI_fn_bInitAllWhen(SAI_eInitWhenMapLoaded) ; fn_vInitAllObjectsWhenMapJustLoaded();*/ } if(g_stEngineStructure.bResurection) { /* restore main character initial position*/ if(hMaincharacter) { POS_fn_vCopyMatrix ( fn_p_st3dDataGetMatrixInit(M_GetMSHandle(hMaincharacter,3dData)), &g_stEngineStructure.stMainCharacterPosition ); } /* restore main camera initial position*/ if(g_stEngineStructure.h_StdCamCaracter) { POS_fn_vCopyMatrix ( fn_p_st3dDataGetMatrixInit(M_GetMSHandle(g_stEngineStructure.h_StdCamCaracter,3dData)), &g_stEngineStructure.stMainCameraPosition ); } } g_stEngineStructure.bResurection = FALSE; /* END ANNECY MT }*/ g_hSOCurrentMainSector = NULL; /* * Reinit Fog and sinus effect */ GLI_cGlobalFogIsOn = 0; GLI_vInitWaterplaneModule(); } /* Oliv' - ??? - E3*/ fn_vReputCharacterSuperObjectAtTheWorld(MC_fn_hGetCharacterInMainCharacterNode( MC_fn_hGetFirstMainCharNode())); /* Oliv' - 18/11/1998 - C'est trop tard ici car les objets dans le tableau n'existent plus*/ /* -> voir fn_vDesInitLevelLoop() dans Initeng.cxx*/ /* SPO_ReinitSuperimposedArray();*/ /*////////////////////////////////*/ /* FQ OVR :*/ #ifdef U64 #ifndef _FIRE_DEADCODE_U64_ /* Added by XB */ // Desinit the Memory Holes List MMG_fn_vReinit_FreeMemoryBlocks(); M_PrintfN64(( "MMG_fn_vReinit_FreeMemoryBlocks() called !\n" )); #endif /* _FIRE_DEADCODE_U64_ */ /* Added by XB */ //XB //SHW_fn_vReInitShadowForMapChange is now called in LoadLevel not in InitDeadLoop // Reinit for shadows // SHW_fn_vReInitShadowForMapChange(); //End XB #endif /* U64 */ /* END FQ OVR*/ /*////////////////////////////////*/ if( g_stEngineStructure.eEngineMode==EM_ModeDeadLoop && g_bBeginMapSoundEventFlag ) { uSoundEvent.pstPtr = GAM_p_stGetBlockEventSlotMemory(0); SND_fn_lSendRequestSound(SND_C_OBJET_FANTOME,g_lSoundObjectTypeMusic,uSoundEvent,0,NULL); } } /*----------------------------------------------------------------------------- * Description : It is the desinitialization of the engine when Game just dead *----------------------------------------------------------------------------- * Input : * Output : *----------------------------------------------------------------------------- * Creation date : 27/08/96 Author : Francois *----------------------------------------------------------------------------- * Modification date : Modification Author : * Modifications : *---------------------------------------------------------------------------*/ void fn_vDesInitDeadLoop() { /* fbolefeysot - 25/08/98*/ /* replace the link reinit . before, it was done only for Raymond, now, it is made for all actors*/ /* fn_vReputCharacterSuperObjectAtTheWorld(MC_fn_hGetCharacterInMainCharacterNode(MC_fn_hGetFirstMainCharNode()));*/ fn_vDestructAllFatherSonLinks(); /*END fbolefeysot}*/ fn_vKillAllAlways(); AGO_vInit(); #if (defined(USE_PROFILER) && !defined(PRESS_DEMO) && !defined(U64)) GAM_fn_vRasterDumpReset (); #endif } /**************************************************************************/ #ifndef _FIRE_DEADCODE_U64_ /* Added by RUC 04/06/99 */ void fn_vInitAllLinkTables(void) { #if defined(GAM_USE_SCRIPT) /**** Those link-tables are for the editors and for the engine ****/ SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stACZ); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stAnimation); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stCharacter); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stState); SCR_fn_v_Link_InitTable(&g_stComportLinkTable); SCR_fn_v_Link_InitTable(CHL_fn_p_stGetLinkTable()); SCR_fn_v_Link_InitTable(TBL_fn_p_stGetLinkTable()); /**** Those link-tables are only used by the editors ****/ #if defined(ACTIVE_EDITOR)/*||defined(BIN_SaveBin)*/ SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stACZList); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stCharacterZone); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stLipsSynchroList); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stZDXList); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stPrtGenLinkTable); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stPrtSrcLinkTable); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stPrtSysLinkTable); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stPrtSysSpriteLinkTable); SCR_fn_v_Link_InitTable(&g_st3DOSLinkTable.stPrtEnvLinkTable); #endif /* ACTIVE_EDITOR */ /**** Those link-tables are not already defined (editors and/or engine) ****/ SCR_fn_v_Link_InitTable(CS_fn_p_stGetLinkTable()); SCR_fn_v_Link_InitTable(DNM_fn_p_stGetLinkTableOfMecMatCharacteristics()); SCR_fn_v_Link_InitTable(DNM_fn_p_stGetLinkTableOfIdCard()); /* SCR_fn_v_Link_InitTable(GLI_p_stGetLinkTableOfGeometric()); // already initialized*/ SCR_fn_v_Link_InitTable(GLI_p_stGetLinkTableOfVisualMaterial()); SCR_fn_v_Link_InitTable(GMT_fn_p_stGetLinkTable()); SCR_fn_v_Link_InitTable(GMT_fn_p_stGetZoneLinkTable()); SCR_fn_v_Link_InitTable(HIE_fn_p_stGetSuperObjectLinkTable()); SCR_fn_v_Link_InitTable(HIE_fn_p_stGetLinkedObjectLinkTable()); SCR_fn_v_Link_InitTable(IPO_fn_p_stGetLinkTable()); SCR_fn_v_Link_InitTable(ISI_fn_pGetLinkTable()); SCR_fn_v_Link_InitTable(LGT_fn_p_stGetLightLinkTable()); SCR_fn_v_Link_InitTable(PO_fn_p_stGetLinkTable()); /* Shaitan Clean Env {*/ /* SCR_fn_v_Link_InitTable(SRF_GetSurfaceLinkTable());*/ /* End Shaitan Clan Env }*/ SCR_fn_v_Link_InitTable(VS_fn_p_stGetLinkTable()); SCR_fn_v_Link_InitTable(WP_fnp_WayPoint_GetLinkTable()); /* ANNECY MT - 16/09/98 {*/ SCR_fn_v_Link_InitTable(WPG_fnp_Graph_GetLinkTable()); /* END ANNECY MT }*/ /**** Those link-tables are used in the level ****/ SCR_fn_v_Link_InitTable(SECT_fn_pGetLinkTable()); #endif /* GAM_USE_SCRIPT */ } #endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC 04/06/99 */ /**************************************************************************/ /*----------------------------------------------------------------------------- * Description : This reinit all variables for a map (and characters) *----------------------------------------------------------------------------- * Input : * Output : *----------------------------------------------------------------------------- * Creation date : 27/08/96 Author : Francois *----------------------------------------------------------------------------- * Modification date : Modification Author : * Modifications : *---------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif extern int iNumLoop; /*declared in the AI module*/ #ifdef __cplusplus } #endif #ifdef U64 extern char GLI_cGlobalForceFogIsOn; #endif void fn_vReinitTheMap(void) { /* XB 23/06/99 */ #ifndef U64 GLD_bSetBackgroundColorForDevice(fn_hGetGLDDevice(0), RGB(0,0,0)); #else /* U64 */ GLD_bSetBackgroundColorForDevice(NULL, RGB(0,0,0)); #endif /* U64 */ /* End XB 23/06/99 */ fn_vStartEngineClock(); /* Just killing Anims and voices sounds*/ SND_fn_vKillAllObjectTypeSound( g_lSoundObjectTypeAnim ); #ifdef D_USE_LIPSYNC SND_fn_vKillAllObjectTypeSound( g_lSoundObjectTypeLipsSynchro ); #endif /* ANNECY MT - 28/08/98 {*/ POS_fn_vSetIdentityMatrix(&g_stEngineStructure.stMainCharacterPosition); POS_fn_vSetIdentityMatrix(&g_stEngineStructure.stMainCameraPosition); g_stEngineStructure.bResurection = FALSE; /* END ANNECY MT }*/ fn_vKillAllAlways(); fn_vDestructAllFatherSonLinks(); SAI_fn_bInitAllWhen(SAI_eInitWhenReinitTheMap); fn_vForceReinitAllObjects(); /*HP 031298 {*/ /* define main caracter position for demo mode */ #ifdef U64 /* FQ IA FOG ! */ GLI_cGlobalForceFogIsOn=0; /* FQ */ if(g_stEngineStructure.xDemoMode==TRUE) { MTH3D_tdstVector *p_stMainCharTranslation; HIE_tdxHandleToSuperObject hMaincharacter = MC_fn_hGetCharacterInMainCharacterNode( MC_fn_hGetFirstMainCharNode() ); p_stMainCharTranslation = POS_fn_p_stGetTranslationVector(HIE_fn_hGetSuperObjectGlobalMatrix (hMaincharacter)); INO_fn_vU64PutMainCharForDemoPlay(p_stMainCharTranslation); HIE_fn_vComputeNewRelativeMatrix (hMaincharacter); /* update dynamics*/ MEC_fn_vImposeActorMatrix (hMaincharacter); /* compute camera position*/ CAM_fn_vForceBestPosition(g_stEngineStructure.h_StdCamCaracter); } #endif /* }HP*/ fn_vReinitTheStaticHierarchie(SECT_hFatherSector); CAM_fn_vActualizeAViewport(CAM_e_MainViewport); /* * réinitialisation variable pour WaterPlane + sinus effect */ GLI_vInitWaterplaneModule(); if( g_bBeginMapSoundEventFlag ) /* SND_fn_lSendRequestSound(SND_C_OBJET_FANTOME,g_lSoundObjectTypeMusic,g_stBeginMapSoundEvent,0,NULL);*/ GAM_fn_lSaveBlockEventSlotMemory(g_stBeginMapSoundEvent.pstPtr,0); MOR_fn_vRemoveAllMorphedObjects (); /*XB980824*/ #ifndef D_THROW_MGT MGT_fn_vLastDesInitMagnet(); #endif /* D_THROW_MGT */ /*End XB*/ GLI_cGlobalFogIsOn = 0; SPO_ReinitSuperimposedArray () ; PRF_fn_vReinitAllChrono (); g_hSOCurrentMainSector = NULL; iNumLoop = 0; /* clear the AI loop depth counter!*/ /* reactivate all IPT entries that may have been deactivated by the AI of some character */ IPT_fn_vActivateAllEntryElements ( ) ; TFMT_vInitTextAfficheStructure(); #if (defined(USE_PROFILER) && !defined(PRESS_DEMO) && !defined(U64)) GAM_fn_vRasterDumpReset (); #endif /* ANNECY MT - 12/02/99 {*/ AGO_vInit() ; /* END ANNECY MT }*/ } /*----------------------------------------------------------------------------- * Description : Reinit The static hierarchie *----------------------------------------------------------------------------- * Input : SO * Output : *----------------------------------------------------------------------------- * Creation date : 22/05/97 Author : Francois *----------------------------------------------------------------------------- * Modification date : Modification Author : * Modifications : *---------------------------------------------------------------------------*/ void fn_vReinitTheStaticHierarchie(HIE_tdxHandleToSuperObject hSuperObject) { HIE_tdxHandleToSuperObject hChild; unsigned long i; HIE_fn_vSetSuperObjectDrawMask(hSuperObject,HIE_fn_lGetSuperObjectDrawMask(hSuperObject) | ~GLI_C_lHasNoMirror ); HIE_M_ForEachChildOf(hSuperObject,hChild,i) { fn_vReinitTheStaticHierarchie(hChild); } /* fbolefeysot - 01/10/98*/ /* remove init values in GMT{*/ /* if (HIE_fn_ulGetSuperObjectType(hSuperObject)==C_ucGeometric) GLI_p_stRecursiveReinitGameMaterialOfVisualsets((struct GEO_tdstVisualSet_*)HIE_fn_hGetSuperObjectObject(hSuperObject)); */ /*END fbolefeysot}*/ /* Shaitan Clean Env {*/ /* if( HIE_fn_lGetSuperObjectType(hSuperObject)==C_ucSector ) fn_vSectInfoReInitAllSurfacesInSector(hSuperObject); */ /* End Shaitan Clan Env }*/ } /*----------------------------------------------------------------------------- * Description : Verify integrity of some variables *----------------------------------------------------------------------------- * Input : void * Output : void *----------------------------------------------------------------------------- * Creation date : 30/08/96 Author : Francois *----------------------------------------------------------------------------- * Modification date : Modification Author : * Modifications : *---------------------------------------------------------------------------*/ void fn_vVerifySomeProgramVariables() { /**** Verify the size of Object's structure and Handle functions array ****/ if ( (g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_vCopyCloneMSFunction!=(tdfn_vCopyCloneMSFunction *)0x00000001) ||(g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_ulSizeOfFunction!=(tdfn_ulSizeofHandleFunction *)0x00000002) ||(g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_vAllocFunction!=(tdfn_vAllocHandleFunction *)0x00000003) ||(g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_vFreeFunction!=(tdfn_vAllocHandleFunction *)0x00000004) ||(g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_vInitFunction!=(tdfn_vInitHandleFunction *)0x00000005) ||(g_a_stStructureHandleFunction[(long)(sizeof(tdstEngineObject)/sizeof(void*))].p_fn_vDesinitFunction!=(tdfn_vInitHandleFunction *)0x00000006) ) { M_GameFatalError(E_uwGameVerifySomeProgramVariableHandleFunction); } } #include "Specif\Initeng.cxx"