/*---------------------------------------------------------------------------*/ /* Action.cpp : Definition of general Action.*/ /* auteur : Olivier Didelot 15/10/1996*/ /* modify : Olivier Didelot 27/12/1996*/ /* modify : Olivier Couvreur 20/01/1997 Support for script and editor names + parameter types*/ /* modify : Fabien MORALES 21/01/1997 Blocking actions management*/ /* modify : Fabien MORALES 29/01/1997 Vertex param*/ /* modify : Olivier Couvreur 04/02/1997 Lint 0 warnings */ /* modify : Olivier Couvreur 10/02/1997 Great enhancement for automatic init support*/ /* modify : Fabien MORALES 12/02/1997 Module & DsgVarId param types*/ /* modify : Olivier Couvreur 21/02/1997 Handle uppercase and lowaercase type string for editor*/ /* modify : Olivier Couvreur 26/02/1997 Lint check + call to fn_vInitModuleAcionEntries + suppres fn_p_stFindObjectRec & fn_p_stFindObjectInWorld*/ /* modify : Olivier Couvreur 25/03/1997 ACTIVE_EDITOR support*/ /*---------------------------------------------------------------------------*/ #include "AIUseCPA.h" #include "specif/AIOption.h" #include "AIMacros.h" #include "AI_Erm.h" #include "StrIntel.h" #include "ActParam.h" #include "Intell.h" #include "Convert.h" #include "Action.h" #include "EnumAct.h" /*XB*/ #include /*for toupper*/ /*End XB*/ /* Action Return : to block the next action*/ unsigned char g_ucNewActionReturn; /* to set the action type using the script*/ unsigned char g_ucUseDefaultActionReturn; /* the g_ucNewActionReturn is not taking into account*/ /****************************************************************************************/ /* ACTIONS */ /****************************************************************************************/ /* to handle meta-action parameters*/ tdstNodeInterpret *fn_p_stDefaultActionInit(HIE_tdxHandleToSuperObject p_SuperObjPerso, tdstNodeInterpret *p_stTree) { char *szTypeParam=NULL; unsigned char ucNbParam=0; enum tdeMetaActionId_ eMetaActionId=M_eMetaActionIdInterpret(p_stTree-1); szTypeParam=szGetMetaActionTypeInParamFromId(eMetaActionId); ucNbParam= (unsigned char) strlen(szTypeParam); /*Chiant pour la generation du C*/ /*#if defined(__DEBUG_AI__)*/ /* M_VerifyNbParamAction(p_stTree,ucNbParam);*/ /*#endif // __DEBUG_AI__*/ if (ucNbParam!=0) { tdstGetSetParam stParam; char cType; unsigned char ucParam=0; for (ucParam=0;ucParam