// Implementation file for the definition of a characteristic base type //////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "EDACQuer.hpp" #include "_AInterf.hpp" #include "Defines.hpp" #include "x:\cpa\main\inc\_EditID.h" #include "acp_base.h" #include "incITF.h" //-----------------IR------------------------- #include "ai_intf.hpp" //-------------------------------------------- #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif /////////////////////////// // Designer Variable List /////////////////////////// //************************************************************************ CPA_EdIR_DesignerVariableList *EDAC_fn_pclGetNewDesignerVariableList() { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { return (CPA_EdIR_DesignerVariableList *)pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_GetNewDesignerVariableList,0); } else { return NULL; } } //************************************************************************ void EDAC_fn_vDeleteDesignerVariableList(CPA_EdIR_DesignerVariableList *pclListOfDesignerVariables) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DeleteDesignerVariableList,(long)pclListOfDesignerVariables); } } /////////////////////////// // Designer Variable View /////////////////////////// //************************************************************************ void EDAC_fn_vDesignerVariableView_UpdateDisplayWithValues(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView, CTL_Editor_DataList *pclDataList) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclDesignerVariableView; stCom.pvData=pclDataList; pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_UpdateDisplayWithValues,(long)(&stCom)); } } //************************************************************************ void EDAC_fn_vDesignerVariableView_UpdateDisplay(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_UpdateDisplay,(long)pclDesignerVariableView); } } //************************************************************************ void EDAC_fn_vDesignerVariableView_UpdateState(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView, BOOL bHide) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { if (bHide) pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_HideVariables,(long)pclDesignerVariableView); else pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_ShowVariables,(long)pclDesignerVariableView); } } //************************************************************************ void EDAC_fn_vDesignerVariableView_UpdateControls(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView, CTL_Editor_ControlList *pclControlList) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclDesignerVariableView; stCom.pvData=pclControlList; pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_UpdateControls,(long)(&stCom)); } } //************************************************************************ long EDAC_fn_lDesignerVariableView_GetOldHeight(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { return pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_GetOldHeight,(long)pclDesignerVariableView); } else { return -1; } } //************************************************************************ void EDAC_fn_vDesignerVariableView_SetOldHeight(CPA_EdIR_DesignerVariablesView *pclDesignerVariableView, long lHeight) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclDesignerVariableView; stCom.lData=lHeight; pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_SetOldHeight,(long)(&stCom)); } } //************************************************************************ CRuntimeClass *EDAC_fn_pclDesignerVariableView_GetRuntimeClass() { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { return (CRuntimeClass *)pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DesignerVariableView_GetRuntimeClass,0); } else { return NULL; } } /////////////////////////// // Brain /////////////////////////// //************************************************************************ CPA_EdIR_Brain *EDAC_fn_pclGetNewBrain(CPA_Actor *pclModel) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { return (CPA_EdIR_Brain *)pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_GetNewIA,(long)pclModel); } else { return NULL; } } //************************************************************************ CPA_EdIR_Brain *EDAC_fn_pclGetNewCopyOfBrain(CPA_Actor *pclModel,CPA_EdIR_Brain *pclBrain) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclBrain; stCom.pvData=pclModel; return (CPA_EdIR_Brain *)pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_GetNewCopyOfIA,(long)(&stCom)); } else { return NULL; } } //************************************************************************ void EDAC_fn_vDeleteBrain(CPA_EdIR_Brain *pclBrain) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_DeleteIA,(long)pclBrain); } } //************************************************************************ void EDAC_fn_vShowBrain(CPA_EdIR_Brain *pclBrain) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_ShowIA,(long)pclBrain); } } //************************************************************************ void EDAC_fn_vLoadBrain(CPA_Actor *pclModel,CString csName) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclModel; stCom.pvData=&csName; pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_LoadIA,(long)(&stCom)); } } //************************************************************************ // Shaitan => optimisation lists in the level void EDAC_fn_vProcessBrain(CPA_Actor *pclModel,CPA_Actor *pclInstance, BOOL bUpdateReferences) // End Shaitan => optimisation lists in the level { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclModel; stCom.pvData=pclInstance; // Shaitan => optimisation lists in the level pclIADLL->OnQueryAction(g_pclInterface, (bUpdateReferences) ? C_uiAI_UpdateAndProcessIA : C_uiAI_ProcessIA,(long)(&stCom)); // End Shaitan => optimisation lists in the level } } //************************************************************************ void EDAC_fn_vSaveInitValuesInBrainMS(CPA_Actor *pclInstance,struct SCR_tdst_File_Description_ *pstFile) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { tdstActorsIACom stCom; stCom.pvThis=pclInstance; stCom.pvData=pstFile; pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_SaveInitValuesInBrainMS,(long)(&stCom)); } } //************************************************************************ BOOL EDAC_fn_bMustSaveAIEntryInModel(CPA_EdIR_Brain *pclBrain) { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { return (BOOL)pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_MustSaveAIEntryInModel,(long)pclBrain); } else { return FALSE; } } /////////////////////////// // AI Editor /////////////////////////// //************************************************************************ void EDAC_fn_vShowAIEditor() { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_ShowEditor,0); } } //************************************************************************ void EDAC_fn_vHideAIEditor() { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_HideEditor,0); } } //************************************************************************ void EDAC_fn_vOnLostFocusAIEditor() { CPA_DLLBase *pclIADLL=(CPA_DLLBase*)(g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName)); if(pclIADLL!=NULL) { pclIADLL->OnQueryAction(g_pclInterface,C_uiAI_HasLostFocus,0); } }